summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2012-01-11 10:45:00 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2012-01-11 10:45:00 +0000
commit24d1733e78a17d71aea6912144394ed7d3a82d50 (patch)
tree069608d934a8716d55a94c62c4bd75c1152f868c
parentd7b9fe130c2305d44fa1023283d3c2fcd389ba93 (diff)
downloadm4-24d1733e78a17d71aea6912144394ed7d3a82d50.tar.gz
remove .gitignores and add the rest of the files
-rw-r--r--ABOUT-NLS1101
-rwxr-xr-xGNUmakefile127
-rw-r--r--Makefile.in3078
-rw-r--r--aclocal.m41239
-rw-r--r--autom4te.cache/output.045149
-rw-r--r--autom4te.cache/output.145149
-rw-r--r--autom4te.cache/requests929
-rw-r--r--autom4te.cache/traces.020992
-rw-r--r--autom4te.cache/traces.16541
-rwxr-xr-xbuild-aux/arg-nonnull.h26
-rwxr-xr-xbuild-aux/config.rpath672
-rwxr-xr-xbuild-aux/config.rpath~614
-rwxr-xr-xbuild-aux/gendocs.sh367
-rwxr-xr-xbuild-aux/git-version-gen151
-rwxr-xr-xbuild-aux/gnupload413
-rwxr-xr-xbuild-aux/ltmain.sh8413
-rwxr-xr-xbuild-aux/update-copyright266
-rwxr-xr-xbuild-aux/useless-if-before-free209
-rwxr-xr-xbuild-aux/vc-list-files116
-rwxr-xr-xbuild-aux/warn-on-use.h75
-rwxr-xr-xconfigure45149
-rw-r--r--doc/Makefile.in1619
-rwxr-xr-xdoc/fdl-1.3.texi506
-rwxr-xr-xdoc/gendocs_template96
-rwxr-xr-xdoc/gpl-3.0.texi717
-rwxr-xr-xdoc/regexprops-generic.texi715
-rwxr-xr-xgnu/Makefile.am2606
-rw-r--r--gnu/Makefile.in2890
-rwxr-xr-xgnu/alloca.c489
-rwxr-xr-xgnu/alloca.in.h56
-rwxr-xr-xgnu/asnprintf.c35
-rwxr-xr-xgnu/asprintf.c40
-rwxr-xr-xgnu/basename-lgpl.c75
-rwxr-xr-xgnu/basename.c58
-rwxr-xr-xgnu/binary-io.h66
-rwxr-xr-xgnu/bitrotate.h126
-rwxr-xr-xgnu/btowc.c38
-rwxr-xr-xgnu/c-ctype.c396
-rwxr-xr-xgnu/c-ctype.h295
-rwxr-xr-xgnu/c-strcase.h56
-rwxr-xr-xgnu/c-strcasecmp.c57
-rwxr-xr-xgnu/c-strncasecmp.c57
-rwxr-xr-xgnu/canonicalize-lgpl.c371
-rwxr-xr-xgnu/clean-temp.c785
-rwxr-xr-xgnu/clean-temp.h133
-rwxr-xr-xgnu/cloexec.c83
-rwxr-xr-xgnu/cloexec.h38
-rwxr-xr-xgnu/close-stream.c78
-rwxr-xr-xgnu/close-stream.h2
-rwxr-xr-xgnu/closein.c111
-rwxr-xr-xgnu/closein.h32
-rwxr-xr-xgnu/closeout.c124
-rwxr-xr-xgnu/closeout.h36
-rwxr-xr-xgnu/config.charset683
-rw-r--r--gnu/config.hin1966
-rwxr-xr-xgnu/dirname-lgpl.c86
-rwxr-xr-xgnu/dirname.c38
-rwxr-xr-xgnu/dirname.h74
-rwxr-xr-xgnu/dup-safer-flag.c44
-rwxr-xr-xgnu/dup-safer.c34
-rwxr-xr-xgnu/dup2.c128
-rwxr-xr-xgnu/errno.in.h160
-rwxr-xr-xgnu/error.c366
-rwxr-xr-xgnu/error.h65
-rwxr-xr-xgnu/execute.c278
-rwxr-xr-xgnu/execute.h44
-rwxr-xr-xgnu/exitfail.c25
-rwxr-xr-xgnu/exitfail.h18
-rwxr-xr-xgnu/fatal-signal.c286
-rwxr-xr-xgnu/fatal-signal.h76
-rwxr-xr-xgnu/fcntl.c294
-rwxr-xr-xgnu/fcntl.in.h258
-rwxr-xr-xgnu/fd-safer-flag.c52
-rwxr-xr-xgnu/fd-safer.c49
-rwxr-xr-xgnu/fflush.c218
-rwxr-xr-xgnu/filenamecat-lgpl.c88
-rwxr-xr-xgnu/filenamecat.c41
-rwxr-xr-xgnu/filenamecat.h27
-rwxr-xr-xgnu/float+.h148
-rwxr-xr-xgnu/float.in.h62
-rwxr-xr-xgnu/fopen-safer.c63
-rwxr-xr-xgnu/fopen.c105
-rwxr-xr-xgnu/fpending.c30
-rwxr-xr-xgnu/fpending.h34
-rwxr-xr-xgnu/fpucw.h107
-rwxr-xr-xgnu/fpurge.c137
-rwxr-xr-xgnu/freadahead.c85
-rwxr-xr-xgnu/freadahead.h38
-rwxr-xr-xgnu/freading.c64
-rwxr-xr-xgnu/freading.h53
-rwxr-xr-xgnu/freadptr.c103
-rwxr-xr-xgnu/freadptr.h39
-rwxr-xr-xgnu/freadseek.c136
-rwxr-xr-xgnu/freadseek.h42
-rwxr-xr-xgnu/frexp.c166
-rwxr-xr-xgnu/frexpl.c18
-rwxr-xr-xgnu/fseeko.c147
-rwxr-xr-xgnu/fseterr.c74
-rwxr-xr-xgnu/fseterr.h37
-rwxr-xr-xgnu/ftello.c54
-rwxr-xr-xgnu/getdtablesize.c63
-rwxr-xr-xgnu/gettext.h280
-rwxr-xr-xgnu/gettimeofday.c144
-rwxr-xr-xgnu/gl_anyhash_list1.h27
-rwxr-xr-xgnu/gl_anyhash_list2.h138
-rwxr-xr-xgnu/gl_anylinked_list1.h48
-rwxr-xr-xgnu/gl_anylinked_list2.h1195
-rwxr-xr-xgnu/gl_anytree_oset.h297
-rwxr-xr-xgnu/gl_avltree_oset.c583
-rwxr-xr-xgnu/gl_avltree_oset.h34
-rwxr-xr-xgnu/gl_linkedhash_list.c124
-rwxr-xr-xgnu/gl_linkedhash_list.h34
-rwxr-xr-xgnu/gl_list.c283
-rwxr-xr-xgnu/gl_list.h844
-rwxr-xr-xgnu/gl_oset.c96
-rwxr-xr-xgnu/gl_oset.h289
-rwxr-xr-xgnu/gl_xlist.c128
-rwxr-xr-xgnu/gl_xlist.h179
-rwxr-xr-xgnu/gl_xoset.c46
-rwxr-xr-xgnu/gl_xoset.h67
-rwxr-xr-xgnu/iconv.in.h74
-rwxr-xr-xgnu/iconv_open-aix.gperf44
-rwxr-xr-xgnu/iconv_open-hpux.gperf56
-rwxr-xr-xgnu/iconv_open-irix.gperf31
-rwxr-xr-xgnu/iconv_open-osf.gperf50
-rwxr-xr-xgnu/iconv_open-solaris.gperf30
-rwxr-xr-xgnu/iconv_open.c173
-rwxr-xr-xgnu/intprops.h83
-rwxr-xr-xgnu/inttypes.in.h1103
-rwxr-xr-xgnu/isnan.c173
-rwxr-xr-xgnu/isnand-nolibm.h33
-rwxr-xr-xgnu/isnand.c19
-rwxr-xr-xgnu/isnanf-nolibm.h33
-rwxr-xr-xgnu/isnanf.c20
-rwxr-xr-xgnu/isnanl-nolibm.h33
-rwxr-xr-xgnu/isnanl.c20
-rwxr-xr-xgnu/langinfo.in.h162
-rwxr-xr-xgnu/localcharset.c549
-rwxr-xr-xgnu/localcharset.h41
-rwxr-xr-xgnu/lseek.c62
-rwxr-xr-xgnu/lstat.c91
-rwxr-xr-xgnu/malloc.c57
-rwxr-xr-xgnu/malloca.c137
-rwxr-xr-xgnu/malloca.h134
-rwxr-xr-xgnu/malloca.valgrind7
-rwxr-xr-xgnu/math.in.h633
-rwxr-xr-xgnu/mbchar.c35
-rwxr-xr-xgnu/mbchar.h350
-rwxr-xr-xgnu/mbiter.h215
-rwxr-xr-xgnu/mbrtowc.c386
-rwxr-xr-xgnu/mbsinit.c47
-rwxr-xr-xgnu/mbslen.c44
-rwxr-xr-xgnu/mbsstr.c379
-rwxr-xr-xgnu/mbuiter.h222
-rwxr-xr-xgnu/memchr.c172
-rwxr-xr-xgnu/memchr.valgrind14
-rwxr-xr-xgnu/memchr2.c164
-rwxr-xr-xgnu/memchr2.h31
-rwxr-xr-xgnu/memchr2.valgrind14
-rwxr-xr-xgnu/memcmp2.c36
-rwxr-xr-xgnu/memcmp2.h39
-rwxr-xr-xgnu/memmem.c76
-rwxr-xr-xgnu/mkdtemp.c39
-rwxr-xr-xgnu/mkstemp-safer.c63
-rwxr-xr-xgnu/mkstemp.c46
-rwxr-xr-xgnu/nl_langinfo.c260
-rwxr-xr-xgnu/obstack.c430
-rwxr-xr-xgnu/obstack.h512
-rwxr-xr-xgnu/obstack_printf.c92
-rwxr-xr-xgnu/open.c166
-rwxr-xr-xgnu/pathmax.h48
-rwxr-xr-xgnu/pipe-safer.c56
-rwxr-xr-xgnu/pipe.c445
-rwxr-xr-xgnu/pipe.h146
-rwxr-xr-xgnu/pipe2-safer.c52
-rwxr-xr-xgnu/pipe2.c141
-rwxr-xr-xgnu/printf-args.c188
-rwxr-xr-xgnu/printf-args.h155
-rwxr-xr-xgnu/printf-frexp.c188
-rwxr-xr-xgnu/printf-frexp.h23
-rwxr-xr-xgnu/printf-frexpl.c18
-rwxr-xr-xgnu/printf-frexpl.h23
-rwxr-xr-xgnu/printf-parse.c627
-rwxr-xr-xgnu/printf-parse.h180
-rwxr-xr-xgnu/progname.c92
-rwxr-xr-xgnu/progname.h62
-rwxr-xr-xgnu/propername.c311
-rwxr-xr-xgnu/propername.h106
-rwxr-xr-xgnu/quote.c40
-rwxr-xr-xgnu/quote.h21
-rwxr-xr-xgnu/quotearg.c889
-rwxr-xr-xgnu/quotearg.h389
-rwxr-xr-xgnu/rawmemchr.c136
-rwxr-xr-xgnu/rawmemchr.valgrind12
-rwxr-xr-xgnu/readlink.c74
-rwxr-xr-xgnu/ref-add.sin30
-rwxr-xr-xgnu/ref-del.sin25
-rwxr-xr-xgnu/regcomp.c3869
-rwxr-xr-xgnu/regex.c72
-rwxr-xr-xgnu/regex.h676
-rwxr-xr-xgnu/regex_internal.c1740
-rwxr-xr-xgnu/regex_internal.h871
-rwxr-xr-xgnu/regexec.c4416
-rwxr-xr-xgnu/rename.c473
-rwxr-xr-xgnu/rmdir.c99
-rwxr-xr-xgnu/same-inode.h25
-rwxr-xr-xgnu/sched.in.h47
-rwxr-xr-xgnu/setenv.c383
-rwxr-xr-xgnu/sig-handler.h44
-rwxr-xr-xgnu/sigaction.c204
-rwxr-xr-xgnu/signal.in.h249
-rwxr-xr-xgnu/signbitd.c64
-rwxr-xr-xgnu/signbitf.c64
-rwxr-xr-xgnu/signbitl.c64
-rwxr-xr-xgnu/sigprocmask.c329
-rwxr-xr-xgnu/size_max.h31
-rwxr-xr-xgnu/snprintf.c72
-rwxr-xr-xgnu/spawn.in.h548
-rwxr-xr-xgnu/spawn_faction_addclose.c59
-rwxr-xr-xgnu/spawn_faction_adddup2.c60
-rwxr-xr-xgnu/spawn_faction_addopen.c63
-rwxr-xr-xgnu/spawn_faction_destroy.c31
-rwxr-xr-xgnu/spawn_faction_init.c56
-rwxr-xr-xgnu/spawn_int.h62
-rwxr-xr-xgnu/spawnattr_destroy.c28
-rwxr-xr-xgnu/spawnattr_init.c33
-rwxr-xr-xgnu/spawnattr_setflags.c45
-rwxr-xr-xgnu/spawnattr_setsigmask.c33
-rwxr-xr-xgnu/spawni.c374
-rwxr-xr-xgnu/spawnp.c33
-rwxr-xr-xgnu/sprintf.c80
-rwxr-xr-xgnu/stat.c104
-rwxr-xr-xgnu/stdarg.in.h35
-rwxr-xr-xgnu/stdbool.in.h119
-rwxr-xr-xgnu/stddef.in.h86
-rwxr-xr-xgnu/stdint.in.h567
-rwxr-xr-xgnu/stdio--.h41
-rwxr-xr-xgnu/stdio-impl.h94
-rwxr-xr-xgnu/stdio-safer.h36
-rwxr-xr-xgnu/stdio-write.c150
-rwxr-xr-xgnu/stdio.in.h675
-rwxr-xr-xgnu/stdlib--.h36
-rwxr-xr-xgnu/stdlib-safer.h32
-rwxr-xr-xgnu/stdlib.in.h497
-rwxr-xr-xgnu/str-kmp.h150
-rwxr-xr-xgnu/str-two-way.h429
-rwxr-xr-xgnu/strchrnul.c142
-rwxr-xr-xgnu/strchrnul.valgrind12
-rwxr-xr-xgnu/streq.h176
-rwxr-xr-xgnu/strerror.c347
-rwxr-xr-xgnu/striconv.c457
-rwxr-xr-xgnu/striconv.h76
-rwxr-xr-xgnu/string.in.h642
-rwxr-xr-xgnu/stripslash.c45
-rwxr-xr-xgnu/strndup.c37
-rwxr-xr-xgnu/strnlen.c31
-rwxr-xr-xgnu/strnlen1.c35
-rwxr-xr-xgnu/strnlen1.h39
-rwxr-xr-xgnu/strtod.c276
-rwxr-xr-xgnu/strtol.c434
-rwxr-xr-xgnu/sys_stat.in.h548
-rwxr-xr-xgnu/sys_time.in.h79
-rwxr-xr-xgnu/sys_wait.in.h106
-rwxr-xr-xgnu/tempname.c311
-rwxr-xr-xgnu/tempname.h50
-rwxr-xr-xgnu/time.in.h134
-rwxr-xr-xgnu/tmpdir.c133
-rwxr-xr-xgnu/tmpdir.h26
-rwxr-xr-xgnu/trim.c133
-rwxr-xr-xgnu/trim.h33
-rwxr-xr-xgnu/unistd--.h32
-rwxr-xr-xgnu/unistd-safer.h31
-rwxr-xr-xgnu/unistd.in.h921
-rwxr-xr-xgnu/unitypes.h26
-rwxr-xr-xgnu/uniwidth.h65
-rwxr-xr-xgnu/uniwidth/cjk.h37
-rwxr-xr-xgnu/uniwidth/width.c359
-rwxr-xr-xgnu/unlocked-io.h136
-rwxr-xr-xgnu/unsetenv.c120
-rwxr-xr-xgnu/vasnprintf.c5488
-rwxr-xr-xgnu/vasnprintf.h80
-rwxr-xr-xgnu/vasprintf.c51
-rwxr-xr-xgnu/verify.h140
-rwxr-xr-xgnu/verror.c77
-rwxr-xr-xgnu/verror.h53
-rwxr-xr-xgnu/vfprintf.c74
-rwxr-xr-xgnu/vprintf.c33
-rwxr-xr-xgnu/w32spawn.h212
-rwxr-xr-xgnu/wait-process.c361
-rwxr-xr-xgnu/wait-process.h74
-rwxr-xr-xgnu/wchar.in.h319
-rwxr-xr-xgnu/wcrtomb.c53
-rwxr-xr-xgnu/wctype.in.h239
-rwxr-xr-xgnu/wcwidth.c51
-rwxr-xr-xgnu/xalloc-die.c41
-rwxr-xr-xgnu/xalloc.h281
-rwxr-xr-xgnu/xasprintf.c34
-rwxr-xr-xgnu/xmalloc.c118
-rwxr-xr-xgnu/xmalloca.c38
-rwxr-xr-xgnu/xmalloca.h64
-rwxr-xr-xgnu/xmemdup0.c44
-rwxr-xr-xgnu/xmemdup0.h51
-rwxr-xr-xgnu/xprintf.c79
-rwxr-xr-xgnu/xprintf.h45
-rwxr-xr-xgnu/xsize.h108
-rwxr-xr-xgnu/xstriconv.c62
-rwxr-xr-xgnu/xstriconv.h78
-rwxr-xr-xgnu/xstrndup.c36
-rwxr-xr-xgnu/xstrndup.h23
-rwxr-xr-xgnu/xvasprintf.c110
-rwxr-xr-xgnu/xvasprintf.h55
-rw-r--r--gnulib/Makefile30
-rw-r--r--gnulib/build-aux/po/remove-potcdate.sin19
-rw-r--r--gnulib/doc/Makefile58
-rw-r--r--gnulib/lib/Makefile6
-rw-r--r--gnulib/lib/ref-add.sin30
-rw-r--r--gnulib/lib/ref-del.sin25
-rw-r--r--gnulib/lib/unictype/Makefile20
-rw-r--r--gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.mobin0 -> 90 bytes
-rw-r--r--gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.po20
-rw-r--r--ltdl/COPYING.LIB515
-rw-r--r--ltdl/Makefile.inc147
-rw-r--r--ltdl/README37
-rw-r--r--ltdl/argz.c226
-rw-r--r--ltdl/argz_.h68
-rw-r--r--ltdl/libltdl/lt__alloc.h58
-rw-r--r--ltdl/libltdl/lt__dirent.h87
-rw-r--r--ltdl/libltdl/lt__glibc.h83
-rw-r--r--ltdl/libltdl/lt__private.h149
-rw-r--r--ltdl/libltdl/lt__strl.h53
-rw-r--r--ltdl/libltdl/lt_dlloader.h90
-rw-r--r--ltdl/libltdl/lt_error.h85
-rw-r--r--ltdl/libltdl/lt_system.h154
-rw-r--r--ltdl/libltdl/slist.h94
-rw-r--r--ltdl/loaders/dld_link.c158
-rw-r--r--ltdl/loaders/dlopen.c235
-rw-r--r--ltdl/loaders/dyld.c511
-rw-r--r--ltdl/loaders/load_add_on.c167
-rw-r--r--ltdl/loaders/loadlibrary.c251
-rw-r--r--ltdl/loaders/preopen.c375
-rw-r--r--ltdl/loaders/shl_load.c222
-rw-r--r--ltdl/lt__alloc.c95
-rw-r--r--ltdl/lt__dirent.c107
-rw-r--r--ltdl/lt__strl.c127
-rw-r--r--ltdl/lt_dlloader.c210
-rw-r--r--ltdl/lt_error.c110
-rw-r--r--ltdl/ltdl.c2425
-rw-r--r--ltdl/ltdl.h162
-rwxr-xr-xltdl/m4/00gnulib.m430
-rwxr-xr-xltdl/m4/alloca.m447
-rw-r--r--ltdl/m4/argz.m479
-rwxr-xr-xltdl/m4/assert.m424
-rwxr-xr-xltdl/m4/autobuild.m440
-rwxr-xr-xltdl/m4/btowc.m473
-rwxr-xr-xltdl/m4/canonicalize.m481
-rwxr-xr-xltdl/m4/cloexec.m410
-rwxr-xr-xltdl/m4/close-stream.m413
-rwxr-xr-xltdl/m4/closein.m413
-rwxr-xr-xltdl/m4/closeout.m414
-rwxr-xr-xltdl/m4/codeset.m421
-rw-r--r--ltdl/m4/codeset.m4~21
-rwxr-xr-xltdl/m4/config-h.m413
-rwxr-xr-xltdl/m4/dirname.m426
-rwxr-xr-xltdl/m4/dos.m471
-rwxr-xr-xltdl/m4/double-slash-root.m438
-rwxr-xr-xltdl/m4/dup2.m458
-rwxr-xr-xltdl/m4/eealloc.m432
-rwxr-xr-xltdl/m4/environ.m436
-rwxr-xr-xltdl/m4/errno_h.m4115
-rwxr-xr-xltdl/m4/error.m422
-rwxr-xr-xltdl/m4/execute.m412
-rwxr-xr-xltdl/m4/exitfail.m414
-rwxr-xr-xltdl/m4/exponentd.m4114
-rwxr-xr-xltdl/m4/exponentf.m491
-rwxr-xr-xltdl/m4/exponentl.m497
-rwxr-xr-xltdl/m4/extensions.m4118
-rwxr-xr-xltdl/m4/fatal-signal.m413
-rwxr-xr-xltdl/m4/fcntl-o.m481
-rwxr-xr-xltdl/m4/fcntl.m483
-rwxr-xr-xltdl/m4/fcntl_h.m441
-rwxr-xr-xltdl/m4/fflush.m482
-rwxr-xr-xltdl/m4/filenamecat.m419
-rwxr-xr-xltdl/m4/flexmember.m441
-rwxr-xr-xltdl/m4/float_h.m419
-rwxr-xr-xltdl/m4/fopen.m461
-rwxr-xr-xltdl/m4/fpending.m483
-rwxr-xr-xltdl/m4/fpieee.m452
-rwxr-xr-xltdl/m4/fpurge.m445
-rwxr-xr-xltdl/m4/freading.m410
-rwxr-xr-xltdl/m4/frexp.m4146
-rwxr-xr-xltdl/m4/frexpl.m4186
-rwxr-xr-xltdl/m4/fseeko.m435
-rwxr-xr-xltdl/m4/ftello.m432
-rwxr-xr-xltdl/m4/getdtablesize.m415
-rwxr-xr-xltdl/m4/getopt.m4273
-rwxr-xr-xltdl/m4/getpagesize.m430
-rwxr-xr-xltdl/m4/gettext.m4381
-rw-r--r--ltdl/m4/gettext.m4~417
-rwxr-xr-xltdl/m4/gettimeofday.m4120
-rwxr-xr-xltdl/m4/gl_list.m410
-rwxr-xr-xltdl/m4/glibc2.m430
-rw-r--r--ltdl/m4/glibc2.m4~30
-rwxr-xr-xltdl/m4/glibc21.m430
-rw-r--r--ltdl/m4/glibc21.m4~30
-rwxr-xr-xltdl/m4/gnulib-common.m4142
-rwxr-xr-xltdl/m4/gnulib-comp.m41246
-rwxr-xr-xltdl/m4/gnulib-tool.m457
-rwxr-xr-xltdl/m4/iconv.m4199
-rw-r--r--ltdl/m4/iconv.m4~101
-rwxr-xr-xltdl/m4/iconv_h.m437
-rwxr-xr-xltdl/m4/iconv_open.m4238
-rwxr-xr-xltdl/m4/include_next.m4187
-rwxr-xr-xltdl/m4/inline.m440
-rwxr-xr-xltdl/m4/intdiv0.m484
-rw-r--r--ltdl/m4/intdiv0.m4~70
-rwxr-xr-xltdl/m4/intl.m4285
-rw-r--r--ltdl/m4/intl.m4~259
-rwxr-xr-xltdl/m4/intldir.m419
-rw-r--r--ltdl/m4/intldir.m4~19
-rwxr-xr-xltdl/m4/intlmacosx.m451
-rwxr-xr-xltdl/m4/intmax.m433
-rw-r--r--ltdl/m4/intmax.m4~33
-rwxr-xr-xltdl/m4/intmax_t.m462
-rwxr-xr-xltdl/m4/inttypes-pri.m436
-rw-r--r--ltdl/m4/inttypes-pri.m4~36
-rwxr-xr-xltdl/m4/inttypes.m4302
-rwxr-xr-xltdl/m4/inttypes_h.m426
-rw-r--r--ltdl/m4/inttypes_h.m4~26
-rwxr-xr-xltdl/m4/isnand.m495
-rwxr-xr-xltdl/m4/isnanf.m4179
-rwxr-xr-xltdl/m4/isnanl.m4245
-rwxr-xr-xltdl/m4/langinfo_h.m474
-rwxr-xr-xltdl/m4/lcmessage.m431
-rw-r--r--ltdl/m4/lcmessage.m4~30
-rwxr-xr-xltdl/m4/ldexpl.m488
-rwxr-xr-xltdl/m4/lib-ld.m4110
-rw-r--r--ltdl/m4/lib-ld.m4~110
-rwxr-xr-xltdl/m4/lib-link.m4764
-rw-r--r--ltdl/m4/lib-link.m4~644
-rwxr-xr-xltdl/m4/lib-prefix.m4224
-rw-r--r--ltdl/m4/lib-prefix.m4~185
-rw-r--r--ltdl/m4/libtool.m47377
-rwxr-xr-xltdl/m4/link.m438
-rwxr-xr-xltdl/m4/localcharset.m417
-rwxr-xr-xltdl/m4/locale-fr.m4185
-rwxr-xr-xltdl/m4/locale-ja.m4107
-rwxr-xr-xltdl/m4/locale-tr.m497
-rwxr-xr-xltdl/m4/locale-zh.m492
-rwxr-xr-xltdl/m4/lock.m437
-rw-r--r--ltdl/m4/lock.m4~311
-rw-r--r--ltdl/m4/longdouble.m431
-rwxr-xr-xltdl/m4/longlong.m4106
-rw-r--r--ltdl/m4/longlong.m4~48
-rwxr-xr-xltdl/m4/lseek.m451
-rwxr-xr-xltdl/m4/lstat.m428
-rw-r--r--ltdl/m4/ltdl.m4804
-rw-r--r--ltdl/m4/ltoptions.m4368
-rw-r--r--ltdl/m4/ltsugar.m4123
-rw-r--r--ltdl/m4/ltversion.m423
-rw-r--r--ltdl/m4/lt~obsolete.m492
-rwxr-xr-xltdl/m4/malloc.m441
-rwxr-xr-xltdl/m4/malloca.m415
-rwxr-xr-xltdl/m4/math_h.m4128
-rwxr-xr-xltdl/m4/mbchar.m414
-rwxr-xr-xltdl/m4/mbiter.m418
-rwxr-xr-xltdl/m4/mbrtowc.m4384
-rwxr-xr-xltdl/m4/mbsinit.m430
-rwxr-xr-xltdl/m4/mbslen.m416
-rwxr-xr-xltdl/m4/mbstate_t.m434
-rwxr-xr-xltdl/m4/memchr.m486
-rwxr-xr-xltdl/m4/memmem.m484
-rwxr-xr-xltdl/m4/mkdtemp.m421
-rwxr-xr-xltdl/m4/mkstemp.m456
-rwxr-xr-xltdl/m4/mmap-anon.m459
-rwxr-xr-xltdl/m4/mode_t.m426
-rwxr-xr-xltdl/m4/multiarch.m465
-rwxr-xr-xltdl/m4/nl_langinfo.m425
-rwxr-xr-xltdl/m4/nls.m432
-rw-r--r--ltdl/m4/nls.m4~31
-rwxr-xr-xltdl/m4/nocrash.m4102
-rwxr-xr-xltdl/m4/obstack-printf-posix.m4105
-rwxr-xr-xltdl/m4/obstack-printf.m442
-rwxr-xr-xltdl/m4/open.m474
-rwxr-xr-xltdl/m4/pathmax.m413
-rwxr-xr-xltdl/m4/pipe.m412
-rwxr-xr-xltdl/m4/pipe2.m418
-rwxr-xr-xltdl/m4/po.m4449
-rw-r--r--ltdl/m4/po.m4~428
-rwxr-xr-xltdl/m4/posix_spawn.m4375
-rwxr-xr-xltdl/m4/printf-frexp.m445
-rwxr-xr-xltdl/m4/printf-frexpl.m464
-rwxr-xr-xltdl/m4/printf-posix.m445
-rw-r--r--ltdl/m4/printf-posix.m4~44
-rwxr-xr-xltdl/m4/printf.m41416
-rwxr-xr-xltdl/m4/progtest.m492
-rw-r--r--ltdl/m4/progtest.m4~92
-rwxr-xr-xltdl/m4/putenv.m441
-rwxr-xr-xltdl/m4/quote.m414
-rwxr-xr-xltdl/m4/quotearg.m410
-rwxr-xr-xltdl/m4/rawmemchr.m421
-rwxr-xr-xltdl/m4/readlink.m462
-rwxr-xr-xltdl/m4/regex.m4229
-rwxr-xr-xltdl/m4/rename.m4158
-rwxr-xr-xltdl/m4/rmdir.m444
-rwxr-xr-xltdl/m4/sched_h.m436
-rwxr-xr-xltdl/m4/setenv.m4110
-rwxr-xr-xltdl/m4/sig_atomic_t.m414
-rwxr-xr-xltdl/m4/sigaction.m445
-rwxr-xr-xltdl/m4/signal_h.m447
-rwxr-xr-xltdl/m4/signalblocking.m442
-rwxr-xr-xltdl/m4/signbit.m4287
-rwxr-xr-xltdl/m4/size_max.m475
-rw-r--r--ltdl/m4/size_max.m4~62
-rwxr-xr-xltdl/m4/snprintf-posix.m4126
-rwxr-xr-xltdl/m4/snprintf.m440
-rwxr-xr-xltdl/m4/spawn_h.m496
-rwxr-xr-xltdl/m4/sprintf-posix.m4108
-rwxr-xr-xltdl/m4/ssize_t.m421
-rwxr-xr-xltdl/m4/stat.m463
-rwxr-xr-xltdl/m4/stdarg.m467
-rwxr-xr-xltdl/m4/stdbool.m4115
-rwxr-xr-xltdl/m4/stddef_h.m445
-rwxr-xr-xltdl/m4/stdint.m4472
-rwxr-xr-xltdl/m4/stdint_h.m426
-rw-r--r--ltdl/m4/stdint_h.m4~26
-rwxr-xr-xltdl/m4/stdio-safer.m425
-rwxr-xr-xltdl/m4/stdio_h.m4152
-rwxr-xr-xltdl/m4/stdlib-safer.m410
-rwxr-xr-xltdl/m4/stdlib_h.m4100
-rwxr-xr-xltdl/m4/strchrnul.m421
-rwxr-xr-xltdl/m4/strdup.m438
-rwxr-xr-xltdl/m4/strerror.m468
-rwxr-xr-xltdl/m4/string_h.m4104
-rwxr-xr-xltdl/m4/strndup.m449
-rwxr-xr-xltdl/m4/strnlen.m432
-rwxr-xr-xltdl/m4/strtod.m490
-rwxr-xr-xltdl/m4/strtol.m410
-rwxr-xr-xltdl/m4/symlink.m438
-rwxr-xr-xltdl/m4/sys_stat_h.m480
-rwxr-xr-xltdl/m4/sys_time_h.m470
-rwxr-xr-xltdl/m4/sys_wait_h.m424
-rwxr-xr-xltdl/m4/tempname.m422
-rwxr-xr-xltdl/m4/threadlib.m4324
-rwxr-xr-xltdl/m4/time_h.m474
-rwxr-xr-xltdl/m4/tmpdir.m412
-rwxr-xr-xltdl/m4/uintmax_t.m430
-rw-r--r--ltdl/m4/uintmax_t.m4~30
-rw-r--r--ltdl/m4/ulonglong.m448
-rwxr-xr-xltdl/m4/ungetc.m436
-rwxr-xr-xltdl/m4/unistd-safer.m413
-rwxr-xr-xltdl/m4/unistd_h.m4149
-rwxr-xr-xltdl/m4/unlocked-io.m441
-rwxr-xr-xltdl/m4/vasnprintf-posix.m4100
-rwxr-xr-xltdl/m4/vasnprintf.m4276
-rwxr-xr-xltdl/m4/vasprintf-posix.m4101
-rwxr-xr-xltdl/m4/vasprintf.m446
-rwxr-xr-xltdl/m4/version-etc.m433
-rwxr-xr-xltdl/m4/vfprintf-posix.m4110
-rwxr-xr-xltdl/m4/visibility.m452
-rw-r--r--ltdl/m4/visibility.m4~52
-rwxr-xr-xltdl/m4/vprintf-posix.m425
-rwxr-xr-xltdl/m4/wait-process.m413
-rwxr-xr-xltdl/m4/warn-on-use.m445
-rwxr-xr-xltdl/m4/wchar.m4150
-rwxr-xr-xltdl/m4/wchar_t.m420
-rw-r--r--ltdl/m4/wchar_t.m4~20
-rwxr-xr-xltdl/m4/wcrtomb.m492
-rwxr-xr-xltdl/m4/wctob.m491
-rwxr-xr-xltdl/m4/wctype.m484
-rwxr-xr-xltdl/m4/wcwidth.m494
-rwxr-xr-xltdl/m4/wint_t.m428
-rw-r--r--ltdl/m4/wint_t.m4~20
-rwxr-xr-xltdl/m4/xalloc.m425
-rwxr-xr-xltdl/m4/xsize.m413
-rw-r--r--ltdl/m4/xsize.m4~13
-rwxr-xr-xltdl/m4/xstrndup.m415
-rwxr-xr-xltdl/m4/xstrtol.m412
-rwxr-xr-xltdl/m4/xvasprintf.m411
-rw-r--r--ltdl/slist.c375
-rwxr-xr-xmaint.mk940
-rw-r--r--po/.reference/cs.po670
-rw-r--r--po/.reference/cs.s11
-rw-r--r--po/.reference/da.po653
-rw-r--r--po/.reference/da.s11
-rw-r--r--po/.reference/de.po654
-rw-r--r--po/.reference/de.s11
-rw-r--r--po/.reference/el.po470
-rw-r--r--po/.reference/el.s11
-rw-r--r--po/.reference/fi.po664
-rw-r--r--po/.reference/fi.s11
-rw-r--r--po/.reference/fr.po673
-rw-r--r--po/.reference/fr.s11
-rw-r--r--po/.reference/ga.po658
-rw-r--r--po/.reference/ga.s11
-rw-r--r--po/.reference/gl.po661
-rw-r--r--po/.reference/gl.s11
-rw-r--r--po/.reference/id.po659
-rw-r--r--po/.reference/id.s11
-rw-r--r--po/.reference/ja.po1286
-rw-r--r--po/.reference/ja.s11
-rw-r--r--po/.reference/nl.po667
-rw-r--r--po/.reference/nl.s11
-rw-r--r--po/.reference/pl.po663
-rw-r--r--po/.reference/pl.s11
-rw-r--r--po/.reference/pt_BR.po663
-rw-r--r--po/.reference/pt_BR.s11
-rw-r--r--po/.reference/ro.po660
-rw-r--r--po/.reference/ro.s11
-rw-r--r--po/.reference/ru.po650
-rw-r--r--po/.reference/ru.s11
-rw-r--r--po/.reference/sv.po661
-rw-r--r--po/.reference/sv.s11
-rw-r--r--po/.reference/vi.po663
-rw-r--r--po/.reference/vi.s11
-rw-r--r--po/.reference/zh_CN.po658
-rw-r--r--po/.reference/zh_CN.s11
-rw-r--r--po/.reference/zh_TW.po657
-rw-r--r--po/.reference/zh_TW.s11
-rw-r--r--po/LINGUAS19
-rw-r--r--po/Makefile.in.in403
-rw-r--r--po/Makevars.template41
-rw-r--r--po/Rules-quot47
-rw-r--r--po/boldquot.sed10
-rw-r--r--po/cs.po670
-rw-r--r--po/da.po653
-rw-r--r--po/de.po654
-rw-r--r--po/el.po470
-rw-r--r--po/en@boldquot.header25
-rw-r--r--po/en@quot.header22
-rw-r--r--po/fi.po664
-rw-r--r--po/fr.po673
-rw-r--r--po/ga.po658
-rw-r--r--po/gl.po661
-rw-r--r--po/id.po659
-rw-r--r--po/insert-header.sin23
-rw-r--r--po/ja.po1286
-rw-r--r--po/nl.po667
-rw-r--r--po/pl.po663
-rw-r--r--po/pt_BR.po663
-rw-r--r--po/quot.sed6
-rw-r--r--po/remove-potcdate.sin19
-rw-r--r--po/ro.po660
-rw-r--r--po/ru.po650
-rw-r--r--po/sv.po661
-rw-r--r--po/vi.po663
-rw-r--r--po/zh_CN.po658
-rw-r--r--po/zh_TW.po657
-rwxr-xr-xsrc/getopt.c1189
-rwxr-xr-xsrc/getopt.in.h249
-rwxr-xr-xsrc/getopt1.c170
-rwxr-xr-xsrc/getopt_int.h132
-rwxr-xr-xsrc/version-etc-fsf.c30
-rwxr-xr-xsrc/version-etc.c258
-rwxr-xr-xsrc/version-etc.h78
-rwxr-xr-xsrc/xstrtol-error.c98
-rwxr-xr-xsrc/xstrtol.c228
-rwxr-xr-xsrc/xstrtol.h83
-rwxr-xr-xsrc/xstrtoul.c6
-rwxr-xr-xtests/gnu/Makefile.am1159
-rw-r--r--tests/gnu/Makefile.in3470
-rwxr-xr-xtests/gnu/getpagesize.c39
-rwxr-xr-xtests/gnu/gl_array_list.c680
-rwxr-xr-xtests/gnu/gl_array_list.h34
-rwxr-xr-xtests/gnu/gl_array_oset.c357
-rwxr-xr-xtests/gnu/gl_array_oset.h34
-rwxr-xr-xtests/gnu/ignore-value.h37
-rwxr-xr-xtests/gnu/init.sh345
-rwxr-xr-xtests/gnu/link.c203
-rwxr-xr-xtests/gnu/locale/fr/LC_MESSAGES/test-quotearg.mobin0 -> 90 bytes
-rwxr-xr-xtests/gnu/locale/fr/LC_MESSAGES/test-quotearg.po20
-rwxr-xr-xtests/gnu/macros.h64
-rwxr-xr-xtests/gnu/nan.h60
-rwxr-xr-xtests/gnu/obstack_printf.c92
-rwxr-xr-xtests/gnu/putenv.c132
-rwxr-xr-xtests/gnu/signature.h48
-rwxr-xr-xtests/gnu/strdup.c55
-rwxr-xr-xtests/gnu/symlink.c57
-rwxr-xr-xtests/gnu/test-alloca-opt.c62
-rwxr-xr-xtests/gnu/test-array_list.c329
-rwxr-xr-xtests/gnu/test-array_oset.c144
-rwxr-xr-xtests/gnu/test-avltree_oset.c136
-rwxr-xr-xtests/gnu/test-binary-io.c64
-rwxr-xr-xtests/gnu/test-binary-io.sh11
-rwxr-xr-xtests/gnu/test-bitrotate.c279
-rwxr-xr-xtests/gnu/test-btowc.c63
-rwxr-xr-xtests/gnu/test-btowc1.sh15
-rwxr-xr-xtests/gnu/test-btowc2.sh15
-rwxr-xr-xtests/gnu/test-c-ctype.c386
-rwxr-xr-xtests/gnu/test-c-strcase.sh21
-rwxr-xr-xtests/gnu/test-c-strcasecmp.c65
-rwxr-xr-xtests/gnu/test-c-strncasecmp.c79
-rwxr-xr-xtests/gnu/test-canonicalize-lgpl.c222
-rwxr-xr-xtests/gnu/test-cloexec.c141
-rwxr-xr-xtests/gnu/test-closein.c53
-rwxr-xr-xtests/gnu/test-closein.sh38
-rwxr-xr-xtests/gnu/test-dirname.c191
-rwxr-xr-xtests/gnu/test-dup-safer.c175
-rwxr-xr-xtests/gnu/test-dup2.c193
-rwxr-xr-xtests/gnu/test-environ.c44
-rwxr-xr-xtests/gnu/test-errno.c117
-rwxr-xr-xtests/gnu/test-fcntl-h.c38
-rwxr-xr-xtests/gnu/test-fcntl.c346
-rwxr-xr-xtests/gnu/test-fflush.c145
-rwxr-xr-xtests/gnu/test-fflush2.c108
-rwxr-xr-xtests/gnu/test-fflush2.sh9
-rwxr-xr-xtests/gnu/test-filenamecat.c66
-rwxr-xr-xtests/gnu/test-fopen-safer.c31
-rwxr-xr-xtests/gnu/test-fopen.c34
-rwxr-xr-xtests/gnu/test-fopen.h73
-rwxr-xr-xtests/gnu/test-fpending.c41
-rwxr-xr-xtests/gnu/test-fpending.sh12
-rwxr-xr-xtests/gnu/test-fprintf-posix.h151
-rwxr-xr-xtests/gnu/test-fpurge.c132
-rwxr-xr-xtests/gnu/test-freadahead.c73
-rwxr-xr-xtests/gnu/test-freadahead.sh5
-rwxr-xr-xtests/gnu/test-freading.c130
-rwxr-xr-xtests/gnu/test-freadptr.c94
-rwxr-xr-xtests/gnu/test-freadptr.sh5
-rwxr-xr-xtests/gnu/test-freadptr2.c62
-rwxr-xr-xtests/gnu/test-freadptr2.sh5
-rwxr-xr-xtests/gnu/test-freadseek.c93
-rwxr-xr-xtests/gnu/test-freadseek.sh5
-rwxr-xr-xtests/gnu/test-frexp.c199
-rwxr-xr-xtests/gnu/test-frexpl.c223
-rwxr-xr-xtests/gnu/test-fseeko.c74
-rwxr-xr-xtests/gnu/test-fseeko.sh5
-rwxr-xr-xtests/gnu/test-fseeko2.sh3
-rwxr-xr-xtests/gnu/test-fseterr.c44
-rwxr-xr-xtests/gnu/test-ftello.c118
-rwxr-xr-xtests/gnu/test-ftello.sh5
-rwxr-xr-xtests/gnu/test-ftello2.sh3
-rwxr-xr-xtests/gnu/test-getdtablesize.c34
-rwxr-xr-xtests/gnu/test-gettimeofday.c47
-rwxr-xr-xtests/gnu/test-iconv.c148
-rwxr-xr-xtests/gnu/test-inttypes.c121
-rwxr-xr-xtests/gnu/test-isnand-nolibm.c22
-rwxr-xr-xtests/gnu/test-isnand.h65
-rwxr-xr-xtests/gnu/test-isnanf-nolibm.c21
-rwxr-xr-xtests/gnu/test-isnanf.h67
-rwxr-xr-xtests/gnu/test-isnanl-nolibm.c23
-rwxr-xr-xtests/gnu/test-isnanl.h141
-rwxr-xr-xtests/gnu/test-langinfo.c92
-rwxr-xr-xtests/gnu/test-link.c47
-rwxr-xr-xtests/gnu/test-link.h176
-rwxr-xr-xtests/gnu/test-linkedhash_list.c441
-rwxr-xr-xtests/gnu/test-lseek.c96
-rwxr-xr-xtests/gnu/test-lseek.sh17
-rwxr-xr-xtests/gnu/test-lstat.c60
-rwxr-xr-xtests/gnu/test-lstat.h116
-rwxr-xr-xtests/gnu/test-malloca.c59
-rwxr-xr-xtests/gnu/test-math.c53
-rwxr-xr-xtests/gnu/test-mbrtowc.c323
-rwxr-xr-xtests/gnu/test-mbrtowc1.sh15
-rwxr-xr-xtests/gnu/test-mbrtowc2.sh15
-rwxr-xr-xtests/gnu/test-mbrtowc3.sh15
-rwxr-xr-xtests/gnu/test-mbrtowc4.sh15
-rwxr-xr-xtests/gnu/test-mbsinit.c53
-rwxr-xr-xtests/gnu/test-mbsinit.sh15
-rwxr-xr-xtests/gnu/test-mbsstr1.c128
-rwxr-xr-xtests/gnu/test-mbsstr2.c141
-rwxr-xr-xtests/gnu/test-mbsstr2.sh15
-rwxr-xr-xtests/gnu/test-mbsstr3.c81
-rwxr-xr-xtests/gnu/test-mbsstr3.sh15
-rwxr-xr-xtests/gnu/test-memchr.c119
-rwxr-xr-xtests/gnu/test-memchr2.c100
-rwxr-xr-xtests/gnu/test-memmem.c187
-rwxr-xr-xtests/gnu/test-nl_langinfo.c115
-rwxr-xr-xtests/gnu/test-nl_langinfo.sh17
-rwxr-xr-xtests/gnu/test-obstack-printf.c138
-rwxr-xr-xtests/gnu/test-open.c41
-rwxr-xr-xtests/gnu/test-open.h87
-rwxr-xr-xtests/gnu/test-pipe.c204
-rwxr-xr-xtests/gnu/test-pipe.sh8
-rwxr-xr-xtests/gnu/test-pipe2.c145
-rwxr-xr-xtests/gnu/test-posix_spawn1.c166
-rwxr-xr-xtests/gnu/test-posix_spawn1.in.sh2
-rwxr-xr-xtests/gnu/test-posix_spawn2.c139
-rwxr-xr-xtests/gnu/test-posix_spawn2.in.sh3
-rwxr-xr-xtests/gnu/test-printf-frexp.c119
-rwxr-xr-xtests/gnu/test-printf-frexpl.c134
-rwxr-xr-xtests/gnu/test-printf-posix.h153
-rwxr-xr-xtests/gnu/test-printf-posix.output40
-rwxr-xr-xtests/gnu/test-quotearg.c471
-rwxr-xr-xtests/gnu/test-quotearg.sh16
-rwxr-xr-xtests/gnu/test-rawmemchr.c76
-rwxr-xr-xtests/gnu/test-readlink.c48
-rwxr-xr-xtests/gnu/test-readlink.h119
-rwxr-xr-xtests/gnu/test-rename.c46
-rwxr-xr-xtests/gnu/test-rename.h446
-rwxr-xr-xtests/gnu/test-rmdir.c47
-rwxr-xr-xtests/gnu/test-rmdir.h101
-rwxr-xr-xtests/gnu/test-sched.c38
-rwxr-xr-xtests/gnu/test-setenv.c56
-rwxr-xr-xtests/gnu/test-sigaction.c116
-rwxr-xr-xtests/gnu/test-signal.c125
-rwxr-xr-xtests/gnu/test-signbit.c197
-rwxr-xr-xtests/gnu/test-snprintf-posix.c38
-rwxr-xr-xtests/gnu/test-snprintf-posix.h3113
-rwxr-xr-xtests/gnu/test-snprintf.c64
-rwxr-xr-xtests/gnu/test-spawn.c54
-rwxr-xr-xtests/gnu/test-sprintf-posix.c41
-rwxr-xr-xtests/gnu/test-sprintf-posix.h3099
-rwxr-xr-xtests/gnu/test-stat.c56
-rwxr-xr-xtests/gnu/test-stat.h100
-rwxr-xr-xtests/gnu/test-stdbool.c95
-rwxr-xr-xtests/gnu/test-stddef.c38
-rwxr-xr-xtests/gnu/test-stdint.c360
-rwxr-xr-xtests/gnu/test-stdio.c43
-rwxr-xr-xtests/gnu/test-stdlib.c43
-rwxr-xr-xtests/gnu/test-strchrnul.c86
-rwxr-xr-xtests/gnu/test-strerror.c57
-rwxr-xr-xtests/gnu/test-striconv.c180
-rwxr-xr-xtests/gnu/test-string.c33
-rwxr-xr-xtests/gnu/test-strtod.c918
-rwxr-xr-xtests/gnu/test-symlink.c47
-rwxr-xr-xtests/gnu/test-symlink.h95
-rwxr-xr-xtests/gnu/test-sys_stat.c288
-rwxr-xr-xtests/gnu/test-sys_time.c29
-rwxr-xr-xtests/gnu/test-sys_wait.c30
-rwxr-xr-xtests/gnu/test-time.c35
-rwxr-xr-xtests/gnu/test-unistd.c56
-rwxr-xr-xtests/gnu/test-unsetenv.c61
-rwxr-xr-xtests/gnu/test-update-copyright.sh526
-rwxr-xr-xtests/gnu/test-vasnprintf-posix.c3671
-rwxr-xr-xtests/gnu/test-vasnprintf-posix2.c63
-rwxr-xr-xtests/gnu/test-vasnprintf-posix2.sh22
-rwxr-xr-xtests/gnu/test-vasnprintf.c117
-rwxr-xr-xtests/gnu/test-vasprintf-posix.c3652
-rwxr-xr-xtests/gnu/test-vasprintf.c83
-rwxr-xr-xtests/gnu/test-vc-list-files-cvs.sh62
-rwxr-xr-xtests/gnu/test-vc-list-files-git.sh48
-rwxr-xr-xtests/gnu/test-vfprintf-posix.c52
-rwxr-xr-xtests/gnu/test-vfprintf-posix.sh16
-rwxr-xr-xtests/gnu/test-vprintf-posix.c52
-rwxr-xr-xtests/gnu/test-vprintf-posix.sh16
-rwxr-xr-xtests/gnu/test-wchar.c37
-rwxr-xr-xtests/gnu/test-wcrtomb.c154
-rwxr-xr-xtests/gnu/test-wcrtomb.sh35
-rwxr-xr-xtests/gnu/test-wctype.c74
-rwxr-xr-xtests/gnu/test-wcwidth.c81
-rwxr-xr-xtests/gnu/test-xalloc-die.c30
-rwxr-xr-xtests/gnu/test-xalloc-die.sh36
-rwxr-xr-xtests/gnu/test-xfprintf-posix.c40
-rwxr-xr-xtests/gnu/test-xmemdup0.c82
-rwxr-xr-xtests/gnu/test-xprintf-posix.c39
-rwxr-xr-xtests/gnu/test-xprintf-posix.sh24
-rwxr-xr-xtests/gnu/test-xvasprintf.c129
-rwxr-xr-xtests/gnu/uniwidth/test-uc_width.c56
-rwxr-xr-xtests/gnu/uniwidth/test-uc_width2.c86
-rwxr-xr-xtests/gnu/uniwidth/test-uc_width2.sh382
-rwxr-xr-xtests/gnu/wctob.c37
-rwxr-xr-xtests/gnu/zerosize-ptr.h68
852 files changed, 356086 insertions, 0 deletions
diff --git a/ABOUT-NLS b/ABOUT-NLS
new file mode 100644
index 00000000..ec20977e
--- /dev/null
+++ b/ABOUT-NLS
@@ -0,0 +1,1101 @@
+1 Notes on the Free Translation Project
+***************************************
+
+Free software is going international! The Free Translation Project is
+a way to get maintainers of free software, translators, and users all
+together, so that free software will gradually become able to speak many
+languages. A few packages already provide translations for their
+messages.
+
+ If you found this `ABOUT-NLS' file inside a distribution, you may
+assume that the distributed package does use GNU `gettext' internally,
+itself available at your nearest GNU archive site. But you do _not_
+need to install GNU `gettext' prior to configuring, installing or using
+this package with messages translated.
+
+ Installers will find here some useful hints. These notes also
+explain how users should proceed for getting the programs to use the
+available translations. They tell how people wanting to contribute and
+work on translations can contact the appropriate team.
+
+ When reporting bugs in the `intl/' directory or bugs which may be
+related to internationalization, you should tell about the version of
+`gettext' which is used. The information can be found in the
+`intl/VERSION' file, in internationalized packages.
+
+1.1 Quick configuration advice
+==============================
+
+If you want to exploit the full power of internationalization, you
+should configure it using
+
+ ./configure --with-included-gettext
+
+to force usage of internationalizing routines provided within this
+package, despite the existence of internationalizing capabilities in the
+operating system where this package is being installed. So far, only
+the `gettext' implementation in the GNU C library version 2 provides as
+many features (such as locale alias, message inheritance, automatic
+charset conversion or plural form handling) as the implementation here.
+It is also not possible to offer this additional functionality on top
+of a `catgets' implementation. Future versions of GNU `gettext' will
+very likely convey even more functionality. So it might be a good idea
+to change to GNU `gettext' as soon as possible.
+
+ So you need _not_ provide this option if you are using GNU libc 2 or
+you have installed a recent copy of the GNU gettext package with the
+included `libintl'.
+
+1.2 INSTALL Matters
+===================
+
+Some packages are "localizable" when properly installed; the programs
+they contain can be made to speak your own native language. Most such
+packages use GNU `gettext'. Other packages have their own ways to
+internationalization, predating GNU `gettext'.
+
+ By default, this package will be installed to allow translation of
+messages. It will automatically detect whether the system already
+provides the GNU `gettext' functions. If not, the included GNU
+`gettext' library will be used. This library is wholly contained
+within this package, usually in the `intl/' subdirectory, so prior
+installation of the GNU `gettext' package is _not_ required.
+Installers may use special options at configuration time for changing
+the default behaviour. The commands:
+
+ ./configure --with-included-gettext
+ ./configure --disable-nls
+
+will, respectively, bypass any pre-existing `gettext' to use the
+internationalizing routines provided within this package, or else,
+_totally_ disable translation of messages.
+
+ When you already have GNU `gettext' installed on your system and run
+configure without an option for your new package, `configure' will
+probably detect the previously built and installed `libintl.a' file and
+will decide to use this. This might not be desirable. You should use
+the more recent version of the GNU `gettext' library. I.e. if the file
+`intl/VERSION' shows that the library which comes with this package is
+more recent, you should use
+
+ ./configure --with-included-gettext
+
+to prevent auto-detection.
+
+ The configuration process will not test for the `catgets' function
+and therefore it will not be used. The reason is that even an
+emulation of `gettext' on top of `catgets' could not provide all the
+extensions of the GNU `gettext' library.
+
+ Internationalized packages usually have many `po/LL.po' files, where
+LL gives an ISO 639 two-letter code identifying the language. Unless
+translations have been forbidden at `configure' time by using the
+`--disable-nls' switch, all available translations are installed
+together with the package. However, the environment variable `LINGUAS'
+may be set, prior to configuration, to limit the installed set.
+`LINGUAS' should then contain a space separated list of two-letter
+codes, stating which languages are allowed.
+
+1.3 Using This Package
+======================
+
+As a user, if your language has been installed for this package, you
+only have to set the `LANG' environment variable to the appropriate
+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
+and `CC' is an ISO 3166 two-letter country code. For example, let's
+suppose that you speak German and live in Germany. At the shell
+prompt, merely execute `setenv LANG de_DE' (in `csh'),
+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
+This can be done from your `.login' or `.profile' file, once and for
+all.
+
+ You might think that the country code specification is redundant.
+But in fact, some languages have dialects in different countries. For
+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
+country code serves to distinguish the dialects.
+
+ The locale naming convention of `LL_CC', with `LL' denoting the
+language and `CC' denoting the country, is the one use on systems based
+on GNU libc. On other systems, some variations of this scheme are
+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
+locales supported by your system for your language by running the
+command `locale -a | grep '^LL''.
+
+ Not all programs have translations for all languages. By default, an
+English message is shown in place of a nonexistent translation. If you
+understand other languages, you can set up a priority list of languages.
+This is done through a different environment variable, called
+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
+for the purpose of message handling, but you still need to have `LANG'
+set to the primary language; this is required by other parts of the
+system libraries. For example, some Swedish users who would rather
+read translations in German than English for when Swedish is not
+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
+
+ Special advice for Norwegian users: The language code for Norwegian
+bokma*l changed from `no' to `nb' recently (in 2003). During the
+transition period, while some message catalogs for this language are
+installed under `nb' and some older ones under `no', it's recommended
+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
+older translations are used.
+
+ In the `LANGUAGE' environment variable, but not in the `LANG'
+environment variable, `LL_CC' combinations can be abbreviated as `LL'
+to denote the language's main dialect. For example, `de' is equivalent
+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
+(Portuguese as spoken in Portugal) in this context.
+
+1.4 Translating Teams
+=====================
+
+For the Free Translation Project to be a success, we need interested
+people who like their own language and write it well, and who are also
+able to synergize with other translators speaking the same language.
+Each translation team has its own mailing list. The up-to-date list of
+teams can be found at the Free Translation Project's homepage,
+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
+area.
+
+ If you'd like to volunteer to _work_ at translating messages, you
+should become a member of the translating team for your own language.
+The subscribing address is _not_ the same as the list itself, it has
+`-request' appended. For example, speakers of Swedish can send a
+message to `sv-request@li.org', having this message body:
+
+ subscribe
+
+ Keep in mind that team members are expected to participate
+_actively_ in translations, or at solving translational difficulties,
+rather than merely lurking around. If your team does not exist yet and
+you want to start one, or if you are unsure about what to do or how to
+get started, please write to `translation@iro.umontreal.ca' to reach the
+coordinator for all translator teams.
+
+ The English team is special. It works at improving and uniformizing
+the terminology in use. Proven linguistic skills are praised more than
+programming skills, here.
+
+1.5 Available Packages
+======================
+
+Languages are not equally supported in all packages. The following
+matrix shows the current state of internationalization, as of October
+2006. The matrix shows, in regard of each package, for which languages
+PO files have been submitted to translation coordination, with a
+translation percentage of at least 50%.
+
+ Ready PO files af am ar az be bg bs ca cs cy da de el en en_GB eo
+ +----------------------------------------------------+
+ GNUnet | [] |
+ a2ps | [] [] [] [] [] |
+ aegis | () |
+ ant-phone | () |
+ anubis | [] |
+ ap-utils | |
+ aspell | [] [] [] [] [] |
+ bash | [] [] [] |
+ batchelor | [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | [] |
+ bison | [] [] |
+ bison-runtime | |
+ bluez-pin | [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] [] |
+ console-tools | [] [] |
+ coreutils | [] [] [] |
+ cpio | |
+ cpplib | [] [] [] |
+ cryptonit | [] |
+ darkstat | [] () [] |
+ dialog | [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] |
+ error | [] [] [] [] |
+ fetchmail | [] [] () [] |
+ fileutils | [] [] |
+ findutils | [] [] [] |
+ flex | [] [] [] |
+ fslint | [] |
+ gas | |
+ gawk | [] [] [] |
+ gbiff | [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] |
+ gettext-tools | [] [] |
+ gimp-print | [] [] [] [] |
+ gip | [] |
+ gliv | [] |
+ glunarclock | [] |
+ gmult | [] [] |
+ gnubiff | () |
+ gnucash | () () [] |
+ gnucash-glossary | [] () |
+ gnuedu | |
+ gnulib | [] [] [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | |
+ gpe-clock | [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | |
+ gpe-edit | [] |
+ gpe-filemanager | |
+ gpe-go | [] |
+ gpe-login | [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] |
+ gpe-taskmanager | [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] [] |
+ gpe-todo | |
+ gphoto2 | [] [] [] [] |
+ gprof | [] [] |
+ gpsdrive | () () |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] |
+ gretl | |
+ gsasl | |
+ gss | |
+ gst-plugins | [] [] [] [] |
+ gst-plugins-base | [] [] [] |
+ gst-plugins-good | [] [] [] [] [] [] [] |
+ gstreamer | [] [] [] [] [] [] [] |
+ gtick | () |
+ gtkam | [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] |
+ id-utils | [] [] |
+ impost | |
+ indent | [] [] [] |
+ iso_3166 | [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] |
+ iso_639 | [] [] |
+ jpilot | [] |
+ jtag | |
+ jwhois | |
+ kbd | [] [] [] [] |
+ keytouch | |
+ keytouch-editor | |
+ keytouch-keyboa... | |
+ latrine | () |
+ ld | [] |
+ leafpad | [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] |
+ libgpg-error | [] |
+ libgphoto2 | [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | |
+ libiconv | [] [] |
+ libidn | [] [] |
+ lifelines | [] () |
+ lilypond | [] |
+ lingoteach | |
+ lynx | [] [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | [] |
+ make | [] [] |
+ man-db | [] () [] [] |
+ minicom | [] [] [] |
+ mysecretdiary | [] [] |
+ nano | [] [] [] |
+ nano_1_0 | [] () [] [] |
+ opcodes | [] |
+ parted | |
+ pilot-qof | [] |
+ psmisc | [] |
+ pwdutils | |
+ python | |
+ qof | |
+ radius | [] |
+ recode | [] [] [] [] [] [] |
+ rpm | [] [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] [] |
+ sed | [] [] [] |
+ sh-utils | [] [] |
+ shared-mime-info | [] [] [] [] |
+ sharutils | [] [] [] [] [] [] |
+ shishi | |
+ silky | |
+ skencil | [] () |
+ sketch | [] () |
+ solfege | |
+ soundtracker | [] [] |
+ sp | [] |
+ stardict | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] |
+ tin | () () |
+ tp-robot | [] |
+ tuxpaint | [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ vorbis-tools | [] [] [] [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] |
+ wget | [] [] |
+ xchat | [] [] [] [] [] [] |
+ xkeyboard-config | |
+ xpad | [] [] |
+ +----------------------------------------------------+
+ af am ar az be bg bs ca cs cy da de el en en_GB eo
+ 10 0 1 2 9 22 1 42 41 2 60 95 16 1 17 16
+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ +--------------------------------------------------+
+ GNUnet | |
+ a2ps | [] [] [] () |
+ aegis | |
+ ant-phone | [] |
+ anubis | [] |
+ ap-utils | [] [] |
+ aspell | [] [] [] |
+ bash | [] [] [] |
+ batchelor | [] [] |
+ bfd | [] |
+ bibshelf | [] [] [] |
+ binutils | [] [] [] |
+ bison | [] [] [] [] [] [] |
+ bison-runtime | [] [] [] [] [] |
+ bluez-pin | [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] [] |
+ console-tools | |
+ coreutils | [] [] [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] [] |
+ cryptonit | [] |
+ darkstat | [] () [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] [] |
+ enscript | [] [] [] |
+ error | [] [] [] [] [] |
+ fetchmail | [] |
+ fileutils | [] [] [] [] [] [] |
+ findutils | [] [] [] [] |
+ flex | [] [] [] |
+ fslint | [] |
+ gas | [] [] |
+ gawk | [] [] [] [] |
+ gbiff | [] |
+ gcal | [] [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] |
+ gettext-tools | [] [] [] |
+ gimp-print | [] [] |
+ gip | [] [] [] |
+ gliv | () |
+ glunarclock | [] [] [] |
+ gmult | [] [] [] |
+ gnubiff | () () |
+ gnucash | () () () |
+ gnucash-glossary | [] [] |
+ gnuedu | [] |
+ gnulib | [] [] [] [] [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] [] |
+ gpe-beam | [] [] |
+ gpe-calendar | |
+ gpe-clock | [] [] [] [] |
+ gpe-conf | [] |
+ gpe-contacts | [] [] |
+ gpe-edit | [] [] [] [] |
+ gpe-filemanager | [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] |
+ gpe-package | [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] [] |
+ gpe-taskmanager | [] [] [] |
+ gpe-timesheet | [] [] [] [] |
+ gpe-today | [] [] [] [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] [] |
+ gpsdrive | () () [] () |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] [] [] [] [] [] [] |
+ gretl | [] [] [] |
+ gsasl | [] [] |
+ gss | [] |
+ gst-plugins | [] [] [] |
+ gst-plugins-base | [] [] |
+ gst-plugins-good | [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] [] |
+ gtkspell | [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] [] [] |
+ impost | [] [] |
+ indent | [] [] [] [] [] [] [] [] [] [] |
+ iso_3166 | [] [] [] |
+ iso_3166_2 | [] |
+ iso_4217 | [] [] [] [] |
+ iso_639 | [] [] [] [] [] |
+ jpilot | [] [] |
+ jtag | [] |
+ jwhois | [] [] [] [] [] |
+ kbd | [] [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | [] [] [] |
+ ld | [] [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] |
+ libgpewidget | [] [] [] [] [] |
+ libgpg-error | |
+ libgphoto2 | [] [] [] |
+ libgphoto2_port | [] [] |
+ libgsasl | [] [] |
+ libiconv | [] [] |
+ libidn | [] [] |
+ lifelines | () |
+ lilypond | [] |
+ lingoteach | [] [] [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] |
+ mailutils | [] [] |
+ make | [] [] [] [] [] [] [] [] |
+ man-db | () |
+ minicom | [] [] [] [] |
+ mysecretdiary | [] [] [] |
+ nano | [] [] [] [] [] [] |
+ nano_1_0 | [] [] [] [] [] |
+ opcodes | [] [] [] [] |
+ parted | [] [] [] [] |
+ pilot-qof | |
+ psmisc | [] [] [] |
+ pwdutils | |
+ python | |
+ qof | [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] [] |
+ rpm | [] [] |
+ screem | |
+ scrollkeeper | [] [] [] |
+ sed | [] [] [] [] [] |
+ sh-utils | [] [] [] [] [] [] [] |
+ shared-mime-info | [] [] [] [] [] [] |
+ sharutils | [] [] [] [] [] [] [] [] |
+ shishi | |
+ silky | [] |
+ skencil | [] [] |
+ sketch | [] [] |
+ solfege | [] |
+ soundtracker | [] [] [] |
+ sp | [] |
+ stardict | [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] [] [] [] |
+ texinfo | [] [] |
+ textutils | [] [] [] [] [] |
+ tin | [] () |
+ tp-robot | [] [] [] [] |
+ tuxpaint | [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | [] [] |
+ util-linux | [] [] [] [] [] [] [] |
+ vorbis-tools | [] [] |
+ wastesedge | () |
+ wdiff | [] [] [] [] [] [] [] [] |
+ wget | [] [] [] [] [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] [] [] |
+ xpad | [] [] [] |
+ +--------------------------------------------------+
+ es et eu fa fi fr ga gl gu he hi hr hu id is it
+ 88 22 14 2 40 115 61 14 1 8 1 6 59 31 0 52
+
+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+ +-------------------------------------------------+
+ GNUnet | |
+ a2ps | () [] [] () |
+ aegis | () |
+ ant-phone | [] |
+ anubis | [] [] [] |
+ ap-utils | [] |
+ aspell | [] [] |
+ bash | [] |
+ batchelor | [] [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | |
+ bison | [] [] [] |
+ bison-runtime | [] [] [] |
+ bluez-pin | [] [] [] |
+ cflow | |
+ clisp | [] |
+ console-tools | |
+ coreutils | [] |
+ cpio | |
+ cpplib | [] |
+ cryptonit | [] |
+ darkstat | [] [] |
+ dialog | [] [] |
+ diffutils | [] [] [] |
+ doodle | |
+ e2fsprogs | [] |
+ enscript | [] |
+ error | [] |
+ fetchmail | [] [] |
+ fileutils | [] [] |
+ findutils | [] |
+ flex | [] [] |
+ fslint | [] [] |
+ gas | |
+ gawk | [] [] |
+ gbiff | [] |
+ gcal | |
+ gcc | |
+ gettext-examples | [] [] |
+ gettext-runtime | [] [] [] |
+ gettext-tools | [] [] |
+ gimp-print | [] [] |
+ gip | [] [] |
+ gliv | [] |
+ glunarclock | [] [] |
+ gmult | [] [] |
+ gnubiff | |
+ gnucash | () () |
+ gnucash-glossary | [] |
+ gnuedu | |
+ gnulib | [] [] [] [] |
+ gnunet-gtk | |
+ gnutls | |
+ gpe-aerial | [] |
+ gpe-beam | [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] [] |
+ gpe-conf | [] [] |
+ gpe-contacts | [] |
+ gpe-edit | [] [] [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] |
+ gpe-login | [] [] [] |
+ gpe-ownerinfo | [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] |
+ gpe-su | [] [] [] |
+ gpe-taskmanager | [] [] [] [] |
+ gpe-timesheet | [] |
+ gpe-today | [] [] |
+ gpe-todo | [] |
+ gphoto2 | [] [] |
+ gprof | |
+ gpsdrive | () () () |
+ gramadoir | () |
+ grep | [] [] [] [] |
+ gretl | |
+ gsasl | [] |
+ gss | |
+ gst-plugins | [] |
+ gst-plugins-base | |
+ gst-plugins-good | [] |
+ gstreamer | [] |
+ gtick | |
+ gtkam | [] |
+ gtkorphan | [] |
+ gtkspell | [] [] |
+ gutenprint | |
+ hello | [] [] [] [] [] [] |
+ id-utils | [] |
+ impost | |
+ indent | [] [] |
+ iso_3166 | [] |
+ iso_3166_2 | [] |
+ iso_4217 | [] [] [] |
+ iso_639 | [] [] |
+ jpilot | () () () |
+ jtag | |
+ jwhois | [] |
+ kbd | [] |
+ keytouch | [] |
+ keytouch-editor | |
+ keytouch-keyboa... | |
+ latrine | [] |
+ ld | |
+ leafpad | [] [] |
+ libc | [] [] [] [] [] |
+ libexif | |
+ libextractor | |
+ libgpewidget | [] |
+ libgpg-error | |
+ libgphoto2 | [] |
+ libgphoto2_port | [] |
+ libgsasl | [] |
+ libiconv | |
+ libidn | [] [] |
+ lifelines | [] |
+ lilypond | |
+ lingoteach | [] |
+ lynx | [] [] |
+ m4 | [] [] |
+ mailutils | |
+ make | [] [] [] |
+ man-db | () |
+ minicom | [] |
+ mysecretdiary | [] |
+ nano | [] [] [] |
+ nano_1_0 | [] [] [] |
+ opcodes | [] |
+ parted | [] [] |
+ pilot-qof | |
+ psmisc | [] [] [] |
+ pwdutils | |
+ python | |
+ qof | |
+ radius | |
+ recode | [] |
+ rpm | [] [] |
+ screem | [] |
+ scrollkeeper | [] [] [] [] |
+ sed | [] [] |
+ sh-utils | [] [] |
+ shared-mime-info | [] [] [] [] [] |
+ sharutils | [] [] |
+ shishi | |
+ silky | [] |
+ skencil | |
+ sketch | |
+ solfege | |
+ soundtracker | |
+ sp | () |
+ stardict | [] [] |
+ system-tools-ba... | [] [] [] [] |
+ tar | [] [] [] |
+ texinfo | [] [] [] |
+ textutils | [] [] [] |
+ tin | |
+ tp-robot | [] |
+ tuxpaint | [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] |
+ vorbis-tools | [] |
+ wastesedge | [] |
+ wdiff | [] [] |
+ wget | [] [] |
+ xchat | [] [] [] [] |
+ xkeyboard-config | [] |
+ xpad | [] [] [] |
+ +-------------------------------------------------+
+ ja ko ku ky lg lt lv mk mn ms mt nb ne nl nn no
+ 52 24 2 2 1 3 0 2 3 21 0 15 1 97 5 1
+
+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ +------------------------------------------------------+
+ GNUnet | |
+ a2ps | () [] [] [] [] [] [] |
+ aegis | () () |
+ ant-phone | [] [] |
+ anubis | [] [] [] |
+ ap-utils | () |
+ aspell | [] [] |
+ bash | [] [] [] |
+ batchelor | [] [] |
+ bfd | |
+ bibshelf | [] |
+ binutils | [] [] |
+ bison | [] [] [] [] [] |
+ bison-runtime | [] [] [] [] |
+ bluez-pin | [] [] [] [] [] [] [] [] [] |
+ cflow | [] |
+ clisp | [] |
+ console-tools | [] |
+ coreutils | [] [] [] [] |
+ cpio | [] [] [] |
+ cpplib | [] |
+ cryptonit | [] [] |
+ darkstat | [] [] [] [] [] [] |
+ dialog | [] [] [] [] [] [] [] [] [] |
+ diffutils | [] [] [] [] [] [] |
+ doodle | [] [] |
+ e2fsprogs | [] [] |
+ enscript | [] [] [] [] [] |
+ error | [] [] [] [] |
+ fetchmail | [] [] [] |
+ fileutils | [] [] [] [] [] |
+ findutils | [] [] [] [] [] [] |
+ flex | [] [] [] [] [] |
+ fslint | [] [] [] [] |
+ gas | |
+ gawk | [] [] [] [] |
+ gbiff | [] |
+ gcal | [] |
+ gcc | [] |
+ gettext-examples | [] [] [] [] [] [] [] [] |
+ gettext-runtime | [] [] [] [] [] [] [] [] |
+ gettext-tools | [] [] [] [] [] [] [] |
+ gimp-print | [] [] |
+ gip | [] [] [] [] |
+ gliv | [] [] [] [] |
+ glunarclock | [] [] [] [] [] [] |
+ gmult | [] [] [] [] |
+ gnubiff | () |
+ gnucash | () [] |
+ gnucash-glossary | [] [] [] |
+ gnuedu | |
+ gnulib | [] [] [] [] [] |
+ gnunet-gtk | [] |
+ gnutls | [] [] |
+ gpe-aerial | [] [] [] [] [] [] [] |
+ gpe-beam | [] [] [] [] [] [] [] |
+ gpe-calendar | [] |
+ gpe-clock | [] [] [] [] [] [] [] [] |
+ gpe-conf | [] [] [] [] [] [] [] |
+ gpe-contacts | [] [] [] [] [] |
+ gpe-edit | [] [] [] [] [] [] [] [] |
+ gpe-filemanager | [] [] |
+ gpe-go | [] [] [] [] [] [] |
+ gpe-login | [] [] [] [] [] [] [] [] |
+ gpe-ownerinfo | [] [] [] [] [] [] [] [] |
+ gpe-package | [] [] |
+ gpe-sketchbook | [] [] [] [] [] [] [] [] |
+ gpe-su | [] [] [] [] [] [] [] [] |
+ gpe-taskmanager | [] [] [] [] [] [] [] [] |
+ gpe-timesheet | [] [] [] [] [] [] [] [] |
+ gpe-today | [] [] [] [] [] [] [] [] |
+ gpe-todo | [] [] [] [] |
+ gphoto2 | [] [] [] [] [] |
+ gprof | [] [] [] |
+ gpsdrive | [] [] [] |
+ gramadoir | [] [] |
+ grep | [] [] [] [] [] [] [] [] |
+ gretl | [] |
+ gsasl | [] [] [] |
+ gss | [] [] [] |
+ gst-plugins | [] [] [] [] |
+ gst-plugins-base | [] |
+ gst-plugins-good | [] [] [] [] |
+ gstreamer | [] [] [] |
+ gtick | [] |
+ gtkam | [] [] [] [] |
+ gtkorphan | [] |
+ gtkspell | [] [] [] [] [] [] [] [] |
+ gutenprint | [] |
+ hello | [] [] [] [] [] [] [] [] |
+ id-utils | [] [] [] [] |
+ impost | [] |
+ indent | [] [] [] [] [] [] |
+ iso_3166 | [] [] [] [] [] [] |
+ iso_3166_2 | |
+ iso_4217 | [] [] [] [] |
+ iso_639 | [] [] [] [] |
+ jpilot | |
+ jtag | [] |
+ jwhois | [] [] [] [] |
+ kbd | [] [] [] |
+ keytouch | [] |
+ keytouch-editor | [] |
+ keytouch-keyboa... | [] |
+ latrine | [] [] |
+ ld | [] |
+ leafpad | [] [] [] [] [] [] |
+ libc | [] [] [] [] [] |
+ libexif | [] |
+ libextractor | [] [] |
+ libgpewidget | [] [] [] [] [] [] [] |
+ libgpg-error | [] [] |
+ libgphoto2 | [] |
+ libgphoto2_port | [] [] [] |
+ libgsasl | [] [] [] [] |
+ libiconv | [] [] |
+ libidn | [] [] () |
+ lifelines | [] [] |
+ lilypond | |
+ lingoteach | [] |
+ lynx | [] [] [] |
+ m4 | [] [] [] [] [] |
+ mailutils | [] [] [] [] |
+ make | [] [] [] [] |
+ man-db | [] [] |
+ minicom | [] [] [] [] [] |
+ mysecretdiary | [] [] [] [] |
+ nano | [] [] [] |
+ nano_1_0 | [] [] [] [] |
+ opcodes | [] [] |
+ parted | [] |
+ pilot-qof | [] |
+ psmisc | [] [] |
+ pwdutils | [] [] |
+ python | |
+ qof | [] [] |
+ radius | [] [] |
+ recode | [] [] [] [] [] [] [] |
+ rpm | [] [] [] [] |
+ screem | |
+ scrollkeeper | [] [] [] [] [] [] [] |
+ sed | [] [] [] [] [] [] [] [] [] |
+ sh-utils | [] [] [] |
+ shared-mime-info | [] [] [] [] [] |
+ sharutils | [] [] [] [] |
+ shishi | [] |
+ silky | [] |
+ skencil | [] [] [] |
+ sketch | [] [] [] |
+ solfege | [] |
+ soundtracker | [] [] |
+ sp | |
+ stardict | [] [] [] |
+ system-tools-ba... | [] [] [] [] [] [] [] [] [] |
+ tar | [] [] [] [] [] |
+ texinfo | [] [] [] [] |
+ textutils | [] [] [] |
+ tin | () |
+ tp-robot | [] |
+ tuxpaint | [] [] [] [] [] |
+ unicode-han-tra... | |
+ unicode-transla... | |
+ util-linux | [] [] [] [] |
+ vorbis-tools | [] [] |
+ wastesedge | |
+ wdiff | [] [] [] [] [] [] |
+ wget | [] [] [] [] |
+ xchat | [] [] [] [] [] [] [] |
+ xkeyboard-config | [] [] |
+ xpad | [] [] [] |
+ +------------------------------------------------------+
+ nso or pa pl pt pt_BR rm ro ru rw sk sl sq sr sv ta
+ 0 2 3 58 30 54 5 73 72 4 40 46 11 50 128 2
+
+ tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ +---------------------------------------------------+
+ GNUnet | [] | 2
+ a2ps | [] [] [] | 19
+ aegis | | 0
+ ant-phone | [] [] | 6
+ anubis | [] [] [] | 11
+ ap-utils | () [] | 4
+ aspell | [] [] [] | 15
+ bash | [] | 11
+ batchelor | [] [] | 9
+ bfd | | 1
+ bibshelf | [] | 7
+ binutils | [] [] [] | 9
+ bison | [] [] [] | 19
+ bison-runtime | [] [] [] | 15
+ bluez-pin | [] [] [] [] [] [] | 28
+ cflow | [] [] | 5
+ clisp | | 6
+ console-tools | [] [] | 5
+ coreutils | [] [] | 16
+ cpio | [] [] [] | 9
+ cpplib | [] [] [] [] | 11
+ cryptonit | | 5
+ darkstat | [] () () | 15
+ dialog | [] [] [] [] [] | 30
+ diffutils | [] [] [] [] | 28
+ doodle | [] | 6
+ e2fsprogs | [] [] | 10
+ enscript | [] [] [] | 16
+ error | [] [] [] [] | 18
+ fetchmail | [] [] | 12
+ fileutils | [] [] [] | 18
+ findutils | [] [] [] | 17
+ flex | [] [] | 15
+ fslint | [] | 9
+ gas | [] | 3
+ gawk | [] [] | 15
+ gbiff | [] | 5
+ gcal | [] | 5
+ gcc | [] [] [] | 6
+ gettext-examples | [] [] [] [] [] [] | 27
+ gettext-runtime | [] [] [] [] [] [] | 28
+ gettext-tools | [] [] [] [] [] | 19
+ gimp-print | [] [] | 12
+ gip | [] [] | 12
+ gliv | [] [] | 8
+ glunarclock | [] [] [] | 15
+ gmult | [] [] [] [] | 15
+ gnubiff | [] | 1
+ gnucash | () | 2
+ gnucash-glossary | [] [] | 9
+ gnuedu | [] | 2
+ gnulib | [] [] [] [] [] | 28
+ gnunet-gtk | | 1
+ gnutls | | 2
+ gpe-aerial | [] [] | 14
+ gpe-beam | [] [] | 14
+ gpe-calendar | [] | 3
+ gpe-clock | [] [] [] [] | 21
+ gpe-conf | [] [] | 14
+ gpe-contacts | [] [] | 10
+ gpe-edit | [] [] [] [] | 20
+ gpe-filemanager | [] | 6
+ gpe-go | [] [] | 15
+ gpe-login | [] [] [] [] [] | 21
+ gpe-ownerinfo | [] [] [] [] | 21
+ gpe-package | [] | 6
+ gpe-sketchbook | [] [] | 16
+ gpe-su | [] [] [] | 20
+ gpe-taskmanager | [] [] [] | 20
+ gpe-timesheet | [] [] [] [] | 18
+ gpe-today | [] [] [] [] [] | 21
+ gpe-todo | [] | 7
+ gphoto2 | [] [] [] [] | 20
+ gprof | [] [] | 11
+ gpsdrive | | 4
+ gramadoir | [] | 7
+ grep | [] [] [] [] | 34
+ gretl | | 4
+ gsasl | [] [] | 8
+ gss | [] | 5
+ gst-plugins | [] [] [] | 15
+ gst-plugins-base | [] [] [] | 9
+ gst-plugins-good | [] [] [] [] [] | 20
+ gstreamer | [] [] [] | 17
+ gtick | [] | 3
+ gtkam | [] | 13
+ gtkorphan | [] | 7
+ gtkspell | [] [] [] [] [] [] | 26
+ gutenprint | | 3
+ hello | [] [] [] [] [] | 37
+ id-utils | [] [] | 14
+ impost | [] | 4
+ indent | [] [] [] [] | 25
+ iso_3166 | [] [] [] [] | 16
+ iso_3166_2 | | 2
+ iso_4217 | [] [] | 14
+ iso_639 | [] | 14
+ jpilot | [] [] [] [] | 7
+ jtag | [] | 3
+ jwhois | [] [] [] | 13
+ kbd | [] [] | 12
+ keytouch | [] | 4
+ keytouch-editor | | 2
+ keytouch-keyboa... | [] | 3
+ latrine | [] [] | 8
+ ld | [] [] [] [] | 8
+ leafpad | [] [] [] [] | 23
+ libc | [] [] [] | 23
+ libexif | [] | 4
+ libextractor | [] | 5
+ libgpewidget | [] [] [] | 19
+ libgpg-error | [] | 4
+ libgphoto2 | [] | 8
+ libgphoto2_port | [] [] [] | 11
+ libgsasl | [] | 8
+ libiconv | [] | 7
+ libidn | [] [] | 10
+ lifelines | | 4
+ lilypond | | 2
+ lingoteach | [] | 6
+ lynx | [] [] [] | 15
+ m4 | [] [] [] | 18
+ mailutils | [] | 8
+ make | [] [] [] | 20
+ man-db | [] | 6
+ minicom | [] | 14
+ mysecretdiary | [] [] | 12
+ nano | [] [] | 17
+ nano_1_0 | [] [] [] | 18
+ opcodes | [] [] | 10
+ parted | [] [] [] | 10
+ pilot-qof | [] | 3
+ psmisc | [] | 10
+ pwdutils | [] | 3
+ python | | 0
+ qof | [] | 4
+ radius | [] | 6
+ recode | [] [] [] | 25
+ rpm | [] [] [] [] | 14
+ screem | [] | 2
+ scrollkeeper | [] [] [] [] | 26
+ sed | [] [] [] | 22
+ sh-utils | [] | 15
+ shared-mime-info | [] [] [] [] | 24
+ sharutils | [] [] [] | 23
+ shishi | | 1
+ silky | [] | 4
+ skencil | [] | 7
+ sketch | | 6
+ solfege | | 2
+ soundtracker | [] [] | 9
+ sp | [] | 3
+ stardict | [] [] [] [] | 11
+ system-tools-ba... | [] [] [] [] [] [] [] | 37
+ tar | [] [] [] [] | 20
+ texinfo | [] [] [] | 15
+ textutils | [] [] [] | 17
+ tin | | 1
+ tp-robot | [] [] [] | 10
+ tuxpaint | [] [] [] | 16
+ unicode-han-tra... | | 0
+ unicode-transla... | | 2
+ util-linux | [] [] [] | 20
+ vorbis-tools | [] [] | 11
+ wastesedge | | 1
+ wdiff | [] [] | 22
+ wget | [] [] [] | 19
+ xchat | [] [] [] [] | 29
+ xkeyboard-config | [] [] [] [] | 11
+ xpad | [] [] [] | 14
+ +---------------------------------------------------+
+ 77 teams tg th tk tr uk ven vi wa xh zh_CN zh_HK zh_TW zu
+ 170 domains 0 1 1 77 39 0 136 10 1 48 5 54 0 2028
+
+ Some counters in the preceding matrix are higher than the number of
+visible blocks let us expect. This is because a few extra PO files are
+used for implementing regional variants of languages, or language
+dialects.
+
+ For a PO file in the matrix above to be effective, the package to
+which it applies should also have been internationalized and
+distributed as such by its maintainer. There might be an observable
+lag between the mere existence a PO file and its wide availability in a
+distribution.
+
+ If October 2006 seems to be old, you may fetch a more recent copy of
+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
+matrix with full percentage details can be found at
+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
+
+1.6 Using `gettext' in new packages
+===================================
+
+If you are writing a freely available program and want to
+internationalize it you are welcome to use GNU `gettext' in your
+package. Of course you have to respect the GNU Library General Public
+License which covers the use of the GNU `gettext' library. This means
+in particular that even non-free programs can use `libintl' as a shared
+library, whereas only free software can use `libintl' as a static
+library or use modified versions of `libintl'.
+
+ Once the sources are changed appropriately and the setup can handle
+the use of `gettext' the only thing missing are the translations. The
+Free Translation Project is also available for packages which are not
+developed inside the GNU project. Therefore the information given above
+applies also for every other Free Software Project. Contact
+`translation@iro.umontreal.ca' to make the `.pot' files available to
+the translation teams.
+
diff --git a/GNUmakefile b/GNUmakefile
new file mode 100755
index 00000000..40ccc061
--- /dev/null
+++ b/GNUmakefile
@@ -0,0 +1,127 @@
+# Having a separate GNUmakefile lets me `include' the dynamically
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+
+# Copyright (C) 2001, 2003, 2006-2010 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Systems where /bin/sh is not the default shell need this. The $(shell)
+# command below won't work with e.g. stock DOS/Windows shells.
+ifeq ($(wildcard /bin/s[h]),/bin/sh)
+SHELL = /bin/sh
+else
+# will be used only with the next shell-test line, then overwritten
+# by a configured-in value
+SHELL = sh
+endif
+
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+_have-Makefile := $(shell test -f Makefile && echo yes)
+ifeq ($(_have-Makefile),yes)
+
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+
+# Allow the user to add to this in the Makefile.
+ALL_RECURSIVE_TARGETS =
+
+include Makefile
+
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/cfg.mk
+include $(srcdir)/maint.mk
+
+# Allow cfg.mk to override these.
+_build-aux ?= build-aux
+_autoreconf ?= autoreconf
+
+# Ensure that $(VERSION) is up to date for dist-related targets, but not
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
+_have-git-version-gen := \
+ $(shell test -f $(srcdir)/$(_build-aux)/git-version-gen && echo yes)
+ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL))
+ _is-dist-target ?= $(filter-out %clean, \
+ $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS)))
+ _is-install-target ?= $(filter-out %check, $(filter install%,$(MAKECMDGOALS)))
+ ifneq (,$(_is-dist-target)$(_is-install-target))
+ _curr-ver := $(shell cd $(srcdir) \
+ && $(_build-aux)/git-version-gen .tarball-version)
+ ifneq ($(_curr-ver),$(VERSION))
+ ifeq ($(_curr-ver),UNKNOWN)
+ $(info WARNING: unable to verify if $(VERSION) is the correct version)
+ else
+ ifneq (,$(_is-install-target))
+ # GNU Coding Standards state that 'make install' should not cause
+ # recompilation after 'make all'. But as long as changing the version
+ # string alters config.h, the cost of having 'make all' always have an
+ # up-to-date version is prohibitive. So, as a compromise, we merely
+ # warn when installing a version string that is out of date; the user
+ # should run 'autoreconf' (or something like 'make distcheck') to
+ # fix the version, 'make all' to propagate it, then 'make install'.
+ $(info WARNING: version string $(VERSION) is out of date;)
+ $(info run '$(MAKE) _version' to fix it)
+ else
+ $(info INFO: running autoreconf for new version string: $(_curr-ver))
+ _dummy := $(shell $(MAKE) $(AM_MAKEFLAGS) _version)
+ endif
+ endif
+ endif
+ endif
+endif
+
+.PHONY: _version
+_version:
+ cd $(srcdir) && rm -rf autom4te.cache .version && $(_autoreconf)
+
+else
+
+.DEFAULT_GOAL := abort-due-to-no-makefile
+srcdir = .
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.mk
+include ./maint.mk
+
+ifeq ($(.DEFAULT_GOAL),abort-due-to-no-makefile)
+$(MAKECMDGOALS): abort-due-to-no-makefile
+endif
+
+abort-due-to-no-makefile:
+ @echo There seems to be no Makefile in this directory. 1>&2
+ @echo "You must run ./configure before running \`make'." 1>&2
+ @exit 1
+
+endif
+
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel, in case someone tries to build multiple
+# targets, and one of them can cause a recursive target to be invoked.
+
+# Only set this if Automake doesn't provide it.
+AM_RECURSIVE_TARGETS ?= $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) \
+ dist distcheck tags ctags
+
+ALL_RECURSIVE_TARGETS += $(AM_RECURSIVE_TARGETS)
+
+ifneq ($(word 2, $(MAKECMDGOALS)), )
+ifneq ($(filter $(ALL_RECURSIVE_TARGETS), $(MAKECMDGOALS)), )
+.NOTPARALLEL:
+endif
+endif
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 00000000..d0107a80
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,3078 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+#####
+
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+DIST_COMMON = README $(am__configure_deps) $(am__include_HEADERS_DIST) \
+ $(am__ltdlinclude_HEADERS_DIST) $(dist_pkgdata_DATA) \
+ $(nobase_include_HEADERS) $(nobase_pkginclude_HEADERS) \
+ $(pkgmodinclude_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/ltdl/Makefile.inc \
+ $(top_srcdir)/configure $(top_srcdir)/m4/system_.h \
+ $(top_srcdir)/tests/atlocal.in $(top_srcdir)/tests/m4.in \
+ ABOUT-NLS AUTHORS COPYING ChangeLog INSTALL NEWS THANKS TODO \
+ build-aux/compile build-aux/config.guess \
+ build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
+ build-aux/install-sh build-aux/ltmain.sh build-aux/mdate-sh \
+ build-aux/missing build-aux/texinfo.tex
+@INSTALL_LTDL_TRUE@am__append_1 = ltdl/ltdl.h
+@INSTALL_LTDL_TRUE@am__append_2 = ltdl/libltdl.la
+@CONVENIENCE_LTDL_TRUE@am__append_3 = ltdl/libltdlc.la
+bin_PROGRAMS = src/m4$(EXEEXT)
+@GETOPT_TRUE@am__append_4 = \
+@GETOPT_TRUE@ src/getopt.c \
+@GETOPT_TRUE@ src/getopt1.c
+
+@STACKOVF_TRUE@am__append_5 = src/stackovf.c
+@GETOPT_TRUE@am__append_6 = src/$(GETOPT_H)
+@USE_GMP_TRUE@am__append_7 = modules/mpeval.la
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/ltdl/m4/00gnulib.m4 \
+ $(top_srcdir)/ltdl/m4/alloca.m4 $(top_srcdir)/ltdl/m4/argz.m4 \
+ $(top_srcdir)/ltdl/m4/assert.m4 \
+ $(top_srcdir)/ltdl/m4/autobuild.m4 \
+ $(top_srcdir)/ltdl/m4/btowc.m4 \
+ $(top_srcdir)/ltdl/m4/canonicalize.m4 \
+ $(top_srcdir)/ltdl/m4/cloexec.m4 \
+ $(top_srcdir)/ltdl/m4/close-stream.m4 \
+ $(top_srcdir)/ltdl/m4/closein.m4 \
+ $(top_srcdir)/ltdl/m4/closeout.m4 \
+ $(top_srcdir)/ltdl/m4/codeset.m4 \
+ $(top_srcdir)/ltdl/m4/config-h.m4 \
+ $(top_srcdir)/ltdl/m4/debug.m4 \
+ $(top_srcdir)/ltdl/m4/dirname.m4 $(top_srcdir)/ltdl/m4/dos.m4 \
+ $(top_srcdir)/ltdl/m4/double-slash-root.m4 \
+ $(top_srcdir)/ltdl/m4/dup2.m4 $(top_srcdir)/ltdl/m4/eealloc.m4 \
+ $(top_srcdir)/ltdl/m4/environ.m4 \
+ $(top_srcdir)/ltdl/m4/errno_h.m4 \
+ $(top_srcdir)/ltdl/m4/error.m4 \
+ $(top_srcdir)/ltdl/m4/execute.m4 \
+ $(top_srcdir)/ltdl/m4/exitfail.m4 \
+ $(top_srcdir)/ltdl/m4/exponentd.m4 \
+ $(top_srcdir)/ltdl/m4/exponentf.m4 \
+ $(top_srcdir)/ltdl/m4/exponentl.m4 \
+ $(top_srcdir)/ltdl/m4/extensions.m4 \
+ $(top_srcdir)/ltdl/m4/fatal-signal.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl-o.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl_h.m4 \
+ $(top_srcdir)/ltdl/m4/fflush.m4 \
+ $(top_srcdir)/ltdl/m4/filenamecat.m4 \
+ $(top_srcdir)/ltdl/m4/flexmember.m4 \
+ $(top_srcdir)/ltdl/m4/float_h.m4 \
+ $(top_srcdir)/ltdl/m4/fopen.m4 \
+ $(top_srcdir)/ltdl/m4/fpending.m4 \
+ $(top_srcdir)/ltdl/m4/fpieee.m4 \
+ $(top_srcdir)/ltdl/m4/fpurge.m4 \
+ $(top_srcdir)/ltdl/m4/freading.m4 \
+ $(top_srcdir)/ltdl/m4/frexp.m4 $(top_srcdir)/ltdl/m4/frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/fseeko.m4 \
+ $(top_srcdir)/ltdl/m4/ftello.m4 \
+ $(top_srcdir)/ltdl/m4/getdtablesize.m4 \
+ $(top_srcdir)/ltdl/m4/getopt.m4 \
+ $(top_srcdir)/ltdl/m4/getpagesize.m4 \
+ $(top_srcdir)/ltdl/m4/gettext.m4 \
+ $(top_srcdir)/ltdl/m4/gettimeofday.m4 \
+ $(top_srcdir)/ltdl/m4/gl_list.m4 \
+ $(top_srcdir)/ltdl/m4/glibc21.m4 $(top_srcdir)/ltdl/m4/gmp.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-common.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/ltdl/m4/iconv.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_h.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_open.m4 \
+ $(top_srcdir)/ltdl/m4/include_next.m4 \
+ $(top_srcdir)/ltdl/m4/inline.m4 \
+ $(top_srcdir)/ltdl/m4/intlmacosx.m4 \
+ $(top_srcdir)/ltdl/m4/intmax_t.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes-pri.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes_h.m4 \
+ $(top_srcdir)/ltdl/m4/isnand.m4 \
+ $(top_srcdir)/ltdl/m4/isnanf.m4 \
+ $(top_srcdir)/ltdl/m4/isnanl.m4 \
+ $(top_srcdir)/ltdl/m4/langinfo_h.m4 \
+ $(top_srcdir)/ltdl/m4/ldexpl.m4 \
+ $(top_srcdir)/ltdl/m4/lib-ld.m4 \
+ $(top_srcdir)/ltdl/m4/lib-link.m4 \
+ $(top_srcdir)/ltdl/m4/lib-prefix.m4 \
+ $(top_srcdir)/ltdl/m4/libtool.m4 $(top_srcdir)/ltdl/m4/link.m4 \
+ $(top_srcdir)/ltdl/m4/localcharset.m4 \
+ $(top_srcdir)/ltdl/m4/locale-fr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-ja.m4 \
+ $(top_srcdir)/ltdl/m4/locale-tr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-zh.m4 \
+ $(top_srcdir)/ltdl/m4/longlong.m4 \
+ $(top_srcdir)/ltdl/m4/lseek.m4 $(top_srcdir)/ltdl/m4/lstat.m4 \
+ $(top_srcdir)/ltdl/m4/ltdl.m4 \
+ $(top_srcdir)/ltdl/m4/ltoptions.m4 \
+ $(top_srcdir)/ltdl/m4/ltsugar.m4 \
+ $(top_srcdir)/ltdl/m4/ltversion.m4 \
+ $(top_srcdir)/ltdl/m4/lt~obsolete.m4 \
+ $(top_srcdir)/ltdl/m4/m4-error.m4 \
+ $(top_srcdir)/ltdl/m4/m4-getopt.m4 \
+ $(top_srcdir)/ltdl/m4/m4-gettext.m4 \
+ $(top_srcdir)/ltdl/m4/m4-obstack.m4 \
+ $(top_srcdir)/ltdl/m4/m4-regex.m4 \
+ $(top_srcdir)/ltdl/m4/m4-rename.m4 \
+ $(top_srcdir)/ltdl/m4/m4-syscmd.m4 \
+ $(top_srcdir)/ltdl/m4/malloc.m4 \
+ $(top_srcdir)/ltdl/m4/malloca.m4 \
+ $(top_srcdir)/ltdl/m4/math_h.m4 \
+ $(top_srcdir)/ltdl/m4/mbchar.m4 \
+ $(top_srcdir)/ltdl/m4/mbiter.m4 \
+ $(top_srcdir)/ltdl/m4/mbrtowc.m4 \
+ $(top_srcdir)/ltdl/m4/mbsinit.m4 \
+ $(top_srcdir)/ltdl/m4/mbslen.m4 \
+ $(top_srcdir)/ltdl/m4/mbstate_t.m4 \
+ $(top_srcdir)/ltdl/m4/memchr.m4 \
+ $(top_srcdir)/ltdl/m4/memmem.m4 \
+ $(top_srcdir)/ltdl/m4/mkdtemp.m4 \
+ $(top_srcdir)/ltdl/m4/mkstemp.m4 \
+ $(top_srcdir)/ltdl/m4/mmap-anon.m4 \
+ $(top_srcdir)/ltdl/m4/mode_t.m4 \
+ $(top_srcdir)/ltdl/m4/multiarch.m4 \
+ $(top_srcdir)/ltdl/m4/nl_langinfo.m4 \
+ $(top_srcdir)/ltdl/m4/nls.m4 $(top_srcdir)/ltdl/m4/nocrash.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf.m4 \
+ $(top_srcdir)/ltdl/m4/open.m4 $(top_srcdir)/ltdl/m4/pathmax.m4 \
+ $(top_srcdir)/ltdl/m4/pipe.m4 $(top_srcdir)/ltdl/m4/pipe2.m4 \
+ $(top_srcdir)/ltdl/m4/po.m4 \
+ $(top_srcdir)/ltdl/m4/posix_spawn.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexp.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/printf.m4 \
+ $(top_srcdir)/ltdl/m4/progtest.m4 \
+ $(top_srcdir)/ltdl/m4/putenv.m4 $(top_srcdir)/ltdl/m4/quote.m4 \
+ $(top_srcdir)/ltdl/m4/quotearg.m4 \
+ $(top_srcdir)/ltdl/m4/rawmemchr.m4 \
+ $(top_srcdir)/ltdl/m4/readlink.m4 \
+ $(top_srcdir)/ltdl/m4/regex.m4 $(top_srcdir)/ltdl/m4/rename.m4 \
+ $(top_srcdir)/ltdl/m4/rmdir.m4 \
+ $(top_srcdir)/ltdl/m4/sched_h.m4 \
+ $(top_srcdir)/ltdl/m4/setenv.m4 \
+ $(top_srcdir)/ltdl/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/ltdl/m4/sigaction.m4 \
+ $(top_srcdir)/ltdl/m4/signal_h.m4 \
+ $(top_srcdir)/ltdl/m4/signalblocking.m4 \
+ $(top_srcdir)/ltdl/m4/signbit.m4 \
+ $(top_srcdir)/ltdl/m4/size_max.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf.m4 \
+ $(top_srcdir)/ltdl/m4/spawn_h.m4 \
+ $(top_srcdir)/ltdl/m4/sprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/ssize_t.m4 \
+ $(top_srcdir)/ltdl/m4/stackovf.m4 \
+ $(top_srcdir)/ltdl/m4/stat.m4 $(top_srcdir)/ltdl/m4/stdarg.m4 \
+ $(top_srcdir)/ltdl/m4/stdbool.m4 \
+ $(top_srcdir)/ltdl/m4/stddef_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdint.m4 \
+ $(top_srcdir)/ltdl/m4/stdint_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdio-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdio_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib_h.m4 \
+ $(top_srcdir)/ltdl/m4/strchrnul.m4 \
+ $(top_srcdir)/ltdl/m4/strdup.m4 \
+ $(top_srcdir)/ltdl/m4/strerror.m4 \
+ $(top_srcdir)/ltdl/m4/string_h.m4 \
+ $(top_srcdir)/ltdl/m4/strndup.m4 \
+ $(top_srcdir)/ltdl/m4/strnlen.m4 \
+ $(top_srcdir)/ltdl/m4/strtod.m4 \
+ $(top_srcdir)/ltdl/m4/strtol.m4 \
+ $(top_srcdir)/ltdl/m4/symlink.m4 \
+ $(top_srcdir)/ltdl/m4/sys_stat_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_time_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_wait_h.m4 \
+ $(top_srcdir)/ltdl/m4/tempname.m4 \
+ $(top_srcdir)/ltdl/m4/time_h.m4 \
+ $(top_srcdir)/ltdl/m4/tmpdir.m4 \
+ $(top_srcdir)/ltdl/m4/ulonglong.m4 \
+ $(top_srcdir)/ltdl/m4/ungetc.m4 \
+ $(top_srcdir)/ltdl/m4/unistd-safer.m4 \
+ $(top_srcdir)/ltdl/m4/unistd_h.m4 \
+ $(top_srcdir)/ltdl/m4/unlocked-io.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf.m4 \
+ $(top_srcdir)/ltdl/m4/version-etc.m4 \
+ $(top_srcdir)/ltdl/m4/vfprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/wait-process.m4 \
+ $(top_srcdir)/ltdl/m4/warn-on-use.m4 \
+ $(top_srcdir)/ltdl/m4/wchar.m4 \
+ $(top_srcdir)/ltdl/m4/wchar_t.m4 \
+ $(top_srcdir)/ltdl/m4/wcrtomb.m4 \
+ $(top_srcdir)/ltdl/m4/wctob.m4 $(top_srcdir)/ltdl/m4/wctype.m4 \
+ $(top_srcdir)/ltdl/m4/wcwidth.m4 \
+ $(top_srcdir)/ltdl/m4/wint_t.m4 \
+ $(top_srcdir)/ltdl/m4/xalloc.m4 $(top_srcdir)/ltdl/m4/xsize.m4 \
+ $(top_srcdir)/ltdl/m4/xstrndup.m4 \
+ $(top_srcdir)/ltdl/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/gnu/config.h
+CONFIG_CLEAN_FILES = tests/m4 m4/system.h tests/atlocal
+CONFIG_CLEAN_VPATH_FILES =
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibexecdir)" \
+ "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" \
+ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)" \
+ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)" \
+ "$(DESTDIR)$(pkgmodincludedir)"
+LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) \
+ $(pkglibexec_LTLIBRARIES)
+ltdl_dld_link_la_DEPENDENCIES =
+am__dirstamp = $(am__leading_dot)dirstamp
+am_ltdl_dld_link_la_OBJECTS = ltdl/loaders/dld_link.lo
+ltdl_dld_link_la_OBJECTS = $(am_ltdl_dld_link_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+ltdl_dld_link_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_dld_link_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am__DEPENDENCIES_1 =
+ltdl_dlopen_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_ltdl_dlopen_la_OBJECTS = ltdl/loaders/dlopen.lo
+ltdl_dlopen_la_OBJECTS = $(am_ltdl_dlopen_la_OBJECTS)
+ltdl_dlopen_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_dlopen_la_LDFLAGS) $(LDFLAGS) -o \
+ $@
+ltdl_dyld_la_LIBADD =
+am_ltdl_dyld_la_OBJECTS = ltdl/loaders/dyld.lo
+ltdl_dyld_la_OBJECTS = $(am_ltdl_dyld_la_OBJECTS)
+ltdl_dyld_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(ltdl_dyld_la_LDFLAGS) $(LDFLAGS) -o $@
+am_ltdl_libltdl_la_OBJECTS = ltdl/loaders/ltdl_libltdl_la-preopen.lo \
+ ltdl/ltdl_libltdl_la-lt__alloc.lo \
+ ltdl/ltdl_libltdl_la-lt_dlloader.lo \
+ ltdl/ltdl_libltdl_la-lt_error.lo ltdl/ltdl_libltdl_la-ltdl.lo \
+ ltdl/ltdl_libltdl_la-slist.lo
+ltdl_libltdl_la_OBJECTS = $(am_ltdl_libltdl_la_OBJECTS)
+ltdl_libltdl_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_libltdl_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+@INSTALL_LTDL_TRUE@am_ltdl_libltdl_la_rpath = -rpath $(libdir)
+am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1)
+am__objects_1 = ltdl/loaders/ltdl_libltdlc_la-preopen.lo \
+ ltdl/ltdl_libltdlc_la-lt__alloc.lo \
+ ltdl/ltdl_libltdlc_la-lt_dlloader.lo \
+ ltdl/ltdl_libltdlc_la-lt_error.lo \
+ ltdl/ltdl_libltdlc_la-ltdl.lo ltdl/ltdl_libltdlc_la-slist.lo
+am_ltdl_libltdlc_la_OBJECTS = $(am__objects_1)
+ltdl_libltdlc_la_OBJECTS = $(am_ltdl_libltdlc_la_OBJECTS)
+ltdl_libltdlc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_libltdlc_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+@CONVENIENCE_LTDL_TRUE@am_ltdl_libltdlc_la_rpath =
+ltdl_load_add_on_la_LIBADD =
+am_ltdl_load_add_on_la_OBJECTS = ltdl/loaders/load_add_on.lo
+ltdl_load_add_on_la_OBJECTS = $(am_ltdl_load_add_on_la_OBJECTS)
+ltdl_load_add_on_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_load_add_on_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+ltdl_loadlibrary_la_LIBADD =
+am_ltdl_loadlibrary_la_OBJECTS = ltdl/loaders/loadlibrary.lo
+ltdl_loadlibrary_la_OBJECTS = $(am_ltdl_loadlibrary_la_OBJECTS)
+ltdl_loadlibrary_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_loadlibrary_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+ltdl_shl_load_la_DEPENDENCIES = $(am__DEPENDENCIES_1)
+am_ltdl_shl_load_la_OBJECTS = ltdl/loaders/shl_load.lo
+ltdl_shl_load_la_OBJECTS = $(am_ltdl_shl_load_la_OBJECTS)
+ltdl_shl_load_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(ltdl_shl_load_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+am_m4_libm4_la_OBJECTS = m4/builtin.lo m4/debug.lo m4/hash.lo \
+ m4/input.lo m4/m4.lo m4/macro.lo m4/module.lo m4/output.lo \
+ m4/path.lo m4/resyntax.lo m4/symtab.lo m4/syntax.lo \
+ m4/utility.lo
+m4_libm4_la_OBJECTS = $(am_m4_libm4_la_OBJECTS)
+modules_gnu_la_DEPENDENCIES = $(module_libadd)
+modules_gnu_la_SOURCES = modules/gnu.c
+modules_gnu_la_OBJECTS = modules/gnu.lo
+modules_gnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(modules_gnu_la_LDFLAGS) $(LDFLAGS) -o \
+ $@
+modules_load_la_DEPENDENCIES = $(module_libadd)
+modules_load_la_SOURCES = modules/load.c
+modules_load_la_OBJECTS = modules/load.lo
+modules_load_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(modules_load_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+modules_m4_la_DEPENDENCIES = $(module_libadd)
+modules_m4_la_SOURCES = modules/m4.c
+modules_m4_la_OBJECTS = modules/m4.lo
+modules_m4_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(modules_m4_la_LDFLAGS) $(LDFLAGS) -o $@
+@USE_GMP_TRUE@modules_mpeval_la_DEPENDENCIES = $(module_libadd) \
+@USE_GMP_TRUE@ $(am__DEPENDENCIES_1)
+am__EXTRA_modules_mpeval_la_SOURCES_DIST = modules/evalparse.c
+modules_mpeval_la_SOURCES = modules/mpeval.c
+modules_mpeval_la_OBJECTS = modules/mpeval.lo
+modules_mpeval_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(modules_mpeval_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+@USE_GMP_TRUE@am_modules_mpeval_la_rpath = -rpath $(pkglibexecdir)
+modules_traditional_la_DEPENDENCIES = $(module_libadd)
+modules_traditional_la_SOURCES = modules/traditional.c
+modules_traditional_la_OBJECTS = modules/traditional.lo
+modules_traditional_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(modules_traditional_la_LDFLAGS) \
+ $(LDFLAGS) -o $@
+tests_import_la_DEPENDENCIES = $(module_libadd)
+am_tests_import_la_OBJECTS = modules/import.lo
+tests_import_la_OBJECTS = $(am_tests_import_la_OBJECTS)
+tests_import_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(tests_import_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+tests_modtest_la_DEPENDENCIES = $(module_libadd)
+am_tests_modtest_la_OBJECTS = modules/modtest.lo
+tests_modtest_la_OBJECTS = $(am_tests_modtest_la_OBJECTS)
+tests_modtest_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(tests_modtest_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+tests_shadow_la_DEPENDENCIES = $(module_libadd)
+am_tests_shadow_la_OBJECTS = modules/shadow.lo
+tests_shadow_la_OBJECTS = $(am_tests_shadow_la_OBJECTS)
+tests_shadow_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(tests_shadow_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+tests_stdlib_la_DEPENDENCIES = $(module_libadd)
+am_tests_stdlib_la_OBJECTS = modules/stdlib.lo
+tests_stdlib_la_OBJECTS = $(am_tests_stdlib_la_OBJECTS)
+tests_stdlib_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \
+ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \
+ $(AM_CFLAGS) $(CFLAGS) $(tests_stdlib_la_LDFLAGS) $(LDFLAGS) \
+ -o $@
+tests_time_la_DEPENDENCIES = $(module_libadd)
+am_tests_time_la_OBJECTS = modules/time.lo
+tests_time_la_OBJECTS = $(am_tests_time_la_OBJECTS)
+tests_time_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(tests_time_la_LDFLAGS) $(LDFLAGS) -o $@
+PROGRAMS = $(bin_PROGRAMS)
+am__src_m4_SOURCES_DIST = src/xstrtoul.c src/xstrtol-error.c \
+ src/xstrtol.c src/xstrtol.h src/version-etc-fsf.c \
+ src/version-etc.c src/version-etc.h src/main.c src/m4.h \
+ src/freeze.c src/getopt.c src/getopt1.c src/stackovf.c
+@GETOPT_TRUE@am__objects_2 = src/src_m4-getopt.$(OBJEXT) \
+@GETOPT_TRUE@ src/src_m4-getopt1.$(OBJEXT)
+@STACKOVF_TRUE@am__objects_3 = src/src_m4-stackovf.$(OBJEXT)
+am_src_m4_OBJECTS = src/src_m4-xstrtoul.$(OBJEXT) \
+ src/src_m4-xstrtol-error.$(OBJEXT) \
+ src/src_m4-xstrtol.$(OBJEXT) \
+ src/src_m4-version-etc-fsf.$(OBJEXT) \
+ src/src_m4-version-etc.$(OBJEXT) src/src_m4-main.$(OBJEXT) \
+ src/src_m4-freeze.$(OBJEXT) $(am__objects_2) $(am__objects_3)
+src_m4_OBJECTS = $(am_src_m4_OBJECTS)
+src_m4_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(src_m4_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES =
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(ltdl_dld_link_la_SOURCES) $(ltdl_dlopen_la_SOURCES) \
+ $(ltdl_dyld_la_SOURCES) $(ltdl_libltdl_la_SOURCES) \
+ $(ltdl_libltdlc_la_SOURCES) $(ltdl_load_add_on_la_SOURCES) \
+ $(ltdl_loadlibrary_la_SOURCES) $(ltdl_shl_load_la_SOURCES) \
+ $(m4_libm4_la_SOURCES) $(EXTRA_modules_gnu_la_SOURCES) \
+ modules/gnu.c modules/load.c $(EXTRA_modules_m4_la_SOURCES) \
+ modules/m4.c $(EXTRA_modules_mpeval_la_SOURCES) \
+ modules/mpeval.c modules/traditional.c \
+ $(tests_import_la_SOURCES) $(tests_modtest_la_SOURCES) \
+ $(tests_shadow_la_SOURCES) $(tests_stdlib_la_SOURCES) \
+ $(tests_time_la_SOURCES) $(src_m4_SOURCES)
+DIST_SOURCES = $(ltdl_dld_link_la_SOURCES) $(ltdl_dlopen_la_SOURCES) \
+ $(ltdl_dyld_la_SOURCES) $(ltdl_libltdl_la_SOURCES) \
+ $(ltdl_libltdlc_la_SOURCES) $(ltdl_load_add_on_la_SOURCES) \
+ $(ltdl_loadlibrary_la_SOURCES) $(ltdl_shl_load_la_SOURCES) \
+ $(m4_libm4_la_SOURCES) $(EXTRA_modules_gnu_la_SOURCES) \
+ modules/gnu.c modules/load.c $(EXTRA_modules_m4_la_SOURCES) \
+ modules/m4.c $(am__EXTRA_modules_mpeval_la_SOURCES_DIST) \
+ modules/mpeval.c modules/traditional.c \
+ $(tests_import_la_SOURCES) $(tests_modtest_la_SOURCES) \
+ $(tests_shadow_la_SOURCES) $(tests_stdlib_la_SOURCES) \
+ $(tests_time_la_SOURCES) $(am__src_m4_SOURCES_DIST)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+DATA = $(dist_pkgdata_DATA)
+am__include_HEADERS_DIST = ltdl/ltdl.h
+am__ltdlinclude_HEADERS_DIST = ltdl/libltdl/lt_system.h \
+ ltdl/libltdl/lt_error.h ltdl/libltdl/lt_dlloader.h
+HEADERS = $(include_HEADERS) $(ltdlinclude_HEADERS) \
+ $(nobase_include_HEADERS) $(nobase_pkginclude_HEADERS) \
+ $(pkgmodinclude_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir dist dist-all distcheck
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+am__remove_distdir = \
+ { test ! -d "$(distdir)" \
+ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -fr "$(distdir)"; }; }
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2 $(distdir).tar.xz
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARGZ_H = @ARGZ_H@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DLPREOPEN = @DLPREOPEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DYNAMIC_MODULES = @DYNAMIC_MODULES@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLOAT_H = @FLOAT_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_H = @GETTEXT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGL = @GNULIB_LOGL@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
+GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
+GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
+GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
+HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTL = @HAVE_SQRTL@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+ICONV_H = @ICONV_H@
+INCLTDL = @INCLTDL@
+INCLUDE_ERROR_H = @INCLUDE_ERROR_H@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INCLUDE_OBSTACK_H = @INCLUDE_OBSTACK_H@
+INCLUDE_REGEX_H = @INCLUDE_REGEX_H@
+INCLUDE_STDBOOL_H = @INCLUDE_STDBOOL_H@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBADD_DL = @LIBADD_DL@
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
+LIBADD_GMP = @LIBADD_GMP@
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_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@
+LTALLOCA = @LTALLOCA@
+LTDLDEPS = @LTDLDEPS@
+LTDLINCL = @LTDLINCL@
+LTDLOPEN = @LTDLOPEN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_CONFIG_H = @LT_CONFIG_H@
+LT_DLLOADERS = @LT_DLLOADERS@
+LT_DLPREOPEN = @LT_DLPREOPEN@
+M4_LIBOBJS = @M4_LIBOBJS@
+M4_LTLIBOBJS = @M4_LTLIBOBJS@
+M4tests_LIBOBJS = @M4tests_LIBOBJS@
+M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_ICONV_H = @NEXT_ICONV_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_SPAWN_H = @NEXT_SPAWN_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBSTACK_H = @OBSTACK_H@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PREOPEN_DEPENDENCIES = @PREOPEN_DEPENDENCIES@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REGEX_H = @REGEX_H@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ICONV = @REPLACE_ICONV@
+REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
+REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SCHED_H = @SCHED_H@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_GMP = @USE_GMP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_symbol_underscore = @sys_symbol_underscore@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+config_aux_dir = build-aux
+config_macro_dir = ltdl/m4
+SUBDIRS = po gnu . doc tests/gnu
+ACLOCAL_AMFLAGS = -I ltdl/m4
+AUTOMAKE_OPTIONS = nostdinc
+
+# Prime the variables that will be augmented by libtool.
+# FIXME - the -export-symbols-regex ".*" is a hack to work around the
+# fact that on cygwin, the convenience library libltdl exports symbols,
+# which effectively disables the auto-exporting of all other symbols.
+# Revisit this if libtool on cygwin improves.
+# See http://lists.gnu.org/archive/html/libtool-patches/2007-02/msg00062.html
+
+# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
+# (not as a sub-package!) using 'nostdinc':
+AM_CPPFLAGS = -DLT_CONFIG_H='<$(LT_CONFIG_H)>' -DLTDL -I. -I$(srcdir) \
+ -Iltdl -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl -Ignu \
+ -I$(srcdir)/gnu -Im4 -I$(srcdir)/m4
+AM_LDFLAGS = -export-dynamic -export-symbols-regex ".*" -no-undefined
+EXTRA_DIST = ltdl/lt__dirent.c ltdl/lt__strl.c ltdl/COPYING.LIB \
+ ltdl/README ltdl/argz_.h ltdl/argz.c bootstrap cfg.mk maint.mk \
+ .version .prev-version $(config_macro_dir)/gnulib-cache.m4 \
+ $(syntax_check_exceptions) src/getopt.c src/getopt1.c \
+ src/getopt.in.h src/getopt_int.h \
+ $(EXTRA_modules_gnu_la_SOURCES) $(EXTRA_modules_m4_la_SOURCES) \
+ modules/perl.c modules/modtest.m4 modules/shadow.m4 \
+ modules/time.m4 modules/time2.m4 modules/stdlib.m4 \
+ m4/system_.h examples/WWW/Makefile examples/WWW/_footer.htm \
+ examples/WWW/_header.htm examples/WWW/m4lib/bugs.m4 \
+ examples/WWW/m4lib/changelog.m4 examples/WWW/m4lib/download.m4 \
+ examples/WWW/m4lib/features.m4 examples/WWW/m4lib/feedback.m4 \
+ examples/WWW/m4lib/html.m4 examples/WWW/m4lib/index.m4 \
+ examples/WWW/m4lib/layout.m4 examples/WWW/m4lib/lists.m4 \
+ examples/WWW/m4lib/menu.m4 examples/WWW/m4lib/modules.m4 \
+ examples/WWW/m4lib/news.m4 examples/WWW/m4lib/readme.m4 \
+ examples/WWW/m4lib/setup.m4 examples/WWW/m4lib/test.m4 \
+ examples/WWW/m4lib/thanks.m4 examples/WWW/m4lib/thissite.m4 \
+ examples/WWW/m4lib/tmpl.m4 examples/WWW/m4lib/todo.m4 \
+ examples/WWW/m4lib/uses.m4 examples/WWW/m4lib/visions.m4 \
+ examples/WWW/m4lib/whatis.m4 $(TESTSUITE) $(TESTSUITE_AT) \
+ $(OTHER_FILES) tests/atlocal.in tests/generate.awk \
+ $(srcdir)/tests/package.m4
+BUILT_SOURCES = ltdl/$(ARGZ_H) .version $(am__append_6)
+CLEANFILES = ltdl/libltdl.la ltdl/libltdlc.la ltdl/libdlloader.la \
+ $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
+DISTCLEANFILES = tests/atconfig tests/atconfig tests/atlocal tests/m4
+MOSTLYCLEANFILES = ltdl/argz.h ltdl/argz.h-t src/getopt.h \
+ src/getopt.h-t
+include_HEADERS = $(am__append_1)
+noinst_LTLIBRARIES = $(LT_DLLOADERS) $(am__append_3)
+lib_LTLIBRARIES = $(am__append_2) m4/libm4.la
+EXTRA_LTLIBRARIES = ltdl/dlopen.la ltdl/dld_link.la ltdl/dyld.la \
+ ltdl/load_add_on.la ltdl/loadlibrary.la ltdl/shl_load.la
+LTDL_VERSION_INFO = -version-info 9:1:2
+@INSTALL_LTDL_TRUE@ltdlincludedir = $(includedir)/libltdl
+@INSTALL_LTDL_TRUE@ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \
+@INSTALL_LTDL_TRUE@ ltdl/libltdl/lt_error.h \
+@INSTALL_LTDL_TRUE@ ltdl/libltdl/lt_dlloader.h
+
+ltdl_libltdl_la_SOURCES = ltdl/libltdl/lt__alloc.h \
+ ltdl/libltdl/lt__dirent.h \
+ ltdl/libltdl/lt__glibc.h \
+ ltdl/libltdl/lt__private.h \
+ ltdl/libltdl/lt__strl.h \
+ ltdl/libltdl/lt_dlloader.h \
+ ltdl/libltdl/lt_error.h \
+ ltdl/libltdl/lt_system.h \
+ ltdl/libltdl/slist.h \
+ ltdl/loaders/preopen.c \
+ ltdl/lt__alloc.c \
+ ltdl/lt_dlloader.c \
+ ltdl/lt_error.c \
+ ltdl/ltdl.c \
+ ltdl/ltdl.h \
+ ltdl/slist.c
+
+ltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
+ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
+ltdl_libltdl_la_LIBADD = $(ltdl_LTLIBOBJS)
+ltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS)
+ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES)
+ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
+ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
+ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
+ltdl_libltdlc_la_DEPENDENCIES = $(ltdl_libltdl_la_DEPENDENCIES)
+ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c
+ltdl_dlopen_la_LDFLAGS = -module -avoid-version
+ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
+ltdl_dld_link_la_SOURCES = ltdl/loaders/dld_link.c
+ltdl_dld_link_la_LDFLAGS = -module -avoid-version
+ltdl_dld_link_la_LIBADD = -ldld
+ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c
+ltdl_dyld_la_LDFLAGS = -module -avoid-version
+ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c
+ltdl_load_add_on_la_LDFLAGS = -module -avoid-version
+ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c
+ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
+ltdl_shl_load_la_SOURCES = ltdl/loaders/shl_load.c
+ltdl_shl_load_la_LDFLAGS = -module -avoid-version
+ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
+
+# Include Libtool's rules.
+
+# Additional configuration. Version management comes from suggestions
+# given in build-aux/git-version-gen.
+syntax_check_exceptions = \
+ .x-sc_cast_of_argument_to_free \
+ .x-sc_prohibit_tab_based_indentation \
+ .x-sc_require_config_h \
+ .x-sc_require_config_h_first \
+ .x-update-copyright
+
+MAINTAINERCLEANFILES = ABOUT-NLS INSTALL Makefile.in aclocal.m4 \
+ config-h.in configure stamp-h.in po/cat-id-tbl.c po/m4.pot \
+ po/stamp-cat-id $(srcdir)/tests/generated.at '$(TESTSUITE)'
+src_m4_SOURCES = src/xstrtoul.c src/xstrtol-error.c src/xstrtol.c \
+ src/xstrtol.h src/version-etc-fsf.c src/version-etc.c \
+ src/version-etc.h src/main.c src/m4.h src/freeze.c \
+ $(am__append_4) $(am__append_5)
+src_m4_CPPFLAGS = $(AM_CPPFLAGS) -Isrc -I$(srcdir)/src
+src_m4_LDFLAGS = $(AM_LDFLAGS) $(DLPREOPEN)
+src_m4_LDADD = m4/libm4.la $(LTLIBICONV)
+src_m4_DEPENDENCIES = $(PREOPEN_DEPENDENCIES) m4/libm4.la
+ARG_NONNULL_H = $(srcdir)/$(config_aux_dir)/arg-nonnull.h
+pkgmodincludedir = $(pkgincludedir)/modules
+ETAGS_ARGS = --regex='/M4BUILTIN_HANDLER[ \t]*)\([^)]*\)/\1/'
+module_ldflags = -module $(AM_LDFLAGS)
+module_libadd = m4/libm4.la
+pkgmodinclude_HEADERS = modules/m4.h
+pkglibexec_LTLIBRARIES = modules/gnu.la modules/load.la modules/m4.la \
+ modules/traditional.la $(am__append_7)
+EXTRA_modules_gnu_la_SOURCES = modules/format.c
+modules_gnu_la_LDFLAGS = $(module_ldflags)
+modules_gnu_la_LIBADD = $(module_libadd)
+modules_load_la_LDFLAGS = $(module_ldflags)
+modules_load_la_LIBADD = $(module_libadd)
+EXTRA_modules_m4_la_SOURCES = modules/evalparse.c
+modules_m4_la_LDFLAGS = $(module_ldflags)
+modules_m4_la_LIBADD = $(module_libadd)
+modules_traditional_la_LDFLAGS = $(module_ldflags)
+modules_traditional_la_LIBADD = $(module_libadd)
+@USE_GMP_TRUE@EXTRA_modules_mpeval_la_SOURCES = modules/evalparse.c
+@USE_GMP_TRUE@modules_mpeval_la_LDFLAGS = $(module_ldflags)
+@USE_GMP_TRUE@modules_mpeval_la_LIBADD = $(module_libadd) $(LIBADD_GMP)
+module_check = -rpath /dev/null
+check_LTLIBRARIES = \
+ tests/import.la \
+ tests/modtest.la \
+ tests/shadow.la \
+ tests/stdlib.la \
+ tests/time.la
+
+tests_import_la_LDFLAGS = $(module_ldflags) $(module_check)
+tests_import_la_LIBADD = $(module_libadd)
+tests_import_la_SOURCES = modules/import.c
+tests_modtest_la_LDFLAGS = $(module_ldflags) $(module_check)
+tests_modtest_la_LIBADD = $(module_libadd)
+tests_modtest_la_SOURCES = modules/modtest.c
+tests_shadow_la_LDFLAGS = $(module_ldflags) $(module_check)
+tests_shadow_la_LIBADD = $(module_libadd)
+tests_shadow_la_SOURCES = modules/shadow.c
+tests_stdlib_la_LDFLAGS = $(module_ldflags) $(module_check)
+tests_stdlib_la_LIBADD = $(module_libadd)
+tests_stdlib_la_SOURCES = modules/stdlib.c
+tests_time_la_LDFLAGS = $(module_ldflags) $(module_check)
+tests_time_la_LIBADD = $(module_libadd)
+tests_time_la_SOURCES = modules/time.c
+nobase_include_HEADERS = \
+ m4/m4module.h
+
+nobase_pkginclude_HEADERS = \
+ m4/hash.h \
+ m4/system.h
+
+m4_libm4_la_SOURCES = \
+ m4/builtin.c \
+ m4/debug.c \
+ m4/hash.c \
+ m4/input.c \
+ m4/m4.c \
+ m4/m4private.h \
+ m4/macro.c \
+ m4/module.c \
+ m4/output.c \
+ m4/path.c \
+ m4/resyntax.c \
+ m4/symtab.c \
+ m4/syntax.c \
+ m4/utility.c
+
+m4_libm4_la_LIBADD = gnu/libgnu.la \
+ $(LIBLTDL) $(LTLIBINTL) $(LIBADD_DL)
+
+m4_libm4_la_DEPENDENCIES = $(LTDLDEPS) gnu/libgnu.la
+dist_pkgdata_DATA = \
+ examples/capitalize.m4 \
+ examples/capitalize2.m4 \
+ examples/comments.m4 \
+ examples/curry.m4 \
+ examples/ddivert.m4 \
+ examples/debug.m4 \
+ examples/esyscmd.m4 \
+ examples/exp.m4 \
+ examples/foreach.m4 \
+ examples/foreach2.m4 \
+ examples/foreachq.m4 \
+ examples/foreachq2.m4 \
+ examples/foreachq3.m4 \
+ examples/foreachq4.m4 \
+ examples/forloop.m4 \
+ examples/forloop2.m4 \
+ examples/forloop3.m4 \
+ examples/fstab.m4 \
+ examples/hanoi.m4 \
+ examples/incl-test.m4 \
+ examples/incl.m4 \
+ examples/include.m4 \
+ examples/indir.m4 \
+ examples/join.m4 \
+ examples/loop.m4 \
+ examples/misc.m4 \
+ examples/multiquotes.m4 \
+ examples/patsubst.m4 \
+ examples/pushpop.m4 \
+ examples/quote.m4 \
+ examples/regexp.m4 \
+ examples/reverse.m4 \
+ examples/stack.m4 \
+ examples/stack_sep.m4 \
+ examples/sysv-args.m4 \
+ examples/trace.m4 \
+ examples/translit.m4 \
+ examples/undivert.incl \
+ examples/undivert.m4 \
+ examples/wrap.m4 \
+ examples/wrapfifo.m4 \
+ examples/wraplifo.m4 \
+ examples/wraplifo2.m4
+
+
+# Use `$(srcdir)' for the benefit of non-GNU makes: this is
+# how `testsuite' appears in our dependencies.
+TESTSUITE = $(srcdir)/tests/testsuite
+TESTSUITE_AT = \
+ tests/builtins.at \
+ tests/freeze.at \
+ $(srcdir)/tests/generated.at \
+ tests/macros.at \
+ tests/modules.at \
+ tests/options.at \
+ tests/others.at \
+ tests/testsuite.at
+
+
+# Using variables so that this snippet is not too wide and can
+# be used as is in Texinfo @example/@end example.
+m4_texinfo = $(srcdir)/doc/m4.texinfo
+generate = $(AWK) -f $(srcdir)/tests/generate.awk
+AUTOM4TE = $(SHELL) $(srcdir)/$(config_aux_dir)/missing --run autom4te
+AUTOTEST = $(AUTOM4TE) --language=autotest
+
+# Enough users install GNU M4 as gm4 that we make sure 'make installcheck'
+# will handle that, as part of making a release.
+DISTCHECK_CONFIGURE_FLAGS = --disable-assert --program-prefix=g
+OTHER_FILES = tests/iso8859.m4 tests/stackovf.test \
+ tests/null.m4 tests/null.out tests/null.err
+
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .lo .o .obj
+am--refresh:
+ @:
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/ltdl/Makefile.inc $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
+ && exit 0; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ echo ' $(SHELL) ./config.status'; \
+ $(SHELL) ./config.status;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ $(SHELL) ./config.status --recheck
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ $(am__cd) $(srcdir) && $(AUTOCONF)
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+$(am__aclocal_m4_deps):
+tests/m4: $(top_builddir)/config.status $(top_srcdir)/tests/m4.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+m4/system.h: $(top_builddir)/config.status $(top_srcdir)/m4/system_.h
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+tests/atlocal: $(top_builddir)/config.status $(top_srcdir)/tests/atlocal.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
+
+clean-checkLTLIBRARIES:
+ -test -z "$(check_LTLIBRARIES)" || rm -f $(check_LTLIBRARIES)
+ @list='$(check_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-libLTLIBRARIES: $(lib_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)"
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \
+ }
+
+uninstall-libLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \
+ done
+
+clean-libLTLIBRARIES:
+ -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
+ @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+install-pkglibexecLTLIBRARIES: $(pkglibexec_LTLIBRARIES)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkglibexecdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibexecdir)"
+ @list='$(pkglibexec_LTLIBRARIES)'; test -n "$(pkglibexecdir)" || list=; \
+ list2=; for p in $$list; do \
+ if test -f $$p; then \
+ list2="$$list2 $$p"; \
+ else :; fi; \
+ done; \
+ test -z "$$list2" || { \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(pkglibexecdir)'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(pkglibexecdir)"; \
+ }
+
+uninstall-pkglibexecLTLIBRARIES:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkglibexec_LTLIBRARIES)'; test -n "$(pkglibexecdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(pkglibexecdir)/$$f'"; \
+ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(pkglibexecdir)/$$f"; \
+ done
+
+clean-pkglibexecLTLIBRARIES:
+ -test -z "$(pkglibexec_LTLIBRARIES)" || rm -f $(pkglibexec_LTLIBRARIES)
+ @list='$(pkglibexec_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+ltdl/loaders/$(am__dirstamp):
+ @$(MKDIR_P) ltdl/loaders
+ @: > ltdl/loaders/$(am__dirstamp)
+ltdl/loaders/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ltdl/loaders/$(DEPDIR)
+ @: > ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/loaders/dld_link.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/$(am__dirstamp):
+ @$(MKDIR_P) ltdl
+ @: > ltdl/$(am__dirstamp)
+ltdl/dld_link.la: $(ltdl_dld_link_la_OBJECTS) $(ltdl_dld_link_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_dld_link_la_LINK) $(ltdl_dld_link_la_OBJECTS) $(ltdl_dld_link_la_LIBADD) $(LIBS)
+ltdl/loaders/dlopen.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/dlopen.la: $(ltdl_dlopen_la_OBJECTS) $(ltdl_dlopen_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_dlopen_la_LINK) $(ltdl_dlopen_la_OBJECTS) $(ltdl_dlopen_la_LIBADD) $(LIBS)
+ltdl/loaders/dyld.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/dyld.la: $(ltdl_dyld_la_OBJECTS) $(ltdl_dyld_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_dyld_la_LINK) $(ltdl_dyld_la_OBJECTS) $(ltdl_dyld_la_LIBADD) $(LIBS)
+ltdl/loaders/ltdl_libltdl_la-preopen.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) ltdl/$(DEPDIR)
+ @: > ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdl_la-lt__alloc.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdl_la-lt_dlloader.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdl_la-lt_error.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdl_la-ltdl.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdl_la-slist.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/libltdl.la: $(ltdl_libltdl_la_OBJECTS) $(ltdl_libltdl_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_libltdl_la_LINK) $(am_ltdl_libltdl_la_rpath) $(ltdl_libltdl_la_OBJECTS) $(ltdl_libltdl_la_LIBADD) $(LIBS)
+ltdl/loaders/ltdl_libltdlc_la-preopen.lo: \
+ ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdlc_la-lt__alloc.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdlc_la-lt_dlloader.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdlc_la-lt_error.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdlc_la-ltdl.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/ltdl_libltdlc_la-slist.lo: ltdl/$(am__dirstamp) \
+ ltdl/$(DEPDIR)/$(am__dirstamp)
+ltdl/libltdlc.la: $(ltdl_libltdlc_la_OBJECTS) $(ltdl_libltdlc_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_libltdlc_la_LINK) $(am_ltdl_libltdlc_la_rpath) $(ltdl_libltdlc_la_OBJECTS) $(ltdl_libltdlc_la_LIBADD) $(LIBS)
+ltdl/loaders/load_add_on.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/load_add_on.la: $(ltdl_load_add_on_la_OBJECTS) $(ltdl_load_add_on_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_load_add_on_la_LINK) $(ltdl_load_add_on_la_OBJECTS) $(ltdl_load_add_on_la_LIBADD) $(LIBS)
+ltdl/loaders/loadlibrary.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/loadlibrary.la: $(ltdl_loadlibrary_la_OBJECTS) $(ltdl_loadlibrary_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_loadlibrary_la_LINK) $(ltdl_loadlibrary_la_OBJECTS) $(ltdl_loadlibrary_la_LIBADD) $(LIBS)
+ltdl/loaders/shl_load.lo: ltdl/loaders/$(am__dirstamp) \
+ ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ltdl/shl_load.la: $(ltdl_shl_load_la_OBJECTS) $(ltdl_shl_load_la_DEPENDENCIES) ltdl/$(am__dirstamp)
+ $(AM_V_CCLD)$(ltdl_shl_load_la_LINK) $(ltdl_shl_load_la_OBJECTS) $(ltdl_shl_load_la_LIBADD) $(LIBS)
+m4/$(am__dirstamp):
+ @$(MKDIR_P) m4
+ @: > m4/$(am__dirstamp)
+m4/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) m4/$(DEPDIR)
+ @: > m4/$(DEPDIR)/$(am__dirstamp)
+m4/builtin.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/debug.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/hash.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/input.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/m4.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/macro.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/module.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/output.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/path.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/resyntax.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/symtab.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/syntax.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/utility.lo: m4/$(am__dirstamp) m4/$(DEPDIR)/$(am__dirstamp)
+m4/libm4.la: $(m4_libm4_la_OBJECTS) $(m4_libm4_la_DEPENDENCIES) m4/$(am__dirstamp)
+ $(AM_V_CCLD)$(LINK) -rpath $(libdir) $(m4_libm4_la_OBJECTS) $(m4_libm4_la_LIBADD) $(LIBS)
+modules/$(am__dirstamp):
+ @$(MKDIR_P) modules
+ @: > modules/$(am__dirstamp)
+modules/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) modules/$(DEPDIR)
+ @: > modules/$(DEPDIR)/$(am__dirstamp)
+modules/format.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/gnu.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/gnu.la: $(modules_gnu_la_OBJECTS) $(modules_gnu_la_DEPENDENCIES) modules/$(am__dirstamp)
+ $(AM_V_CCLD)$(modules_gnu_la_LINK) -rpath $(pkglibexecdir) $(modules_gnu_la_OBJECTS) $(modules_gnu_la_LIBADD) $(LIBS)
+modules/load.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/load.la: $(modules_load_la_OBJECTS) $(modules_load_la_DEPENDENCIES) modules/$(am__dirstamp)
+ $(AM_V_CCLD)$(modules_load_la_LINK) -rpath $(pkglibexecdir) $(modules_load_la_OBJECTS) $(modules_load_la_LIBADD) $(LIBS)
+modules/evalparse.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/m4.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/m4.la: $(modules_m4_la_OBJECTS) $(modules_m4_la_DEPENDENCIES) modules/$(am__dirstamp)
+ $(AM_V_CCLD)$(modules_m4_la_LINK) -rpath $(pkglibexecdir) $(modules_m4_la_OBJECTS) $(modules_m4_la_LIBADD) $(LIBS)
+modules/mpeval.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/mpeval.la: $(modules_mpeval_la_OBJECTS) $(modules_mpeval_la_DEPENDENCIES) modules/$(am__dirstamp)
+ $(AM_V_CCLD)$(modules_mpeval_la_LINK) $(am_modules_mpeval_la_rpath) $(modules_mpeval_la_OBJECTS) $(modules_mpeval_la_LIBADD) $(LIBS)
+modules/traditional.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+modules/traditional.la: $(modules_traditional_la_OBJECTS) $(modules_traditional_la_DEPENDENCIES) modules/$(am__dirstamp)
+ $(AM_V_CCLD)$(modules_traditional_la_LINK) -rpath $(pkglibexecdir) $(modules_traditional_la_OBJECTS) $(modules_traditional_la_LIBADD) $(LIBS)
+modules/import.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+tests/$(am__dirstamp):
+ @$(MKDIR_P) tests
+ @: > tests/$(am__dirstamp)
+tests/import.la: $(tests_import_la_OBJECTS) $(tests_import_la_DEPENDENCIES) tests/$(am__dirstamp)
+ $(AM_V_CCLD)$(tests_import_la_LINK) $(tests_import_la_OBJECTS) $(tests_import_la_LIBADD) $(LIBS)
+modules/modtest.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+tests/modtest.la: $(tests_modtest_la_OBJECTS) $(tests_modtest_la_DEPENDENCIES) tests/$(am__dirstamp)
+ $(AM_V_CCLD)$(tests_modtest_la_LINK) $(tests_modtest_la_OBJECTS) $(tests_modtest_la_LIBADD) $(LIBS)
+modules/shadow.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+tests/shadow.la: $(tests_shadow_la_OBJECTS) $(tests_shadow_la_DEPENDENCIES) tests/$(am__dirstamp)
+ $(AM_V_CCLD)$(tests_shadow_la_LINK) $(tests_shadow_la_OBJECTS) $(tests_shadow_la_LIBADD) $(LIBS)
+modules/stdlib.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+tests/stdlib.la: $(tests_stdlib_la_OBJECTS) $(tests_stdlib_la_DEPENDENCIES) tests/$(am__dirstamp)
+ $(AM_V_CCLD)$(tests_stdlib_la_LINK) $(tests_stdlib_la_OBJECTS) $(tests_stdlib_la_LIBADD) $(LIBS)
+modules/time.lo: modules/$(am__dirstamp) \
+ modules/$(DEPDIR)/$(am__dirstamp)
+tests/time.la: $(tests_time_la_OBJECTS) $(tests_time_la_DEPENDENCIES) tests/$(am__dirstamp)
+ $(AM_V_CCLD)$(tests_time_la_LINK) $(tests_time_la_OBJECTS) $(tests_time_la_LIBADD) $(LIBS)
+install-binPROGRAMS: $(bin_PROGRAMS)
+ @$(NORMAL_INSTALL)
+ test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed 's/$(EXEEXT)$$//' | \
+ while read p p1; do if test -f $$p || test -f $$p1; \
+ then echo "$$p"; echo "$$p"; else :; fi; \
+ done | \
+ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \
+ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
+ sed 'N;N;N;s,\n, ,g' | \
+ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
+ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
+ if ($$2 == $$4) files[d] = files[d] " " $$1; \
+ else { print "f", $$3 "/" $$4, $$1; } } \
+ END { for (d in files) print "f", d, files[d] }' | \
+ while read type dir files; do \
+ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
+ test -z "$$files" || { \
+ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
+ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
+ } \
+ ; done
+
+uninstall-binPROGRAMS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
+ files=`for p in $$list; do echo "$$p"; done | \
+ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
+ -e 's/$$/$(EXEEXT)/' `; \
+ test -n "$$list" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(bindir)" && rm -f $$files
+
+clean-binPROGRAMS:
+ @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+src/$(am__dirstamp):
+ @$(MKDIR_P) src
+ @: > src/$(am__dirstamp)
+src/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) src/$(DEPDIR)
+ @: > src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-xstrtoul.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-xstrtol-error.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-xstrtol.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-version-etc-fsf.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-version-etc.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-main.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-freeze.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-getopt.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-getopt1.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/src_m4-stackovf.$(OBJEXT): src/$(am__dirstamp) \
+ src/$(DEPDIR)/$(am__dirstamp)
+src/m4$(EXEEXT): $(src_m4_OBJECTS) $(src_m4_DEPENDENCIES) src/$(am__dirstamp)
+ @rm -f src/m4$(EXEEXT)
+ $(AM_V_CCLD)$(src_m4_LINK) $(src_m4_OBJECTS) $(src_m4_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f ltdl/loaders/dld_link.$(OBJEXT)
+ -rm -f ltdl/loaders/dld_link.lo
+ -rm -f ltdl/loaders/dlopen.$(OBJEXT)
+ -rm -f ltdl/loaders/dlopen.lo
+ -rm -f ltdl/loaders/dyld.$(OBJEXT)
+ -rm -f ltdl/loaders/dyld.lo
+ -rm -f ltdl/loaders/load_add_on.$(OBJEXT)
+ -rm -f ltdl/loaders/load_add_on.lo
+ -rm -f ltdl/loaders/loadlibrary.$(OBJEXT)
+ -rm -f ltdl/loaders/loadlibrary.lo
+ -rm -f ltdl/loaders/ltdl_libltdl_la-preopen.$(OBJEXT)
+ -rm -f ltdl/loaders/ltdl_libltdl_la-preopen.lo
+ -rm -f ltdl/loaders/ltdl_libltdlc_la-preopen.$(OBJEXT)
+ -rm -f ltdl/loaders/ltdl_libltdlc_la-preopen.lo
+ -rm -f ltdl/loaders/shl_load.$(OBJEXT)
+ -rm -f ltdl/loaders/shl_load.lo
+ -rm -f ltdl/ltdl_libltdl_la-lt__alloc.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdl_la-lt__alloc.lo
+ -rm -f ltdl/ltdl_libltdl_la-lt_dlloader.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdl_la-lt_dlloader.lo
+ -rm -f ltdl/ltdl_libltdl_la-lt_error.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdl_la-lt_error.lo
+ -rm -f ltdl/ltdl_libltdl_la-ltdl.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdl_la-ltdl.lo
+ -rm -f ltdl/ltdl_libltdl_la-slist.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdl_la-slist.lo
+ -rm -f ltdl/ltdl_libltdlc_la-lt__alloc.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdlc_la-lt__alloc.lo
+ -rm -f ltdl/ltdl_libltdlc_la-lt_dlloader.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdlc_la-lt_dlloader.lo
+ -rm -f ltdl/ltdl_libltdlc_la-lt_error.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdlc_la-lt_error.lo
+ -rm -f ltdl/ltdl_libltdlc_la-ltdl.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdlc_la-ltdl.lo
+ -rm -f ltdl/ltdl_libltdlc_la-slist.$(OBJEXT)
+ -rm -f ltdl/ltdl_libltdlc_la-slist.lo
+ -rm -f m4/builtin.$(OBJEXT)
+ -rm -f m4/builtin.lo
+ -rm -f m4/debug.$(OBJEXT)
+ -rm -f m4/debug.lo
+ -rm -f m4/hash.$(OBJEXT)
+ -rm -f m4/hash.lo
+ -rm -f m4/input.$(OBJEXT)
+ -rm -f m4/input.lo
+ -rm -f m4/m4.$(OBJEXT)
+ -rm -f m4/m4.lo
+ -rm -f m4/macro.$(OBJEXT)
+ -rm -f m4/macro.lo
+ -rm -f m4/module.$(OBJEXT)
+ -rm -f m4/module.lo
+ -rm -f m4/output.$(OBJEXT)
+ -rm -f m4/output.lo
+ -rm -f m4/path.$(OBJEXT)
+ -rm -f m4/path.lo
+ -rm -f m4/resyntax.$(OBJEXT)
+ -rm -f m4/resyntax.lo
+ -rm -f m4/symtab.$(OBJEXT)
+ -rm -f m4/symtab.lo
+ -rm -f m4/syntax.$(OBJEXT)
+ -rm -f m4/syntax.lo
+ -rm -f m4/utility.$(OBJEXT)
+ -rm -f m4/utility.lo
+ -rm -f modules/evalparse.$(OBJEXT)
+ -rm -f modules/evalparse.lo
+ -rm -f modules/format.$(OBJEXT)
+ -rm -f modules/format.lo
+ -rm -f modules/gnu.$(OBJEXT)
+ -rm -f modules/gnu.lo
+ -rm -f modules/import.$(OBJEXT)
+ -rm -f modules/import.lo
+ -rm -f modules/load.$(OBJEXT)
+ -rm -f modules/load.lo
+ -rm -f modules/m4.$(OBJEXT)
+ -rm -f modules/m4.lo
+ -rm -f modules/modtest.$(OBJEXT)
+ -rm -f modules/modtest.lo
+ -rm -f modules/mpeval.$(OBJEXT)
+ -rm -f modules/mpeval.lo
+ -rm -f modules/shadow.$(OBJEXT)
+ -rm -f modules/shadow.lo
+ -rm -f modules/stdlib.$(OBJEXT)
+ -rm -f modules/stdlib.lo
+ -rm -f modules/time.$(OBJEXT)
+ -rm -f modules/time.lo
+ -rm -f modules/traditional.$(OBJEXT)
+ -rm -f modules/traditional.lo
+ -rm -f src/src_m4-freeze.$(OBJEXT)
+ -rm -f src/src_m4-getopt.$(OBJEXT)
+ -rm -f src/src_m4-getopt1.$(OBJEXT)
+ -rm -f src/src_m4-main.$(OBJEXT)
+ -rm -f src/src_m4-stackovf.$(OBJEXT)
+ -rm -f src/src_m4-version-etc-fsf.$(OBJEXT)
+ -rm -f src/src_m4-version-etc.$(OBJEXT)
+ -rm -f src/src_m4-xstrtol-error.$(OBJEXT)
+ -rm -f src/src_m4-xstrtol.$(OBJEXT)
+ -rm -f src/src_m4-xstrtoul.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dld_link.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dlopen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/dyld.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/load_add_on.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/loadlibrary.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@ltdl/loaders/$(DEPDIR)/shl_load.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/builtin.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/debug.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/hash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/input.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/m4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/macro.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/module.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/output.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/path.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/resyntax.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/symtab.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/syntax.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@m4/$(DEPDIR)/utility.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/evalparse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/format.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/gnu.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/import.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/load.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/m4.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/modtest.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/mpeval.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/shadow.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/stdlib.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/time.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@modules/$(DEPDIR)/traditional.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-freeze.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-getopt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-getopt1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-main.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-stackovf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-version-etc-fsf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-version-etc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-xstrtol-error.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-xstrtol.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@src/$(DEPDIR)/src_m4-xstrtoul.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+ltdl/loaders/ltdl_libltdl_la-preopen.lo: ltdl/loaders/preopen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/loaders/ltdl_libltdl_la-preopen.lo -MD -MP -MF ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Tpo -c -o ltdl/loaders/ltdl_libltdl_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Tpo ltdl/loaders/$(DEPDIR)/ltdl_libltdl_la-preopen.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/loaders/preopen.c' object='ltdl/loaders/ltdl_libltdl_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/loaders/ltdl_libltdl_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
+
+ltdl/ltdl_libltdl_la-lt__alloc.lo: ltdl/lt__alloc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt__alloc.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Tpo -c -o ltdl/ltdl_libltdl_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt__alloc.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt__alloc.c' object='ltdl/ltdl_libltdl_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
+
+ltdl/ltdl_libltdl_la-lt_dlloader.lo: ltdl/lt_dlloader.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt_dlloader.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Tpo -c -o ltdl/ltdl_libltdl_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_dlloader.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt_dlloader.c' object='ltdl/ltdl_libltdl_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
+
+ltdl/ltdl_libltdl_la-lt_error.lo: ltdl/lt_error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-lt_error.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Tpo -c -o ltdl/ltdl_libltdl_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-lt_error.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt_error.c' object='ltdl/ltdl_libltdl_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
+
+ltdl/ltdl_libltdl_la-ltdl.lo: ltdl/ltdl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-ltdl.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Tpo -c -o ltdl/ltdl_libltdl_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-ltdl.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/ltdl.c' object='ltdl/ltdl_libltdl_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
+
+ltdl/ltdl_libltdl_la-slist.lo: ltdl/slist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdl_la-slist.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Tpo -c -o ltdl/ltdl_libltdl_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Tpo ltdl/$(DEPDIR)/ltdl_libltdl_la-slist.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/slist.c' object='ltdl/ltdl_libltdl_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdl_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdl_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
+
+ltdl/loaders/ltdl_libltdlc_la-preopen.lo: ltdl/loaders/preopen.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/loaders/ltdl_libltdlc_la-preopen.lo -MD -MP -MF ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Tpo -c -o ltdl/loaders/ltdl_libltdlc_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Tpo ltdl/loaders/$(DEPDIR)/ltdl_libltdlc_la-preopen.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/loaders/preopen.c' object='ltdl/loaders/ltdl_libltdlc_la-preopen.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/loaders/ltdl_libltdlc_la-preopen.lo `test -f 'ltdl/loaders/preopen.c' || echo '$(srcdir)/'`ltdl/loaders/preopen.c
+
+ltdl/ltdl_libltdlc_la-lt__alloc.lo: ltdl/lt__alloc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt__alloc.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Tpo -c -o ltdl/ltdl_libltdlc_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt__alloc.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt__alloc.c' object='ltdl/ltdl_libltdlc_la-lt__alloc.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt__alloc.lo `test -f 'ltdl/lt__alloc.c' || echo '$(srcdir)/'`ltdl/lt__alloc.c
+
+ltdl/ltdl_libltdlc_la-lt_dlloader.lo: ltdl/lt_dlloader.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt_dlloader.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Tpo -c -o ltdl/ltdl_libltdlc_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_dlloader.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt_dlloader.c' object='ltdl/ltdl_libltdlc_la-lt_dlloader.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt_dlloader.lo `test -f 'ltdl/lt_dlloader.c' || echo '$(srcdir)/'`ltdl/lt_dlloader.c
+
+ltdl/ltdl_libltdlc_la-lt_error.lo: ltdl/lt_error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-lt_error.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Tpo -c -o ltdl/ltdl_libltdlc_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-lt_error.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/lt_error.c' object='ltdl/ltdl_libltdlc_la-lt_error.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-lt_error.lo `test -f 'ltdl/lt_error.c' || echo '$(srcdir)/'`ltdl/lt_error.c
+
+ltdl/ltdl_libltdlc_la-ltdl.lo: ltdl/ltdl.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-ltdl.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Tpo -c -o ltdl/ltdl_libltdlc_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-ltdl.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/ltdl.c' object='ltdl/ltdl_libltdlc_la-ltdl.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-ltdl.lo `test -f 'ltdl/ltdl.c' || echo '$(srcdir)/'`ltdl/ltdl.c
+
+ltdl/ltdl_libltdlc_la-slist.lo: ltdl/slist.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ltdl/ltdl_libltdlc_la-slist.lo -MD -MP -MF ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Tpo -c -o ltdl/ltdl_libltdlc_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Tpo ltdl/$(DEPDIR)/ltdl_libltdlc_la-slist.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='ltdl/slist.c' object='ltdl/ltdl_libltdlc_la-slist.lo' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ltdl_libltdlc_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ltdl/ltdl_libltdlc_la-slist.lo `test -f 'ltdl/slist.c' || echo '$(srcdir)/'`ltdl/slist.c
+
+src/src_m4-xstrtoul.o: src/xstrtoul.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtoul.o -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtoul.Tpo -c -o src/src_m4-xstrtoul.o `test -f 'src/xstrtoul.c' || echo '$(srcdir)/'`src/xstrtoul.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtoul.Tpo src/$(DEPDIR)/src_m4-xstrtoul.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtoul.c' object='src/src_m4-xstrtoul.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtoul.o `test -f 'src/xstrtoul.c' || echo '$(srcdir)/'`src/xstrtoul.c
+
+src/src_m4-xstrtoul.obj: src/xstrtoul.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtoul.obj -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtoul.Tpo -c -o src/src_m4-xstrtoul.obj `if test -f 'src/xstrtoul.c'; then $(CYGPATH_W) 'src/xstrtoul.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtoul.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtoul.Tpo src/$(DEPDIR)/src_m4-xstrtoul.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtoul.c' object='src/src_m4-xstrtoul.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtoul.obj `if test -f 'src/xstrtoul.c'; then $(CYGPATH_W) 'src/xstrtoul.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtoul.c'; fi`
+
+src/src_m4-xstrtol-error.o: src/xstrtol-error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtol-error.o -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtol-error.Tpo -c -o src/src_m4-xstrtol-error.o `test -f 'src/xstrtol-error.c' || echo '$(srcdir)/'`src/xstrtol-error.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtol-error.Tpo src/$(DEPDIR)/src_m4-xstrtol-error.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtol-error.c' object='src/src_m4-xstrtol-error.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtol-error.o `test -f 'src/xstrtol-error.c' || echo '$(srcdir)/'`src/xstrtol-error.c
+
+src/src_m4-xstrtol-error.obj: src/xstrtol-error.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtol-error.obj -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtol-error.Tpo -c -o src/src_m4-xstrtol-error.obj `if test -f 'src/xstrtol-error.c'; then $(CYGPATH_W) 'src/xstrtol-error.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtol-error.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtol-error.Tpo src/$(DEPDIR)/src_m4-xstrtol-error.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtol-error.c' object='src/src_m4-xstrtol-error.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtol-error.obj `if test -f 'src/xstrtol-error.c'; then $(CYGPATH_W) 'src/xstrtol-error.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtol-error.c'; fi`
+
+src/src_m4-xstrtol.o: src/xstrtol.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtol.o -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtol.Tpo -c -o src/src_m4-xstrtol.o `test -f 'src/xstrtol.c' || echo '$(srcdir)/'`src/xstrtol.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtol.Tpo src/$(DEPDIR)/src_m4-xstrtol.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtol.c' object='src/src_m4-xstrtol.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtol.o `test -f 'src/xstrtol.c' || echo '$(srcdir)/'`src/xstrtol.c
+
+src/src_m4-xstrtol.obj: src/xstrtol.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-xstrtol.obj -MD -MP -MF src/$(DEPDIR)/src_m4-xstrtol.Tpo -c -o src/src_m4-xstrtol.obj `if test -f 'src/xstrtol.c'; then $(CYGPATH_W) 'src/xstrtol.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtol.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-xstrtol.Tpo src/$(DEPDIR)/src_m4-xstrtol.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/xstrtol.c' object='src/src_m4-xstrtol.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-xstrtol.obj `if test -f 'src/xstrtol.c'; then $(CYGPATH_W) 'src/xstrtol.c'; else $(CYGPATH_W) '$(srcdir)/src/xstrtol.c'; fi`
+
+src/src_m4-version-etc-fsf.o: src/version-etc-fsf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-version-etc-fsf.o -MD -MP -MF src/$(DEPDIR)/src_m4-version-etc-fsf.Tpo -c -o src/src_m4-version-etc-fsf.o `test -f 'src/version-etc-fsf.c' || echo '$(srcdir)/'`src/version-etc-fsf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-version-etc-fsf.Tpo src/$(DEPDIR)/src_m4-version-etc-fsf.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/version-etc-fsf.c' object='src/src_m4-version-etc-fsf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-version-etc-fsf.o `test -f 'src/version-etc-fsf.c' || echo '$(srcdir)/'`src/version-etc-fsf.c
+
+src/src_m4-version-etc-fsf.obj: src/version-etc-fsf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-version-etc-fsf.obj -MD -MP -MF src/$(DEPDIR)/src_m4-version-etc-fsf.Tpo -c -o src/src_m4-version-etc-fsf.obj `if test -f 'src/version-etc-fsf.c'; then $(CYGPATH_W) 'src/version-etc-fsf.c'; else $(CYGPATH_W) '$(srcdir)/src/version-etc-fsf.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-version-etc-fsf.Tpo src/$(DEPDIR)/src_m4-version-etc-fsf.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/version-etc-fsf.c' object='src/src_m4-version-etc-fsf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-version-etc-fsf.obj `if test -f 'src/version-etc-fsf.c'; then $(CYGPATH_W) 'src/version-etc-fsf.c'; else $(CYGPATH_W) '$(srcdir)/src/version-etc-fsf.c'; fi`
+
+src/src_m4-version-etc.o: src/version-etc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-version-etc.o -MD -MP -MF src/$(DEPDIR)/src_m4-version-etc.Tpo -c -o src/src_m4-version-etc.o `test -f 'src/version-etc.c' || echo '$(srcdir)/'`src/version-etc.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-version-etc.Tpo src/$(DEPDIR)/src_m4-version-etc.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/version-etc.c' object='src/src_m4-version-etc.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-version-etc.o `test -f 'src/version-etc.c' || echo '$(srcdir)/'`src/version-etc.c
+
+src/src_m4-version-etc.obj: src/version-etc.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-version-etc.obj -MD -MP -MF src/$(DEPDIR)/src_m4-version-etc.Tpo -c -o src/src_m4-version-etc.obj `if test -f 'src/version-etc.c'; then $(CYGPATH_W) 'src/version-etc.c'; else $(CYGPATH_W) '$(srcdir)/src/version-etc.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-version-etc.Tpo src/$(DEPDIR)/src_m4-version-etc.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/version-etc.c' object='src/src_m4-version-etc.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-version-etc.obj `if test -f 'src/version-etc.c'; then $(CYGPATH_W) 'src/version-etc.c'; else $(CYGPATH_W) '$(srcdir)/src/version-etc.c'; fi`
+
+src/src_m4-main.o: src/main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-main.o -MD -MP -MF src/$(DEPDIR)/src_m4-main.Tpo -c -o src/src_m4-main.o `test -f 'src/main.c' || echo '$(srcdir)/'`src/main.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-main.Tpo src/$(DEPDIR)/src_m4-main.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/main.c' object='src/src_m4-main.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-main.o `test -f 'src/main.c' || echo '$(srcdir)/'`src/main.c
+
+src/src_m4-main.obj: src/main.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-main.obj -MD -MP -MF src/$(DEPDIR)/src_m4-main.Tpo -c -o src/src_m4-main.obj `if test -f 'src/main.c'; then $(CYGPATH_W) 'src/main.c'; else $(CYGPATH_W) '$(srcdir)/src/main.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-main.Tpo src/$(DEPDIR)/src_m4-main.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/main.c' object='src/src_m4-main.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-main.obj `if test -f 'src/main.c'; then $(CYGPATH_W) 'src/main.c'; else $(CYGPATH_W) '$(srcdir)/src/main.c'; fi`
+
+src/src_m4-freeze.o: src/freeze.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-freeze.o -MD -MP -MF src/$(DEPDIR)/src_m4-freeze.Tpo -c -o src/src_m4-freeze.o `test -f 'src/freeze.c' || echo '$(srcdir)/'`src/freeze.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-freeze.Tpo src/$(DEPDIR)/src_m4-freeze.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/freeze.c' object='src/src_m4-freeze.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-freeze.o `test -f 'src/freeze.c' || echo '$(srcdir)/'`src/freeze.c
+
+src/src_m4-freeze.obj: src/freeze.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-freeze.obj -MD -MP -MF src/$(DEPDIR)/src_m4-freeze.Tpo -c -o src/src_m4-freeze.obj `if test -f 'src/freeze.c'; then $(CYGPATH_W) 'src/freeze.c'; else $(CYGPATH_W) '$(srcdir)/src/freeze.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-freeze.Tpo src/$(DEPDIR)/src_m4-freeze.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/freeze.c' object='src/src_m4-freeze.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-freeze.obj `if test -f 'src/freeze.c'; then $(CYGPATH_W) 'src/freeze.c'; else $(CYGPATH_W) '$(srcdir)/src/freeze.c'; fi`
+
+src/src_m4-getopt.o: src/getopt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-getopt.o -MD -MP -MF src/$(DEPDIR)/src_m4-getopt.Tpo -c -o src/src_m4-getopt.o `test -f 'src/getopt.c' || echo '$(srcdir)/'`src/getopt.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-getopt.Tpo src/$(DEPDIR)/src_m4-getopt.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/getopt.c' object='src/src_m4-getopt.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-getopt.o `test -f 'src/getopt.c' || echo '$(srcdir)/'`src/getopt.c
+
+src/src_m4-getopt.obj: src/getopt.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-getopt.obj -MD -MP -MF src/$(DEPDIR)/src_m4-getopt.Tpo -c -o src/src_m4-getopt.obj `if test -f 'src/getopt.c'; then $(CYGPATH_W) 'src/getopt.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-getopt.Tpo src/$(DEPDIR)/src_m4-getopt.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/getopt.c' object='src/src_m4-getopt.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-getopt.obj `if test -f 'src/getopt.c'; then $(CYGPATH_W) 'src/getopt.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt.c'; fi`
+
+src/src_m4-getopt1.o: src/getopt1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-getopt1.o -MD -MP -MF src/$(DEPDIR)/src_m4-getopt1.Tpo -c -o src/src_m4-getopt1.o `test -f 'src/getopt1.c' || echo '$(srcdir)/'`src/getopt1.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-getopt1.Tpo src/$(DEPDIR)/src_m4-getopt1.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/getopt1.c' object='src/src_m4-getopt1.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-getopt1.o `test -f 'src/getopt1.c' || echo '$(srcdir)/'`src/getopt1.c
+
+src/src_m4-getopt1.obj: src/getopt1.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-getopt1.obj -MD -MP -MF src/$(DEPDIR)/src_m4-getopt1.Tpo -c -o src/src_m4-getopt1.obj `if test -f 'src/getopt1.c'; then $(CYGPATH_W) 'src/getopt1.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt1.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-getopt1.Tpo src/$(DEPDIR)/src_m4-getopt1.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/getopt1.c' object='src/src_m4-getopt1.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-getopt1.obj `if test -f 'src/getopt1.c'; then $(CYGPATH_W) 'src/getopt1.c'; else $(CYGPATH_W) '$(srcdir)/src/getopt1.c'; fi`
+
+src/src_m4-stackovf.o: src/stackovf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-stackovf.o -MD -MP -MF src/$(DEPDIR)/src_m4-stackovf.Tpo -c -o src/src_m4-stackovf.o `test -f 'src/stackovf.c' || echo '$(srcdir)/'`src/stackovf.c
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-stackovf.Tpo src/$(DEPDIR)/src_m4-stackovf.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/stackovf.c' object='src/src_m4-stackovf.o' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-stackovf.o `test -f 'src/stackovf.c' || echo '$(srcdir)/'`src/stackovf.c
+
+src/src_m4-stackovf.obj: src/stackovf.c
+@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT src/src_m4-stackovf.obj -MD -MP -MF src/$(DEPDIR)/src_m4-stackovf.Tpo -c -o src/src_m4-stackovf.obj `if test -f 'src/stackovf.c'; then $(CYGPATH_W) 'src/stackovf.c'; else $(CYGPATH_W) '$(srcdir)/src/stackovf.c'; fi`
+@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) src/$(DEPDIR)/src_m4-stackovf.Tpo src/$(DEPDIR)/src_m4-stackovf.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='src/stackovf.c' object='src/src_m4-stackovf.obj' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(src_m4_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o src/src_m4-stackovf.obj `if test -f 'src/stackovf.c'; then $(CYGPATH_W) 'src/stackovf.c'; else $(CYGPATH_W) '$(srcdir)/src/stackovf.c'; fi`
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf ltdl/.libs ltdl/_libs
+ -rm -rf ltdl/loaders/.libs ltdl/loaders/_libs
+ -rm -rf m4/.libs m4/_libs
+ -rm -rf modules/.libs modules/_libs
+ -rm -rf src/.libs src/_libs
+ -rm -rf tests/.libs tests/_libs
+
+distclean-libtool:
+ -rm -f libtool config.lt
+install-dist_pkgdataDATA: $(dist_pkgdata_DATA)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdatadir)"
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdatadir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdatadir)" || exit $$?; \
+ done
+
+uninstall-dist_pkgdataDATA:
+ @$(NORMAL_UNINSTALL)
+ @list='$(dist_pkgdata_DATA)'; test -n "$(pkgdatadir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgdatadir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgdatadir)" && rm -f $$files
+install-includeHEADERS: $(include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \
+ done
+
+uninstall-includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(includedir)" && rm -f $$files
+install-ltdlincludeHEADERS: $(ltdlinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(ltdlincludedir)" || $(MKDIR_P) "$(DESTDIR)$(ltdlincludedir)"
+ @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(ltdlincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(ltdlincludedir)" || exit $$?; \
+ done
+
+uninstall-ltdlincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(ltdlinclude_HEADERS)'; test -n "$(ltdlincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(ltdlincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(ltdlincludedir)" && rm -f $$files
+install-nobase_includeHEADERS: $(nobase_include_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(includedir)" || $(MKDIR_P) "$(DESTDIR)$(includedir)"
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \
+ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \
+ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_includeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(includedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(includedir)" && rm -f $$files
+install-nobase_pkgincludeHEADERS: $(nobase_pkginclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)"
+ @list='$(nobase_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ $(am__nobase_list) | while read dir files; do \
+ xfiles=; for file in $$files; do \
+ if test -f "$$file"; then xfiles="$$xfiles $$file"; \
+ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
+ test -z "$$xfiles" || { \
+ test "x$$dir" = x. || { \
+ echo "$(MKDIR_P) '$(DESTDIR)$(pkgincludedir)/$$dir'"; \
+ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)/$$dir"; }; \
+ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(pkgincludedir)/$$dir'"; \
+ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(pkgincludedir)/$$dir" || exit $$?; }; \
+ done
+
+uninstall-nobase_pkgincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nobase_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \
+ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgincludedir)" && rm -f $$files
+install-pkgmodincludeHEADERS: $(pkgmodinclude_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pkgmodincludedir)" || $(MKDIR_P) "$(DESTDIR)$(pkgmodincludedir)"
+ @list='$(pkgmodinclude_HEADERS)'; test -n "$(pkgmodincludedir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgmodincludedir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgmodincludedir)" || exit $$?; \
+ done
+
+uninstall-pkgmodincludeHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(pkgmodinclude_HEADERS)'; test -n "$(pkgmodincludedir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(pkgmodincludedir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(pkgmodincludedir)" && rm -f $$files
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ $(am__remove_distdir)
+ test -d "$(distdir)" || mkdir "$(distdir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-hook
+ -test -n "$(am__skip_mode_fix)" \
+ || find "$(distdir)" -type d ! -perm -755 \
+ -exec chmod u+rwx,go+rx {} \; -o \
+ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \
+ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
+ || chmod -R a+r "$(distdir)"
+dist-gzip: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ $(am__remove_distdir)
+dist-bzip2: distdir
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzma: distdir
+ tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+ $(am__remove_distdir)
+dist-xz: distdir
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+dist-tarZ: distdir
+ tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
+ $(am__remove_distdir)
+
+dist-shar: distdir
+ shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
+ $(am__remove_distdir)
+
+dist-zip: distdir
+ -rm -f $(distdir).zip
+ zip -rq $(distdir).zip $(distdir)
+ $(am__remove_distdir)
+
+dist dist-all: distdir
+ tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+ tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ $(am__remove_distdir)
+
+# This target untars the dist file and tries a VPATH configuration. Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+ case '$(DIST_ARCHIVES)' in \
+ *.tar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
+ *.tar.bz2*) \
+ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
+ *.tar.lzma*) \
+ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.xz*) \
+ xz -dc $(distdir).tar.xz | $(am__untar) ;;\
+ *.tar.Z*) \
+ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
+ *.shar.gz*) \
+ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
+ *.zip*) \
+ unzip $(distdir).zip ;;\
+ esac
+ chmod -R a-w $(distdir); chmod a+w $(distdir)
+ mkdir $(distdir)/_build
+ mkdir $(distdir)/_inst
+ chmod a-w $(distdir)
+ test -d $(distdir)/_build || exit 0; \
+ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
+ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
+ && am__cwd=`pwd` \
+ && $(am__cd) $(distdir)/_build \
+ && ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(DISTCHECK_CONFIGURE_FLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) \
+ && $(MAKE) $(AM_MAKEFLAGS) dvi \
+ && $(MAKE) $(AM_MAKEFLAGS) check \
+ && $(MAKE) $(AM_MAKEFLAGS) install \
+ && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+ && $(MAKE) $(AM_MAKEFLAGS) uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
+ distuninstallcheck \
+ && chmod -R a-w "$$dc_install_base" \
+ && ({ \
+ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
+ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
+ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
+ } || { rm -rf "$$dc_destdir"; exit 1; }) \
+ && rm -rf "$$dc_destdir" \
+ && $(MAKE) $(AM_MAKEFLAGS) dist \
+ && rm -rf $(DIST_ARCHIVES) \
+ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
+ && cd "$$am__cwd" \
+ || exit 1
+ $(am__remove_distdir)
+ @(echo "$(distdir) archives ready for distribution: "; \
+ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
+ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
+distuninstallcheck:
+ @$(am__cd) '$(distuninstallcheck_dir)' \
+ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ || { echo "ERROR: files left after uninstall:" ; \
+ if test -n "$(DESTDIR)"; then \
+ echo " (check DESTDIR support)"; \
+ fi ; \
+ $(distuninstallcheck_listfiles) ; \
+ exit 1; } >&2
+distcleancheck: distclean
+ @if test '$(srcdir)' = . ; then \
+ echo "ERROR: distcleancheck can only run from a VPATH build" ; \
+ exit 1 ; \
+ fi
+ @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
+ || { echo "ERROR: files left in build directory after distclean:" ; \
+ $(distcleancheck_listfiles) ; \
+ exit 1; } >&2
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_LTLIBRARIES)
+ $(MAKE) $(AM_MAKEFLAGS) check-local
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(DATA) $(HEADERS)
+install-binPROGRAMS: install-libLTLIBRARIES
+
+installdirs: installdirs-recursive
+installdirs-am:
+ for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkglibexecdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(pkgdatadir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(ltdlincludedir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(pkgmodincludedir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f ltdl/$(DEPDIR)/$(am__dirstamp)
+ -rm -f ltdl/$(am__dirstamp)
+ -rm -f ltdl/loaders/$(DEPDIR)/$(am__dirstamp)
+ -rm -f ltdl/loaders/$(am__dirstamp)
+ -rm -f m4/$(DEPDIR)/$(am__dirstamp)
+ -rm -f m4/$(am__dirstamp)
+ -rm -f modules/$(DEPDIR)/$(am__dirstamp)
+ -rm -f modules/$(am__dirstamp)
+ -rm -f src/$(DEPDIR)/$(am__dirstamp)
+ -rm -f src/$(am__dirstamp)
+ -rm -f tests/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-binPROGRAMS clean-checkLTLIBRARIES clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibexecLTLIBRARIES \
+ mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf ltdl/$(DEPDIR) ltdl/loaders/$(DEPDIR) m4/$(DEPDIR) modules/$(DEPDIR) src/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-libtool distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am: install-dist_pkgdataDATA install-includeHEADERS \
+ install-ltdlincludeHEADERS install-nobase_includeHEADERS \
+ install-nobase_pkgincludeHEADERS install-pkgmodincludeHEADERS
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-binPROGRAMS install-libLTLIBRARIES \
+ install-pkglibexecLTLIBRARIES
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am: installcheck-local
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -f $(am__CONFIG_DISTCLEAN_FILES)
+ -rm -rf $(top_srcdir)/autom4te.cache
+ -rm -rf ltdl/$(DEPDIR) ltdl/loaders/$(DEPDIR) m4/$(DEPDIR) modules/$(DEPDIR) src/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-binPROGRAMS uninstall-dist_pkgdataDATA \
+ uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-ltdlincludeHEADERS uninstall-nobase_includeHEADERS \
+ uninstall-nobase_pkgincludeHEADERS \
+ uninstall-pkglibexecLTLIBRARIES uninstall-pkgmodincludeHEADERS
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ check-am ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am am--refresh check check-am check-local clean \
+ clean-binPROGRAMS clean-checkLTLIBRARIES clean-generic \
+ clean-libLTLIBRARIES clean-libtool clean-local \
+ clean-noinstLTLIBRARIES clean-pkglibexecLTLIBRARIES ctags \
+ ctags-recursive dist dist-all dist-bzip2 dist-gzip dist-hook \
+ dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
+ distclean distclean-compile distclean-generic \
+ distclean-libtool distclean-tags distcleancheck distdir \
+ distuninstallcheck dvi dvi-am html html-am info info-am \
+ install install-am install-binPROGRAMS install-data \
+ install-data-am install-dist_pkgdataDATA install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-includeHEADERS install-info \
+ install-info-am install-libLTLIBRARIES \
+ install-ltdlincludeHEADERS install-man \
+ install-nobase_includeHEADERS install-nobase_pkgincludeHEADERS \
+ install-pdf install-pdf-am install-pkglibexecLTLIBRARIES \
+ install-pkgmodincludeHEADERS install-ps install-ps-am \
+ install-strip installcheck installcheck-am installcheck-local \
+ installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
+ tags tags-recursive uninstall uninstall-am \
+ uninstall-binPROGRAMS uninstall-dist_pkgdataDATA \
+ uninstall-includeHEADERS uninstall-libLTLIBRARIES \
+ uninstall-ltdlincludeHEADERS uninstall-nobase_includeHEADERS \
+ uninstall-nobase_pkgincludeHEADERS \
+ uninstall-pkglibexecLTLIBRARIES uninstall-pkgmodincludeHEADERS
+
+
+# We need the following in order to create an <argz.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): ltdl/$(ARGZ_H)
+ltdl/argz.h: ltdl/argz_.h
+ $(mkinstalldirs) . ltdl/
+ cp $(srcdir)/ltdl/argz_.h $@-t
+ mv $@-t $@
+.version:
+ echo $(VERSION) > $@-t && mv $@-t $@
+dist-hook: dist-tarball-version
+dist-tarball-version:
+ echo $(VERSION) > $(distdir)/.tarball-version
+
+# We need the following in order to create an <getopt.h> when the
+# system doesn't have one that works with the given compiler.
+src/getopt.h: src/getopt.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_GETOPT_H''@|$(HAVE_GETOPT_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_GETOPT_H''@|$(NEXT_GETOPT_H)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/src/getopt.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+
+# This file needs to be regenerated at configure time.
+dist-hook:
+ rm -f $(distdir)/m4/system.h
+$(srcdir)/tests/generated.at: tests/generate.awk $(m4_texinfo)
+ $(generate) $(m4_texinfo) >$@t
+ mv $@t $@
+$(TESTSUITE): $(srcdir)/tests/package.m4 $(TESTSUITE_AT)
+ $(AUTOTEST) -I '$(srcdir)/tests' -o $@.tmp $@.at
+ mv $@.tmp $@
+
+# The leading :; works around a bug in {}>f in some bash versions.
+$(srcdir)/tests/package.m4: .version
+ :; \
+ { \
+ echo '# Signature of the current package.'; \
+ echo 'm4_define([AT_PACKAGE_NAME], [$(PACKAGE_NAME)])'; \
+ echo 'm4_define([AT_PACKAGE_TARNAME], [$(PACKAGE_TARNAME)])'; \
+ echo 'm4_define([AT_PACKAGE_VERSION], [$(PACKAGE_VERSION)])'; \
+ echo 'm4_define([AT_PACKAGE_STRING], [$(PACKAGE_STRING)])'; \
+ echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
+ } > $(srcdir)/tests/package.m4
+
+tests/atconfig: config.status
+ $(SHELL) ./config.status tests/atconfig
+
+# Hook the test suite into the check rule
+check-local: tests/atconfig tests/atlocal tests/m4 $(TESTSUITE) \
+ $(check_LTLIBRARIES)
+ $(SHELL) '$(srcdir)/tests/testsuite' -C tests $(TESTSUITEFLAGS)
+
+# Run the test suite on the *installed* tree, including any renames
+# the user requested.
+installcheck-local: tests/atconfig tests/atlocal $(TESTSUITE) \
+ $(check_LTLIBRARIES)
+ $(SHELL) '$(srcdir)/tests/testsuite' -C tests \
+ AUTOTEST_PATH="$(bindir)" \
+ M4="`echo m4 | sed '$(program_transform_name)'`" $(TESTSUITEFLAGS)
+
+# We need to remove any file droppings left behind by testsuite.
+clean-local-tests:
+ test ! -f '$(srcdir)/tests/testsuite' || \
+ $(SHELL) '$(srcdir)/tests/testsuite' -C tests --clean
+
+clean-local: clean-local-tests
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 00000000..62d6d829
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,1239 @@
+# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
+You have another version of autoconf. It may work, but is not guaranteed to.
+If you have problems, you may need to regenerate the build system entirely.
+To do so, use the procedure documented by the package, typically `autoreconf'.])])
+
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+# (This private macro should not be called outside this file.)
+AC_DEFUN([AM_AUTOMAKE_VERSION],
+[am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+
+# _AM_AUTOCONF_VERSION(VERSION)
+# -----------------------------
+# aclocal traces this macro to find the Autoconf version.
+# This is a private macro too. Using m4_define simplifies
+# the logic in aclocal, which can simply ignore this definition.
+m4_define([_AM_AUTOCONF_VERSION], [])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+[AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+
+# AM_AUX_DIR_EXPAND -*- Autoconf -*-
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory. The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run. This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+# fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+# fails if $ac_aux_dir is absolute,
+# fails when called from a subdirectory in a VPATH build with
+# a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir. In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir. That would be:
+# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+# MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH. The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+AC_DEFUN([AM_AUX_DIR_EXPAND],
+[dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_CONDITIONAL -*- Autoconf -*-
+
+# Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 9
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 10
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery. Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+
+# Generate code to set up dependency tracking. -*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+#serial 5
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled. FIXME. This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2005
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 3
+
+AC_DEFUN([AM_WITH_DMALLOC],
+[AC_MSG_CHECKING([if malloc debugging is wanted])
+AC_ARG_WITH(dmalloc,
+[ --with-dmalloc use dmalloc, as in
+ http://www.dmalloc.com/dmalloc.tar.gz],
+[if test "$withval" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_DMALLOC,1,
+ [Define if using the dmalloc debugging malloc package])
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ AC_MSG_RESULT(no)
+fi], [AC_MSG_RESULT(no)])
+])
+
+AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
+
+# Do all the work for Automake. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 16
+
+# This macro actually does too much. Some checks are only needed if
+# your package does certain things. But this isn't really a big deal.
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out. PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition. After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+
+dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not
+dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further
+dnl mangled by Autoconf and run in a shell conditional statement.
+m4_define([_AC_COMPILER_EXEEXT],
+m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated. The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+
+# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+
+# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot. For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# Check to see how 'make' treats includes. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# Copyright (C) 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_PROG_CC_C_O
+# --------------
+# Like AC_PROG_CC_C_O, but changed for automake.
+AC_DEFUN([AM_PROG_CC_C_O],
+[AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+
+# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*-
+
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 6
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
+# Helper functions for option handling. -*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 4
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME. Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+# Check to make sure that the build environment is sane. -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
+# Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 5
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+# Copyright (C) 2009 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 1
+
+# AM_SILENT_RULES([DEFAULT])
+# --------------------------
+# Enable less verbose build rules; with the default set to DEFAULT
+# (`yes' being less verbose, `no' or empty being verbose).
+AC_DEFUN([AM_SILENT_RULES],
+[AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+
+# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_INSTALL_STRIP
+# ---------------------
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries. This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
+# This macro is traced by Automake.
+AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+
+# Check how to create a tarball. -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 2
+
+# _AM_PROG_TAR(FORMAT)
+# --------------------
+# Check how to create a tarball in format FORMAT.
+# FORMAT should be one of `v7', `ustar', or `pax'.
+#
+# Substitute a variable $(am__tar) that is a command
+# writing to stdout a FORMAT-tarball containing the directory
+# $tardir.
+# tardir=directory && $(am__tar) > result.tar
+#
+# Substitute a variable $(am__untar) that extract such
+# a tarball read from stdin.
+# $(am__untar) < result.tar
+AC_DEFUN([_AM_PROG_TAR],
+[# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+]) # _AM_PROG_TAR
+
+m4_include([ltdl/m4/00gnulib.m4])
+m4_include([ltdl/m4/alloca.m4])
+m4_include([ltdl/m4/argz.m4])
+m4_include([ltdl/m4/assert.m4])
+m4_include([ltdl/m4/autobuild.m4])
+m4_include([ltdl/m4/btowc.m4])
+m4_include([ltdl/m4/canonicalize.m4])
+m4_include([ltdl/m4/cloexec.m4])
+m4_include([ltdl/m4/close-stream.m4])
+m4_include([ltdl/m4/closein.m4])
+m4_include([ltdl/m4/closeout.m4])
+m4_include([ltdl/m4/codeset.m4])
+m4_include([ltdl/m4/config-h.m4])
+m4_include([ltdl/m4/debug.m4])
+m4_include([ltdl/m4/dirname.m4])
+m4_include([ltdl/m4/dos.m4])
+m4_include([ltdl/m4/double-slash-root.m4])
+m4_include([ltdl/m4/dup2.m4])
+m4_include([ltdl/m4/eealloc.m4])
+m4_include([ltdl/m4/environ.m4])
+m4_include([ltdl/m4/errno_h.m4])
+m4_include([ltdl/m4/error.m4])
+m4_include([ltdl/m4/execute.m4])
+m4_include([ltdl/m4/exitfail.m4])
+m4_include([ltdl/m4/exponentd.m4])
+m4_include([ltdl/m4/exponentf.m4])
+m4_include([ltdl/m4/exponentl.m4])
+m4_include([ltdl/m4/extensions.m4])
+m4_include([ltdl/m4/fatal-signal.m4])
+m4_include([ltdl/m4/fcntl-o.m4])
+m4_include([ltdl/m4/fcntl.m4])
+m4_include([ltdl/m4/fcntl_h.m4])
+m4_include([ltdl/m4/fflush.m4])
+m4_include([ltdl/m4/filenamecat.m4])
+m4_include([ltdl/m4/flexmember.m4])
+m4_include([ltdl/m4/float_h.m4])
+m4_include([ltdl/m4/fopen.m4])
+m4_include([ltdl/m4/fpending.m4])
+m4_include([ltdl/m4/fpieee.m4])
+m4_include([ltdl/m4/fpurge.m4])
+m4_include([ltdl/m4/freading.m4])
+m4_include([ltdl/m4/frexp.m4])
+m4_include([ltdl/m4/frexpl.m4])
+m4_include([ltdl/m4/fseeko.m4])
+m4_include([ltdl/m4/ftello.m4])
+m4_include([ltdl/m4/getdtablesize.m4])
+m4_include([ltdl/m4/getopt.m4])
+m4_include([ltdl/m4/getpagesize.m4])
+m4_include([ltdl/m4/gettext.m4])
+m4_include([ltdl/m4/gettimeofday.m4])
+m4_include([ltdl/m4/gl_list.m4])
+m4_include([ltdl/m4/glibc21.m4])
+m4_include([ltdl/m4/gmp.m4])
+m4_include([ltdl/m4/gnulib-common.m4])
+m4_include([ltdl/m4/gnulib-comp.m4])
+m4_include([ltdl/m4/iconv.m4])
+m4_include([ltdl/m4/iconv_h.m4])
+m4_include([ltdl/m4/iconv_open.m4])
+m4_include([ltdl/m4/include_next.m4])
+m4_include([ltdl/m4/inline.m4])
+m4_include([ltdl/m4/intlmacosx.m4])
+m4_include([ltdl/m4/intmax_t.m4])
+m4_include([ltdl/m4/inttypes-pri.m4])
+m4_include([ltdl/m4/inttypes.m4])
+m4_include([ltdl/m4/inttypes_h.m4])
+m4_include([ltdl/m4/isnand.m4])
+m4_include([ltdl/m4/isnanf.m4])
+m4_include([ltdl/m4/isnanl.m4])
+m4_include([ltdl/m4/langinfo_h.m4])
+m4_include([ltdl/m4/ldexpl.m4])
+m4_include([ltdl/m4/lib-ld.m4])
+m4_include([ltdl/m4/lib-link.m4])
+m4_include([ltdl/m4/lib-prefix.m4])
+m4_include([ltdl/m4/libtool.m4])
+m4_include([ltdl/m4/link.m4])
+m4_include([ltdl/m4/localcharset.m4])
+m4_include([ltdl/m4/locale-fr.m4])
+m4_include([ltdl/m4/locale-ja.m4])
+m4_include([ltdl/m4/locale-tr.m4])
+m4_include([ltdl/m4/locale-zh.m4])
+m4_include([ltdl/m4/longlong.m4])
+m4_include([ltdl/m4/lseek.m4])
+m4_include([ltdl/m4/lstat.m4])
+m4_include([ltdl/m4/ltdl.m4])
+m4_include([ltdl/m4/ltoptions.m4])
+m4_include([ltdl/m4/ltsugar.m4])
+m4_include([ltdl/m4/ltversion.m4])
+m4_include([ltdl/m4/lt~obsolete.m4])
+m4_include([ltdl/m4/m4-error.m4])
+m4_include([ltdl/m4/m4-getopt.m4])
+m4_include([ltdl/m4/m4-gettext.m4])
+m4_include([ltdl/m4/m4-obstack.m4])
+m4_include([ltdl/m4/m4-regex.m4])
+m4_include([ltdl/m4/m4-rename.m4])
+m4_include([ltdl/m4/m4-syscmd.m4])
+m4_include([ltdl/m4/malloc.m4])
+m4_include([ltdl/m4/malloca.m4])
+m4_include([ltdl/m4/math_h.m4])
+m4_include([ltdl/m4/mbchar.m4])
+m4_include([ltdl/m4/mbiter.m4])
+m4_include([ltdl/m4/mbrtowc.m4])
+m4_include([ltdl/m4/mbsinit.m4])
+m4_include([ltdl/m4/mbslen.m4])
+m4_include([ltdl/m4/mbstate_t.m4])
+m4_include([ltdl/m4/memchr.m4])
+m4_include([ltdl/m4/memmem.m4])
+m4_include([ltdl/m4/mkdtemp.m4])
+m4_include([ltdl/m4/mkstemp.m4])
+m4_include([ltdl/m4/mmap-anon.m4])
+m4_include([ltdl/m4/mode_t.m4])
+m4_include([ltdl/m4/multiarch.m4])
+m4_include([ltdl/m4/nl_langinfo.m4])
+m4_include([ltdl/m4/nls.m4])
+m4_include([ltdl/m4/nocrash.m4])
+m4_include([ltdl/m4/obstack-printf-posix.m4])
+m4_include([ltdl/m4/obstack-printf.m4])
+m4_include([ltdl/m4/open.m4])
+m4_include([ltdl/m4/pathmax.m4])
+m4_include([ltdl/m4/pipe.m4])
+m4_include([ltdl/m4/pipe2.m4])
+m4_include([ltdl/m4/po.m4])
+m4_include([ltdl/m4/posix_spawn.m4])
+m4_include([ltdl/m4/printf-frexp.m4])
+m4_include([ltdl/m4/printf-frexpl.m4])
+m4_include([ltdl/m4/printf.m4])
+m4_include([ltdl/m4/progtest.m4])
+m4_include([ltdl/m4/putenv.m4])
+m4_include([ltdl/m4/quote.m4])
+m4_include([ltdl/m4/quotearg.m4])
+m4_include([ltdl/m4/rawmemchr.m4])
+m4_include([ltdl/m4/readlink.m4])
+m4_include([ltdl/m4/regex.m4])
+m4_include([ltdl/m4/rename.m4])
+m4_include([ltdl/m4/rmdir.m4])
+m4_include([ltdl/m4/sched_h.m4])
+m4_include([ltdl/m4/setenv.m4])
+m4_include([ltdl/m4/sig_atomic_t.m4])
+m4_include([ltdl/m4/sigaction.m4])
+m4_include([ltdl/m4/signal_h.m4])
+m4_include([ltdl/m4/signalblocking.m4])
+m4_include([ltdl/m4/signbit.m4])
+m4_include([ltdl/m4/size_max.m4])
+m4_include([ltdl/m4/snprintf-posix.m4])
+m4_include([ltdl/m4/snprintf.m4])
+m4_include([ltdl/m4/spawn_h.m4])
+m4_include([ltdl/m4/sprintf-posix.m4])
+m4_include([ltdl/m4/ssize_t.m4])
+m4_include([ltdl/m4/stackovf.m4])
+m4_include([ltdl/m4/stat.m4])
+m4_include([ltdl/m4/stdarg.m4])
+m4_include([ltdl/m4/stdbool.m4])
+m4_include([ltdl/m4/stddef_h.m4])
+m4_include([ltdl/m4/stdint.m4])
+m4_include([ltdl/m4/stdint_h.m4])
+m4_include([ltdl/m4/stdio-safer.m4])
+m4_include([ltdl/m4/stdio_h.m4])
+m4_include([ltdl/m4/stdlib-safer.m4])
+m4_include([ltdl/m4/stdlib_h.m4])
+m4_include([ltdl/m4/strchrnul.m4])
+m4_include([ltdl/m4/strdup.m4])
+m4_include([ltdl/m4/strerror.m4])
+m4_include([ltdl/m4/string_h.m4])
+m4_include([ltdl/m4/strndup.m4])
+m4_include([ltdl/m4/strnlen.m4])
+m4_include([ltdl/m4/strtod.m4])
+m4_include([ltdl/m4/strtol.m4])
+m4_include([ltdl/m4/symlink.m4])
+m4_include([ltdl/m4/sys_stat_h.m4])
+m4_include([ltdl/m4/sys_time_h.m4])
+m4_include([ltdl/m4/sys_wait_h.m4])
+m4_include([ltdl/m4/tempname.m4])
+m4_include([ltdl/m4/time_h.m4])
+m4_include([ltdl/m4/tmpdir.m4])
+m4_include([ltdl/m4/ulonglong.m4])
+m4_include([ltdl/m4/ungetc.m4])
+m4_include([ltdl/m4/unistd-safer.m4])
+m4_include([ltdl/m4/unistd_h.m4])
+m4_include([ltdl/m4/unlocked-io.m4])
+m4_include([ltdl/m4/vasnprintf-posix.m4])
+m4_include([ltdl/m4/vasnprintf.m4])
+m4_include([ltdl/m4/vasprintf-posix.m4])
+m4_include([ltdl/m4/vasprintf.m4])
+m4_include([ltdl/m4/version-etc.m4])
+m4_include([ltdl/m4/vfprintf-posix.m4])
+m4_include([ltdl/m4/vprintf-posix.m4])
+m4_include([ltdl/m4/wait-process.m4])
+m4_include([ltdl/m4/warn-on-use.m4])
+m4_include([ltdl/m4/wchar.m4])
+m4_include([ltdl/m4/wchar_t.m4])
+m4_include([ltdl/m4/wcrtomb.m4])
+m4_include([ltdl/m4/wctob.m4])
+m4_include([ltdl/m4/wctype.m4])
+m4_include([ltdl/m4/wcwidth.m4])
+m4_include([ltdl/m4/wint_t.m4])
+m4_include([ltdl/m4/xalloc.m4])
+m4_include([ltdl/m4/xsize.m4])
+m4_include([ltdl/m4/xstrndup.m4])
+m4_include([ltdl/m4/xvasprintf.m4])
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
new file mode 100644
index 00000000..56286fce
--- /dev/null
+++ b/autom4te.cache/output.0
@@ -0,0 +1,45149 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.67 for GNU M4 1.9a.577-b3131-dirty.
+@%:@
+@%:@ Report bugs to <bug-m4@gnu.org>.
+@%:@
+@%:@
+@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+@%:@ Foundation, Inc.
+@%:@
+@%:@
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in @%:@(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in @%:@((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in @%:@(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+@%:@ as_fn_unset VAR
+@%:@ ---------------
+@%:@ Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+@%:@ as_fn_set_status STATUS
+@%:@ -----------------------
+@%:@ Set @S|@? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} @%:@ as_fn_set_status
+
+@%:@ as_fn_exit STATUS
+@%:@ -----------------
+@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} @%:@ as_fn_exit
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} @%:@ as_fn_mkdir_p
+@%:@ as_fn_append VAR VALUE
+@%:@ ----------------------
+@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
+@%:@ advantage of any shell optimizations that allow amortized linear growth over
+@%:@ repeated appends, instead of the typical quadratic growth present in naive
+@%:@ implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+@%:@ as_fn_arith ARG...
+@%:@ ------------------
+@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
+@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+@%:@ script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} @%:@ as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in @%:@(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in @%:@(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+lt_ltdl_dir='ltdl'
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='GNU M4'
+PACKAGE_TARNAME='m4'
+PACKAGE_VERSION='1.9a.577-b3131-dirty'
+PACKAGE_STRING='GNU M4 1.9a.577-b3131-dirty'
+PACKAGE_BUGREPORT='bug-m4@gnu.org'
+PACKAGE_URL='http://www.gnu.org/software/m4/'
+
+ac_unique_file="src/m4.h"
+ac_config_libobj_dir=gnu
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gt_needs=
+ac_func_list=
+ac_header_list=
+gl_getopt_required=POSIX
+ac_subst_vars='M4tests_LTLIBOBJS
+M4tests_LIBOBJS
+M4_LTLIBOBJS
+M4_LIBOBJS
+CONFIG_INCLUDE
+ltdl_LTLIBOBJS
+ltdl_LIBOBJS
+am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIB@&t@OBJS
+USE_GMP_FALSE
+USE_GMP_TRUE
+USE_GMP
+LIBADD_GMP
+STACKOVF_FALSE
+STACKOVF_TRUE
+INCLUDE_STDBOOL_H
+PERL
+INCLUDE_REGEX_H
+REGEX_H
+INCLUDE_OBSTACK_H
+OBSTACK_H
+GETOPT_FALSE
+GETOPT_TRUE
+GETOPT_H
+HAVE_GETOPT_H
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
+NEXT_GETOPT_H
+INCLUDE_ERROR_H
+ERROR_H
+LIBTESTS_LIBDEPS
+abs_aux_dir
+POSIX_SPAWN_PORTED_FALSE
+POSIX_SPAWN_PORTED_TRUE
+LOCALE_TR_UTF8
+REPLACE_ISWCNTRL
+WCTYPE_H
+HAVE_WCTYPE_H
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
+NEXT_WCTYPE_H
+HAVE_ISWCNTRL
+HAVE_WINT_T
+HAVE_WCHAR_H
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
+NEXT_WCHAR_H
+HAVE_UNISTD_H
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
+NEXT_UNISTD_H
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+TIME_H_DEFINES_STRUCT_TIMESPEC
+NEXT_AS_FIRST_DIRECTIVE_TIME_H
+NEXT_TIME_H
+REPLACE_TIMEGM
+REPLACE_STRPTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
+NEXT_SYS_WAIT_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+POW_LIB
+NEXT_AS_FIRST_DIRECTIVE_STRING_H
+NEXT_STRING_H
+HAVE_RANDOM_H
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
+NEXT_STDLIB_H
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H
+NEXT_STDIO_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+HAVE__BOOL
+STDBOOL_H
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H
+NEXT_STDARG_H
+STDARG_H
+HAVE_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
+NEXT_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+SCHED_H
+HAVE_STRUCT_SCHED_PARAM
+HAVE_SCHED_H
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H
+NEXT_SCHED_H
+REPLACE_POSIX_SPAWN
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T
+HAVE_POSIX_SPAWNATTR_T
+HAVE_POSIX_SPAWN
+GNULIB_POSIX_SPAWNATTR_DESTROY
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_SETPGROUP
+GNULIB_POSIX_SPAWNATTR_GETPGROUP
+GNULIB_POSIX_SPAWNATTR_SETFLAGS
+GNULIB_POSIX_SPAWNATTR_GETFLAGS
+GNULIB_POSIX_SPAWNATTR_INIT
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
+GNULIB_POSIX_SPAWNP
+GNULIB_POSIX_SPAWN
+UNDEFINE_STRTOK_R
+REPLACE_STRTOK_R
+REPLACE_STRSIGNAL
+REPLACE_STRNDUP
+REPLACE_STRERROR
+REPLACE_STRCASESTR
+REPLACE_STRSTR
+REPLACE_STRDUP
+REPLACE_MEMMEM
+REPLACE_MEMCHR
+HAVE_STRVERSCMP
+HAVE_DECL_STRSIGNAL
+HAVE_DECL_STRERROR
+HAVE_DECL_STRTOK_R
+HAVE_STRCASESTR
+HAVE_STRSEP
+HAVE_STRPBRK
+HAVE_DECL_STRNLEN
+HAVE_DECL_STRNDUP
+HAVE_DECL_STRDUP
+HAVE_STRCHRNUL
+HAVE_STPNCPY
+HAVE_STPCPY
+HAVE_RAWMEMCHR
+HAVE_DECL_MEMRCHR
+HAVE_MEMPCPY
+HAVE_DECL_MEMMEM
+HAVE_MBSLEN
+GNULIB_STRVERSCMP
+GNULIB_STRSIGNAL
+GNULIB_STRERROR
+GNULIB_MBSTOK_R
+GNULIB_MBSSEP
+GNULIB_MBSSPN
+GNULIB_MBSPBRK
+GNULIB_MBSCSPN
+GNULIB_MBSCASESTR
+GNULIB_MBSPCASECMP
+GNULIB_MBSNCASECMP
+GNULIB_MBSCASECMP
+GNULIB_MBSSTR
+GNULIB_MBSRCHR
+GNULIB_MBSCHR
+GNULIB_MBSNLEN
+GNULIB_MBSLEN
+GNULIB_STRTOK_R
+GNULIB_STRCASESTR
+GNULIB_STRSTR
+GNULIB_STRSEP
+GNULIB_STRPBRK
+GNULIB_STRNLEN
+GNULIB_STRNDUP
+GNULIB_STRDUP
+GNULIB_STRCHRNUL
+GNULIB_STPNCPY
+GNULIB_STPCPY
+GNULIB_RAWMEMCHR
+GNULIB_MEMRCHR
+GNULIB_MEMPCPY
+GNULIB_MEMMEM
+GNULIB_MEMCHR
+LOCALE_FR_UTF8
+LOCALE_ZH_CN
+LOCALE_JA
+NEXT_AS_FIRST_DIRECTIVE_MATH_H
+NEXT_MATH_H
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FCHMODAT
+LOCALCHARSET_TESTS_ENVIRONMENT
+GLIBC21
+HAVE_LANGINFO_ERA
+HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_H
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
+NEXT_LANGINFO_H
+REPLACE_NL_LANGINFO
+HAVE_NL_LANGINFO
+GNULIB_NL_LANGINFO
+UINT64_MAX_EQ_ULONG_MAX
+UINT32_MAX_LT_UINTMAX_MAX
+INT64_MAX_EQ_LONG_MAX
+INT32_MAX_LT_INTMAX_MAX
+PRIPTR_PREFIX
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
+NEXT_INTTYPES_H
+HAVE_DECL_STRTOUMAX
+HAVE_DECL_STRTOIMAX
+HAVE_DECL_IMAXDIV
+HAVE_DECL_IMAXABS
+GNULIB_STRTOUMAX
+GNULIB_STRTOIMAX
+GNULIB_IMAXDIV
+GNULIB_IMAXABS
+PRI_MACROS_BROKEN
+STDINT_H
+WINT_T_SUFFIX
+WCHAR_T_SUFFIX
+SIG_ATOMIC_T_SUFFIX
+SIZE_T_SUFFIX
+PTRDIFF_T_SUFFIX
+HAVE_SIGNED_WINT_T
+HAVE_SIGNED_WCHAR_T
+HAVE_SIGNED_SIG_ATOMIC_T
+BITSIZEOF_WINT_T
+BITSIZEOF_WCHAR_T
+BITSIZEOF_SIG_ATOMIC_T
+BITSIZEOF_SIZE_T
+BITSIZEOF_PTRDIFF_T
+APPLE_UNIVERSAL_BUILD
+HAVE_SYS_BITYPES_H
+HAVE_SYS_INTTYPES_H
+HAVE_STDINT_H
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H
+NEXT_STDINT_H
+HAVE_SYS_TYPES_H
+HAVE_INTTYPES_H
+HAVE_UNSIGNED_LONG_LONG_INT
+HAVE_LONG_LONG_INT
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H
+NEXT_ICONV_H
+ICONV_H
+REPLACE_ICONV_UTF
+REPLACE_ICONV_OPEN
+REPLACE_ICONV
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
+NEXT_SYS_TIME_H
+REPLACE_GETTIMEOFDAY
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+HAVE_GETTIMEOFDAY
+GNULIB_GETTIMEOFDAY
+REPLACE_TRUNCL
+REPLACE_SIGNBIT_USING_GCC
+REPLACE_SIGNBIT
+REPLACE_ROUNDL
+REPLACE_ROUNDF
+REPLACE_ROUND
+REPLACE_NAN
+REPLACE_LDEXPL
+REPLACE_ISNAN
+REPLACE_ISINF
+REPLACE_ISFINITE
+REPLACE_HUGE_VAL
+REPLACE_FREXPL
+REPLACE_FREXP
+REPLACE_FLOORL
+REPLACE_FLOORF
+REPLACE_CEILL
+REPLACE_CEILF
+HAVE_DECL_TRUNCF
+HAVE_DECL_TRUNC
+HAVE_DECL_TANL
+HAVE_DECL_SQRTL
+HAVE_DECL_SINL
+HAVE_DECL_LOGL
+HAVE_DECL_LDEXPL
+HAVE_DECL_FREXPL
+HAVE_DECL_EXPL
+HAVE_DECL_COSL
+HAVE_DECL_ATANL
+HAVE_DECL_ASINL
+HAVE_DECL_ACOSL
+HAVE_TANL
+HAVE_SQRTL
+HAVE_SINL
+HAVE_LOGL
+HAVE_ISNANL
+HAVE_ISNAND
+HAVE_ISNANF
+HAVE_EXPL
+HAVE_COSL
+HAVE_ATANL
+HAVE_ASINL
+HAVE_ACOSL
+GNULIB_TRUNCL
+GNULIB_TRUNCF
+GNULIB_TRUNC
+GNULIB_TANL
+GNULIB_SQRTL
+GNULIB_SINL
+GNULIB_SIGNBIT
+GNULIB_ROUNDL
+GNULIB_ROUNDF
+GNULIB_ROUND
+GNULIB_LOGL
+GNULIB_LDEXPL
+GNULIB_ISNANL
+GNULIB_ISNAND
+GNULIB_ISNANF
+GNULIB_ISNAN
+GNULIB_ISINF
+GNULIB_ISFINITE
+GNULIB_FREXPL
+GNULIB_FREXP
+GNULIB_FLOORL
+GNULIB_FLOORF
+GNULIB_EXPL
+GNULIB_COSL
+GNULIB_CEILL
+GNULIB_CEILF
+GNULIB_ATANL
+GNULIB_ASINL
+GNULIB_ACOSL
+FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
+NEXT_FLOAT_H
+REPLACE_VSPRINTF
+REPLACE_VSNPRINTF
+REPLACE_VPRINTF
+REPLACE_VFPRINTF
+REPLACE_VDPRINTF
+REPLACE_VASPRINTF
+REPLACE_STDIO_WRITE_FUNCS
+REPLACE_SPRINTF
+REPLACE_SNPRINTF
+REPLACE_RENAMEAT
+REPLACE_RENAME
+REPLACE_REMOVE
+REPLACE_PRINTF
+REPLACE_POPEN
+REPLACE_PERROR
+REPLACE_OBSTACK_PRINTF
+REPLACE_GETLINE
+REPLACE_GETDELIM
+REPLACE_FTELLO
+REPLACE_FTELL
+REPLACE_FSEEKO
+REPLACE_FSEEK
+REPLACE_FREOPEN
+REPLACE_FPURGE
+REPLACE_FPRINTF
+REPLACE_FOPEN
+REPLACE_FFLUSH
+REPLACE_FCLOSE
+REPLACE_DPRINTF
+HAVE_VDPRINTF
+HAVE_VASPRINTF
+HAVE_RENAMEAT
+HAVE_DPRINTF
+HAVE_DECL_VSNPRINTF
+HAVE_DECL_SNPRINTF
+HAVE_DECL_OBSTACK_PRINTF
+HAVE_DECL_GETLINE
+HAVE_DECL_GETDELIM
+HAVE_DECL_FPURGE
+GNULIB_VSPRINTF_POSIX
+GNULIB_VSNPRINTF
+GNULIB_VPRINTF_POSIX
+GNULIB_VPRINTF
+GNULIB_VFPRINTF_POSIX
+GNULIB_VFPRINTF
+GNULIB_VDPRINTF
+GNULIB_VASPRINTF
+GNULIB_STDIO_H_SIGPIPE
+GNULIB_SPRINTF_POSIX
+GNULIB_SNPRINTF
+GNULIB_RENAMEAT
+GNULIB_RENAME
+GNULIB_REMOVE
+GNULIB_PUTS
+GNULIB_PUTCHAR
+GNULIB_PUTC
+GNULIB_PRINTF_POSIX
+GNULIB_PRINTF
+GNULIB_POPEN
+GNULIB_PERROR
+GNULIB_OBSTACK_PRINTF_POSIX
+GNULIB_OBSTACK_PRINTF
+GNULIB_GETLINE
+GNULIB_GETDELIM
+GNULIB_FWRITE
+GNULIB_FTELLO
+GNULIB_FTELL
+GNULIB_FSEEKO
+GNULIB_FSEEK
+GNULIB_FREOPEN
+GNULIB_FPUTS
+GNULIB_FPUTC
+GNULIB_FPURGE
+GNULIB_FPRINTF_POSIX
+GNULIB_FPRINTF
+GNULIB_FOPEN
+GNULIB_FFLUSH
+GNULIB_FCLOSE
+GNULIB_DPRINTF
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
+NEXT_FCNTL_H
+REPLACE_OPENAT
+REPLACE_OPEN
+REPLACE_FCNTL
+HAVE_OPENAT
+HAVE_FCNTL
+GNULIB_OPENAT
+GNULIB_OPEN
+GNULIB_FCNTL
+EOVERFLOW_VALUE
+EOVERFLOW_HIDDEN
+ENOLINK_VALUE
+ENOLINK_HIDDEN
+EMULTIHOP_VALUE
+EMULTIHOP_HIDDEN
+ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
+NEXT_ERRNO_H
+PRAGMA_SYSTEM_HEADER
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+INCLUDE_NEXT
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+UNISTD_H_HAVE_WINSOCK2_H
+REPLACE_WRITE
+REPLACE_USLEEP
+REPLACE_UNLINKAT
+REPLACE_UNLINK
+REPLACE_SYMLINK
+REPLACE_SLEEP
+REPLACE_RMDIR
+REPLACE_READLINK
+REPLACE_PREAD
+REPLACE_LSEEK
+REPLACE_LINKAT
+REPLACE_LINK
+REPLACE_LCHOWN
+REPLACE_GETPAGESIZE
+REPLACE_GETGROUPS
+REPLACE_GETCWD
+REPLACE_FCHOWNAT
+REPLACE_FCHDIR
+REPLACE_DUP2
+REPLACE_DUP
+REPLACE_CLOSE
+REPLACE_CHOWN
+HAVE_USLEEP
+HAVE_UNLINKAT
+HAVE_SYS_PARAM_H
+HAVE_OS_H
+HAVE_DECL_GETLOGIN_R
+HAVE_DECL_ENVIRON
+HAVE_SYMLINKAT
+HAVE_SYMLINK
+HAVE_SLEEP
+HAVE_READLINKAT
+HAVE_READLINK
+HAVE_PREAD
+HAVE_PIPE2
+HAVE_LINKAT
+HAVE_LINK
+HAVE_LCHOWN
+HAVE_GETUSERSHELL
+HAVE_GETPAGESIZE
+HAVE_GETLOGIN
+HAVE_GETHOSTNAME
+HAVE_GETGROUPS
+HAVE_GETDTABLESIZE
+HAVE_GETDOMAINNAME
+HAVE_FTRUNCATE
+HAVE_FSYNC
+HAVE_FCHOWNAT
+HAVE_FACCESSAT
+HAVE_EUIDACCESS
+HAVE_DUP3
+HAVE_DUP2
+HAVE_CHOWN
+GNULIB_WRITE
+GNULIB_USLEEP
+GNULIB_UNLINKAT
+GNULIB_UNLINK
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_UNISTD_H_GETOPT
+GNULIB_SYMLINKAT
+GNULIB_SYMLINK
+GNULIB_SLEEP
+GNULIB_RMDIR
+GNULIB_READLINKAT
+GNULIB_READLINK
+GNULIB_PREAD
+GNULIB_PIPE2
+GNULIB_LSEEK
+GNULIB_LINKAT
+GNULIB_LINK
+GNULIB_LCHOWN
+GNULIB_GETUSERSHELL
+GNULIB_GETPAGESIZE
+GNULIB_GETLOGIN_R
+GNULIB_GETLOGIN
+GNULIB_GETHOSTNAME
+GNULIB_GETGROUPS
+GNULIB_GETDTABLESIZE
+GNULIB_GETDOMAINNAME
+GNULIB_GETCWD
+GNULIB_FTRUNCATE
+GNULIB_FSYNC
+GNULIB_FCHOWNAT
+GNULIB_FCHDIR
+GNULIB_FACCESSAT
+GNULIB_EUIDACCESS
+GNULIB_ENVIRON
+GNULIB_DUP3
+GNULIB_DUP2
+GNULIB_CLOSE
+GNULIB_CHOWN
+REPLACE_UNSETENV
+REPLACE_STRTOD
+REPLACE_SETENV
+REPLACE_REALPATH
+REPLACE_PUTENV
+REPLACE_MKSTEMP
+REPLACE_CANONICALIZE_FILE_NAME
+HAVE_UNSETENV
+HAVE_SYS_LOADAVG_H
+HAVE_STRUCT_RANDOM_DATA
+HAVE_STRTOULL
+HAVE_STRTOLL
+HAVE_STRTOD
+HAVE_SETENV
+HAVE_RPMATCH
+HAVE_REALPATH
+HAVE_REALLOC_POSIX
+HAVE_RANDOM_R
+HAVE_MKSTEMPS
+HAVE_MKOSTEMPS
+HAVE_MKOSTEMP
+HAVE_MKDTEMP
+HAVE_MALLOC_POSIX
+HAVE_GETSUBOPT
+HAVE_DECL_GETLOADAVG
+HAVE_CANONICALIZE_FILE_NAME
+HAVE_CALLOC_POSIX
+HAVE_ATOLL
+GNULIB_UNSETENV
+GNULIB_STRTOULL
+GNULIB_STRTOLL
+GNULIB_STRTOD
+GNULIB_SETENV
+GNULIB_RPMATCH
+GNULIB_REALPATH
+GNULIB_REALLOC_POSIX
+GNULIB_RANDOM_R
+GNULIB_PUTENV
+GNULIB_MKSTEMPS
+GNULIB_MKSTEMP
+GNULIB_MKOSTEMPS
+GNULIB_MKOSTEMP
+GNULIB_MKDTEMP
+GNULIB_MALLOC_POSIX
+GNULIB_GETSUBOPT
+GNULIB_GETLOADAVG
+GNULIB_CANONICALIZE_FILE_NAME
+GNULIB_CALLOC_POSIX
+GNULIB_ATOLL
+LOCALE_FR
+REPLACE_WCWIDTH
+REPLACE_WCSNRTOMBS
+REPLACE_WCSRTOMBS
+REPLACE_WCRTOMB
+REPLACE_MBSNRTOWCS
+REPLACE_MBSRTOWCS
+REPLACE_MBRLEN
+REPLACE_MBRTOWC
+REPLACE_MBSINIT
+REPLACE_WCTOB
+REPLACE_BTOWC
+REPLACE_MBSTATE_T
+HAVE_DECL_WCWIDTH
+HAVE_DECL_WCTOB
+HAVE_WCSNRTOMBS
+HAVE_WCSRTOMBS
+HAVE_WCRTOMB
+HAVE_MBSNRTOWCS
+HAVE_MBSRTOWCS
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBSINIT
+HAVE_BTOWC
+GNULIB_WCWIDTH
+GNULIB_WCSNRTOMBS
+GNULIB_WCSRTOMBS
+GNULIB_WCRTOMB
+GNULIB_MBSNRTOWCS
+GNULIB_MBSRTOWCS
+GNULIB_MBRLEN
+GNULIB_MBRTOWC
+GNULIB_MBSINIT
+GNULIB_WCTOB
+GNULIB_BTOWC
+ALLOCA_H
+ALLOCA
+LTALLOCA
+GL_COND_LIBTOOL_FALSE
+GL_COND_LIBTOOL_TRUE
+GETTEXT_H
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+LTLIBICONV
+LIBICONV
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+PREOPEN_DEPENDENCIES
+DLPREOPEN
+DYNAMIC_MODULES
+LTDLOPEN
+LT_CONFIG_H
+CONVENIENCE_LTDL_FALSE
+CONVENIENCE_LTDL_TRUE
+INSTALL_LTDL_FALSE
+INSTALL_LTDL_TRUE
+ARGZ_H
+sys_symbol_underscore
+LIBADD_DL
+LT_DLPREOPEN
+LIBADD_DLD_LINK
+LIBADD_SHL_LOAD
+LIBADD_DLOPEN
+LT_DLLOADERS
+INCLTDL
+LTDLINCL
+LTDLDEPS
+LIBLTDL
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+SED
+EGREP
+GREP
+CPP
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+RANLIB
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_largefile
+enable_debug
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_included_ltdl
+with_ltdl_include
+with_ltdl_lib
+enable_ltdl_install
+with_modules
+enable_nls
+enable_rpath
+with_libiconv_prefix
+with_libintl_prefix
+enable_assert
+with_included_regex
+with_packager
+with_packager_version
+with_packager_bug_reports
+with_included_obstack
+with_dmalloc
+with_gmp
+with_syscmd_shell
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures GNU M4 1.9a.577-b3131-dirty to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ @<:@@S|@ac_default_prefix@:>@
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ @<:@PREFIX@:>@
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/m4@:>@
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of GNU M4 1.9a.577-b3131-dirty:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-largefile omit support for large files
+ --enable-debug build for debugging @<:@default=no@:>@
+ --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=no@:>@
+ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@
+ --enable-fast-install@<:@=PKGS@:>@
+ optimize for fast installation @<:@default=yes@:>@
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-ltdl-install install libltdl
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-assert turn off assertions
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects @<:@default=use
+ both@:>@
+ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@
+ --with-included-ltdl use the GNU ltdl sources included here
+ --with-ltdl-include=DIR use the ltdl headers installed in DIR
+ --with-ltdl-lib=DIR use the libltdl.la installed in DIR
+ --with-modules=MODULES preload MODULES @<:@default: m4 traditional gnu@:>@
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+ --without-included-regex
+ don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).
+ --with-packager String identifying the packager of this software
+ --with-packager-version Packager-specific version information
+ --with-packager-bug-reports
+ Packager info for bug reports (URL/e-mail/...)
+ --with-included-obstack use the obstack implementation included here
+ --with-dmalloc use dmalloc, as in
+ http://www.dmalloc.com/dmalloc.tar.gz
+ --without-gmp don't use GNU multiple precision arithmetic library
+ --with-syscmd-shell shell used by syscmd @<:@/bin/sh@:>@
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+GNU M4 configure 1.9a.577-b3131-dirty
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+@%:@ ac_fn_c_try_compile LINENO
+@%:@ --------------------------
+@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_compile
+
+@%:@ ac_fn_c_try_cpp LINENO
+@%:@ ----------------------
+@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_cpp
+
+@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+@%:@ -------------------------------------------------------
+@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using
+@%:@ the include files in INCLUDES and setting the cache variable VAR
+@%:@ accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------- ##
+## Report this to bug-m4@gnu.org ##
+## ----------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_header_mongrel
+
+@%:@ ac_fn_c_try_run LINENO
+@%:@ ----------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes
+@%:@ that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_run
+
+@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+@%:@ -------------------------------------------------------
+@%:@ Tests whether HEADER exists and can be compiled using the include files in
+@%:@ INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_header_compile
+
+@%:@ ac_fn_c_try_link LINENO
+@%:@ -----------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_link
+
+@%:@ ac_fn_c_check_func LINENO FUNC VAR
+@%:@ ----------------------------------
+@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_func
+
+@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+@%:@ ---------------------------------------------
+@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+@%:@ accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+@%:@ifndef $as_decl_name
+@%:@ifdef __cplusplus
+ (void) $as_decl_use;
+@%:@else
+ (void) $as_decl_name;
+@%:@endif
+@%:@endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_decl
+
+@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+@%:@ -------------------------------------------
+@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache
+@%:@ variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_type
+
+@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+@%:@ --------------------------------------------
+@%:@ Tries to find the compile-time value of EXPR in a program that includes
+@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be
+@%:@ computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in @%:@((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_compute_int
+
+@%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+@%:@ ----------------------------------------------------
+@%:@ Tries to find if the field MEMBER exists in type AGGR, after including
+@%:@ INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval "test \"\${$4+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in @%:@((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+gt_needs="$gt_needs need-formatstring-macros"
+as_fn_append ac_func_list " btowc"
+as_fn_append ac_func_list " canonicalize_file_name"
+as_fn_append ac_func_list " getcwd"
+as_fn_append ac_func_list " readlink"
+as_fn_append ac_func_list " realpath"
+as_fn_append ac_header_list " sys/param.h"
+as_fn_append ac_func_list " dup2"
+as_fn_append ac_header_list " errno.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_func_list " fcntl"
+as_fn_append ac_header_list " fcntl.h"
+as_fn_append ac_func_list " mempcpy"
+as_fn_append ac_header_list " float.h"
+as_fn_append ac_header_list " stdio_ext.h"
+as_fn_append ac_func_list " __fpending"
+as_fn_append ac_func_list " fpurge"
+as_fn_append ac_func_list " __fpurge"
+as_fn_append ac_func_list " __freading"
+as_fn_append ac_func_list " getdtablesize"
+as_fn_append ac_header_list " sys/time.h"
+as_fn_append ac_func_list " gettimeofday"
+as_fn_append ac_header_list " iconv.h"
+as_fn_append ac_header_list " stdint.h"
+as_fn_append ac_header_list " wchar.h"
+as_fn_append ac_header_list " inttypes.h"
+as_fn_append ac_header_list " langinfo.h"
+as_fn_append ac_func_list " lstat"
+as_fn_append ac_header_list " math.h"
+as_fn_append ac_func_list " mbsinit"
+as_fn_append ac_func_list " mbrtowc"
+as_fn_append ac_func_list " mbslen"
+as_fn_append ac_header_list " sys/mman.h"
+as_fn_append ac_func_list " mprotect"
+as_fn_append ac_func_list " nl_langinfo"
+as_fn_append ac_func_list " obstack_printf"
+as_fn_append ac_func_list " vasnprintf"
+as_fn_append ac_func_list " pathconf"
+as_fn_append ac_func_list " pipe2"
+as_fn_append ac_func_list " posix_spawn"
+gl_printf_safe=yes
+as_fn_append ac_header_list " locale.h"
+as_fn_append ac_func_list " isblank"
+as_fn_append ac_func_list " iswctype"
+as_fn_append ac_func_list " wcscoll"
+as_fn_append ac_header_list " sched.h"
+as_fn_append ac_func_list " setenv"
+as_fn_append ac_func_list " sigaction"
+as_fn_append ac_func_list " sigaltstack"
+as_fn_append ac_func_list " siginterrupt"
+as_fn_append ac_header_list " signal.h"
+as_fn_append ac_header_list " spawn.h"
+as_fn_append ac_header_list " stdarg.h"
+as_fn_append ac_header_list " stddef.h"
+as_fn_append ac_header_list " stdio.h"
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_header_list " string.h"
+as_fn_append ac_func_list " strndup"
+as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_header_list " sys/wait.h"
+as_fn_append ac_header_list " time.h"
+as_fn_append ac_func_list " pipe"
+as_fn_append ac_func_list " wcrtomb"
+as_fn_append ac_func_list " iswcntrl"
+as_fn_append ac_header_list " wctype.h"
+as_fn_append ac_func_list " wcwidth"
+as_fn_append ac_func_list " link"
+as_fn_append ac_func_list " symlink"
+as_fn_append ac_func_list " wctob"
+M4_replace_getopt=
+gl_getopt_required=GNU
+as_fn_append ac_header_list " getopt.h"
+as_fn_append ac_header_list " limits.h"
+as_fn_append ac_func_list " calloc"
+as_fn_append ac_func_list " strerror"
+as_fn_append ac_header_list " siginfo.h"
+as_fn_append ac_func_list " sigstack"
+as_fn_append ac_func_list " sigvec"
+as_fn_append ac_func_list " gethostname"
+as_fn_append ac_func_list " mktime"
+as_fn_append ac_func_list " uname"
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+ac_config_commands="$ac_config_commands tests/atconfig"
+
+ac_config_headers="$ac_config_headers gnu/config.h:gnu/config.hin"
+
+ac_config_files="$ac_config_files tests/m4"
+
+
+
+## -------------------------- ##
+## M4 specific configuration. ##
+## -------------------------- ##
+
+
+
+M4_default_preload="m4 traditional gnu"
+
+
+## ------------------------ ##
+## Automake Initialization. ##
+## ------------------------ ##
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in @%:@((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+@%:@ Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='m4'
+ VERSION='1.9a.577-b3131-dirty'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+## ------------------ ##
+## C compiler checks. ##
+## ------------------ ##
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $@%:@ != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+@%:@ Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "@%:@define _MINIX 1" >>confdefs.h
+
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+$as_echo "@%:@define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "@%:@define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+
+
+ # IEEE behaviour is the default on all CPUs except Alpha and SH
+ # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+ # and the GCC 4.1.2 manual).
+ case "$host_cpu" in
+ alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+ sh*)
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+ esac
+
+ case $ac_cv_prog_cc_stdc in @%:@(
+ no) :
+ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; @%:@(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_cv_prog_cc_stdc=no
+fi
+
+fi
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+ if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+
+ case $ac_cv_prog_cc_stdc in @%:@(
+ no) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; @%:@(
+ '') :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; @%:@(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+ if test -z "$AB_PACKAGE"; then
+ AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
+$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
+
+ if test -z "$AB_VERSION"; then
+ AB_VERSION=${PACKAGE_VERSION:-$VERSION}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
+$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
+
+ hostname=`hostname`
+ if test "$hostname"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
+$as_echo "$as_me: autobuild hostname... $hostname" >&6;}
+ fi
+
+
+
+ date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
+$as_echo "$as_me: autobuild timestamp... $date" >&6;}
+ fi
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _FILE_OFFSET_BITS 64
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _LARGE_FILES 1
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation debug mode" >&5
+$as_echo_n "checking for compilation debug mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_debug-no}" >&5
+$as_echo "${enable_debug-no}" >&6; }
+
+: ${rm=rm -f}
+: ${RM=rm -f}
+
+set dummy $CC
+compiler="${compiler-$2}"
+test -n "$rm" || rm="rm -f"
+
+if test "X$enable_debug" = Xyes; then
+ @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=no
+fi
+
+
+
+
+
+
+
+
+
+
+$as_echo "@%:@define DEBUG 1" >>confdefs.h
+
+ M4_default_preload="m4 traditional gnu load \
+import modtest mpeval shadow stdlib time"
+ if test "$GCC" = yes; then
+ case "$CFLAGS" in
+ *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[^ ]* / /;s/-O[^ ]*$//'` ;;
+ esac
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -ggdb3" >&5
+$as_echo_n "checking if $compiler accepts -ggdb3... " >&6; }
+if test "${M4_cv_prog_compiler_ggdb3+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_ggdb3=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-ggdb3 -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_ggdb3=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_ggdb3" >&5
+$as_echo "$M4_cv_prog_compiler_ggdb3" >&6; }
+
+if test x"$M4_cv_prog_compiler_ggdb3" = xyes; then
+ CFLAGS="$CFLAGS -ggdb3"
+else
+ CFLAGS="$CFLAGS -g"
+fi
+
+ ;;
+ esac
+ CFLAGS="$CFLAGS -Wall"
+ WMORE="-Wshadow -Wpointer-arith -Wcast-align -Wnested-externs"
+ WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Winline"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts $WMORE" >&5
+$as_echo_n "checking if $compiler accepts $WMORE... " >&6; }
+if test "${M4_cv_prog_compiler_warning_flags+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_warning_flags=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$WMORE -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_warning_flags=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_warning_flags" >&5
+$as_echo "$M4_cv_prog_compiler_warning_flags" >&6; }
+
+if test x"$M4_cv_prog_compiler_warning_flags" = xyes; then
+ CFLAGS="$CFLAGS $WMORE"
+else
+ :
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -Wno-long-long" >&5
+$as_echo_n "checking if $compiler accepts -Wno-long-long... " >&6; }
+if test "${M4_cv_prog_compiler_wnolonglong+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_wnolonglong=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-Wno-long-long -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_wnolonglong=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_wnolonglong" >&5
+$as_echo "$M4_cv_prog_compiler_wnolonglong" >&6; }
+
+if test x"$M4_cv_prog_compiler_wnolonglong" = xyes; then
+ CFLAGS="$CFLAGS -Wno-long-long"
+else
+ :
+fi
+
+ else
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) CFLAGS="$CFLAGS -g" ;;
+ esac
+ fi
+else
+ @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+ case "$CFLAGS" in
+ *-g* ) CFLAGS=`echo "$CFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+ case "$CXXFLAGS" in
+ *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+fi
+
+
+
+## ----------------------- ##
+## Libtool initialization. ##
+## ----------------------- ##
+
+
+
+
+
+
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:__oline__: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line __oline__ "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+@%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+enable_dlopen=yes
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+
+ @%:@ Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ @%:@ Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which extension is used for runtime loadable modules" >&5
+$as_echo_n "checking which extension is used for runtime loadable modules... " >&6; }
+if test "${libltdl_cv_shlibext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5
+$as_echo "$libltdl_cv_shlibext" >&6; }
+if test -n "$libltdl_cv_shlibext"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_MODULE_EXT "$libltdl_cv_shlibext"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variable specifies run-time module search path" >&5
+$as_echo_n "checking which variable specifies run-time module search path... " >&6; }
+if test "${lt_cv_module_path_var+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_module_path_var="$shlibpath_var"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_module_path_var" >&5
+$as_echo "$lt_cv_module_path_var" >&6; }
+if test -n "$lt_cv_module_path_var"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_MODULE_PATH_VAR "$lt_cv_module_path_var"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default library search path" >&5
+$as_echo_n "checking for the default library search path... " >&6; }
+if test "${lt_cv_sys_dlsearch_path+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlsearch_path" >&5
+$as_echo "$lt_cv_sys_dlsearch_path" >&6; }
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_DLSEARCH_PATH "$sys_dlsearch_path"
+_ACEOF
+
+fi
+
+
+LT_DLLOADERS=
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+LIBADD_DLOPEN=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
+int
+main ()
+{
+dlopen(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ for ac_func in dlerror
+do :
+ ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror"
+if test "x$ac_cv_func_dlerror" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DLERROR 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$lt_save_LIBS"
+fi
+
+
+LIBADD_SHL_LOAD=
+ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"
+fi
+
+fi
+
+
+
+case $host_os in
+darwin[1567].*)
+# We only want this for pre-Mac OS X 10.4.
+ ac_fn_c_check_func "$LINENO" "_dyld_func_lookup" "ac_cv_func__dyld_func_lookup"
+if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then :
+
+$as_echo "@%:@define HAVE_DYLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"
+fi
+
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+"
+if test "x$ac_cv_have_decl_cygwin_conv_path" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_CYGWIN_CONV_PATH $ac_have_decl
+_ACEOF
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+
+$as_echo "@%:@define HAVE_DLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"
+fi
+
+
+
+
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+
+$as_echo "@%:@define HAVE_LIBDLLOADER 1" >>confdefs.h
+
+fi
+
+
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5
+$as_echo_n "checking for _ prefix in compiled symbols... " >&6; }
+if test "${lt_cv_sys_symbol_underscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&5
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ rm -rf conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5
+$as_echo "$lt_cv_sys_symbol_underscore" >&6; }
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+
+
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to add an underscore for dlsym" >&5
+$as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; }
+if test "${libltdl_cv_need_uscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ if test "$cross_compiling" = yes; then :
+ libltdl_cv_need_uscore=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;;
+ x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;;
+ x$lt_dlunknown|x*) ;;
+ esac
+ else :
+ # compilation failed
+
+ fi
+fi
+rm -fr conftest*
+
+ LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_need_uscore" >&5
+$as_echo "$libltdl_cv_need_uscore" >&6; }
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+
+$as_echo "@%:@define NEED_USCORE 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether deplibs are loaded by dlopen" >&5
+$as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; }
+if test "${lt_cv_sys_dlopen_deplibs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[4-9]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[12345]*|irix6.[01]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[1234]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlopen_deplibs" >&5
+$as_echo "$lt_cv_sys_dlopen_deplibs" >&6; }
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+
+$as_echo "@%:@define LTDL_DLOPEN_DEPLIBS 1" >>confdefs.h
+
+fi
+
+:
+
+for ac_header in argz.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_argz_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ARGZ_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
+# include <argz.h>
+#endif
+"
+if test "x$ac_cv_type_error_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ERROR_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define error_t int" >>confdefs.h
+
+
+$as_echo "@%:@define __error_t_defined 1" >>confdefs.h
+
+fi
+
+
+ARGZ_H=
+for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \
+ argz_next argz_stringify
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ARGZ_H=argz.h;
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+done
+
+
+if test -z "$ARGZ_H"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if argz actually works" >&5
+$as_echo_n "checking if argz actually works... " >&6; }
+if test "${lt_cv_sys_argz_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host_os in #(
+ *cygwin*)
+ lt_cv_sys_argz_works=no
+ if test "$cross_compiling" != no; then
+ lt_cv_sys_argz_works="guessing no"
+ else
+ lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+ save_IFS=$IFS
+ IFS=-.
+ set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+ IFS=$save_IFS
+ lt_os_major=${2-0}
+ lt_os_minor=${3-0}
+ lt_os_micro=${4-0}
+ if test "$lt_os_major" -gt 1 \
+ || { test "$lt_os_major" -eq 1 \
+ && { test "$lt_os_minor" -gt 5 \
+ || { test "$lt_os_minor" -eq 5 \
+ && test "$lt_os_micro" -gt 24; }; }; }; then
+ lt_cv_sys_argz_works=yes
+ fi
+ fi
+ ;; #(
+ *) lt_cv_sys_argz_works=yes ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5
+$as_echo "$lt_cv_sys_argz_works" >&6; }
+ if test $lt_cv_sys_argz_works = yes; then :
+
+$as_echo "@%:@define HAVE_WORKING_ARGZ 1" >>confdefs.h
+
+else
+ ARGZ_H=argz.h
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool supports -dlopen/-dlpreopen" >&5
+$as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; }
+if test "${libltdl_cv_preloaded_symbols+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$lt_cv_sys_global_symbol_pipe"; then
+ libltdl_cv_preloaded_symbols=yes
+ else
+ libltdl_cv_preloaded_symbols=no
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_preloaded_symbols" >&5
+$as_echo "$libltdl_cv_preloaded_symbols" >&6; }
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+
+$as_echo "@%:@define HAVE_PRELOADED_SYMBOLS 1" >>confdefs.h
+
+fi
+
+# Set options
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-included_ltdl was given.
+if test "${with_included_ltdl+set}" = set; then :
+ withval=$with_included_ltdl;
+fi
+
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default
+
+"
+if test "x$ac_cv_header_ltdl_h" = x""yes; then :
+ ac_fn_c_check_decl "$LINENO" "lt_dlinterface_register" "ac_cv_have_decl_lt_dlinterface_register" "$ac_includes_default
+ #include <ltdl.h>
+"
+if test "x$ac_cv_have_decl_lt_dlinterface_register" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dladvise_preload in -lltdl" >&5
+$as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dladvise_preload+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dladvise_preload ();
+int
+main ()
+{
+return lt_dladvise_preload ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dladvise_preload=yes
+else
+ ac_cv_lib_ltdl_lt_dladvise_preload=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = x""yes; then :
+ with_included_ltdl=no
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+
+fi
+
+
+
+
+@%:@ Check whether --with-ltdl_include was given.
+if test "${with_ltdl_include+set}" = set; then :
+ withval=$with_ltdl_include;
+fi
+
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ as_fn_error $? "invalid ltdl include directory: \`$with_ltdl_include'" "$LINENO" 5
+ fi
+else
+ with_ltdl_include=no
+fi
+
+
+@%:@ Check whether --with-ltdl_lib was given.
+if test "${with_ltdl_lib+set}" = set; then :
+ withval=$with_ltdl_lib;
+fi
+
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ as_fn_error $? "invalid ltdl library directory: \`$with_ltdl_lib'" "$LINENO" 5
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ case $enable_ltdl_convenience in
+ no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+esac
+LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+LTDLDEPS=$LIBLTDL
+LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+
+
+
+
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+
+
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+
+$as_echo "@%:@define HAVE_LTDL 1" >>confdefs.h
+
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ as_fn_error $? "\`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" "$LINENO" 5
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl headers" >&5
+$as_echo_n "checking where to find libltdl headers... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LTDLINCL" >&5
+$as_echo "$LTDLINCL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl library" >&5
+$as_echo_n "checking where to find libltdl library... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLTDL" >&5
+$as_echo "$LIBLTDL" >&6; }
+
+
+
+@%:@ Check whether --enable-ltdl-install was given.
+if test "${enable_ltdl_install+set}" = set; then :
+ enableval=$enable_ltdl_install;
+fi
+
+
+case ,${enable_ltdl_install},${enable_ltdl_convenience} in
+ *yes*) ;;
+ *) enable_ltdl_convenience=yes ;;
+esac
+
+ if test x"${enable_ltdl_install-no}" != xno; then
+ INSTALL_LTDL_TRUE=
+ INSTALL_LTDL_FALSE='#'
+else
+ INSTALL_LTDL_TRUE='#'
+ INSTALL_LTDL_FALSE=
+fi
+
+ if test x"${enable_ltdl_convenience-no}" != xno; then
+ CONVENIENCE_LTDL_TRUE=
+ CONVENIENCE_LTDL_FALSE='#'
+else
+ CONVENIENCE_LTDL_TRUE='#'
+ CONVENIENCE_LTDL_FALSE=
+fi
+
+
+
+
+
+
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+
+
+
+for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in closedir opendir readdir
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext"
+
+fi
+done
+
+for ac_func in strlcat strlcpy
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext"
+
+fi
+done
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_LIBEXT "$libext"
+_ACEOF
+
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+
+
+
+
+
+
+
+
+# Only expand once:
+
+
+
+# The lt_dlhandle_iterate symbol was added with libtool-2.2
+if test "x$with_included_ltdl" != "xyes"; then
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS $LTDLINCL"
+ LDFLAGS="$LDFLAGS $LIBLTDL"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlhandle_iterate in -lltdl" >&5
+$as_echo_n "checking for lt_dlhandle_iterate in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dlhandle_iterate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dlhandle_iterate ();
+int
+main ()
+{
+return lt_dlhandle_iterate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=yes
+else
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlhandle_iterate" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlhandle_iterate" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlhandle_iterate" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBLTDL 1
+_ACEOF
+
+ LIBS="-lltdl $LIBS"
+
+else
+ as_fn_error $? "installed libltdl is too old" "$LINENO" 5
+fi
+
+ LDFLAGS="$save_LDFLAGS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+
+# Use gcc's -pipe option if available: for faster compilation.
+case "$CFLAGS" in
+ *-pipe* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -pipe" >&5
+$as_echo_n "checking if $compiler supports -pipe... " >&6; }
+if test "${M4_cv_prog_compiler_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_pipe=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-pipe -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_pipe=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_pipe" >&5
+$as_echo "$M4_cv_prog_compiler_pipe" >&6; }
+
+if test x"$M4_cv_prog_compiler_pipe" = xyes; then
+ CFLAGS="$CFLAGS -pipe"
+else
+ :
+fi
+
+ ;;
+esac
+
+## ------------------------------- ##
+## Preloaded module configuration. ##
+## ------------------------------- ##
+if test "x$enable_shared" != xno; then :
+ DYNAMIC_MODULES=yes
+else
+ DYNAMIC_MODULES=no
+fi
+DYNAMIC_MODULES=$DYNAMIC_MODULES
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for modules to preload" >&5
+$as_echo_n "checking for modules to preload... " >&6; }
+ DLPREOPEN=
+
+
+@%:@ Check whether --with-modules was given.
+if test "${with_modules+set}" = set; then :
+ withval=$with_modules; use_modules="$withval"
+else
+ use_modules="$M4_default_preload"
+fi
+
+
+ PREOPEN_DEPENDENCIES=
+ DLPREOPEN="-dlpreopen force"
+ if test -z "$use_modules"; then
+ use_modules=none
+ else
+ if test "$use_modules" != yes; then
+ for module in $use_modules; do
+ case $module in
+ no|none) break ;;
+ m4|traditional|gnu|load|mpeval) dir=modules ;;
+ import|modtest|shadow|stdlib|time) dir=tests ;;
+ *) as_fn_error $? "Unrecognized module \`$module' in --with-modules" "$LINENO" 5
+ ;;
+ esac
+ DLPREOPEN="$DLPREOPEN -dlpreopen $dir/$module.la"
+ PREOPEN_DEPENDENCIES="$PREOPEN_DEPENDENCIES $dir/$module.la"
+ done
+ fi
+ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_modules" >&5
+$as_echo "$use_modules" >&6; }
+
+
+
+
+## ---------------- ##
+## Gettext support. ##
+## ---------------- ##
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ @%:@ Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$localedir" || localedir='${datadir}/locale'
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ @%:@ Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if test "${gl_cv_solaris_64bit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+ gl_cv_solaris_64bit=yes
+else
+ gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "@%:@define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "@%:@define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libc=yes"
+else
+ eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "@%:@define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ HAVE_LIBINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libintl=yes"
+else
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ fi
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+$as_echo "@%:@define ENABLE_NLS 1" >>confdefs.h
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+
+$as_echo "@%:@define HAVE_DCGETTEXT 1" >>confdefs.h
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+for ac_header in gettext.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gettext.h" "ac_cv_header_gettext_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gettext_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETTEXT_H 1
+_ACEOF
+ GETTEXT_H=""
+else
+ GETTEXT_H="gettext.h"
+fi
+
+done
+
+
+
+ac_config_files="$ac_config_files po/Makefile.in"
+
+
+
+
+
+## --------------- ##
+## Gnulib support. ##
+## --------------- ##
+
+
+
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+
+
+
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "@%:@define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+@%:@define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+ GNULIB_BTOWC=0;
+ GNULIB_WCTOB=0;
+ GNULIB_MBSINIT=0;
+ GNULIB_MBRTOWC=0;
+ GNULIB_MBRLEN=0;
+ GNULIB_MBSRTOWCS=0;
+ GNULIB_MBSNRTOWCS=0;
+ GNULIB_WCRTOMB=0;
+ GNULIB_WCSRTOMBS=0;
+ GNULIB_WCSNRTOMBS=0;
+ GNULIB_WCWIDTH=0;
+ HAVE_BTOWC=1;
+ HAVE_MBSINIT=1;
+ HAVE_MBRTOWC=1;
+ HAVE_MBRLEN=1;
+ HAVE_MBSRTOWCS=1;
+ HAVE_MBSNRTOWCS=1;
+ HAVE_WCRTOMB=1;
+ HAVE_WCSRTOMBS=1;
+ HAVE_WCSNRTOMBS=1;
+ HAVE_DECL_WCTOB=1;
+ HAVE_DECL_WCWIDTH=1;
+ REPLACE_MBSTATE_T=0;
+ REPLACE_BTOWC=0;
+ REPLACE_WCTOB=0;
+ REPLACE_MBSINIT=0;
+ REPLACE_MBRTOWC=0;
+ REPLACE_MBRLEN=0;
+ REPLACE_MBSRTOWCS=0;
+ REPLACE_MBSNRTOWCS=0;
+ REPLACE_WCRTOMB=0;
+ REPLACE_WCSRTOMBS=0;
+ REPLACE_WCSNRTOMBS=0;
+ REPLACE_WCWIDTH=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_wchar_h_correct_inline=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
+$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted." "$LINENO" 5
+ fi
+
+
+
+
+ for ac_func in $ac_func_list
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET); return !cs;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_langinfo_codeset=yes
+else
+ am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "@%:@define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+ fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "@%:@define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+$as_echo_n "checking whether realpath works... " >&6; }
+if test "${gl_cv_func_realpath_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ touch conftest.a
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_realpath_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char *name1 = realpath ("conftest.a", NULL);
+ char *name2 = realpath ("conftest.b/../conftest.a", NULL);
+ char *name3 = realpath ("conftest.a/", NULL);
+ return !(name1 && *name1 == '/' && !name2 && !name3);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_realpath_works=yes
+else
+ gl_cv_func_realpath_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+$as_echo "$gl_cv_func_realpath_works" >&6; }
+ if test "$gl_cv_func_realpath_works" = yes; then
+
+$as_echo "@%:@define FUNC_REALPATH_WORKS 1" >>confdefs.h
+
+ fi
+
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ATOLL=0;
+ GNULIB_CALLOC_POSIX=0;
+ GNULIB_CANONICALIZE_FILE_NAME=0;
+ GNULIB_GETLOADAVG=0;
+ GNULIB_GETSUBOPT=0;
+ GNULIB_MALLOC_POSIX=0;
+ GNULIB_MKDTEMP=0;
+ GNULIB_MKOSTEMP=0;
+ GNULIB_MKOSTEMPS=0;
+ GNULIB_MKSTEMP=0;
+ GNULIB_MKSTEMPS=0;
+ GNULIB_PUTENV=0;
+ GNULIB_RANDOM_R=0;
+ GNULIB_REALLOC_POSIX=0;
+ GNULIB_REALPATH=0;
+ GNULIB_RPMATCH=0;
+ GNULIB_SETENV=0;
+ GNULIB_STRTOD=0;
+ GNULIB_STRTOLL=0;
+ GNULIB_STRTOULL=0;
+ GNULIB_UNSETENV=0;
+ HAVE_ATOLL=1;
+ HAVE_CALLOC_POSIX=1;
+ HAVE_CANONICALIZE_FILE_NAME=1;
+ HAVE_DECL_GETLOADAVG=1;
+ HAVE_GETSUBOPT=1;
+ HAVE_MALLOC_POSIX=1;
+ HAVE_MKDTEMP=1;
+ HAVE_MKOSTEMP=1;
+ HAVE_MKOSTEMPS=1;
+ HAVE_MKSTEMPS=1;
+ HAVE_RANDOM_R=1;
+ HAVE_REALLOC_POSIX=1;
+ HAVE_REALPATH=1;
+ HAVE_RPMATCH=1;
+ HAVE_SETENV=1;
+ HAVE_STRTOD=1;
+ HAVE_STRTOLL=1;
+ HAVE_STRTOULL=1;
+ HAVE_STRUCT_RANDOM_DATA=1;
+ HAVE_SYS_LOADAVG_H=0;
+ HAVE_UNSETENV=1;
+ REPLACE_CANONICALIZE_FILE_NAME=0;
+ REPLACE_MKSTEMP=0;
+ REPLACE_PUTENV=0;
+ REPLACE_REALPATH=0;
+ REPLACE_SETENV=0;
+ REPLACE_STRTOD=0;
+ REPLACE_UNSETENV=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
+$as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
+if test "${ac_cv_win_or_dos+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_win_or_dos=yes
+else
+ ac_cv_win_or_dos=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
+$as_echo "$ac_cv_win_or_dos" >&6; }
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
+$as_echo_n "checking whether drive letter can start relative path... " >&6; }
+if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if defined __CYGWIN__
+drive letters are always absolute
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_drive_letter_can_be_relative=yes
+else
+ ac_cv_drive_letter_can_be_relative=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
+$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
+_ACEOF
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
+_ACEOF
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+ GNULIB_CHOWN=0;
+ GNULIB_CLOSE=0;
+ GNULIB_DUP2=0;
+ GNULIB_DUP3=0;
+ GNULIB_ENVIRON=0;
+ GNULIB_EUIDACCESS=0;
+ GNULIB_FACCESSAT=0;
+ GNULIB_FCHDIR=0;
+ GNULIB_FCHOWNAT=0;
+ GNULIB_FSYNC=0;
+ GNULIB_FTRUNCATE=0;
+ GNULIB_GETCWD=0;
+ GNULIB_GETDOMAINNAME=0;
+ GNULIB_GETDTABLESIZE=0;
+ GNULIB_GETGROUPS=0;
+ GNULIB_GETHOSTNAME=0;
+ GNULIB_GETLOGIN=0;
+ GNULIB_GETLOGIN_R=0;
+ GNULIB_GETPAGESIZE=0;
+ GNULIB_GETUSERSHELL=0;
+ GNULIB_LCHOWN=0;
+ GNULIB_LINK=0;
+ GNULIB_LINKAT=0;
+ GNULIB_LSEEK=0;
+ GNULIB_PIPE2=0;
+ GNULIB_PREAD=0;
+ GNULIB_READLINK=0;
+ GNULIB_READLINKAT=0;
+ GNULIB_RMDIR=0;
+ GNULIB_SLEEP=0;
+ GNULIB_SYMLINK=0;
+ GNULIB_SYMLINKAT=0;
+ GNULIB_UNISTD_H_GETOPT=0;
+ GNULIB_UNISTD_H_SIGPIPE=0;
+ GNULIB_UNLINK=0;
+ GNULIB_UNLINKAT=0;
+ GNULIB_USLEEP=0;
+ GNULIB_WRITE=0;
+ HAVE_CHOWN=1;
+ HAVE_DUP2=1;
+ HAVE_DUP3=1;
+ HAVE_EUIDACCESS=1;
+ HAVE_FACCESSAT=1;
+ HAVE_FCHOWNAT=1;
+ HAVE_FSYNC=1;
+ HAVE_FTRUNCATE=1;
+ HAVE_GETDOMAINNAME=1;
+ HAVE_GETDTABLESIZE=1;
+ HAVE_GETGROUPS=1;
+ HAVE_GETHOSTNAME=1;
+ HAVE_GETLOGIN=1;
+ HAVE_GETPAGESIZE=1;
+ HAVE_GETUSERSHELL=1;
+ HAVE_LCHOWN=1;
+ HAVE_LINK=1;
+ HAVE_LINKAT=1;
+ HAVE_PIPE2=1;
+ HAVE_PREAD=1;
+ HAVE_READLINK=1;
+ HAVE_READLINKAT=1;
+ HAVE_SLEEP=1;
+ HAVE_SYMLINK=1;
+ HAVE_SYMLINKAT=1;
+ HAVE_DECL_ENVIRON=1;
+ HAVE_DECL_GETLOGIN_R=1;
+ HAVE_OS_H=0;
+ HAVE_SYS_PARAM_H=0;
+ HAVE_UNLINKAT=1;
+ HAVE_USLEEP=1;
+ REPLACE_CHOWN=0;
+ REPLACE_CLOSE=0;
+ REPLACE_DUP=0;
+ REPLACE_DUP2=0;
+ REPLACE_FCHDIR=0;
+ REPLACE_FCHOWNAT=0;
+ REPLACE_GETCWD=0;
+ REPLACE_GETGROUPS=0;
+ REPLACE_GETPAGESIZE=0;
+ REPLACE_LCHOWN=0;
+ REPLACE_LINK=0;
+ REPLACE_LINKAT=0;
+ REPLACE_LSEEK=0;
+ REPLACE_PREAD=0;
+ REPLACE_READLINK=0;
+ REPLACE_RMDIR=0;
+ REPLACE_SLEEP=0;
+ REPLACE_SYMLINK=0;
+ REPLACE_UNLINK=0;
+ REPLACE_UNLINKAT=0;
+ REPLACE_USLEEP=0;
+ REPLACE_WRITE=0;
+ UNISTD_H_HAVE_WINSOCK2_H=0;
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+ if test "${gt_cv_var_environ_declaration+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_var_environ_declaration=no
+else
+ gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+ if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "@%:@define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+ fi
+
+
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=yes
+else
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=buggy
+else
+ gl_cv_have_include_next=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+$as_echo "$gl_cv_have_include_next" >&6; }
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "booboo" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_complete=no
+else
+ gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_errno_h='<'errno.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_errno_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/errno.h#{
+ s#.*"\(.*/errno.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_errno_h='<'errno.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+ fi
+ NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'errno.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_errno_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+
+
+
+ ERRNO_H='errno.h'
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=yes
+else
+ gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+ case $gl_cv_header_errno_h_EMULTIHOP in
+ yes | no)
+ EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+ ;;
+ *)
+ EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=yes
+else
+ gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+ case $gl_cv_header_errno_h_ENOLINK in
+ yes | no)
+ ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+ ;;
+ *)
+ ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=yes
+else
+ gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+ case $gl_cv_header_errno_h_EOVERFLOW in
+ yes | no)
+ EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+ ;;
+ *)
+ EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+ ;;
+ esac
+
+
+ fi
+
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "@%:@define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+ XGETTEXT_EXTRA_OPTIONS=
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define mode_t int
+_ACEOF
+
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
+"
+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIG_ATOMIC_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define sig_atomic_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+ GNULIB_FCNTL=0;
+ GNULIB_OPEN=0;
+ GNULIB_OPENAT=0;
+ HAVE_FCNTL=1;
+ HAVE_OPENAT=1;
+ REPLACE_FCNTL=0;
+ REPLACE_OPEN=0;
+ REPLACE_OPENAT=0;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_fcntl_h=cross-compiling
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+
+int
+main ()
+{
+
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_fcntl_h=yes
+else
+ case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+
+
+ GNULIB_DPRINTF=0;
+ GNULIB_FCLOSE=0;
+ GNULIB_FFLUSH=0;
+ GNULIB_FOPEN=0;
+ GNULIB_FPRINTF=0;
+ GNULIB_FPRINTF_POSIX=0;
+ GNULIB_FPURGE=0;
+ GNULIB_FPUTC=0;
+ GNULIB_FPUTS=0;
+ GNULIB_FREOPEN=0;
+ GNULIB_FSEEK=0;
+ GNULIB_FSEEKO=0;
+ GNULIB_FTELL=0;
+ GNULIB_FTELLO=0;
+ GNULIB_FWRITE=0;
+ GNULIB_GETDELIM=0;
+ GNULIB_GETLINE=0;
+ GNULIB_OBSTACK_PRINTF=0;
+ GNULIB_OBSTACK_PRINTF_POSIX=0;
+ GNULIB_PERROR=0;
+ GNULIB_POPEN=0;
+ GNULIB_PRINTF=0;
+ GNULIB_PRINTF_POSIX=0;
+ GNULIB_PUTC=0;
+ GNULIB_PUTCHAR=0;
+ GNULIB_PUTS=0;
+ GNULIB_REMOVE=0;
+ GNULIB_RENAME=0;
+ GNULIB_RENAMEAT=0;
+ GNULIB_SNPRINTF=0;
+ GNULIB_SPRINTF_POSIX=0;
+ GNULIB_STDIO_H_SIGPIPE=0;
+ GNULIB_VASPRINTF=0;
+ GNULIB_VDPRINTF=0;
+ GNULIB_VFPRINTF=0;
+ GNULIB_VFPRINTF_POSIX=0;
+ GNULIB_VPRINTF=0;
+ GNULIB_VPRINTF_POSIX=0;
+ GNULIB_VSNPRINTF=0;
+ GNULIB_VSPRINTF_POSIX=0;
+ HAVE_DECL_FPURGE=1;
+ HAVE_DECL_GETDELIM=1;
+ HAVE_DECL_GETLINE=1;
+ HAVE_DECL_OBSTACK_PRINTF=1;
+ HAVE_DECL_SNPRINTF=1;
+ HAVE_DECL_VSNPRINTF=1;
+ HAVE_DPRINTF=1;
+ HAVE_RENAMEAT=1;
+ HAVE_VASPRINTF=1;
+ HAVE_VDPRINTF=1;
+ REPLACE_DPRINTF=0;
+ REPLACE_FCLOSE=0;
+ REPLACE_FFLUSH=0;
+ REPLACE_FOPEN=0;
+ REPLACE_FPRINTF=0;
+ REPLACE_FPURGE=0;
+ REPLACE_FREOPEN=0;
+ REPLACE_FSEEK=0;
+ REPLACE_FSEEKO=0;
+ REPLACE_FTELL=0;
+ REPLACE_FTELLO=0;
+ REPLACE_GETDELIM=0;
+ REPLACE_GETLINE=0;
+ REPLACE_OBSTACK_PRINTF=0;
+ REPLACE_PERROR=0;
+ REPLACE_POPEN=0;
+ REPLACE_PRINTF=0;
+ REPLACE_REMOVE=0;
+ REPLACE_RENAME=0;
+ REPLACE_RENAMEAT=0;
+ REPLACE_SNPRINTF=0;
+ REPLACE_SPRINTF=0;
+ REPLACE_STDIO_WRITE_FUNCS=0;
+ REPLACE_VASPRINTF=0;
+ REPLACE_VDPRINTF=0;
+ REPLACE_VFPRINTF=0;
+ REPLACE_VPRINTF=0;
+ REPLACE_VSNPRINTF=0;
+ REPLACE_VSPRINTF=0;
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ACOSL=0;
+ GNULIB_ASINL=0;
+ GNULIB_ATANL=0;
+ GNULIB_CEILF=0;
+ GNULIB_CEILL=0;
+ GNULIB_COSL=0;
+ GNULIB_EXPL=0;
+ GNULIB_FLOORF=0;
+ GNULIB_FLOORL=0;
+ GNULIB_FREXP=0;
+ GNULIB_FREXPL=0;
+ GNULIB_ISFINITE=0;
+ GNULIB_ISINF=0;
+ GNULIB_ISNAN=0;
+ GNULIB_ISNANF=0;
+ GNULIB_ISNAND=0;
+ GNULIB_ISNANL=0;
+ GNULIB_LDEXPL=0;
+ GNULIB_LOGL=0;
+ GNULIB_ROUND=0;
+ GNULIB_ROUNDF=0;
+ GNULIB_ROUNDL=0;
+ GNULIB_SIGNBIT=0;
+ GNULIB_SINL=0;
+ GNULIB_SQRTL=0;
+ GNULIB_TANL=0;
+ GNULIB_TRUNC=0;
+ GNULIB_TRUNCF=0;
+ GNULIB_TRUNCL=0;
+ HAVE_ACOSL=1;
+ HAVE_ASINL=1;
+ HAVE_ATANL=1;
+ HAVE_COSL=1;
+ HAVE_EXPL=1;
+ HAVE_ISNANF=1;
+ HAVE_ISNAND=1;
+ HAVE_ISNANL=1;
+ HAVE_LOGL=1;
+ HAVE_SINL=1;
+ HAVE_SQRTL=1;
+ HAVE_TANL=1;
+ HAVE_DECL_ACOSL=1;
+ HAVE_DECL_ASINL=1;
+ HAVE_DECL_ATANL=1;
+ HAVE_DECL_COSL=1;
+ HAVE_DECL_EXPL=1;
+ HAVE_DECL_FREXPL=1;
+ HAVE_DECL_LDEXPL=1;
+ HAVE_DECL_LOGL=1;
+ HAVE_DECL_SINL=1;
+ HAVE_DECL_SQRTL=1;
+ HAVE_DECL_TANL=1;
+ HAVE_DECL_TRUNC=1;
+ HAVE_DECL_TRUNCF=1;
+ REPLACE_CEILF=0;
+ REPLACE_CEILL=0;
+ REPLACE_FLOORF=0;
+ REPLACE_FLOORL=0;
+ REPLACE_FREXP=0;
+ REPLACE_FREXPL=0;
+ REPLACE_HUGE_VAL=0;
+ REPLACE_ISFINITE=0;
+ REPLACE_ISINF=0;
+ REPLACE_ISNAN=0;
+ REPLACE_LDEXPL=0;
+ REPLACE_NAN=0;
+ REPLACE_ROUND=0;
+ REPLACE_ROUNDF=0;
+ REPLACE_ROUNDL=0;
+ REPLACE_SIGNBIT=0;
+ REPLACE_SIGNBIT_USING_GCC=0;
+ REPLACE_TRUNCL=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
+$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
+if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_var_stdin_large_offset=yes
+else
+ gl_cv_var_stdin_large_offset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
+$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) $as_echo "@%:@define restrict /**/" >>confdefs.h
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+@%:@define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+ GNULIB_GETTIMEOFDAY=0;
+ HAVE_GETTIMEOFDAY=1;
+ HAVE_STRUCT_TIMEVAL=1;
+ HAVE_SYS_TIME_H=1;
+ REPLACE_GETTIMEOFDAY=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/time.h#{
+ s#.*"\(.*/sys/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+ fi
+ NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_time_h != yes; then
+ HAVE_SYS_TIME_H=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timeval=yes
+else
+ gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+ if test $gl_cv_sys_struct_timeval != yes; then
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+
+ for gl_func in gettimeofday; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+ REPLACE_ICONV=0;
+ REPLACE_ICONV_OPEN=0;
+ REPLACE_ICONV_UTF=0;
+ ICONV_H='';
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "@%:@define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "@%:@define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ gl_cv_c_multiarch=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $gl_cv_c_multiarch = yes; then
+
+$as_echo "@%:@define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+ for ac_header in inttypes.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_inttypes_pri_broken=no
+else
+ gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PRI_MACROS_BROKEN 1
+_ACEOF
+
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_IMAXABS $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_IMAXDIV $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRTOIMAX $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRTOUMAX $ac_have_decl
+_ACEOF
+
+
+ GNULIB_IMAXABS=0;
+ GNULIB_IMAXDIV=0;
+ GNULIB_STRTOIMAX=0;
+ GNULIB_STRTOUMAX=0;
+ HAVE_DECL_IMAXABS=1;
+ HAVE_DECL_IMAXDIV=1;
+ HAVE_DECL_STRTOIMAX=1;
+ HAVE_DECL_STRTOUMAX=1;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+ GNULIB_NL_LANGINFO=0;
+ HAVE_NL_LANGINFO=1;
+ REPLACE_NL_LANGINFO=0;
+
+
+
+ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+ GNULIB_FCHMODAT=0;
+ GNULIB_FSTATAT=0;
+ GNULIB_FUTIMENS=0;
+ GNULIB_LCHMOD=0;
+ GNULIB_LSTAT=0;
+ GNULIB_MKDIRAT=0;
+ GNULIB_MKFIFO=0;
+ GNULIB_MKFIFOAT=0;
+ GNULIB_MKNOD=0;
+ GNULIB_MKNODAT=0;
+ GNULIB_STAT=0;
+ GNULIB_UTIMENSAT=0;
+ HAVE_FCHMODAT=1;
+ HAVE_FSTATAT=1;
+ HAVE_FUTIMENS=1;
+ HAVE_LCHMOD=1;
+ HAVE_LSTAT=1;
+ HAVE_MKDIRAT=1;
+ HAVE_MKFIFO=1;
+ HAVE_MKFIFOAT=1;
+ HAVE_MKNOD=1;
+ HAVE_MKNODAT=1;
+ HAVE_UTIMENSAT=1;
+ REPLACE_FSTAT=0;
+ REPLACE_FSTATAT=0;
+ REPLACE_FUTIMENS=0;
+ REPLACE_LSTAT=0;
+ REPLACE_MKDIR=0;
+ REPLACE_MKFIFO=0;
+ REPLACE_MKNOD=0;
+ REPLACE_STAT=0;
+ REPLACE_UTIMENSAT=0;
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+ /* Linux will dereference the symlink and fail, as required by POSIX.
+ That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ # If the `ln -s' command failed, then we probably don't even
+ # have an lstat function.
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
+if test "${gl_cv_func_malloc_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_malloc_posix=yes
+else
+ gl_cv_func_malloc_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+$as_echo "$gl_cv_func_malloc_posix" >&6; }
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ gl_cv_func_malloc_0_nonnull=1
+else
+ gl_cv_func_malloc_0_nonnull=0
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+# include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_mbstate_t=yes
+else
+ ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+ if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "@%:@define HAVE_MBSTATE_T 1" >>confdefs.h
+
+ else
+
+$as_echo "@%:@define mbstate_t int" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
+$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test "${ac_cv_func_mbrtowc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <wchar.h>
+int
+main ()
+{
+wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_mbrtowc=yes
+else
+ ac_cv_func_mbrtowc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
+$as_echo "$ac_cv_func_mbrtowc" >&6; }
+ if test $ac_cv_func_mbrtowc = yes; then
+
+$as_echo "@%:@define HAVE_MBRTOWC 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+ GNULIB_MEMCHR=0;
+ GNULIB_MEMMEM=0;
+ GNULIB_MEMPCPY=0;
+ GNULIB_MEMRCHR=0;
+ GNULIB_RAWMEMCHR=0;
+ GNULIB_STPCPY=0;
+ GNULIB_STPNCPY=0;
+ GNULIB_STRCHRNUL=0;
+ GNULIB_STRDUP=0;
+ GNULIB_STRNDUP=0;
+ GNULIB_STRNLEN=0;
+ GNULIB_STRPBRK=0;
+ GNULIB_STRSEP=0;
+ GNULIB_STRSTR=0;
+ GNULIB_STRCASESTR=0;
+ GNULIB_STRTOK_R=0;
+ GNULIB_MBSLEN=0;
+ GNULIB_MBSNLEN=0;
+ GNULIB_MBSCHR=0;
+ GNULIB_MBSRCHR=0;
+ GNULIB_MBSSTR=0;
+ GNULIB_MBSCASECMP=0;
+ GNULIB_MBSNCASECMP=0;
+ GNULIB_MBSPCASECMP=0;
+ GNULIB_MBSCASESTR=0;
+ GNULIB_MBSCSPN=0;
+ GNULIB_MBSPBRK=0;
+ GNULIB_MBSSPN=0;
+ GNULIB_MBSSEP=0;
+ GNULIB_MBSTOK_R=0;
+ GNULIB_STRERROR=0;
+ GNULIB_STRSIGNAL=0;
+ GNULIB_STRVERSCMP=0;
+ HAVE_MBSLEN=0;
+ HAVE_DECL_MEMMEM=1;
+ HAVE_MEMPCPY=1;
+ HAVE_DECL_MEMRCHR=1;
+ HAVE_RAWMEMCHR=1;
+ HAVE_STPCPY=1;
+ HAVE_STPNCPY=1;
+ HAVE_STRCHRNUL=1;
+ HAVE_DECL_STRDUP=1;
+ HAVE_DECL_STRNDUP=1;
+ HAVE_DECL_STRNLEN=1;
+ HAVE_STRPBRK=1;
+ HAVE_STRSEP=1;
+ HAVE_STRCASESTR=1;
+ HAVE_DECL_STRTOK_R=1;
+ HAVE_DECL_STRERROR=1;
+ HAVE_DECL_STRSIGNAL=1;
+ HAVE_STRVERSCMP=1;
+ REPLACE_MEMCHR=0;
+ REPLACE_MEMMEM=0;
+ REPLACE_STRDUP=0;
+ REPLACE_STRSTR=0;
+ REPLACE_STRCASESTR=0;
+ REPLACE_STRERROR=0;
+ REPLACE_STRNDUP=0;
+ REPLACE_STRSIGNAL=0;
+ REPLACE_STRTOK_R=0;
+ UNDEFINE_STRTOK_R=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memchr
+do :
+ ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
+if test "x$ac_cv_func_memchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_memchr = no; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+ fi
+
+ if test $ac_cv_func_memchr = yes; then
+ # Detect platform-specific bugs in some versions of glibc:
+ # memchr should not dereference anything with length 0
+ # http://bugzilla.redhat.com/499689
+ # memchr should not dereference overestimated length after a match
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # Assume that memchr works on platforms that lack mprotect.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+$as_echo_n "checking whether memchr works... " >&6; }
+if test "${gl_cv_func_memchr_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_memchr_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+
+int
+main ()
+{
+
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
+#endif
+ if (fence)
+ {
+ if (memchr (fence, 0, 0))
+ return 1;
+ strcpy (fence - 9, "12345678");
+ if (memchr (fence - 9, 0, 79) != fence - 1)
+ return 2;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memchr_works=yes
+else
+ gl_cv_func_memchr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+$as_echo "$gl_cv_func_memchr_works" >&6; }
+ if test "$gl_cv_func_memchr_works" != yes; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
+
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memmem" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_MEMMEM $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${gl_cv_header_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_stdint_h=yes
+else
+ gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+ if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gl_cv_header_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_inttypes_h=yes
+else
+ gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+ if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
+$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
+if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_sizes_c99=yes
+else
+ gl_cv_func_printf_sizes_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
+$as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_long_double=yes
+else
+ gl_cv_func_printf_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
+$as_echo "$gl_cv_func_printf_long_double" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite=yes
+else
+ gl_cv_func_printf_infinite=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
+$as_echo "$gl_cv_func_printf_infinite" >&6; }
+
+
+
+
+
+ if test -n "$gl_printf_safe"; then
+
+$as_echo "@%:@define CHECK_PRINTF_SAFE 1" >>confdefs.h
+
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite_long_double=yes
+else
+ gl_cv_func_printf_infinite_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
+$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
+$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
+if test "${gl_cv_func_printf_directive_a+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "BZ2908" >/dev/null 2>&1; then :
+ gl_cv_func_printf_directive_a="guessing yes"
+else
+ gl_cv_func_printf_directive_a="guessing no"
+fi
+rm -f conftest*
+
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_a=yes
+else
+ gl_cv_func_printf_directive_a=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
+$as_echo "$gl_cv_func_printf_directive_a" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
+$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_f+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_f=yes
+else
+ gl_cv_func_printf_directive_f=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
+$as_echo "$gl_cv_func_printf_directive_f" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
+$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_n=yes
+else
+ gl_cv_func_printf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
+$as_echo "$gl_cv_func_printf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
+$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ return 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ return 1;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_ls=yes
+else
+ gl_cv_func_printf_directive_ls=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
+$as_echo "$gl_cv_func_printf_directive_ls" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
+$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
+if test "${gl_cv_func_printf_positions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_positions=yes
+else
+ gl_cv_func_printf_positions=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
+$as_echo "$gl_cv_func_printf_positions" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
+$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
+if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_grouping=yes
+else
+ gl_cv_func_printf_flag_grouping=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
+$as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
+$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_leftadjust=yes
+else
+ gl_cv_func_printf_flag_leftadjust=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
+$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
+$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_zero=yes
+else
+ gl_cv_func_printf_flag_zero=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
+$as_echo "$gl_cv_func_printf_flag_zero" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
+$as_echo_n "checking whether printf supports large precisions... " >&6; }
+if test "${gl_cv_func_printf_precision+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_precision=yes
+else
+ gl_cv_func_printf_precision=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
+$as_echo "$gl_cv_func_printf_precision" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
+$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
+if test "${gl_cv_func_printf_enomem+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_func_printf_enomem="guessing no"
+ if test "$cross_compiling" = no; then
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data1024;
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ fi
+ if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
+$as_echo "$gl_cv_func_printf_enomem" >&6; }
+
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "@%:@define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "@%:@define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define size_t unsigned int
+_ACEOF
+
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${gt_cv_c_intmax_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1; return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_intmax_t=yes
+else
+ gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+ if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "@%:@define HAVE_INTMAX_T 1" >>confdefs.h
+
+ else
+
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+@%:@define intmax_t $ac_type
+_ACEOF
+
+ fi
+
+
+
+
+
+
+ for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL__SNPRINTF $ac_have_decl
+_ACEOF
+
+
+ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_obstack_printf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl
+_ACEOF
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if test "${gl_cv_promoted_mode_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_promoted_mode_t='int'
+else
+ gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
+
+
+
+
+
+
+
+ GNULIB_POSIX_SPAWN=0;
+ GNULIB_POSIX_SPAWNP=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
+ GNULIB_POSIX_SPAWNATTR_INIT=0;
+ GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_DESTROY=0;
+ HAVE_POSIX_SPAWN=1;
+ HAVE_POSIX_SPAWNATTR_T=1;
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+
+ REPLACE_POSIX_SPAWN=0;
+
+
+
+
+
+
+ if test $ac_cv_func_posix_spawn = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
+$as_echo_n "checking whether posix_spawn works... " >&6; }
+if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ setvbuf (stdout, NULL, _IOFBF, 0);
+ puts ("This should be seen only once.");
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ if (err == ENOENT)
+ return 0;
+ else
+ {
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ close (ofd[1]);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 127)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext > conftest.out \
+ && echo 'This should be seen only once.' > conftest.ok \
+ && cmp conftest.out conftest.ok > /dev/null; then
+ gl_cv_func_posix_spawn_works=yes
+ else
+ gl_cv_func_posix_spawn_works=no
+ fi
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test $gl_cv_func_posix_spawn_works = yes; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Test whether posix_spawn_file_actions_addopen supports filename arguments
+ that contain special characters such as '*'. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "conftest"
+#define DATA_FILENAME "conftest%=*#?"
+
+static int
+parent_main (void)
+{
+ FILE *fp;
+ char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ /* Create a data file with specific contents. */
+ fp = fopen (DATA_FILENAME, "wb");
+ if (fp == NULL)
+ {
+ perror ("cannot create data file");
+ return 1;
+ }
+ fwrite ("Halle Potta", 1, 11, fp);
+ if (fflush (fp) || fclose (fp))
+ {
+ perror ("cannot prepare data file");
+ return 1;
+ }
+
+ /* Avoid reading from our stdin, as it could block. */
+ freopen ("/dev/null", "rb", stdin);
+
+ /* Test whether posix_spawn_file_actions_addopen with this file name
+ actually works, but spawning a child that reads from this file. */
+ actions_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
+ || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ errno = err;
+ perror ("subprocess failed");
+ return 1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ return 1;
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ return 1;
+ }
+ return 0;
+}
+
+static int
+child_main (void)
+{
+ char buf[1024];
+
+ /* See if reading from STDIN_FILENO yields the expected contents. */
+ if (fread (buf, 1, sizeof (buf), stdin) == 11
+ && memcmp (buf, "Halle Potta", 11) == 0)
+ return 0;
+ else
+ return 2;
+}
+
+static void
+cleanup_then_die (int sig)
+{
+ /* Clean up data file. */
+ unlink (DATA_FILENAME);
+
+ /* Re-raise the signal and die from it. */
+ signal (sig, SIG_DFL);
+ raise (sig);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int exitstatus;
+
+ if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
+ {
+ /* This is the parent process. */
+ signal (SIGINT, cleanup_then_die);
+ signal (SIGTERM, cleanup_then_die);
+ #ifdef SIGHUP
+ signal (SIGHUP, cleanup_then_die);
+ #endif
+
+ exitstatus = parent_main ();
+ }
+ else
+ {
+ /* This is the child process. */
+
+ exitstatus = child_main ();
+ }
+ unlink (DATA_FILENAME);
+ return exitstatus;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+ else
+ case "$host_os" in
+ aix*) gl_cv_func_posix_spawn_works="guessing no";;
+ *) gl_cv_func_posix_spawn_works="guessing yes";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
+
+ case "$gl_cv_func_posix_spawn_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN=1 ;;
+ esac
+ else
+ HAVE_POSIX_SPAWN=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+$as_echo_n "checking whether setenv validates arguments... " >&6; }
+if test "${gl_cv_func_setenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_setenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+
+int
+main ()
+{
+
+ if (setenv ("", "", 0) != -1) return 1;
+ if (errno != EINVAL) return 2;
+ if (setenv ("a", "=", 1) != 0) return 3;
+ if (strcmp (getenv ("a"), "=") != 0) return 4;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_setenv_works=yes
+else
+ gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+$as_echo "$gl_cv_func_setenv_works" >&6; }
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+ for ac_header in search.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SEARCH_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in tsearch
+do :
+ ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_TSEARCH 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ GNULIB_SIGNAL_H_SIGPIPE=0;
+ GNULIB_SIGPROCMASK=0;
+ GNULIB_SIGACTION=0;
+ HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_SIGSET_T=1;
+ HAVE_SIGINFO_T=1;
+ HAVE_SIGACTION=1;
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then :
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "@%:@define uid_t int" >>confdefs.h
+
+
+$as_echo "@%:@define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_SNPRINTF $ac_have_decl
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if test "${ac_cv_header_stdbool_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+
+int
+main ()
+{
+
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdbool_h=yes
+else
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "@%:@define HAVE_STDBOOL_H 1" >>confdefs.h
+
+ fi
+
+ REPLACE_NULL=0;
+ HAVE_WCHAR_T=1;
+ STDDEF_H='';
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -z "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if test "${gl_cv_func_working_strerror+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+ if test $gl_cv_func_working_strerror = no; then
+ REPLACE_STRERROR=1
+ fi
+ else
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+
+ ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRERROR $ac_have_decl
+_ACEOF
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ for ac_header in winsock2.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+ fi
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_string_h='<'string.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+$as_echo_n "checking absolute name of <string.h>... " >&6; }
+if test "${gl_cv_next_string_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_string_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/string.h#{
+ s#.*"\(.*/string.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_string_h='<'string.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+$as_echo "$gl_cv_next_string_h" >&6; }
+ fi
+ NEXT_STRING_H=$gl_cv_next_string_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'string.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_string_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strndup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRNDUP $ac_have_decl
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stat_broken=no
+else
+ ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "@%:@define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+ REPLACE_MKTIME=GNULIB_PORTCHECK;
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+ REPLACE_STRPTIME=GNULIB_PORTCHECK;
+ REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_time_h='<'time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if test "${gl_cv_next_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/time.h#{
+ s#.*"\(.*/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_time_h='<'time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
+ fi
+ NEXT_TIME_H=$gl_cv_next_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
+$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
+if test "${gl_cv_func_ungetc_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_ungetc_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ungetc_works=yes
+else
+ gl_cv_func_ungetc_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
+$as_echo "$gl_cv_func_ungetc_works" >&6; }
+ if test "$gl_cv_func_ungetc_works" != yes; then
+
+$as_echo "@%:@define FUNC_UNGETC_BROKEN 1" >>confdefs.h
+
+ fi
+
+
+
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if true; then
+ GL_COND_LIBTOOL_TRUE=
+ GL_COND_LIBTOOL_FALSE='#'
+else
+ GL_COND_LIBTOOL_TRUE='#'
+ GL_COND_LIBTOOL_FALSE=
+fi
+
+ gl_cond_libtool=true
+
+
+
+
+
+
+
+
+
+ gl_source_base='gnu'
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+
+
+
+
+
+
+ if test $ac_cv_func_alloca_works = no; then
+ :
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Need own alloca" >/dev/null 2>&1; then :
+ gl_cv_rpl_alloca=yes
+else
+ gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+ if test $gl_cv_rpl_alloca = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h
+
+ ALLOCA_H=alloca.h
+ else
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
+$as_echo_n "checking whether to enable assertions... " >&6; }
+ @%:@ Check whether --enable-assert was given.
+if test "${enable_assert+set}" = set; then :
+ enableval=$enable_assert; if test "x$enableval" = xno; then :
+
+$as_echo "@%:@define NDEBUG 1" >>confdefs.h
+
+elif test "x$enableval" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
+$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
+ enable_assert=yes
+fi
+else
+ enable_assert=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
+$as_echo "$enable_assert" >&6; }
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
+if test "${gl_cv_func_btowc_eof+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_btowc_eof=yes
+else
+ gl_cv_func_btowc_eof=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+$as_echo "$gl_cv_func_btowc_eof" >&6; }
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_BTOWC=1
+
+
+
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ REPLACE_REALPATH=1
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+
+
+
+$as_echo "@%:@define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
+
+
+
+
+ GNULIB_CANONICALIZE_FILE_NAME=1
+
+
+
+ GNULIB_REALPATH=1
+
+
+$as_echo "@%:@define SIGNAL_SAFE_LIST 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_CLOEXEC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
+
+
+ :
+
+
+
+$as_echo "@%:@define GNULIB_CLOSE_STREAM 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_DIRNAME 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "@%:@define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+$as_echo_n "checking whether dup2 works... " >&6; }
+if test "${gl_cv_func_dup2_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works=no;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works=no;;
+ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+ # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+ gl_cv_func_dup2_works=no;;
+ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ gl_cv_func_dup2_works=no;;
+ *) gl_cv_func_dup2_works=yes;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <unistd.h>
+#include <errno.h>
+int
+main ()
+{
+if (dup2 (1, 1) == 0)
+ return 1;
+ close (0);
+ if (dup2 (0, 0) != -1)
+ return 2;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (1, 1000000) == -1 && errno != EBADF)
+ return 3;
+ return 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_dup2_works=yes
+else
+ gl_cv_func_dup2_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
+$as_echo "$gl_cv_func_dup2_works" >&6; }
+ if test "$gl_cv_func_dup2_works" = no; then
+
+
+ if test $ac_cv_func_dup2 = yes; then
+ REPLACE_DUP2=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_DUP2=1
+
+
+
+
+ GNULIB_ENVIRON=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_error_at_line=yes
+else
+ ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
+
+fi
+
+
+
+
+ :
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS exitfail.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+
+int
+main ()
+{
+return fcntl (0, F_DUPFD, -1) != -1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_works=yes
+else
+ gl_cv_func_fcntl_f_dupfd_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *)
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+
+$as_echo "@%:@define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_FCNTL=1
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
+if test "${gl_cv_next_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_fcntl_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/fcntl.h#{
+ s#.*"\(.*/fcntl.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+$as_echo "$gl_cv_next_fcntl_h" >&6; }
+ fi
+ NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'fcntl.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_fcntl_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in fcntl openat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+$as_echo "@%:@define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if test "${gl_cv_func_fflush_stdin+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ if test $gl_cv_func_fflush_stdin = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FFLUSH=1
+ REPLACE_FSEEKO=1
+
+
+ :
+
+
+ fi
+
+
+
+ GNULIB_FFLUSH=1
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_FILENAMECAT 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_flexmember=yes
+else
+ ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+ if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "@%:@define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+ else
+ $as_echo "@%:@define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+ fi
+
+
+
+
+ FLOAT_H=
+ case "$host_os" in
+ beos* | openbsd*)
+ FLOAT_H=float.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_float_h='<'float.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
+$as_echo_n "checking absolute name of <float.h>... " >&6; }
+if test "${gl_cv_next_float_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_float_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/float.h#{
+ s#.*"\(.*/float.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_float_h='<'float.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
+$as_echo "$gl_cv_next_float_h" >&6; }
+ fi
+ NEXT_FLOAT_H=$gl_cv_next_float_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'float.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_float_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+
+
+
+ ;;
+ esac
+
+
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_FOPEN=1
+ gl_cv_func_fopen_slash="guessing no"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
+$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_fopen_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
+ hpux*) gl_cv_func_fopen_slash="guessing no" ;;
+ *) gl_cv_func_fopen_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+ return fopen ("conftest.sl/", "w") != NULL;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fopen_slash=yes
+else
+ gl_cv_func_fopen_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
+$as_echo "$gl_cv_func_fopen_slash" >&6; }
+ ;;
+ esac
+ case "$gl_cv_func_fopen_slash" in
+ *no)
+
+$as_echo "@%:@define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_FOPEN=1
+ ;;
+ esac
+ if test $REPLACE_FOPEN = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
+
+
+
+
+ fi
+
+
+
+ GNULIB_FOPEN=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_FOPEN_SAFER 1" >>confdefs.h
+
+
+
+
+
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL___FPENDING $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_func___fpending = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
+$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
+if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *fp = stdin; (void) ($ac_expr);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fp_done=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
+$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
+_ACEOF
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
+
+ fi
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPURGE $ac_have_decl
+_ACEOF
+
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
+$as_echo_n "checking whether fpurge works... " >&6; }
+if test "${gl_cv_func_fpurge_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fpurge_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "w+");
+ if (!f) return 1;
+ if (fputc ('a', f) != 'a') return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != EOF) return 4;
+ if (fpurge (f) != 0) return 5;
+ if (putc ('b', f) != 'b') return 6;
+ if (fclose (f) != 0) return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+ if (fgetc (f) != 'a') return 9;
+ if (fgetc (f) != 'b') return 10;
+ if (fgetc (f) != EOF) return 11;
+ if (fclose (f) != 0) return 12;
+ if (remove ("conftest.txt") != 0) return 13;
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fpurge_works=yes
+else
+ gl_cv_func_fpurge_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
+$as_echo "$gl_cv_func_fpurge_works" >&6; }
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+
+
+
+ GNULIB_FPURGE=1
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+int
+main ()
+{
+int e; return frexp (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp_no_libm=yes ;;
+ *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
+ esac
+ else
+ gl_func_frexp_no_libm=no
+ REPLACE_FREXP=1
+ fi
+ if test $gl_func_frexp_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXP=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+int
+main ()
+{
+int e; return frexpl (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ else
+ HAVE_DECL_FREXPL=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXPL=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if test "${gl_cv_func_fseeko+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FSEEKO=1
+
+
+ fi
+
+
+
+ GNULIB_FSEEKO=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+$as_echo_n "checking for ftello... " >&6; }
+if test "${gl_cv_func_ftello+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+$as_echo "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
+
+
+ REPLACE_FTELLO=1
+
+ fi
+
+
+
+ GNULIB_FTELLO=1
+
+
+
+
+ if test $ac_cv_func_getdtablesize != yes; then
+ HAVE_GETDTABLESIZE=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_GETDTABLESIZE=1
+
+
+
+
+
+
+
+
+
+
+ gl_gettimeofday_timezone=void
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
+$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_gettimeofday_clobber=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_gettimeofday_clobber=no
+else
+ gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+
+$as_echo "@%:@define gmtime rpl_gmtime" >>confdefs.h
+
+
+$as_echo "@%:@define localtime rpl_localtime" >>confdefs.h
+
+
+
+$as_echo "@%:@define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+ struct timeval c;
+ int gettimeofday (struct timeval *restrict, void *restrict);
+
+int
+main ()
+{
+/* glibc uses struct timezone * rather than the POSIX void *
+ if _GNU_SOURCE is defined. However, since the only portable
+ use of gettimeofday uses NULL as the second parameter, and
+ since the glibc definition is actually more typesafe, it is
+ not worth wrapping this to get a compliant signature. */
+ int (*f) (struct timeval *restrict, void *restrict)
+ = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=almost
+else
+ gl_cv_func_gettimeofday_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+ if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+ gl_gettimeofday_timezone='struct timezone'
+ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+ fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
+_ACEOF
+
+
+
+
+ GNULIB_GETTIMEOFDAY=1
+
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "@%:@define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if test "${am_cv_proto_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_cv_proto_iconv_arg1=""
+else
+ am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+ $am_cv_proto_iconv" >&5
+$as_echo "
+ $am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
+$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
+if test "${gl_cv_next_iconv_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_iconv_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <iconv.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/iconv.h#{
+ s#.*"\(.*/iconv.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
+$as_echo "$gl_cv_next_iconv_h" >&6; }
+ fi
+ NEXT_ICONV_H=$gl_cv_next_iconv_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'iconv.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_iconv_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <iconv.h>
+ #if defined _LIBICONV_VERSION || defined __GLIBC__
+ gnu_iconv
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "gnu_iconv" >/dev/null 2>&1; then :
+ gl_func_iconv_gnu=yes
+else
+ gl_func_iconv_gnu=no
+fi
+rm -f conftest*
+
+ if test $gl_func_iconv_gnu = no; then
+ iconv_flavor=
+ case "$host_os" in
+ aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
+ irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
+ hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
+ osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
+ solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+ esac
+ if test -n "$iconv_flavor"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define ICONV_FLAVOR $iconv_flavor
+_ACEOF
+
+
+
+
+ ICONV_H='iconv.h'
+
+ REPLACE_ICONV_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS iconv_open.$ac_objext"
+
+
+ fi
+ fi
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
+$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
+if test "${gl_cv_c_inline_effective+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_c_inline_effective=yes
+else
+ gl_cv_c_inline_effective=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
+$as_echo "$gl_cv_c_inline_effective" >&6; }
+ if test $gl_cv_c_inline_effective = yes; then
+
+$as_echo "@%:@define HAVE_INLINE 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
+$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_inttypes_h=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
+$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
+if test "${gl_cv_next_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/inttypes.h#{
+ s#.*"\(.*/inttypes.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+$as_echo "$gl_cv_next_inttypes_h" >&6; }
+ fi
+ NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'inttypes.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_inttypes_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+$as_echo "@%:@define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
+
+
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ PRIPTR_PREFIX='"l"'
+ else
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT32_MAX && defined INTMAX_MAX
+ #define CONDITION (INT32_MAX < INTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (int) < sizeof (long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+ if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+ INT32_MAX_LT_INTMAX_MAX=1;
+ else
+ INT32_MAX_LT_INTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT64_MAX
+ #define CONDITION (INT64_MAX == LONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (long long int) == sizeof (long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+ if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+ INT64_MAX_EQ_LONG_MAX=1;
+ else
+ INT64_MAX_EQ_LONG_MAX=0;
+ fi
+
+
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT32_MAX && defined UINTMAX_MAX
+ #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+ if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+ UINT32_MAX_LT_UINTMAX_MAX=1;
+ else
+ UINT32_MAX_LT_UINTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT64_MAX
+ #define CONDITION (UINT64_MAX == ULONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+ if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+ UINT64_MAX_EQ_ULONG_MAX=1;
+ else
+ UINT64_MAX_EQ_ULONG_MAX=0;
+ fi
+
+
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+
+ for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnan ((double)(x))
+ #else
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;
+int
+main ()
+{
+return isnand (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnand_no_libm=yes
+else
+ gl_cv_func_isnand_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
+$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
+
+ if test $gl_cv_func_isnand_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;
+int
+main ()
+{
+return isnanf (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanf_no_libm=yes
+else
+ gl_cv_func_isnanf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
+$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
+
+ if test $gl_cv_func_isnanf_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
+$as_echo_n "checking whether isnan(float) works... " >&6; }
+if test "${gl_cv_func_isnanf_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
+ *) gl_cv_func_isnanf_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+#endif
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaN() (0.0f / 0.0f)
+#endif
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; float value; } memory_float;
+int main()
+{
+ memory_float m;
+
+ if (isnanf (1.0f / 0.0f))
+ return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanf_works=yes
+else
+ gl_cv_func_isnanf_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
+$as_echo "$gl_cv_func_isnanf_works" >&6; }
+
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
+
+$as_echo "@%:@define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;
+int
+main ()
+{
+return isnanl (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanl_no_libm=yes
+else
+ gl_cv_func_isnanl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
+$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
+
+ gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
+ if test $gl_func_isnanl_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
+$as_echo_n "checking whether isnanl works... " >&6; }
+if test "${gl_cv_func_isnanl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+ *)
+ case "$host_os" in
+ netbsd*) gl_cv_func_isnanl_works="guessing no";;
+ *) gl_cv_func_isnanl_works="guessing yes";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+#elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+#endif
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
+int main ()
+{
+ memory_long_double m;
+ unsigned int i;
+
+ if (!isnanl (NaNl ()))
+ return 1;
+
+ /* The isnanl function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit (since the exponent never extends to
+ bit 31). */
+ m.value = NaNl ();
+ m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ for (i = 0; i < NWORDS; i++)
+ m.word[i] |= 1;
+ if (!isnanl (m.value))
+ return 1;
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanl_works=yes
+else
+ gl_cv_func_isnanl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
+$as_echo "$gl_cv_func_isnanl_works" >&6; }
+
+ case "$gl_cv_func_isnanl_works" in
+ *yes) ;;
+ *) gl_func_isnanl_no_libm=no ;;
+ esac
+ fi
+ if test $gl_func_isnanl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
+if test "${gl_cv_next_langinfo_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/langinfo.h#{
+ s#.*"\(.*/langinfo.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+$as_echo "$gl_cv_next_langinfo_h" >&6; }
+ fi
+ NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'langinfo.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_langinfo_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+
+
+
+
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
+if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = CODESET;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_codeset=yes
+else
+ gl_cv_header_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
+if test "${gl_cv_header_langinfo_era+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = ERA;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_era=yes
+else
+ gl_cv_header_langinfo_era=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+$as_echo "$gl_cv_header_langinfo_era" >&6; }
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+
+
+
+
+
+ for gl_func in nl_langinfo; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
+$as_echo_n "checking whether lseek detects pipes... " >&6; }
+if test "${gl_cv_func_lseek_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int main ()
+{
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_lseek_pipe=yes
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
+$as_echo "$gl_cv_func_lseek_pipe" >&6; }
+ if test $gl_cv_func_lseek_pipe = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
+
+
+ REPLACE_LSEEK=1
+
+$as_echo "@%:@define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+
+
+ fi
+
+
+
+ GNULIB_LSEEK=1
+
+
+
+
+ if test $ac_cv_func_lstat = yes; then
+
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+
+ else
+ HAVE_LSTAT=0
+ fi
+
+
+
+ GNULIB_LSTAT=1
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h
+
+else
+ $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+
+$as_echo "@%:@define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+
+$as_echo "@%:@define GNULIB_MALLOC_GNU 1" >>confdefs.h
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+
+$as_echo "@%:@define HAVE_MALLOC_POSIX 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+ HAVE_MALLOC_POSIX=0
+ fi
+
+
+
+
+ GNULIB_MALLOC_POSIX=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_math_h='<'math.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
+$as_echo_n "checking absolute name of <math.h>... " >&6; }
+if test "${gl_cv_next_math_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_math_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/math.h#{
+ s#.*"\(.*/math.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_math_h='<'math.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
+$as_echo "$gl_cv_next_math_h" >&6; }
+ fi
+ NEXT_MATH_H=$gl_cv_next_math_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'math.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_math_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
+$as_echo_n "checking whether NAN macro works... " >&6; }
+if test "${gl_cv_header_math_nan_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_nan_works=yes
+else
+ gl_cv_header_math_nan_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
+$as_echo "$gl_cv_header_math_nan_works" >&6; }
+ if test $gl_cv_header_math_nan_works = no; then
+ REPLACE_NAN=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
+$as_echo_n "checking whether HUGE_VAL works... " >&6; }
+if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of HUGE_VAL. */
+ double d = HUGE_VAL;
+ return d == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_huge_val_works=yes
+else
+ gl_cv_header_math_huge_val_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
+$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
+ if test $gl_cv_header_math_huge_val_works = no; then
+ REPLACE_HUGE_VAL=1
+ fi
+
+
+ for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_null_arg=yes
+else
+ gl_cv_func_mbrtowc_null_arg=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_retval=yes
+else
+ gl_cv_func_mbrtowc_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_nul_retval=yes
+else
+ gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBRTOWC=1
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBSINIT=1
+
+
+
+
+ if test $ac_cv_func_mbslen = yes; then
+ HAVE_MBSLEN=1
+ else
+ HAVE_MBSLEN=0
+ fi
+
+
+
+ GNULIB_MBSLEN=1
+
+
+
+ GNULIB_MBSSTR=1
+
+
+
+
+
+ :
+
+
+
+
+ GNULIB_MEMCHR=1
+
+
+
+ if test $ac_cv_have_decl_memmem = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
+$as_echo_n "checking whether memmem works in linear time... " >&6; }
+if test "${gl_cv_func_memmem_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_MAJOR >= 1007
+ Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky user" >/dev/null 2>&1; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works="guessing no"
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+
+int
+main ()
+{
+size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ void *result = 0;
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack memmem. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+ /* Check for quadratic performance. */
+ if (haystack && needle)
+ {
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ }
+ /* Check for empty needle behavior. */
+ return !result || !memmem ("a", 1, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
+$as_echo "$gl_cv_func_memmem_works" >&6; }
+ if test "$gl_cv_func_memmem_works" != yes; then
+ REPLACE_MEMMEM=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memmem.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+ GNULIB_MEMMEM=1
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in mkdtemp
+do :
+ ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
+if test "x$ac_cv_func_mkdtemp" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MKDTEMP 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_mkdtemp = no; then
+ HAVE_MKDTEMP=0
+ :
+
+ fi
+
+
+
+ GNULIB_MKDTEMP=1
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
+$as_echo_n "checking for working mkstemp... " >&6; }
+if test "${gl_cv_func_working_mkstemp+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ mkdir conftest.mkstemp
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_working_mkstemp=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_mkstemp=yes
+else
+ gl_cv_func_working_mkstemp=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.mkstemp
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
+$as_echo "$gl_cv_func_working_mkstemp" >&6; }
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
+
+
+
+ fi
+
+
+
+ GNULIB_MKSTEMP=1
+
+
+
+
+
+
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+
+$as_echo "@%:@define REPLACE_NL_LANGINFO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_NL_LANGINFO=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
+$as_echo_n "checking for obstacks... " >&6; }
+if test "${ac_cv_func_obstack+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ @%:@include "obstack.h"
+int
+main ()
+{
+struct obstack mem;
+ @%:@define obstack_chunk_alloc malloc
+ @%:@define obstack_chunk_free free
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_obstack=yes
+else
+ ac_cv_func_obstack=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
+$as_echo "$ac_cv_func_obstack" >&6; }
+if test $ac_cv_func_obstack = yes; then
+
+$as_echo "@%:@define HAVE_OBSTACK 1" >>confdefs.h
+
+else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_obstack_printf_posix=no
+
+ if test $ac_cv_func_obstack_printf = yes ; then
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # obstack_printf exists and is
+ # already POSIX compliant.
+ gl_cv_func_obstack_printf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_obstack_printf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF_POSIX=1
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ *)
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
+$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_open_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ freebsd*) gl_cv_func_open_slash="guessing no" ;;
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
+#endif
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_open_slash=yes
+else
+ gl_cv_func_open_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl conftest.tmp conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
+$as_echo "$gl_cv_func_open_slash" >&6; }
+ case "$gl_cv_func_open_slash" in
+ *no)
+
+$as_echo "@%:@define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+$as_echo "@%:@define GNULIB_OPEN 1" >>confdefs.h
+
+
+
+
+ GNULIB_OPEN=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_pipe2 != yes; then
+ HAVE_PIPE2=0
+ fi
+
+
+
+ GNULIB_PIPE2=1
+
+
+
+$as_echo "@%:@define GNULIB_PIPE2_SAFER 1" >>confdefs.h
+
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
+
+ for ac_header in paths.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
+if test "x$ac_cv_header_paths_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_PATHS_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNP=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return frexp (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes)
+
+$as_echo "@%:@define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return ldexp (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexp_no_libm=yes
+else
+ gl_cv_func_ldexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
+$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
+ if test $gl_cv_func_ldexp_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return frexpl (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return ldexpl (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexpl_no_libm=yes
+else
+ gl_cv_func_ldexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
+$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
+ if test $gl_cv_func_ldexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
+$as_echo_n "checking whether ldexpl works... " >&6; }
+if test "${gl_cv_func_ldexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix*) gl_cv_func_ldexpl_works="guessing no";;
+ *) gl_cv_func_ldexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+extern long double ldexpl (long double, int);
+int main()
+{
+ volatile long double x1 = 1.0;
+ volatile long double y1 = ldexpl (x1, -1);
+ volatile long double x2 = 1.73205L;
+ volatile long double y2 = ldexpl (x2, 0);
+ return (y1 != 0.5L) || (y2 != x2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ldexpl_works=yes
+else
+ gl_cv_func_ldexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
+$as_echo "$gl_cv_func_ldexpl_works" >&6; }
+
+ case "$gl_cv_func_ldexpl_works" in
+ *yes)
+
+$as_echo "@%:@define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
+
+else
+ HAVE_DECL_LDEXPL=0
+fi
+
+ ;;
+ esac
+ fi
+
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
+_ACEOF
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quote.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rawmemchr
+do :
+ ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
+if test "x$ac_cv_func_rawmemchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RAWMEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rawmemchr = no; then
+ HAVE_RAWMEMCHR=0
+ :
+ fi
+
+
+
+ GNULIB_RAWMEMCHR=1
+
+
+
+
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+
+ :
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+$as_echo_n "checking whether readlink signature is correct... " >&6; }
+if test "${gl_cv_decl_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ /* Cause compilation failure if original declaration has wrong type. */
+ ssize_t readlink (const char *, char *, size_t);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_readlink_works=yes
+else
+ gl_cv_decl_readlink_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+$as_echo "$gl_cv_decl_readlink_works" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # We have readlink, so assume ln -s works.
+ ln -s conftest.no-such conftest.link
+ ln -s conftest.link conftest.lnk2
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_readlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+char buf[20];
+ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_readlink_works=yes
+else
+ gl_cv_func_readlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
+$as_echo "$gl_cv_func_readlink_works" >&6; }
+ if test "$gl_cv_func_readlink_works" != yes; then
+
+$as_echo "@%:@define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_READLINK=1
+
+
+
+
+
+@%:@ Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+ withval=$with_included_regex;
+fi
+
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_re_compile_pattern_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+
+int
+main ()
+{
+static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_re_compile_pattern_working=yes
+else
+ gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+
+$as_echo "@%:@define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "@%:@define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "@%:@define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "@%:@define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "@%:@define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "@%:@define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "@%:@define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "@%:@define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "@%:@define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "@%:@define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "@%:@define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "@%:@define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "@%:@define regcomp rpl_regcomp" >>confdefs.h
+
+
+$as_echo "@%:@define regexec rpl_regexec" >>confdefs.h
+
+
+$as_echo "@%:@define regerror rpl_regerror" >>confdefs.h
+
+
+$as_echo "@%:@define regfree rpl_regfree" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+ for ac_header in libintl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBINTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
+$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
+if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_dst_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
+ if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_dst_works=yes
+else
+ gl_cv_func_rename_slash_dst_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
+$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
+$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
+if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_src_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
+ if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_src_works=yes
+else
+ gl_cv_func_rename_slash_src_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
+$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
+$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
+if test "${gl_cv_func_rename_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "" = ""; then
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1")) return 1;
+ if (unlink ("conftest.f1")) return 2;
+ if (rename ("conftest.f", "conftest.f")) return 3;
+ if (rename ("conftest.f1", "conftest.f1") == 0) return 4;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_link_works=yes
+else
+ gl_cv_func_rename_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
+$as_echo "$gl_cv_func_rename_link_works" >&6; }
+ if test "x$gl_cv_func_rename_link_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_HARD_LINK_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
+$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
+if test "${gl_cv_func_rename_dest_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2
+ touch conftest.f && mkdir conftest.d1 conftest.d2 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_dest_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
+ if (rename ("conftest.d2", "conftest.f") == 0) return 2;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_dest_works=yes
+else
+ gl_cv_func_rename_dest_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
+$as_echo "$gl_cv_func_rename_dest_works" >&6; }
+ if test "x$gl_cv_func_rename_dest_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+
+ fi
+
+
+
+ GNULIB_RENAME=1
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rmdir
+do :
+ ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
+if test "x$ac_cv_func_rmdir" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RMDIR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rmdir = no; then
+ REPLACE_RMDIR=1
+ # If someone lacks rmdir, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_RMDIR_CHECK" != xyes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Your system lacks the rmdir function.
+ Please report this, along with the output of \"uname -a\", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_RMDIR_CHECK=yes.
+ E.g., ./configure SKIP_RMDIR_CHECK=yes
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+$as_echo_n "checking whether rmdir works... " >&6; }
+if test "${gl_cv_func_rmdir_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ mkdir conftest.dir
+ touch conftest.file
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rmdir_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+
+int
+main ()
+{
+return !rmdir ("conftest.file/") || errno != ENOTDIR
+ || !rmdir ("conftest.dir/./");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rmdir_works=yes
+else
+ gl_cv_func_rmdir_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.dir conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
+$as_echo "$gl_cv_func_rmdir_works" >&6; }
+ if test x"$gl_cv_func_rmdir_works" != xyes; then
+ REPLACE_RMDIR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_RMDIR=1
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sched.h>
+ struct sched_param a;
+ int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ SCHED_H=''
+else
+ SCHED_H='sched.h'
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sched_h='<'sched.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
+$as_echo_n "checking absolute name of <sched.h>... " >&6; }
+if test "${gl_cv_next_sched_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sched_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sched.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sched.h#{
+ s#.*"\(.*/sched.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sched_h='<'sched.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
+$as_echo "$gl_cv_next_sched_h" >&6; }
+ fi
+ NEXT_SCHED_H=$gl_cv_next_sched_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sched.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sched_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_sched_h = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+
+
+ ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
+"
+if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
+ HAVE_STRUCT_SCHED_PARAM=1
+else
+ HAVE_STRUCT_SCHED_PARAM=0
+fi
+
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_SETENV=1
+
+
+
+
+ if test $ac_cv_func_sigaction = yes; then
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+
+ fi
+
+
+
+ GNULIB_SIGACTION=1
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_signal_h='<'signal.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if test "${gl_cv_next_signal_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_signal_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/signal.h#{
+ s#.*"\(.*/signal.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_signal_h='<'signal.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+ fi
+ NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'signal.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_signal_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+
+else
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+ for gl_func in sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
+$as_echo_n "checking for signbit macro... " >&6; }
+if test "${gl_cv_func_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+/* If signbit is defined as a function, don't use it, since calling it for
+ 'float' or 'long double' arguments would involve conversions.
+ If signbit is not declared at all but exists as a library function, don't
+ use it, since the prototype may not match.
+ If signbit is not declared at all but exists as a compiler built-in, don't
+ use it, since it's preferable to use __builtin_signbit* (no warnings,
+ no conversions). */
+#ifndef signbit
+# error "signbit should be a macro"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit=yes
+else
+ gl_cv_func_signbit=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
+$as_echo "$gl_cv_func_signbit" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
+$as_echo_n "checking for signbit compiler built-ins... " >&6; }
+if test "${gl_cv_func_signbit_gcc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit_gcc="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if __GNUC__ >= 4
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+#else
+# error "signbit should be three compiler built-ins"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit_gcc=yes
+else
+ gl_cv_func_signbit_gcc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
+$as_echo "$gl_cv_func_signbit_gcc" >&6; }
+ if test "$gl_cv_func_signbit_gcc" = yes; then
+ REPLACE_SIGNBIT_USING_GCC=1
+ else
+ if test "$gl_cv_func_signbit" != yes; then
+ REPLACE_SIGNBIT=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
+$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_float_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0f };
+static memory_float minus = { -1.0f };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_signbit=`cat conftest.out`
+else
+ gl_cv_cc_float_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
+$as_echo "$gl_cv_cc_float_signbit" >&6; }
+ case "$gl_cv_cc_float_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0 };
+static memory_float minus = { -1.0 };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
+$as_echo "$gl_cv_cc_double_signbit" >&6; }
+ case "$gl_cv_cc_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0L };
+static memory_float minus = { -1.0L };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_long_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
+$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
+ case "$gl_cv_cc_long_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGNF $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ float x, y;
+int
+main ()
+{
+return copysignf (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignf_no_libm=yes
+else
+ gl_cv_func_copysignf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
+$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysign" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGN $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
+$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x, y;
+int
+main ()
+{
+return copysign (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysign_no_libm=yes
+else
+ gl_cv_func_copysign_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
+$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
+ if test $gl_cv_func_copysign_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGNL $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x, y;
+int
+main ()
+{
+return copysignl (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignl_no_libm=yes
+else
+ gl_cv_func_copysignl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
+$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_SIGNBIT=1
+
+
+
+ signals_not_posix=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sigset_t" >/dev/null 2>&1; then :
+
+else
+ signals_not_posix=1
+fi
+rm -f conftest*
+
+ if test -z "$signals_not_posix"; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = x""yes; then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
+
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>
+"
+if test "x$ac_cv_type_sigset_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
+ fi
+
+
+
+ GNULIB_SIGPROCMASK=1
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+if test "${gl_cv_size_max+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_size_max=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Found it" >/dev/null 2>&1; then :
+ gl_cv_size_max=yes
+fi
+rm -f conftest*
+
+ if test -z "$gl_cv_size_max"; then
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
+#include <limits.h>"; then :
+
+else
+ size_t_bits_minus_1=
+fi
+
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
+
+else
+ fits_in_uint=
+fi
+
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+$as_echo "$gl_cv_size_max" >&6; }
+ if test "$gl_cv_size_max" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZE_MAX $gl_cv_size_max
+_ACEOF
+
+ fi
+
+
+
+
+ gl_cv_func_snprintf_usable=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+
+
+
+ GNULIB_SNPRINTF=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_snprintf_posix=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
+$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_truncation_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_truncation_c99=yes
+else
+ gl_cv_func_snprintf_truncation_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
+$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_retval_c99=yes
+else
+ gl_cv_func_snprintf_retval_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
+$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
+$as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_snprintf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_directive_n=yes
+else
+ gl_cv_func_snprintf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
+$as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
+$as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
+if test "${gl_cv_func_vsnprintf_zerosize_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_vsnprintf_zerosize_c99=yes
+else
+ gl_cv_func_vsnprintf_zerosize_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
+$as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ case "$gl_cv_func_snprintf_truncation_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_retval_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_directive_n" in
+ *yes)
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ case "$gl_cv_func_vsnprintf_zerosize_c99" in
+ *yes)
+ # snprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_snprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
+$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
+if test "${gl_cv_next_spawn_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_spawn_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/spawn.h#{
+ s#.*"\(.*/spawn.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
+$as_echo "$gl_cv_next_spawn_h" >&6; }
+ fi
+ NEXT_SPAWN_H=$gl_cv_next_spawn_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'spawn.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_spawn_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_spawn_h = yes; then
+ HAVE_SPAWN_H=1
+ ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_POSIX_SPAWNATTR_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWNATTR_T=0
+fi
+
+ ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+fi
+
+ else
+ HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+
+ :
+
+ fi
+
+
+
+
+
+ for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawwn_file_actions_adddup2; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_sprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # sprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_sprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_sprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sprintf.$ac_objext"
+
+ REPLACE_SPRINTF=1
+ :
+
+ fi
+
+
+
+ GNULIB_SPRINTF_POSIX=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_ssize_t=yes
+else
+ gt_cv_ssize_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+ if test $gt_cv_ssize_t = no; then
+
+$as_echo "@%:@define ssize_t int" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
+$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
+if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+ *) gl_cv_func_stat_dir_slash="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st; return stat (".", &st) != stat ("./", &st);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_dir_slash=yes
+else
+ gl_cv_func_stat_dir_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
+$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
+if test "${gl_cv_func_stat_file_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_stat_file_slash="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st;
+ if (!stat ("conftest.tmp/", &st)) return 1;
+#if HAVE_LSTAT
+ if (!stat ("conftest.lnk/", &st)) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_file_slash=yes
+else
+ gl_cv_func_stat_file_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.tmp conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
+$as_echo "$gl_cv_func_stat_file_slash" >&6; }
+ case $gl_cv_func_stat_dir_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "@%:@define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
+;;
+ esac
+ case $gl_cv_func_stat_file_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "@%:@define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+;;
+ esac
+ if test $REPLACE_STAT = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
+
+
+ fi
+
+
+
+ GNULIB_STAT=1
+
+
+ STDARG_H='';
+ NEXT_STDARG_H='<stdarg.h>';
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+$as_echo_n "checking for va_copy... " >&6; }
+ if test "${gl_cv_func_va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_va_copy=yes
+else
+ gl_cv_func_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+$as_echo "$gl_cv_func_va_copy" >&6; }
+ if test $gl_cv_func_va_copy = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _AIX && !defined __GNUC__
+ AIX vaccine
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "vaccine" >/dev/null 2>&1; then :
+ gl_aixcc=yes
+else
+ gl_aixcc=no
+fi
+rm -f conftest*
+
+ if test $gl_aixcc = yes; then
+ STDARG_H=stdarg.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
+if test "${gl_cv_next_stdarg_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdarg_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdarg.h#{
+ s#.*"\(.*/stdarg.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+$as_echo "$gl_cv_next_stdarg_h" >&6; }
+ fi
+ NEXT_STDARG_H=$gl_cv_next_stdarg_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdarg.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdarg_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
+
+
+
+ if test "$gl_cv_next_stdarg_h" = '""'; then
+ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+ NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+ fi
+ else
+
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ if test "${gl_cv_func___va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef __va_copy
+error, bail out
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func___va_copy=yes
+else
+ gl_cv_func___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ as_echo_n="$saved_as_echo_n"
+
+ if test $gl_cv_func___va_copy = yes; then
+
+$as_echo "@%:@define va_copy __va_copy" >>confdefs.h
+
+ else
+
+
+$as_echo "@%:@define va_copy gl_va_copy" >>confdefs.h
+
+ fi
+ fi
+ fi
+
+
+
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wchar_t = no; then
+ HAVE_WCHAR_T=0
+ STDDEF_H=stddef.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_null_works=yes
+else
+ gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+ if test $gl_cv_decl_null_works = no; then
+ REPLACE_NULL=1
+ STDDEF_H=stddef.h
+ fi
+ if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stddef_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stddef.h#{
+ s#.*"\(.*/stddef.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+ fi
+ NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stddef.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stddef_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+ fi
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if test "${gl_cv_next_stdio_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdio_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdio.h#{
+ s#.*"\(.*/stdio.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
+ fi
+ NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdio.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdio_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
+
+
+
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+
+
+
+ for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if test "${gl_cv_next_stdlib_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdlib_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdlib.h#{
+ s#.*"\(.*/stdlib.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+$as_echo "$gl_cv_next_stdlib_h" >&6; }
+ fi
+ NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdlib.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdlib_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+
+
+
+ for ac_header in random.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_random_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RANDOM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+
+ ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+
+"
+if test "x$ac_cv_type_struct_random_data" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_RANDOM_DATA 1
+_ACEOF
+
+
+else
+ HAVE_STRUCT_RANDOM_DATA=0
+fi
+
+
+
+ for gl_func in atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_STDLIB_SAFER 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strchrnul
+do :
+ ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
+if test "x$ac_cv_func_strchrnul" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRCHRNUL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_strchrnul = no; then
+ HAVE_STRCHRNUL=0
+ :
+ fi
+
+
+
+ GNULIB_STRCHRNUL=1
+
+
+
+ if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define REPLACE_STRERROR $REPLACE_STRERROR
+_ACEOF
+
+ fi
+
+
+
+ GNULIB_STRERROR=1
+
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ if test $ac_cv_func_strndup = yes; then
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
+$as_echo_n "checking for working strndup... " >&6; }
+if test "${gl_cv_func_strndup_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ aix*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <string.h>
+ #include <stdlib.h>
+int
+main ()
+{
+
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strndup_works=yes
+else
+ gl_cv_func_strndup_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
+$as_echo "$gl_cv_func_strndup_works" >&6; }
+ case $gl_cv_func_strndup_works in
+ *no)
+ REPLACE_STRNDUP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ ;;
+ esac
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_STRNDUP=1
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+$as_echo_n "checking for working strnlen... " >&6; }
+if test "${ac_cv_func_strnlen_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strnlen_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
+
+ /* At least one implementation is buggy: that of AIX 4.3 would
+ give strnlen (S, 1) == 3. */
+
+ int i;
+ for (i = 0; i < S_LEN + 1; ++i)
+ {
+ int expected = i <= S_LEN ? i : S_LEN;
+ if (strnlen (S, i) != expected)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strnlen_working=yes
+else
+ ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+$as_echo "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no &&
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
+
+
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doesn't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ([strnlen])
+
+$as_echo "@%:@define strnlen rpl_strnlen" >>confdefs.h
+
+ :
+ fi
+
+
+
+ GNULIB_STRNLEN=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if test "${ac_cv_func_strtod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strtod=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+ {
+ /* Some versions of Linux strtod mis-parse strings with leading '+'. */
+ char *string = " +69";
+ char *term;
+ double value;
+ value = strtod (string, &term);
+ if (value != 69 || term != (string + 4))
+ return 1;
+ }
+
+ {
+ /* Under Solaris 2.4, strtod returns the wrong value for the
+ terminating character under some conditions. */
+ char *string = "NaN";
+ char *term;
+ strtod (string, &term);
+ if (term != string && *(term - 1) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strtod=yes
+else
+ ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+ if test $ac_cv_func_strtod = no; then
+ HAVE_STRTOD=0
+ REPLACE_STRTOD=1
+ :
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
+$as_echo_n "checking whether strtod obeys C99... " >&6; }
+if test "${gl_cv_func_strtod_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_strtod_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <math.h>
+#include <errno.h>
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+
+int
+main ()
+{
+
+ {
+ /* Older glibc and Cygwin mis-parse "-0x". */
+ const char *string = "-0x";
+ char *term;
+ double value = strtod (string, &term);
+ double zero = 0.0;
+ if (1.0 / value != -1.0 / zero || term != (string + 2))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
+ but mistakenly sets errno. */
+ const char *string = "inf";
+ char *term;
+ double value;
+ errno = 0;
+ value = strtod (string, &term);
+ if (value != HUGE_VAL || term != (string + 3) || errno)
+ return 1;
+ }
+ {
+ /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
+ const char *string = "nan()";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 5))
+ return 1;
+ }
+ {
+ /* darwin 10.6.1 misparses "nan(". */
+ const char *string = "nan(";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 3))
+ return 1;
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strtod_works=yes
+else
+ gl_cv_func_strtod_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
+$as_echo "$gl_cv_func_strtod_works" >&6; }
+ if test "$gl_cv_func_strtod_works" != yes; then
+ REPLACE_STRTOD=1
+ :
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+ fi
+ fi
+
+
+
+ GNULIB_STRTOD=1
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strtol
+do :
+ ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRTOL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_stat_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/stat.h#{
+ s#.*"\(.*/sys/stat.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+ fi
+ NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/stat.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+ for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
+if test "${gl_cv_next_sys_wait_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_wait_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/wait.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/wait.h#{
+ s#.*"\(.*/sys/wait.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+$as_echo "$gl_cv_next_sys_wait_h" >&6; }
+ fi
+ NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/wait.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+ for ac_func in __secure_getenv
+do :
+ ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
+if test "x$ac_cv_func___secure_getenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE___SECURE_GETENV 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
+if test "${gl_cv_next_unistd_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_unistd_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/unistd.h#{
+ s#.*"\(.*/unistd.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+$as_echo "$gl_cv_next_unistd_h" >&6; }
+ fi
+ NEXT_UNISTD_H=$gl_cv_next_unistd_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'unistd.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_unistd_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+
+
+
+ for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread readlink readlinkat rmdir sleep symlink symlinkat unlink unlinkat usleep; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define USE_UNLOCKED_IO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in unsetenv
+do :
+ ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_UNSETENV 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+$as_echo_n "checking for unsetenv() return type... " >&6; }
+if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_func_unsetenv_ret='int'
+else
+ gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+$as_echo "@%:@define VOID_UNSETENV 1" >>confdefs.h
+
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv works on duplicates" >&5
+$as_echo_n "checking whether unsetenv works on duplicates... " >&6; }
+if test "${gl_cv_func_unsetenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_unsetenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char entry[] = "b=2";
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry)) return 2;
+ entry[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_unsetenv_works=yes
+else
+ gl_cv_func_unsetenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+$as_echo "$gl_cv_func_unsetenv_works" >&6; }
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_UNSETENV=1
+
+
+
+ if test $ac_cv_func_vasnprintf = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasnprintf_posix=no
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasnprintf = yes; then
+ # vasnprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasnprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasnprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_vasprintf = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ GNULIB_VASPRINTF=1
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasprintf_posix=no
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vfprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # vfprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vfprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vfprintf.$ac_objext"
+
+ REPLACE_VFPRINTF=1
+
+$as_echo "@%:@define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VFPRINTF_POSIX=1
+
+
+
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vprintf.$ac_objext"
+
+ REPLACE_VPRINTF=1
+
+$as_echo "@%:@define REPLACE_VPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VPRINTF_POSIX=1
+
+
+
+
+ for ac_func in waitid
+do :
+ ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
+if test "x$ac_cv_func_waitid" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WAITID 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
+if test "${gl_cv_next_wchar_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wchar_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wchar.h#{
+ s#.*"\(.*/wchar.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+$as_echo "$gl_cv_next_wchar_h" >&6; }
+ fi
+ NEXT_WCHAR_H=$gl_cv_next_wchar_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wchar.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wchar_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+
+ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_WCRTOMB=1
+ fi
+
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ fi
+ if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
+if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcrtomb_retval=yes
+else
+ gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCRTOMB=1
+
+
+
+
+
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ case "$host_os" in
+ mingw*)
+ ;;
+ *)
+ WCTYPE_H=
+ ;;
+ esac
+ fi
+ fi
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wctype_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wctype.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wctype.h#{
+ s#.*"\(.*/wctype.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
+ fi
+ NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wctype.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wctype_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+
+
+
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+
+
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcwidth" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_WCWIDTH $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
+$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
+if test "${gl_cv_func_wcwidth_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcwidth_works=yes
+else
+ gl_cv_func_wcwidth_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
+$as_echo "$gl_cv_func_wcwidth_works" >&6; }
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcwidth.$ac_objext"
+
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCWIDTH=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
+
+
+
+
+ :
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmemdup0.$ac_objext"
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
+
+
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+ :
+
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+
+
+
+
+
+
+
+
+
+
+ gltests_libdeps=
+ gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+ gl_source_base='tests/gnu'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
+
+
+ for ac_func in getpagesize
+do :
+ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ for ac_header in OS.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OS_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ for ac_header in sys/param.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_PARAM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
+
+ ;;
+ esac
+
+
+
+ GNULIB_GETPAGESIZE=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
+$as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!link ("conftest.a", "conftest.b/")) return 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b")) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_link_works=yes
+else
+ gl_cv_func_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.a conftest.b conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
+$as_echo "$gl_cv_func_link_works" >&6; }
+ if test "$gl_cv_func_link_works" != yes; then
+ REPLACE_LINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_LINK=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+
+ if test $ac_cv_func_obstack_printf = no ; then
+
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF=1
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+[
+ #if defined _MSC_VER || defined __MINGW32__
+ notposix
+ #endif
+ ]
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "notposix" >/dev/null 2>&1; then :
+ posix_spawn_ported=no
+else
+ posix_spawn_ported=yes
+fi
+rm -f conftest*
+
+ if test $posix_spawn_ported = yes; then
+ POSIX_SPAWN_PORTED_TRUE=
+ POSIX_SPAWN_PORTED_FALSE='#'
+else
+ POSIX_SPAWN_PORTED_TRUE='#'
+ POSIX_SPAWN_PORTED_FALSE=
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
+if test "${gl_cv_func_svid_putenv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_svid_putenv=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_svid_putenv=yes
+else
+ gl_cv_func_svid_putenv=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
+$as_echo "$gl_cv_func_svid_putenv" >&6; }
+ if test $gl_cv_func_svid_putenv = no; then
+ REPLACE_PUTENV=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_PUTENV=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+$as_echo "@%:@define CHECK_SNPRINTF_POSIX 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "@%:@define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "@%:@define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+
+
+
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
+
+ else
+
+
+
+
+
+
+
+
+ for ac_func in strdup
+do :
+ ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRDUP 1
+_ACEOF
+
+else
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ fi
+
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ :
+
+
+
+ GNULIB_STRDUP=1
+
+
+
+
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_symlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_symlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!symlink ("a", "conftest.link/")) return 1;
+ if (symlink ("conftest.f", "conftest.lnk2")) return 2;
+ if (!symlink ("a", "conftest.lnk2/")) return 3;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_symlink_works=yes
+else
+ gl_cv_func_symlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+$as_echo "$gl_cv_func_symlink_works" >&6; }
+ if test "$gl_cv_func_symlink_works" != yes; then
+ REPLACE_SYMLINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_SYMLINK=1
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
+$as_echo_n "checking whether wctob works... " >&6; }
+if test "${gl_cv_func_wctob_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wctob_works=yes
+else
+ gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
+$as_echo "$gl_cv_func_wctob_works" >&6; }
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+ ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wctob" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_WCTOB $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_WCTOB=1
+
+
+
+
+
+
+
+
+
+
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+
+
+
+
+@%:@ Check whether --with-packager was given.
+if test "${with_packager+set}" = set; then :
+ withval=$with_packager; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+@%:@ Check whether --with-packager-version was given.
+if test "${with_packager_version+set}" = set; then :
+ withval=$with_packager_version; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER_VERSION "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+@%:@ Check whether --with-packager-bug-reports was given.
+if test "${with_packager_bug_reports+set}" = set; then :
+ withval=$with_packager_bug_reports; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+ if test "X$with_packager" = "X" && \
+ test "X$with_packager_version$with_packager_bug_reports" != "X"
+ then
+ as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
+ fi
+
+
+# Gnulib doesn't always do things quite the way M4 would like...
+
+
+for ac_header in error.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "error.h" "ac_cv_header_error_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_error_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ERROR_H 1
+_ACEOF
+ ERROR_H=""
+else
+ ERROR_H="error.h"
+fi
+
+done
+
+
+
+if test $ac_cv_header_error_h = yes; then
+ INCLUDE_ERROR_H='#include <error.h>'
+else
+ INCLUDE_ERROR_H='#include <gnu/error.h>'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
+$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
+if test "${gl_cv_next_getopt_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_getopt_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/getopt.h#{
+ s#.*"\(.*/getopt.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
+$as_echo "$gl_cv_next_getopt_h" >&6; }
+ fi
+ NEXT_GETOPT_H=$gl_cv_next_getopt_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'getopt.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_getopt_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+
+
+ gl_replace_getopt=
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_header in getopt.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETOPT_H 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_func in getopt_long_only
+do :
+ ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
+if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETOPT_LONG_ONLY 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
+"
+if test "x$ac_cv_have_decl_optreset" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_OPTRESET $ac_have_decl
+_ACEOF
+
+ fi
+
+ if test -z "$gl_replace_getopt"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
+$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
+if test "${gl_cv_func_getopt_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !HAVE_DECL_OPTRESET
+# define OPTIND_MIN 0
+#else
+# define OPTIND_MIN 1
+#endif
+
+int
+main ()
+{
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (argc, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ }
+ /* Some internal state exists at this point. */
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ }
+
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_posix=yes
+else
+ gl_cv_func_getopt_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
+$as_echo "$gl_cv_func_getopt_posix" >&6; }
+ case "$gl_cv_func_getopt_posix" in
+ *no) gl_replace_getopt=yes ;;
+ esac
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
+$as_echo_n "checking for working GNU getopt function... " >&6; }
+if test "${gl_cv_func_getopt_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+ # optstring is necessary for programs like m4 that have POSIX-mandated
+ # semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
+ gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+ if test "$cross_compiling" = yes; then :
+ case $host_os:$ac_cv_have_decl_optreset in
+ *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+ *:yes) gl_cv_func_getopt_gnu=no;;
+ *) gl_cv_func_getopt_gnu=yes;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+
+int
+main ()
+{
+
+ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+ and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ OSF/1 5.1, Solaris 10. */
+ {
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ opterr = 0;
+ if (getopt (2, myargv, "+a") != '?')
+ return 1;
+ }
+ /* This code succeeds on glibc 2.8, mingw,
+ and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ {
+ char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+ optind = 1;
+ if (getopt (4, argv, "p::") != 'p')
+ return 2;
+ if (optarg != NULL)
+ return 3;
+ if (getopt (4, argv, "p::") != -1)
+ return 4;
+ if (optind != 2)
+ return 5;
+ }
+ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
+ {
+ char *argv[] = { "program", "foo", "-p", NULL };
+ optind = 0;
+ if (getopt (3, argv, "-p") != 1)
+ return 6;
+ if (getopt (3, argv, "-p") != 'p')
+ return 7;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_gnu=yes
+else
+ gl_cv_func_getopt_gnu=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ if test "$gl_had_POSIXLY_CORRECT" != yes; then
+ { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
+$as_echo "$gl_cv_func_getopt_gnu" >&6; }
+ if test "$gl_cv_func_getopt_gnu" = "no"; then
+ gl_replace_getopt=yes
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getenv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if test -n "$gl_replace_getopt"; then :
+
+
+
+ GETOPT_H=getopt.h
+
+$as_echo "@%:@define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+ GNULIB_UNISTD_H_GETOPT=1
+ M4_replace_getopt=:
+ M4_replace_getopt=:
+
+
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -n "$M4_replace_getopt"; then
+ GETOPT_TRUE=
+ GETOPT_FALSE='#'
+else
+ GETOPT_TRUE='#'
+ GETOPT_FALSE=
+fi
+
+
+
+
+@%:@ Check whether --with-included-obstack was given.
+if test "${with_included_obstack+set}" = set; then :
+ withval=$with_included_obstack;
+fi
+
+
+for ac_header in obstack.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "obstack.h" "ac_cv_header_obstack_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_obstack_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OBSTACK_H 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "x${with_included_obstack-no}" != xno; then
+ ac_cv_func_obstack=no
+fi
+
+OBSTACK_H=
+if test $ac_cv_func_obstack = yes; then
+ INCLUDE_OBSTACK_H='#include <obstack.h>'
+else
+ INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
+ OBSTACK_H=obstack.h
+fi
+
+
+
+
+if test $ac_use_included_regex = no; then
+ INCLUDE_REGEX_H='#include <regex.h>'
+ REGEX_H=
+else
+ INCLUDE_REGEX_H='#include <gnu/regex.h>'
+ REGEX_H=regex.h
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
+$as_echo_n "checking whether an open file can be renamed... " >&6; }
+if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ M4_cv_func_rename_open_file_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+FILE *f = fopen ("conftest.1", "w+");
+ int result = rename ("conftest.1", "conftest.2");
+ fclose (f); remove ("conftest.1"); remove ("conftest.2");
+ return result;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ M4_cv_func_rename_open_file_works=yes
+else
+ M4_cv_func_rename_open_file_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
+$as_echo "$M4_cv_func_rename_open_file_works" >&6; }
+if test "$M4_cv_func_rename_open_file_works" = yes ; then
+ M4_rename_open_works=1
+else
+ M4_rename_open_works=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
+_ACEOF
+
+
+
+
+## ------------------------ ##
+## Other external programs. ##
+## ------------------------ ##
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PERL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+## --------------------------- ##
+## C compiler characteristics. ##
+## --------------------------- ##
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define size_t unsigned int
+_ACEOF
+
+fi
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
+$as_echo_n "checking size of long long int... " >&6; }
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long int)
+See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ ac_cv_sizeof_long_long_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
+$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+
+
+
+## ------------------------- ##
+## C headers required by M4. ##
+## ------------------------- ##
+
+
+
+
+if test $ac_cv_header_stdbool_h = yes; then
+ INCLUDE_STDBOOL_H='#include <stdbool.h>'
+else
+ INCLUDE_STDBOOL_H='#include <gnu/stdbool.h>'
+fi
+
+
+
+
+## --------------------------------- ##
+## Library functions required by M4. ##
+## --------------------------------- ##
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
+$as_echo_n "checking if malloc debugging is wanted... " >&6; }
+
+@%:@ Check whether --with-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then :
+ withval=$with_dmalloc; if test "$withval" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "@%:@define WITH_DMALLOC 1" >>confdefs.h
+
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_signal=int
+else
+ ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ac_fn_c_check_member "$LINENO" "stack_t" "ss_sp" "ac_cv_member_stack_t_ss_sp" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_member_stack_t_ss_sp" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STACK_T_SS_SP 1
+_ACEOF
+
+
+fi
+
+
+# Code from Jim Avera <jima@netcom.com>.
+# stackovf.c requires:
+# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
+# 2. Either sigaltstack or sigstack
+# 3. getrlimit, including support for RLIMIT_STACK
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if stack overflow is detectable" >&5
+$as_echo_n "checking if stack overflow is detectable... " >&6; }
+if test "${M4_cv_use_stackovf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_use_stackovf=no
+if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
+ if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <signal.h>
+
+int
+main ()
+{
+struct rlimit r; getrlimit (RLIMIT_STACK, &r);
+#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
+ && (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
+choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ M4_cv_use_stackovf=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_use_stackovf" >&5
+$as_echo "$M4_cv_use_stackovf" >&6; }
+
+ if test "$M4_cv_use_stackovf" = yes; then
+ STACKOVF_TRUE=
+ STACKOVF_FALSE='#'
+else
+ STACKOVF_TRUE='#'
+ STACKOVF_FALSE=
+fi
+
+if test "$M4_cv_use_stackovf" = yes; then
+
+$as_echo "@%:@define USE_STACKOVF 1" >>confdefs.h
+
+ ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "#include <sys/resource.h>
+
+"
+if test "x$ac_cv_type_rlim_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RLIM_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define rlim_t int" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_stack_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STACK_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define stack_t struct sigaltstack" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "sigcontext" "ac_cv_type_sigcontext" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_sigcontext" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGCONTEXT 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+struct sigaltstack x; x.ss_base = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "@%:@define ss_sp ss_base" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+# This is for the modules
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+for ac_func in strftime
+do :
+ ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRFTIME 1
+_ACEOF
+
+else
+ # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_strftime=yes
+else
+ ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
+ $as_echo "@%:@define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+## ------------------ ##
+## Configure options. ##
+## ------------------ ##
+
+for ac_header in gmp.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gmp_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GMP_H 1
+_ACEOF
+
+fi
+
+done
+
+
+# Some versions of gmp provide mpq_init as a macro, so we need to
+# include the header file, otherwise the detection will fail.
+M4_gmp_save_LIBS="$LIBS"
+LIBS="$LIBS -lgmp"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_GMP_H
+# include <gmp.h>
+#endif
+int
+main ()
+{
+mpq_t n; mpq_init (n);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBADD_GMP=-lgmp
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$M4_gmp_save_LIBS
+
+
+
+@%:@ Check whether --with-gmp was given.
+if test "${with_gmp+set}" = set; then :
+ withval=$with_gmp; use_gmp=$withval
+else
+ use_gmp=yes
+fi
+
+
+case $use_gmp:$LIBADD_GMP:$ac_cv_header_gmp_h in
+ no:*)
+ M4_cv_using_lib_gmp=no
+ ;;
+ *::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&5
+$as_echo "$as_me: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ *:-lgmp:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp works but \`gmp.h' is missing" >&5
+$as_echo "$as_me: WARNING: gmp works but \`gmp.h' is missing" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ yes:*:yes)
+ M4_cv_using_lib_gmp=yes
+ ;;
+ *)
+ M4_cv_using_lib_gmp=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not detect gmp library" >&5
+$as_echo "$as_me: WARNING: could not detect gmp library" >&2;}
+ ;;
+esac
+
+
+# Don't try to link in libgmp if we are not using it after the last call
+if test "$M4_cv_using_lib_gmp" = yes; then
+
+$as_echo "@%:@define USE_GMP 1" >>confdefs.h
+
+fi
+
+USE_GMP=$M4_cv_using_lib_gmp
+
+
+ if test "x$USE_GMP" = xyes; then
+ USE_GMP_TRUE=
+ USE_GMP_FALSE='#'
+else
+ USE_GMP_TRUE='#'
+ USE_GMP_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
+$as_echo_n "checking which shell to use for syscmd... " >&6; }
+
+@%:@ Check whether --with-syscmd-shell was given.
+if test "${with_syscmd_shell+set}" = set; then :
+ withval=$with_syscmd_shell; case $withval in
+ yes) with_syscmd_shell=no;;
+ esac
+else
+ with_syscmd_shell=no
+fi
+
+if test "$with_syscmd_shell" = no ; then
+ with_syscmd_shell=/bin/sh
+ if test "$cross_compiling" != yes ; then
+ if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
+
+else
+ if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
+fi
+ M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
+ command -p getconf PATH
+ else
+ echo "/bin$PATH_SEPARATOR$PATH"
+ fi`
+ do
+ IFS=$M4_save_IFS
+ test -z "$M4_dir" && continue
+ { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
+ && { with_syscmd_shell=$M4_dir/sh; break; }
+ done
+ IFS=$M4_save_IFS
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
+$as_echo "$with_syscmd_shell" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define M4_SYSCMD_SHELL "$with_syscmd_shell"
+_ACEOF
+
+
+
+
+## -------- ##
+## Outputs. ##
+## -------- ##
+ac_config_files="$ac_config_files Makefile gnu/Makefile doc/Makefile m4/system.h:m4/system_.h tests/atlocal tests/gnu/Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+LT_CONFIG_H=gnu/config.h
+
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ ltdl_LIBOBJS=$_ltdl_libobjs
+
+ ltdl_LTLIBOBJS=$_ltdl_ltlibobjs
+
+
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
+
+
+CONFIG_INCLUDE=gnu/config.h
+
+
+ M4_libobjs=
+ M4_ltlibobjs=
+ if test -n "$M4_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4_libobjs="$M4_libobjs $i.$ac_objext"
+ M4_ltlibobjs="$M4_ltlibobjs $i.lo"
+ done
+ fi
+ M4_LIBOBJS=$M4_libobjs
+
+ M4_LTLIBOBJS=$M4_ltlibobjs
+
+
+
+if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
+ as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+ M4tests_libobjs=
+ M4tests_ltlibobjs=
+ if test -n "$M4tests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
+ M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
+ done
+ fi
+ M4tests_LIBOBJS=$M4tests_libobjs
+
+ M4tests_LTLIBOBJS=$M4tests_ltlibobjs
+
+
+if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then
+ as_fn_error $? "conditional \"GETOPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${STACKOVF_TRUE}" && test -z "${STACKOVF_FALSE}"; then
+ as_fn_error $? "conditional \"STACKOVF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_GMP_TRUE}" && test -z "${USE_GMP_FALSE}"; then
+ as_fn_error $? "conditional \"USE_GMP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in @%:@(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in @%:@((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+@%:@ script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} @%:@ as_fn_error
+
+
+@%:@ as_fn_set_status STATUS
+@%:@ -----------------------
+@%:@ Set @S|@? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} @%:@ as_fn_set_status
+
+@%:@ as_fn_exit STATUS
+@%:@ -----------------
+@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} @%:@ as_fn_exit
+
+@%:@ as_fn_unset VAR
+@%:@ ---------------
+@%:@ Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+@%:@ as_fn_append VAR VALUE
+@%:@ ----------------------
+@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
+@%:@ advantage of any shell optimizations that allow amortized linear growth over
+@%:@ repeated appends, instead of the typical quadratic growth present in naive
+@%:@ implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+@%:@ as_fn_arith ARG...
+@%:@ ------------------
+@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
+@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in @%:@(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} @%:@ as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in @%:@(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_links="$ac_config_links"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+GNU M4 config.status 1.9a.577-b3131-dirty
+configured by $0, generated by GNU Autoconf 2.67,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+GNUmakefile=$GNUmakefile
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
+ "gnu/config.h") CONFIG_HEADERS="$CONFIG_HEADERS gnu/config.h:gnu/config.hin" ;;
+ "tests/m4") CONFIG_FILES="$CONFIG_FILES tests/m4" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "m4/system.h") CONFIG_FILES="$CONFIG_FILES m4/system.h:m4/system_.h" ;;
+ "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
+ "tests/gnu/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gnu/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "tests/atconfig":C) cat >tests/atconfig <<ATEOF
+@%:@ Configurable variable values for building test suites.
+@%:@ Generated by $0.
+@%:@ Copyright (C) 2010 Free Software Foundation, Inc.
+
+# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
+at_testdir='tests'
+abs_builddir='$ac_abs_builddir'
+at_srcdir='$ac_srcdir'
+abs_srcdir='$ac_abs_srcdir'
+at_top_srcdir='$ac_top_srcdir'
+abs_top_srcdir='$ac_abs_top_srcdir'
+at_top_build_prefix='$ac_top_build_prefix'
+abs_top_builddir='$ac_abs_top_builddir'
+
+# Backward compatibility with Autotest <= 2.59b:
+at_top_builddir=\$at_top_build_prefix
+
+AUTOTEST_PATH='tests'
+
+SHELL=\${CONFIG_SHELL-'$SHELL'}
+ATEOF
+ ;;
+ "tests/m4":F) chmod +x tests/m4 ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "po-directories":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/autom4te.cache/output.1 b/autom4te.cache/output.1
new file mode 100644
index 00000000..56286fce
--- /dev/null
+++ b/autom4te.cache/output.1
@@ -0,0 +1,45149 @@
+@%:@! /bin/sh
+@%:@ Guess values for system-dependent variables and create Makefiles.
+@%:@ Generated by GNU Autoconf 2.67 for GNU M4 1.9a.577-b3131-dirty.
+@%:@
+@%:@ Report bugs to <bug-m4@gnu.org>.
+@%:@
+@%:@
+@%:@ Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+@%:@ 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+@%:@ Foundation, Inc.
+@%:@
+@%:@
+@%:@ This configure script is free software; the Free Software Foundation
+@%:@ gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in @%:@(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in @%:@((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in @%:@(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+@%:@ as_fn_unset VAR
+@%:@ ---------------
+@%:@ Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+@%:@ as_fn_set_status STATUS
+@%:@ -----------------------
+@%:@ Set @S|@? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} @%:@ as_fn_set_status
+
+@%:@ as_fn_exit STATUS
+@%:@ -----------------
+@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} @%:@ as_fn_exit
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} @%:@ as_fn_mkdir_p
+@%:@ as_fn_append VAR VALUE
+@%:@ ----------------------
+@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
+@%:@ advantage of any shell optimizations that allow amortized linear growth over
+@%:@ repeated appends, instead of the typical quadratic growth present in naive
+@%:@ implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+@%:@ as_fn_arith ARG...
+@%:@ ------------------
+@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
+@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+@%:@ script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} @%:@ as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in @%:@(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in @%:@(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+lt_ltdl_dir='ltdl'
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIB@&t@OBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='GNU M4'
+PACKAGE_TARNAME='m4'
+PACKAGE_VERSION='1.9a.577-b3131-dirty'
+PACKAGE_STRING='GNU M4 1.9a.577-b3131-dirty'
+PACKAGE_BUGREPORT='bug-m4@gnu.org'
+PACKAGE_URL='http://www.gnu.org/software/m4/'
+
+ac_unique_file="src/m4.h"
+ac_config_libobj_dir=gnu
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gt_needs=
+ac_func_list=
+ac_header_list=
+gl_getopt_required=POSIX
+ac_subst_vars='M4tests_LTLIBOBJS
+M4tests_LIBOBJS
+M4_LTLIBOBJS
+M4_LIBOBJS
+CONFIG_INCLUDE
+ltdl_LTLIBOBJS
+ltdl_LIBOBJS
+am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIB@&t@OBJS
+USE_GMP_FALSE
+USE_GMP_TRUE
+USE_GMP
+LIBADD_GMP
+STACKOVF_FALSE
+STACKOVF_TRUE
+INCLUDE_STDBOOL_H
+PERL
+INCLUDE_REGEX_H
+REGEX_H
+INCLUDE_OBSTACK_H
+OBSTACK_H
+GETOPT_FALSE
+GETOPT_TRUE
+GETOPT_H
+HAVE_GETOPT_H
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
+NEXT_GETOPT_H
+INCLUDE_ERROR_H
+ERROR_H
+LIBTESTS_LIBDEPS
+abs_aux_dir
+POSIX_SPAWN_PORTED_FALSE
+POSIX_SPAWN_PORTED_TRUE
+LOCALE_TR_UTF8
+REPLACE_ISWCNTRL
+WCTYPE_H
+HAVE_WCTYPE_H
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
+NEXT_WCTYPE_H
+HAVE_ISWCNTRL
+HAVE_WINT_T
+HAVE_WCHAR_H
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
+NEXT_WCHAR_H
+HAVE_UNISTD_H
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
+NEXT_UNISTD_H
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+TIME_H_DEFINES_STRUCT_TIMESPEC
+NEXT_AS_FIRST_DIRECTIVE_TIME_H
+NEXT_TIME_H
+REPLACE_TIMEGM
+REPLACE_STRPTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
+NEXT_SYS_WAIT_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+POW_LIB
+NEXT_AS_FIRST_DIRECTIVE_STRING_H
+NEXT_STRING_H
+HAVE_RANDOM_H
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
+NEXT_STDLIB_H
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H
+NEXT_STDIO_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+HAVE__BOOL
+STDBOOL_H
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H
+NEXT_STDARG_H
+STDARG_H
+HAVE_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
+NEXT_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+SCHED_H
+HAVE_STRUCT_SCHED_PARAM
+HAVE_SCHED_H
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H
+NEXT_SCHED_H
+REPLACE_POSIX_SPAWN
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T
+HAVE_POSIX_SPAWNATTR_T
+HAVE_POSIX_SPAWN
+GNULIB_POSIX_SPAWNATTR_DESTROY
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_SETPGROUP
+GNULIB_POSIX_SPAWNATTR_GETPGROUP
+GNULIB_POSIX_SPAWNATTR_SETFLAGS
+GNULIB_POSIX_SPAWNATTR_GETFLAGS
+GNULIB_POSIX_SPAWNATTR_INIT
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
+GNULIB_POSIX_SPAWNP
+GNULIB_POSIX_SPAWN
+UNDEFINE_STRTOK_R
+REPLACE_STRTOK_R
+REPLACE_STRSIGNAL
+REPLACE_STRNDUP
+REPLACE_STRERROR
+REPLACE_STRCASESTR
+REPLACE_STRSTR
+REPLACE_STRDUP
+REPLACE_MEMMEM
+REPLACE_MEMCHR
+HAVE_STRVERSCMP
+HAVE_DECL_STRSIGNAL
+HAVE_DECL_STRERROR
+HAVE_DECL_STRTOK_R
+HAVE_STRCASESTR
+HAVE_STRSEP
+HAVE_STRPBRK
+HAVE_DECL_STRNLEN
+HAVE_DECL_STRNDUP
+HAVE_DECL_STRDUP
+HAVE_STRCHRNUL
+HAVE_STPNCPY
+HAVE_STPCPY
+HAVE_RAWMEMCHR
+HAVE_DECL_MEMRCHR
+HAVE_MEMPCPY
+HAVE_DECL_MEMMEM
+HAVE_MBSLEN
+GNULIB_STRVERSCMP
+GNULIB_STRSIGNAL
+GNULIB_STRERROR
+GNULIB_MBSTOK_R
+GNULIB_MBSSEP
+GNULIB_MBSSPN
+GNULIB_MBSPBRK
+GNULIB_MBSCSPN
+GNULIB_MBSCASESTR
+GNULIB_MBSPCASECMP
+GNULIB_MBSNCASECMP
+GNULIB_MBSCASECMP
+GNULIB_MBSSTR
+GNULIB_MBSRCHR
+GNULIB_MBSCHR
+GNULIB_MBSNLEN
+GNULIB_MBSLEN
+GNULIB_STRTOK_R
+GNULIB_STRCASESTR
+GNULIB_STRSTR
+GNULIB_STRSEP
+GNULIB_STRPBRK
+GNULIB_STRNLEN
+GNULIB_STRNDUP
+GNULIB_STRDUP
+GNULIB_STRCHRNUL
+GNULIB_STPNCPY
+GNULIB_STPCPY
+GNULIB_RAWMEMCHR
+GNULIB_MEMRCHR
+GNULIB_MEMPCPY
+GNULIB_MEMMEM
+GNULIB_MEMCHR
+LOCALE_FR_UTF8
+LOCALE_ZH_CN
+LOCALE_JA
+NEXT_AS_FIRST_DIRECTIVE_MATH_H
+NEXT_MATH_H
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FCHMODAT
+LOCALCHARSET_TESTS_ENVIRONMENT
+GLIBC21
+HAVE_LANGINFO_ERA
+HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_H
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
+NEXT_LANGINFO_H
+REPLACE_NL_LANGINFO
+HAVE_NL_LANGINFO
+GNULIB_NL_LANGINFO
+UINT64_MAX_EQ_ULONG_MAX
+UINT32_MAX_LT_UINTMAX_MAX
+INT64_MAX_EQ_LONG_MAX
+INT32_MAX_LT_INTMAX_MAX
+PRIPTR_PREFIX
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
+NEXT_INTTYPES_H
+HAVE_DECL_STRTOUMAX
+HAVE_DECL_STRTOIMAX
+HAVE_DECL_IMAXDIV
+HAVE_DECL_IMAXABS
+GNULIB_STRTOUMAX
+GNULIB_STRTOIMAX
+GNULIB_IMAXDIV
+GNULIB_IMAXABS
+PRI_MACROS_BROKEN
+STDINT_H
+WINT_T_SUFFIX
+WCHAR_T_SUFFIX
+SIG_ATOMIC_T_SUFFIX
+SIZE_T_SUFFIX
+PTRDIFF_T_SUFFIX
+HAVE_SIGNED_WINT_T
+HAVE_SIGNED_WCHAR_T
+HAVE_SIGNED_SIG_ATOMIC_T
+BITSIZEOF_WINT_T
+BITSIZEOF_WCHAR_T
+BITSIZEOF_SIG_ATOMIC_T
+BITSIZEOF_SIZE_T
+BITSIZEOF_PTRDIFF_T
+APPLE_UNIVERSAL_BUILD
+HAVE_SYS_BITYPES_H
+HAVE_SYS_INTTYPES_H
+HAVE_STDINT_H
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H
+NEXT_STDINT_H
+HAVE_SYS_TYPES_H
+HAVE_INTTYPES_H
+HAVE_UNSIGNED_LONG_LONG_INT
+HAVE_LONG_LONG_INT
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H
+NEXT_ICONV_H
+ICONV_H
+REPLACE_ICONV_UTF
+REPLACE_ICONV_OPEN
+REPLACE_ICONV
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
+NEXT_SYS_TIME_H
+REPLACE_GETTIMEOFDAY
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+HAVE_GETTIMEOFDAY
+GNULIB_GETTIMEOFDAY
+REPLACE_TRUNCL
+REPLACE_SIGNBIT_USING_GCC
+REPLACE_SIGNBIT
+REPLACE_ROUNDL
+REPLACE_ROUNDF
+REPLACE_ROUND
+REPLACE_NAN
+REPLACE_LDEXPL
+REPLACE_ISNAN
+REPLACE_ISINF
+REPLACE_ISFINITE
+REPLACE_HUGE_VAL
+REPLACE_FREXPL
+REPLACE_FREXP
+REPLACE_FLOORL
+REPLACE_FLOORF
+REPLACE_CEILL
+REPLACE_CEILF
+HAVE_DECL_TRUNCF
+HAVE_DECL_TRUNC
+HAVE_DECL_TANL
+HAVE_DECL_SQRTL
+HAVE_DECL_SINL
+HAVE_DECL_LOGL
+HAVE_DECL_LDEXPL
+HAVE_DECL_FREXPL
+HAVE_DECL_EXPL
+HAVE_DECL_COSL
+HAVE_DECL_ATANL
+HAVE_DECL_ASINL
+HAVE_DECL_ACOSL
+HAVE_TANL
+HAVE_SQRTL
+HAVE_SINL
+HAVE_LOGL
+HAVE_ISNANL
+HAVE_ISNAND
+HAVE_ISNANF
+HAVE_EXPL
+HAVE_COSL
+HAVE_ATANL
+HAVE_ASINL
+HAVE_ACOSL
+GNULIB_TRUNCL
+GNULIB_TRUNCF
+GNULIB_TRUNC
+GNULIB_TANL
+GNULIB_SQRTL
+GNULIB_SINL
+GNULIB_SIGNBIT
+GNULIB_ROUNDL
+GNULIB_ROUNDF
+GNULIB_ROUND
+GNULIB_LOGL
+GNULIB_LDEXPL
+GNULIB_ISNANL
+GNULIB_ISNAND
+GNULIB_ISNANF
+GNULIB_ISNAN
+GNULIB_ISINF
+GNULIB_ISFINITE
+GNULIB_FREXPL
+GNULIB_FREXP
+GNULIB_FLOORL
+GNULIB_FLOORF
+GNULIB_EXPL
+GNULIB_COSL
+GNULIB_CEILL
+GNULIB_CEILF
+GNULIB_ATANL
+GNULIB_ASINL
+GNULIB_ACOSL
+FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
+NEXT_FLOAT_H
+REPLACE_VSPRINTF
+REPLACE_VSNPRINTF
+REPLACE_VPRINTF
+REPLACE_VFPRINTF
+REPLACE_VDPRINTF
+REPLACE_VASPRINTF
+REPLACE_STDIO_WRITE_FUNCS
+REPLACE_SPRINTF
+REPLACE_SNPRINTF
+REPLACE_RENAMEAT
+REPLACE_RENAME
+REPLACE_REMOVE
+REPLACE_PRINTF
+REPLACE_POPEN
+REPLACE_PERROR
+REPLACE_OBSTACK_PRINTF
+REPLACE_GETLINE
+REPLACE_GETDELIM
+REPLACE_FTELLO
+REPLACE_FTELL
+REPLACE_FSEEKO
+REPLACE_FSEEK
+REPLACE_FREOPEN
+REPLACE_FPURGE
+REPLACE_FPRINTF
+REPLACE_FOPEN
+REPLACE_FFLUSH
+REPLACE_FCLOSE
+REPLACE_DPRINTF
+HAVE_VDPRINTF
+HAVE_VASPRINTF
+HAVE_RENAMEAT
+HAVE_DPRINTF
+HAVE_DECL_VSNPRINTF
+HAVE_DECL_SNPRINTF
+HAVE_DECL_OBSTACK_PRINTF
+HAVE_DECL_GETLINE
+HAVE_DECL_GETDELIM
+HAVE_DECL_FPURGE
+GNULIB_VSPRINTF_POSIX
+GNULIB_VSNPRINTF
+GNULIB_VPRINTF_POSIX
+GNULIB_VPRINTF
+GNULIB_VFPRINTF_POSIX
+GNULIB_VFPRINTF
+GNULIB_VDPRINTF
+GNULIB_VASPRINTF
+GNULIB_STDIO_H_SIGPIPE
+GNULIB_SPRINTF_POSIX
+GNULIB_SNPRINTF
+GNULIB_RENAMEAT
+GNULIB_RENAME
+GNULIB_REMOVE
+GNULIB_PUTS
+GNULIB_PUTCHAR
+GNULIB_PUTC
+GNULIB_PRINTF_POSIX
+GNULIB_PRINTF
+GNULIB_POPEN
+GNULIB_PERROR
+GNULIB_OBSTACK_PRINTF_POSIX
+GNULIB_OBSTACK_PRINTF
+GNULIB_GETLINE
+GNULIB_GETDELIM
+GNULIB_FWRITE
+GNULIB_FTELLO
+GNULIB_FTELL
+GNULIB_FSEEKO
+GNULIB_FSEEK
+GNULIB_FREOPEN
+GNULIB_FPUTS
+GNULIB_FPUTC
+GNULIB_FPURGE
+GNULIB_FPRINTF_POSIX
+GNULIB_FPRINTF
+GNULIB_FOPEN
+GNULIB_FFLUSH
+GNULIB_FCLOSE
+GNULIB_DPRINTF
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
+NEXT_FCNTL_H
+REPLACE_OPENAT
+REPLACE_OPEN
+REPLACE_FCNTL
+HAVE_OPENAT
+HAVE_FCNTL
+GNULIB_OPENAT
+GNULIB_OPEN
+GNULIB_FCNTL
+EOVERFLOW_VALUE
+EOVERFLOW_HIDDEN
+ENOLINK_VALUE
+ENOLINK_HIDDEN
+EMULTIHOP_VALUE
+EMULTIHOP_HIDDEN
+ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
+NEXT_ERRNO_H
+PRAGMA_SYSTEM_HEADER
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+INCLUDE_NEXT
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+UNISTD_H_HAVE_WINSOCK2_H
+REPLACE_WRITE
+REPLACE_USLEEP
+REPLACE_UNLINKAT
+REPLACE_UNLINK
+REPLACE_SYMLINK
+REPLACE_SLEEP
+REPLACE_RMDIR
+REPLACE_READLINK
+REPLACE_PREAD
+REPLACE_LSEEK
+REPLACE_LINKAT
+REPLACE_LINK
+REPLACE_LCHOWN
+REPLACE_GETPAGESIZE
+REPLACE_GETGROUPS
+REPLACE_GETCWD
+REPLACE_FCHOWNAT
+REPLACE_FCHDIR
+REPLACE_DUP2
+REPLACE_DUP
+REPLACE_CLOSE
+REPLACE_CHOWN
+HAVE_USLEEP
+HAVE_UNLINKAT
+HAVE_SYS_PARAM_H
+HAVE_OS_H
+HAVE_DECL_GETLOGIN_R
+HAVE_DECL_ENVIRON
+HAVE_SYMLINKAT
+HAVE_SYMLINK
+HAVE_SLEEP
+HAVE_READLINKAT
+HAVE_READLINK
+HAVE_PREAD
+HAVE_PIPE2
+HAVE_LINKAT
+HAVE_LINK
+HAVE_LCHOWN
+HAVE_GETUSERSHELL
+HAVE_GETPAGESIZE
+HAVE_GETLOGIN
+HAVE_GETHOSTNAME
+HAVE_GETGROUPS
+HAVE_GETDTABLESIZE
+HAVE_GETDOMAINNAME
+HAVE_FTRUNCATE
+HAVE_FSYNC
+HAVE_FCHOWNAT
+HAVE_FACCESSAT
+HAVE_EUIDACCESS
+HAVE_DUP3
+HAVE_DUP2
+HAVE_CHOWN
+GNULIB_WRITE
+GNULIB_USLEEP
+GNULIB_UNLINKAT
+GNULIB_UNLINK
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_UNISTD_H_GETOPT
+GNULIB_SYMLINKAT
+GNULIB_SYMLINK
+GNULIB_SLEEP
+GNULIB_RMDIR
+GNULIB_READLINKAT
+GNULIB_READLINK
+GNULIB_PREAD
+GNULIB_PIPE2
+GNULIB_LSEEK
+GNULIB_LINKAT
+GNULIB_LINK
+GNULIB_LCHOWN
+GNULIB_GETUSERSHELL
+GNULIB_GETPAGESIZE
+GNULIB_GETLOGIN_R
+GNULIB_GETLOGIN
+GNULIB_GETHOSTNAME
+GNULIB_GETGROUPS
+GNULIB_GETDTABLESIZE
+GNULIB_GETDOMAINNAME
+GNULIB_GETCWD
+GNULIB_FTRUNCATE
+GNULIB_FSYNC
+GNULIB_FCHOWNAT
+GNULIB_FCHDIR
+GNULIB_FACCESSAT
+GNULIB_EUIDACCESS
+GNULIB_ENVIRON
+GNULIB_DUP3
+GNULIB_DUP2
+GNULIB_CLOSE
+GNULIB_CHOWN
+REPLACE_UNSETENV
+REPLACE_STRTOD
+REPLACE_SETENV
+REPLACE_REALPATH
+REPLACE_PUTENV
+REPLACE_MKSTEMP
+REPLACE_CANONICALIZE_FILE_NAME
+HAVE_UNSETENV
+HAVE_SYS_LOADAVG_H
+HAVE_STRUCT_RANDOM_DATA
+HAVE_STRTOULL
+HAVE_STRTOLL
+HAVE_STRTOD
+HAVE_SETENV
+HAVE_RPMATCH
+HAVE_REALPATH
+HAVE_REALLOC_POSIX
+HAVE_RANDOM_R
+HAVE_MKSTEMPS
+HAVE_MKOSTEMPS
+HAVE_MKOSTEMP
+HAVE_MKDTEMP
+HAVE_MALLOC_POSIX
+HAVE_GETSUBOPT
+HAVE_DECL_GETLOADAVG
+HAVE_CANONICALIZE_FILE_NAME
+HAVE_CALLOC_POSIX
+HAVE_ATOLL
+GNULIB_UNSETENV
+GNULIB_STRTOULL
+GNULIB_STRTOLL
+GNULIB_STRTOD
+GNULIB_SETENV
+GNULIB_RPMATCH
+GNULIB_REALPATH
+GNULIB_REALLOC_POSIX
+GNULIB_RANDOM_R
+GNULIB_PUTENV
+GNULIB_MKSTEMPS
+GNULIB_MKSTEMP
+GNULIB_MKOSTEMPS
+GNULIB_MKOSTEMP
+GNULIB_MKDTEMP
+GNULIB_MALLOC_POSIX
+GNULIB_GETSUBOPT
+GNULIB_GETLOADAVG
+GNULIB_CANONICALIZE_FILE_NAME
+GNULIB_CALLOC_POSIX
+GNULIB_ATOLL
+LOCALE_FR
+REPLACE_WCWIDTH
+REPLACE_WCSNRTOMBS
+REPLACE_WCSRTOMBS
+REPLACE_WCRTOMB
+REPLACE_MBSNRTOWCS
+REPLACE_MBSRTOWCS
+REPLACE_MBRLEN
+REPLACE_MBRTOWC
+REPLACE_MBSINIT
+REPLACE_WCTOB
+REPLACE_BTOWC
+REPLACE_MBSTATE_T
+HAVE_DECL_WCWIDTH
+HAVE_DECL_WCTOB
+HAVE_WCSNRTOMBS
+HAVE_WCSRTOMBS
+HAVE_WCRTOMB
+HAVE_MBSNRTOWCS
+HAVE_MBSRTOWCS
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBSINIT
+HAVE_BTOWC
+GNULIB_WCWIDTH
+GNULIB_WCSNRTOMBS
+GNULIB_WCSRTOMBS
+GNULIB_WCRTOMB
+GNULIB_MBSNRTOWCS
+GNULIB_MBSRTOWCS
+GNULIB_MBRLEN
+GNULIB_MBRTOWC
+GNULIB_MBSINIT
+GNULIB_WCTOB
+GNULIB_BTOWC
+ALLOCA_H
+ALLOCA
+LTALLOCA
+GL_COND_LIBTOOL_FALSE
+GL_COND_LIBTOOL_TRUE
+GETTEXT_H
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+LTLIBICONV
+LIBICONV
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+PREOPEN_DEPENDENCIES
+DLPREOPEN
+DYNAMIC_MODULES
+LTDLOPEN
+LT_CONFIG_H
+CONVENIENCE_LTDL_FALSE
+CONVENIENCE_LTDL_TRUE
+INSTALL_LTDL_FALSE
+INSTALL_LTDL_TRUE
+ARGZ_H
+sys_symbol_underscore
+LIBADD_DL
+LT_DLPREOPEN
+LIBADD_DLD_LINK
+LIBADD_SHL_LOAD
+LIBADD_DLOPEN
+LT_DLLOADERS
+INCLTDL
+LTDLINCL
+LTDLDEPS
+LIBLTDL
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+SED
+EGREP
+GREP
+CPP
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+RANLIB
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_largefile
+enable_debug
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_included_ltdl
+with_ltdl_include
+with_ltdl_lib
+enable_ltdl_install
+with_modules
+enable_nls
+enable_rpath
+with_libiconv_prefix
+with_libintl_prefix
+enable_assert
+with_included_regex
+with_packager
+with_packager_version
+with_packager_bug_reports
+with_included_obstack
+with_dmalloc
+with_gmp
+with_syscmd_shell
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures GNU M4 1.9a.577-b3131-dirty to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ @<:@@S|@ac_default_prefix@:>@
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ @<:@PREFIX@:>@
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root @<:@DATAROOTDIR/doc/m4@:>@
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of GNU M4 1.9a.577-b3131-dirty:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-largefile omit support for large files
+ --enable-debug build for debugging @<:@default=no@:>@
+ --enable-shared@<:@=PKGS@:>@ build shared libraries @<:@default=no@:>@
+ --enable-static@<:@=PKGS@:>@ build static libraries @<:@default=yes@:>@
+ --enable-fast-install@<:@=PKGS@:>@
+ optimize for fast installation @<:@default=yes@:>@
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-ltdl-install install libltdl
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-assert turn off assertions
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects @<:@default=use
+ both@:>@
+ --with-gnu-ld assume the C compiler uses GNU ld @<:@default=no@:>@
+ --with-included-ltdl use the GNU ltdl sources included here
+ --with-ltdl-include=DIR use the ltdl headers installed in DIR
+ --with-ltdl-lib=DIR use the libltdl.la installed in DIR
+ --with-modules=MODULES preload MODULES @<:@default: m4 traditional gnu@:>@
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+ --without-included-regex
+ don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).
+ --with-packager String identifying the packager of this software
+ --with-packager-version Packager-specific version information
+ --with-packager-bug-reports
+ Packager info for bug reports (URL/e-mail/...)
+ --with-included-obstack use the obstack implementation included here
+ --with-dmalloc use dmalloc, as in
+ http://www.dmalloc.com/dmalloc.tar.gz
+ --without-gmp don't use GNU multiple precision arithmetic library
+ --with-syscmd-shell shell used by syscmd @<:@/bin/sh@:>@
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+GNU M4 configure 1.9a.577-b3131-dirty
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+@%:@ ac_fn_c_try_compile LINENO
+@%:@ --------------------------
+@%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_compile
+
+@%:@ ac_fn_c_try_cpp LINENO
+@%:@ ----------------------
+@%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_cpp
+
+@%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+@%:@ -------------------------------------------------------
+@%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using
+@%:@ the include files in INCLUDES and setting the cache variable VAR
+@%:@ accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------- ##
+## Report this to bug-m4@gnu.org ##
+## ----------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_header_mongrel
+
+@%:@ ac_fn_c_try_run LINENO
+@%:@ ----------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes
+@%:@ that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_run
+
+@%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+@%:@ -------------------------------------------------------
+@%:@ Tests whether HEADER exists and can be compiled using the include files in
+@%:@ INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+@%:@include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_header_compile
+
+@%:@ ac_fn_c_try_link LINENO
+@%:@ -----------------------
+@%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_try_link
+
+@%:@ ac_fn_c_check_func LINENO FUNC VAR
+@%:@ ----------------------------------
+@%:@ Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_func
+
+@%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+@%:@ ---------------------------------------------
+@%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+@%:@ accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+@%:@ifndef $as_decl_name
+@%:@ifdef __cplusplus
+ (void) $as_decl_use;
+@%:@else
+ (void) $as_decl_name;
+@%:@endif
+@%:@endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_decl
+
+@%:@ ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+@%:@ -------------------------------------------
+@%:@ Tests whether TYPE exists after having included INCLUDES, setting cache
+@%:@ variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_type
+
+@%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+@%:@ --------------------------------------------
+@%:@ Tries to find the compile-time value of EXPR in a program that includes
+@%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be
+@%:@ computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) < 0)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@;
+test_array @<:@0@:>@ = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in @%:@((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+@%:@include <stdio.h>
+@%:@include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} @%:@ ac_fn_c_compute_int
+
+@%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+@%:@ ----------------------------------------------------
+@%:@ Tries to find if the field MEMBER exists in type AGGR, after including
+@%:@ INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval "test \"\${$4+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} @%:@ ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in @%:@((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+gt_needs="$gt_needs need-formatstring-macros"
+as_fn_append ac_func_list " btowc"
+as_fn_append ac_func_list " canonicalize_file_name"
+as_fn_append ac_func_list " getcwd"
+as_fn_append ac_func_list " readlink"
+as_fn_append ac_func_list " realpath"
+as_fn_append ac_header_list " sys/param.h"
+as_fn_append ac_func_list " dup2"
+as_fn_append ac_header_list " errno.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_func_list " fcntl"
+as_fn_append ac_header_list " fcntl.h"
+as_fn_append ac_func_list " mempcpy"
+as_fn_append ac_header_list " float.h"
+as_fn_append ac_header_list " stdio_ext.h"
+as_fn_append ac_func_list " __fpending"
+as_fn_append ac_func_list " fpurge"
+as_fn_append ac_func_list " __fpurge"
+as_fn_append ac_func_list " __freading"
+as_fn_append ac_func_list " getdtablesize"
+as_fn_append ac_header_list " sys/time.h"
+as_fn_append ac_func_list " gettimeofday"
+as_fn_append ac_header_list " iconv.h"
+as_fn_append ac_header_list " stdint.h"
+as_fn_append ac_header_list " wchar.h"
+as_fn_append ac_header_list " inttypes.h"
+as_fn_append ac_header_list " langinfo.h"
+as_fn_append ac_func_list " lstat"
+as_fn_append ac_header_list " math.h"
+as_fn_append ac_func_list " mbsinit"
+as_fn_append ac_func_list " mbrtowc"
+as_fn_append ac_func_list " mbslen"
+as_fn_append ac_header_list " sys/mman.h"
+as_fn_append ac_func_list " mprotect"
+as_fn_append ac_func_list " nl_langinfo"
+as_fn_append ac_func_list " obstack_printf"
+as_fn_append ac_func_list " vasnprintf"
+as_fn_append ac_func_list " pathconf"
+as_fn_append ac_func_list " pipe2"
+as_fn_append ac_func_list " posix_spawn"
+gl_printf_safe=yes
+as_fn_append ac_header_list " locale.h"
+as_fn_append ac_func_list " isblank"
+as_fn_append ac_func_list " iswctype"
+as_fn_append ac_func_list " wcscoll"
+as_fn_append ac_header_list " sched.h"
+as_fn_append ac_func_list " setenv"
+as_fn_append ac_func_list " sigaction"
+as_fn_append ac_func_list " sigaltstack"
+as_fn_append ac_func_list " siginterrupt"
+as_fn_append ac_header_list " signal.h"
+as_fn_append ac_header_list " spawn.h"
+as_fn_append ac_header_list " stdarg.h"
+as_fn_append ac_header_list " stddef.h"
+as_fn_append ac_header_list " stdio.h"
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_header_list " string.h"
+as_fn_append ac_func_list " strndup"
+as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_header_list " sys/wait.h"
+as_fn_append ac_header_list " time.h"
+as_fn_append ac_func_list " pipe"
+as_fn_append ac_func_list " wcrtomb"
+as_fn_append ac_func_list " iswcntrl"
+as_fn_append ac_header_list " wctype.h"
+as_fn_append ac_func_list " wcwidth"
+as_fn_append ac_func_list " link"
+as_fn_append ac_func_list " symlink"
+as_fn_append ac_func_list " wctob"
+M4_replace_getopt=
+gl_getopt_required=GNU
+as_fn_append ac_header_list " getopt.h"
+as_fn_append ac_header_list " limits.h"
+as_fn_append ac_func_list " calloc"
+as_fn_append ac_func_list " strerror"
+as_fn_append ac_header_list " siginfo.h"
+as_fn_append ac_func_list " sigstack"
+as_fn_append ac_func_list " sigvec"
+as_fn_append ac_func_list " gethostname"
+as_fn_append ac_func_list " mktime"
+as_fn_append ac_func_list " uname"
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+ac_config_commands="$ac_config_commands tests/atconfig"
+
+ac_config_headers="$ac_config_headers gnu/config.h:gnu/config.hin"
+
+ac_config_files="$ac_config_files tests/m4"
+
+
+
+## -------------------------- ##
+## M4 specific configuration. ##
+## -------------------------- ##
+
+
+
+M4_default_preload="m4 traditional gnu"
+
+
+## ------------------------ ##
+## Automake Initialization. ##
+## ------------------------ ##
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in @%:@((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+@%:@ Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='m4'
+ VERSION='1.9a.577-b3131-dirty'
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+## ------------------ ##
+## C compiler checks. ##
+## ------------------ ##
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $@%:@ != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+@%:@ Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "@%:@define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "@%:@define _MINIX 1" >>confdefs.h
+
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+$as_echo "@%:@define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "@%:@define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+
+
+ # IEEE behaviour is the default on all CPUs except Alpha and SH
+ # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+ # and the GCC 4.1.2 manual).
+ case "$host_cpu" in
+ alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+ sh*)
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+ esac
+
+ case $ac_cv_prog_cc_stdc in @%:@(
+ no) :
+ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; @%:@(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_cv_prog_cc_stdc=no
+fi
+
+fi
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+ if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+
+ case $ac_cv_prog_cc_stdc in @%:@(
+ no) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; @%:@(
+ '') :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; @%:@(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+ if test -z "$AB_PACKAGE"; then
+ AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
+$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
+
+ if test -z "$AB_VERSION"; then
+ AB_VERSION=${PACKAGE_VERSION:-$VERSION}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
+$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
+
+ hostname=`hostname`
+ if test "$hostname"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
+$as_echo "$as_me: autobuild hostname... $hostname" >&6;}
+ fi
+
+
+
+ date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
+$as_echo "$as_me: autobuild timestamp... $date" >&6;}
+ fi
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _FILE_OFFSET_BITS 64
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@define _LARGE_FILES 1
+@%:@include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+@%:@define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@ifdef __STDC__
+@%:@ include <limits.h>
+@%:@else
+@%:@ include <assert.h>
+@%:@endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation debug mode" >&5
+$as_echo_n "checking for compilation debug mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_debug-no}" >&5
+$as_echo "${enable_debug-no}" >&6; }
+
+: ${rm=rm -f}
+: ${RM=rm -f}
+
+set dummy $CC
+compiler="${compiler-$2}"
+test -n "$rm" || rm="rm -f"
+
+if test "X$enable_debug" = Xyes; then
+ @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=no
+fi
+
+
+
+
+
+
+
+
+
+
+$as_echo "@%:@define DEBUG 1" >>confdefs.h
+
+ M4_default_preload="m4 traditional gnu load \
+import modtest mpeval shadow stdlib time"
+ if test "$GCC" = yes; then
+ case "$CFLAGS" in
+ *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[^ ]* / /;s/-O[^ ]*$//'` ;;
+ esac
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -ggdb3" >&5
+$as_echo_n "checking if $compiler accepts -ggdb3... " >&6; }
+if test "${M4_cv_prog_compiler_ggdb3+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_ggdb3=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-ggdb3 -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_ggdb3=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_ggdb3" >&5
+$as_echo "$M4_cv_prog_compiler_ggdb3" >&6; }
+
+if test x"$M4_cv_prog_compiler_ggdb3" = xyes; then
+ CFLAGS="$CFLAGS -ggdb3"
+else
+ CFLAGS="$CFLAGS -g"
+fi
+
+ ;;
+ esac
+ CFLAGS="$CFLAGS -Wall"
+ WMORE="-Wshadow -Wpointer-arith -Wcast-align -Wnested-externs"
+ WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Winline"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts $WMORE" >&5
+$as_echo_n "checking if $compiler accepts $WMORE... " >&6; }
+if test "${M4_cv_prog_compiler_warning_flags+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_warning_flags=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$WMORE -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_warning_flags=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_warning_flags" >&5
+$as_echo "$M4_cv_prog_compiler_warning_flags" >&6; }
+
+if test x"$M4_cv_prog_compiler_warning_flags" = xyes; then
+ CFLAGS="$CFLAGS $WMORE"
+else
+ :
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -Wno-long-long" >&5
+$as_echo_n "checking if $compiler accepts -Wno-long-long... " >&6; }
+if test "${M4_cv_prog_compiler_wnolonglong+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_wnolonglong=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-Wno-long-long -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_wnolonglong=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_wnolonglong" >&5
+$as_echo "$M4_cv_prog_compiler_wnolonglong" >&6; }
+
+if test x"$M4_cv_prog_compiler_wnolonglong" = xyes; then
+ CFLAGS="$CFLAGS -Wno-long-long"
+else
+ :
+fi
+
+ else
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) CFLAGS="$CFLAGS -g" ;;
+ esac
+ fi
+else
+ @%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+ case "$CFLAGS" in
+ *-g* ) CFLAGS=`echo "$CFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+ case "$CXXFLAGS" in
+ *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+fi
+
+
+
+## ----------------------- ##
+## Libtool initialization. ##
+## ----------------------- ##
+
+
+
+
+
+
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:__oline__: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line __oline__ "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+@%:@ Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+enable_dlopen=yes
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+
+ @%:@ Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ @%:@ Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic@&t@ -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic@&t@ -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which extension is used for runtime loadable modules" >&5
+$as_echo_n "checking which extension is used for runtime loadable modules... " >&6; }
+if test "${libltdl_cv_shlibext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5
+$as_echo "$libltdl_cv_shlibext" >&6; }
+if test -n "$libltdl_cv_shlibext"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_MODULE_EXT "$libltdl_cv_shlibext"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variable specifies run-time module search path" >&5
+$as_echo_n "checking which variable specifies run-time module search path... " >&6; }
+if test "${lt_cv_module_path_var+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_module_path_var="$shlibpath_var"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_module_path_var" >&5
+$as_echo "$lt_cv_module_path_var" >&6; }
+if test -n "$lt_cv_module_path_var"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_MODULE_PATH_VAR "$lt_cv_module_path_var"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default library search path" >&5
+$as_echo_n "checking for the default library search path... " >&6; }
+if test "${lt_cv_sys_dlsearch_path+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlsearch_path" >&5
+$as_echo "$lt_cv_sys_dlsearch_path" >&6; }
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_DLSEARCH_PATH "$sys_dlsearch_path"
+_ACEOF
+
+fi
+
+
+LT_DLLOADERS=
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+LIBADD_DLOPEN=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
+int
+main ()
+{
+dlopen(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+
+$as_echo "@%:@define HAVE_LIBDL 1" >>confdefs.h
+
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ for ac_func in dlerror
+do :
+ ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror"
+if test "x$ac_cv_func_dlerror" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DLERROR 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$lt_save_LIBS"
+fi
+
+
+LIBADD_SHL_LOAD=
+ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+
+$as_echo "@%:@define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"
+fi
+
+fi
+
+
+
+case $host_os in
+darwin[1567].*)
+# We only want this for pre-Mac OS X 10.4.
+ ac_fn_c_check_func "$LINENO" "_dyld_func_lookup" "ac_cv_func__dyld_func_lookup"
+if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then :
+
+$as_echo "@%:@define HAVE_DYLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"
+fi
+
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+"
+if test "x$ac_cv_have_decl_cygwin_conv_path" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_CYGWIN_CONV_PATH $ac_have_decl
+_ACEOF
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+
+$as_echo "@%:@define HAVE_DLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"
+fi
+
+
+
+
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+
+$as_echo "@%:@define HAVE_LIBDLLOADER 1" >>confdefs.h
+
+fi
+
+
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5
+$as_echo_n "checking for _ prefix in compiled symbols... " >&6; }
+if test "${lt_cv_sys_symbol_underscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&5
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ rm -rf conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5
+$as_echo "$lt_cv_sys_symbol_underscore" >&6; }
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+
+
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to add an underscore for dlsym" >&5
+$as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; }
+if test "${libltdl_cv_need_uscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ if test "$cross_compiling" = yes; then :
+ libltdl_cv_need_uscore=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;;
+ x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;;
+ x$lt_dlunknown|x*) ;;
+ esac
+ else :
+ # compilation failed
+
+ fi
+fi
+rm -fr conftest*
+
+ LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_need_uscore" >&5
+$as_echo "$libltdl_cv_need_uscore" >&6; }
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+
+$as_echo "@%:@define NEED_USCORE 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether deplibs are loaded by dlopen" >&5
+$as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; }
+if test "${lt_cv_sys_dlopen_deplibs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[4-9]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[12345]*|irix6.[01]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[1234]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlopen_deplibs" >&5
+$as_echo "$lt_cv_sys_dlopen_deplibs" >&6; }
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+
+$as_echo "@%:@define LTDL_DLOPEN_DEPLIBS 1" >>confdefs.h
+
+fi
+
+:
+
+for ac_header in argz.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_argz_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ARGZ_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
+# include <argz.h>
+#endif
+"
+if test "x$ac_cv_type_error_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ERROR_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define error_t int" >>confdefs.h
+
+
+$as_echo "@%:@define __error_t_defined 1" >>confdefs.h
+
+fi
+
+
+ARGZ_H=
+for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \
+ argz_next argz_stringify
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ARGZ_H=argz.h;
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+done
+
+
+if test -z "$ARGZ_H"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if argz actually works" >&5
+$as_echo_n "checking if argz actually works... " >&6; }
+if test "${lt_cv_sys_argz_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host_os in #(
+ *cygwin*)
+ lt_cv_sys_argz_works=no
+ if test "$cross_compiling" != no; then
+ lt_cv_sys_argz_works="guessing no"
+ else
+ lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+ save_IFS=$IFS
+ IFS=-.
+ set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+ IFS=$save_IFS
+ lt_os_major=${2-0}
+ lt_os_minor=${3-0}
+ lt_os_micro=${4-0}
+ if test "$lt_os_major" -gt 1 \
+ || { test "$lt_os_major" -eq 1 \
+ && { test "$lt_os_minor" -gt 5 \
+ || { test "$lt_os_minor" -eq 5 \
+ && test "$lt_os_micro" -gt 24; }; }; }; then
+ lt_cv_sys_argz_works=yes
+ fi
+ fi
+ ;; #(
+ *) lt_cv_sys_argz_works=yes ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5
+$as_echo "$lt_cv_sys_argz_works" >&6; }
+ if test $lt_cv_sys_argz_works = yes; then :
+
+$as_echo "@%:@define HAVE_WORKING_ARGZ 1" >>confdefs.h
+
+else
+ ARGZ_H=argz.h
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool supports -dlopen/-dlpreopen" >&5
+$as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; }
+if test "${libltdl_cv_preloaded_symbols+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$lt_cv_sys_global_symbol_pipe"; then
+ libltdl_cv_preloaded_symbols=yes
+ else
+ libltdl_cv_preloaded_symbols=no
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_preloaded_symbols" >&5
+$as_echo "$libltdl_cv_preloaded_symbols" >&6; }
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+
+$as_echo "@%:@define HAVE_PRELOADED_SYMBOLS 1" >>confdefs.h
+
+fi
+
+# Set options
+
+
+
+
+
+
+
+
+
+
+
+@%:@ Check whether --with-included_ltdl was given.
+if test "${with_included_ltdl+set}" = set; then :
+ withval=$with_included_ltdl;
+fi
+
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default
+
+"
+if test "x$ac_cv_header_ltdl_h" = x""yes; then :
+ ac_fn_c_check_decl "$LINENO" "lt_dlinterface_register" "ac_cv_have_decl_lt_dlinterface_register" "$ac_includes_default
+ #include <ltdl.h>
+"
+if test "x$ac_cv_have_decl_lt_dlinterface_register" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dladvise_preload in -lltdl" >&5
+$as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dladvise_preload+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dladvise_preload ();
+int
+main ()
+{
+return lt_dladvise_preload ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dladvise_preload=yes
+else
+ ac_cv_lib_ltdl_lt_dladvise_preload=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = x""yes; then :
+ with_included_ltdl=no
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+
+fi
+
+
+
+
+@%:@ Check whether --with-ltdl_include was given.
+if test "${with_ltdl_include+set}" = set; then :
+ withval=$with_ltdl_include;
+fi
+
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ as_fn_error $? "invalid ltdl include directory: \`$with_ltdl_include'" "$LINENO" 5
+ fi
+else
+ with_ltdl_include=no
+fi
+
+
+@%:@ Check whether --with-ltdl_lib was given.
+if test "${with_ltdl_lib+set}" = set; then :
+ withval=$with_ltdl_lib;
+fi
+
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ as_fn_error $? "invalid ltdl library directory: \`$with_ltdl_lib'" "$LINENO" 5
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ case $enable_ltdl_convenience in
+ no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+esac
+LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+LTDLDEPS=$LIBLTDL
+LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+
+
+
+
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+
+
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+
+$as_echo "@%:@define HAVE_LTDL 1" >>confdefs.h
+
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ as_fn_error $? "\`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" "$LINENO" 5
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl headers" >&5
+$as_echo_n "checking where to find libltdl headers... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LTDLINCL" >&5
+$as_echo "$LTDLINCL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl library" >&5
+$as_echo_n "checking where to find libltdl library... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLTDL" >&5
+$as_echo "$LIBLTDL" >&6; }
+
+
+
+@%:@ Check whether --enable-ltdl-install was given.
+if test "${enable_ltdl_install+set}" = set; then :
+ enableval=$enable_ltdl_install;
+fi
+
+
+case ,${enable_ltdl_install},${enable_ltdl_convenience} in
+ *yes*) ;;
+ *) enable_ltdl_convenience=yes ;;
+esac
+
+ if test x"${enable_ltdl_install-no}" != xno; then
+ INSTALL_LTDL_TRUE=
+ INSTALL_LTDL_FALSE='#'
+else
+ INSTALL_LTDL_TRUE='#'
+ INSTALL_LTDL_FALSE=
+fi
+
+ if test x"${enable_ltdl_convenience-no}" != xno; then
+ CONVENIENCE_LTDL_TRUE=
+ CONVENIENCE_LTDL_FALSE='#'
+else
+ CONVENIENCE_LTDL_TRUE='#'
+ CONVENIENCE_LTDL_FALSE=
+fi
+
+
+
+
+
+
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+
+
+
+for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in closedir opendir readdir
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext"
+
+fi
+done
+
+for ac_func in strlcat strlcpy
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext"
+
+fi
+done
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LT_LIBEXT "$libext"
+_ACEOF
+
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+
+
+
+
+
+
+
+
+# Only expand once:
+
+
+
+# The lt_dlhandle_iterate symbol was added with libtool-2.2
+if test "x$with_included_ltdl" != "xyes"; then
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS $LTDLINCL"
+ LDFLAGS="$LDFLAGS $LIBLTDL"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlhandle_iterate in -lltdl" >&5
+$as_echo_n "checking for lt_dlhandle_iterate in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dlhandle_iterate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dlhandle_iterate ();
+int
+main ()
+{
+return lt_dlhandle_iterate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=yes
+else
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlhandle_iterate" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlhandle_iterate" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlhandle_iterate" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBLTDL 1
+_ACEOF
+
+ LIBS="-lltdl $LIBS"
+
+else
+ as_fn_error $? "installed libltdl is too old" "$LINENO" 5
+fi
+
+ LDFLAGS="$save_LDFLAGS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+
+# Use gcc's -pipe option if available: for faster compilation.
+case "$CFLAGS" in
+ *-pipe* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -pipe" >&5
+$as_echo_n "checking if $compiler supports -pipe... " >&6; }
+if test "${M4_cv_prog_compiler_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_pipe=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-pipe -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:__oline__: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_pipe=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_pipe" >&5
+$as_echo "$M4_cv_prog_compiler_pipe" >&6; }
+
+if test x"$M4_cv_prog_compiler_pipe" = xyes; then
+ CFLAGS="$CFLAGS -pipe"
+else
+ :
+fi
+
+ ;;
+esac
+
+## ------------------------------- ##
+## Preloaded module configuration. ##
+## ------------------------------- ##
+if test "x$enable_shared" != xno; then :
+ DYNAMIC_MODULES=yes
+else
+ DYNAMIC_MODULES=no
+fi
+DYNAMIC_MODULES=$DYNAMIC_MODULES
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for modules to preload" >&5
+$as_echo_n "checking for modules to preload... " >&6; }
+ DLPREOPEN=
+
+
+@%:@ Check whether --with-modules was given.
+if test "${with_modules+set}" = set; then :
+ withval=$with_modules; use_modules="$withval"
+else
+ use_modules="$M4_default_preload"
+fi
+
+
+ PREOPEN_DEPENDENCIES=
+ DLPREOPEN="-dlpreopen force"
+ if test -z "$use_modules"; then
+ use_modules=none
+ else
+ if test "$use_modules" != yes; then
+ for module in $use_modules; do
+ case $module in
+ no|none) break ;;
+ m4|traditional|gnu|load|mpeval) dir=modules ;;
+ import|modtest|shadow|stdlib|time) dir=tests ;;
+ *) as_fn_error $? "Unrecognized module \`$module' in --with-modules" "$LINENO" 5
+ ;;
+ esac
+ DLPREOPEN="$DLPREOPEN -dlpreopen $dir/$module.la"
+ PREOPEN_DEPENDENCIES="$PREOPEN_DEPENDENCIES $dir/$module.la"
+ done
+ fi
+ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_modules" >&5
+$as_echo "$use_modules" >&6; }
+
+
+
+
+## ---------------- ##
+## Gettext support. ##
+## ---------------- ##
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ @%:@ Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$localedir" || localedir='${datadir}/locale'
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ @%:@ Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if test "${gl_cv_solaris_64bit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+ gl_cv_solaris_64bit=yes
+else
+ gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "@%:@define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "@%:@define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libc=yes"
+else
+ eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "@%:@define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+@%:@ Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ HAVE_LIBINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libintl=yes"
+else
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ fi
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+$as_echo "@%:@define ENABLE_NLS 1" >>confdefs.h
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+$as_echo "@%:@define HAVE_GETTEXT 1" >>confdefs.h
+
+
+$as_echo "@%:@define HAVE_DCGETTEXT 1" >>confdefs.h
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+for ac_header in gettext.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gettext.h" "ac_cv_header_gettext_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gettext_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETTEXT_H 1
+_ACEOF
+ GETTEXT_H=""
+else
+ GETTEXT_H="gettext.h"
+fi
+
+done
+
+
+
+ac_config_files="$ac_config_files po/Makefile.in"
+
+
+
+
+
+## --------------- ##
+## Gnulib support. ##
+## --------------- ##
+
+
+
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+
+
+
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "@%:@define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+@%:@define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+ GNULIB_BTOWC=0;
+ GNULIB_WCTOB=0;
+ GNULIB_MBSINIT=0;
+ GNULIB_MBRTOWC=0;
+ GNULIB_MBRLEN=0;
+ GNULIB_MBSRTOWCS=0;
+ GNULIB_MBSNRTOWCS=0;
+ GNULIB_WCRTOMB=0;
+ GNULIB_WCSRTOMBS=0;
+ GNULIB_WCSNRTOMBS=0;
+ GNULIB_WCWIDTH=0;
+ HAVE_BTOWC=1;
+ HAVE_MBSINIT=1;
+ HAVE_MBRTOWC=1;
+ HAVE_MBRLEN=1;
+ HAVE_MBSRTOWCS=1;
+ HAVE_MBSNRTOWCS=1;
+ HAVE_WCRTOMB=1;
+ HAVE_WCSRTOMBS=1;
+ HAVE_WCSNRTOMBS=1;
+ HAVE_DECL_WCTOB=1;
+ HAVE_DECL_WCWIDTH=1;
+ REPLACE_MBSTATE_T=0;
+ REPLACE_BTOWC=0;
+ REPLACE_WCTOB=0;
+ REPLACE_MBSINIT=0;
+ REPLACE_MBRTOWC=0;
+ REPLACE_MBRLEN=0;
+ REPLACE_MBSRTOWCS=0;
+ REPLACE_MBSNRTOWCS=0;
+ REPLACE_WCRTOMB=0;
+ REPLACE_WCSRTOMBS=0;
+ REPLACE_WCSNRTOMBS=0;
+ REPLACE_WCWIDTH=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_wchar_h_correct_inline=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
+$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted." "$LINENO" 5
+ fi
+
+
+
+
+ for ac_func in $ac_func_list
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET); return !cs;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_langinfo_codeset=yes
+else
+ am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "@%:@define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+ fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "@%:@define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+$as_echo_n "checking whether realpath works... " >&6; }
+if test "${gl_cv_func_realpath_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ touch conftest.a
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_realpath_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char *name1 = realpath ("conftest.a", NULL);
+ char *name2 = realpath ("conftest.b/../conftest.a", NULL);
+ char *name3 = realpath ("conftest.a/", NULL);
+ return !(name1 && *name1 == '/' && !name2 && !name3);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_realpath_works=yes
+else
+ gl_cv_func_realpath_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+$as_echo "$gl_cv_func_realpath_works" >&6; }
+ if test "$gl_cv_func_realpath_works" = yes; then
+
+$as_echo "@%:@define FUNC_REALPATH_WORKS 1" >>confdefs.h
+
+ fi
+
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ATOLL=0;
+ GNULIB_CALLOC_POSIX=0;
+ GNULIB_CANONICALIZE_FILE_NAME=0;
+ GNULIB_GETLOADAVG=0;
+ GNULIB_GETSUBOPT=0;
+ GNULIB_MALLOC_POSIX=0;
+ GNULIB_MKDTEMP=0;
+ GNULIB_MKOSTEMP=0;
+ GNULIB_MKOSTEMPS=0;
+ GNULIB_MKSTEMP=0;
+ GNULIB_MKSTEMPS=0;
+ GNULIB_PUTENV=0;
+ GNULIB_RANDOM_R=0;
+ GNULIB_REALLOC_POSIX=0;
+ GNULIB_REALPATH=0;
+ GNULIB_RPMATCH=0;
+ GNULIB_SETENV=0;
+ GNULIB_STRTOD=0;
+ GNULIB_STRTOLL=0;
+ GNULIB_STRTOULL=0;
+ GNULIB_UNSETENV=0;
+ HAVE_ATOLL=1;
+ HAVE_CALLOC_POSIX=1;
+ HAVE_CANONICALIZE_FILE_NAME=1;
+ HAVE_DECL_GETLOADAVG=1;
+ HAVE_GETSUBOPT=1;
+ HAVE_MALLOC_POSIX=1;
+ HAVE_MKDTEMP=1;
+ HAVE_MKOSTEMP=1;
+ HAVE_MKOSTEMPS=1;
+ HAVE_MKSTEMPS=1;
+ HAVE_RANDOM_R=1;
+ HAVE_REALLOC_POSIX=1;
+ HAVE_REALPATH=1;
+ HAVE_RPMATCH=1;
+ HAVE_SETENV=1;
+ HAVE_STRTOD=1;
+ HAVE_STRTOLL=1;
+ HAVE_STRTOULL=1;
+ HAVE_STRUCT_RANDOM_DATA=1;
+ HAVE_SYS_LOADAVG_H=0;
+ HAVE_UNSETENV=1;
+ REPLACE_CANONICALIZE_FILE_NAME=0;
+ REPLACE_MKSTEMP=0;
+ REPLACE_PUTENV=0;
+ REPLACE_REALPATH=0;
+ REPLACE_SETENV=0;
+ REPLACE_STRTOD=0;
+ REPLACE_UNSETENV=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
+$as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
+if test "${ac_cv_win_or_dos+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_win_or_dos=yes
+else
+ ac_cv_win_or_dos=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
+$as_echo "$ac_cv_win_or_dos" >&6; }
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
+$as_echo_n "checking whether drive letter can start relative path... " >&6; }
+if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if defined __CYGWIN__
+drive letters are always absolute
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_drive_letter_can_be_relative=yes
+else
+ ac_cv_drive_letter_can_be_relative=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
+$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
+_ACEOF
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
+_ACEOF
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+ GNULIB_CHOWN=0;
+ GNULIB_CLOSE=0;
+ GNULIB_DUP2=0;
+ GNULIB_DUP3=0;
+ GNULIB_ENVIRON=0;
+ GNULIB_EUIDACCESS=0;
+ GNULIB_FACCESSAT=0;
+ GNULIB_FCHDIR=0;
+ GNULIB_FCHOWNAT=0;
+ GNULIB_FSYNC=0;
+ GNULIB_FTRUNCATE=0;
+ GNULIB_GETCWD=0;
+ GNULIB_GETDOMAINNAME=0;
+ GNULIB_GETDTABLESIZE=0;
+ GNULIB_GETGROUPS=0;
+ GNULIB_GETHOSTNAME=0;
+ GNULIB_GETLOGIN=0;
+ GNULIB_GETLOGIN_R=0;
+ GNULIB_GETPAGESIZE=0;
+ GNULIB_GETUSERSHELL=0;
+ GNULIB_LCHOWN=0;
+ GNULIB_LINK=0;
+ GNULIB_LINKAT=0;
+ GNULIB_LSEEK=0;
+ GNULIB_PIPE2=0;
+ GNULIB_PREAD=0;
+ GNULIB_READLINK=0;
+ GNULIB_READLINKAT=0;
+ GNULIB_RMDIR=0;
+ GNULIB_SLEEP=0;
+ GNULIB_SYMLINK=0;
+ GNULIB_SYMLINKAT=0;
+ GNULIB_UNISTD_H_GETOPT=0;
+ GNULIB_UNISTD_H_SIGPIPE=0;
+ GNULIB_UNLINK=0;
+ GNULIB_UNLINKAT=0;
+ GNULIB_USLEEP=0;
+ GNULIB_WRITE=0;
+ HAVE_CHOWN=1;
+ HAVE_DUP2=1;
+ HAVE_DUP3=1;
+ HAVE_EUIDACCESS=1;
+ HAVE_FACCESSAT=1;
+ HAVE_FCHOWNAT=1;
+ HAVE_FSYNC=1;
+ HAVE_FTRUNCATE=1;
+ HAVE_GETDOMAINNAME=1;
+ HAVE_GETDTABLESIZE=1;
+ HAVE_GETGROUPS=1;
+ HAVE_GETHOSTNAME=1;
+ HAVE_GETLOGIN=1;
+ HAVE_GETPAGESIZE=1;
+ HAVE_GETUSERSHELL=1;
+ HAVE_LCHOWN=1;
+ HAVE_LINK=1;
+ HAVE_LINKAT=1;
+ HAVE_PIPE2=1;
+ HAVE_PREAD=1;
+ HAVE_READLINK=1;
+ HAVE_READLINKAT=1;
+ HAVE_SLEEP=1;
+ HAVE_SYMLINK=1;
+ HAVE_SYMLINKAT=1;
+ HAVE_DECL_ENVIRON=1;
+ HAVE_DECL_GETLOGIN_R=1;
+ HAVE_OS_H=0;
+ HAVE_SYS_PARAM_H=0;
+ HAVE_UNLINKAT=1;
+ HAVE_USLEEP=1;
+ REPLACE_CHOWN=0;
+ REPLACE_CLOSE=0;
+ REPLACE_DUP=0;
+ REPLACE_DUP2=0;
+ REPLACE_FCHDIR=0;
+ REPLACE_FCHOWNAT=0;
+ REPLACE_GETCWD=0;
+ REPLACE_GETGROUPS=0;
+ REPLACE_GETPAGESIZE=0;
+ REPLACE_LCHOWN=0;
+ REPLACE_LINK=0;
+ REPLACE_LINKAT=0;
+ REPLACE_LSEEK=0;
+ REPLACE_PREAD=0;
+ REPLACE_READLINK=0;
+ REPLACE_RMDIR=0;
+ REPLACE_SLEEP=0;
+ REPLACE_SYMLINK=0;
+ REPLACE_UNLINK=0;
+ REPLACE_UNLINKAT=0;
+ REPLACE_USLEEP=0;
+ REPLACE_WRITE=0;
+ UNISTD_H_HAVE_WINSOCK2_H=0;
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+ if test "${gt_cv_var_environ_declaration+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_var_environ_declaration=no
+else
+ gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+ if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "@%:@define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+ fi
+
+
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=yes
+else
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=buggy
+else
+ gl_cv_have_include_next=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+$as_echo "$gl_cv_have_include_next" >&6; }
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "booboo" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_complete=no
+else
+ gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_errno_h='<'errno.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_errno_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/errno.h#{
+ s#.*"\(.*/errno.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_errno_h='<'errno.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+ fi
+ NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'errno.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_errno_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+
+
+
+ ERRNO_H='errno.h'
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=yes
+else
+ gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+ case $gl_cv_header_errno_h_EMULTIHOP in
+ yes | no)
+ EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+ ;;
+ *)
+ EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=yes
+else
+ gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+ case $gl_cv_header_errno_h_ENOLINK in
+ yes | no)
+ ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+ ;;
+ *)
+ ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=yes
+else
+ gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+ case $gl_cv_header_errno_h_EOVERFLOW in
+ yes | no)
+ EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+ ;;
+ *)
+ EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+ ;;
+ esac
+
+
+ fi
+
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "@%:@define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+ XGETTEXT_EXTRA_OPTIONS=
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define mode_t int
+_ACEOF
+
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
+"
+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIG_ATOMIC_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define sig_atomic_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+ GNULIB_FCNTL=0;
+ GNULIB_OPEN=0;
+ GNULIB_OPENAT=0;
+ HAVE_FCNTL=1;
+ HAVE_OPENAT=1;
+ REPLACE_FCNTL=0;
+ REPLACE_OPEN=0;
+ REPLACE_OPENAT=0;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_fcntl_h=cross-compiling
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+
+int
+main ()
+{
+
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_fcntl_h=yes
+else
+ case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+
+
+ GNULIB_DPRINTF=0;
+ GNULIB_FCLOSE=0;
+ GNULIB_FFLUSH=0;
+ GNULIB_FOPEN=0;
+ GNULIB_FPRINTF=0;
+ GNULIB_FPRINTF_POSIX=0;
+ GNULIB_FPURGE=0;
+ GNULIB_FPUTC=0;
+ GNULIB_FPUTS=0;
+ GNULIB_FREOPEN=0;
+ GNULIB_FSEEK=0;
+ GNULIB_FSEEKO=0;
+ GNULIB_FTELL=0;
+ GNULIB_FTELLO=0;
+ GNULIB_FWRITE=0;
+ GNULIB_GETDELIM=0;
+ GNULIB_GETLINE=0;
+ GNULIB_OBSTACK_PRINTF=0;
+ GNULIB_OBSTACK_PRINTF_POSIX=0;
+ GNULIB_PERROR=0;
+ GNULIB_POPEN=0;
+ GNULIB_PRINTF=0;
+ GNULIB_PRINTF_POSIX=0;
+ GNULIB_PUTC=0;
+ GNULIB_PUTCHAR=0;
+ GNULIB_PUTS=0;
+ GNULIB_REMOVE=0;
+ GNULIB_RENAME=0;
+ GNULIB_RENAMEAT=0;
+ GNULIB_SNPRINTF=0;
+ GNULIB_SPRINTF_POSIX=0;
+ GNULIB_STDIO_H_SIGPIPE=0;
+ GNULIB_VASPRINTF=0;
+ GNULIB_VDPRINTF=0;
+ GNULIB_VFPRINTF=0;
+ GNULIB_VFPRINTF_POSIX=0;
+ GNULIB_VPRINTF=0;
+ GNULIB_VPRINTF_POSIX=0;
+ GNULIB_VSNPRINTF=0;
+ GNULIB_VSPRINTF_POSIX=0;
+ HAVE_DECL_FPURGE=1;
+ HAVE_DECL_GETDELIM=1;
+ HAVE_DECL_GETLINE=1;
+ HAVE_DECL_OBSTACK_PRINTF=1;
+ HAVE_DECL_SNPRINTF=1;
+ HAVE_DECL_VSNPRINTF=1;
+ HAVE_DPRINTF=1;
+ HAVE_RENAMEAT=1;
+ HAVE_VASPRINTF=1;
+ HAVE_VDPRINTF=1;
+ REPLACE_DPRINTF=0;
+ REPLACE_FCLOSE=0;
+ REPLACE_FFLUSH=0;
+ REPLACE_FOPEN=0;
+ REPLACE_FPRINTF=0;
+ REPLACE_FPURGE=0;
+ REPLACE_FREOPEN=0;
+ REPLACE_FSEEK=0;
+ REPLACE_FSEEKO=0;
+ REPLACE_FTELL=0;
+ REPLACE_FTELLO=0;
+ REPLACE_GETDELIM=0;
+ REPLACE_GETLINE=0;
+ REPLACE_OBSTACK_PRINTF=0;
+ REPLACE_PERROR=0;
+ REPLACE_POPEN=0;
+ REPLACE_PRINTF=0;
+ REPLACE_REMOVE=0;
+ REPLACE_RENAME=0;
+ REPLACE_RENAMEAT=0;
+ REPLACE_SNPRINTF=0;
+ REPLACE_SPRINTF=0;
+ REPLACE_STDIO_WRITE_FUNCS=0;
+ REPLACE_VASPRINTF=0;
+ REPLACE_VDPRINTF=0;
+ REPLACE_VFPRINTF=0;
+ REPLACE_VPRINTF=0;
+ REPLACE_VSNPRINTF=0;
+ REPLACE_VSPRINTF=0;
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ACOSL=0;
+ GNULIB_ASINL=0;
+ GNULIB_ATANL=0;
+ GNULIB_CEILF=0;
+ GNULIB_CEILL=0;
+ GNULIB_COSL=0;
+ GNULIB_EXPL=0;
+ GNULIB_FLOORF=0;
+ GNULIB_FLOORL=0;
+ GNULIB_FREXP=0;
+ GNULIB_FREXPL=0;
+ GNULIB_ISFINITE=0;
+ GNULIB_ISINF=0;
+ GNULIB_ISNAN=0;
+ GNULIB_ISNANF=0;
+ GNULIB_ISNAND=0;
+ GNULIB_ISNANL=0;
+ GNULIB_LDEXPL=0;
+ GNULIB_LOGL=0;
+ GNULIB_ROUND=0;
+ GNULIB_ROUNDF=0;
+ GNULIB_ROUNDL=0;
+ GNULIB_SIGNBIT=0;
+ GNULIB_SINL=0;
+ GNULIB_SQRTL=0;
+ GNULIB_TANL=0;
+ GNULIB_TRUNC=0;
+ GNULIB_TRUNCF=0;
+ GNULIB_TRUNCL=0;
+ HAVE_ACOSL=1;
+ HAVE_ASINL=1;
+ HAVE_ATANL=1;
+ HAVE_COSL=1;
+ HAVE_EXPL=1;
+ HAVE_ISNANF=1;
+ HAVE_ISNAND=1;
+ HAVE_ISNANL=1;
+ HAVE_LOGL=1;
+ HAVE_SINL=1;
+ HAVE_SQRTL=1;
+ HAVE_TANL=1;
+ HAVE_DECL_ACOSL=1;
+ HAVE_DECL_ASINL=1;
+ HAVE_DECL_ATANL=1;
+ HAVE_DECL_COSL=1;
+ HAVE_DECL_EXPL=1;
+ HAVE_DECL_FREXPL=1;
+ HAVE_DECL_LDEXPL=1;
+ HAVE_DECL_LOGL=1;
+ HAVE_DECL_SINL=1;
+ HAVE_DECL_SQRTL=1;
+ HAVE_DECL_TANL=1;
+ HAVE_DECL_TRUNC=1;
+ HAVE_DECL_TRUNCF=1;
+ REPLACE_CEILF=0;
+ REPLACE_CEILL=0;
+ REPLACE_FLOORF=0;
+ REPLACE_FLOORL=0;
+ REPLACE_FREXP=0;
+ REPLACE_FREXPL=0;
+ REPLACE_HUGE_VAL=0;
+ REPLACE_ISFINITE=0;
+ REPLACE_ISINF=0;
+ REPLACE_ISNAN=0;
+ REPLACE_LDEXPL=0;
+ REPLACE_NAN=0;
+ REPLACE_ROUND=0;
+ REPLACE_ROUNDF=0;
+ REPLACE_ROUNDL=0;
+ REPLACE_SIGNBIT=0;
+ REPLACE_SIGNBIT_USING_GCC=0;
+ REPLACE_TRUNCL=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
+$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
+if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_var_stdin_large_offset=yes
+else
+ gl_cv_var_stdin_large_offset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
+$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) $as_echo "@%:@define restrict /**/" >>confdefs.h
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+@%:@define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+ GNULIB_GETTIMEOFDAY=0;
+ HAVE_GETTIMEOFDAY=1;
+ HAVE_STRUCT_TIMEVAL=1;
+ HAVE_SYS_TIME_H=1;
+ REPLACE_GETTIMEOFDAY=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/time.h#{
+ s#.*"\(.*/sys/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+ fi
+ NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_time_h != yes; then
+ HAVE_SYS_TIME_H=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timeval=yes
+else
+ gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+ if test $gl_cv_sys_struct_timeval != yes; then
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+
+ for gl_func in gettimeofday; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+ REPLACE_ICONV=0;
+ REPLACE_ICONV_OPEN=0;
+ REPLACE_ICONV_UTF=0;
+ ICONV_H='';
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "@%:@define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "@%:@define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ gl_cv_c_multiarch=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $gl_cv_c_multiarch = yes; then
+
+$as_echo "@%:@define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+ for ac_header in inttypes.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_inttypes_pri_broken=no
+else
+ gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PRI_MACROS_BROKEN 1
+_ACEOF
+
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_IMAXABS $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_IMAXDIV $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRTOIMAX $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRTOUMAX $ac_have_decl
+_ACEOF
+
+
+ GNULIB_IMAXABS=0;
+ GNULIB_IMAXDIV=0;
+ GNULIB_STRTOIMAX=0;
+ GNULIB_STRTOUMAX=0;
+ HAVE_DECL_IMAXABS=1;
+ HAVE_DECL_IMAXDIV=1;
+ HAVE_DECL_STRTOIMAX=1;
+ HAVE_DECL_STRTOUMAX=1;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+ GNULIB_NL_LANGINFO=0;
+ HAVE_NL_LANGINFO=1;
+ REPLACE_NL_LANGINFO=0;
+
+
+
+ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+ GNULIB_FCHMODAT=0;
+ GNULIB_FSTATAT=0;
+ GNULIB_FUTIMENS=0;
+ GNULIB_LCHMOD=0;
+ GNULIB_LSTAT=0;
+ GNULIB_MKDIRAT=0;
+ GNULIB_MKFIFO=0;
+ GNULIB_MKFIFOAT=0;
+ GNULIB_MKNOD=0;
+ GNULIB_MKNODAT=0;
+ GNULIB_STAT=0;
+ GNULIB_UTIMENSAT=0;
+ HAVE_FCHMODAT=1;
+ HAVE_FSTATAT=1;
+ HAVE_FUTIMENS=1;
+ HAVE_LCHMOD=1;
+ HAVE_LSTAT=1;
+ HAVE_MKDIRAT=1;
+ HAVE_MKFIFO=1;
+ HAVE_MKFIFOAT=1;
+ HAVE_MKNOD=1;
+ HAVE_MKNODAT=1;
+ HAVE_UTIMENSAT=1;
+ REPLACE_FSTAT=0;
+ REPLACE_FSTATAT=0;
+ REPLACE_FUTIMENS=0;
+ REPLACE_LSTAT=0;
+ REPLACE_MKDIR=0;
+ REPLACE_MKFIFO=0;
+ REPLACE_MKNOD=0;
+ REPLACE_STAT=0;
+ REPLACE_UTIMENSAT=0;
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+ /* Linux will dereference the symlink and fail, as required by POSIX.
+ That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ # If the `ln -s' command failed, then we probably don't even
+ # have an lstat function.
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
+if test "${gl_cv_func_malloc_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_malloc_posix=yes
+else
+ gl_cv_func_malloc_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+$as_echo "$gl_cv_func_malloc_posix" >&6; }
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ gl_cv_func_malloc_0_nonnull=1
+else
+ gl_cv_func_malloc_0_nonnull=0
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+# include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_mbstate_t=yes
+else
+ ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+ if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "@%:@define HAVE_MBSTATE_T 1" >>confdefs.h
+
+ else
+
+$as_echo "@%:@define mbstate_t int" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
+$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test "${ac_cv_func_mbrtowc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <wchar.h>
+int
+main ()
+{
+wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_mbrtowc=yes
+else
+ ac_cv_func_mbrtowc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
+$as_echo "$ac_cv_func_mbrtowc" >&6; }
+ if test $ac_cv_func_mbrtowc = yes; then
+
+$as_echo "@%:@define HAVE_MBRTOWC 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+ GNULIB_MEMCHR=0;
+ GNULIB_MEMMEM=0;
+ GNULIB_MEMPCPY=0;
+ GNULIB_MEMRCHR=0;
+ GNULIB_RAWMEMCHR=0;
+ GNULIB_STPCPY=0;
+ GNULIB_STPNCPY=0;
+ GNULIB_STRCHRNUL=0;
+ GNULIB_STRDUP=0;
+ GNULIB_STRNDUP=0;
+ GNULIB_STRNLEN=0;
+ GNULIB_STRPBRK=0;
+ GNULIB_STRSEP=0;
+ GNULIB_STRSTR=0;
+ GNULIB_STRCASESTR=0;
+ GNULIB_STRTOK_R=0;
+ GNULIB_MBSLEN=0;
+ GNULIB_MBSNLEN=0;
+ GNULIB_MBSCHR=0;
+ GNULIB_MBSRCHR=0;
+ GNULIB_MBSSTR=0;
+ GNULIB_MBSCASECMP=0;
+ GNULIB_MBSNCASECMP=0;
+ GNULIB_MBSPCASECMP=0;
+ GNULIB_MBSCASESTR=0;
+ GNULIB_MBSCSPN=0;
+ GNULIB_MBSPBRK=0;
+ GNULIB_MBSSPN=0;
+ GNULIB_MBSSEP=0;
+ GNULIB_MBSTOK_R=0;
+ GNULIB_STRERROR=0;
+ GNULIB_STRSIGNAL=0;
+ GNULIB_STRVERSCMP=0;
+ HAVE_MBSLEN=0;
+ HAVE_DECL_MEMMEM=1;
+ HAVE_MEMPCPY=1;
+ HAVE_DECL_MEMRCHR=1;
+ HAVE_RAWMEMCHR=1;
+ HAVE_STPCPY=1;
+ HAVE_STPNCPY=1;
+ HAVE_STRCHRNUL=1;
+ HAVE_DECL_STRDUP=1;
+ HAVE_DECL_STRNDUP=1;
+ HAVE_DECL_STRNLEN=1;
+ HAVE_STRPBRK=1;
+ HAVE_STRSEP=1;
+ HAVE_STRCASESTR=1;
+ HAVE_DECL_STRTOK_R=1;
+ HAVE_DECL_STRERROR=1;
+ HAVE_DECL_STRSIGNAL=1;
+ HAVE_STRVERSCMP=1;
+ REPLACE_MEMCHR=0;
+ REPLACE_MEMMEM=0;
+ REPLACE_STRDUP=0;
+ REPLACE_STRSTR=0;
+ REPLACE_STRCASESTR=0;
+ REPLACE_STRERROR=0;
+ REPLACE_STRNDUP=0;
+ REPLACE_STRSIGNAL=0;
+ REPLACE_STRTOK_R=0;
+ UNDEFINE_STRTOK_R=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memchr
+do :
+ ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
+if test "x$ac_cv_func_memchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_memchr = no; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+ fi
+
+ if test $ac_cv_func_memchr = yes; then
+ # Detect platform-specific bugs in some versions of glibc:
+ # memchr should not dereference anything with length 0
+ # http://bugzilla.redhat.com/499689
+ # memchr should not dereference overestimated length after a match
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # Assume that memchr works on platforms that lack mprotect.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+$as_echo_n "checking whether memchr works... " >&6; }
+if test "${gl_cv_func_memchr_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_memchr_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+
+int
+main ()
+{
+
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
+#endif
+ if (fence)
+ {
+ if (memchr (fence, 0, 0))
+ return 1;
+ strcpy (fence - 9, "12345678");
+ if (memchr (fence - 9, 0, 79) != fence - 1)
+ return 2;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memchr_works=yes
+else
+ gl_cv_func_memchr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+$as_echo "$gl_cv_func_memchr_works" >&6; }
+ if test "$gl_cv_func_memchr_works" != yes; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
+
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memmem" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_MEMMEM $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${gl_cv_header_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_stdint_h=yes
+else
+ gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+ if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gl_cv_header_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_inttypes_h=yes
+else
+ gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+ if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
+$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
+if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_sizes_c99=yes
+else
+ gl_cv_func_printf_sizes_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
+$as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_long_double=yes
+else
+ gl_cv_func_printf_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
+$as_echo "$gl_cv_func_printf_long_double" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite=yes
+else
+ gl_cv_func_printf_infinite=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
+$as_echo "$gl_cv_func_printf_infinite" >&6; }
+
+
+
+
+
+ if test -n "$gl_printf_safe"; then
+
+$as_echo "@%:@define CHECK_PRINTF_SAFE 1" >>confdefs.h
+
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite_long_double=yes
+else
+ gl_cv_func_printf_infinite_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
+$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
+$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
+if test "${gl_cv_func_printf_directive_a+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "BZ2908" >/dev/null 2>&1; then :
+ gl_cv_func_printf_directive_a="guessing yes"
+else
+ gl_cv_func_printf_directive_a="guessing no"
+fi
+rm -f conftest*
+
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_a=yes
+else
+ gl_cv_func_printf_directive_a=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
+$as_echo "$gl_cv_func_printf_directive_a" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
+$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_f+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_f=yes
+else
+ gl_cv_func_printf_directive_f=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
+$as_echo "$gl_cv_func_printf_directive_f" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
+$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_n=yes
+else
+ gl_cv_func_printf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
+$as_echo "$gl_cv_func_printf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
+$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ return 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ return 1;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_ls=yes
+else
+ gl_cv_func_printf_directive_ls=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
+$as_echo "$gl_cv_func_printf_directive_ls" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
+$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
+if test "${gl_cv_func_printf_positions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_positions=yes
+else
+ gl_cv_func_printf_positions=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
+$as_echo "$gl_cv_func_printf_positions" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
+$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
+if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_grouping=yes
+else
+ gl_cv_func_printf_flag_grouping=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
+$as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
+$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_leftadjust=yes
+else
+ gl_cv_func_printf_flag_leftadjust=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
+$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
+$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_zero=yes
+else
+ gl_cv_func_printf_flag_zero=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
+$as_echo "$gl_cv_func_printf_flag_zero" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
+$as_echo_n "checking whether printf supports large precisions... " >&6; }
+if test "${gl_cv_func_printf_precision+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_precision=yes
+else
+ gl_cv_func_printf_precision=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
+$as_echo "$gl_cv_func_printf_precision" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
+$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
+if test "${gl_cv_func_printf_enomem+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_func_printf_enomem="guessing no"
+ if test "$cross_compiling" = no; then
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data1024;
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ fi
+ if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
+$as_echo "$gl_cv_func_printf_enomem" >&6; }
+
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "@%:@define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "@%:@define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define size_t unsigned int
+_ACEOF
+
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${gt_cv_c_intmax_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1; return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_intmax_t=yes
+else
+ gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+ if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "@%:@define HAVE_INTMAX_T 1" >>confdefs.h
+
+ else
+
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+@%:@define intmax_t $ac_type
+_ACEOF
+
+ fi
+
+
+
+
+
+
+ for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL__SNPRINTF $ac_have_decl
+_ACEOF
+
+
+ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_obstack_printf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl
+_ACEOF
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if test "${gl_cv_promoted_mode_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_promoted_mode_t='int'
+else
+ gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
+
+
+
+
+
+
+
+ GNULIB_POSIX_SPAWN=0;
+ GNULIB_POSIX_SPAWNP=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
+ GNULIB_POSIX_SPAWNATTR_INIT=0;
+ GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_DESTROY=0;
+ HAVE_POSIX_SPAWN=1;
+ HAVE_POSIX_SPAWNATTR_T=1;
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+
+ REPLACE_POSIX_SPAWN=0;
+
+
+
+
+
+
+ if test $ac_cv_func_posix_spawn = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
+$as_echo_n "checking whether posix_spawn works... " >&6; }
+if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ setvbuf (stdout, NULL, _IOFBF, 0);
+ puts ("This should be seen only once.");
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ if (err == ENOENT)
+ return 0;
+ else
+ {
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ close (ofd[1]);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 127)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext > conftest.out \
+ && echo 'This should be seen only once.' > conftest.ok \
+ && cmp conftest.out conftest.ok > /dev/null; then
+ gl_cv_func_posix_spawn_works=yes
+ else
+ gl_cv_func_posix_spawn_works=no
+ fi
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test $gl_cv_func_posix_spawn_works = yes; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Test whether posix_spawn_file_actions_addopen supports filename arguments
+ that contain special characters such as '*'. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "conftest"
+#define DATA_FILENAME "conftest%=*#?"
+
+static int
+parent_main (void)
+{
+ FILE *fp;
+ char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ /* Create a data file with specific contents. */
+ fp = fopen (DATA_FILENAME, "wb");
+ if (fp == NULL)
+ {
+ perror ("cannot create data file");
+ return 1;
+ }
+ fwrite ("Halle Potta", 1, 11, fp);
+ if (fflush (fp) || fclose (fp))
+ {
+ perror ("cannot prepare data file");
+ return 1;
+ }
+
+ /* Avoid reading from our stdin, as it could block. */
+ freopen ("/dev/null", "rb", stdin);
+
+ /* Test whether posix_spawn_file_actions_addopen with this file name
+ actually works, but spawning a child that reads from this file. */
+ actions_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
+ || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ errno = err;
+ perror ("subprocess failed");
+ return 1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ return 1;
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ return 1;
+ }
+ return 0;
+}
+
+static int
+child_main (void)
+{
+ char buf[1024];
+
+ /* See if reading from STDIN_FILENO yields the expected contents. */
+ if (fread (buf, 1, sizeof (buf), stdin) == 11
+ && memcmp (buf, "Halle Potta", 11) == 0)
+ return 0;
+ else
+ return 2;
+}
+
+static void
+cleanup_then_die (int sig)
+{
+ /* Clean up data file. */
+ unlink (DATA_FILENAME);
+
+ /* Re-raise the signal and die from it. */
+ signal (sig, SIG_DFL);
+ raise (sig);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int exitstatus;
+
+ if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
+ {
+ /* This is the parent process. */
+ signal (SIGINT, cleanup_then_die);
+ signal (SIGTERM, cleanup_then_die);
+ #ifdef SIGHUP
+ signal (SIGHUP, cleanup_then_die);
+ #endif
+
+ exitstatus = parent_main ();
+ }
+ else
+ {
+ /* This is the child process. */
+
+ exitstatus = child_main ();
+ }
+ unlink (DATA_FILENAME);
+ return exitstatus;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+ else
+ case "$host_os" in
+ aix*) gl_cv_func_posix_spawn_works="guessing no";;
+ *) gl_cv_func_posix_spawn_works="guessing yes";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
+
+ case "$gl_cv_func_posix_spawn_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN=1 ;;
+ esac
+ else
+ HAVE_POSIX_SPAWN=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+$as_echo_n "checking whether setenv validates arguments... " >&6; }
+if test "${gl_cv_func_setenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_setenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+
+int
+main ()
+{
+
+ if (setenv ("", "", 0) != -1) return 1;
+ if (errno != EINVAL) return 2;
+ if (setenv ("a", "=", 1) != 0) return 3;
+ if (strcmp (getenv ("a"), "=") != 0) return 4;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_setenv_works=yes
+else
+ gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+$as_echo "$gl_cv_func_setenv_works" >&6; }
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+ for ac_header in search.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SEARCH_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in tsearch
+do :
+ ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_TSEARCH 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ GNULIB_SIGNAL_H_SIGPIPE=0;
+ GNULIB_SIGPROCMASK=0;
+ GNULIB_SIGACTION=0;
+ HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_SIGSET_T=1;
+ HAVE_SIGINFO_T=1;
+ HAVE_SIGACTION=1;
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then :
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "@%:@define uid_t int" >>confdefs.h
+
+
+$as_echo "@%:@define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_SNPRINTF $ac_have_decl
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if test "${ac_cv_header_stdbool_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+
+int
+main ()
+{
+
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdbool_h=yes
+else
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "@%:@define HAVE_STDBOOL_H 1" >>confdefs.h
+
+ fi
+
+ REPLACE_NULL=0;
+ HAVE_WCHAR_T=1;
+ STDDEF_H='';
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -z "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if test "${gl_cv_func_working_strerror+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+ if test $gl_cv_func_working_strerror = no; then
+ REPLACE_STRERROR=1
+ fi
+ else
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+
+ ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRERROR $ac_have_decl
+_ACEOF
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ for ac_header in winsock2.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+ fi
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_string_h='<'string.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+$as_echo_n "checking absolute name of <string.h>... " >&6; }
+if test "${gl_cv_next_string_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_string_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/string.h#{
+ s#.*"\(.*/string.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_string_h='<'string.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+$as_echo "$gl_cv_next_string_h" >&6; }
+ fi
+ NEXT_STRING_H=$gl_cv_next_string_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'string.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_string_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strndup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRNDUP $ac_have_decl
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stat_broken=no
+else
+ ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "@%:@define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+ REPLACE_MKTIME=GNULIB_PORTCHECK;
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+ REPLACE_STRPTIME=GNULIB_PORTCHECK;
+ REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_time_h='<'time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if test "${gl_cv_next_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/time.h#{
+ s#.*"\(.*/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_time_h='<'time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
+ fi
+ NEXT_TIME_H=$gl_cv_next_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
+$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
+if test "${gl_cv_func_ungetc_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_ungetc_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ungetc_works=yes
+else
+ gl_cv_func_ungetc_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
+$as_echo "$gl_cv_func_ungetc_works" >&6; }
+ if test "$gl_cv_func_ungetc_works" != yes; then
+
+$as_echo "@%:@define FUNC_UNGETC_BROKEN 1" >>confdefs.h
+
+ fi
+
+
+
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if true; then
+ GL_COND_LIBTOOL_TRUE=
+ GL_COND_LIBTOOL_FALSE='#'
+else
+ GL_COND_LIBTOOL_TRUE='#'
+ GL_COND_LIBTOOL_FALSE=
+fi
+
+ gl_cond_libtool=true
+
+
+
+
+
+
+
+
+
+ gl_source_base='gnu'
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+
+
+
+
+
+
+ if test $ac_cv_func_alloca_works = no; then
+ :
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Need own alloca" >/dev/null 2>&1; then :
+ gl_cv_rpl_alloca=yes
+else
+ gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+ if test $gl_cv_rpl_alloca = yes; then
+
+$as_echo "@%:@define HAVE_ALLOCA 1" >>confdefs.h
+
+ ALLOCA_H=alloca.h
+ else
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
+$as_echo_n "checking whether to enable assertions... " >&6; }
+ @%:@ Check whether --enable-assert was given.
+if test "${enable_assert+set}" = set; then :
+ enableval=$enable_assert; if test "x$enableval" = xno; then :
+
+$as_echo "@%:@define NDEBUG 1" >>confdefs.h
+
+elif test "x$enableval" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
+$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
+ enable_assert=yes
+fi
+else
+ enable_assert=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
+$as_echo "$enable_assert" >&6; }
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
+if test "${gl_cv_func_btowc_eof+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_btowc_eof=yes
+else
+ gl_cv_func_btowc_eof=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+$as_echo "$gl_cv_func_btowc_eof" >&6; }
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_BTOWC=1
+
+
+
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ REPLACE_REALPATH=1
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+
+
+
+$as_echo "@%:@define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
+
+
+
+
+ GNULIB_CANONICALIZE_FILE_NAME=1
+
+
+
+ GNULIB_REALPATH=1
+
+
+$as_echo "@%:@define SIGNAL_SAFE_LIST 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_CLOEXEC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
+
+
+ :
+
+
+
+$as_echo "@%:@define GNULIB_CLOSE_STREAM 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_DIRNAME 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "@%:@define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+$as_echo_n "checking whether dup2 works... " >&6; }
+if test "${gl_cv_func_dup2_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works=no;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works=no;;
+ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+ # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+ gl_cv_func_dup2_works=no;;
+ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ gl_cv_func_dup2_works=no;;
+ *) gl_cv_func_dup2_works=yes;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <unistd.h>
+#include <errno.h>
+int
+main ()
+{
+if (dup2 (1, 1) == 0)
+ return 1;
+ close (0);
+ if (dup2 (0, 0) != -1)
+ return 2;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (1, 1000000) == -1 && errno != EBADF)
+ return 3;
+ return 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_dup2_works=yes
+else
+ gl_cv_func_dup2_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
+$as_echo "$gl_cv_func_dup2_works" >&6; }
+ if test "$gl_cv_func_dup2_works" = no; then
+
+
+ if test $ac_cv_func_dup2 = yes; then
+ REPLACE_DUP2=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_DUP2=1
+
+
+
+
+ GNULIB_ENVIRON=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_error_at_line=yes
+else
+ ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
+
+fi
+
+
+
+
+ :
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS exitfail.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+
+int
+main ()
+{
+return fcntl (0, F_DUPFD, -1) != -1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_works=yes
+else
+ gl_cv_func_fcntl_f_dupfd_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *)
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+
+$as_echo "@%:@define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_FCNTL=1
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
+if test "${gl_cv_next_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_fcntl_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/fcntl.h#{
+ s#.*"\(.*/fcntl.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+$as_echo "$gl_cv_next_fcntl_h" >&6; }
+ fi
+ NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'fcntl.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_fcntl_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in fcntl openat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+$as_echo "@%:@define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if test "${gl_cv_func_fflush_stdin+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ if test $gl_cv_func_fflush_stdin = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FFLUSH=1
+ REPLACE_FSEEKO=1
+
+
+ :
+
+
+ fi
+
+
+
+ GNULIB_FFLUSH=1
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_FILENAMECAT 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_flexmember=yes
+else
+ ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+ if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "@%:@define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+ else
+ $as_echo "@%:@define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+ fi
+
+
+
+
+ FLOAT_H=
+ case "$host_os" in
+ beos* | openbsd*)
+ FLOAT_H=float.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_float_h='<'float.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
+$as_echo_n "checking absolute name of <float.h>... " >&6; }
+if test "${gl_cv_next_float_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_float_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/float.h#{
+ s#.*"\(.*/float.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_float_h='<'float.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
+$as_echo "$gl_cv_next_float_h" >&6; }
+ fi
+ NEXT_FLOAT_H=$gl_cv_next_float_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'float.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_float_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+
+
+
+ ;;
+ esac
+
+
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_FOPEN=1
+ gl_cv_func_fopen_slash="guessing no"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
+$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_fopen_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
+ hpux*) gl_cv_func_fopen_slash="guessing no" ;;
+ *) gl_cv_func_fopen_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+ return fopen ("conftest.sl/", "w") != NULL;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fopen_slash=yes
+else
+ gl_cv_func_fopen_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
+$as_echo "$gl_cv_func_fopen_slash" >&6; }
+ ;;
+ esac
+ case "$gl_cv_func_fopen_slash" in
+ *no)
+
+$as_echo "@%:@define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_FOPEN=1
+ ;;
+ esac
+ if test $REPLACE_FOPEN = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
+
+
+
+
+ fi
+
+
+
+ GNULIB_FOPEN=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_FOPEN_SAFER 1" >>confdefs.h
+
+
+
+
+
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL___FPENDING $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_func___fpending = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
+$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
+if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *fp = stdin; (void) ($ac_expr);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fp_done=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
+$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
+_ACEOF
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
+
+ fi
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_FPURGE $ac_have_decl
+_ACEOF
+
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
+$as_echo_n "checking whether fpurge works... " >&6; }
+if test "${gl_cv_func_fpurge_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fpurge_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "w+");
+ if (!f) return 1;
+ if (fputc ('a', f) != 'a') return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != EOF) return 4;
+ if (fpurge (f) != 0) return 5;
+ if (putc ('b', f) != 'b') return 6;
+ if (fclose (f) != 0) return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+ if (fgetc (f) != 'a') return 9;
+ if (fgetc (f) != 'b') return 10;
+ if (fgetc (f) != EOF) return 11;
+ if (fclose (f) != 0) return 12;
+ if (remove ("conftest.txt") != 0) return 13;
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fpurge_works=yes
+else
+ gl_cv_func_fpurge_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
+$as_echo "$gl_cv_func_fpurge_works" >&6; }
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+
+
+
+ GNULIB_FPURGE=1
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+int
+main ()
+{
+int e; return frexp (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp_no_libm=yes ;;
+ *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
+ esac
+ else
+ gl_func_frexp_no_libm=no
+ REPLACE_FREXP=1
+ fi
+ if test $gl_func_frexp_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXP=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+int
+main ()
+{
+int e; return frexpl (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ else
+ HAVE_DECL_FREXPL=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXPL=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if test "${gl_cv_func_fseeko+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FSEEKO=1
+
+
+ fi
+
+
+
+ GNULIB_FSEEKO=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+$as_echo_n "checking for ftello... " >&6; }
+if test "${gl_cv_func_ftello+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+$as_echo "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
+
+
+ REPLACE_FTELLO=1
+
+ fi
+
+
+
+ GNULIB_FTELLO=1
+
+
+
+
+ if test $ac_cv_func_getdtablesize != yes; then
+ HAVE_GETDTABLESIZE=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_GETDTABLESIZE=1
+
+
+
+
+
+
+
+
+
+
+ gl_gettimeofday_timezone=void
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
+$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_gettimeofday_clobber=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_gettimeofday_clobber=no
+else
+ gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+
+$as_echo "@%:@define gmtime rpl_gmtime" >>confdefs.h
+
+
+$as_echo "@%:@define localtime rpl_localtime" >>confdefs.h
+
+
+
+$as_echo "@%:@define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+ struct timeval c;
+ int gettimeofday (struct timeval *restrict, void *restrict);
+
+int
+main ()
+{
+/* glibc uses struct timezone * rather than the POSIX void *
+ if _GNU_SOURCE is defined. However, since the only portable
+ use of gettimeofday uses NULL as the second parameter, and
+ since the glibc definition is actually more typesafe, it is
+ not worth wrapping this to get a compliant signature. */
+ int (*f) (struct timeval *restrict, void *restrict)
+ = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=almost
+else
+ gl_cv_func_gettimeofday_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+ if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+ gl_gettimeofday_timezone='struct timezone'
+ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+ fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
+_ACEOF
+
+
+
+
+ GNULIB_GETTIMEOFDAY=1
+
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "@%:@define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if test "${am_cv_proto_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_cv_proto_iconv_arg1=""
+else
+ am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+ $am_cv_proto_iconv" >&5
+$as_echo "
+ $am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
+$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
+if test "${gl_cv_next_iconv_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_iconv_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <iconv.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/iconv.h#{
+ s#.*"\(.*/iconv.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
+$as_echo "$gl_cv_next_iconv_h" >&6; }
+ fi
+ NEXT_ICONV_H=$gl_cv_next_iconv_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'iconv.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_iconv_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <iconv.h>
+ #if defined _LIBICONV_VERSION || defined __GLIBC__
+ gnu_iconv
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "gnu_iconv" >/dev/null 2>&1; then :
+ gl_func_iconv_gnu=yes
+else
+ gl_func_iconv_gnu=no
+fi
+rm -f conftest*
+
+ if test $gl_func_iconv_gnu = no; then
+ iconv_flavor=
+ case "$host_os" in
+ aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
+ irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
+ hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
+ osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
+ solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+ esac
+ if test -n "$iconv_flavor"; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define ICONV_FLAVOR $iconv_flavor
+_ACEOF
+
+
+
+
+ ICONV_H='iconv.h'
+
+ REPLACE_ICONV_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS iconv_open.$ac_objext"
+
+
+ fi
+ fi
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
+$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
+if test "${gl_cv_c_inline_effective+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_c_inline_effective=yes
+else
+ gl_cv_c_inline_effective=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
+$as_echo "$gl_cv_c_inline_effective" >&6; }
+ if test $gl_cv_c_inline_effective = yes; then
+
+$as_echo "@%:@define HAVE_INLINE 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
+$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_inttypes_h=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
+$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
+if test "${gl_cv_next_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/inttypes.h#{
+ s#.*"\(.*/inttypes.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+$as_echo "$gl_cv_next_inttypes_h" >&6; }
+ fi
+ NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'inttypes.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_inttypes_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+$as_echo "@%:@define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
+
+
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ PRIPTR_PREFIX='"l"'
+ else
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT32_MAX && defined INTMAX_MAX
+ #define CONDITION (INT32_MAX < INTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (int) < sizeof (long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+ if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+ INT32_MAX_LT_INTMAX_MAX=1;
+ else
+ INT32_MAX_LT_INTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT64_MAX
+ #define CONDITION (INT64_MAX == LONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (long long int) == sizeof (long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+ if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+ INT64_MAX_EQ_LONG_MAX=1;
+ else
+ INT64_MAX_EQ_LONG_MAX=0;
+ fi
+
+
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT32_MAX && defined UINTMAX_MAX
+ #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+ if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+ UINT32_MAX_LT_UINTMAX_MAX=1;
+ else
+ UINT32_MAX_LT_UINTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT64_MAX
+ #define CONDITION (UINT64_MAX == ULONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+ if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+ UINT64_MAX_EQ_ULONG_MAX=1;
+ else
+ UINT64_MAX_EQ_ULONG_MAX=0;
+ fi
+
+
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+
+ for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnan ((double)(x))
+ #else
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;
+int
+main ()
+{
+return isnand (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnand_no_libm=yes
+else
+ gl_cv_func_isnand_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
+$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
+
+ if test $gl_cv_func_isnand_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;
+int
+main ()
+{
+return isnanf (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanf_no_libm=yes
+else
+ gl_cv_func_isnanf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
+$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
+
+ if test $gl_cv_func_isnanf_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
+$as_echo_n "checking whether isnan(float) works... " >&6; }
+if test "${gl_cv_func_isnanf_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
+ *) gl_cv_func_isnanf_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+#endif
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaN() (0.0f / 0.0f)
+#endif
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; float value; } memory_float;
+int main()
+{
+ memory_float m;
+
+ if (isnanf (1.0f / 0.0f))
+ return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanf_works=yes
+else
+ gl_cv_func_isnanf_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
+$as_echo "$gl_cv_func_isnanf_works" >&6; }
+
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
+
+$as_echo "@%:@define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;
+int
+main ()
+{
+return isnanl (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanl_no_libm=yes
+else
+ gl_cv_func_isnanl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
+$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
+
+ gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
+ if test $gl_func_isnanl_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
+$as_echo_n "checking whether isnanl works... " >&6; }
+if test "${gl_cv_func_isnanl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+ *)
+ case "$host_os" in
+ netbsd*) gl_cv_func_isnanl_works="guessing no";;
+ *) gl_cv_func_isnanl_works="guessing yes";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+#elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+#endif
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
+int main ()
+{
+ memory_long_double m;
+ unsigned int i;
+
+ if (!isnanl (NaNl ()))
+ return 1;
+
+ /* The isnanl function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit (since the exponent never extends to
+ bit 31). */
+ m.value = NaNl ();
+ m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ for (i = 0; i < NWORDS; i++)
+ m.word[i] |= 1;
+ if (!isnanl (m.value))
+ return 1;
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanl_works=yes
+else
+ gl_cv_func_isnanl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
+$as_echo "$gl_cv_func_isnanl_works" >&6; }
+
+ case "$gl_cv_func_isnanl_works" in
+ *yes) ;;
+ *) gl_func_isnanl_no_libm=no ;;
+ esac
+ fi
+ if test $gl_func_isnanl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
+if test "${gl_cv_next_langinfo_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/langinfo.h#{
+ s#.*"\(.*/langinfo.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+$as_echo "$gl_cv_next_langinfo_h" >&6; }
+ fi
+ NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'langinfo.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_langinfo_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+
+
+
+
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
+if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = CODESET;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_codeset=yes
+else
+ gl_cv_header_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
+if test "${gl_cv_header_langinfo_era+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = ERA;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_era=yes
+else
+ gl_cv_header_langinfo_era=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+$as_echo "$gl_cv_header_langinfo_era" >&6; }
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+
+
+
+
+
+ for gl_func in nl_langinfo; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
+$as_echo_n "checking whether lseek detects pipes... " >&6; }
+if test "${gl_cv_func_lseek_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int main ()
+{
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_lseek_pipe=yes
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
+$as_echo "$gl_cv_func_lseek_pipe" >&6; }
+ if test $gl_cv_func_lseek_pipe = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
+
+
+ REPLACE_LSEEK=1
+
+$as_echo "@%:@define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+
+
+ fi
+
+
+
+ GNULIB_LSEEK=1
+
+
+
+
+ if test $ac_cv_func_lstat = yes; then
+
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+
+ else
+ HAVE_LSTAT=0
+ fi
+
+
+
+ GNULIB_LSTAT=1
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "@%:@define HAVE_MALLOC 1" >>confdefs.h
+
+else
+ $as_echo "@%:@define HAVE_MALLOC 0" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+
+$as_echo "@%:@define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+
+$as_echo "@%:@define GNULIB_MALLOC_GNU 1" >>confdefs.h
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+
+$as_echo "@%:@define HAVE_MALLOC_POSIX 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+ HAVE_MALLOC_POSIX=0
+ fi
+
+
+
+
+ GNULIB_MALLOC_POSIX=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_math_h='<'math.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
+$as_echo_n "checking absolute name of <math.h>... " >&6; }
+if test "${gl_cv_next_math_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_math_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/math.h#{
+ s#.*"\(.*/math.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_math_h='<'math.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
+$as_echo "$gl_cv_next_math_h" >&6; }
+ fi
+ NEXT_MATH_H=$gl_cv_next_math_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'math.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_math_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
+$as_echo_n "checking whether NAN macro works... " >&6; }
+if test "${gl_cv_header_math_nan_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_nan_works=yes
+else
+ gl_cv_header_math_nan_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
+$as_echo "$gl_cv_header_math_nan_works" >&6; }
+ if test $gl_cv_header_math_nan_works = no; then
+ REPLACE_NAN=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
+$as_echo_n "checking whether HUGE_VAL works... " >&6; }
+if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+@%:@include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of HUGE_VAL. */
+ double d = HUGE_VAL;
+ return d == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_huge_val_works=yes
+else
+ gl_cv_header_math_huge_val_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
+$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
+ if test $gl_cv_header_math_huge_val_works = no; then
+ REPLACE_HUGE_VAL=1
+ fi
+
+
+ for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_null_arg=yes
+else
+ gl_cv_func_mbrtowc_null_arg=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_retval=yes
+else
+ gl_cv_func_mbrtowc_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_nul_retval=yes
+else
+ gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *)
+$as_echo "@%:@define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBRTOWC=1
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBSINIT=1
+
+
+
+
+ if test $ac_cv_func_mbslen = yes; then
+ HAVE_MBSLEN=1
+ else
+ HAVE_MBSLEN=0
+ fi
+
+
+
+ GNULIB_MBSLEN=1
+
+
+
+ GNULIB_MBSSTR=1
+
+
+
+
+
+ :
+
+
+
+
+ GNULIB_MEMCHR=1
+
+
+
+ if test $ac_cv_have_decl_memmem = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
+$as_echo_n "checking whether memmem works in linear time... " >&6; }
+if test "${gl_cv_func_memmem_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_MAJOR >= 1007
+ Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky user" >/dev/null 2>&1; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works="guessing no"
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+
+int
+main ()
+{
+size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ void *result = 0;
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack memmem. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+ /* Check for quadratic performance. */
+ if (haystack && needle)
+ {
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ }
+ /* Check for empty needle behavior. */
+ return !result || !memmem ("a", 1, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
+$as_echo "$gl_cv_func_memmem_works" >&6; }
+ if test "$gl_cv_func_memmem_works" != yes; then
+ REPLACE_MEMMEM=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memmem.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+ GNULIB_MEMMEM=1
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in mkdtemp
+do :
+ ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
+if test "x$ac_cv_func_mkdtemp" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_MKDTEMP 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_mkdtemp = no; then
+ HAVE_MKDTEMP=0
+ :
+
+ fi
+
+
+
+ GNULIB_MKDTEMP=1
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
+$as_echo_n "checking for working mkstemp... " >&6; }
+if test "${gl_cv_func_working_mkstemp+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ mkdir conftest.mkstemp
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_working_mkstemp=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_mkstemp=yes
+else
+ gl_cv_func_working_mkstemp=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.mkstemp
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
+$as_echo "$gl_cv_func_working_mkstemp" >&6; }
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
+
+
+
+ fi
+
+
+
+ GNULIB_MKSTEMP=1
+
+
+
+
+
+
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+
+$as_echo "@%:@define REPLACE_NL_LANGINFO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_NL_LANGINFO=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
+$as_echo_n "checking for obstacks... " >&6; }
+if test "${ac_cv_func_obstack+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ @%:@include "obstack.h"
+int
+main ()
+{
+struct obstack mem;
+ @%:@define obstack_chunk_alloc malloc
+ @%:@define obstack_chunk_free free
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_obstack=yes
+else
+ ac_cv_func_obstack=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
+$as_echo "$ac_cv_func_obstack" >&6; }
+if test $ac_cv_func_obstack = yes; then
+
+$as_echo "@%:@define HAVE_OBSTACK 1" >>confdefs.h
+
+else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_obstack_printf_posix=no
+
+ if test $ac_cv_func_obstack_printf = yes ; then
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # obstack_printf exists and is
+ # already POSIX compliant.
+ gl_cv_func_obstack_printf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_obstack_printf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF_POSIX=1
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ *)
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
+$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_open_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ freebsd*) gl_cv_func_open_slash="guessing no" ;;
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
+#endif
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_open_slash=yes
+else
+ gl_cv_func_open_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl conftest.tmp conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
+$as_echo "$gl_cv_func_open_slash" >&6; }
+ case "$gl_cv_func_open_slash" in
+ *no)
+
+$as_echo "@%:@define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+$as_echo "@%:@define GNULIB_OPEN 1" >>confdefs.h
+
+
+
+
+ GNULIB_OPEN=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_pipe2 != yes; then
+ HAVE_PIPE2=0
+ fi
+
+
+
+ GNULIB_PIPE2=1
+
+
+
+$as_echo "@%:@define GNULIB_PIPE2_SAFER 1" >>confdefs.h
+
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
+
+ for ac_header in paths.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
+if test "x$ac_cv_header_paths_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_PATHS_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNP=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return frexp (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes)
+
+$as_echo "@%:@define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return ldexp (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexp_no_libm=yes
+else
+ gl_cv_func_ldexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
+$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
+ if test $gl_cv_func_ldexp_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return frexpl (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return ldexpl (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexpl_no_libm=yes
+else
+ gl_cv_func_ldexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
+$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
+ if test $gl_cv_func_ldexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
+$as_echo_n "checking whether ldexpl works... " >&6; }
+if test "${gl_cv_func_ldexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix*) gl_cv_func_ldexpl_works="guessing no";;
+ *) gl_cv_func_ldexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+extern long double ldexpl (long double, int);
+int main()
+{
+ volatile long double x1 = 1.0;
+ volatile long double y1 = ldexpl (x1, -1);
+ volatile long double x2 = 1.73205L;
+ volatile long double y2 = ldexpl (x2, 0);
+ return (y1 != 0.5L) || (y2 != x2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ldexpl_works=yes
+else
+ gl_cv_func_ldexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
+$as_echo "$gl_cv_func_ldexpl_works" >&6; }
+
+ case "$gl_cv_func_ldexpl_works" in
+ *yes)
+
+$as_echo "@%:@define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
+
+else
+ HAVE_DECL_LDEXPL=0
+fi
+
+ ;;
+ esac
+ fi
+
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
+_ACEOF
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quote.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rawmemchr
+do :
+ ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
+if test "x$ac_cv_func_rawmemchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RAWMEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rawmemchr = no; then
+ HAVE_RAWMEMCHR=0
+ :
+ fi
+
+
+
+ GNULIB_RAWMEMCHR=1
+
+
+
+
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+
+ :
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+$as_echo_n "checking whether readlink signature is correct... " >&6; }
+if test "${gl_cv_decl_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ /* Cause compilation failure if original declaration has wrong type. */
+ ssize_t readlink (const char *, char *, size_t);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_readlink_works=yes
+else
+ gl_cv_decl_readlink_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+$as_echo "$gl_cv_decl_readlink_works" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # We have readlink, so assume ln -s works.
+ ln -s conftest.no-such conftest.link
+ ln -s conftest.link conftest.lnk2
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_readlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+char buf[20];
+ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_readlink_works=yes
+else
+ gl_cv_func_readlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
+$as_echo "$gl_cv_func_readlink_works" >&6; }
+ if test "$gl_cv_func_readlink_works" != yes; then
+
+$as_echo "@%:@define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_READLINK=1
+
+
+
+
+
+@%:@ Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+ withval=$with_included_regex;
+fi
+
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_re_compile_pattern_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+
+int
+main ()
+{
+static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_re_compile_pattern_working=yes
+else
+ gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+
+$as_echo "@%:@define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "@%:@define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "@%:@define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "@%:@define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "@%:@define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "@%:@define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "@%:@define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "@%:@define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "@%:@define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "@%:@define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "@%:@define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "@%:@define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "@%:@define regcomp rpl_regcomp" >>confdefs.h
+
+
+$as_echo "@%:@define regexec rpl_regexec" >>confdefs.h
+
+
+$as_echo "@%:@define regerror rpl_regerror" >>confdefs.h
+
+
+$as_echo "@%:@define regfree rpl_regfree" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+ for ac_header in libintl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_LIBINTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
+$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
+if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_dst_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
+ if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_dst_works=yes
+else
+ gl_cv_func_rename_slash_dst_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
+$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
+$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
+if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_src_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
+ if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_src_works=yes
+else
+ gl_cv_func_rename_slash_src_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
+$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
+$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
+if test "${gl_cv_func_rename_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "" = ""; then
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1")) return 1;
+ if (unlink ("conftest.f1")) return 2;
+ if (rename ("conftest.f", "conftest.f")) return 3;
+ if (rename ("conftest.f1", "conftest.f1") == 0) return 4;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_link_works=yes
+else
+ gl_cv_func_rename_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
+$as_echo "$gl_cv_func_rename_link_works" >&6; }
+ if test "x$gl_cv_func_rename_link_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_HARD_LINK_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
+$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
+if test "${gl_cv_func_rename_dest_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2
+ touch conftest.f && mkdir conftest.d1 conftest.d2 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_dest_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
+ if (rename ("conftest.d2", "conftest.f") == 0) return 2;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_dest_works=yes
+else
+ gl_cv_func_rename_dest_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
+$as_echo "$gl_cv_func_rename_dest_works" >&6; }
+ if test "x$gl_cv_func_rename_dest_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "@%:@define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+
+ fi
+
+
+
+ GNULIB_RENAME=1
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rmdir
+do :
+ ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
+if test "x$ac_cv_func_rmdir" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RMDIR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rmdir = no; then
+ REPLACE_RMDIR=1
+ # If someone lacks rmdir, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_RMDIR_CHECK" != xyes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Your system lacks the rmdir function.
+ Please report this, along with the output of \"uname -a\", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_RMDIR_CHECK=yes.
+ E.g., ./configure SKIP_RMDIR_CHECK=yes
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+$as_echo_n "checking whether rmdir works... " >&6; }
+if test "${gl_cv_func_rmdir_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ mkdir conftest.dir
+ touch conftest.file
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rmdir_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+
+int
+main ()
+{
+return !rmdir ("conftest.file/") || errno != ENOTDIR
+ || !rmdir ("conftest.dir/./");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rmdir_works=yes
+else
+ gl_cv_func_rmdir_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.dir conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
+$as_echo "$gl_cv_func_rmdir_works" >&6; }
+ if test x"$gl_cv_func_rmdir_works" != xyes; then
+ REPLACE_RMDIR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_RMDIR=1
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sched.h>
+ struct sched_param a;
+ int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ SCHED_H=''
+else
+ SCHED_H='sched.h'
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sched_h='<'sched.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
+$as_echo_n "checking absolute name of <sched.h>... " >&6; }
+if test "${gl_cv_next_sched_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sched_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sched.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sched.h#{
+ s#.*"\(.*/sched.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sched_h='<'sched.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
+$as_echo "$gl_cv_next_sched_h" >&6; }
+ fi
+ NEXT_SCHED_H=$gl_cv_next_sched_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sched.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sched_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_sched_h = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+
+
+ ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
+"
+if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
+ HAVE_STRUCT_SCHED_PARAM=1
+else
+ HAVE_STRUCT_SCHED_PARAM=0
+fi
+
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_SETENV=1
+
+
+
+
+ if test $ac_cv_func_sigaction = yes; then
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+
+ fi
+
+
+
+ GNULIB_SIGACTION=1
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_signal_h='<'signal.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if test "${gl_cv_next_signal_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_signal_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/signal.h#{
+ s#.*"\(.*/signal.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_signal_h='<'signal.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+ fi
+ NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'signal.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_signal_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+
+else
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+ for gl_func in sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
+$as_echo_n "checking for signbit macro... " >&6; }
+if test "${gl_cv_func_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+/* If signbit is defined as a function, don't use it, since calling it for
+ 'float' or 'long double' arguments would involve conversions.
+ If signbit is not declared at all but exists as a library function, don't
+ use it, since the prototype may not match.
+ If signbit is not declared at all but exists as a compiler built-in, don't
+ use it, since it's preferable to use __builtin_signbit* (no warnings,
+ no conversions). */
+#ifndef signbit
+# error "signbit should be a macro"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit=yes
+else
+ gl_cv_func_signbit=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
+$as_echo "$gl_cv_func_signbit" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
+$as_echo_n "checking for signbit compiler built-ins... " >&6; }
+if test "${gl_cv_func_signbit_gcc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit_gcc="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if __GNUC__ >= 4
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+#else
+# error "signbit should be three compiler built-ins"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit_gcc=yes
+else
+ gl_cv_func_signbit_gcc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
+$as_echo "$gl_cv_func_signbit_gcc" >&6; }
+ if test "$gl_cv_func_signbit_gcc" = yes; then
+ REPLACE_SIGNBIT_USING_GCC=1
+ else
+ if test "$gl_cv_func_signbit" != yes; then
+ REPLACE_SIGNBIT=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
+$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_float_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0f };
+static memory_float minus = { -1.0f };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_signbit=`cat conftest.out`
+else
+ gl_cv_cc_float_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
+$as_echo "$gl_cv_cc_float_signbit" >&6; }
+ case "$gl_cv_cc_float_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0 };
+static memory_float minus = { -1.0 };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
+$as_echo "$gl_cv_cc_double_signbit" >&6; }
+ case "$gl_cv_cc_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0L };
+static memory_float minus = { -1.0L };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_long_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
+$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
+ case "$gl_cv_cc_long_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGNF $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ float x, y;
+int
+main ()
+{
+return copysignf (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignf_no_libm=yes
+else
+ gl_cv_func_copysignf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
+$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysign" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGN $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
+$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x, y;
+int
+main ()
+{
+return copysign (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysign_no_libm=yes
+else
+ gl_cv_func_copysign_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
+$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
+ if test $gl_cv_func_copysign_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_COPYSIGNL $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x, y;
+int
+main ()
+{
+return copysignl (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignl_no_libm=yes
+else
+ gl_cv_func_copysignl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
+$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+
+$as_echo "@%:@define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_SIGNBIT=1
+
+
+
+ signals_not_posix=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sigset_t" >/dev/null 2>&1; then :
+
+else
+ signals_not_posix=1
+fi
+rm -f conftest*
+
+ if test -z "$signals_not_posix"; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = x""yes; then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
+
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>
+"
+if test "x$ac_cv_type_sigset_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
+ fi
+
+
+
+ GNULIB_SIGPROCMASK=1
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+if test "${gl_cv_size_max+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_size_max=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Found it" >/dev/null 2>&1; then :
+ gl_cv_size_max=yes
+fi
+rm -f conftest*
+
+ if test -z "$gl_cv_size_max"; then
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
+#include <limits.h>"; then :
+
+else
+ size_t_bits_minus_1=
+fi
+
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
+
+else
+ fits_in_uint=
+fi
+
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+$as_echo "$gl_cv_size_max" >&6; }
+ if test "$gl_cv_size_max" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZE_MAX $gl_cv_size_max
+_ACEOF
+
+ fi
+
+
+
+
+ gl_cv_func_snprintf_usable=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+
+
+
+ GNULIB_SNPRINTF=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_snprintf_posix=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
+$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_truncation_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_truncation_c99=yes
+else
+ gl_cv_func_snprintf_truncation_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
+$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_retval_c99=yes
+else
+ gl_cv_func_snprintf_retval_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
+$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
+$as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_snprintf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_directive_n=yes
+else
+ gl_cv_func_snprintf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
+$as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
+$as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
+if test "${gl_cv_func_vsnprintf_zerosize_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_vsnprintf_zerosize_c99=yes
+else
+ gl_cv_func_vsnprintf_zerosize_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
+$as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ case "$gl_cv_func_snprintf_truncation_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_retval_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_directive_n" in
+ *yes)
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ case "$gl_cv_func_vsnprintf_zerosize_c99" in
+ *yes)
+ # snprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_snprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
+$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
+if test "${gl_cv_next_spawn_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_spawn_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/spawn.h#{
+ s#.*"\(.*/spawn.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
+$as_echo "$gl_cv_next_spawn_h" >&6; }
+ fi
+ NEXT_SPAWN_H=$gl_cv_next_spawn_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'spawn.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_spawn_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_spawn_h = yes; then
+ HAVE_SPAWN_H=1
+ ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_POSIX_SPAWNATTR_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWNATTR_T=0
+fi
+
+ ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+fi
+
+ else
+ HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+
+ :
+
+ fi
+
+
+
+
+
+ for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawwn_file_actions_adddup2; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_sprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # sprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_sprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_sprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sprintf.$ac_objext"
+
+ REPLACE_SPRINTF=1
+ :
+
+ fi
+
+
+
+ GNULIB_SPRINTF_POSIX=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_ssize_t=yes
+else
+ gt_cv_ssize_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+ if test $gt_cv_ssize_t = no; then
+
+$as_echo "@%:@define ssize_t int" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
+$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
+if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+ *) gl_cv_func_stat_dir_slash="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st; return stat (".", &st) != stat ("./", &st);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_dir_slash=yes
+else
+ gl_cv_func_stat_dir_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
+$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
+if test "${gl_cv_func_stat_file_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_stat_file_slash="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st;
+ if (!stat ("conftest.tmp/", &st)) return 1;
+#if HAVE_LSTAT
+ if (!stat ("conftest.lnk/", &st)) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_file_slash=yes
+else
+ gl_cv_func_stat_file_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.tmp conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
+$as_echo "$gl_cv_func_stat_file_slash" >&6; }
+ case $gl_cv_func_stat_dir_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "@%:@define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
+;;
+ esac
+ case $gl_cv_func_stat_file_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "@%:@define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+;;
+ esac
+ if test $REPLACE_STAT = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
+
+
+ fi
+
+
+
+ GNULIB_STAT=1
+
+
+ STDARG_H='';
+ NEXT_STDARG_H='<stdarg.h>';
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+$as_echo_n "checking for va_copy... " >&6; }
+ if test "${gl_cv_func_va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_va_copy=yes
+else
+ gl_cv_func_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+$as_echo "$gl_cv_func_va_copy" >&6; }
+ if test $gl_cv_func_va_copy = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _AIX && !defined __GNUC__
+ AIX vaccine
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "vaccine" >/dev/null 2>&1; then :
+ gl_aixcc=yes
+else
+ gl_aixcc=no
+fi
+rm -f conftest*
+
+ if test $gl_aixcc = yes; then
+ STDARG_H=stdarg.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
+if test "${gl_cv_next_stdarg_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdarg_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdarg.h#{
+ s#.*"\(.*/stdarg.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+$as_echo "$gl_cv_next_stdarg_h" >&6; }
+ fi
+ NEXT_STDARG_H=$gl_cv_next_stdarg_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdarg.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdarg_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
+
+
+
+ if test "$gl_cv_next_stdarg_h" = '""'; then
+ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+ NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+ fi
+ else
+
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ if test "${gl_cv_func___va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef __va_copy
+error, bail out
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func___va_copy=yes
+else
+ gl_cv_func___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ as_echo_n="$saved_as_echo_n"
+
+ if test $gl_cv_func___va_copy = yes; then
+
+$as_echo "@%:@define va_copy __va_copy" >>confdefs.h
+
+ else
+
+
+$as_echo "@%:@define va_copy gl_va_copy" >>confdefs.h
+
+ fi
+ fi
+ fi
+
+
+
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wchar_t = no; then
+ HAVE_WCHAR_T=0
+ STDDEF_H=stddef.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_null_works=yes
+else
+ gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+ if test $gl_cv_decl_null_works = no; then
+ REPLACE_NULL=1
+ STDDEF_H=stddef.h
+ fi
+ if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stddef_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stddef.h#{
+ s#.*"\(.*/stddef.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+ fi
+ NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stddef.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stddef_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+ fi
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+@%:@define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+@%:@define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if test "${gl_cv_next_stdio_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdio_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdio.h#{
+ s#.*"\(.*/stdio.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
+ fi
+ NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdio.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdio_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
+
+
+
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+
+
+
+ for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if test "${gl_cv_next_stdlib_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdlib_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdlib.h#{
+ s#.*"\(.*/stdlib.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+$as_echo "$gl_cv_next_stdlib_h" >&6; }
+ fi
+ NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdlib.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdlib_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+
+
+
+ for ac_header in random.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_random_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RANDOM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+
+ ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+
+"
+if test "x$ac_cv_type_struct_random_data" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_RANDOM_DATA 1
+_ACEOF
+
+
+else
+ HAVE_STRUCT_RANDOM_DATA=0
+fi
+
+
+
+ for gl_func in atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define GNULIB_STDLIB_SAFER 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strchrnul
+do :
+ ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
+if test "x$ac_cv_func_strchrnul" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRCHRNUL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_strchrnul = no; then
+ HAVE_STRCHRNUL=0
+ :
+ fi
+
+
+
+ GNULIB_STRCHRNUL=1
+
+
+
+ if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define REPLACE_STRERROR $REPLACE_STRERROR
+_ACEOF
+
+ fi
+
+
+
+ GNULIB_STRERROR=1
+
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ if test $ac_cv_func_strndup = yes; then
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
+$as_echo_n "checking for working strndup... " >&6; }
+if test "${gl_cv_func_strndup_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ aix*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <string.h>
+ #include <stdlib.h>
+int
+main ()
+{
+
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strndup_works=yes
+else
+ gl_cv_func_strndup_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
+$as_echo "$gl_cv_func_strndup_works" >&6; }
+ case $gl_cv_func_strndup_works in
+ *no)
+ REPLACE_STRNDUP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ ;;
+ esac
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_STRNDUP=1
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+$as_echo_n "checking for working strnlen... " >&6; }
+if test "${ac_cv_func_strnlen_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strnlen_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
+
+ /* At least one implementation is buggy: that of AIX 4.3 would
+ give strnlen (S, 1) == 3. */
+
+ int i;
+ for (i = 0; i < S_LEN + 1; ++i)
+ {
+ int expected = i <= S_LEN ? i : S_LEN;
+ if (strnlen (S, i) != expected)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strnlen_working=yes
+else
+ ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+$as_echo "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no &&
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
+
+
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doesn't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ([strnlen])
+
+$as_echo "@%:@define strnlen rpl_strnlen" >>confdefs.h
+
+ :
+ fi
+
+
+
+ GNULIB_STRNLEN=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if test "${ac_cv_func_strtod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strtod=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+ {
+ /* Some versions of Linux strtod mis-parse strings with leading '+'. */
+ char *string = " +69";
+ char *term;
+ double value;
+ value = strtod (string, &term);
+ if (value != 69 || term != (string + 4))
+ return 1;
+ }
+
+ {
+ /* Under Solaris 2.4, strtod returns the wrong value for the
+ terminating character under some conditions. */
+ char *string = "NaN";
+ char *term;
+ strtod (string, &term);
+ if (term != string && *(term - 1) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strtod=yes
+else
+ ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+ if test $ac_cv_func_strtod = no; then
+ HAVE_STRTOD=0
+ REPLACE_STRTOD=1
+ :
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
+$as_echo_n "checking whether strtod obeys C99... " >&6; }
+if test "${gl_cv_func_strtod_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_strtod_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <math.h>
+#include <errno.h>
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+
+int
+main ()
+{
+
+ {
+ /* Older glibc and Cygwin mis-parse "-0x". */
+ const char *string = "-0x";
+ char *term;
+ double value = strtod (string, &term);
+ double zero = 0.0;
+ if (1.0 / value != -1.0 / zero || term != (string + 2))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
+ but mistakenly sets errno. */
+ const char *string = "inf";
+ char *term;
+ double value;
+ errno = 0;
+ value = strtod (string, &term);
+ if (value != HUGE_VAL || term != (string + 3) || errno)
+ return 1;
+ }
+ {
+ /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
+ const char *string = "nan()";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 5))
+ return 1;
+ }
+ {
+ /* darwin 10.6.1 misparses "nan(". */
+ const char *string = "nan(";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 3))
+ return 1;
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strtod_works=yes
+else
+ gl_cv_func_strtod_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
+$as_echo "$gl_cv_func_strtod_works" >&6; }
+ if test "$gl_cv_func_strtod_works" != yes; then
+ REPLACE_STRTOD=1
+ :
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+ fi
+ fi
+
+
+
+ GNULIB_STRTOD=1
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strtol
+do :
+ ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRTOL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_stat_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/stat.h#{
+ s#.*"\(.*/sys/stat.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+ fi
+ NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/stat.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+ for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
+if test "${gl_cv_next_sys_wait_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_wait_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/wait.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/wait.h#{
+ s#.*"\(.*/sys/wait.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+$as_echo "$gl_cv_next_sys_wait_h" >&6; }
+ fi
+ NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/wait.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+ for ac_func in __secure_getenv
+do :
+ ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
+if test "x$ac_cv_func___secure_getenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE___SECURE_GETENV 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
+if test "${gl_cv_next_unistd_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_unistd_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/unistd.h#{
+ s#.*"\(.*/unistd.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+$as_echo "$gl_cv_next_unistd_h" >&6; }
+ fi
+ NEXT_UNISTD_H=$gl_cv_next_unistd_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'unistd.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_unistd_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+
+
+
+ for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread readlink readlinkat rmdir sleep symlink symlinkat unlink unlinkat usleep; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
+
+
+
+
+$as_echo "@%:@define USE_UNLOCKED_IO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in unsetenv
+do :
+ ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_UNSETENV 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+$as_echo_n "checking for unsetenv() return type... " >&6; }
+if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_func_unsetenv_ret='int'
+else
+ gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+$as_echo "@%:@define VOID_UNSETENV 1" >>confdefs.h
+
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv works on duplicates" >&5
+$as_echo_n "checking whether unsetenv works on duplicates... " >&6; }
+if test "${gl_cv_func_unsetenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_unsetenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char entry[] = "b=2";
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry)) return 2;
+ entry[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_unsetenv_works=yes
+else
+ gl_cv_func_unsetenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+$as_echo "$gl_cv_func_unsetenv_works" >&6; }
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_UNSETENV=1
+
+
+
+ if test $ac_cv_func_vasnprintf = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasnprintf_posix=no
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasnprintf = yes; then
+ # vasnprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasnprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasnprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_vasprintf = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ GNULIB_VASPRINTF=1
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasprintf_posix=no
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vfprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # vfprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vfprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "@%:@define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "@%:@define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "@%:@define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "@%:@define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vfprintf.$ac_objext"
+
+ REPLACE_VFPRINTF=1
+
+$as_echo "@%:@define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VFPRINTF_POSIX=1
+
+
+
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vprintf.$ac_objext"
+
+ REPLACE_VPRINTF=1
+
+$as_echo "@%:@define REPLACE_VPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VPRINTF_POSIX=1
+
+
+
+
+ for ac_func in waitid
+do :
+ ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
+if test "x$ac_cv_func_waitid" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_WAITID 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
+if test "${gl_cv_next_wchar_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wchar_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wchar.h#{
+ s#.*"\(.*/wchar.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+$as_echo "$gl_cv_next_wchar_h" >&6; }
+ fi
+ NEXT_WCHAR_H=$gl_cv_next_wchar_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wchar.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wchar_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+
+ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+
+int
+main ()
+{
+@%:@undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_WCRTOMB=1
+ fi
+
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ fi
+ if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
+if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcrtomb_retval=yes
+else
+ gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCRTOMB=1
+
+
+
+
+
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ case "$host_os" in
+ mingw*)
+ ;;
+ *)
+ WCTYPE_H=
+ ;;
+ esac
+ fi
+ fi
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wctype_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wctype.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wctype.h#{
+ s#.*"\(.*/wctype.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
+ fi
+ NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wctype.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wctype_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+
+
+
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+
+
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcwidth" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_WCWIDTH $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
+$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
+if test "${gl_cv_func_wcwidth_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcwidth_works=yes
+else
+ gl_cv_func_wcwidth_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
+$as_echo "$gl_cv_func_wcwidth_works" >&6; }
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcwidth.$ac_objext"
+
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCWIDTH=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
+
+
+
+
+ :
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmemdup0.$ac_objext"
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
+
+
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+ :
+
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+
+
+
+
+
+
+
+
+
+
+ gltests_libdeps=
+ gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+ gl_source_base='tests/gnu'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
+
+
+ for ac_func in getpagesize
+do :
+ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ for ac_header in OS.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OS_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ for ac_header in sys/param.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SYS_PARAM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
+
+ ;;
+ esac
+
+
+
+ GNULIB_GETPAGESIZE=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
+$as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!link ("conftest.a", "conftest.b/")) return 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b")) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_link_works=yes
+else
+ gl_cv_func_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.a conftest.b conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
+$as_echo "$gl_cv_func_link_works" >&6; }
+ if test "$gl_cv_func_link_works" != yes; then
+ REPLACE_LINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_LINK=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "@%:@define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "@%:@define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+
+ if test $ac_cv_func_obstack_printf = no ; then
+
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF=1
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+[
+ #if defined _MSC_VER || defined __MINGW32__
+ notposix
+ #endif
+ ]
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "notposix" >/dev/null 2>&1; then :
+ posix_spawn_ported=no
+else
+ posix_spawn_ported=yes
+fi
+rm -f conftest*
+
+ if test $posix_spawn_ported = yes; then
+ POSIX_SPAWN_PORTED_TRUE=
+ POSIX_SPAWN_PORTED_FALSE='#'
+else
+ POSIX_SPAWN_PORTED_TRUE='#'
+ POSIX_SPAWN_PORTED_FALSE=
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
+if test "${gl_cv_func_svid_putenv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_svid_putenv=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_svid_putenv=yes
+else
+ gl_cv_func_svid_putenv=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
+$as_echo "$gl_cv_func_svid_putenv" >&6; }
+ if test $gl_cv_func_svid_putenv = no; then
+ REPLACE_PUTENV=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_PUTENV=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+$as_echo "@%:@define CHECK_SNPRINTF_POSIX 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "@%:@define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "@%:@define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+
+
+
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
+
+ else
+
+
+
+
+
+
+
+
+ for ac_func in strdup
+do :
+ ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRDUP 1
+_ACEOF
+
+else
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ fi
+
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ :
+
+
+
+ GNULIB_STRDUP=1
+
+
+
+
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_symlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_symlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!symlink ("a", "conftest.link/")) return 1;
+ if (symlink ("conftest.f", "conftest.lnk2")) return 2;
+ if (!symlink ("a", "conftest.lnk2/")) return 3;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_symlink_works=yes
+else
+ gl_cv_func_symlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+$as_echo "$gl_cv_func_symlink_works" >&6; }
+ if test "$gl_cv_func_symlink_works" != yes; then
+ REPLACE_SYMLINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_SYMLINK=1
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
+$as_echo_n "checking whether wctob works... " >&6; }
+if test "${gl_cv_func_wctob_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wctob_works=yes
+else
+ gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
+$as_echo "$gl_cv_func_wctob_works" >&6; }
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+ ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wctob" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_WCTOB $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_WCTOB=1
+
+
+
+
+
+
+
+
+
+
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+
+
+
+
+@%:@ Check whether --with-packager was given.
+if test "${with_packager+set}" = set; then :
+ withval=$with_packager; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+@%:@ Check whether --with-packager-version was given.
+if test "${with_packager_version+set}" = set; then :
+ withval=$with_packager_version; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER_VERSION "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+@%:@ Check whether --with-packager-bug-reports was given.
+if test "${with_packager_bug_reports+set}" = set; then :
+ withval=$with_packager_bug_reports; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+@%:@define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+ if test "X$with_packager" = "X" && \
+ test "X$with_packager_version$with_packager_bug_reports" != "X"
+ then
+ as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
+ fi
+
+
+# Gnulib doesn't always do things quite the way M4 would like...
+
+
+for ac_header in error.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "error.h" "ac_cv_header_error_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_error_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_ERROR_H 1
+_ACEOF
+ ERROR_H=""
+else
+ ERROR_H="error.h"
+fi
+
+done
+
+
+
+if test $ac_cv_header_error_h = yes; then
+ INCLUDE_ERROR_H='#include <error.h>'
+else
+ INCLUDE_ERROR_H='#include <gnu/error.h>'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
+$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
+if test "${gl_cv_next_getopt_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_getopt_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/getopt.h#{
+ s#.*"\(.*/getopt.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
+$as_echo "$gl_cv_next_getopt_h" >&6; }
+ fi
+ NEXT_GETOPT_H=$gl_cv_next_getopt_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'getopt.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_getopt_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+
+
+ gl_replace_getopt=
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_header in getopt.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETOPT_H 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_func in getopt_long_only
+do :
+ ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
+if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GETOPT_LONG_ONLY 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
+"
+if test "x$ac_cv_have_decl_optreset" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_OPTRESET $ac_have_decl
+_ACEOF
+
+ fi
+
+ if test -z "$gl_replace_getopt"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
+$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
+if test "${gl_cv_func_getopt_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !HAVE_DECL_OPTRESET
+# define OPTIND_MIN 0
+#else
+# define OPTIND_MIN 1
+#endif
+
+int
+main ()
+{
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (argc, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ }
+ /* Some internal state exists at this point. */
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ }
+
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_posix=yes
+else
+ gl_cv_func_getopt_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
+$as_echo "$gl_cv_func_getopt_posix" >&6; }
+ case "$gl_cv_func_getopt_posix" in
+ *no) gl_replace_getopt=yes ;;
+ esac
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
+$as_echo_n "checking for working GNU getopt function... " >&6; }
+if test "${gl_cv_func_getopt_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+ # optstring is necessary for programs like m4 that have POSIX-mandated
+ # semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
+ gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+ if test "$cross_compiling" = yes; then :
+ case $host_os:$ac_cv_have_decl_optreset in
+ *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+ *:yes) gl_cv_func_getopt_gnu=no;;
+ *) gl_cv_func_getopt_gnu=yes;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+
+int
+main ()
+{
+
+ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+ and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ OSF/1 5.1, Solaris 10. */
+ {
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ opterr = 0;
+ if (getopt (2, myargv, "+a") != '?')
+ return 1;
+ }
+ /* This code succeeds on glibc 2.8, mingw,
+ and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ {
+ char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+ optind = 1;
+ if (getopt (4, argv, "p::") != 'p')
+ return 2;
+ if (optarg != NULL)
+ return 3;
+ if (getopt (4, argv, "p::") != -1)
+ return 4;
+ if (optind != 2)
+ return 5;
+ }
+ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
+ {
+ char *argv[] = { "program", "foo", "-p", NULL };
+ optind = 0;
+ if (getopt (3, argv, "-p") != 1)
+ return 6;
+ if (getopt (3, argv, "-p") != 'p')
+ return 7;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_gnu=yes
+else
+ gl_cv_func_getopt_gnu=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ if test "$gl_had_POSIXLY_CORRECT" != yes; then
+ { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
+$as_echo "$gl_cv_func_getopt_gnu" >&6; }
+ if test "$gl_cv_func_getopt_gnu" = "no"; then
+ gl_replace_getopt=yes
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getenv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_DECL_GETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if test -n "$gl_replace_getopt"; then :
+
+
+
+ GETOPT_H=getopt.h
+
+$as_echo "@%:@define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+ GNULIB_UNISTD_H_GETOPT=1
+ M4_replace_getopt=:
+ M4_replace_getopt=:
+
+
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -n "$M4_replace_getopt"; then
+ GETOPT_TRUE=
+ GETOPT_FALSE='#'
+else
+ GETOPT_TRUE='#'
+ GETOPT_FALSE=
+fi
+
+
+
+
+@%:@ Check whether --with-included-obstack was given.
+if test "${with_included_obstack+set}" = set; then :
+ withval=$with_included_obstack;
+fi
+
+
+for ac_header in obstack.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "obstack.h" "ac_cv_header_obstack_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_obstack_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_OBSTACK_H 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "x${with_included_obstack-no}" != xno; then
+ ac_cv_func_obstack=no
+fi
+
+OBSTACK_H=
+if test $ac_cv_func_obstack = yes; then
+ INCLUDE_OBSTACK_H='#include <obstack.h>'
+else
+ INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
+ OBSTACK_H=obstack.h
+fi
+
+
+
+
+if test $ac_use_included_regex = no; then
+ INCLUDE_REGEX_H='#include <regex.h>'
+ REGEX_H=
+else
+ INCLUDE_REGEX_H='#include <gnu/regex.h>'
+ REGEX_H=regex.h
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
+$as_echo_n "checking whether an open file can be renamed... " >&6; }
+if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ M4_cv_func_rename_open_file_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+FILE *f = fopen ("conftest.1", "w+");
+ int result = rename ("conftest.1", "conftest.2");
+ fclose (f); remove ("conftest.1"); remove ("conftest.2");
+ return result;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ M4_cv_func_rename_open_file_works=yes
+else
+ M4_cv_func_rename_open_file_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
+$as_echo "$M4_cv_func_rename_open_file_works" >&6; }
+if test "$M4_cv_func_rename_open_file_works" = yes ; then
+ M4_rename_open_works=1
+else
+ M4_rename_open_works=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+@%:@define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
+_ACEOF
+
+
+
+
+## ------------------------ ##
+## Other external programs. ##
+## ------------------------ ##
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PERL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+## --------------------------- ##
+## C compiler characteristics. ##
+## --------------------------- ##
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+@%:@define size_t unsigned int
+_ACEOF
+
+fi
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
+$as_echo_n "checking size of long long int... " >&6; }
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long int)
+See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ ac_cv_sizeof_long_long_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
+$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+@%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+
+
+
+## ------------------------- ##
+## C headers required by M4. ##
+## ------------------------- ##
+
+
+
+
+if test $ac_cv_header_stdbool_h = yes; then
+ INCLUDE_STDBOOL_H='#include <stdbool.h>'
+else
+ INCLUDE_STDBOOL_H='#include <gnu/stdbool.h>'
+fi
+
+
+
+
+## --------------------------------- ##
+## Library functions required by M4. ##
+## --------------------------------- ##
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
+$as_echo_n "checking if malloc debugging is wanted... " >&6; }
+
+@%:@ Check whether --with-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then :
+ withval=$with_dmalloc; if test "$withval" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "@%:@define WITH_DMALLOC 1" >>confdefs.h
+
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_signal=int
+else
+ ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ac_fn_c_check_member "$LINENO" "stack_t" "ss_sp" "ac_cv_member_stack_t_ss_sp" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_member_stack_t_ss_sp" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STACK_T_SS_SP 1
+_ACEOF
+
+
+fi
+
+
+# Code from Jim Avera <jima@netcom.com>.
+# stackovf.c requires:
+# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
+# 2. Either sigaltstack or sigstack
+# 3. getrlimit, including support for RLIMIT_STACK
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if stack overflow is detectable" >&5
+$as_echo_n "checking if stack overflow is detectable... " >&6; }
+if test "${M4_cv_use_stackovf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_use_stackovf=no
+if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
+ if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <signal.h>
+
+int
+main ()
+{
+struct rlimit r; getrlimit (RLIMIT_STACK, &r);
+#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
+ && (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
+choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ M4_cv_use_stackovf=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_use_stackovf" >&5
+$as_echo "$M4_cv_use_stackovf" >&6; }
+
+ if test "$M4_cv_use_stackovf" = yes; then
+ STACKOVF_TRUE=
+ STACKOVF_FALSE='#'
+else
+ STACKOVF_TRUE='#'
+ STACKOVF_FALSE=
+fi
+
+if test "$M4_cv_use_stackovf" = yes; then
+
+$as_echo "@%:@define USE_STACKOVF 1" >>confdefs.h
+
+ ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "#include <sys/resource.h>
+
+"
+if test "x$ac_cv_type_rlim_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_RLIM_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define rlim_t int" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_stack_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STACK_T 1
+_ACEOF
+
+
+else
+
+$as_echo "@%:@define stack_t struct sigaltstack" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "sigcontext" "ac_cv_type_sigcontext" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_sigcontext" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGCONTEXT 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+struct sigaltstack x; x.ss_base = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "@%:@define ss_sp ss_base" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+# This is for the modules
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+for ac_func in strftime
+do :
+ ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_STRFTIME 1
+_ACEOF
+
+else
+ # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_strftime=yes
+else
+ ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
+ $as_echo "@%:@define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+## ------------------ ##
+## Configure options. ##
+## ------------------ ##
+
+for ac_header in gmp.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gmp_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+@%:@define HAVE_GMP_H 1
+_ACEOF
+
+fi
+
+done
+
+
+# Some versions of gmp provide mpq_init as a macro, so we need to
+# include the header file, otherwise the detection will fail.
+M4_gmp_save_LIBS="$LIBS"
+LIBS="$LIBS -lgmp"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_GMP_H
+# include <gmp.h>
+#endif
+int
+main ()
+{
+mpq_t n; mpq_init (n);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBADD_GMP=-lgmp
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$M4_gmp_save_LIBS
+
+
+
+@%:@ Check whether --with-gmp was given.
+if test "${with_gmp+set}" = set; then :
+ withval=$with_gmp; use_gmp=$withval
+else
+ use_gmp=yes
+fi
+
+
+case $use_gmp:$LIBADD_GMP:$ac_cv_header_gmp_h in
+ no:*)
+ M4_cv_using_lib_gmp=no
+ ;;
+ *::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&5
+$as_echo "$as_me: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ *:-lgmp:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp works but \`gmp.h' is missing" >&5
+$as_echo "$as_me: WARNING: gmp works but \`gmp.h' is missing" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ yes:*:yes)
+ M4_cv_using_lib_gmp=yes
+ ;;
+ *)
+ M4_cv_using_lib_gmp=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not detect gmp library" >&5
+$as_echo "$as_me: WARNING: could not detect gmp library" >&2;}
+ ;;
+esac
+
+
+# Don't try to link in libgmp if we are not using it after the last call
+if test "$M4_cv_using_lib_gmp" = yes; then
+
+$as_echo "@%:@define USE_GMP 1" >>confdefs.h
+
+fi
+
+USE_GMP=$M4_cv_using_lib_gmp
+
+
+ if test "x$USE_GMP" = xyes; then
+ USE_GMP_TRUE=
+ USE_GMP_FALSE='#'
+else
+ USE_GMP_TRUE='#'
+ USE_GMP_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
+$as_echo_n "checking which shell to use for syscmd... " >&6; }
+
+@%:@ Check whether --with-syscmd-shell was given.
+if test "${with_syscmd_shell+set}" = set; then :
+ withval=$with_syscmd_shell; case $withval in
+ yes) with_syscmd_shell=no;;
+ esac
+else
+ with_syscmd_shell=no
+fi
+
+if test "$with_syscmd_shell" = no ; then
+ with_syscmd_shell=/bin/sh
+ if test "$cross_compiling" != yes ; then
+ if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
+
+else
+ if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
+fi
+ M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
+ command -p getconf PATH
+ else
+ echo "/bin$PATH_SEPARATOR$PATH"
+ fi`
+ do
+ IFS=$M4_save_IFS
+ test -z "$M4_dir" && continue
+ { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
+ && { with_syscmd_shell=$M4_dir/sh; break; }
+ done
+ IFS=$M4_save_IFS
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
+$as_echo "$with_syscmd_shell" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+@%:@define M4_SYSCMD_SHELL "$with_syscmd_shell"
+_ACEOF
+
+
+
+
+## -------- ##
+## Outputs. ##
+## -------- ##
+ac_config_files="$ac_config_files Makefile gnu/Makefile doc/Makefile m4/system.h:m4/system_.h tests/atlocal tests/gnu/Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIB@&t@OBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIB@&t@OBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+LT_CONFIG_H=gnu/config.h
+
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ ltdl_LIBOBJS=$_ltdl_libobjs
+
+ ltdl_LTLIBOBJS=$_ltdl_ltlibobjs
+
+
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
+
+
+CONFIG_INCLUDE=gnu/config.h
+
+
+ M4_libobjs=
+ M4_ltlibobjs=
+ if test -n "$M4_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4_libobjs="$M4_libobjs $i.$ac_objext"
+ M4_ltlibobjs="$M4_ltlibobjs $i.lo"
+ done
+ fi
+ M4_LIBOBJS=$M4_libobjs
+
+ M4_LTLIBOBJS=$M4_ltlibobjs
+
+
+
+if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
+ as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+ M4tests_libobjs=
+ M4tests_ltlibobjs=
+ if test -n "$M4tests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
+ M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
+ done
+ fi
+ M4tests_LIBOBJS=$M4tests_libobjs
+
+ M4tests_LTLIBOBJS=$M4tests_ltlibobjs
+
+
+if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then
+ as_fn_error $? "conditional \"GETOPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${STACKOVF_TRUE}" && test -z "${STACKOVF_FALSE}"; then
+ as_fn_error $? "conditional \"STACKOVF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_GMP_TRUE}" && test -z "${USE_GMP_FALSE}"; then
+ as_fn_error $? "conditional \"USE_GMP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in @%:@(
+ *posix*) :
+ set -o posix ;; @%:@(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in @%:@(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in @%:@((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+@%:@ as_fn_error STATUS ERROR [LINENO LOG_FD]
+@%:@ ----------------------------------------
+@%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+@%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+@%:@ script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} @%:@ as_fn_error
+
+
+@%:@ as_fn_set_status STATUS
+@%:@ -----------------------
+@%:@ Set @S|@? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} @%:@ as_fn_set_status
+
+@%:@ as_fn_exit STATUS
+@%:@ -----------------
+@%:@ Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} @%:@ as_fn_exit
+
+@%:@ as_fn_unset VAR
+@%:@ ---------------
+@%:@ Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+@%:@ as_fn_append VAR VALUE
+@%:@ ----------------------
+@%:@ Append the text in VALUE to the end of the definition contained in VAR. Take
+@%:@ advantage of any shell optimizations that allow amortized linear growth over
+@%:@ repeated appends, instead of the typical quadratic growth present in naive
+@%:@ implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+@%:@ as_fn_arith ARG...
+@%:@ ------------------
+@%:@ Perform arithmetic evaluation on the ARGs, and store the result in the
+@%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments
+@%:@ must be portable across @S|@(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in @%:@(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+@%:@ as_fn_mkdir_p
+@%:@ -------------
+@%:@ Create "@S|@as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} @%:@ as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in @%:@(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in @%:@((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_links="$ac_config_links"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+GNU M4 config.status 1.9a.577-b3131-dirty
+configured by $0, generated by GNU Autoconf 2.67,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX
+@%:@@%:@ Running $as_me. @%:@@%:@
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+GNUmakefile=$GNUmakefile
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
+ "gnu/config.h") CONFIG_HEADERS="$CONFIG_HEADERS gnu/config.h:gnu/config.hin" ;;
+ "tests/m4") CONFIG_FILES="$CONFIG_FILES tests/m4" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "m4/system.h") CONFIG_FILES="$CONFIG_FILES m4/system.h:m4/system_.h" ;;
+ "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
+ "tests/gnu/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gnu/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "tests/atconfig":C) cat >tests/atconfig <<ATEOF
+@%:@ Configurable variable values for building test suites.
+@%:@ Generated by $0.
+@%:@ Copyright (C) 2010 Free Software Foundation, Inc.
+
+# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
+at_testdir='tests'
+abs_builddir='$ac_abs_builddir'
+at_srcdir='$ac_srcdir'
+abs_srcdir='$ac_abs_srcdir'
+at_top_srcdir='$ac_top_srcdir'
+abs_top_srcdir='$ac_abs_top_srcdir'
+at_top_build_prefix='$ac_top_build_prefix'
+abs_top_builddir='$ac_abs_top_builddir'
+
+# Backward compatibility with Autotest <= 2.59b:
+at_top_builddir=\$at_top_build_prefix
+
+AUTOTEST_PATH='tests'
+
+SHELL=\${CONFIG_SHELL-'$SHELL'}
+ATEOF
+ ;;
+ "tests/m4":F) chmod +x tests/m4 ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "po-directories":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/autom4te.cache/requests b/autom4te.cache/requests
new file mode 100644
index 00000000..189fd68b
--- /dev/null
+++ b/autom4te.cache/requests
@@ -0,0 +1,929 @@
+# This file was generated by Autom4te Tue Aug 3 21:06:07 PDT 2010.
+# It contains the lists of macros which have been traced.
+# It can be safely removed.
+
+@request = (
+ bless( [
+ '0',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ '/usr/share/aclocal-1.11/amversion.m4',
+ '/usr/share/aclocal-1.11/auxdir.m4',
+ '/usr/share/aclocal-1.11/cond.m4',
+ '/usr/share/aclocal-1.11/depend.m4',
+ '/usr/share/aclocal-1.11/depout.m4',
+ '/usr/share/aclocal-1.11/dmalloc.m4',
+ '/usr/share/aclocal-1.11/init.m4',
+ '/usr/share/aclocal-1.11/install-sh.m4',
+ '/usr/share/aclocal-1.11/lead-dot.m4',
+ '/usr/share/aclocal-1.11/make.m4',
+ '/usr/share/aclocal-1.11/minuso.m4',
+ '/usr/share/aclocal-1.11/missing.m4',
+ '/usr/share/aclocal-1.11/mkdirp.m4',
+ '/usr/share/aclocal-1.11/options.m4',
+ '/usr/share/aclocal-1.11/runlog.m4',
+ '/usr/share/aclocal-1.11/sanity.m4',
+ '/usr/share/aclocal-1.11/silent.m4',
+ '/usr/share/aclocal-1.11/strip.m4',
+ '/usr/share/aclocal-1.11/substnot.m4',
+ '/usr/share/aclocal-1.11/tar.m4',
+ 'ltdl/m4/00gnulib.m4',
+ 'ltdl/m4/alloca.m4',
+ 'ltdl/m4/argz.m4',
+ 'ltdl/m4/assert.m4',
+ 'ltdl/m4/autobuild.m4',
+ 'ltdl/m4/btowc.m4',
+ 'ltdl/m4/canonicalize.m4',
+ 'ltdl/m4/cloexec.m4',
+ 'ltdl/m4/close-stream.m4',
+ 'ltdl/m4/closein.m4',
+ 'ltdl/m4/closeout.m4',
+ 'ltdl/m4/codeset.m4',
+ 'ltdl/m4/config-h.m4',
+ 'ltdl/m4/debug.m4',
+ 'ltdl/m4/dirname.m4',
+ 'ltdl/m4/dos.m4',
+ 'ltdl/m4/double-slash-root.m4',
+ 'ltdl/m4/dup2.m4',
+ 'ltdl/m4/eealloc.m4',
+ 'ltdl/m4/environ.m4',
+ 'ltdl/m4/errno_h.m4',
+ 'ltdl/m4/error.m4',
+ 'ltdl/m4/execute.m4',
+ 'ltdl/m4/exitfail.m4',
+ 'ltdl/m4/exponentd.m4',
+ 'ltdl/m4/exponentf.m4',
+ 'ltdl/m4/exponentl.m4',
+ 'ltdl/m4/extensions.m4',
+ 'ltdl/m4/fatal-signal.m4',
+ 'ltdl/m4/fcntl-o.m4',
+ 'ltdl/m4/fcntl.m4',
+ 'ltdl/m4/fcntl_h.m4',
+ 'ltdl/m4/fflush.m4',
+ 'ltdl/m4/filenamecat.m4',
+ 'ltdl/m4/flexmember.m4',
+ 'ltdl/m4/float_h.m4',
+ 'ltdl/m4/fopen.m4',
+ 'ltdl/m4/fpending.m4',
+ 'ltdl/m4/fpieee.m4',
+ 'ltdl/m4/fpurge.m4',
+ 'ltdl/m4/freading.m4',
+ 'ltdl/m4/frexp.m4',
+ 'ltdl/m4/frexpl.m4',
+ 'ltdl/m4/fseeko.m4',
+ 'ltdl/m4/ftello.m4',
+ 'ltdl/m4/getdtablesize.m4',
+ 'ltdl/m4/getopt.m4',
+ 'ltdl/m4/getpagesize.m4',
+ 'ltdl/m4/gettext.m4',
+ 'ltdl/m4/gettimeofday.m4',
+ 'ltdl/m4/gl_list.m4',
+ 'ltdl/m4/glibc2.m4',
+ 'ltdl/m4/glibc21.m4',
+ 'ltdl/m4/gmp.m4',
+ 'ltdl/m4/gnulib-common.m4',
+ 'ltdl/m4/gnulib-comp.m4',
+ 'ltdl/m4/iconv.m4',
+ 'ltdl/m4/iconv_h.m4',
+ 'ltdl/m4/iconv_open.m4',
+ 'ltdl/m4/include_next.m4',
+ 'ltdl/m4/inline.m4',
+ 'ltdl/m4/intdiv0.m4',
+ 'ltdl/m4/intl.m4',
+ 'ltdl/m4/intlmacosx.m4',
+ 'ltdl/m4/intmax.m4',
+ 'ltdl/m4/intmax_t.m4',
+ 'ltdl/m4/inttypes-pri.m4',
+ 'ltdl/m4/inttypes.m4',
+ 'ltdl/m4/inttypes_h.m4',
+ 'ltdl/m4/isnand.m4',
+ 'ltdl/m4/isnanf.m4',
+ 'ltdl/m4/isnanl.m4',
+ 'ltdl/m4/langinfo_h.m4',
+ 'ltdl/m4/lcmessage.m4',
+ 'ltdl/m4/ldexpl.m4',
+ 'ltdl/m4/lib-ld.m4',
+ 'ltdl/m4/lib-link.m4',
+ 'ltdl/m4/lib-prefix.m4',
+ 'ltdl/m4/libtool.m4',
+ 'ltdl/m4/link.m4',
+ 'ltdl/m4/localcharset.m4',
+ 'ltdl/m4/locale-fr.m4',
+ 'ltdl/m4/locale-ja.m4',
+ 'ltdl/m4/locale-tr.m4',
+ 'ltdl/m4/locale-zh.m4',
+ 'ltdl/m4/lock.m4',
+ 'ltdl/m4/longlong.m4',
+ 'ltdl/m4/lseek.m4',
+ 'ltdl/m4/lstat.m4',
+ 'ltdl/m4/ltdl.m4',
+ 'ltdl/m4/ltoptions.m4',
+ 'ltdl/m4/ltsugar.m4',
+ 'ltdl/m4/ltversion.m4',
+ 'ltdl/m4/lt~obsolete.m4',
+ 'ltdl/m4/m4-error.m4',
+ 'ltdl/m4/m4-getopt.m4',
+ 'ltdl/m4/m4-gettext.m4',
+ 'ltdl/m4/m4-obstack.m4',
+ 'ltdl/m4/m4-regex.m4',
+ 'ltdl/m4/m4-rename.m4',
+ 'ltdl/m4/m4-syscmd.m4',
+ 'ltdl/m4/malloc.m4',
+ 'ltdl/m4/malloca.m4',
+ 'ltdl/m4/math_h.m4',
+ 'ltdl/m4/mbchar.m4',
+ 'ltdl/m4/mbiter.m4',
+ 'ltdl/m4/mbrtowc.m4',
+ 'ltdl/m4/mbsinit.m4',
+ 'ltdl/m4/mbslen.m4',
+ 'ltdl/m4/mbstate_t.m4',
+ 'ltdl/m4/memchr.m4',
+ 'ltdl/m4/memmem.m4',
+ 'ltdl/m4/mkdtemp.m4',
+ 'ltdl/m4/mkstemp.m4',
+ 'ltdl/m4/mmap-anon.m4',
+ 'ltdl/m4/mode_t.m4',
+ 'ltdl/m4/multiarch.m4',
+ 'ltdl/m4/nl_langinfo.m4',
+ 'ltdl/m4/nls.m4',
+ 'ltdl/m4/nocrash.m4',
+ 'ltdl/m4/obstack-printf-posix.m4',
+ 'ltdl/m4/obstack-printf.m4',
+ 'ltdl/m4/open.m4',
+ 'ltdl/m4/pathmax.m4',
+ 'ltdl/m4/pipe.m4',
+ 'ltdl/m4/pipe2.m4',
+ 'ltdl/m4/po.m4',
+ 'ltdl/m4/posix_spawn.m4',
+ 'ltdl/m4/printf-frexp.m4',
+ 'ltdl/m4/printf-frexpl.m4',
+ 'ltdl/m4/printf-posix.m4',
+ 'ltdl/m4/printf.m4',
+ 'ltdl/m4/progtest.m4',
+ 'ltdl/m4/putenv.m4',
+ 'ltdl/m4/quote.m4',
+ 'ltdl/m4/quotearg.m4',
+ 'ltdl/m4/rawmemchr.m4',
+ 'ltdl/m4/readlink.m4',
+ 'ltdl/m4/regex.m4',
+ 'ltdl/m4/rename.m4',
+ 'ltdl/m4/rmdir.m4',
+ 'ltdl/m4/sched_h.m4',
+ 'ltdl/m4/setenv.m4',
+ 'ltdl/m4/sig_atomic_t.m4',
+ 'ltdl/m4/sigaction.m4',
+ 'ltdl/m4/signal_h.m4',
+ 'ltdl/m4/signalblocking.m4',
+ 'ltdl/m4/signbit.m4',
+ 'ltdl/m4/size_max.m4',
+ 'ltdl/m4/snprintf-posix.m4',
+ 'ltdl/m4/snprintf.m4',
+ 'ltdl/m4/spawn_h.m4',
+ 'ltdl/m4/sprintf-posix.m4',
+ 'ltdl/m4/ssize_t.m4',
+ 'ltdl/m4/stackovf.m4',
+ 'ltdl/m4/stat.m4',
+ 'ltdl/m4/stdarg.m4',
+ 'ltdl/m4/stdbool.m4',
+ 'ltdl/m4/stddef_h.m4',
+ 'ltdl/m4/stdint.m4',
+ 'ltdl/m4/stdint_h.m4',
+ 'ltdl/m4/stdio-safer.m4',
+ 'ltdl/m4/stdio_h.m4',
+ 'ltdl/m4/stdlib-safer.m4',
+ 'ltdl/m4/stdlib_h.m4',
+ 'ltdl/m4/strchrnul.m4',
+ 'ltdl/m4/strdup.m4',
+ 'ltdl/m4/strerror.m4',
+ 'ltdl/m4/string_h.m4',
+ 'ltdl/m4/strndup.m4',
+ 'ltdl/m4/strnlen.m4',
+ 'ltdl/m4/strtod.m4',
+ 'ltdl/m4/strtol.m4',
+ 'ltdl/m4/symlink.m4',
+ 'ltdl/m4/sys_stat_h.m4',
+ 'ltdl/m4/sys_time_h.m4',
+ 'ltdl/m4/sys_wait_h.m4',
+ 'ltdl/m4/tempname.m4',
+ 'ltdl/m4/threadlib.m4',
+ 'ltdl/m4/time_h.m4',
+ 'ltdl/m4/tmpdir.m4',
+ 'ltdl/m4/uintmax_t.m4',
+ 'ltdl/m4/ulonglong.m4',
+ 'ltdl/m4/ungetc.m4',
+ 'ltdl/m4/unistd-safer.m4',
+ 'ltdl/m4/unistd_h.m4',
+ 'ltdl/m4/unlocked-io.m4',
+ 'ltdl/m4/vasnprintf-posix.m4',
+ 'ltdl/m4/vasnprintf.m4',
+ 'ltdl/m4/vasprintf-posix.m4',
+ 'ltdl/m4/vasprintf.m4',
+ 'ltdl/m4/version-etc.m4',
+ 'ltdl/m4/vfprintf-posix.m4',
+ 'ltdl/m4/visibility.m4',
+ 'ltdl/m4/vprintf-posix.m4',
+ 'ltdl/m4/wait-process.m4',
+ 'ltdl/m4/warn-on-use.m4',
+ 'ltdl/m4/wchar.m4',
+ 'ltdl/m4/wchar_t.m4',
+ 'ltdl/m4/wcrtomb.m4',
+ 'ltdl/m4/wctob.m4',
+ 'ltdl/m4/wctype.m4',
+ 'ltdl/m4/wcwidth.m4',
+ 'ltdl/m4/wint_t.m4',
+ 'ltdl/m4/xalloc.m4',
+ 'ltdl/m4/xsize.m4',
+ 'ltdl/m4/xstrndup.m4',
+ 'ltdl/m4/xvasprintf.m4',
+ 'configure.ac'
+ ],
+ {
+ 'gl_BUILD_ISNANF' => 1,
+ 'AM_ENABLE_STATIC' => 1,
+ 'AM_XGETTEXT_OPTION_INIT' => 1,
+ 'gt_TYPE_SSIZE_T' => 1,
+ 'gl_PREREQ_TEMPNAME' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'gl_AC_HEADER_STDINT_H' => 1,
+ 'gl_PREREQ_XALLOC' => 1,
+ 'gl_VERSION_ETC' => 1,
+ 'gl_GETOPT_SUBSTITUTE_HEADER' => 1,
+ 'gl_PIPE' => 1,
+ 'M4_SYSCMD' => 1,
+ '_m4_warn' => 1,
+ 'M4_CHECK_DEBUGGING' => 1,
+ 'LTSUGAR_VERSION' => 1,
+ '_LT_PROG_LTMAIN' => 1,
+ 'AC_LIBTOOL_GCJ' => 1,
+ 'gl_REPLACE_VPRINTF' => 1,
+ 'gt_TYPE_SIG_ATOMIC_T' => 1,
+ 'gl_PROMOTED_TYPE_MODE_T' => 1,
+ 'AC_LIB_ARG_WITH' => 1,
+ 'AC_LIBTOOL_CONFIG' => 1,
+ 'gl_PREREQ_ASNPRINTF' => 1,
+ 'gl_FUNC_BTOWC' => 1,
+ 'gt_FUNC_MKDTEMP' => 1,
+ 'M4_EARLY' => 1,
+ 'AC_LTDL_DLLIB' => 1,
+ '_AM_AUTOCONF_VERSION' => 1,
+ 'gl_THREADLIB_EARLY_BODY' => 1,
+ '_LT_AC_LANG_CXX' => 1,
+ 'gl_REPLACE_FCNTL' => 1,
+ 'gl_FOPEN_SAFER' => 1,
+ 'AC_LIB_PREPARE_MULTILIB' => 1,
+ 'gl_FCNTL_H' => 1,
+ 'M4_GNU_GETTEXT' => 1,
+ 'AC_PROG_NM' => 1,
+ 'AC_ENABLE_FAST_INSTALL' => 1,
+ 'M4_SYS_STACKOVF' => 1,
+ 'LTDL_CONVENIENCE' => 1,
+ 'gt_AC_TYPE_INTMAX_T' => 1,
+ 'gl_PREREQ_MKDTEMP' => 1,
+ 'gl_HEADER_STRING_H_DEFAULTS' => 1,
+ 'gl_DOUBLE_EXPONENT_LOCATION' => 1,
+ 'gl_FILE_NAME_CONCAT' => 1,
+ 'gl_REPLACE_WCHAR_H' => 1,
+ 'gl_FUNC_GETPAGESIZE' => 1,
+ 'gl_PREREQ_GETTIMEOFDAY' => 1,
+ 'gl_STDBOOL_H' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'gl_CLOSE_STREAM' => 1,
+ 'gl_PREREQ_VASNPRINTF_DIRECTIVE_LS' => 1,
+ 'gl_SYS_WAIT_H_DEFAULTS' => 1,
+ 'gl_FUNC_MEMMEM_SIMPLE' => 1,
+ 'AC_C_RESTRICT' => 1,
+ '_LT_AC_LANG_GCJ' => 1,
+ 'AC_' => 1,
+ 'AM_ICONV' => 1,
+ 'gl_STDIO_H_DEFAULTS' => 1,
+ '_LT_AC_PROG_ECHO_BACKSLASH' => 1,
+ '_LT_AC_TRY_DLOPEN_SELF' => 1,
+ 'LT_AC_PROG_SED' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ '_LT_AC_LANG_GCJ_CONFIG' => 1,
+ 'M4_GETOPT' => 1,
+ 'AC_ENABLE_SHARED' => 1,
+ 'gl_REPLACE_OBSTACK_PRINTF' => 1,
+ 'M4_REPLACE_FUNCS' => 1,
+ 'gl_FUNC_FREXP_WORKS' => 1,
+ 'gl_FATAL_SIGNAL' => 1,
+ 'gl_PREREQ_BTOWC' => 1,
+ '_AC_AM_CONFIG_HEADER_HOOK' => 1,
+ 'gl_PREREQ_LOCK' => 1,
+ 'gl_MBITER' => 1,
+ 'AM_MAKE_INCLUDE' => 1,
+ 'gl_SIGNAL_MODULE_INDICATOR' => 1,
+ 'gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE' => 1,
+ 'gl_INTEGER_TYPE_SUFFIX' => 1,
+ 'gt_INTTYPES_PRI' => 1,
+ 'gl_REPLACE_OPEN' => 1,
+ 'M4_REGEX' => 1,
+ 'AC_C_FLEXIBLE_ARRAY_MEMBER' => 1,
+ 'gl_PREREQ_MKSTEMP' => 1,
+ 'M4_RENAME' => 1,
+ 'AC_LIBTOOL_SETUP' => 1,
+ 'AC_PROG_LD_RELOAD_FLAG' => 1,
+ 'gl_FUNC_LINK' => 1,
+ 'gl_PREREQ_GETOPT' => 1,
+ 'gl_PREREQ_MEMCHR' => 1,
+ 'gl_FUNC_GETDTABLESIZE' => 1,
+ 'gl_FUNC_WCRTOMB' => 1,
+ 'gl_INTTYPES_H' => 1,
+ 'AC_WITH_LTDL' => 1,
+ 'gl_TMPFILE_SAFER' => 1,
+ 'gl_FUNC_STAT' => 1,
+ 'gl_PREREQ_XMALLOC' => 1,
+ 'AM_DISABLE_STATIC' => 1,
+ 'AC_FUNC_MBRTOWC' => 1,
+ '_AC_PROG_LIBTOOL' => 1,
+ 'gl_FUNC_FCNTL' => 1,
+ 'AC_PATH_TOOL_PREFIX' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AC_LIBTOOL_F77' => 1,
+ 'gl_HEADER_STRING_H_BODY' => 1,
+ 'gl_WARN_ON_USE_PREPARE' => 1,
+ 'gl_FUNC_STRTOL' => 1,
+ 'M4tests_LIBSOURCES' => 1,
+ '_LT_AC_SYS_COMPILER' => 1,
+ 'gl_PREREQ_STRNLEN' => 1,
+ 'gl_FUNC_SETENV' => 1,
+ 'gl_STDLIB_H' => 1,
+ 'gl_REPLACE_LSEEK' => 1,
+ 'gl_PREREQ_MBRTOWC' => 1,
+ 'AM_SET_CURRENT_AUTOMAKE_VERSION' => 1,
+ 'M4_FILE_LIST' => 1,
+ 'gl_WAIT_PROCESS' => 1,
+ 'gl_PREREQ_VPRINTF' => 1,
+ 'gl_XVASPRINTF' => 1,
+ 'gl_PREREQ_FOPEN' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'gl_AC_TYPE_UINTMAX_T' => 1,
+ 'gl_SNPRINTF_RETVAL_C99' => 1,
+ 'AC_DISABLE_STATIC' => 1,
+ 'LT_PATH_NM' => 1,
+ 'AC_LTDL_SHLIBEXT' => 1,
+ 'gl_COMMON' => 1,
+ 'gl_FUNC_GETOPT_GNU' => 1,
+ 'gl_PREREQ_STRDUP' => 1,
+ 'gl_EXITFAIL' => 1,
+ 'gl_SPAWN_H' => 1,
+ 'gl_GLIBC21' => 1,
+ 'gl_FUNC_SETENV_SEPARATE' => 1,
+ 'gl_WCHAR_MODULE_INDICATOR' => 1,
+ '_AM_SET_OPTIONS' => 1,
+ 'gl_PREREQ_VASPRINTF_H' => 1,
+ '_AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'AC_LIBTOOL_SYS_OLD_ARCHIVE' => 1,
+ 'gl_PREREQ_STRCHRNUL' => 1,
+ 'gl_FUNC_RAWMEMCHR' => 1,
+ 'gl_STDINT_INCLUDES' => 1,
+ 'AM_SET_DEPDIR' => 1,
+ 'gl_FUNC_FOPEN' => 1,
+ 'gl_CANONICALIZE_LGPL_SEPARATE' => 1,
+ 'gl_PREREQ_VASNPRINTF_PRECISION' => 1,
+ 'gl_FUNC_ICONV_OPEN_UTF' => 1,
+ 'AC_DEFUN' => 1,
+ 'AM_PROG_MKDIR_P' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'gl_FUNC_GLIBC_UNLOCKED_IO' => 1,
+ 'gl_FUNC_GEN_TEMPNAME' => 1,
+ 'AM_MISSING_PROG' => 1,
+ 'gt_PRINTF_POSIX' => 1,
+ 'AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH' => 1,
+ 'gl_FUNC_OPEN' => 1,
+ 'M4_LIBOBJ' => 1,
+ '_LT_AC_LANG_C_CONFIG' => 1,
+ 'gl_INCLUDE_NEXT' => 1,
+ 'M4tests_LIBOBJ' => 1,
+ 'AC_LIBTOOL_OBJDIR' => 1,
+ 'gl_FUNC_ARGZ' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_PIC' => 1,
+ 'gl_LONG_DOUBLE_SIGN_LOCATION' => 1,
+ 'gl_DOUBLE_SIGN_LOCATION' => 1,
+ 'AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE' => 1,
+ 'gl_FUNC_PRINTF_FREXPL' => 1,
+ 'gl_REPLACE_SPAWN_H' => 1,
+ 'gl_FUNC_MKSTEMP' => 1,
+ 'gl_ERROR' => 1,
+ 'gl_FLOATTYPE_SIGN_LOCATION' => 1,
+ 'gl_UNISTD_SAFER' => 1,
+ 'AC_LIB_LTDL' => 1,
+ '_LT_AC_FILE_LTDLL_C' => 1,
+ 'gl_FUNC_FTELLO' => 1,
+ 'AM_ICONV_LINK' => 1,
+ 'AC_USE_SYSTEM_EXTENSIONS' => 1,
+ 'gl_MATH_MODULE_INDICATOR' => 1,
+ 'AC_LIBTOOL_DLOPEN' => 1,
+ 'AC_LIBTOOL_FC' => 1,
+ 'AC_LIB_HAVE_LINKFLAGS' => 1,
+ 'gl_LONG_DOUBLE_EXPONENT_LOCATION' => 1,
+ 'gl_FUNC_STRDUP_POSIX' => 1,
+ '_AM_SET_OPTION' => 1,
+ 'AC_LTDL_PREOPEN' => 1,
+ '_LT_LINKER_BOILERPLATE' => 1,
+ 'gl_PREREQ_ARGZ' => 1,
+ 'gl_PREREQ_OPEN' => 1,
+ 'AM_STDBOOL_H' => 1,
+ 'gl_HEADER_STRING_H' => 1,
+ 'gl_EEALLOC' => 1,
+ 'AM_OUTPUT_DEPENDENCY_COMMANDS' => 1,
+ 'gl_COMMON_BODY' => 1,
+ 'LT_SYS_MODULE_EXT' => 1,
+ 'gl_REPLACE_FTELLO' => 1,
+ 'gl_PREREQ_ERROR' => 1,
+ 'gl_PREREQ_PRINTF_PARSE' => 1,
+ 'gl_STDIN_LARGE_OFFSET' => 1,
+ 'gl_FUNC_ISNANL_WORKS' => 1,
+ 'gl_FUNC_FREXP' => 1,
+ 'gl_FILE_NAME_CONCAT_LGPL' => 1,
+ 'gt_INTDIV0' => 1,
+ 'AC_DISABLE_FAST_INSTALL' => 1,
+ 'include' => 1,
+ 'gl_STDIO_H' => 1,
+ 'gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE' => 1,
+ 'gl_ICONV_H' => 1,
+ 'gl_FUNC_ISNANF_NO_LIBM' => 1,
+ 'AM_POSTPROCESS_PO_MAKEFILE' => 1,
+ 'AC_LIBTOOL_SYS_HARD_LINK_LOCKS' => 1,
+ 'AC_LIBTOOL_LANG_F77_CONFIG' => 1,
+ 'gl_AC_HEADER_INTTYPES_H' => 1,
+ 'LTDL_INIT' => 1,
+ 'gl_HAVE_ISNAND_IN_LIBM' => 1,
+ 'AC_PROG_EGREP' => 1,
+ 'gl_STDLIB_SAFER' => 1,
+ '_LT_LINKER_OPTION' => 1,
+ 'gl_EEMALLOC' => 1,
+ 'AC_LIB_PREPARE_PREFIX' => 1,
+ 'gl_PREREQ_SIGPROCMASK' => 1,
+ 'gl_FUNC_ISNANL' => 1,
+ 'gl_FUNC_READLINK_SEPARATE' => 1,
+ 'AC_LIBTOOL_WIN32_DLL' => 1,
+ 'gl_SNPRINTF_PRESENCE' => 1,
+ 'gl_FUNC_VASNPRINTF' => 1,
+ 'LT_SYS_DLSEARCH_PATH' => 1,
+ 'gl_SYS_WAIT_MODULE_INDICATOR' => 1,
+ 'AM_GNU_GETTEXT_VERSION' => 1,
+ 'gl_PREREQ_ASPRINTF' => 1,
+ 'gl_THREADLIB' => 1,
+ 'gl_ASSERT' => 1,
+ 'gl_PRINTF_INFINITE_LONG_DOUBLE' => 1,
+ 'gt_CHECK_VAR_DECL' => 1,
+ 'gl_FUNC_ICONV_OPEN' => 1,
+ 'gl_PREREQ_VASNPRINTF_DIRECTIVE_F' => 1,
+ 'LT_INIT' => 1,
+ 'M4_OBSTACK' => 1,
+ 'gl_FUNC_FSEEKO' => 1,
+ 'gl_FUNC_LDEXPL' => 1,
+ 'gl_THREADLIB_EARLY' => 1,
+ 'gl_PREREQ_XSTRNDUP' => 1,
+ 'gl_FUNC_FPENDING' => 1,
+ 'gl_FREOPEN_SAFER' => 1,
+ 'gl_FUNC_ISNAND' => 1,
+ 'AM_PATH_PROG_WITH_TEST' => 1,
+ 'gl_PREREQ_WCRTOMB' => 1,
+ 'LT_AC_PROG_EGREP' => 1,
+ 'gl_UNISTD_H_DEFAULTS' => 1,
+ 'gl_GETTIMEOFDAY_REPLACE_LOCALTIME' => 1,
+ 'gl_POSIX_SPAWN' => 1,
+ 'gl_LANGINFO_H_DEFAULTS' => 1,
+ 'gl_REPLACE_VASNPRINTF' => 1,
+ 'gl_PREREQ_VASPRINTF' => 1,
+ 'M4_LIBSOURCES' => 1,
+ 'gl_SIGNAL_H_DEFAULTS' => 1,
+ 'AM_GNU_GETTEXT_NEED' => 1,
+ 'gl_PREREQ_SPRINTF' => 1,
+ 'gl_HEADER_TIME_H' => 1,
+ 'LT_PROG_GCJ' => 1,
+ 'gl_FUNC_VFPRINTF_POSIX' => 1,
+ 'gl_FUNC_MEMCHR' => 1,
+ 'gl_PREREQ_REGEX' => 1,
+ 'gl_CONFIG_H' => 1,
+ 'AC_PROG_MKDIR_P' => 1,
+ 'gl_VISIBILITY' => 1,
+ 'gl_REPLACE_ERRNO_VALUE' => 1,
+ 'gl_PRINTF_DIRECTIVE_F' => 1,
+ 'gt_LOCALE_FR' => 1,
+ 'gl_PREREQ_READLINK' => 1,
+ 'gl_REPLACE_FFLUSH' => 1,
+ 'gl_MBRTOWC_INCOMPLETE_STATE' => 1,
+ 'gl_MODULE_INDICATOR' => 1,
+ 'gl_DISABLE_THREADS' => 1,
+ 'gl_FUNC_SYMLINK' => 1,
+ 'gl_CHECK_MALLOC_POSIX' => 1,
+ 'gl_FUNC_FFLUSH' => 1,
+ 'LT_SYS_MODULE_PATH' => 1,
+ 'AC_LIBTOOL_POSTDEP_PREDEP' => 1,
+ 'gl_STDLIB_H_DEFAULTS' => 1,
+ 'gl_PREREQ_SETENV' => 1,
+ 'gl_FUNC_FREADING' => 1,
+ 'AM_RUN_LOG' => 1,
+ 'gt_LOCALE_FR_UTF8' => 1,
+ 'AC_LTDL_SYS_DLOPEN_DEPLIBS' => 1,
+ 'AC_LIBTOOL_PICMODE' => 1,
+ 'gl_CLOSEOUT' => 1,
+ 'gl_SPAWN_MODULE_INDICATOR' => 1,
+ 'gl_PREREQ_UNSETENV' => 1,
+ 'AC_LIB_PROG_LD' => 1,
+ 'gl_LOCALCHARSET' => 1,
+ 'gl_HEADER_TIME_H_BODY' => 1,
+ 'gl_SNPRINTF_DIRECTIVE_N' => 1,
+ 'AC_LIBTOOL_LANG_RC_CONFIG' => 1,
+ 'gl_FUNC_SNPRINTF' => 1,
+ 'M4_ERROR' => 1,
+ 'gl_STDDEF_H_DEFAULTS' => 1,
+ '_LT_AC_LANG_CXX_CONFIG' => 1,
+ 'gl_DOUBLE_SLASH_ROOT' => 1,
+ 'gl_PREREQ_PRINTF_ARGS' => 1,
+ 'gl_UNISTD_MODULE_INDICATOR' => 1,
+ 'gl_FUNC_OBSTACK_PRINTF' => 1,
+ 'gl_MBRTOWC_NULL_ARG' => 1,
+ 'gt_LOCALE_TR_UTF8' => 1,
+ 'gl_SYS_STAT_MODULE_INDICATOR' => 1,
+ 'AM_SUBST_NOTMAKE' => 1,
+ 'gl_FUNC_MBSINIT' => 1,
+ 'gl_DECL_OBSTACK_PRINTF' => 1,
+ 'gl_FUNC_STRNDUP' => 1,
+ 'AM_SANITY_CHECK' => 1,
+ 'LTOBSOLETE_VERSION' => 1,
+ 'AC_LIBTOOL_LANG_GCJ_CONFIG' => 1,
+ 'gl_DIRNAME' => 1,
+ 'gl_CANONICALIZE_LGPL' => 1,
+ 'gl_CACHE_VAL_SILENT' => 1,
+ 'LT_SYS_SYMBOL_USCORE' => 1,
+ 'gl_HEADER_SYS_TIME_H_DEFAULTS' => 1,
+ 'gl_SIGNALBLOCKING' => 1,
+ 'M4_DEFAULT_PRELOAD' => 1,
+ 'LT_FUNC_DLSYM_USCORE' => 1,
+ 'gl_WCHAR_H_DEFAULTS' => 1,
+ 'gl_FUNC_SPRINTF_POSIX' => 1,
+ 'AM_DISABLE_SHARED' => 1,
+ 'gl_XALLOC' => 1,
+ 'gl_BUILD_ISNAND' => 1,
+ 'gt_INTL_MACOSX' => 1,
+ 'gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION' => 1,
+ '_AC_TYPE_LONG_LONG_SNIPPET' => 1,
+ 'gl_REGEX' => 1,
+ 'gl_INLINE' => 1,
+ 'AC_PROG_LD_GNU' => 1,
+ 'gl_FUNC_STRNLEN' => 1,
+ 'gl_QUOTE' => 1,
+ 'AC_LIBTOOL_PROG_CC_C_O' => 1,
+ 'gl_FUNC_FREXPL_WORKS' => 1,
+ 'gl_FLOAT_H' => 1,
+ 'gl_REPLACE_VASPRINTF' => 1,
+ 'AC_LIB_PREFIX' => 1,
+ 'AB_INIT' => 1,
+ 'gl_STDLIB_MODULE_INDICATOR' => 1,
+ 'gl_PREREQ_VASNPRINTF_FLAG_GROUPING' => 1,
+ 'AM_WITH_DMALLOC' => 1,
+ 'AC_DEFUN_ONCE' => 1,
+ 'gl_PATHMAX' => 1,
+ 'gl_REPLACE_GETOPT' => 1,
+ 'AC_LTDL_OBJDIR' => 1,
+ 'gl_PRINTF_PRECISION' => 1,
+ 'gl_FUNC_STRTOD' => 1,
+ 'gl_FUNC_LSEEK' => 1,
+ 'gl_SYS_TIME_MODULE_INDICATOR' => 1,
+ 'gl_FUNC_PUTENV' => 1,
+ 'LTDL_INSTALLABLE' => 1,
+ 'gl_MBRTOWC_SANITYCHECK' => 1,
+ 'AC_LIB_WITH_FINAL_PREFIX' => 1,
+ 'gl_FUNC_VASPRINTF_POSIX' => 1,
+ 'gl_CLOSEIN' => 1,
+ 'gt_TYPE_WINT_T' => 1,
+ 'gl_PREREQ_VASNPRINTF' => 1,
+ '_LT_AC_TAGVAR' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'gl_MBCHAR' => 1,
+ 'LT_LIB_DLLOAD' => 1,
+ 'gl_HEADER_SYS_STAT_H' => 1,
+ 'gl_MBRTOWC_NUL_RETVAL' => 1,
+ 'm4_include' => 1,
+ 'gl_BUILD_ISNANL' => 1,
+ 'gl_FUNC_READLINK' => 1,
+ 'gl_PRINTF_LONG_DOUBLE' => 1,
+ 'gl_INTTYPES_H_DEFAULTS' => 1,
+ 'gl_FUNC_NL_LANGINFO' => 1,
+ 'LT_CMD_MAX_LEN' => 1,
+ '_LT_AC_TAGCONFIG' => 1,
+ 'gl_FUNC_WCWIDTH' => 1,
+ 'gl_SPAWN_H_DEFAULTS' => 1,
+ 'gl_HAVE_ISNANF_IN_LIBM' => 1,
+ '_LT_COMPILER_BOILERPLATE' => 1,
+ 'gl_PREREQ_VASNPRINTF_WITH_EXTRAS' => 1,
+ 'M4_INIT' => 1,
+ 'AC_LTDL_DLSYM_USCORE' => 1,
+ 'AM_MISSING_HAS_RUN' => 1,
+ 'AC_TYPE_LONG_LONG_INT' => 1,
+ 'gl_SIGNBIT_TEST_PROGRAM' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ 'gl_INTTYPES_MODULE_INDICATOR' => 1,
+ 'gl_EXECUTE' => 1,
+ 'AC_LIBTOOL_DLOPEN_SELF' => 1,
+ 'LT_OUTPUT' => 1,
+ 'gl_CHECK_NEXT_HEADERS' => 1,
+ 'AC_LIB_PROG_LD_GNU' => 1,
+ 'AC_LIBTOOL_PROG_LD_SHLIBS' => 1,
+ 'gl_FUNC_FPURGE' => 1,
+ 'gl_STDIO_MODULE_INDICATOR' => 1,
+ 'gl_POSIX_SPAWN_INTERNAL' => 1,
+ 'gl_STDINT_H' => 1,
+ 'AC_LIBTOOL_LINKER_OPTION' => 1,
+ 'gl_POSIX_SPAWN_WORKS' => 1,
+ 'gl_SYS_STAT_H_DEFAULTS' => 1,
+ 'LT_AC_PROG_GCJ' => 1,
+ 'LT_SYS_DLOPEN_SELF' => 1,
+ 'gl_PREREQ_ALLOCA' => 1,
+ 'gl_PREREQ_VFPRINTF' => 1,
+ 'AC_COMPUTE_INT' => 1,
+ '_AM_IF_OPTION' => 1,
+ 'gl_PRINTF_SIZES_C99' => 1,
+ 'gl_CHECK_TYPES_SIGNED' => 1,
+ 'gl_FUNC_VPRINTF_POSIX' => 1,
+ 'AM_SET_LEADING_DOT' => 1,
+ 'gl_VSNPRINTF_ZEROSIZE_C99' => 1,
+ 'gt_CHECK_DECL' => 1,
+ 'AC_LIB_LINKFLAGS' => 1,
+ 'AM_PROG_NM' => 1,
+ 'gl_MBSTATE_T_BROKEN' => 1,
+ 'gl_SCHED_H' => 1,
+ 'gl_EEREALLOC' => 1,
+ 'AC_LIBLTDL_CONVENIENCE' => 1,
+ 'gl_FUNC_VASNPRINTF_POSIX' => 1,
+ 'AC_DEPLIBS_CHECK_METHOD' => 1,
+ 'gl_PRINTF_ENOMEM' => 1,
+ 'gl_STDDEF_MODULE_INDICATOR' => 1,
+ 'gl_WCHAR_H_INLINE_OK' => 1,
+ 'AC_LTDL_ENABLE_INSTALL' => 1,
+ 'AC_LIBTOOL_SYS_DYNAMIC_LINKER' => 1,
+ 'gl_FUNC_LSTAT' => 1,
+ 'gl_STRING_MODULE_INDICATOR' => 1,
+ 'gt_GLIBC2' => 1,
+ 'gl_PREREQ_STRERROR' => 1,
+ 'gl_LOCK' => 1,
+ 'gt_TYPE_WCHAR_T' => 1,
+ '_LT_AC_LOCK' => 1,
+ 'gl_WCHAR_H' => 1,
+ '_LT_AC_LANG_RC_CONFIG' => 1,
+ 'gl_FUNC_ALLOCA' => 1,
+ 'AC_HEADER_STDBOOL' => 1,
+ 'gl_WCTYPE_H' => 1,
+ 'gl_FUNC_WCTOB' => 1,
+ 'fp_WITH_DMALLOC' => 1,
+ 'AC_LTDL_SHLIBPATH' => 1,
+ 'AM_AUX_DIR_EXPAND' => 1,
+ 'gl_HEADER_SYS_TIME_H_BODY' => 1,
+ 'AC_LIB_LINKFLAGS_FROM_LIBS' => 1,
+ 'gl_HAVE_ISNANL_IN_LIBM' => 1,
+ 'AC_LIBTOOL_PROG_COMPILER_NO_RTTI' => 1,
+ '_LT_COMPILER_OPTION' => 1,
+ 'AC_LIB_LINKFLAGS_BODY' => 1,
+ 'gl_GETOPT_CHECK_HEADERS' => 1,
+ 'AC_CHECK_LIBM' => 1,
+ 'LT_PATH_LD' => 1,
+ 'gl_PRINTF_DIRECTIVE_LS' => 1,
+ '_AM_MANGLE_OPTION' => 1,
+ 'AC_TYPE_UNSIGNED_LONG_LONG_INT' => 1,
+ 'gl_FUNC_FREXPL_NO_LIBM' => 1,
+ 'gl_PRINTF_FLAG_GROUPING' => 1,
+ 'AC_LTDL_SYMBOL_USCORE' => 1,
+ '_LT_CC_BASENAME' => 1,
+ 'gl_FUNC_STRCHRNUL' => 1,
+ 'gl_REPLACE_DUP2' => 1,
+ '_LT_LIBOBJ' => 1,
+ 'gl_FUNC_ISNANF' => 1,
+ 'gl_HAVE_ISNAND_NO_LIBM' => 1,
+ 'gl_ICONV_MODULE_INDICATOR' => 1,
+ '_LT_AC_SHELL_INIT' => 1,
+ 'gl_PREREQ_SIGACTION' => 1,
+ 'gl_FUNC_GETTIMEOFDAY' => 1,
+ 'gl_SIZE_MAX' => 1,
+ 'AC_LIB_RPATH' => 1,
+ 'gl_PREREQ_SIG_HANDLER_H' => 1,
+ 'gl_PRINTF_DIRECTIVE_A' => 1,
+ 'gl_REPLACE_SNPRINTF' => 1,
+ 'AM_PROG_INSTALL_STRIP' => 1,
+ 'gl_HEADER_SYS_TIME_H' => 1,
+ 'gl_PREREQ_MEMMEM' => 1,
+ 'gl_POSIX_SPAWN_BODY' => 1,
+ 'gl_MULTIARCH' => 1,
+ 'gl_PREREQ_STRTOD' => 1,
+ 'LT_LIB_M' => 1,
+ '_LT_AC_CHECK_DLFCN' => 1,
+ 'M4_LIB_GMP' => 1,
+ '_AM_PROG_TAR' => 1,
+ 'gl_HEADER_ERRNO_H' => 1,
+ 'gl_FUNC_ISNANL_NO_LIBM' => 1,
+ 'gl_FUNC_STRERROR_SEPARATE' => 1,
+ 'gl_SNPRINTF_TRUNCATION_C99' => 1,
+ 'gl_SYS_WAIT_H' => 1,
+ 'LT_SYS_DLOPEN_DEPLIBS' => 1,
+ '_LT_AC_LANG_F77' => 1,
+ 'gl_XSTRNDUP' => 1,
+ 'gl_PREREQ_FFLUSH' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'gl_00GNULIB' => 1,
+ '_LTDL_SETUP' => 1,
+ 'AM_PROG_LIBTOOL' => 1,
+ 'AM_PROG_LD' => 1,
+ 'gl_ENVIRON' => 1,
+ 'gl_ICONV_H_DEFAULTS' => 1,
+ 'gl_FUNC_RMDIR' => 1,
+ 'AU_DEFUN' => 1,
+ 'gl_THREADLIB_BODY' => 1,
+ 'AC_PROG_LD' => 1,
+ 'gl_MBRTOWC_RETVAL' => 1,
+ 'gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST' => 1,
+ 'gt_TYPE_INTMAX_T' => 1,
+ 'gl_FCNTL_MODULE_INDICATOR' => 1,
+ 'AM_ICONV_LINKFLAGS_BODY' => 1,
+ 'gl_FUNC_GETOPT_POSIX' => 1,
+ 'gl_PREREQ_VASNPRINTF_FLAG_ZERO' => 1,
+ 'AC_LIBTOOL_LANG_CXX_CONFIG' => 1,
+ 'gl_FLOAT_EXPONENT_LOCATION' => 1,
+ 'gl_FUNC_VASPRINTF' => 1,
+ 'gl_FUNC_GETTIMEOFDAY_CLOBBER' => 1,
+ 'gl_FUNC_PRINTF_FREXP' => 1,
+ 'LT_PROG_RC' => 1,
+ 'gl_FUNC_ISNAND_NO_LIBM' => 1,
+ 'gl_FUNC_MBRTOWC' => 1,
+ 'gl_PRINTF_FLAG_ZERO' => 1,
+ 'gl_STDINT_BITSIZEOF' => 1,
+ 'gl_FUNC_UNSETENV' => 1,
+ 'gl_BIGENDIAN' => 1,
+ '_LT_PATH_TOOL_PREFIX' => 1,
+ 'AC_LIBTOOL_RC' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'gt_LOCALE_JA' => 1,
+ '_LT_AC_SYS_LIBPATH_AIX' => 1,
+ 'gl_FUNC_RENAME' => 1,
+ 'AM_ENABLE_SHARED' => 1,
+ 'gl_CHECK_TYPE_STRUCT_TIMESPEC' => 1,
+ 'gl_AC_TYPE_UNSIGNED_LONG_LONG' => 1,
+ 'AC_LIB_APPENDTOVAR' => 1,
+ 'gl_PREREQ_VASNPRINTF_LONG_DOUBLE' => 1,
+ 'gl_FUNC_DUP2' => 1,
+ 'gl_FP_IEEE' => 1,
+ 'gl_AC_TYPE_INTMAX_T' => 1,
+ 'gl_MBSLEN' => 1,
+ 'AC_ENABLE_STATIC' => 1,
+ 'AC_TYPE_MBSTATE_T' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AM_LANGINFO_CODESET' => 1,
+ 'LTVERSION_VERSION' => 1,
+ 'gl_FUNC_MEMMEM' => 1,
+ 'AM_PROG_INSTALL_SH' => 1,
+ 'AC_PATH_MAGIC' => 1,
+ 'gl_FUNC_REALPATH_WORKS' => 1,
+ 'AC_LTDL_SYSSEARCHPATH' => 1,
+ 'gl_STDDEF_H' => 1,
+ 'gl_FUNC_MMAP_ANON' => 1,
+ 'GL_NOCRASH' => 1,
+ 'AM_PO_SUBDIRS' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'gl_DIRNAME_LGPL' => 1,
+ 'AC_LIBTOOL_COMPILER_OPTION' => 1,
+ 'AC_DISABLE_SHARED' => 1,
+ 'gl_FCNTL_H_DEFAULTS' => 1,
+ 'gl_FUNC_UNGETC_WORKS' => 1,
+ 'gl_FUNC_MALLOC_POSIX' => 1,
+ 'gl_PREREQ_SNPRINTF' => 1,
+ 'gl_HAVE_ISNANL_NO_LIBM' => 1,
+ 'LT_LANG' => 1,
+ 'gl_AC_DOS' => 1,
+ 'gl_SIGACTION' => 1,
+ 'gl_FUNC_FREXP_NO_LIBM' => 1,
+ 'gl_FUNC_OBSTACK_PRINTF_POSIX' => 1,
+ 'AM_NLS' => 1,
+ 'gl_FUNC_STRERROR' => 1,
+ 'gl_FUNC_PIPE2' => 1,
+ 'gl_HAVE_ISNANF_NO_LIBM' => 1,
+ 'gl_LANGINFO_MODULE_INDICATOR' => 1,
+ 'gl_LIST' => 1,
+ 'gt_INTL_SUBDIR_CORE' => 1,
+ 'gl_REPLACE_ICONV_H' => 1,
+ 'gl_MATH_H_DEFAULTS' => 1,
+ 'AC_LIBTOOL_CXX' => 1,
+ 'LT_AC_PROG_RC' => 1,
+ 'gl_USE_SYSTEM_EXTENSIONS' => 1,
+ 'AM_DEP_TRACK' => 1,
+ 'gl_REPLACE_FSEEKO' => 1,
+ 'gl_SIGNBIT' => 1,
+ 'gl_PRINTF_POSITIONS' => 1,
+ 'gl_REPLACE_ICONV_OPEN' => 1,
+ 'gl_STDINT_TYPE_PROPERTIES' => 1,
+ 'gl_FUNC_STRDUP' => 1,
+ 'gl_PREREQ_VASNPRINTF_DIRECTIVE_A' => 1,
+ 'gl_FCNTL_O_FLAGS' => 1,
+ 'gl_PRINTF_DIRECTIVE_N' => 1,
+ 'gl_REPLACE_VFPRINTF' => 1,
+ 'gl_REPLACE_SPRINTF' => 1,
+ '_AM_DEPENDENCIES' => 1,
+ 'AC_LIBTOOL_LANG_C_CONFIG' => 1,
+ 'LTOPTIONS_VERSION' => 1,
+ 'gl_FLOAT_SIGN_LOCATION' => 1,
+ 'gl_PREREQ_MBSINIT' => 1,
+ 'gl_PREREQ_RAWMEMCHR' => 1,
+ 'AC_LIBLTDL_INSTALLABLE' => 1,
+ 'gl_XSIZE' => 1,
+ 'gl_MALLOCA' => 1,
+ 'gl_FUNC_FREXPL' => 1,
+ 'AM_INTL_SUBDIR' => 1,
+ 'gt_TMPDIR' => 1,
+ 'gl_SIGNAL_H' => 1,
+ 'gl_CLOEXEC' => 1,
+ 'gl_PRINTF_FLAG_LEFTADJUST' => 1,
+ 'gl_HEADER_TIME_H_DEFAULTS' => 1,
+ 'gl_GETOPT_IFELSE' => 1,
+ 'gl_QUOTEARG' => 1,
+ 'gl_FUNC_CANONICALIZE_FILENAME_MODE' => 1,
+ 'gl_UNISTD_H' => 1,
+ 'LT_WITH_LTDL' => 1,
+ 'gl_SNPRINTF_SIZE1' => 1,
+ 'gl_PREREQ_WCTOB' => 1,
+ 'gl_MATH_H' => 1,
+ '_LT_AC_LANG_F77_CONFIG' => 1,
+ 'gl_FUNC_SNPRINTF_POSIX' => 1,
+ 'gl_FUNC_LDEXPL_WORKS' => 1,
+ 'gt_LOCALE_ZH_CN' => 1,
+ 'M4tests_REPLACE_FUNCS' => 1,
+ 'gl_PREREQ_VASNPRINTF_ENOMEM' => 1,
+ 'AC_LIBTOOL_SYS_LIB_STRIP' => 1,
+ 'AC_LIB_FROMPACKAGE' => 1,
+ 'gt_LC_MESSAGES' => 1,
+ 'gl_LANGINFO_H' => 1,
+ 'AM_XGETTEXT_OPTION' => 1,
+ 'AC_LIBTOOL_SYS_MAX_CMD_LEN' => 1,
+ 'gl_ISNANF_WORKS' => 1,
+ 'gl_PRINTF_INFINITE' => 1,
+ 'gl_POPEN_SAFER' => 1,
+ 'gl_STDARG_H' => 1
+ }
+ ], 'Autom4te::Request' ),
+ bless( [
+ '1',
+ 1,
+ [
+ '/usr/share/autoconf'
+ ],
+ [
+ '/usr/share/autoconf/autoconf/autoconf.m4f',
+ 'aclocal.m4',
+ 'configure.ac'
+ ],
+ {
+ '_LT_AC_TAGCONFIG' => 1,
+ 'AM_PROG_F77_C_O' => 1,
+ 'm4_pattern_forbid' => 1,
+ 'AC_INIT' => 1,
+ '_AM_COND_IF' => 1,
+ 'AC_CANONICAL_TARGET' => 1,
+ 'AC_SUBST' => 1,
+ 'AC_CONFIG_LIBOBJ_DIR' => 1,
+ 'AC_FC_SRCEXT' => 1,
+ 'AC_CANONICAL_HOST' => 1,
+ 'AC_PROG_LIBTOOL' => 1,
+ 'AM_INIT_AUTOMAKE' => 1,
+ 'AC_CONFIG_SUBDIRS' => 1,
+ 'AM_AUTOMAKE_VERSION' => 1,
+ 'LT_CONFIG_LTDL_DIR' => 1,
+ 'AC_REQUIRE_AUX_FILE' => 1,
+ 'AC_CONFIG_LINKS' => 1,
+ 'm4_sinclude' => 1,
+ 'LT_SUPPORTED_TAG' => 1,
+ 'AM_MAINTAINER_MODE' => 1,
+ 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1,
+ '_m4_warn' => 1,
+ 'AM_PROG_CXX_C_O' => 1,
+ '_AM_COND_ENDIF' => 1,
+ 'AM_ENABLE_MULTILIB' => 1,
+ 'AM_SILENT_RULES' => 1,
+ 'AC_CONFIG_FILES' => 1,
+ 'LT_INIT' => 1,
+ 'include' => 1,
+ 'AM_GNU_GETTEXT' => 1,
+ 'AC_LIBSOURCE' => 1,
+ 'AM_PROG_FC_C_O' => 1,
+ 'AC_CANONICAL_BUILD' => 1,
+ 'AC_FC_FREEFORM' => 1,
+ 'AH_OUTPUT' => 1,
+ '_AM_SUBST_NOTMAKE' => 1,
+ 'AC_CONFIG_AUX_DIR' => 1,
+ 'sinclude' => 1,
+ 'm4_pattern_allow' => 1,
+ 'AM_PROG_CC_C_O' => 1,
+ 'AC_CANONICAL_SYSTEM' => 1,
+ 'AM_CONDITIONAL' => 1,
+ 'AC_CONFIG_HEADERS' => 1,
+ 'AC_DEFINE_TRACE_LITERAL' => 1,
+ 'm4_include' => 1,
+ '_AM_COND_ELSE' => 1,
+ 'AC_SUBST_TRACE' => 1
+ }
+ ], 'Autom4te::Request' )
+ );
+
diff --git a/autom4te.cache/traces.0 b/autom4te.cache/traces.0
new file mode 100644
index 00000000..e284661d
--- /dev/null
+++ b/autom4te.cache/traces.0
@@ -0,0 +1,20992 @@
+m4trace:/usr/share/aclocal-1.11/amversion.m4:14: -1- AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11'
+dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
+dnl require some minimum version. Point them to the right macro.
+m4_if([$1], [1.11.1], [],
+ [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
+])
+m4trace:/usr/share/aclocal-1.11/amversion.m4:33: -1- AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl
+m4_ifndef([AC_AUTOCONF_VERSION],
+ [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
+_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
+m4trace:/usr/share/aclocal-1.11/auxdir.m4:47: -1- AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])dnl
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+m4trace:/usr/share/aclocal-1.11/cond.m4:15: -1- AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl
+ ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])],
+ [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])dnl
+AC_SUBST([$1_FALSE])dnl
+_AM_SUBST_NOTMAKE([$1_TRUE])dnl
+_AM_SUBST_NOTMAKE([$1_FALSE])dnl
+m4_define([_AM_COND_VALUE_$1], [$2])dnl
+if $2; then
+ $1_TRUE=
+ $1_FALSE='#'
+else
+ $1_TRUE='#'
+ $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+ AC_MSG_ERROR([[conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.]])
+fi])])
+m4trace:/usr/share/aclocal-1.11/depend.m4:28: -1- AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC, [depcc="$CC" am_compiler_list=],
+ [$1], CXX, [depcc="$CXX" am_compiler_list=],
+ [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+ [$1], UPC, [depcc="$UPC" am_compiler_list=],
+ [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'],
+ [depcc="$$1" am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+ [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_$1_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+ fi
+ am__universal=false
+ m4_case([$1], [CC],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac],
+ [CXX],
+ [case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac])
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_$1_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+m4trace:/usr/share/aclocal-1.11/depend.m4:163: -1- AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+m4trace:/usr/share/aclocal-1.11/depend.m4:171: -1- AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking,
+[ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+])
+m4trace:/usr/share/aclocal-1.11/depout.m4:14: -1- AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`AS_DIRNAME("$mf")`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`AS_DIRNAME(["$file"])`
+ AS_MKDIR_P([$dirpart/$fdir])
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+])
+m4trace:/usr/share/aclocal-1.11/depout.m4:75: -1- AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles],
+ [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+ [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+m4trace:/usr/share/aclocal-1.11/dmalloc.m4:15: -1- AC_DEFUN([AM_WITH_DMALLOC], [AC_MSG_CHECKING([if malloc debugging is wanted])
+AC_ARG_WITH(dmalloc,
+[ --with-dmalloc use dmalloc, as in
+ http://www.dmalloc.com/dmalloc.tar.gz],
+[if test "$withval" = yes; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(WITH_DMALLOC,1,
+ [Define if using the dmalloc debugging malloc package])
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ AC_MSG_RESULT(no)
+fi], [AC_MSG_RESULT(no)])
+])
+m4trace:/usr/share/aclocal-1.11/dmalloc.m4:31: -1- AU_DEFUN([fp_WITH_DMALLOC], [AM_WITH_DMALLOC])
+m4trace:/usr/share/aclocal-1.11/dmalloc.m4:31: -1- AC_DEFUN([fp_WITH_DMALLOC], [AC_DIAGNOSE([obsolete], [The macro `fp_WITH_DMALLOC' is obsolete.
+You should run autoupdate.])dnl
+AM_WITH_DMALLOC])
+m4trace:/usr/share/aclocal-1.11/init.m4:26: -1- AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl
+dnl Autoconf wants to disallow AM_ names. We explicitly allow
+dnl the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+AC_REQUIRE([AC_PROG_INSTALL])dnl
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT.
+m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,,
+ [m4_fatal([AC_INIT should be called with package and version arguments])])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
+AC_REQUIRE([AM_PROG_MKDIR_P])dnl
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+_AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
+ [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+_AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl
+dnl The `parallel-tests' driver may need to know about EXEEXT, so add the
+dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro
+dnl is hooked onto _AC_COMPILER_EXEEXT early, see below.
+AC_CONFIG_COMMANDS_PRE(dnl
+[m4_provide_if([_AM_COMPILER_EXEEXT],
+ [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl
+])
+m4trace:/usr/share/aclocal-1.11/init.m4:126: -1- AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers.
+_am_arg=$1
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
+m4trace:/usr/share/aclocal-1.11/install-sh.m4:11: -1- AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+AC_SUBST(install_sh)])
+m4trace:/usr/share/aclocal-1.11/lead-dot.m4:12: -1- AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+m4trace:/usr/share/aclocal-1.11/make.m4:14: -1- AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+m4trace:/usr/share/aclocal-1.11/minuso.m4:14: -1- AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl
+AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([compile])dnl
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+dnl Make sure AC_PROG_CC is never called again, or it will override our
+dnl setting of CC.
+m4_define([AC_PROG_CC],
+ [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])])
+])
+m4trace:/usr/share/aclocal-1.11/missing.m4:14: -1- AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+m4trace:/usr/share/aclocal-1.11/missing.m4:24: -1- AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+AC_REQUIRE_AUX_FILE([missing])dnl
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+m4trace:/usr/share/aclocal-1.11/mkdirp.m4:11: -1- AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+m4trace:/usr/share/aclocal-1.11/options.m4:13: -1- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+m4trace:/usr/share/aclocal-1.11/options.m4:19: -1- AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+m4trace:/usr/share/aclocal-1.11/options.m4:25: -1- AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+m4trace:/usr/share/aclocal-1.11/options.m4:31: -1- AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+m4trace:/usr/share/aclocal-1.11/runlog.m4:12: -1- AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD
+ ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ (exit $ac_status); }])
+m4trace:/usr/share/aclocal-1.11/sanity.m4:14: -1- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[[\\\"\#\$\&\'\`$am_lf]]*)
+ AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+ *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*)
+ AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$[*]" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$[*]" != "X $srcdir/configure conftest.file" \
+ && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken
+alias in your environment])
+ fi
+
+ test "$[2]" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+m4trace:/usr/share/aclocal-1.11/silent.m4:14: -1- AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules],
+[ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')])
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+esac
+AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
+])
+m4trace:/usr/share/aclocal-1.11/strip.m4:17: -1- AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+ AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+m4trace:/usr/share/aclocal-1.11/substnot.m4:14: -1- AC_DEFUN([_AM_SUBST_NOTMAKE])
+m4trace:/usr/share/aclocal-1.11/substnot.m4:19: -1- AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
+m4trace:/usr/share/aclocal-1.11/tar.m4:24: -1- AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility.
+AM_MISSING_PROG([AMTAR], [tar])
+m4_if([$1], [v7],
+ [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [m4_case([$1], [ustar],, [pax],,
+ [m4_fatal([Unknown tar format])])
+AC_MSG_CHECKING([how to create a $1 tar archive])
+# Loop over all known methods to create a tar archive until one works.
+_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
+_am_tools=${am_cv_prog_tar_$1-$_am_tools}
+# Do not fold the above two line into one, because Tru64 sh and
+# Solaris sh will not grok spaces in the rhs of `-'.
+for _am_tool in $_am_tools
+do
+ case $_am_tool in
+ gnutar)
+ for _am_tar in tar gnutar gtar;
+ do
+ AM_RUN_LOG([$_am_tar --version]) && break
+ done
+ am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
+ am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
+ am__untar="$_am_tar -xf -"
+ ;;
+ plaintar)
+ # Must skip GNU tar: if it does not support --format= it doesn't create
+ # ustar tarball either.
+ (tar --version) >/dev/null 2>&1 && continue
+ am__tar='tar chf - "$$tardir"'
+ am__tar_='tar chf - "$tardir"'
+ am__untar='tar xf -'
+ ;;
+ pax)
+ am__tar='pax -L -x $1 -w "$$tardir"'
+ am__tar_='pax -L -x $1 -w "$tardir"'
+ am__untar='pax -r'
+ ;;
+ cpio)
+ am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
+ am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
+ am__untar='cpio -i -H $1 -d'
+ ;;
+ none)
+ am__tar=false
+ am__tar_=false
+ am__untar=false
+ ;;
+ esac
+
+ # If the value was cached, stop now. We just wanted to have am__tar
+ # and am__untar set.
+ test -n "${am_cv_prog_tar_$1}" && break
+
+ # tar/untar a dummy directory, and stop if the command works
+ rm -rf conftest.dir
+ mkdir conftest.dir
+ echo GrepMe > conftest.dir/file
+ AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
+ rm -rf conftest.dir
+ if test -s conftest.tar; then
+ AM_RUN_LOG([$am__untar <conftest.tar])
+ grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
+ fi
+done
+rm -rf conftest.dir
+
+AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
+AC_MSG_RESULT([$am_cv_prog_tar_$1])])
+AC_SUBST([am__tar])
+AC_SUBST([am__untar])
+])
+m4trace:ltdl/m4/00gnulib.m4:30: -1- AC_DEFUN([gl_00GNULIB])
+m4trace:ltdl/m4/alloca.m4:8: -1- AC_DEFUN([gl_FUNC_ALLOCA], [
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ if test $ac_cv_func_alloca_works = no; then
+ gl_PREREQ_ALLOCA
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
+ AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+ ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
+ ])
+ if test $gl_cv_rpl_alloca = yes; then
+ dnl OK, alloca can be implemented through a compiler built-in.
+ AC_DEFINE([HAVE_ALLOCA], [1],
+ [Define to 1 if you have 'alloca' after including <alloca.h>,
+ a header that may be supplied by this distribution.])
+ ALLOCA_H=alloca.h
+ else
+ dnl alloca exists as a library function, i.e. it is slow and probably
+ dnl a memory leak. Don't define HAVE_ALLOCA in this case.
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+ AC_SUBST([ALLOCA_H])
+])
+m4trace:ltdl/m4/alloca.m4:47: -1- AC_DEFUN([gl_PREREQ_ALLOCA], [:])
+m4trace:ltdl/m4/argz.m4:12: -1- AC_DEFUN([gl_FUNC_ARGZ], [gl_PREREQ_ARGZ
+
+AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_TYPES([error_t],
+ [],
+ [AC_DEFINE([error_t], [int],
+ [Define to a type to use for `error_t' if it is not otherwise available.])
+ AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
+ does not typedef error_t.])],
+ [#if defined(HAVE_ARGZ_H)
+# include <argz.h>
+#endif])
+
+ARGZ_H=
+AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
+ argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
+
+dnl if have system argz functions, allow forced use of
+dnl libltdl-supplied implementation (and default to do so
+dnl on "known bad" systems). Could use a runtime check, but
+dnl (a) detecting malloc issues is notoriously unreliable
+dnl (b) only known system that declares argz functions,
+dnl provides them, yet they are broken, is cygwin
+dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
+dnl So, it's more straightforward simply to special case
+dnl this for known bad systems.
+AS_IF([test -z "$ARGZ_H"],
+ [AC_CACHE_CHECK(
+ [if argz actually works],
+ [lt_cv_sys_argz_works],
+ [[case $host_os in #(
+ *cygwin*)
+ lt_cv_sys_argz_works=no
+ if test "$cross_compiling" != no; then
+ lt_cv_sys_argz_works="guessing no"
+ else
+ lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+ save_IFS=$IFS
+ IFS=-.
+ set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+ IFS=$save_IFS
+ lt_os_major=${2-0}
+ lt_os_minor=${3-0}
+ lt_os_micro=${4-0}
+ if test "$lt_os_major" -gt 1 \
+ || { test "$lt_os_major" -eq 1 \
+ && { test "$lt_os_minor" -gt 5 \
+ || { test "$lt_os_minor" -eq 5 \
+ && test "$lt_os_micro" -gt 24; }; }; }; then
+ lt_cv_sys_argz_works=yes
+ fi
+ fi
+ ;; #(
+ *) lt_cv_sys_argz_works=yes ;;
+ esac]])
+ AS_IF([test $lt_cv_sys_argz_works = yes],
+ [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
+ [This value is set to 1 to indicate that the system argz facility works])],
+ [ARGZ_H=argz.h
+ AC_LIBOBJ([argz])])])
+
+AC_SUBST([ARGZ_H])
+])
+m4trace:ltdl/m4/argz.m4:79: -1- AC_DEFUN([gl_PREREQ_ARGZ], [:])
+m4trace:ltdl/m4/assert.m4:11: -1- AC_DEFUN([gl_ASSERT], [
+ AC_MSG_CHECKING([whether to enable assertions])
+ AC_ARG_ENABLE([assert],
+ [AS_HELP_STRING([--disable-assert], [turn off assertions])],
+ [AS_IF([test "x$enableval" = xno],
+ [AC_DEFINE([NDEBUG], [1],
+ [Define to 1 if assertions should be disabled.])],
+ [test "x$enableval" != xyes],
+ [AC_MSG_WARN([invalid argument supplied to --enable-assert])
+ enable_assert=yes])],
+ [enable_assert=yes])
+ AC_MSG_RESULT([$enable_assert])
+])
+m4trace:ltdl/m4/autobuild.m4:11: -1- AC_DEFUN([AB_INIT], [
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if test -z "$AB_PACKAGE"; then
+ AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
+ fi
+ AC_MSG_NOTICE([autobuild project... $AB_PACKAGE])
+
+ if test -z "$AB_VERSION"; then
+ AB_VERSION=${PACKAGE_VERSION:-$VERSION}
+ fi
+ AC_MSG_NOTICE([autobuild revision... $AB_VERSION])
+
+ hostname=`hostname`
+ if test "$hostname"; then
+ AC_MSG_NOTICE([autobuild hostname... $hostname])
+ fi
+
+ ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
+
+ date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ AC_MSG_NOTICE([autobuild timestamp... $date])
+ fi
+])
+m4trace:ltdl/m4/btowc.m4:7: -1- AC_DEFUN([gl_FUNC_BTOWC], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
+ dnl program below may lead to an endless loop. See
+ dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+
+ AC_CHECK_FUNCS_ONCE([btowc])
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+ dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether btowc(EOF) is correct],
+ [gl_cv_func_btowc_eof],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_btowc_eof=yes],
+ [gl_cv_func_btowc_eof=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([btowc])
+ gl_PREREQ_BTOWC
+ fi
+])
+m4trace:ltdl/m4/btowc.m4:71: -1- AC_DEFUN([gl_PREREQ_BTOWC], [
+ :
+])
+m4trace:ltdl/m4/canonicalize.m4:11: -1- AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE], [
+ AC_LIBOBJ([canonicalize])
+
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+])
+m4trace:ltdl/m4/canonicalize.m4:27: -1- AC_DEFUN([gl_CANONICALIZE_LGPL], [
+ AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ AC_LIBOBJ([canonicalize-lgpl])
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ AC_LIBOBJ([canonicalize-lgpl])
+ REPLACE_REALPATH=1
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+])
+m4trace:ltdl/m4/canonicalize.m4:47: -1- AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE], [
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
+m4trace:ltdl/m4/canonicalize.m4:59: -1- AC_DEFUN([gl_FUNC_REALPATH_WORKS], [
+ AC_CHECK_FUNCS_ONCE([realpath])
+ AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
+ touch conftest.a
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ ]], [[
+ char *name1 = realpath ("conftest.a", NULL);
+ char *name2 = realpath ("conftest.b/../conftest.a", NULL);
+ char *name3 = realpath ("conftest.a/", NULL);
+ return !(name1 && *name1 == '/' && !name2 && !name3);
+ ]])
+ ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
+ [gl_cv_func_realpath_works="guessing no"])
+ ])
+ if test "$gl_cv_func_realpath_works" = yes; then
+ AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+ can malloc memory, always gives an absolute path, and handles
+ trailing slash correctly.])
+ fi
+])
+m4trace:ltdl/m4/cloexec.m4:7: -1- AC_DEFUN([gl_CLOEXEC], [
+ AC_LIBOBJ([cloexec])
+])
+m4trace:ltdl/m4/close-stream.m4:7: -1- AC_DEFUN([gl_CLOSE_STREAM], [
+ AC_LIBOBJ([close-stream])
+
+ dnl Prerequisites of lib/close-stream.c.
+ :
+])
+m4trace:ltdl/m4/closein.m4:7: -1- AC_DEFUN([gl_CLOSEIN], [
+ AC_LIBOBJ([closein])
+
+ dnl Prerequisites of lib/closein.c.
+ :
+])
+m4trace:ltdl/m4/closeout.m4:8: -1- AC_DEFUN([gl_CLOSEOUT], [
+ AC_LIBOBJ([closeout])
+
+ dnl Prerequisites of lib/closeout.c.
+ :
+])
+m4trace:ltdl/m4/codeset.m4:9: -1- AC_DEFUN([AM_LANGINFO_CODESET], [
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
+ [am_cv_langinfo_codeset=yes],
+ [am_cv_langinfo_codeset=no])
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
+m4trace:ltdl/m4/config-h.m4:12: -1- AC_DEFUN([gl_CONFIG_H], [AC_CONFIG_COMMANDS_PRE([test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=])])
+m4trace:ltdl/m4/debug.m4:30: -1- AC_DEFUN([M4_CHECK_DEBUGGING], [AC_REQUIRE([AC_PROG_CC])
+AC_ARG_ENABLE([debug], [AS_HELP_STRING([--enable-debug],
+ [build for debugging [default=no]])])
+AC_MSG_CHECKING([for compilation debug mode])
+AC_MSG_RESULT([${enable_debug-no}])
+
+: ${rm=rm -f}
+: ${RM=rm -f}
+
+set dummy $CC
+compiler="${compiler-[$]2}"
+test -n "$rm" || rm="rm -f"
+
+if test "X$enable_debug" = Xyes; then
+ AC_DISABLE_SHARED
+ AC_DEFINE([DEBUG], [1],
+ [Define this to enable additional runtime debugging])
+ M4_default_preload="m4 traditional gnu load \
+import modtest mpeval shadow stdlib time"
+ if test "$GCC" = yes; then
+ case "$CFLAGS" in
+ *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[[^ ]]* / /;s/-O[[^ ]]*$//'` ;;
+ esac
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -ggdb3],
+ [M4_cv_prog_compiler_ggdb3],
+ [-ggdb3 -c conftest.$ac_ext], [],
+ [CFLAGS="$CFLAGS -ggdb3"],
+ [CFLAGS="$CFLAGS -g"])
+ ;;
+ esac
+ CFLAGS="$CFLAGS -Wall"
+ WMORE="-Wshadow -Wpointer-arith -Wcast-align -Wnested-externs"
+ WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Winline"
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts $WMORE],
+ [M4_cv_prog_compiler_warning_flags],
+ [$WMORE -c conftest.$ac_ext], [],
+ [CFLAGS="$CFLAGS $WMORE"])
+
+ AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -Wno-long-long],
+ [M4_cv_prog_compiler_wnolonglong],
+ [-Wno-long-long -c conftest.$ac_ext], [],
+ [CFLAGS="$CFLAGS -Wno-long-long"])
+ else
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) CFLAGS="$CFLAGS -g" ;;
+ esac
+ fi
+else
+ AC_ENABLE_SHARED
+ case "$CFLAGS" in
+ *-g* ) CFLAGS=`echo "$CFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+ case "$CXXFLAGS" in
+ *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+fi
+])
+m4trace:ltdl/m4/dirname.m4:7: -1- AC_DEFUN([gl_DIRNAME], [
+ AC_REQUIRE([gl_DIRNAME_LGPL])
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([dirname])
+])
+m4trace:ltdl/m4/dirname.m4:14: -1- AC_DEFUN([gl_DIRNAME_LGPL], [
+ AC_LIBOBJ([basename-lgpl])
+ AC_LIBOBJ([dirname-lgpl])
+ AC_LIBOBJ([stripslash])
+
+ dnl Prerequisites of lib/dirname.h.
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+
+ dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
+ dnl lib/stripslash.c.
+])
+m4trace:ltdl/m4/dos.m4:13: -1- AC_DEFUN([gl_AC_DOS], [
+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif]])],
+ [ac_cv_win_or_dos=yes],
+ [ac_cv_win_or_dos=no])
+ ])
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ AC_CACHE_CHECK([whether drive letter can start relative path],
+ [ac_cv_drive_letter_can_be_relative],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#if defined __CYGWIN__
+drive letters are always absolute
+#endif]])],
+ [ac_cv_drive_letter_can_be_relative=yes],
+ [ac_cv_drive_letter_can_be_relative=no])
+ ])
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
+ $ac_fs_accepts_drive_letter_prefix,
+ [Define on systems for which file names may have a so-called
+ `drive letter' prefix, define this to compute the length of that
+ prefix, including the colon.])
+
+ AH_VERBATIM(ISSLASH,
+ [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
+ $ac_fs_backslash_is_file_name_separator,
+ [Define if the backslash character may also serve as a file name
+ component separator.])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE],
+ $ac_fs_drive_letter_can_be_relative,
+ [Define if a drive letter prefix denotes a relative path if it is
+ not followed by a file name component separator.])
+ ])
+m4trace:ltdl/m4/double-slash-root.m4:7: -1- AC_DEFUN([gl_DOUBLE_SLASH_ROOT], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
+ [ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi])
+ if test "$gl_cv_double_slash_root" = yes; then
+ AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
+ [Define to 1 if // is a file system root distinct from /.])
+ fi
+])
+m4trace:ltdl/m4/dup2.m4:7: -1- AC_DEFUN([gl_FUNC_DUP2], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ AC_LIBOBJ([dup2])
+ else
+ AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <unistd.h>
+#include <errno.h>]],
+ [if (dup2 (1, 1) == 0)
+ return 1;
+ close (0);
+ if (dup2 (0, 0) != -1)
+ return 2;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (1, 1000000) == -1 && errno != EBADF)
+ return 3;
+ return 0;
+ ])
+ ],
+ [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+ [case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works=no;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works=no;;
+ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+ # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+ gl_cv_func_dup2_works=no;;
+ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ gl_cv_func_dup2_works=no;;
+ *) gl_cv_func_dup2_works=yes;;
+ esac])
+ ])
+ if test "$gl_cv_func_dup2_works" = no; then
+ gl_REPLACE_DUP2
+ fi
+ fi
+])
+m4trace:ltdl/m4/dup2.m4:51: -1- AC_DEFUN([gl_REPLACE_DUP2], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ if test $ac_cv_func_dup2 = yes; then
+ REPLACE_DUP2=1
+ fi
+ AC_LIBOBJ([dup2])
+])
+m4trace:ltdl/m4/eealloc.m4:7: -1- AC_DEFUN([gl_EEALLOC], [
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_EEREALLOC])
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:ltdl/m4/eealloc.m4:14: -1- AC_DEFUN([gl_EEMALLOC], [
+ _AC_FUNC_MALLOC_IF(
+ [gl_cv_func_malloc_0_nonnull=1],
+ [gl_cv_func_malloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
+ [If malloc(0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+m4trace:ltdl/m4/eealloc.m4:24: -1- AC_DEFUN([gl_EEREALLOC], [
+ _AC_FUNC_REALLOC_IF(
+ [gl_cv_func_realloc_0_nonnull=1],
+ [gl_cv_func_realloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
+ [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+m4trace:ltdl/m4/environ.m4:7: -1- AC_DEFUN_ONCE([gl_ENVIRON], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc <unistd.h> to declare environ.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+])
+m4trace:ltdl/m4/environ.m4:20: -1- AC_DEFUN([gt_CHECK_VAR_DECL], [
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_MSG_CHECKING([if $2 is properly declared])
+ AC_CACHE_VAL([gt_cv_var], [
+ AC_TRY_COMPILE([$1
+ extern struct { int foo; } $2;],
+ [$2.foo = 1;],
+ gt_cv_var=no,
+ gt_cv_var=yes)])
+ AC_MSG_RESULT([$gt_cv_var])
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+ undefine([gt_cv_var])
+])
+m4trace:ltdl/m4/errno_h.m4:7: -1- AC_DEFUN_ONCE([gl_HEADER_ERRNO_H], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+ AC_EGREP_CPP([booboo],[
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+ ],
+ [gl_cv_header_errno_h_complete=no],
+ [gl_cv_header_errno_h_complete=yes])
+ ])
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+ gl_CHECK_NEXT_HEADERS([errno.h])
+ ERRNO_H='errno.h'
+ fi
+ AC_SUBST([ERRNO_H])
+ gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+ gl_REPLACE_ERRNO_VALUE([ENOLINK])
+ gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+m4trace:ltdl/m4/errno_h.m4:65: -1- AC_DEFUN([gl_REPLACE_ERRNO_VALUE], [
+ if test -n "$ERRNO_H"; then
+ AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+ AC_EGREP_CPP([yes],[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ],
+ [gl_cv_header_errno_h_]$1[=yes],
+ [gl_cv_header_errno_h_]$1[=no])
+ if test $gl_cv_header_errno_h_]$1[ = no; then
+ AC_EGREP_CPP([yes],[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ], [gl_cv_header_errno_h_]$1[=hidden])
+ if test $gl_cv_header_errno_h_]$1[ = hidden; then
+ dnl The macro exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ fi
+ fi
+ ])
+ case $gl_cv_header_errno_h_$1 in
+ yes | no)
+ $1_HIDDEN=0; $1_VALUE=
+ ;;
+ *)
+ $1_HIDDEN=1; $1_VALUE="$gl_cv_header_errno_h_$1"
+ ;;
+ esac
+ AC_SUBST($1[_HIDDEN])
+ AC_SUBST($1[_VALUE])
+ fi
+])
+m4trace:ltdl/m4/error.m4:9: -1- AC_DEFUN([gl_ERROR], [
+ AC_FUNC_ERROR_AT_LINE
+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+ gl_PREREQ_ERROR
+])
+m4trace:ltdl/m4/error.m4:17: -1- AC_DEFUN([gl_PREREQ_ERROR], [
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
+ AC_REQUIRE([AC_C_INLINE])
+ :
+])
+m4trace:ltdl/m4/execute.m4:7: -1- AC_DEFUN([gl_EXECUTE], [
+ dnl Prerequisites of lib/execute.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+])
+m4trace:ltdl/m4/exitfail.m4:8: -1- AC_DEFUN([gl_EXITFAIL], [
+ AC_LIBOBJ([exitfail])
+
+ dnl No prerequisites of lib/exitfail.c.
+ :
+])
+m4trace:ltdl/m4/exponentd.m4:6: -1- AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION], [
+ AC_CACHE_CHECK([where to find the exponent in a 'double'],
+ [gl_cv_cc_double_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_double_expbit0=`cat conftest.out`],
+ [gl_cv_cc_double_expbit0="unknown"],
+ [
+ dnl On ARM, there are two 'double' floating-point formats, used by
+ dnl different sets of instructions: The older FPA instructions assume
+ dnl that they are stored in big-endian word order, while the words
+ dnl (like integer types) are stored in little-endian byte order.
+ dnl The newer VFP instructions assume little-endian order consistenly.
+ AC_EGREP_CPP([mixed_endianness], [
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+ ],
+ [gl_cv_cc_double_expbit0="unknown"],
+ [
+ pushdef([AC_MSG_CHECKING],[:])dnl
+ pushdef([AC_MSG_RESULT],[:])dnl
+ pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl
+ AC_C_BIGENDIAN(
+ [gl_cv_cc_double_expbit0="word 0 bit 20"],
+ [gl_cv_cc_double_expbit0="word 1 bit 20"],
+ [gl_cv_cc_double_expbit0="unknown"])
+ popdef([AC_MSG_RESULT_UNQUOTED])dnl
+ popdef([AC_MSG_RESULT])dnl
+ popdef([AC_MSG_CHECKING])dnl
+ ])
+ ])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'double'.])
+ AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/exponentf.m4:6: -1- AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION], [
+ AC_CACHE_CHECK([where to find the exponent in a 'float'],
+ [gl_cv_cc_float_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_float_expbit0=`cat conftest.out`],
+ [gl_cv_cc_float_expbit0="unknown"],
+ [gl_cv_cc_float_expbit0="word 0 bit 23"])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'float'.])
+ AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/exponentl.m4:6: -1- AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION], [
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_CACHE_CHECK([where to find the exponent in a 'long double'],
+ [gl_cv_cc_long_double_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_long_double_expbit0=`cat conftest.out`],
+ [gl_cv_cc_long_double_expbit0="unknown"],
+ [
+ dnl When cross-compiling, we don't know. It depends on the
+ dnl ABI and compiler version. There are too many cases.
+ gl_cv_cc_long_double_expbit0="unknown"
+ ])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'long double'.])
+ AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/extensions.m4:37: -1- AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS], [AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])
+m4trace:ltdl/m4/extensions.m4:107: -1- AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS], [
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+m4trace:ltdl/m4/fatal-signal.m4:7: -1- AC_DEFUN([gl_FATAL_SIGNAL], [
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ gl_PREREQ_SIG_HANDLER_H
+])
+m4trace:ltdl/m4/fcntl-o.m4:12: -1- AC_DEFUN([gl_FCNTL_O_FLAGS], [
+ dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;]])],
+ [gl_cv_header_working_fcntl_h=yes],
+ [case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
+ [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+ [Define to 1 if O_NOATIME works.])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+ [Define to 1 if O_NOFOLLOW works.])
+])
+m4trace:ltdl/m4/fcntl.m4:16: -1- AC_DEFUN([gl_FUNC_FCNTL], [
+ dnl Persuade glibc to expose F_DUPFD_CLOEXEC.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ gl_REPLACE_FCNTL
+ else
+ dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target
+ AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
+ [gl_cv_func_fcntl_f_dupfd_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+]], [[return fcntl (0, F_DUPFD, -1) != -1;
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_works=yes],
+ [gl_cv_func_fcntl_f_dupfd_works=no],
+ [# Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac])])
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *) gl_REPLACE_FCNTL
+ AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD
+ behavior does not match POSIX]) ;;
+ esac
+
+ dnl Many systems lack F_DUPFD_CLOEXEC
+ AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
+ [gl_cv_func_fcntl_f_dupfd_cloexec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+ ]])],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
+ [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+ gl_REPLACE_FCNTL
+ dnl No witness macro needed for this bug.
+ fi
+ fi
+])
+m4trace:ltdl/m4/fcntl.m4:73: -1- AC_DEFUN([gl_REPLACE_FCNTL], [
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+ AC_LIBOBJ([fcntl])
+])
+m4trace:ltdl/m4/fcntl_h.m4:10: -1- AC_DEFUN([gl_FCNTL_H], [
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])
+ gl_CHECK_NEXT_HEADERS([fcntl.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, if it is not common
+ dnl enough to be declared everywhere.
+ gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
+ ]], [fcntl openat])
+])
+m4trace:ltdl/m4/fcntl_h.m4:23: -1- AC_DEFUN([gl_FCNTL_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/fcntl_h.m4:30: -1- AC_DEFUN([gl_FCNTL_H_DEFAULTS], [
+ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
+ GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
+ GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
+ HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
+ REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
+ REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
+])
+m4trace:ltdl/m4/fflush.m4:13: -1- AC_DEFUN([gl_FUNC_FFLUSH], [
+ AC_CACHE_CHECK([whether fflush works on input streams],
+ [gl_cv_func_fflush_stdin],
+ [echo hello world > conftest.txt
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#include <unistd.h>
+ ]], [[FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+ ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+ [dnl Pessimistically assume fflush is broken.
+ gl_cv_func_fflush_stdin=no])
+ rm conftest.txt
+ ])
+ if test $gl_cv_func_fflush_stdin = no; then
+ gl_REPLACE_FFLUSH
+ fi
+])
+m4trace:ltdl/m4/fflush.m4:67: -1- AC_DEFUN([gl_REPLACE_FFLUSH], [
+ AC_LIBOBJ([fflush])
+ AC_LIBOBJ([fseeko])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FFLUSH=1
+ REPLACE_FSEEKO=1
+ gl_PREREQ_FFLUSH
+])
+m4trace:ltdl/m4/fflush.m4:78: -1- AC_DEFUN([gl_PREREQ_FFLUSH], [
+ AC_REQUIRE([AC_C_INLINE])
+ :
+])
+m4trace:ltdl/m4/filenamecat.m4:7: -1- AC_DEFUN([gl_FILE_NAME_CONCAT], [
+ AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL])
+ AC_LIBOBJ([filenamecat])
+])
+m4trace:ltdl/m4/filenamecat.m4:13: -1- AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL], [
+ AC_LIBOBJ([filenamecat-lgpl])
+
+ dnl Prerequisites of lib/filenamecat-lgpl.c.
+ AC_CHECK_FUNCS_ONCE([mempcpy])
+])
+m4trace:ltdl/m4/flexmember.m4:11: -1- AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER], [
+ AC_CACHE_CHECK([for flexible array member],
+ ac_cv_c_flexmember,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };]],
+ [[int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;]])],
+ [ac_cv_c_flexmember=yes],
+ [ac_cv_c_flexmember=no])])
+ if test $ac_cv_c_flexmember = yes; then
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+ [Define to nothing if C supports flexible array members, and to
+ 1 if it does not. That way, with a declaration like `struct s
+ { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+ can be used with pre-C99 compilers.
+ When computing the size of such an object, don't use 'sizeof (struct s)'
+ as it overestimates the size. Use 'offsetof (struct s, d)' instead.
+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+ MSVC and with C++ compilers.])
+ else
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+ fi
+])
+m4trace:ltdl/m4/float_h.m4:7: -1- AC_DEFUN([gl_FLOAT_H], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ FLOAT_H=
+ case "$host_os" in
+ beos* | openbsd*)
+ FLOAT_H=float.h
+ gl_CHECK_NEXT_HEADERS([float.h])
+ ;;
+ esac
+ AC_SUBST([FLOAT_H])
+])
+m4trace:ltdl/m4/fopen.m4:7: -1- AC_DEFUN([gl_FUNC_FOPEN], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ dnl Replace fopen, for handling of "/dev/null".
+ REPLACE_FOPEN=1
+ dnl fopen on mingw also has the trailing slash bug.
+ gl_cv_func_fopen_slash="guessing no"
+ ;;
+ *)
+ dnl fopen("foo/", "w") should not create a file when the file name has a
+ dnl trailing slash.
+ AC_CACHE_CHECK([whether fopen recognizes a trailing slash],
+ [gl_cv_func_fopen_slash],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+ return fopen ("conftest.sl/", "w") != NULL;
+}], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
+ hpux*) gl_cv_func_fopen_slash="guessing no" ;;
+ *) gl_cv_func_fopen_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl
+ ])
+ ;;
+ esac
+ case "$gl_cv_func_fopen_slash" in
+ *no)
+ AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if fopen() fails to recognize a trailing slash.])
+ REPLACE_FOPEN=1
+ ;;
+ esac
+ if test $REPLACE_FOPEN = 1; then
+ AC_LIBOBJ([fopen])
+ gl_PREREQ_FOPEN
+ fi
+])
+m4trace:ltdl/m4/fopen.m4:58: -1- AC_DEFUN([gl_PREREQ_FOPEN], [
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:ltdl/m4/fpending.m4:16: -1- AC_DEFUN([gl_FUNC_FPENDING], [
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
+ AC_CHECK_FUNCS_ONCE([__fpending])
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ AC_CHECK_DECLS([__fpending], , , $fp_headers)
+ if test $ac_cv_func___fpending = no; then
+ AC_CACHE_CHECK(
+ [how to determine the number of pending output bytes on a stream],
+ ac_cv_sys_pending_output_n_bytes,
+ [
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[FILE *fp = stdin; (void) ($ac_expr);]])],
+ [fp_done=yes]
+ )
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+ ]
+ )
+ AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES],
+ $ac_cv_sys_pending_output_n_bytes,
+ [the number of pending output bytes on stream `fp'])
+ AC_LIBOBJ([fpending])
+ fi
+])
+m4trace:ltdl/m4/fpieee.m4:25: -1- AC_DEFUN([gl_FP_IEEE], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ # IEEE behaviour is the default on all CPUs except Alpha and SH
+ # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+ # and the GCC 4.1.2 manual).
+ case "$host_cpu" in
+ alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+ sh*)
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+ esac
+])
+m4trace:ltdl/m4/fpurge.m4:7: -1- AC_DEFUN([gl_FUNC_FPURGE], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fpurge])
+ AC_CHECK_FUNCS_ONCE([__fpurge])
+ AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [FILE *f = fopen ("conftest.txt", "w+");
+ if (!f) return 1;
+ if (fputc ('a', f) != 'a') return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != EOF) return 4;
+ if (fpurge (f) != 0) return 5;
+ if (putc ('b', f) != 'b') return 6;
+ if (fclose (f) != 0) return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+ if (fgetc (f) != 'a') return 9;
+ if (fgetc (f) != 'b') return 10;
+ if (fgetc (f) != EOF) return 11;
+ if (fclose (f) != 0) return 12;
+ if (remove ("conftest.txt") != 0) return 13;
+ return 0;])],
+ [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no],
+ [gl_cv_func_fpurge_works='guessing no'])])
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+ AC_LIBOBJ([fpurge])
+ fi
+ else
+ AC_LIBOBJ([fpurge])
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+])
+m4trace:ltdl/m4/freading.m4:7: -1- AC_DEFUN([gl_FUNC_FREADING], [
+ AC_CHECK_FUNCS_ONCE([__freading])
+])
+m4trace:ltdl/m4/frexp.m4:7: -1- AC_DEFUN([gl_FUNC_FREXP], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ FREXP_LIBM=
+ AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = no; then
+ AC_CACHE_CHECK([whether frexp() can be used with libm],
+ [gl_cv_func_frexp_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_in_libm=yes],
+ [gl_cv_func_frexp_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_frexp_in_libm = yes; then
+ FREXP_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_frexp_no_libm = yes \
+ || test $gl_cv_func_frexp_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $FREXP_LIBM"
+ gl_FUNC_FREXP_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp=yes ;;
+ *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
+ esac
+ else
+ gl_func_frexp=no
+ fi
+ if test $gl_func_frexp = yes; then
+ AC_DEFINE([HAVE_FREXP], [1],
+ [Define if the frexp() function is available and works.])
+ else
+ AC_LIBOBJ([frexp])
+ fi
+ AC_SUBST([FREXP_LIBM])
+])
+m4trace:ltdl/m4/frexp.m4:59: -1- AC_DEFUN([gl_FUNC_FREXP_NO_LIBM], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = yes; then
+ gl_FUNC_FREXP_WORKS
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp_no_libm=yes ;;
+ *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
+ esac
+ else
+ gl_func_frexp_no_libm=no
+ dnl Set REPLACE_FREXP here because the system may have frexp in libm.
+ REPLACE_FREXP=1
+ fi
+ if test $gl_func_frexp_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
+ [Define if the frexp() function is available in libc.])
+ else
+ AC_LIBOBJ([frexp])
+ fi
+])
+m4trace:ltdl/m4/frexp.m4:93: -1- AC_DEFUN([gl_FUNC_FREXP_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no],
+ [case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/frexpl.m4:7: -1- AC_DEFUN([gl_FUNC_FREXPL], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ FREXPL_LIBM=
+ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = no; then
+ AC_CACHE_CHECK([whether frexpl() can be used with libm],
+ [gl_cv_func_frexpl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_in_libm=yes],
+ [gl_cv_func_frexpl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_frexpl_in_libm = yes; then
+ FREXPL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_frexpl_no_libm = yes \
+ || test $gl_cv_func_frexpl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $FREXPL_LIBM"
+ gl_FUNC_FREXPL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl=yes ;;
+ *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;;
+ esac
+ else
+ gl_func_frexpl=no
+ fi
+ if test $gl_func_frexpl = yes; then
+ AC_DEFINE([HAVE_FREXPL], [1],
+ [Define if the frexpl() function is available.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_FREXPL=0
+ AC_LIBOBJ([frexpl])
+ fi
+ AC_SUBST([FREXPL_LIBM])
+])
+m4trace:ltdl/m4/frexpl.m4:63: -1- AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+ gl_FUNC_FREXPL_WORKS
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
+ [Define if the frexpl() function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_FREXPL=0
+ AC_LIBOBJ([frexpl])
+ fi
+])
+m4trace:ltdl/m4/frexpl.m4:102: -1- AC_DEFUN([gl_FUNC_FREXPL_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no],
+ [case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/fseeko.m4:7: -1- AC_DEFUN([gl_FUNC_FSEEKO], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
+ [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
+ ])
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+ gl_REPLACE_FSEEKO
+ fi
+])
+m4trace:ltdl/m4/fseeko.m4:28: -1- AC_DEFUN([gl_REPLACE_FSEEKO], [
+ AC_LIBOBJ([fseeko])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FSEEKO=1
+ dnl If we are also using the fseek module, then fseek needs replacing, too.
+ m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
+])
+m4trace:ltdl/m4/ftello.m4:7: -1- AC_DEFUN([gl_FUNC_FTELLO], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
+ [
+ AC_TRY_LINK([#include <stdio.h>], [ftello (stdin);],
+ [gl_cv_func_ftello=yes], [gl_cv_func_ftello=no])
+ ])
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+ gl_REPLACE_FTELLO
+ fi
+])
+m4trace:ltdl/m4/ftello.m4:27: -1- AC_DEFUN([gl_REPLACE_FTELLO], [
+ AC_LIBOBJ([ftello])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FTELLO=1
+])
+m4trace:ltdl/m4/getdtablesize.m4:7: -1- AC_DEFUN([gl_FUNC_GETDTABLESIZE], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([getdtablesize])
+ if test $ac_cv_func_getdtablesize != yes; then
+ HAVE_GETDTABLESIZE=0
+ AC_LIBOBJ([getdtablesize])
+ fi
+])
+m4trace:ltdl/m4/getopt.m4:8: -1- AC_DEFUN([gl_FUNC_GETOPT_POSIX], [
+ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ gl_GETOPT_IFELSE([
+ gl_REPLACE_GETOPT
+ ],
+ [])
+])
+m4trace:ltdl/m4/getopt.m4:21: -1- AC_DEFUN([gl_FUNC_GETOPT_GNU], [
+ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
+
+ AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
+])
+m4trace:ltdl/m4/getopt.m4:30: -1- AC_DEFUN([gl_REPLACE_GETOPT], [
+ dnl Arrange for getopt.h to be created.
+ gl_GETOPT_SUBSTITUTE_HEADER
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_UNISTD_H_GETOPT=1
+ dnl Arrange to compile the getopt implementation.
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+])
+m4trace:ltdl/m4/getopt.m4:43: -1- AC_DEFUN([gl_GETOPT_IFELSE], [
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
+])
+m4trace:ltdl/m4/getopt.m4:50: -1- AC_DEFUN([gl_GETOPT_CHECK_HEADERS], [
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ gl_CHECK_NEXT_HEADERS([getopt.h])
+ AC_CHECK_HEADERS_ONCE([getopt.h])
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+ AC_SUBST([HAVE_GETOPT_H])
+
+ gl_replace_getopt=
+
+ dnl Test whether <getopt.h> is available.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
+ fi
+
+ dnl Test whether the function getopt_long is available.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
+ fi
+
+ dnl BSD getopt_long uses an incompatible method to reset option processing.
+ dnl Existence of the variable, in and of itself, is not a reason to replace
+ dnl getopt, but knowledge of the variable is needed to determine how to
+ dnl reset and whether a reset reparses the environment.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_DECLS([optreset], [], [],
+ [[#include <getopt.h>]])
+ fi
+
+ dnl mingw's getopt (in libmingwex.a) does weird things when the options
+ dnl strings starts with '+' and it's not the first call. Some internal state
+ dnl is left over from earlier calls, and neither setting optind = 0 nor
+ dnl setting optreset = 1 get rid of this internal state.
+ dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
+ if test -z "$gl_replace_getopt"; then
+ AC_CACHE_CHECK([whether getopt is POSIX compatible],
+ [gl_cv_func_getopt_posix],
+ [
+ dnl This test fails on mingw and succeeds on all other platforms.
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !HAVE_DECL_OPTRESET
+# define OPTIND_MIN 0
+#else
+# define OPTIND_MIN 1
+#endif
+
+int
+main ()
+{
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (argc, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ }
+ /* Some internal state exists at this point. */
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ }
+
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
+ [case "$host_os" in
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_getopt_posix" in
+ *no) gl_replace_getopt=yes ;;
+ esac
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu],
+ [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+ # optstring is necessary for programs like m4 that have POSIX-mandated
+ # semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
+ gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+ ]], [[
+ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+ and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ OSF/1 5.1, Solaris 10. */
+ {
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ opterr = 0;
+ if (getopt (2, myargv, "+a") != '?')
+ return 1;
+ }
+ /* This code succeeds on glibc 2.8, mingw,
+ and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ {
+ char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+ optind = 1;
+ if (getopt (4, argv, "p::") != 'p')
+ return 2;
+ if (optarg != NULL)
+ return 3;
+ if (getopt (4, argv, "p::") != -1)
+ return 4;
+ if (optind != 2)
+ return 5;
+ }
+ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
+ {
+ char *argv[] = { "program", "foo", "-p", NULL };
+ optind = 0;
+ if (getopt (3, argv, "-p") != 1)
+ return 6;
+ if (getopt (3, argv, "-p") != 'p')
+ return 7;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_getopt_gnu=yes],
+ [gl_cv_func_getopt_gnu=no],
+ [dnl Cross compiling. Guess based on host and declarations.
+ case $host_os:$ac_cv_have_decl_optreset in
+ *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+ *:yes) gl_cv_func_getopt_gnu=no;;
+ *) gl_cv_func_getopt_gnu=yes;;
+ esac
+ ])
+ if test "$gl_had_POSIXLY_CORRECT" != yes; then
+ AS_UNSET([POSIXLY_CORRECT])
+ fi
+ ])
+ if test "$gl_cv_func_getopt_gnu" = "no"; then
+ gl_replace_getopt=yes
+ fi
+ fi
+])
+m4trace:ltdl/m4/getopt.m4:259: -1- AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER], [
+ GETOPT_H=getopt.h
+ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement functions and variables
+ should be used.])
+ AC_SUBST([GETOPT_H])
+])
+m4trace:ltdl/m4/getopt.m4:270: -1- AC_DEFUN([gl_PREREQ_GETOPT], [
+ AC_CHECK_DECLS_ONCE([getenv])
+])
+m4trace:ltdl/m4/getpagesize.m4:8: -1- AC_DEFUN([gl_FUNC_GETPAGESIZE], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS([getpagesize])
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ AC_CHECK_HEADERS([OS.h])
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ AC_CHECK_HEADERS([sys/param.h])
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+ AC_LIBOBJ([getpagesize])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/gettext.m4:57: -1- AC_DEFUN([AM_GNU_GETTEXT], [
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST([DATADIRNAME])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST([INSTOBJEXT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST([GENCAT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST([INTLOBJS])
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+m4trace:ltdl/m4/gettext.m4:374: -1- AC_DEFUN([AM_GNU_GETTEXT_NEED], [
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+m4trace:ltdl/m4/gettext.m4:381: -1- AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+m4trace:ltdl/m4/gettimeofday.m4:10: -1- AC_DEFUN([gl_FUNC_GETTIMEOFDAY], [
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+ gl_gettimeofday_timezone=void
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ else
+ gl_FUNC_GETTIMEOFDAY_CLOBBER
+ AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+ [gl_cv_func_gettimeofday_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ struct timeval c;
+ int gettimeofday (struct timeval *restrict, void *restrict);
+ ]],
+ [[/* glibc uses struct timezone * rather than the POSIX void *
+ if _GNU_SOURCE is defined. However, since the only portable
+ use of gettimeofday uses NULL as the second parameter, and
+ since the glibc definition is actually more typesafe, it is
+ not worth wrapping this to get a compliant signature. */
+ int (*f) (struct timeval *restrict, void *restrict)
+ = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=yes],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=almost],
+ [gl_cv_func_gettimeofday_posix_signature=no])])])
+ if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+ gl_gettimeofday_timezone='struct timezone'
+ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ fi
+ fi
+ AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
+ [Define this to 'void' or 'struct timezone' to match the system's
+ declaration of the second argument to gettimeofday.])
+])
+m4trace:ltdl/m4/gettimeofday.m4:71: -1- AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER], [
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+ [gl_cv_func_gettimeofday_clobber],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+ ]],
+ [[
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+ ]])],
+ [gl_cv_func_gettimeofday_clobber=no],
+ [gl_cv_func_gettimeofday_clobber=yes],
+ dnl When crosscompiling, assume it is broken.
+ [gl_cv_func_gettimeofday_clobber=yes])])
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+ AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+ [Define if gettimeofday clobbers the localtime buffer.])
+ fi
+])
+m4trace:ltdl/m4/gettimeofday.m4:107: -1- AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ AC_DEFINE([gmtime], [rpl_gmtime],
+ [Define to rpl_gmtime if the replacement function should be used.])
+ AC_DEFINE([localtime], [rpl_localtime],
+ [Define to rpl_localtime if the replacement function should be used.])
+])
+m4trace:ltdl/m4/gettimeofday.m4:117: -1- AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+ AC_CHECK_HEADERS([sys/timeb.h])
+ AC_CHECK_FUNCS([_ftime])
+])
+m4trace:ltdl/m4/gl_list.m4:7: -1- AC_DEFUN([gl_LIST], [
+ AC_REQUIRE([gl_INLINE])
+])
+m4trace:ltdl/m4/glibc2.m4:10: -1- AC_DEFUN([gt_GLIBC2], [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
+ [ac_cv_gnu_library_2],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2=yes],
+ [ac_cv_gnu_library_2=no])
+ ]
+ )
+ AC_SUBST([GLIBC2])
+ GLIBC2="$ac_cv_gnu_library_2"
+
+])
+m4trace:ltdl/m4/glibc21.m4:10: -1- AC_DEFUN([gl_GLIBC21], [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+ [ac_cv_gnu_library_2_1],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2_1=yes],
+ [ac_cv_gnu_library_2_1=no])
+ ]
+ )
+ AC_SUBST([GLIBC21])
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+])
+m4trace:ltdl/m4/gmp.m4:52: -1- AC_DEFUN([M4_LIB_GMP], [AC_PREREQ([2.56])dnl We use the new compiler based header checking in 2.56
+AC_CHECK_HEADERS([gmp.h], [], [], [AC_INCLUDES_DEFAULT])
+m4_pattern_allow([^M4_gmp_save_LIBS$])
+# Some versions of gmp provide mpq_init as a macro, so we need to
+# include the header file, otherwise the detection will fail.
+M4_gmp_save_LIBS="$LIBS"
+LIBS="$LIBS -lgmp"
+AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_GMP_H
+# include <gmp.h>
+#endif]],
+ [[mpq_t n; mpq_init (n);]])],
+ [LIBADD_GMP=-lgmp])
+LIBS=$M4_gmp_save_LIBS
+AC_SUBST([LIBADD_GMP])
+
+_M4_LIB_GMP
+
+# Don't try to link in libgmp if we are not using it after the last call
+if test "$M4_cv_using_lib_gmp" = yes; then
+ AC_DEFINE([USE_GMP], [1],
+ [Define to 1 if using the GNU multiple precision library.])
+fi
+
+AC_SUBST([USE_GMP], [$M4_cv_using_lib_gmp])
+])
+m4trace:ltdl/m4/gnulib-common.m4:9: -1- AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_00GNULIB])
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+m4trace:ltdl/m4/gnulib-common.m4:14: -1- AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+ AH_VERBATIM([unused_parameter],
+[/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+])
+])
+m4trace:ltdl/m4/gnulib-common.m4:42: -1- AC_DEFUN([gl_MODULE_INDICATOR], [
+ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+ [Define to 1 when using the gnulib module ]$1[.])
+])
+m4trace:ltdl/m4/gnulib-common.m4:84: -1- AC_DEFUN([AC_C_RESTRICT], [AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
+ [ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }]],
+ [[int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)]])],
+ [ac_cv_c_restrict=$ac_kw])
+ test "$ac_cv_c_restrict" != no && break
+ done
+ ])
+ AH_VERBATIM([restrict],
+[/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) AC_DEFINE([restrict], []) ;;
+ *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
+ esac
+])
+m4trace:ltdl/m4/gnulib-common.m4:126: -1- AC_DEFUN([gl_BIGENDIAN], [
+ AC_C_BIGENDIAN
+])
+m4trace:ltdl/m4/gnulib-common.m4:136: -1- AC_DEFUN([gl_CACHE_VAL_SILENT], [
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ AC_CACHE_VAL([$1], [$2])
+ as_echo_n="$saved_as_echo_n"
+])
+m4trace:ltdl/m4/gnulib-comp.m4:21: -1- AC_DEFUN([M4_EARLY], [
+ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
+ m4_pattern_allow([^gl_ES$])dnl a valid locale name
+ m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+ m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
+ AB_INIT
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ AC_REQUIRE([gl_FP_IEEE])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
+ dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
+ dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
+ dnl shouldn't hurt, though installers are on their own to set c99 mode.
+ AC_REQUIRE([AC_PROG_CC_STDC])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:44: -1- AC_DEFUN([M4_INIT], [
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+ gl_cond_libtool=true
+ m4_pushdef([AC_LIBOBJ], m4_defn([M4_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([M4_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([M4_LIBSOURCES]))
+ m4_pushdef([M4_LIBSOURCES_LIST], [])
+ m4_pushdef([M4_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='gnu'
+changequote(,)dnl
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+changequote([, ])dnl
+AC_SUBST([LTALLOCA])
+ gl_FUNC_ALLOCA
+ gl_ASSERT
+ AC_REQUIRE([AC_C_INLINE])
+ gl_FUNC_BTOWC
+ gl_WCHAR_MODULE_INDICATOR([btowc])
+ gl_CANONICALIZE_LGPL
+ gl_MODULE_INDICATOR([canonicalize-lgpl])
+ gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
+ gl_STDLIB_MODULE_INDICATOR([realpath])
+ AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.])
+ gl_CLOEXEC
+ gl_MODULE_INDICATOR([cloexec])
+ gl_CLOSE_STREAM
+ gl_MODULE_INDICATOR([close-stream])
+ gl_CLOSEIN
+ gl_CLOSEOUT
+ gl_CONFIG_H
+ gl_DIRNAME
+ gl_MODULE_INDICATOR([dirname])
+ gl_DIRNAME_LGPL
+ gl_DOUBLE_SLASH_ROOT
+ gl_FUNC_DUP2
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_HEADER_ERRNO_H
+ gl_ERROR
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ gl_EXECUTE
+ gl_EXITFAIL
+ gl_FATAL_SIGNAL
+ gl_FUNC_FCNTL
+ gl_FCNTL_MODULE_INDICATOR([fcntl])
+ gl_FCNTL_H
+ gl_MODULE_INDICATOR([fd-safer-flag])
+ gl_FUNC_FFLUSH
+ gl_STDIO_MODULE_INDICATOR([fflush])
+ gl_FILE_NAME_CONCAT
+ gl_MODULE_INDICATOR([filenamecat])
+ gl_FILE_NAME_CONCAT_LGPL
+ AC_C_FLEXIBLE_ARRAY_MEMBER
+ gl_FLOAT_H
+ gl_FUNC_FOPEN
+ gl_STDIO_MODULE_INDICATOR([fopen])
+ gl_FOPEN_SAFER
+ gl_MODULE_INDICATOR([fopen-safer])
+ gl_FUNC_FPENDING
+ gl_FUNC_FPURGE
+ gl_STDIO_MODULE_INDICATOR([fpurge])
+ gl_FUNC_FREADING
+ AC_REQUIRE([AC_C_INLINE])
+ gl_FUNC_FREXP_NO_LIBM
+ gl_MATH_MODULE_INDICATOR([frexp])
+ gl_FUNC_FREXPL_NO_LIBM
+ gl_MATH_MODULE_INDICATOR([frexpl])
+ gl_FUNC_FSEEKO
+ gl_STDIO_MODULE_INDICATOR([fseeko])
+ gl_FUNC_FTELLO
+ gl_STDIO_MODULE_INDICATOR([ftello])
+ gl_FUNC_GETDTABLESIZE
+ gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+ AM_GNU_GETTEXT_VERSION([0.17])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_GETTIMEOFDAY
+ gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
+ AM_ICONV
+ gl_ICONV_H
+ gl_FUNC_ICONV_OPEN
+ gl_INLINE
+ gl_INTTYPES_H
+ gl_FUNC_ISNAND_NO_LIBM
+ gl_FUNC_ISNANF_NO_LIBM
+ gl_FUNC_ISNANL_NO_LIBM
+ gl_LANGINFO_H
+ gl_LIST
+ gl_LOCALCHARSET
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+ AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ gl_FUNC_LSEEK
+ gl_UNISTD_MODULE_INDICATOR([lseek])
+ gl_FUNC_LSTAT
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ AC_FUNC_MALLOC
+ AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
+ gl_FUNC_MALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_MALLOCA
+ gl_MATH_H
+ gl_MBCHAR
+ gl_MBITER
+ gl_FUNC_MBRTOWC
+ gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+ gl_FUNC_MBSINIT
+ gl_WCHAR_MODULE_INDICATOR([mbsinit])
+ gl_MBSLEN
+ gl_STRING_MODULE_INDICATOR([mbslen])
+ gl_STRING_MODULE_INDICATOR([mbsstr])
+ gl_MBITER
+ gl_FUNC_MEMCHR
+ gl_STRING_MODULE_INDICATOR([memchr])
+ gl_FUNC_MEMMEM
+ gl_FUNC_MEMMEM_SIMPLE
+ gl_STRING_MODULE_INDICATOR([memmem])
+ gt_FUNC_MKDTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkdtemp])
+ gl_FUNC_MKSTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkstemp])
+ gl_MULTIARCH
+ gl_FUNC_NL_LANGINFO
+ gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+ AC_FUNC_OBSTACK
+ dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
+ gl_FUNC_OBSTACK_PRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([obstack-printf-posix])
+ gl_FUNC_OPEN
+ gl_MODULE_INDICATOR([open])
+ gl_FCNTL_MODULE_INDICATOR([open])
+ gl_LIST
+ gl_PATHMAX
+ gl_PIPE
+ gl_FUNC_PIPE2
+ gl_UNISTD_MODULE_INDICATOR([pipe2])
+ gl_MODULE_INDICATOR([pipe2-safer])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_addclose])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addclose])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_adddup2])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_adddup2])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_addopen])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addopen])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_destroy])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_destroy])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_init])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_init])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_destroy])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_destroy])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_init])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_init])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_setflags])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setflags])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_setsigmask])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setsigmask])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnp])
+ gl_POSIX_SPAWN_INTERNAL
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnp])
+ gl_FUNC_PRINTF_FREXP
+ gl_FUNC_PRINTF_FREXPL
+ m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'])
+ AM_][XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])])
+ gl_QUOTE
+ gl_QUOTEARG
+ gl_FUNC_RAWMEMCHR
+ gl_STRING_MODULE_INDICATOR([rawmemchr])
+ gl_FUNC_READLINK
+ gl_UNISTD_MODULE_INDICATOR([readlink])
+ gl_REGEX
+ gl_FUNC_RENAME
+ gl_STDIO_MODULE_INDICATOR([rename])
+ gl_FUNC_RMDIR
+ gl_UNISTD_MODULE_INDICATOR([rmdir])
+ gl_SCHED_H
+ gl_FUNC_SETENV
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_SIGACTION
+ gl_SIGNAL_MODULE_INDICATOR([sigaction])
+ gl_SIGNAL_H
+ gl_SIGNBIT
+ gl_MATH_MODULE_INDICATOR([signbit])
+ gl_SIGNALBLOCKING
+ gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+ gl_SIZE_MAX
+ gl_FUNC_SNPRINTF
+ gl_STDIO_MODULE_INDICATOR([snprintf])
+ gl_FUNC_SNPRINTF_POSIX
+ gl_SPAWN_H
+ gl_FUNC_SPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([sprintf-posix])
+ gt_TYPE_SSIZE_T
+ gl_FUNC_STAT
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_STDARG_H
+ AM_STDBOOL_H
+ gl_STDDEF_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_STDLIB_SAFER
+ gl_MODULE_INDICATOR([stdlib-safer])
+ gl_FUNC_STRCHRNUL
+ gl_STRING_MODULE_INDICATOR([strchrnul])
+ gl_FUNC_STRERROR
+ gl_STRING_MODULE_INDICATOR([strerror])
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+ gl_HEADER_STRING_H
+ gl_FUNC_STRNDUP
+ gl_STRING_MODULE_INDICATOR([strndup])
+ gl_FUNC_STRNLEN
+ gl_STRING_MODULE_INDICATOR([strnlen])
+ gl_FUNC_STRTOD
+ gl_STDLIB_MODULE_INDICATOR([strtod])
+ gl_FUNC_STRTOL
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_SYS_WAIT_H
+ AC_PROG_MKDIR_P
+ gl_FUNC_GEN_TEMPNAME
+ gl_HEADER_TIME_H
+ gt_TMPDIR
+ gl_UNISTD_H
+ gl_UNISTD_SAFER
+ gl_FUNC_GLIBC_UNLOCKED_IO
+ gl_FUNC_UNSETENV
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ gl_FUNC_VASNPRINTF
+ gl_FUNC_VASNPRINTF_POSIX
+ gl_FUNC_VASPRINTF
+ gl_STDIO_MODULE_INDICATOR([vasprintf])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+ gl_FUNC_VASPRINTF_POSIX
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=verror:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=verror_at_line:5:c-format])])
+ gl_FUNC_VFPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
+ gl_FUNC_VPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vprintf-posix])
+ gl_WAIT_PROCESS
+ gl_WCHAR_H
+ gl_FUNC_WCRTOMB
+ gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+ gl_WCTYPE_H
+ gl_FUNC_WCWIDTH
+ gl_WCHAR_MODULE_INDICATOR([wcwidth])
+ gl_XALLOC
+ gl_LIST
+ AC_LIBOBJ([xmemdup0])
+ gl_LIST
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=xprintf:1:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xvprintf:1:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xfprintf:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xvfprintf:2:c-format])])
+ gl_XSIZE
+ gl_XSTRNDUP
+ gl_XVASPRINTF
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=xasprintf:1:c-format])])
+ m4_ifval(M4_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([M4_LIBSOURCES_DIR])[ ||
+ for gl_file in ]M4_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([M4_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([M4_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([M4_LIBSOURCES_DIR])
+ m4_popdef([M4_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ M4_libobjs=
+ M4_ltlibobjs=
+ if test -n "$M4_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4_libobjs="$M4_libobjs $i.$ac_objext"
+ M4_ltlibobjs="$M4_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([M4_LIBOBJS], [$M4_libobjs])
+ AC_SUBST([M4_LTLIBOBJS], [$M4_ltlibobjs])
+ ])
+ gltests_libdeps=
+ gltests_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([M4tests_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([M4tests_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([M4tests_LIBSOURCES]))
+ m4_pushdef([M4tests_LIBSOURCES_LIST], [])
+ m4_pushdef([M4tests_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='tests/gnu'
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_TR_UTF8
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_GETPAGESIZE
+ gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_DOUBLE_EXPONENT_LOCATION
+ gl_FLOAT_EXPONENT_LOCATION
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+ gl_FUNC_LINK
+ gl_UNISTD_MODULE_INDICATOR([link])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_ZH_CN
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gl_FUNC_OBSTACK_PRINTF
+ gl_STDIO_MODULE_INDICATOR([obstack-printf])
+ AC_EGREP_CPP([notposix], [[
+ #if defined _MSC_VER || defined __MINGW32__
+ notposix
+ #endif
+ ]],
+ [posix_spawn_ported=no],
+ [posix_spawn_ported=yes])
+ AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
+ gl_FUNC_PUTENV
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
+ AC_DEFINE([CHECK_SNPRINTF_POSIX], 1,
+ [Define to 1 for strict checking in test-snprintf.c.])
+ gt_TYPE_WCHAR_T
+ gt_TYPE_WINT_T
+ gl_FUNC_STRDUP_POSIX
+ gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_SYMLINK
+ gl_UNISTD_MODULE_INDICATOR([symlink])
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_FUNC_WCTOB
+ gl_WCHAR_MODULE_INDICATOR([wctob])
+ m4_ifval(M4tests_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([M4tests_LIBSOURCES_DIR])[ ||
+ for gl_file in ]M4tests_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([M4tests_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([M4tests_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([M4tests_LIBSOURCES_DIR])
+ m4_popdef([M4tests_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ M4tests_libobjs=
+ M4tests_ltlibobjs=
+ if test -n "$M4tests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
+ M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([M4tests_LIBOBJS], [$M4tests_libobjs])
+ AC_SUBST([M4tests_LTLIBOBJS], [$M4tests_ltlibobjs])
+ ])
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+ AC_SUBST([LIBTESTS_LIBDEPS])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:514: -1- AC_DEFUN([M4_LIBOBJ], [
+ AS_LITERAL_IF([$1], [M4_LIBSOURCES([$1.c])])dnl
+ M4_LIBOBJS="$M4_LIBOBJS $1.$ac_objext"
+])
+m4trace:ltdl/m4/gnulib-comp.m4:521: -1- AC_DEFUN([M4_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [M4_LIBOBJ($ac_func)])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:530: -1- AC_DEFUN([M4_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([M4_LIBSOURCES_DIR], [gnu])
+ m4_append([M4_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:541: -1- AC_DEFUN([M4tests_LIBOBJ], [
+ AS_LITERAL_IF([$1], [M4tests_LIBSOURCES([$1.c])])dnl
+ M4tests_LIBOBJS="$M4tests_LIBOBJS $1.$ac_objext"
+])
+m4trace:ltdl/m4/gnulib-comp.m4:548: -1- AC_DEFUN([M4tests_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [M4tests_LIBOBJ($ac_func)])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:557: -1- AC_DEFUN([M4tests_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([M4tests_LIBSOURCES_DIR], [tests/gnu])
+ m4_append([M4tests_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+m4trace:ltdl/m4/gnulib-comp.m4:568: -1- AC_DEFUN([M4_FILE_LIST], [
+ build-aux/arg-nonnull.h
+ build-aux/config.rpath
+ build-aux/gendocs.sh
+ build-aux/git-version-gen
+ build-aux/gnupload
+ build-aux/update-copyright
+ build-aux/useless-if-before-free
+ build-aux/vc-list-files
+ build-aux/warn-on-use.h
+ doc/fdl-1.3.texi
+ doc/gendocs_template
+ doc/gpl-3.0.texi
+ doc/regexprops-generic.texi
+ lib/alloca.c
+ lib/alloca.in.h
+ lib/asnprintf.c
+ lib/asprintf.c
+ lib/basename-lgpl.c
+ lib/basename.c
+ lib/binary-io.h
+ lib/bitrotate.h
+ lib/btowc.c
+ lib/c-ctype.c
+ lib/c-ctype.h
+ lib/c-strcase.h
+ lib/c-strcasecmp.c
+ lib/c-strncasecmp.c
+ lib/canonicalize-lgpl.c
+ lib/clean-temp.c
+ lib/clean-temp.h
+ lib/cloexec.c
+ lib/cloexec.h
+ lib/close-stream.c
+ lib/close-stream.h
+ lib/closein.c
+ lib/closein.h
+ lib/closeout.c
+ lib/closeout.h
+ lib/config.charset
+ lib/dirname-lgpl.c
+ lib/dirname.c
+ lib/dirname.h
+ lib/dup-safer-flag.c
+ lib/dup-safer.c
+ lib/dup2.c
+ lib/errno.in.h
+ lib/error.c
+ lib/error.h
+ lib/execute.c
+ lib/execute.h
+ lib/exitfail.c
+ lib/exitfail.h
+ lib/fatal-signal.c
+ lib/fatal-signal.h
+ lib/fcntl.c
+ lib/fcntl.in.h
+ lib/fd-safer-flag.c
+ lib/fd-safer.c
+ lib/fflush.c
+ lib/filenamecat-lgpl.c
+ lib/filenamecat.c
+ lib/filenamecat.h
+ lib/float+.h
+ lib/float.in.h
+ lib/fopen-safer.c
+ lib/fopen.c
+ lib/fpending.c
+ lib/fpending.h
+ lib/fpucw.h
+ lib/fpurge.c
+ lib/freadahead.c
+ lib/freadahead.h
+ lib/freading.c
+ lib/freading.h
+ lib/freadptr.c
+ lib/freadptr.h
+ lib/freadseek.c
+ lib/freadseek.h
+ lib/frexp.c
+ lib/frexpl.c
+ lib/fseeko.c
+ lib/fseterr.c
+ lib/fseterr.h
+ lib/ftello.c
+ lib/getdtablesize.c
+ lib/gettext.h
+ lib/gettimeofday.c
+ lib/gl_anyhash_list1.h
+ lib/gl_anyhash_list2.h
+ lib/gl_anylinked_list1.h
+ lib/gl_anylinked_list2.h
+ lib/gl_anytree_oset.h
+ lib/gl_avltree_oset.c
+ lib/gl_avltree_oset.h
+ lib/gl_linkedhash_list.c
+ lib/gl_linkedhash_list.h
+ lib/gl_list.c
+ lib/gl_list.h
+ lib/gl_oset.c
+ lib/gl_oset.h
+ lib/gl_xlist.c
+ lib/gl_xlist.h
+ lib/gl_xoset.c
+ lib/gl_xoset.h
+ lib/iconv.in.h
+ lib/iconv_open-aix.gperf
+ lib/iconv_open-hpux.gperf
+ lib/iconv_open-irix.gperf
+ lib/iconv_open-osf.gperf
+ lib/iconv_open-solaris.gperf
+ lib/iconv_open.c
+ lib/intprops.h
+ lib/inttypes.in.h
+ lib/isnan.c
+ lib/isnand-nolibm.h
+ lib/isnand.c
+ lib/isnanf-nolibm.h
+ lib/isnanf.c
+ lib/isnanl-nolibm.h
+ lib/isnanl.c
+ lib/langinfo.in.h
+ lib/localcharset.c
+ lib/localcharset.h
+ lib/lseek.c
+ lib/lstat.c
+ lib/malloc.c
+ lib/malloca.c
+ lib/malloca.h
+ lib/malloca.valgrind
+ lib/math.in.h
+ lib/mbchar.c
+ lib/mbchar.h
+ lib/mbiter.h
+ lib/mbrtowc.c
+ lib/mbsinit.c
+ lib/mbslen.c
+ lib/mbsstr.c
+ lib/mbuiter.h
+ lib/memchr.c
+ lib/memchr.valgrind
+ lib/memchr2.c
+ lib/memchr2.h
+ lib/memchr2.valgrind
+ lib/memcmp2.c
+ lib/memcmp2.h
+ lib/memmem.c
+ lib/mkdtemp.c
+ lib/mkstemp-safer.c
+ lib/mkstemp.c
+ lib/nl_langinfo.c
+ lib/obstack.c
+ lib/obstack.h
+ lib/obstack_printf.c
+ lib/open.c
+ lib/pathmax.h
+ lib/pipe-safer.c
+ lib/pipe.c
+ lib/pipe.h
+ lib/pipe2-safer.c
+ lib/pipe2.c
+ lib/printf-args.c
+ lib/printf-args.h
+ lib/printf-frexp.c
+ lib/printf-frexp.h
+ lib/printf-frexpl.c
+ lib/printf-frexpl.h
+ lib/printf-parse.c
+ lib/printf-parse.h
+ lib/progname.c
+ lib/progname.h
+ lib/propername.c
+ lib/propername.h
+ lib/quote.c
+ lib/quote.h
+ lib/quotearg.c
+ lib/quotearg.h
+ lib/rawmemchr.c
+ lib/rawmemchr.valgrind
+ lib/readlink.c
+ lib/ref-add.sin
+ lib/ref-del.sin
+ lib/regcomp.c
+ lib/regex.c
+ lib/regex.h
+ lib/regex_internal.c
+ lib/regex_internal.h
+ lib/regexec.c
+ lib/rename.c
+ lib/rmdir.c
+ lib/same-inode.h
+ lib/sched.in.h
+ lib/setenv.c
+ lib/sig-handler.h
+ lib/sigaction.c
+ lib/signal.in.h
+ lib/signbitd.c
+ lib/signbitf.c
+ lib/signbitl.c
+ lib/sigprocmask.c
+ lib/size_max.h
+ lib/snprintf.c
+ lib/spawn.in.h
+ lib/spawn_faction_addclose.c
+ lib/spawn_faction_adddup2.c
+ lib/spawn_faction_addopen.c
+ lib/spawn_faction_destroy.c
+ lib/spawn_faction_init.c
+ lib/spawn_int.h
+ lib/spawnattr_destroy.c
+ lib/spawnattr_init.c
+ lib/spawnattr_setflags.c
+ lib/spawnattr_setsigmask.c
+ lib/spawni.c
+ lib/spawnp.c
+ lib/sprintf.c
+ lib/stat.c
+ lib/stdarg.in.h
+ lib/stdbool.in.h
+ lib/stddef.in.h
+ lib/stdint.in.h
+ lib/stdio--.h
+ lib/stdio-impl.h
+ lib/stdio-safer.h
+ lib/stdio-write.c
+ lib/stdio.in.h
+ lib/stdlib--.h
+ lib/stdlib-safer.h
+ lib/stdlib.in.h
+ lib/str-kmp.h
+ lib/str-two-way.h
+ lib/strchrnul.c
+ lib/strchrnul.valgrind
+ lib/streq.h
+ lib/strerror.c
+ lib/striconv.c
+ lib/striconv.h
+ lib/string.in.h
+ lib/stripslash.c
+ lib/strndup.c
+ lib/strnlen.c
+ lib/strnlen1.c
+ lib/strnlen1.h
+ lib/strtod.c
+ lib/strtol.c
+ lib/sys_stat.in.h
+ lib/sys_time.in.h
+ lib/sys_wait.in.h
+ lib/tempname.c
+ lib/tempname.h
+ lib/time.in.h
+ lib/tmpdir.c
+ lib/tmpdir.h
+ lib/trim.c
+ lib/trim.h
+ lib/unistd--.h
+ lib/unistd-safer.h
+ lib/unistd.in.h
+ lib/unitypes.h
+ lib/uniwidth.h
+ lib/uniwidth/cjk.h
+ lib/uniwidth/width.c
+ lib/unlocked-io.h
+ lib/unsetenv.c
+ lib/vasnprintf.c
+ lib/vasnprintf.h
+ lib/vasprintf.c
+ lib/verify.h
+ lib/verror.c
+ lib/verror.h
+ lib/vfprintf.c
+ lib/vprintf.c
+ lib/w32spawn.h
+ lib/wait-process.c
+ lib/wait-process.h
+ lib/wchar.in.h
+ lib/wcrtomb.c
+ lib/wctype.in.h
+ lib/wcwidth.c
+ lib/xalloc-die.c
+ lib/xalloc.h
+ lib/xasprintf.c
+ lib/xmalloc.c
+ lib/xmalloca.c
+ lib/xmalloca.h
+ lib/xmemdup0.c
+ lib/xmemdup0.h
+ lib/xprintf.c
+ lib/xprintf.h
+ lib/xsize.h
+ lib/xstriconv.c
+ lib/xstriconv.h
+ lib/xstrndup.c
+ lib/xstrndup.h
+ lib/xvasprintf.c
+ lib/xvasprintf.h
+ m4/00gnulib.m4
+ m4/alloca.m4
+ m4/assert.m4
+ m4/autobuild.m4
+ m4/btowc.m4
+ m4/canonicalize.m4
+ m4/cloexec.m4
+ m4/close-stream.m4
+ m4/closein.m4
+ m4/closeout.m4
+ m4/codeset.m4
+ m4/config-h.m4
+ m4/dirname.m4
+ m4/dos.m4
+ m4/double-slash-root.m4
+ m4/dup2.m4
+ m4/eealloc.m4
+ m4/environ.m4
+ m4/errno_h.m4
+ m4/error.m4
+ m4/execute.m4
+ m4/exitfail.m4
+ m4/exponentd.m4
+ m4/exponentf.m4
+ m4/exponentl.m4
+ m4/extensions.m4
+ m4/fatal-signal.m4
+ m4/fcntl-o.m4
+ m4/fcntl.m4
+ m4/fcntl_h.m4
+ m4/fflush.m4
+ m4/filenamecat.m4
+ m4/flexmember.m4
+ m4/float_h.m4
+ m4/fopen.m4
+ m4/fpending.m4
+ m4/fpieee.m4
+ m4/fpurge.m4
+ m4/freading.m4
+ m4/frexp.m4
+ m4/frexpl.m4
+ m4/fseeko.m4
+ m4/ftello.m4
+ m4/getdtablesize.m4
+ m4/getpagesize.m4
+ m4/gettext.m4
+ m4/gettimeofday.m4
+ m4/gl_list.m4
+ m4/glibc2.m4
+ m4/glibc21.m4
+ m4/gnulib-common.m4
+ m4/iconv.m4
+ m4/iconv_h.m4
+ m4/iconv_open.m4
+ m4/include_next.m4
+ m4/inline.m4
+ m4/intdiv0.m4
+ m4/intl.m4
+ m4/intldir.m4
+ m4/intlmacosx.m4
+ m4/intmax.m4
+ m4/intmax_t.m4
+ m4/inttypes-pri.m4
+ m4/inttypes.m4
+ m4/inttypes_h.m4
+ m4/isnand.m4
+ m4/isnanf.m4
+ m4/isnanl.m4
+ m4/langinfo_h.m4
+ m4/lcmessage.m4
+ m4/ldexpl.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+ m4/lib-prefix.m4
+ m4/link.m4
+ m4/localcharset.m4
+ m4/locale-fr.m4
+ m4/locale-ja.m4
+ m4/locale-tr.m4
+ m4/locale-zh.m4
+ m4/lock.m4
+ m4/longlong.m4
+ m4/lseek.m4
+ m4/lstat.m4
+ m4/malloc.m4
+ m4/malloca.m4
+ m4/math_h.m4
+ m4/mbchar.m4
+ m4/mbiter.m4
+ m4/mbrtowc.m4
+ m4/mbsinit.m4
+ m4/mbslen.m4
+ m4/mbstate_t.m4
+ m4/memchr.m4
+ m4/memmem.m4
+ m4/mkdtemp.m4
+ m4/mkstemp.m4
+ m4/mmap-anon.m4
+ m4/mode_t.m4
+ m4/multiarch.m4
+ m4/nl_langinfo.m4
+ m4/nls.m4
+ m4/nocrash.m4
+ m4/obstack-printf-posix.m4
+ m4/obstack-printf.m4
+ m4/open.m4
+ m4/pathmax.m4
+ m4/pipe.m4
+ m4/pipe2.m4
+ m4/po.m4
+ m4/posix_spawn.m4
+ m4/printf-frexp.m4
+ m4/printf-frexpl.m4
+ m4/printf-posix.m4
+ m4/printf.m4
+ m4/progtest.m4
+ m4/putenv.m4
+ m4/quote.m4
+ m4/quotearg.m4
+ m4/rawmemchr.m4
+ m4/readlink.m4
+ m4/regex.m4
+ m4/rename.m4
+ m4/rmdir.m4
+ m4/sched_h.m4
+ m4/setenv.m4
+ m4/sig_atomic_t.m4
+ m4/sigaction.m4
+ m4/signal_h.m4
+ m4/signalblocking.m4
+ m4/signbit.m4
+ m4/size_max.m4
+ m4/snprintf-posix.m4
+ m4/snprintf.m4
+ m4/spawn_h.m4
+ m4/sprintf-posix.m4
+ m4/ssize_t.m4
+ m4/stat.m4
+ m4/stdarg.m4
+ m4/stdbool.m4
+ m4/stddef_h.m4
+ m4/stdint.m4
+ m4/stdint_h.m4
+ m4/stdio-safer.m4
+ m4/stdio_h.m4
+ m4/stdlib-safer.m4
+ m4/stdlib_h.m4
+ m4/strchrnul.m4
+ m4/strdup.m4
+ m4/strerror.m4
+ m4/string_h.m4
+ m4/strndup.m4
+ m4/strnlen.m4
+ m4/strtod.m4
+ m4/strtol.m4
+ m4/symlink.m4
+ m4/sys_stat_h.m4
+ m4/sys_time_h.m4
+ m4/sys_wait_h.m4
+ m4/tempname.m4
+ m4/threadlib.m4
+ m4/time_h.m4
+ m4/tmpdir.m4
+ m4/uintmax_t.m4
+ m4/ungetc.m4
+ m4/unistd-safer.m4
+ m4/unistd_h.m4
+ m4/unlocked-io.m4
+ m4/vasnprintf-posix.m4
+ m4/vasnprintf.m4
+ m4/vasprintf-posix.m4
+ m4/vasprintf.m4
+ m4/vfprintf-posix.m4
+ m4/visibility.m4
+ m4/vprintf-posix.m4
+ m4/wait-process.m4
+ m4/warn-on-use.m4
+ m4/wchar.m4
+ m4/wchar_t.m4
+ m4/wcrtomb.m4
+ m4/wctob.m4
+ m4/wctype.m4
+ m4/wcwidth.m4
+ m4/wint_t.m4
+ m4/xalloc.m4
+ m4/xsize.m4
+ m4/xstrndup.m4
+ m4/xvasprintf.m4
+ tests/init.sh
+ tests/locale/fr/LC_MESSAGES/test-quotearg.mo
+ tests/locale/fr/LC_MESSAGES/test-quotearg.po
+ tests/macros.h
+ tests/nan.h
+ tests/signature.h
+ tests/test-alloca-opt.c
+ tests/test-array_list.c
+ tests/test-array_oset.c
+ tests/test-avltree_oset.c
+ tests/test-binary-io.c
+ tests/test-binary-io.sh
+ tests/test-bitrotate.c
+ tests/test-btowc.c
+ tests/test-btowc1.sh
+ tests/test-btowc2.sh
+ tests/test-c-ctype.c
+ tests/test-c-strcase.sh
+ tests/test-c-strcasecmp.c
+ tests/test-c-strncasecmp.c
+ tests/test-canonicalize-lgpl.c
+ tests/test-cloexec.c
+ tests/test-closein.c
+ tests/test-closein.sh
+ tests/test-dirname.c
+ tests/test-dup-safer.c
+ tests/test-dup2.c
+ tests/test-environ.c
+ tests/test-errno.c
+ tests/test-fcntl-h.c
+ tests/test-fcntl.c
+ tests/test-fflush.c
+ tests/test-fflush2.c
+ tests/test-fflush2.sh
+ tests/test-filenamecat.c
+ tests/test-fopen-safer.c
+ tests/test-fopen.c
+ tests/test-fopen.h
+ tests/test-fpending.c
+ tests/test-fpending.sh
+ tests/test-fprintf-posix.h
+ tests/test-fpurge.c
+ tests/test-freadahead.c
+ tests/test-freadahead.sh
+ tests/test-freading.c
+ tests/test-freadptr.c
+ tests/test-freadptr.sh
+ tests/test-freadptr2.c
+ tests/test-freadptr2.sh
+ tests/test-freadseek.c
+ tests/test-freadseek.sh
+ tests/test-frexp.c
+ tests/test-frexpl.c
+ tests/test-fseeko.c
+ tests/test-fseeko.sh
+ tests/test-fseeko2.sh
+ tests/test-fseterr.c
+ tests/test-ftello.c
+ tests/test-ftello.sh
+ tests/test-ftello2.sh
+ tests/test-getdtablesize.c
+ tests/test-gettimeofday.c
+ tests/test-iconv.c
+ tests/test-inttypes.c
+ tests/test-isnand-nolibm.c
+ tests/test-isnand.h
+ tests/test-isnanf-nolibm.c
+ tests/test-isnanf.h
+ tests/test-isnanl-nolibm.c
+ tests/test-isnanl.h
+ tests/test-langinfo.c
+ tests/test-link.c
+ tests/test-link.h
+ tests/test-linkedhash_list.c
+ tests/test-lseek.c
+ tests/test-lseek.sh
+ tests/test-lstat.c
+ tests/test-lstat.h
+ tests/test-malloca.c
+ tests/test-math.c
+ tests/test-mbrtowc.c
+ tests/test-mbrtowc1.sh
+ tests/test-mbrtowc2.sh
+ tests/test-mbrtowc3.sh
+ tests/test-mbrtowc4.sh
+ tests/test-mbsinit.c
+ tests/test-mbsinit.sh
+ tests/test-mbsstr1.c
+ tests/test-mbsstr2.c
+ tests/test-mbsstr2.sh
+ tests/test-mbsstr3.c
+ tests/test-mbsstr3.sh
+ tests/test-memchr.c
+ tests/test-memchr2.c
+ tests/test-memmem.c
+ tests/test-nl_langinfo.c
+ tests/test-nl_langinfo.sh
+ tests/test-obstack-printf.c
+ tests/test-open.c
+ tests/test-open.h
+ tests/test-pipe.c
+ tests/test-pipe.sh
+ tests/test-pipe2.c
+ tests/test-posix_spawn1.c
+ tests/test-posix_spawn1.in.sh
+ tests/test-posix_spawn2.c
+ tests/test-posix_spawn2.in.sh
+ tests/test-printf-frexp.c
+ tests/test-printf-frexpl.c
+ tests/test-printf-posix.h
+ tests/test-printf-posix.output
+ tests/test-quotearg.c
+ tests/test-quotearg.sh
+ tests/test-rawmemchr.c
+ tests/test-readlink.c
+ tests/test-readlink.h
+ tests/test-rename.c
+ tests/test-rename.h
+ tests/test-rmdir.c
+ tests/test-rmdir.h
+ tests/test-sched.c
+ tests/test-setenv.c
+ tests/test-sigaction.c
+ tests/test-signal.c
+ tests/test-signbit.c
+ tests/test-snprintf-posix.c
+ tests/test-snprintf-posix.h
+ tests/test-snprintf.c
+ tests/test-spawn.c
+ tests/test-sprintf-posix.c
+ tests/test-sprintf-posix.h
+ tests/test-stat.c
+ tests/test-stat.h
+ tests/test-stdbool.c
+ tests/test-stddef.c
+ tests/test-stdint.c
+ tests/test-stdio.c
+ tests/test-stdlib.c
+ tests/test-strchrnul.c
+ tests/test-strerror.c
+ tests/test-striconv.c
+ tests/test-string.c
+ tests/test-strtod.c
+ tests/test-symlink.c
+ tests/test-symlink.h
+ tests/test-sys_stat.c
+ tests/test-sys_time.c
+ tests/test-sys_wait.c
+ tests/test-time.c
+ tests/test-unistd.c
+ tests/test-unsetenv.c
+ tests/test-update-copyright.sh
+ tests/test-vasnprintf-posix.c
+ tests/test-vasnprintf-posix2.c
+ tests/test-vasnprintf-posix2.sh
+ tests/test-vasnprintf.c
+ tests/test-vasprintf-posix.c
+ tests/test-vasprintf.c
+ tests/test-vc-list-files-cvs.sh
+ tests/test-vc-list-files-git.sh
+ tests/test-vfprintf-posix.c
+ tests/test-vfprintf-posix.sh
+ tests/test-vprintf-posix.c
+ tests/test-vprintf-posix.sh
+ tests/test-wchar.c
+ tests/test-wcrtomb.c
+ tests/test-wcrtomb.sh
+ tests/test-wctype.c
+ tests/test-wcwidth.c
+ tests/test-xalloc-die.c
+ tests/test-xalloc-die.sh
+ tests/test-xfprintf-posix.c
+ tests/test-xmemdup0.c
+ tests/test-xprintf-posix.c
+ tests/test-xprintf-posix.sh
+ tests/test-xvasprintf.c
+ tests/uniwidth/test-uc_width.c
+ tests/uniwidth/test-uc_width2.c
+ tests/uniwidth/test-uc_width2.sh
+ tests/zerosize-ptr.h
+ tests=lib/getpagesize.c
+ tests=lib/gl_array_list.c
+ tests=lib/gl_array_list.h
+ tests=lib/gl_array_oset.c
+ tests=lib/gl_array_oset.h
+ tests=lib/ignore-value.h
+ tests=lib/link.c
+ tests=lib/obstack_printf.c
+ tests=lib/putenv.c
+ tests=lib/strdup.c
+ tests=lib/symlink.c
+ tests=lib/wctob.c
+ top/GNUmakefile
+ top/maint.mk
+])
+m4trace:ltdl/m4/iconv.m4:9: -1- AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+m4trace:ltdl/m4/iconv.m4:20: -1- AC_DEFUN([AM_ICONV_LINK], [
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+m4trace:ltdl/m4/iconv.m4:173: -1- AC_DEFUN([AM_ICONV], [
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
+m4trace:ltdl/m4/iconv_h.m4:7: -1- AC_DEFUN([gl_ICONV_H], [
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+
+ dnl Execute this unconditionally, because ICONV_H may be set by other
+ dnl modules, after this code is executed.
+ gl_CHECK_NEXT_HEADERS([iconv.h])
+])
+m4trace:ltdl/m4/iconv_h.m4:17: -1- AC_DEFUN([gl_REPLACE_ICONV_H], [
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ ICONV_H='iconv.h'
+])
+m4trace:ltdl/m4/iconv_h.m4:23: -1- AC_DEFUN([gl_ICONV_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/iconv_h.m4:30: -1- AC_DEFUN([gl_ICONV_H_DEFAULTS], [
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_ICONV=0; AC_SUBST([REPLACE_ICONV])
+ REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN])
+ REPLACE_ICONV_UTF=0; AC_SUBST([REPLACE_ICONV_UTF])
+ ICONV_H=''; AC_SUBST([ICONV_H])
+])
+m4trace:ltdl/m4/iconv_open.m4:7: -1- AC_DEFUN([gl_FUNC_ICONV_OPEN], [
+ AC_REQUIRE([AM_ICONV])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test "$am_cv_func_iconv" = yes; then
+ dnl Test whether iconv_open accepts standardized encoding names.
+ dnl We know that GNU libiconv and GNU libc do.
+ AC_EGREP_CPP([gnu_iconv], [
+ #include <iconv.h>
+ #if defined _LIBICONV_VERSION || defined __GLIBC__
+ gnu_iconv
+ #endif
+ ], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
+ if test $gl_func_iconv_gnu = no; then
+ iconv_flavor=
+ case "$host_os" in
+ aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
+ irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
+ hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
+ osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
+ solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+ esac
+ if test -n "$iconv_flavor"; then
+ AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
+ [Define to a symbolic name denoting the flavor of iconv_open()
+ implementation.])
+ gl_REPLACE_ICONV_OPEN
+ fi
+ fi
+ fi
+])
+m4trace:ltdl/m4/iconv_open.m4:40: -1- AC_DEFUN([gl_REPLACE_ICONV_OPEN], [
+ gl_REPLACE_ICONV_H
+ REPLACE_ICONV_OPEN=1
+ AC_LIBOBJ([iconv_open])
+])
+m4trace:ltdl/m4/iconv_open.m4:47: -1- AC_DEFUN([gl_FUNC_ICONV_OPEN_UTF], [
+ AC_REQUIRE([gl_FUNC_ICONV_OPEN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test "$am_cv_func_iconv" = yes; then
+ if test -n "$am_cv_proto_iconv_arg1"; then
+ ICONV_CONST="const"
+ else
+ ICONV_CONST=
+ fi
+ AC_SUBST([ICONV_CONST])
+ AC_CACHE_CHECK([whether iconv supports conversion between UTF-8 and UTF-{16,32}{BE,LE}],
+ [gl_cv_func_iconv_supports_utf],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define ASSERT(expr) if (!(expr)) return 1;
+int main ()
+{
+ /* Test conversion from UTF-8 to UTF-16BE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "\000J\000a\000p\000a\000n\000e\000s\000e\000 \000(\145\345\147\054\212\236\000)\000 \000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-16BE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-16LE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "J\000a\000p\000a\000n\000e\000s\000e\000 \000(\000\345\145\054\147\236\212)\000 \000[\000\065\330\015\335\065\330\036\335\065\330\055\335]\000";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-16LE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-32BE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "\000\000\000J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000 \000\000\000(\000\000\145\345\000\000\147\054\000\000\212\236\000\000\000)\000\000\000 \000\000\000[\000\001\325\015\000\001\325\036\000\001\325\055\000\000\000]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-32BE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-32LE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000 \000\000\000(\000\000\000\345\145\000\000\054\147\000\000\236\212\000\000)\000\000\000 \000\000\000[\000\000\000\015\325\001\000\036\325\001\000\055\325\001\000]\000\000\000";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-32LE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-16BE to UTF-8 with no errors.
+ This test fails on NetBSD 3.0. */
+ {
+ static const char input[] =
+ "\000J\000a\000p\000a\000n\000e\000s\000e\000 \000(\145\345\147\054\212\236\000)\000 \000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
+ static const char expected[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-8", "UTF-16BE");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ return 0;
+}], [gl_cv_func_iconv_supports_utf=yes], [gl_cv_func_iconv_supports_utf=no],
+ [
+ dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
+ dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
+ dnl direction.
+ gl_cv_func_iconv_supports_utf=no
+ if test $gl_func_iconv_gnu = yes; then
+ gl_cv_func_iconv_supports_utf=yes
+ else
+changequote(,)dnl
+ case "$host_os" in
+ solaris2.9 | solaris2.1[0-9]) gl_cv_func_iconv_supports_utf=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_iconv_supports_utf = no; then
+ REPLACE_ICONV_UTF=1
+ AC_DEFINE([REPLACE_ICONV_UTF], [1],
+ [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.])
+ REPLACE_ICONV=1
+ gl_REPLACE_ICONV_OPEN
+ AC_LIBOBJ([iconv])
+ AC_LIBOBJ([iconv_close])
+ fi
+ fi
+])
+m4trace:ltdl/m4/include_next.m4:28: -1- AC_DEFUN([gl_INCLUDE_NEXT], [
+ AC_LANG_PREPROC_REQUIRE()
+ AC_CACHE_CHECK([whether the preprocessor supports include_next],
+ [gl_cv_have_include_next],
+ [rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
+ dnl AIX 6.1 support include_next when used as first preprocessor directive
+ dnl in a file, but not when preceded by another include directive. Check
+ dnl for this bug by including <stdio.h>.
+ dnl Additionally, with this same compiler, include_next is a no-op when
+ dnl used in a header file that was included by specifying its absolute
+ dnl file name. Despite these two bugs, include_next is used in the
+ dnl compiler's <math.h>. By virtue of the second bug, we need to use
+ dnl include_next as well in this case.
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=yes],
+ [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=buggy],
+ [gl_cv_have_include_next=no])
+ ])
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+ ])
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+ AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
+])
+m4trace:ltdl/m4/include_next.m4:124: -1- AC_DEFUN([gl_CHECK_NEXT_HEADERS], [
+ AC_REQUIRE([gl_INCLUDE_NEXT])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_HEADERS_ONCE([$1])
+
+ m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_next_header],
+ [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
+ if test $gl_cv_have_include_next = yes; then
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ else
+ AC_CACHE_CHECK(
+ [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+ m4_defn([gl_next_header]),
+ [AS_VAR_PUSHDEF([gl_header_exists],
+ [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
+ if test AS_VAR_GET(gl_header_exists) = yes; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE(
+ [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+ )])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
+ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'])
+ else
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ AS_VAR_POPDEF([gl_header_exists])])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
+ [AS_VAR_GET([gl_next_header])])
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'gl_HEADER_NAME'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
+ [$gl_next_as_first_directive])
+ AS_VAR_POPDEF([gl_next_header])])
+])
+m4trace:ltdl/m4/inline.m4:12: -1- AC_DEFUN([gl_INLINE], [
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CACHE_CHECK([whether the compiler generally respects inline],
+ [gl_cv_c_inline_effective],
+ [if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+ dnl specified.
+ dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+ dnl depends on optimization flags, which can be in CFLAGS.
+ dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif]])],
+ [gl_cv_c_inline_effective=yes],
+ [gl_cv_c_inline_effective=no])
+ fi
+ ])
+ if test $gl_cv_c_inline_effective = yes; then
+ AC_DEFINE([HAVE_INLINE], [1],
+ [Define to 1 if the compiler supports one of the keywords
+ 'inline', '__inline__', '__inline' and effectively inlines
+ functions marked as such.])
+ fi
+])
+m4trace:ltdl/m4/intdiv0.m4:9: -1- AC_DEFUN([gt_INTDIV0], [
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+ case "$host_os" in
+ macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+ # On MacOS X 10.2 or newer, just assume the same as when cross-
+ # compiling. If we were to perform the real test, 1 Crash Report
+ # dialog window would pop up.
+ case "$host_cpu" in
+ i[34567]86 | x86_64)
+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+sigfpe_handler (int sig)
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no],
+ [
+ # Guess based on the CPU.
+changequote(,)dnl
+ case "$host_cpu" in
+ alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ fi
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
+ [Define if integer division by zero raises signal SIGFPE.])
+])
+m4trace:ltdl/m4/intl.m4:25: -1- AC_DEFUN([AM_INTL_SUBDIR], [
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([gt_GLIBC2])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([gl_VISIBILITY])dnl
+ AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gt_TYPE_INTMAX_T])
+ AC_REQUIRE([gt_PRINTF_POSIX])
+ AC_REQUIRE([gl_GLIBC21])dnl
+ AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+ AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+ case $gt_cv_func_printf_posix in
+ *yes) HAVE_POSIX_PRINTF=1 ;;
+ *) HAVE_POSIX_PRINTF=0 ;;
+ esac
+ AC_SUBST([HAVE_POSIX_PRINTF])
+ if test "$ac_cv_func_asprintf" = yes; then
+ HAVE_ASPRINTF=1
+ else
+ HAVE_ASPRINTF=0
+ fi
+ AC_SUBST([HAVE_ASPRINTF])
+ if test "$ac_cv_func_snprintf" = yes; then
+ HAVE_SNPRINTF=1
+ else
+ HAVE_SNPRINTF=0
+ fi
+ AC_SUBST([HAVE_SNPRINTF])
+ if test "$ac_cv_func_wprintf" = yes; then
+ HAVE_WPRINTF=1
+ else
+ HAVE_WPRINTF=0
+ fi
+ AC_SUBST([HAVE_WPRINTF])
+
+ AM_LANGINFO_CODESET
+ gt_LC_MESSAGES
+
+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+ dnl 1. when we install a shared library, we must arrange to export
+ dnl auxiliary pointer variables for every exported variable,
+ dnl 2. when we install a shared library and a static library simultaneously,
+ dnl the include file specifies __declspec(dllimport) and therefore we
+ dnl must arrange to define the auxiliary pointer variables for the
+ dnl exported variables _also_ in the static library.
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+ is_woe32dll=no
+ fi
+ WOE32DLL=$is_woe32dll
+ AC_SUBST([WOE32DLL])
+
+ dnl On mingw and Cygwin, we can activate special Makefile rules which add
+ dnl version information to the shared libraries and executables.
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32=yes ;;
+ *) is_woe32=no ;;
+ esac
+ WOE32=$is_woe32
+ AC_SUBST([WOE32])
+ if test $WOE32 = yes; then
+ dnl Check for a program that compiles Windows resource files.
+ AC_CHECK_TOOL([WINDRES], [windres])
+ fi
+
+ dnl Determine whether when creating a library, "-lc" should be passed to
+ dnl libtool or not. On many platforms, it is required for the libtool option
+ dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
+ dnl in the *.la files - makes it impossible to create multithreaded programs,
+ dnl because libtool also reorders the -lc to come before the -pthread, and
+ dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
+ case "$host_os" in
+ hpux*) LTLIBC="" ;;
+ *) LTLIBC="-lc" ;;
+ esac
+ AC_SUBST([LTLIBC])
+
+ dnl Rename some macros and functions used for locking.
+ AH_BOTTOM([
+#define __libc_lock_t gl_lock_t
+#define __libc_lock_define gl_lock_define
+#define __libc_lock_define_initialized gl_lock_define_initialized
+#define __libc_lock_init gl_lock_init
+#define __libc_lock_lock gl_lock_lock
+#define __libc_lock_unlock gl_lock_unlock
+#define __libc_lock_recursive_t gl_recursive_lock_t
+#define __libc_lock_define_recursive gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive gl_recursive_lock_init
+#define __libc_lock_lock_recursive gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
+#define glthread_in_use libintl_thread_in_use
+#define glthread_lock_init libintl_lock_init
+#define glthread_lock_lock libintl_lock_lock
+#define glthread_lock_unlock libintl_lock_unlock
+#define glthread_lock_destroy libintl_lock_destroy
+#define glthread_rwlock_init libintl_rwlock_init
+#define glthread_rwlock_rdlock libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock libintl_rwlock_wrlock
+#define glthread_rwlock_unlock libintl_rwlock_unlock
+#define glthread_rwlock_destroy libintl_rwlock_destroy
+#define glthread_recursive_lock_init libintl_recursive_lock_init
+#define glthread_recursive_lock_lock libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
+#define glthread_once libintl_once
+#define glthread_once_call libintl_once_call
+#define glthread_once_singlethreaded libintl_once_singlethreaded
+])
+])
+m4trace:ltdl/m4/intl.m4:186: -1- AC_DEFUN([gt_INTL_SUBDIR_CORE], [
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+ AC_REQUIRE([gl_LOCK])dnl
+
+ AC_TRY_LINK(
+ [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+ [],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
+ AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+ argz_next __fsetlocking])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+ AM_ICONV
+
+ dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+ dnl and a _NL_LOCALE_NAME macro always.
+ AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+ [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+ [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));
+ return !cs;
+ ],
+ gt_cv_nl_locale_name=yes,
+ gt_cv_nl_locale_name=no)
+ ])
+ if test $gt_cv_nl_locale_name = yes; then
+ AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+ [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+m4trace:ltdl/m4/intl.m4:270: -1- AC_DEFUN([gt_CHECK_DECL], [
+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+ [AC_TRY_COMPILE([$2], [
+#ifndef $1
+ char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+ if test $ac_cv_have_decl_$1 = yes; then
+ gt_value=1
+ else
+ gt_value=0
+ fi
+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
+m4trace:ltdl/m4/intlmacosx.m4:18: -1- AC_DEFUN([gt_INTL_MACOSX], [
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+m4trace:ltdl/m4/intmax.m4:11: -1- AC_DEFUN([gt_TYPE_INTMAX_T], [
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;
+ return !x;],
+ [gt_cv_c_intmax_t=yes],
+ [gt_cv_c_intmax_t=no])])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+m4trace:ltdl/m4/intmax_t.m4:15: -1- AC_DEFUN([gl_AC_TYPE_INTMAX_T], [
+ dnl For simplicity, we assume that a header file defines 'intmax_t' if and
+ dnl only if it defines 'uintmax_t'.
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+ [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
+ else
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+m4trace:ltdl/m4/intmax_t.m4:36: -1- AC_DEFUN([gt_AC_TYPE_INTMAX_T], [
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ else
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+ [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
+ fi
+])
+m4trace:ltdl/m4/inttypes-pri.m4:14: -1- AC_DEFUN([gt_INTTYPES_PRI], [
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ [gt_cv_inttypes_pri_broken],
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
+m4trace:ltdl/m4/inttypes.m4:10: -1- AC_DEFUN([gl_INTTYPES_H], [
+ AC_REQUIRE([gl_STDINT_H])
+ AC_REQUIRE([gt_INTTYPES_PRI])
+ AC_CHECK_HEADERS_ONCE([inttypes.h])
+ AC_CHECK_DECLS_ONCE([imaxabs])
+ AC_CHECK_DECLS_ONCE([imaxdiv])
+ AC_CHECK_DECLS_ONCE([strtoimax])
+ AC_CHECK_DECLS_ONCE([strtoumax])
+
+ dnl Now see if we need a substitute <inttypes.h>.
+ dnl A complete <inttypes.h> requires
+ dnl - a complete <stdint.h>,
+ dnl - the existence of an <inttypes.h>,
+ dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared,
+ dnl - some additional tests.
+ AC_CACHE_CHECK([whether inttypes.h conforms to C99],
+ [gl_cv_header_working_inttypes_h],
+ [gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+ ]])],
+ [gl_cv_header_working_inttypes_h=yes])
+ fi])
+
+ dnl Override <inttypes.h> always, so that the portability warnings work.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+ AC_REQUIRE([gl_MULTIARCH])
+
+ dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+ dnl <inttypes.h> relies on them. This macro is only needed when a
+ dnl C++ compiler is in use; it has no effect for a C compiler.
+ dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+ dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+ dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+ AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+ [Define to make the limit macros in <stdint.h> visible.])
+ AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+ <inttypes.h> relies on them. */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;]])],
+ [PRIPTR_PREFIX='"'$glpfx'"'])
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+ AC_SUBST([PRIPTR_PREFIX])
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT32_MAX_LT_INTMAX_MAX],
+ [defined INT32_MAX && defined INTMAX_MAX],
+ [INT32_MAX < INTMAX_MAX],
+ [sizeof (int) < sizeof (long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT64_MAX_EQ_LONG_MAX],
+ [defined INT64_MAX],
+ [INT64_MAX == LONG_MAX],
+ [sizeof (long long int) == sizeof (long int)])
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT32_MAX_LT_UINTMAX_MAX],
+ [defined UINT32_MAX && defined UINTMAX_MAX],
+ [UINT32_MAX < UINTMAX_MAX],
+ [sizeof (unsigned int) < sizeof (unsigned long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT64_MAX_EQ_ULONG_MAX],
+ [defined UINT64_MAX],
+ [UINT64_MAX == ULONG_MAX],
+ [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
+ ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+m4trace:ltdl/m4/inttypes.m4:249: -1- AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], [
+ AC_CACHE_CHECK([whether $3],
+ [gl_cv_test_$1],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if $2
+ #define CONDITION ($3)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION ($4)
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];]])],
+ [gl_cv_test_$1=yes],
+ [gl_cv_test_$1=no])])
+ if test $gl_cv_test_$1 = yes; then
+ $1=1;
+ else
+ $1=0;
+ fi
+ AC_SUBST([$1])
+])
+m4trace:ltdl/m4/inttypes.m4:284: -1- AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/inttypes.m4:291: -1- AC_DEFUN([gl_INTTYPES_H_DEFAULTS], [
+ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
+ GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
+ GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
+ GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
+ HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
+ HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+ HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+])
+m4trace:ltdl/m4/inttypes_h.m4:12: -1- AC_DEFUN([gl_AC_HEADER_INTTYPES_H], [
+ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ [gl_cv_header_inttypes_h=yes],
+ [gl_cv_header_inttypes_h=no])])
+ if test $gl_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+m4trace:ltdl/m4/isnand.m4:9: -1- AC_DEFUN([gl_FUNC_ISNAND], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNAND_LIBM=
+ gl_HAVE_ISNAND_NO_LIBM
+ if test $gl_cv_func_isnand_no_libm = no; then
+ gl_HAVE_ISNAND_IN_LIBM
+ if test $gl_cv_func_isnand_in_libm = yes; then
+ ISNAND_LIBM=-lm
+ fi
+ fi
+ dnl The variable gl_func_isnand set here is used by isnan.m4.
+ if test $gl_cv_func_isnand_no_libm = yes \
+ || test $gl_cv_func_isnand_in_libm = yes; then
+ gl_func_isnand=yes
+ else
+ gl_func_isnand=no
+ HAVE_ISNAND=0
+ gl_BUILD_ISNAND
+ fi
+ AC_SUBST([ISNAND_LIBM])
+])
+m4trace:ltdl/m4/isnand.m4:34: -1- AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM], [
+ gl_HAVE_ISNAND_NO_LIBM
+ if test $gl_cv_func_isnand_no_libm = yes; then
+ AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1],
+ [Define if the isnan(double) function is available in libc.])
+ else
+ gl_BUILD_ISNAND
+ fi
+])
+m4trace:ltdl/m4/isnand.m4:46: -1- AC_DEFUN([gl_BUILD_ISNAND], [
+ AC_LIBOBJ([isnand])
+ gl_DOUBLE_EXPONENT_LOCATION
+])
+m4trace:ltdl/m4/isnand.m4:54: -1- AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM], [
+ AC_CACHE_CHECK([whether isnan(double) can be used with libm],
+ [gl_cv_func_isnand_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnand ((double)(x))
+ #elif defined isnan
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;],
+ [return isnand (x);],
+ [gl_cv_func_isnand_in_libm=yes],
+ [gl_cv_func_isnand_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+m4trace:ltdl/m4/isnand.m4:77: -1- AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM], [
+ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
+ [gl_cv_func_isnand_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnan ((double)(x))
+ #else
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;],
+ [return isnand (x);],
+ [gl_cv_func_isnand_no_libm=yes],
+ [gl_cv_func_isnand_no_libm=no])
+ ])
+])
+m4trace:ltdl/m4/isnanf.m4:9: -1- AC_DEFUN([gl_FUNC_ISNANF], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNANF_LIBM=
+ gl_HAVE_ISNANF_NO_LIBM
+ if test $gl_cv_func_isnanf_no_libm = no; then
+ gl_HAVE_ISNANF_IN_LIBM
+ if test $gl_cv_func_isnanf_in_libm = yes; then
+ ISNANF_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ || test $gl_cv_func_isnanf_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ISNANF_LIBM"
+ gl_ISNANF_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_isnanf_works" in
+ *yes) gl_func_isnanf=yes ;;
+ *) gl_func_isnanf=no; ISNANF_LIBM= ;;
+ esac
+ else
+ gl_func_isnanf=no
+ fi
+ if test $gl_func_isnanf != yes; then
+ HAVE_ISNANF=0
+ gl_BUILD_ISNANF
+ fi
+ AC_SUBST([ISNANF_LIBM])
+])
+m4trace:ltdl/m4/isnanf.m4:42: -1- AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM], [
+ gl_HAVE_ISNANF_NO_LIBM
+ if test $gl_cv_func_isnanf_no_libm = yes; then
+ gl_ISNANF_WORKS
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
+ AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1],
+ [Define if the isnan(float) function is available in libc.])
+ else
+ gl_BUILD_ISNANF
+ fi
+])
+m4trace:ltdl/m4/isnanf.m4:62: -1- AC_DEFUN([gl_BUILD_ISNANF], [
+ AC_LIBOBJ([isnanf])
+ gl_FLOAT_EXPONENT_LOCATION
+])
+m4trace:ltdl/m4/isnanf.m4:69: -1- AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM], [
+ AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm],
+ [gl_cv_func_isnanf_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;],
+ [return isnanf (x);],
+ [gl_cv_func_isnanf_no_libm=yes],
+ [gl_cv_func_isnanf_no_libm=no])
+ ])
+])
+m4trace:ltdl/m4/isnanf.m4:90: -1- AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM], [
+ AC_CACHE_CHECK([whether isnan(float) can be used with libm],
+ [gl_cv_func_isnanf_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;],
+ [return isnanf (x);],
+ [gl_cv_func_isnanf_in_libm=yes],
+ [gl_cv_func_isnanf_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+m4trace:ltdl/m4/isnanf.m4:116: -1- AC_DEFUN([gl_ISNANF_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+ AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+#endif
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaN() (0.0f / 0.0f)
+#endif
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; float value; } memory_float;
+int main()
+{
+ memory_float m;
+
+ if (isnanf (1.0f / 0.0f))
+ return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no],
+ [case "$host_os" in
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
+ *) gl_cv_func_isnanf_works="guessing yes";;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/isnanl.m4:7: -1- AC_DEFUN([gl_FUNC_ISNANL], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNANL_LIBM=
+ gl_HAVE_ISNANL_NO_LIBM
+ if test $gl_cv_func_isnanl_no_libm = no; then
+ gl_HAVE_ISNANL_IN_LIBM
+ if test $gl_cv_func_isnanl_in_libm = yes; then
+ ISNANL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_isnanl_no_libm = yes \
+ || test $gl_cv_func_isnanl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ISNANL_LIBM"
+ gl_FUNC_ISNANL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_isnanl_works" in
+ *yes) gl_func_isnanl=yes ;;
+ *) gl_func_isnanl=no; ISNANL_LIBM= ;;
+ esac
+ else
+ gl_func_isnanl=no
+ fi
+ if test $gl_func_isnanl != yes; then
+ HAVE_ISNANL=0
+ gl_BUILD_ISNANL
+ fi
+ AC_SUBST([ISNANL_LIBM])
+])
+m4trace:ltdl/m4/isnanl.m4:38: -1- AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM], [
+ gl_HAVE_ISNANL_NO_LIBM
+ gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
+ if test $gl_func_isnanl_no_libm = yes; then
+ gl_FUNC_ISNANL_WORKS
+ case "$gl_cv_func_isnanl_works" in
+ *yes) ;;
+ *) gl_func_isnanl_no_libm=no ;;
+ esac
+ fi
+ if test $gl_func_isnanl_no_libm = yes; then
+ AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1],
+ [Define if the isnan(long double) function is available in libc.])
+ else
+ gl_BUILD_ISNANL
+ fi
+])
+m4trace:ltdl/m4/isnanl.m4:58: -1- AC_DEFUN([gl_BUILD_ISNANL], [
+ AC_LIBOBJ([isnanl])
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+])
+m4trace:ltdl/m4/isnanl.m4:65: -1- AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM], [
+ AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm],
+ [gl_cv_func_isnanl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;],
+ [return isnanl (x);],
+ [gl_cv_func_isnanl_no_libm=yes],
+ [gl_cv_func_isnanl_no_libm=no])
+ ])
+])
+m4trace:ltdl/m4/isnanl.m4:86: -1- AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM], [
+ AC_CACHE_CHECK([whether isnan(long double) can be used with libm],
+ [gl_cv_func_isnanl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;],
+ [return isnanl (x);],
+ [gl_cv_func_isnanl_in_libm=yes],
+ [gl_cv_func_isnanl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+m4trace:ltdl/m4/isnanl.m4:114: -1- AC_DEFUN([gl_FUNC_ISNANL_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+#elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+#endif
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
+int main ()
+{
+ memory_long_double m;
+ unsigned int i;
+
+ if (!isnanl (NaNl ()))
+ return 1;
+
+ /* The isnanl function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit (since the exponent never extends to
+ bit 31). */
+ m.value = NaNl ();
+ m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ for (i = 0; i < NWORDS; i++)
+ m.word[i] |= 1;
+ if (!isnanl (m.value))
+ return 1;
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no],
+ [case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+ *)
+ case "$host_os" in
+ netbsd*) gl_cv_func_isnanl_works="guessing no";;
+ *) gl_cv_func_isnanl_works="guessing yes";;
+ esac
+ ;;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/langinfo_h.m4:7: -1- AC_DEFUN([gl_LANGINFO_H], [
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+
+ dnl Persuade glibc-2.0.6 <langinfo.h> to define CODESET.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ gl_CHECK_NEXT_HEADERS([langinfo.h])
+
+ dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+ AC_CHECK_HEADERS_ONCE([langinfo.h])
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
+ dnl on OpenBSD 3.8.
+ AC_CACHE_CHECK([whether langinfo.h defines CODESET],
+ [gl_cv_header_langinfo_codeset],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = CODESET;
+]])],
+ [gl_cv_header_langinfo_codeset=yes],
+ [gl_cv_header_langinfo_codeset=no])
+ ])
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ AC_CACHE_CHECK([whether langinfo.h defines ERA],
+ [gl_cv_header_langinfo_era],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ERA;
+]])],
+ [gl_cv_header_langinfo_era=yes],
+ [gl_cv_header_langinfo_era=no])
+ ])
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+ AC_SUBST([HAVE_LANGINFO_H])
+ AC_SUBST([HAVE_LANGINFO_CODESET])
+ AC_SUBST([HAVE_LANGINFO_ERA])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
+ ]], [nl_langinfo])
+])
+m4trace:ltdl/m4/langinfo_h.m4:61: -1- AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/langinfo_h.m4:68: -1- AC_DEFUN([gl_LANGINFO_H_DEFAULTS], [
+ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO])
+ REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
+])
+m4trace:ltdl/m4/lcmessage.m4:22: -1- AC_DEFUN([gt_LC_MESSAGES], [
+ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE([HAVE_LC_MESSAGES], [1],
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
+m4trace:ltdl/m4/ldexpl.m4:7: -1- AC_DEFUN([gl_FUNC_LDEXPL], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ LDEXPL_LIBM=
+ AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm],
+ [gl_cv_func_ldexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [return ldexpl (x, -1) > 0;],
+ [gl_cv_func_ldexpl_no_libm=yes],
+ [gl_cv_func_ldexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexpl_no_libm = no; then
+ AC_CACHE_CHECK([whether ldexpl() can be used with libm],
+ [gl_cv_func_ldexpl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [return ldexpl (x, -1) > 0;],
+ [gl_cv_func_ldexpl_in_libm=yes],
+ [gl_cv_func_ldexpl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_ldexpl_in_libm = yes; then
+ LDEXPL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_ldexpl_no_libm = yes \
+ || test $gl_cv_func_ldexpl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LDEXPL_LIBM"
+ gl_FUNC_LDEXPL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_ldexpl_works" in
+ *yes) gl_func_ldexpl=yes ;;
+ *) gl_func_ldexpl=no; REPLACE_LDEXPL=1; LDEXPL_LIBM= ;;
+ esac
+ else
+ gl_func_ldexpl=no
+ fi
+ if test $gl_func_ldexpl = yes; then
+ AC_DEFINE([HAVE_LDEXPL], [1],
+ [Define if the ldexpl() function is available.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_LDEXPL=0
+ AC_LIBOBJ([ldexpl])
+ fi
+ AC_SUBST([LDEXPL_LIBM])
+])
+m4trace:ltdl/m4/ldexpl.m4:65: -1- AC_DEFUN([gl_FUNC_LDEXPL_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+extern long double ldexpl (long double, int);
+int main()
+{
+ volatile long double x1 = 1.0;
+ volatile long double y1 = ldexpl (x1, -1);
+ volatile long double x2 = 1.73205L;
+ volatile long double y2 = ldexpl (x2, 0);
+ return (y1 != 0.5L) || (y2 != x2);
+}], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no],
+ [case "$host_os" in
+ aix*) gl_cv_func_ldexpl_works="guessing no";;
+ *) gl_cv_func_ldexpl_works="guessing yes";;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/lib-ld.m4:12: -1- AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+m4trace:ltdl/m4/lib-ld.m4:25: -1- AC_DEFUN([AC_LIB_PROG_LD], [AC_ARG_WITH([gnu-ld],
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+m4trace:ltdl/m4/lib-link.m4:17: -1- AC_DEFUN([AC_LIB_LINKFLAGS], [
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+m4trace:ltdl/m4/lib-link.m4:57: -1- AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+m4trace:ltdl/m4/lib-link.m4:112: -1- AC_DEFUN([AC_LIB_RPATH], [
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+m4trace:ltdl/m4/lib-link.m4:148: -1- AC_DEFUN([AC_LIB_FROMPACKAGE], [
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+m4trace:ltdl/m4/lib-link.m4:168: -1- AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+m4trace:ltdl/m4/lib-link.m4:671: -1- AC_DEFUN([AC_LIB_APPENDTOVAR], [
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+m4trace:ltdl/m4/lib-link.m4:695: -1- AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
+m4trace:ltdl/m4/lib-prefix.m4:12: -1- AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])
+m4trace:ltdl/m4/lib-prefix.m4:22: -1- AC_DEFUN([AC_LIB_PREFIX], [
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+m4trace:ltdl/m4/lib-prefix.m4:122: -1- AC_DEFUN([AC_LIB_PREPARE_PREFIX], [
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+m4trace:ltdl/m4/lib-prefix.m4:145: -1- AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+m4trace:ltdl/m4/lib-prefix.m4:162: -1- AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
+m4trace:ltdl/m4/libtool.m4:67: -1- AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])
+m4trace:ltdl/m4/libtool.m4:102: -1- AU_DEFUN([AC_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:ltdl/m4/libtool.m4:102: -1- AC_DEFUN([AC_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:ltdl/m4/libtool.m4:103: -1- AU_DEFUN([AM_PROG_LIBTOOL], [m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:ltdl/m4/libtool.m4:103: -1- AC_DEFUN([AM_PROG_LIBTOOL], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LIBTOOL' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_INIT], [LT_INIT($@)])])
+m4trace:ltdl/m4/libtool.m4:562: -1- AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])
+m4trace:ltdl/m4/libtool.m4:757: -1- AC_DEFUN([LT_SUPPORTED_TAG], [])
+m4trace:ltdl/m4/libtool.m4:768: -1- AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])
+m4trace:ltdl/m4/libtool.m4:830: -1- AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+m4trace:ltdl/m4/libtool.m4:830: -1- AC_DEFUN([AC_LIBTOOL_CXX], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_CXX' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(C++)])
+m4trace:ltdl/m4/libtool.m4:831: -1- AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+m4trace:ltdl/m4/libtool.m4:831: -1- AC_DEFUN([AC_LIBTOOL_F77], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_F77' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran 77)])
+m4trace:ltdl/m4/libtool.m4:832: -1- AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+m4trace:ltdl/m4/libtool.m4:832: -1- AC_DEFUN([AC_LIBTOOL_FC], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_FC' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Fortran)])
+m4trace:ltdl/m4/libtool.m4:833: -1- AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+m4trace:ltdl/m4/libtool.m4:833: -1- AC_DEFUN([AC_LIBTOOL_GCJ], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_GCJ' is obsolete.
+You should run autoupdate.])dnl
+LT_LANG(Java)])
+m4trace:ltdl/m4/libtool.m4:1402: -1- AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])
+m4trace:ltdl/m4/libtool.m4:1444: -1- AU_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:ltdl/m4/libtool.m4:1444: -1- AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_COMPILER_OPTION], [_LT_COMPILER_OPTION($@)])])
+m4trace:ltdl/m4/libtool.m4:1453: -1- AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])
+m4trace:ltdl/m4/libtool.m4:1488: -1- AU_DEFUN([AC_LIBTOOL_LINKER_OPTION], [m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:ltdl/m4/libtool.m4:1488: -1- AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_LINKER_OPTION' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_LINKER_OPTION], [_LT_LINKER_OPTION($@)])])
+m4trace:ltdl/m4/libtool.m4:1495: -1- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])
+m4trace:ltdl/m4/libtool.m4:1623: -1- AU_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:ltdl/m4/libtool.m4:1623: -1- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_SYS_MAX_CMD_LEN' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_CMD_MAX_LEN], [LT_CMD_MAX_LEN($@)])])
+m4trace:ltdl/m4/libtool.m4:1724: -1- AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])
+m4trace:ltdl/m4/libtool.m4:1841: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:ltdl/m4/libtool.m4:1841: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN_SELF' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF($@)])])
+m4trace:ltdl/m4/libtool.m4:2741: -1- AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])
+m4trace:ltdl/m4/libtool.m4:2803: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:ltdl/m4/libtool.m4:2803: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])])
+m4trace:ltdl/m4/libtool.m4:2826: -1- AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])
+m4trace:ltdl/m4/libtool.m4:2914: -1- AU_DEFUN([AM_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:ltdl/m4/libtool.m4:2914: -1- AC_DEFUN([AM_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_LD' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:ltdl/m4/libtool.m4:2915: -1- AU_DEFUN([AC_PROG_LD], [m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:ltdl/m4/libtool.m4:2915: -1- AC_DEFUN([AC_PROG_LD], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_LD' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_LD], [LT_PATH_LD($@)])])
+m4trace:ltdl/m4/libtool.m4:3179: -1- AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])
+m4trace:ltdl/m4/libtool.m4:3257: -1- AU_DEFUN([AM_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:ltdl/m4/libtool.m4:3257: -1- AC_DEFUN([AM_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AM_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:ltdl/m4/libtool.m4:3258: -1- AU_DEFUN([AC_PROG_NM], [m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:ltdl/m4/libtool.m4:3258: -1- AC_DEFUN([AC_PROG_NM], [AC_DIAGNOSE([obsolete], [The macro `AC_PROG_NM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PATH_NM], [LT_PATH_NM($@)])])
+m4trace:ltdl/m4/libtool.m4:3267: -1- AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])
+m4trace:ltdl/m4/libtool.m4:3286: -1- AU_DEFUN([AC_CHECK_LIBM], [m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:ltdl/m4/libtool.m4:3286: -1- AC_DEFUN([AC_CHECK_LIBM], [AC_DIAGNOSE([obsolete], [The macro `AC_CHECK_LIBM' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_M], [LT_LIB_M($@)])])
+m4trace:ltdl/m4/libtool.m4:6987: -1- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+m4trace:ltdl/m4/libtool.m4:6996: -1- AU_DEFUN([LT_AC_PROG_GCJ], [m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:ltdl/m4/libtool.m4:6996: -1- AC_DEFUN([LT_AC_PROG_GCJ], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_GCJ' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_GCJ], [LT_PROG_GCJ($@)])])
+m4trace:ltdl/m4/libtool.m4:7003: -1- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,)
+])
+m4trace:ltdl/m4/libtool.m4:7008: -1- AU_DEFUN([LT_AC_PROG_RC], [m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:ltdl/m4/libtool.m4:7008: -1- AC_DEFUN([LT_AC_PROG_RC], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_RC' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_PROG_RC], [LT_PROG_RC($@)])])
+m4trace:ltdl/m4/libtool.m4:7119: -1- AU_DEFUN([LT_AC_PROG_SED], [m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:ltdl/m4/libtool.m4:7119: -1- AC_DEFUN([LT_AC_PROG_SED], [AC_DIAGNOSE([obsolete], [The macro `LT_AC_PROG_SED' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [AC_PROG_SED], [AC_PROG_SED($@)])])
+m4trace:ltdl/m4/link.m4:7: -1- AC_DEFUN([gl_FUNC_LINK], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([link])
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+ AC_LIBOBJ([link])
+ else
+ AC_CACHE_CHECK([whether link handles trailing slash correctly],
+ [gl_cv_func_link_works],
+ [touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[if (!link ("conftest.a", "conftest.b/")) return 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b")) return 2;
+#endif
+ ]])],
+ [gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
+ [gl_cv_func_link_works="guessing no"])
+ rm -f conftest.a conftest.b conftest.lnk])
+ if test "$gl_cv_func_link_works" != yes; then
+ REPLACE_LINK=1
+ AC_LIBOBJ([link])
+ fi
+ fi
+])
+m4trace:ltdl/m4/localcharset.m4:7: -1- AC_DEFUN([gl_LOCALCHARSET], [
+ dnl Prerequisites of lib/localcharset.c.
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+
+ dnl Prerequisites of the lib/Makefile.am snippet.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_GLIBC21])
+])
+m4trace:ltdl/m4/locale-fr.m4:10: -1- AC_DEFUN([gt_LOCALE_FR], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR=$gt_cv_locale_fr
+ AC_SUBST([LOCALE_FR])
+])
+m4trace:ltdl/m4/locale-fr.m4:101: -1- AC_DEFUN([gt_LOCALE_FR_UTF8], [
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ AC_SUBST([LOCALE_FR_UTF8])
+])
+m4trace:ltdl/m4/locale-ja.m4:10: -1- AC_DEFUN([gt_LOCALE_JA], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_JA=$gt_cv_locale_ja
+ AC_SUBST([LOCALE_JA])
+])
+m4trace:ltdl/m4/locale-tr.m4:10: -1- AC_DEFUN([gt_LOCALE_TR_UTF8], [
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+ AC_SUBST([LOCALE_TR_UTF8])
+])
+m4trace:ltdl/m4/locale-zh.m4:10: -1- AC_DEFUN([gt_LOCALE_ZH_CN], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ AC_SUBST([LOCALE_ZH_CN])
+])
+m4trace:ltdl/m4/lock.m4:9: -1- AC_DEFUN([gl_LOCK], [
+ AC_REQUIRE([gl_THREADLIB])
+ if test "$gl_threads_api" = posix; then
+ # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # pthread_rwlock_* functions.
+ AC_CHECK_TYPE([pthread_rwlock_t],
+ [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+ [Define if the POSIX multithreading library has read/write locks.])],
+ [],
+ [#include <pthread.h>])
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+ [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+ fi
+ gl_PREREQ_LOCK
+])
+m4trace:ltdl/m4/lock.m4:35: -1- AC_DEFUN([gl_PREREQ_LOCK], [
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:ltdl/m4/longlong.m4:17: -1- AC_DEFUN([AC_TYPE_LONG_LONG_INT], [
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+ dnl If cross compiling, assume the bug isn't important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no],
+ [ac_cv_type_long_long_int=yes])],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+m4trace:ltdl/m4/longlong.m4:63: -1- AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `unsigned long long int'.])
+ fi
+])
+m4trace:ltdl/m4/longlong.m4:82: -1- AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET], [
+ AC_LANG_PROGRAM(
+ [[/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
+])
+m4trace:ltdl/m4/lseek.m4:7: -1- AC_DEFUN([gl_FUNC_LSEEK], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
+ [if test $cross_compiling = no; then
+ AC_LINK_IFELSE([
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int main ()
+{
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+}],
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi],
+ [gl_cv_func_lseek_pipe=no])
+ else
+ AC_COMPILE_IFELSE([
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif],
+ [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+ fi])
+ if test $gl_cv_func_lseek_pipe = no; then
+ gl_REPLACE_LSEEK
+ fi
+])
+m4trace:ltdl/m4/lseek.m4:44: -1- AC_DEFUN([gl_REPLACE_LSEEK], [
+ AC_LIBOBJ([lseek])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ REPLACE_LSEEK=1
+ AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+ [Define to 1 if lseek does not detect pipes.])
+])
+m4trace:ltdl/m4/lstat.m4:11: -1- AC_DEFUN([gl_FUNC_LSTAT], [
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ dnl If lstat does not exist, the replacement <sys/stat.h> does
+ dnl "#define lstat stat", and lstat.c is a no-op.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ else
+ HAVE_LSTAT=0
+ fi
+])
+m4trace:ltdl/m4/ltdl.m4:16: -1- AC_DEFUN([LT_CONFIG_LTDL_DIR], [AC_BEFORE([$0], [LTDL_INIT])
+_$0($*)
+])
+m4trace:ltdl/m4/ltdl.m4:68: -1- AC_DEFUN([LTDL_CONVENIENCE], [AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])
+m4trace:ltdl/m4/ltdl.m4:81: -1- AU_DEFUN([AC_LIBLTDL_CONVENIENCE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+m4trace:ltdl/m4/ltdl.m4:81: -1- AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_CONVENIENCE' is obsolete.
+You should run autoupdate.])dnl
+_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+m4trace:ltdl/m4/ltdl.m4:124: -1- AC_DEFUN([LTDL_INSTALLABLE], [AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])
+m4trace:ltdl/m4/ltdl.m4:137: -1- AU_DEFUN([AC_LIBLTDL_INSTALLABLE], [_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+m4trace:ltdl/m4/ltdl.m4:137: -1- AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBLTDL_INSTALLABLE' is obsolete.
+You should run autoupdate.])dnl
+_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+m4trace:ltdl/m4/ltdl.m4:213: -1- AC_DEFUN([_LT_LIBOBJ], [
+ m4_pattern_allow([^_LT_LIBOBJS$])
+ _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
+])
+m4trace:ltdl/m4/ltdl.m4:226: -1- AC_DEFUN([LTDL_INIT], [dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+dnl We need to keep our own list of libobjs separate from our parent project,
+dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
+dnl we look for our own LIBOBJs.
+m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
+m4_pushdef([AC_LIBSOURCES])
+
+dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
+m4_if(_LTDL_MODE, [],
+ [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
+ m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
+
+AC_ARG_WITH([included_ltdl],
+ [AS_HELP_STRING([--with-included-ltdl],
+ [use the GNU ltdl sources included here])])
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ AC_CHECK_HEADER([ltdl.h],
+ [AC_CHECK_DECL([lt_dlinterface_register],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
+ [with_included_ltdl=no],
+ [with_included_ltdl=yes])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT
+ #include <ltdl.h>])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT]
+ )
+fi
+
+dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
+dnl was called yet, then for old times' sake, we assume libltdl is in an
+dnl eponymous directory:
+AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
+
+AC_ARG_WITH([ltdl_include],
+ [AS_HELP_STRING([--with-ltdl-include=DIR],
+ [use the ltdl headers installed in DIR])])
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
+ fi
+else
+ with_ltdl_include=no
+fi
+
+AC_ARG_WITH([ltdl_lib],
+ [AS_HELP_STRING([--with-ltdl-lib=DIR],
+ [use the libltdl.la installed in DIR])])
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ m4_case(m4_default(_LTDL_TYPE, [convenience]),
+ [convenience], [_LTDL_CONVENIENCE],
+ [installable], [_LTDL_INSTALLABLE],
+ [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+ AC_DEFINE([HAVE_LTDL], [1],
+ [Define this if a modern libltdl is already installed])
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+AC_MSG_CHECKING([where to find libltdl headers])
+AC_MSG_RESULT([$LTDLINCL])
+AC_MSG_CHECKING([where to find libltdl library])
+AC_MSG_RESULT([$LIBLTDL])
+
+_LTDL_SETUP
+
+dnl restore autoconf definition.
+m4_popdef([AC_LIBOBJ])
+m4_popdef([AC_LIBSOURCES])
+
+AC_CONFIG_COMMANDS_PRE([
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
+ AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
+])
+
+# Only expand once:
+m4_define([LTDL_INIT])
+])
+m4trace:ltdl/m4/ltdl.m4:352: -1- AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:352: -1- AC_DEFUN([AC_LIB_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIB_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:353: -1- AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:353: -1- AC_DEFUN([AC_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `AC_WITH_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:354: -1- AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:354: -1- AC_DEFUN([LT_WITH_LTDL], [AC_DIAGNOSE([obsolete], [The macro `LT_WITH_LTDL' is obsolete.
+You should run autoupdate.])dnl
+LTDL_INIT($@)])
+m4trace:ltdl/m4/ltdl.m4:367: -1- AC_DEFUN([_LTDL_SETUP], [AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
+AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
+AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
+AC_REQUIRE([LT_LIB_DLLOAD])dnl
+AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
+AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
+AC_REQUIRE([gl_FUNC_ARGZ])dnl
+
+m4_require([_LT_CHECK_OBJDIR])dnl
+m4_require([_LT_HEADER_DLFCN])dnl
+m4_require([_LT_CHECK_DLPREOPEN])dnl
+m4_require([_LT_DECL_SED])dnl
+
+dnl Don't require this, or it will be expanded earlier than the code
+dnl that sets the variables it relies on:
+_LT_ENABLE_INSTALL
+
+dnl _LTDL_MODE specific code must be called at least once:
+_LTDL_MODE_DISPATCH
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+AC_CONFIG_COMMANDS_PRE([dnl
+m4_pattern_allow([^LT_CONFIG_H$])dnl
+m4_ifset([AH_HEADER],
+ [LT_CONFIG_H=AH_HEADER],
+ [m4_ifset([AC_LIST_HEADERS],
+ [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
+ [])])])
+AC_SUBST([LT_CONFIG_H])
+
+AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
+ [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
+AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
+
+AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+AC_SUBST([LTDLOPEN])
+])
+m4trace:ltdl/m4/ltdl.m4:437: -1- AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
+ [lt_cv_sys_dlopen_deplibs],
+ [# PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[[4-9]]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[[12345]]*|irix6.[[01]]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[[1234]]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+ ])
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
+ [Define if the OS needs help to load dependent libraries for dlopen().])
+fi
+])
+m4trace:ltdl/m4/ltdl.m4:536: -1- AU_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])])
+m4trace:ltdl/m4/ltdl.m4:536: -1- AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYS_DLOPEN_DEPLIBS' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS($@)])])
+m4trace:ltdl/m4/ltdl.m4:543: -1- AC_DEFUN([LT_SYS_MODULE_EXT], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which extension is used for runtime loadable modules],
+ [libltdl_cv_shlibext],
+[
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+ ])
+if test -n "$libltdl_cv_shlibext"; then
+ m4_pattern_allow([LT_MODULE_EXT])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
+ [Define to the extension used for runtime loadable modules, say, ".so".])
+fi
+])
+m4trace:ltdl/m4/ltdl.m4:559: -1- AU_DEFUN([AC_LTDL_SHLIBEXT], [m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])])
+m4trace:ltdl/m4/ltdl.m4:559: -1- AC_DEFUN([AC_LTDL_SHLIBEXT], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBEXT' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_MODULE_EXT], [LT_SYS_MODULE_EXT($@)])])
+m4trace:ltdl/m4/ltdl.m4:566: -1- AC_DEFUN([LT_SYS_MODULE_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which variable specifies run-time module search path],
+ [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
+if test -n "$lt_cv_module_path_var"; then
+ m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
+ [Define to the name of the environment variable that determines the run-time module search path.])
+fi
+])
+m4trace:ltdl/m4/ltdl.m4:578: -1- AU_DEFUN([AC_LTDL_SHLIBPATH], [m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])])
+m4trace:ltdl/m4/ltdl.m4:578: -1- AC_DEFUN([AC_LTDL_SHLIBPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SHLIBPATH' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_MODULE_PATH], [LT_SYS_MODULE_PATH($@)])])
+m4trace:ltdl/m4/ltdl.m4:585: -1- AC_DEFUN([LT_SYS_DLSEARCH_PATH], [m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([for the default library search path],
+ [lt_cv_sys_dlsearch_path],
+ [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+ m4_pattern_allow([LT_DLSEARCH_PATH])dnl
+ AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
+ [Define to the system default library search path.])
+fi
+])
+m4trace:ltdl/m4/ltdl.m4:606: -1- AU_DEFUN([AC_LTDL_SYSSEARCHPATH], [m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])])
+m4trace:ltdl/m4/ltdl.m4:606: -1- AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYSSEARCHPATH' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_DLSEARCH_PATH], [LT_SYS_DLSEARCH_PATH($@)])])
+m4trace:ltdl/m4/ltdl.m4:632: -1- AC_DEFUN([LT_LIB_DLLOAD], [m4_pattern_allow([^LT_DLLOADERS$])
+LT_DLLOADERS=
+AC_SUBST([LT_DLLOADERS])
+
+AC_LANG_PUSH([C])
+
+LIBADD_DLOPEN=
+AC_SEARCH_LIBS([dlopen], [dl],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+ ]], [[dlopen(0, 0);]])],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ AC_CHECK_FUNCS([dlerror])
+ LIBS="$lt_save_LIBS"
+fi
+AC_SUBST([LIBADD_DLOPEN])
+
+LIBADD_SHL_LOAD=
+AC_CHECK_FUNC([shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"])])
+AC_SUBST([LIBADD_SHL_LOAD])
+
+case $host_os in
+darwin[[1567]].*)
+# We only want this for pre-Mac OS X 10.4.
+ AC_CHECK_FUNC([_dyld_func_lookup],
+ [AC_DEFINE([HAVE_DYLD], [1],
+ [Define if you have the _dyld_func_lookup function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+AC_CHECK_LIB([dld], [dld_link],
+ [AC_DEFINE([HAVE_DLD], [1],
+ [Define if you have the GNU dld library.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
+AC_SUBST([LIBADD_DLD_LINK])
+
+m4_pattern_allow([^LT_DLPREOPEN$])
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+ AC_DEFINE([HAVE_LIBDLLOADER], [1],
+ [Define if libdlloader will be built on this platform])
+fi
+AC_SUBST([LT_DLPREOPEN])
+
+dnl This isn't used anymore, but set it for backwards compatibility
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+AC_SUBST([LIBADD_DL])
+
+AC_LANG_POP
+])
+m4trace:ltdl/m4/ltdl.m4:725: -1- AU_DEFUN([AC_LTDL_DLLIB], [m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])])
+m4trace:ltdl/m4/ltdl.m4:725: -1- AC_DEFUN([AC_LTDL_DLLIB], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLLIB' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_LIB_DLLOAD], [LT_LIB_DLLOAD($@)])])
+m4trace:ltdl/m4/ltdl.m4:733: -1- AC_DEFUN([LT_SYS_SYMBOL_USCORE], [m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([for _ prefix in compiled symbols],
+ [lt_cv_sys_symbol_underscore],
+ [lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.c >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf conftest*
+ ])
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+ AC_SUBST([sys_symbol_underscore])
+])
+m4trace:ltdl/m4/ltdl.m4:770: -1- AU_DEFUN([AC_LTDL_SYMBOL_USCORE], [m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])])
+m4trace:ltdl/m4/ltdl.m4:770: -1- AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_SYMBOL_USCORE' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_SYS_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE($@)])])
+m4trace:ltdl/m4/ltdl.m4:777: -1- AC_DEFUN([LT_FUNC_DLSYM_USCORE], [AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+ [libltdl_cv_need_uscore],
+ [libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ _LT_TRY_DLOPEN_SELF(
+ [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
+ [], [libltdl_cv_need_uscore=cross])
+ LIBS="$save_LIBS"
+ ])
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+ AC_DEFINE([NEED_USCORE], [1],
+ [Define if dlsym() requires a leading underscore in symbol names.])
+fi
+])
+m4trace:ltdl/m4/ltdl.m4:802: -1- AU_DEFUN([AC_LTDL_DLSYM_USCORE], [m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])])
+m4trace:ltdl/m4/ltdl.m4:802: -1- AC_DEFUN([AC_LTDL_DLSYM_USCORE], [AC_DIAGNOSE([obsolete], [The macro `AC_LTDL_DLSYM_USCORE' is obsolete.
+You should run autoupdate.])dnl
+m4_if($#, 0, [LT_FUNC_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE($@)])])
+m4trace:ltdl/m4/ltoptions.m4:13: -1- AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+m4trace:ltdl/m4/ltoptions.m4:110: -1- AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:110: -1- AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_DLOPEN' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:145: -1- AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:145: -1- AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
+You should run autoupdate.])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:194: -1- AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+m4trace:ltdl/m4/ltoptions.m4:198: -1- AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+m4trace:ltdl/m4/ltoptions.m4:202: -1- AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+m4trace:ltdl/m4/ltoptions.m4:202: -1- AC_DEFUN([AM_ENABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_SHARED($@)])
+m4trace:ltdl/m4/ltoptions.m4:203: -1- AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+m4trace:ltdl/m4/ltoptions.m4:203: -1- AC_DEFUN([AM_DISABLE_SHARED], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_SHARED' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_SHARED($@)])
+m4trace:ltdl/m4/ltoptions.m4:248: -1- AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+m4trace:ltdl/m4/ltoptions.m4:252: -1- AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+m4trace:ltdl/m4/ltoptions.m4:256: -1- AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+m4trace:ltdl/m4/ltoptions.m4:256: -1- AC_DEFUN([AM_ENABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_ENABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_ENABLE_STATIC($@)])
+m4trace:ltdl/m4/ltoptions.m4:257: -1- AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+m4trace:ltdl/m4/ltoptions.m4:257: -1- AC_DEFUN([AM_DISABLE_STATIC], [AC_DIAGNOSE([obsolete], [The macro `AM_DISABLE_STATIC' is obsolete.
+You should run autoupdate.])dnl
+AC_DISABLE_STATIC($@)])
+m4trace:ltdl/m4/ltoptions.m4:302: -1- AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:302: -1- AC_DEFUN([AC_ENABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_ENABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:309: -1- AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:309: -1- AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_DIAGNOSE([obsolete], [The macro `AC_DISABLE_FAST_INSTALL' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:342: -1- AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltoptions.m4:342: -1- AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_DIAGNOSE([obsolete], [The macro `AC_LIBTOOL_PICMODE' is obsolete.
+You should run autoupdate.])dnl
+_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+m4trace:ltdl/m4/ltsugar.m4:13: -1- AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+m4trace:ltdl/m4/ltversion.m4:18: -1- AC_DEFUN([LTVERSION_VERSION], [macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
+m4trace:ltdl/m4/lt~obsolete.m4:36: -1- AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+m4trace:ltdl/m4/lt~obsolete.m4:40: -1- AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])
+m4trace:ltdl/m4/lt~obsolete.m4:41: -1- AC_DEFUN([_LT_AC_SHELL_INIT])
+m4trace:ltdl/m4/lt~obsolete.m4:42: -1- AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])
+m4trace:ltdl/m4/lt~obsolete.m4:44: -1- AC_DEFUN([_LT_AC_TAGVAR])
+m4trace:ltdl/m4/lt~obsolete.m4:45: -1- AC_DEFUN([AC_LTDL_ENABLE_INSTALL])
+m4trace:ltdl/m4/lt~obsolete.m4:46: -1- AC_DEFUN([AC_LTDL_PREOPEN])
+m4trace:ltdl/m4/lt~obsolete.m4:47: -1- AC_DEFUN([_LT_AC_SYS_COMPILER])
+m4trace:ltdl/m4/lt~obsolete.m4:48: -1- AC_DEFUN([_LT_AC_LOCK])
+m4trace:ltdl/m4/lt~obsolete.m4:49: -1- AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])
+m4trace:ltdl/m4/lt~obsolete.m4:50: -1- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])
+m4trace:ltdl/m4/lt~obsolete.m4:51: -1- AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])
+m4trace:ltdl/m4/lt~obsolete.m4:52: -1- AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])
+m4trace:ltdl/m4/lt~obsolete.m4:53: -1- AC_DEFUN([AC_LIBTOOL_OBJDIR])
+m4trace:ltdl/m4/lt~obsolete.m4:54: -1- AC_DEFUN([AC_LTDL_OBJDIR])
+m4trace:ltdl/m4/lt~obsolete.m4:55: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])
+m4trace:ltdl/m4/lt~obsolete.m4:56: -1- AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])
+m4trace:ltdl/m4/lt~obsolete.m4:57: -1- AC_DEFUN([AC_PATH_MAGIC])
+m4trace:ltdl/m4/lt~obsolete.m4:58: -1- AC_DEFUN([AC_PROG_LD_GNU])
+m4trace:ltdl/m4/lt~obsolete.m4:59: -1- AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])
+m4trace:ltdl/m4/lt~obsolete.m4:60: -1- AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])
+m4trace:ltdl/m4/lt~obsolete.m4:61: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])
+m4trace:ltdl/m4/lt~obsolete.m4:62: -1- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
+m4trace:ltdl/m4/lt~obsolete.m4:63: -1- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])
+m4trace:ltdl/m4/lt~obsolete.m4:64: -1- AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])
+m4trace:ltdl/m4/lt~obsolete.m4:65: -1- AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])
+m4trace:ltdl/m4/lt~obsolete.m4:66: -1- AC_DEFUN([LT_AC_PROG_EGREP])
+m4trace:ltdl/m4/lt~obsolete.m4:71: -1- AC_DEFUN([_AC_PROG_LIBTOOL])
+m4trace:ltdl/m4/lt~obsolete.m4:72: -1- AC_DEFUN([AC_LIBTOOL_SETUP])
+m4trace:ltdl/m4/lt~obsolete.m4:73: -1- AC_DEFUN([_LT_AC_CHECK_DLFCN])
+m4trace:ltdl/m4/lt~obsolete.m4:74: -1- AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])
+m4trace:ltdl/m4/lt~obsolete.m4:75: -1- AC_DEFUN([_LT_AC_TAGCONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:77: -1- AC_DEFUN([_LT_AC_LANG_CXX])
+m4trace:ltdl/m4/lt~obsolete.m4:78: -1- AC_DEFUN([_LT_AC_LANG_F77])
+m4trace:ltdl/m4/lt~obsolete.m4:79: -1- AC_DEFUN([_LT_AC_LANG_GCJ])
+m4trace:ltdl/m4/lt~obsolete.m4:80: -1- AC_DEFUN([AC_LIBTOOL_RC])
+m4trace:ltdl/m4/lt~obsolete.m4:81: -1- AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:82: -1- AC_DEFUN([_LT_AC_LANG_C_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:83: -1- AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:84: -1- AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:85: -1- AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:86: -1- AC_DEFUN([_LT_AC_LANG_F77_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:87: -1- AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:88: -1- AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:89: -1- AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:90: -1- AC_DEFUN([_LT_AC_LANG_RC_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:91: -1- AC_DEFUN([AC_LIBTOOL_CONFIG])
+m4trace:ltdl/m4/lt~obsolete.m4:92: -1- AC_DEFUN([_LT_AC_FILE_LTDLL_C])
+m4trace:ltdl/m4/m4-error.m4:28: -1- AC_DEFUN([M4_ERROR], [AC_BEFORE([gl_ERROR], [M4_ERROR])
+
+AC_CHECK_HEADERS([error.h],
+ [ERROR_H=""], [ERROR_H="error.h"], [AC_INCLUDES_DEFAULT])
+AC_SUBST([ERROR_H])
+
+if test $ac_cv_header_error_h = yes; then
+ INCLUDE_ERROR_H='#include <error.h>'
+else
+ INCLUDE_ERROR_H='#include <gnu/error.h>'
+fi
+AC_SUBST([INCLUDE_ERROR_H])
+])
+m4trace:ltdl/m4/m4-getopt.m4:28: -1- AC_DEFUN([M4_GETOPT], [
+ m4_divert_text([INIT_PREPARE], [M4_replace_getopt=])
+ m4_pushdef([AC_LIBOBJ], [M4_replace_getopt=:])
+ AC_REQUIRE([gl_FUNC_GETOPT_GNU])
+ m4_popdef([AC_LIBOBJ])
+ AM_CONDITIONAL([GETOPT], [test -n "$M4_replace_getopt"])
+])
+m4trace:ltdl/m4/m4-gettext.m4:28: -1- AC_DEFUN([M4_GNU_GETTEXT], [AC_BEFORE([AM_GNU_GETTEXT], [M4_GNU_GETTEXT])
+AC_CHECK_HEADERS([gettext.h],
+ [GETTEXT_H=""], [GETTEXT_H="gettext.h"], [AC_INCLUDES_DEFAULT])
+AC_SUBST([GETTEXT_H])
+
+AC_CONFIG_FILES([po/Makefile.in])
+])
+m4trace:ltdl/m4/m4-obstack.m4:28: -1- AC_DEFUN([M4_OBSTACK], [AC_PREREQ([2.56])dnl We use the compiler based header checking in 2.56
+AC_BEFORE([gl_OBSTACK], [M4_OBSTACK])
+AC_ARG_WITH([included-obstack],
+ [AS_HELP_STRING([--with-included-obstack],
+ [use the obstack implementation included here])])
+
+AC_CHECK_HEADERS([obstack.h], [], [], [AC_INCLUDES_DEFAULT])
+
+if test "x${with_included_obstack-no}" != xno; then
+ ac_cv_func_obstack=no
+fi
+
+OBSTACK_H=
+if test $ac_cv_func_obstack = yes; then
+ INCLUDE_OBSTACK_H='#include <obstack.h>'
+else
+ INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
+ OBSTACK_H=obstack.h
+fi
+AC_SUBST([OBSTACK_H])
+AC_SUBST([INCLUDE_OBSTACK_H])
+])
+m4trace:ltdl/m4/m4-regex.m4:28: -1- AC_DEFUN([M4_REGEX], [AC_BEFORE([gl_REGEX], [M4_REGEX])
+if test $ac_use_included_regex = no; then
+ INCLUDE_REGEX_H='#include <regex.h>'
+ REGEX_H=
+else
+ INCLUDE_REGEX_H='#include <gnu/regex.h>'
+ REGEX_H=regex.h
+fi
+AC_SUBST([REGEX_H])
+AC_SUBST([INCLUDE_REGEX_H])
+])
+m4trace:ltdl/m4/m4-rename.m4:27: -1- AC_DEFUN([M4_RENAME], [AC_CACHE_CHECK([whether an open file can be renamed],
+ [M4_cv_func_rename_open_file_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],
+ [FILE *f = fopen ("conftest.1", "w+");
+ int result = rename ("conftest.1", "conftest.2");
+ fclose (f); remove ("conftest.1"); remove ("conftest.2");
+ return result;])],
+ [M4_cv_func_rename_open_file_works=yes],
+ [M4_cv_func_rename_open_file_works=no],
+ [M4_cv_func_rename_open_file_works='guessing no'])])
+if test "$M4_cv_func_rename_open_file_works" = yes ; then
+ M4_rename_open_works=1
+else
+ M4_rename_open_works=0
+fi
+AC_DEFINE_UNQUOTED([RENAME_OPEN_FILE_WORKS], [$M4_rename_open_works],
+ [Define to 1 if a file can be renamed while open, or to 0 if not.])
+])
+m4trace:ltdl/m4/m4-syscmd.m4:27: -1- AC_DEFUN([M4_SYSCMD], [AC_MSG_CHECKING([[which shell to use for syscmd]])
+AC_ARG_WITH([syscmd-shell],
+ [AS_HELP_STRING([--with-syscmd-shell], [shell used by syscmd [/bin/sh]])],
+ [case $withval in
+ yes[)] with_syscmd_shell=no;;
+ esac], [with_syscmd_shell=no])
+if test "$with_syscmd_shell" = no ; then
+ with_syscmd_shell=/bin/sh
+ if test "$cross_compiling" != yes ; then
+dnl Give mingw a default that is more likely to be available.
+ AS_IF([AS_EXECUTABLE_P([/bin/sh])], [],
+ [if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi])
+dnl Too bad _AS_PATH_WALK is not public.
+ M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
+ command -p getconf PATH
+ else
+ echo "/bin$PATH_SEPARATOR$PATH"
+ fi`
+ do
+ IFS=$M4_save_IFS
+ test -z "$M4_dir" && continue
+ AS_EXECUTABLE_P(["$M4_dir/sh"]) \
+ && { with_syscmd_shell=$M4_dir/sh; break; }
+ done
+ IFS=$M4_save_IFS
+ fi
+fi
+AC_MSG_RESULT([$with_syscmd_shell])
+AC_DEFINE_UNQUOTED([M4_SYSCMD_SHELL], ["$with_syscmd_shell"],
+ [Shell used by syscmd and esyscmd, must accept -c argument.])
+])
+m4trace:ltdl/m4/malloc.m4:11: -1- AC_DEFUN([gl_FUNC_MALLOC_POSIX], [
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if the 'malloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([malloc])
+ HAVE_MALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_MALLOC_POSIX])
+])
+m4trace:ltdl/m4/malloc.m4:27: -1- AC_DEFUN([gl_CHECK_MALLOC_POSIX], [
+ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+ [gl_cv_func_malloc_posix],
+ [
+ dnl It is too dangerous to try to allocate a large amount of memory:
+ dnl some systems go to their knees when you do that. So assume that
+ dnl all Unix implementations of the function are POSIX compliant.
+ AC_TRY_COMPILE([],
+ [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+ ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
+ ])
+])
+m4trace:ltdl/m4/malloca.m4:8: -1- AC_DEFUN([gl_MALLOCA], [
+ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+ dnl @ALLOCA@ and @LTALLOCA@.
+ dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
+m4trace:ltdl/m4/math_h.m4:7: -1- AC_DEFUN([gl_MATH_H], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([math.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+ [[/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;]])],
+ [gl_cv_header_math_nan_works=yes],
+ [gl_cv_header_math_nan_works=no])])
+ if test $gl_cv_header_math_nan_works = no; then
+ REPLACE_NAN=1
+ fi
+ AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+ [[/* Solaris 10 has a broken definition of HUGE_VAL. */
+ double d = HUGE_VAL;
+ return d == 0;]])],
+ [gl_cv_header_math_huge_val_works=yes],
+ [gl_cv_header_math_huge_val_works=no])])
+ if test $gl_cv_header_math_huge_val_works = no; then
+ REPLACE_HUGE_VAL=1
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <math.h>
+ ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl
+ ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl])
+])
+m4trace:ltdl/m4/math_h.m4:46: -1- AC_DEFUN([gl_MATH_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/math_h.m4:53: -1- AC_DEFUN([gl_MATH_H_DEFAULTS], [
+ GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
+ GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
+ GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
+ GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
+ GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
+ GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
+ GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
+ GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
+ GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
+ GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
+ GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
+ GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
+ GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
+ GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
+ GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
+ GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
+ GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
+ GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
+ GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
+ GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
+ GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
+ GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
+ GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
+ GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
+ GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
+ GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
+ GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
+ GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
+ GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL])
+ HAVE_ASINL=1; AC_SUBST([HAVE_ASINL])
+ HAVE_ATANL=1; AC_SUBST([HAVE_ATANL])
+ HAVE_COSL=1; AC_SUBST([HAVE_COSL])
+ HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
+ HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF])
+ HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND])
+ HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL])
+ HAVE_LOGL=1; AC_SUBST([HAVE_LOGL])
+ HAVE_SINL=1; AC_SUBST([HAVE_SINL])
+ HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL])
+ HAVE_TANL=1; AC_SUBST([HAVE_TANL])
+ HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
+ HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
+ HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
+ HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
+ HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
+ HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
+ HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
+ HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
+ HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL])
+ HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])
+ HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL])
+ HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
+ HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
+ REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
+ REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
+ REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
+ REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL])
+ REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
+ REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
+ REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
+ REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
+ REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
+ REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
+ REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
+ REPLACE_NAN=0; AC_SUBST([REPLACE_NAN])
+ REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND])
+ REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF])
+ REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
+ REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
+ REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+ REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
+])
+m4trace:ltdl/m4/mbchar.m4:10: -1- AC_DEFUN([gl_MBCHAR], [
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:ltdl/m4/mbiter.m4:10: -1- AC_DEFUN([gl_MBITER], [
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbiter.h" or "mbuiter.h". It can be removed in 2010.
+ AC_REQUIRE([AC_FUNC_MBRTOWC])
+ :
+])
+m4trace:ltdl/m4/mbrtowc.m4:8: -1- AC_DEFUN([gl_FUNC_MBRTOWC], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+ gl_MBRTOWC_NULL_ARG
+ gl_MBRTOWC_RETVAL
+ gl_MBRTOWC_NUL_RETVAL
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1],
+ [Define if the mbrtowc function has the NULL string argument bug.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
+ [Define if the mbrtowc function returns a wrong return value.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1],
+ [Define if the mbrtowc function does not return 0 for a NUL character.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbrtowc])
+ gl_PREREQ_MBRTOWC
+ fi
+])
+m4trace:ltdl/m4/mbrtowc.m4:60: -1- AC_DEFUN([gl_MBSTATE_T_BROKEN], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+ gl_MBRTOWC_INCOMPLETE_STATE
+ gl_MBRTOWC_SANITYCHECK
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+ gl_REPLACE_WCHAR_H
+ fi
+])
+m4trace:ltdl/m4/mbrtowc.m4:91: -1- AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
+ [gl_cv_func_mbrtowc_incomplete_state],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_incomplete_state=yes],
+ [gl_cv_func_mbrtowc_incomplete_state=no],
+ [:])
+ fi
+ ])
+])
+m4trace:ltdl/m4/mbrtowc.m4:139: -1- AC_DEFUN([gl_MBRTOWC_SANITYCHECK], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+ [gl_cv_func_mbrtowc_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_sanitycheck=yes],
+ [gl_cv_func_mbrtowc_sanitycheck=no],
+ [:])
+ fi
+ ])
+])
+m4trace:ltdl/m4/mbrtowc.m4:191: -1- AC_DEFUN([gl_MBRTOWC_NULL_ARG], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
+ [gl_cv_func_mbrtowc_null_arg],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
+ fi
+ ])
+])
+m4trace:ltdl/m4/mbrtowc.m4:240: -1- AC_DEFUN([gl_MBRTOWC_RETVAL], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc has a correct return value],
+ [gl_cv_func_mbrtowc_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_retval=yes],
+ [gl_cv_func_mbrtowc_retval=no],
+ [:])
+ fi
+ ])
+])
+m4trace:ltdl/m4/mbrtowc.m4:308: -1- AC_DEFUN([gl_MBRTOWC_NUL_RETVAL], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character],
+ [gl_cv_func_mbrtowc_nul_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_nul_retval=yes],
+ [gl_cv_func_mbrtowc_nul_retval=no],
+ [:])
+ fi
+ ])
+])
+m4trace:ltdl/m4/mbrtowc.m4:353: -1- AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ :
+])
+m4trace:ltdl/m4/mbsinit.m4:7: -1- AC_DEFUN([gl_FUNC_MBSINIT], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbsinit])
+ gl_PREREQ_MBSINIT
+ fi
+])
+m4trace:ltdl/m4/mbsinit.m4:28: -1- AC_DEFUN([gl_PREREQ_MBSINIT], [
+ :
+])
+m4trace:ltdl/m4/mbslen.m4:7: -1- AC_DEFUN([gl_MBSLEN], [
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([mbslen])
+ if test $ac_cv_func_mbslen = yes; then
+ HAVE_MBSLEN=1
+ else
+ HAVE_MBSLEN=0
+ fi
+])
+m4trace:ltdl/m4/mbstate_t.m4:15: -1- AC_DEFUN([AC_TYPE_MBSTATE_T], [
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11
+
+ AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+# include <wchar.h>]],
+ [[mbstate_t x; return sizeof x;]])],
+ [ac_cv_type_mbstate_t=yes],
+ [ac_cv_type_mbstate_t=no])])
+ if test $ac_cv_type_mbstate_t = yes; then
+ AC_DEFINE([HAVE_MBSTATE_T], [1],
+ [Define to 1 if <wchar.h> declares mbstate_t.])
+ else
+ AC_DEFINE([mbstate_t], [int],
+ [Define to a type if <wchar.h> does not define.])
+ fi
+])
+m4trace:ltdl/m4/memchr.m4:7: -1- AC_DEFUN_ONCE([gl_FUNC_MEMCHR], [
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+
+ dnl These days, we assume memchr is present. But just in case...
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([memchr])
+ if test $ac_cv_func_memchr = no; then
+ gl_PREREQ_MEMCHR
+ REPLACE_MEMCHR=1
+ fi
+
+ if test $ac_cv_func_memchr = yes; then
+ # Detect platform-specific bugs in some versions of glibc:
+ # memchr should not dereference anything with length 0
+ # http://bugzilla.redhat.com/499689
+ # memchr should not dereference overestimated length after a match
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # Assume that memchr works on platforms that lack mprotect.
+ AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+]], [[
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
+#endif
+ if (fence)
+ {
+ if (memchr (fence, 0, 0))
+ return 1;
+ strcpy (fence - 9, "12345678");
+ if (memchr (fence - 9, 0, 79) != fence - 1)
+ return 2;
+ }
+ return 0;
+]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
+ [dnl Be pessimistic for now.
+ gl_cv_func_memchr_works="guessing no"])])
+ if test "$gl_cv_func_memchr_works" != yes; then
+ gl_PREREQ_MEMCHR
+ REPLACE_MEMCHR=1
+ AC_LIBOBJ([memchr])
+ fi
+ fi
+])
+m4trace:ltdl/m4/memchr.m4:84: -1- AC_DEFUN([gl_PREREQ_MEMCHR], [
+ AC_CHECK_HEADERS([bp-sym.h])
+])
+m4trace:ltdl/m4/memmem.m4:9: -1- AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE], [
+ dnl Persuade glibc <string.h> to declare memmem().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([memmem])
+ AC_CHECK_DECLS_ONCE([memmem])
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ gl_PREREQ_MEMMEM
+])
+m4trace:ltdl/m4/memmem.m4:24: -1- AC_DEFUN([gl_FUNC_MEMMEM], [
+ AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE])
+ if test $ac_cv_have_decl_memmem = yes; then
+ AC_CACHE_CHECK([whether memmem works in linear time],
+ [gl_cv_func_memmem_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+]], [[size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ void *result = 0;
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack memmem. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+ /* Check for quadratic performance. */
+ if (haystack && needle)
+ {
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ }
+ /* Check for empty needle behavior. */
+ return !result || !memmem ("a", 1, 0, 0);]])],
+ [gl_cv_func_memmem_works=yes], [gl_cv_func_memmem_works=no],
+ [dnl Only glibc >= 2.9 and cygwin >= 1.7.0 are known to have a
+ dnl memmem that works in linear time.
+ AC_EGREP_CPP([Lucky user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_MAJOR >= 1007
+ Lucky user
+ #endif
+#endif
+ ],
+ [gl_cv_func_memmem_works=yes],
+ [gl_cv_func_memmem_works="guessing no"])
+ ])
+ ])
+ if test "$gl_cv_func_memmem_works" != yes; then
+ REPLACE_MEMMEM=1
+ AC_LIBOBJ([memmem])
+ fi
+ fi
+])
+m4trace:ltdl/m4/memmem.m4:84: -1- AC_DEFUN([gl_PREREQ_MEMMEM], [:])
+m4trace:ltdl/m4/mkdtemp.m4:8: -1- AC_DEFUN([gt_FUNC_MKDTEMP], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REPLACE_FUNCS([mkdtemp])
+ if test $ac_cv_func_mkdtemp = no; then
+ HAVE_MKDTEMP=0
+ gl_PREREQ_MKDTEMP
+ fi
+])
+m4trace:ltdl/m4/mkdtemp.m4:19: -1- AC_DEFUN([gl_PREREQ_MKDTEMP], [:
+])
+m4trace:ltdl/m4/mkstemp.m4:14: -1- AC_DEFUN([gl_FUNC_MKSTEMP], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_CACHE_CHECK([for working mkstemp],
+ [gl_cv_func_working_mkstemp],
+ [
+ mkdir conftest.mkstemp
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;]])],
+ [gl_cv_func_working_mkstemp=yes],
+ [gl_cv_func_working_mkstemp=no],
+ [gl_cv_func_working_mkstemp=no])
+ rm -rf conftest.mkstemp
+ ])
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+ AC_LIBOBJ([mkstemp])
+ gl_PREREQ_MKSTEMP
+ fi
+])
+m4trace:ltdl/m4/mkstemp.m4:54: -1- AC_DEFUN([gl_PREREQ_MKSTEMP], [
+])
+m4trace:ltdl/m4/mmap-anon.m4:16: -1- AC_DEFUN([gl_FUNC_MMAP_ANON], [
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no])
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ AC_MSG_CHECKING([for MAP_ANONYMOUS])
+ AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+],
+ [gl_have_mmap_anonymous=yes])
+ if test $gl_have_mmap_anonymous != yes; then
+ AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+],
+ [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],
+ [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.])
+ gl_have_mmap_anonymous=yes])
+ fi
+ AC_MSG_RESULT([$gl_have_mmap_anonymous])
+ if test $gl_have_mmap_anonymous = yes; then
+ AC_DEFINE([HAVE_MAP_ANONYMOUS], [1],
+ [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>.])
+ fi
+ fi
+])
+m4trace:ltdl/m4/mode_t.m4:12: -1- AC_DEFUN([gl_PROMOTED_TYPE_MODE_T], [
+ AC_REQUIRE([AC_TYPE_MODE_T])
+ AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [
+ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int',
+ dnl and to itself otherwise. This assumption is not guaranteed by the ISO C
+ dnl standard, but we don't know of any real-world counterexamples.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
+ [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])],
+ [gl_cv_promoted_mode_t='int'],
+ [gl_cv_promoted_mode_t='mode_t'])
+ ])
+ AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t],
+ [Define to the type that is the result of default argument promotions of type mode_t.])
+])
+m4trace:ltdl/m4/multiarch.m4:22: -1- AC_DEFUN_ONCE([gl_MULTIARCH], [
+ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
+ gl_cv_c_multiarch=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+ ]])],
+ [
+ dnl Check for potential -arch flags. It is not universal unless
+ dnl there are at least two -arch flags with different values.
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+ ])
+ if test $gl_cv_c_multiarch = yes; then
+ AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1],
+ [Define if the compiler is building for multiple architectures of Apple platforms at once.])
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+ AC_SUBST([APPLE_UNIVERSAL_BUILD])
+])
+m4trace:ltdl/m4/nl_langinfo.m4:7: -1- AC_DEFUN([gl_FUNC_NL_LANGINFO], [
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ AC_REQUIRE([gl_LANGINFO_H])
+ AC_CHECK_FUNCS_ONCE([nl_langinfo])
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+ AC_DEFINE([REPLACE_NL_LANGINFO], [1],
+ [Define if nl_langinfo exists but is overridden by gnulib.])
+ AC_LIBOBJ([nl_langinfo])
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+ AC_LIBOBJ([nl_langinfo])
+ fi
+])
+m4trace:ltdl/m4/nls.m4:23: -1- AC_DEFUN([AM_NLS], [
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
+m4trace:ltdl/m4/nocrash.m4:18: -1- AC_DEFUN([GL_NOCRASH], [[
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+]])
+m4trace:ltdl/m4/obstack-printf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_OBSTACK_PRINTF_POSIX], [
+ dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_obstack_printf_posix=no
+ AC_CHECK_FUNCS_ONCE([obstack_printf])
+ if test $ac_cv_func_obstack_printf = yes ; then
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # obstack_printf exists and is
+ # already POSIX compliant.
+ gl_cv_func_obstack_printf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_obstack_printf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_OBSTACK_PRINTF
+ fi
+ gl_DECL_OBSTACK_PRINTF
+])
+m4trace:ltdl/m4/obstack-printf.m4:11: -1- AC_DEFUN([gl_FUNC_OBSTACK_PRINTF], [
+ dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([obstack_printf])
+ if test $ac_cv_func_obstack_printf = no ; then
+ gl_REPLACE_OBSTACK_PRINTF
+ fi
+
+ gl_DECL_OBSTACK_PRINTF
+])
+m4trace:ltdl/m4/obstack-printf.m4:25: -1- AC_DEFUN([gl_REPLACE_OBSTACK_PRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([obstack_printf])
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+])
+m4trace:ltdl/m4/obstack-printf.m4:36: -1- AC_DEFUN([gl_DECL_OBSTACK_PRINTF], [
+ AC_CHECK_DECLS_ONCE([obstack_printf])
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+])
+m4trace:ltdl/m4/open.m4:7: -1- AC_DEFUN([gl_FUNC_OPEN], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ gl_REPLACE_OPEN
+ ;;
+ *)
+ dnl open("foo/") should not create a file when the file name has a
+ dnl trailing slash. FreeBSD only has the problem on symlinks.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ AC_CACHE_CHECK([whether open recognizes a trailing slash],
+ [gl_cv_func_open_slash],
+ [# Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_TRY_RUN([
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
+#endif
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ freebsd*) gl_cv_func_open_slash="guessing no" ;;
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl conftest.tmp conftest.lnk
+ ])
+ case "$gl_cv_func_open_slash" in
+ *no)
+ AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if open() fails to recognize a trailing slash.])
+ gl_REPLACE_OPEN
+ ;;
+ esac
+ ;;
+ esac
+])
+m4trace:ltdl/m4/open.m4:60: -1- AC_DEFUN([gl_REPLACE_OPEN], [
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ REPLACE_OPEN=1
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+])
+m4trace:ltdl/m4/open.m4:69: -1- AC_DEFUN([gl_PREREQ_OPEN], [
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+ :
+])
+m4trace:ltdl/m4/pathmax.m4:8: -1- AC_DEFUN([gl_PATHMAX], [
+ dnl Prerequisites of lib/pathmax.h.
+ AC_CHECK_FUNCS_ONCE([pathconf])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
+m4trace:ltdl/m4/pipe.m4:7: -1- AC_DEFUN([gl_PIPE], [
+ dnl Prerequisites of lib/pipe.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+])
+m4trace:ltdl/m4/pipe2.m4:7: -1- AC_DEFUN([gl_FUNC_PIPE2], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ dnl Persuade glibc <unistd.h> to declare pipe2().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS_ONCE([pipe2])
+ if test $ac_cv_func_pipe2 != yes; then
+ HAVE_PIPE2=0
+ fi
+])
+m4trace:ltdl/m4/po.m4:23: -1- AC_DEFUN([AM_PO_SUBDIRS], [
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+m4trace:ltdl/m4/po.m4:218: -1- AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE], [
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+m4trace:ltdl/m4/po.m4:439: -1- AC_DEFUN([AM_XGETTEXT_OPTION_INIT], [
+ XGETTEXT_EXTRA_OPTIONS=
+])
+m4trace:ltdl/m4/po.m4:445: -1- AC_DEFUN([AM_XGETTEXT_OPTION], [
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
+m4trace:ltdl/m4/posix_spawn.m4:8: -1- AC_DEFUN([gl_POSIX_SPAWN], [
+ AC_REQUIRE([gl_POSIX_SPAWN_BODY])
+])
+m4trace:ltdl/m4/posix_spawn.m4:13: -1- AC_DEFUN([gl_POSIX_SPAWN_BODY], [
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([posix_spawn])
+ dnl Assume that when the main function exists, all the others are
+ dnl available as well.
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnp])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_init])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addclose])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_adddup2])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addopen])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_destroy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_init])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getflags])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setflags])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getpgroup])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setpgroup])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getschedparam])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setschedparam])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getschedpolicy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setschedpolicy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getsigdefault])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setsigdefault])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getsigmask])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setsigmask])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_destroy])
+ if test $ac_cv_func_posix_spawn = yes; then
+ gl_POSIX_SPAWN_WORKS
+ case "$gl_cv_func_posix_spawn_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN=1 ;;
+ esac
+ else
+ HAVE_POSIX_SPAWN=0
+ fi
+])
+m4trace:ltdl/m4/posix_spawn.m4:59: -1- AC_DEFUN([gl_POSIX_SPAWN_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether posix_spawn works], [gl_cv_func_posix_spawn_works],
+ [if test $cross_compiling = no; then
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ setvbuf (stdout, NULL, _IOFBF, 0);
+ puts ("This should be seen only once.");
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ if (err == ENOENT)
+ return 0;
+ else
+ {
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ close (ofd[1]);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 127)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
+]])],
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext > conftest.out \
+ && echo 'This should be seen only once.' > conftest.ok \
+ && cmp conftest.out conftest.ok > /dev/null; then
+ gl_cv_func_posix_spawn_works=yes
+ else
+ gl_cv_func_posix_spawn_works=no
+ fi],
+ [gl_cv_func_posix_spawn_works=no])
+ if test $gl_cv_func_posix_spawn_works = yes; then
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+/* Test whether posix_spawn_file_actions_addopen supports filename arguments
+ that contain special characters such as '*'. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "conftest"
+#define DATA_FILENAME "conftest%=*#?"
+
+static int
+parent_main (void)
+{
+ FILE *fp;
+ char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ /* Create a data file with specific contents. */
+ fp = fopen (DATA_FILENAME, "wb");
+ if (fp == NULL)
+ {
+ perror ("cannot create data file");
+ return 1;
+ }
+ fwrite ("Halle Potta", 1, 11, fp);
+ if (fflush (fp) || fclose (fp))
+ {
+ perror ("cannot prepare data file");
+ return 1;
+ }
+
+ /* Avoid reading from our stdin, as it could block. */
+ freopen ("/dev/null", "rb", stdin);
+
+ /* Test whether posix_spawn_file_actions_addopen with this file name
+ actually works, but spawning a child that reads from this file. */
+ actions_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
+ || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ errno = err;
+ perror ("subprocess failed");
+ return 1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ return 1;
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ return 1;
+ }
+ return 0;
+}
+
+static int
+child_main (void)
+{
+ char buf[1024];
+
+ /* See if reading from STDIN_FILENO yields the expected contents. */
+ if (fread (buf, 1, sizeof (buf), stdin) == 11
+ && memcmp (buf, "Halle Potta", 11) == 0)
+ return 0;
+ else
+ return 2;
+}
+
+static void
+cleanup_then_die (int sig)
+{
+ /* Clean up data file. */
+ unlink (DATA_FILENAME);
+
+ /* Re-raise the signal and die from it. */
+ signal (sig, SIG_DFL);
+ raise (sig);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int exitstatus;
+
+ if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
+ {
+ /* This is the parent process. */
+ signal (SIGINT, cleanup_then_die);
+ signal (SIGTERM, cleanup_then_die);
+ #ifdef SIGHUP
+ signal (SIGHUP, cleanup_then_die);
+ #endif
+
+ exitstatus = parent_main ();
+ }
+ else
+ {
+ /* This is the child process. */
+
+ exitstatus = child_main ();
+ }
+ unlink (DATA_FILENAME);
+ return exitstatus;
+}
+]])],
+ [],
+ [gl_cv_func_posix_spawn_works=no])
+ fi
+ else
+ case "$host_os" in
+ aix*) gl_cv_func_posix_spawn_works="guessing no";;
+ *) gl_cv_func_posix_spawn_works="guessing yes";;
+ esac
+ fi
+ ])
+])
+m4trace:ltdl/m4/posix_spawn.m4:369: -1- AC_DEFUN([gl_POSIX_SPAWN_INTERNAL], [
+ AC_LIBOBJ([spawni])
+ dnl Prerequisites of lib/spawni.c.
+ AC_CHECK_HEADERS([paths.h])
+ AC_CHECK_FUNCS([confstr sched_setparam sched_setscheduler setegid seteuid vfork])
+])
+m4trace:ltdl/m4/printf-frexp.m4:9: -1- AC_DEFUN([gl_FUNC_PRINTF_FREXP], [
+ AC_CACHE_CHECK([whether frexp can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;
+ int y;],
+ [return frexp (x, &y) < 1;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = yes; then
+ gl_FUNC_FREXP_WORKS
+ case "$gl_cv_func_frexp_works" in
+ *yes)
+ AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
+ [Define if the frexp function is available in libc.])
+ ;;
+ esac
+ fi
+
+ AC_CACHE_CHECK([whether ldexp can be used without linking with libm],
+ [gl_cv_func_ldexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;
+ int y;],
+ [return ldexp (x, y) < 1;],
+ [gl_cv_func_ldexp_no_libm=yes],
+ [gl_cv_func_ldexp_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexp_no_libm = yes; then
+ AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1],
+ [Define if the ldexp function is available in libc.])
+ fi
+])
+m4trace:ltdl/m4/printf-frexpl.m4:9: -1- AC_DEFUN([gl_FUNC_PRINTF_FREXPL], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ dnl Subset of gl_FUNC_FREXPL_NO_LIBM.
+ AC_CACHE_CHECK([whether frexpl can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;
+ int y;],
+ [return frexpl (x, &y) < 1;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+ gl_FUNC_FREXPL_WORKS
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
+ [Define if the frexpl function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ fi
+
+ AC_CACHE_CHECK([whether ldexpl can be used without linking with libm],
+ [gl_cv_func_ldexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;
+ int y;],
+ [return ldexpl (x, y) < 1;],
+ [gl_cv_func_ldexpl_no_libm=yes],
+ [gl_cv_func_ldexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexpl_no_libm = yes; then
+ gl_FUNC_LDEXPL_WORKS
+ case "$gl_cv_func_ldexpl_works" in
+ *yes)
+ AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
+ [Define if the ldexpl function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ ;;
+ esac
+ fi
+])
+m4trace:ltdl/m4/printf-posix.m4:11: -1- AC_DEFUN([gt_PRINTF_POSIX], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+ gt_cv_func_printf_posix,
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+ [
+ AC_EGREP_CPP([notposix], [
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+ notposix
+#endif
+ ],
+ [gt_cv_func_printf_posix="guessing no"],
+ [gt_cv_func_printf_posix="guessing yes"])
+ ])
+ ])
+ case $gt_cv_func_printf_posix in
+ *yes)
+ AC_DEFINE([HAVE_POSIX_PRINTF], [1],
+ [Define if your printf() function supports format strings with positions.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/printf.m4:11: -1- AC_DEFUN([gl_PRINTF_SIZES_C99], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
+ [gl_cv_func_printf_sizes_c99],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:88: -1- AC_DEFUN([gl_PRINTF_LONG_DOUBLE], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports 'long double' arguments],
+ [gl_cv_func_printf_long_double],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:132: -1- AC_DEFUN([gl_PRINTF_INFINITE], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
+ [gl_cv_func_printf_infinite],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:237: -1- AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE], [
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl The user can set or unset the variable gl_printf_safe to indicate
+ dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
+ if test -n "$gl_printf_safe"; then
+ AC_DEFINE([CHECK_PRINTF_SAFE], [1],
+ [Define if you wish *printf() functions that have a safe handling of
+ non-IEEE-754 'long double' values.])
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
+ [gl_cv_func_printf_infinite_long_double],
+ [
+ AC_TRY_RUN([
+]GL_NOCRASH[
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}],
+ [gl_cv_func_printf_infinite_long_double=yes],
+ [gl_cv_func_printf_infinite_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+])
+m4trace:ltdl/m4/printf.m4:462: -1- AC_DEFUN([gl_PRINTF_DIRECTIVE_A], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
+ [gl_cv_func_printf_directive_a],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ AC_EGREP_CPP([BZ2908], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_a="guessing yes"],
+ [gl_cv_func_printf_directive_a="guessing no"])
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:542: -1- AC_DEFUN([gl_PRINTF_DIRECTIVE_F], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'F' directive],
+ [gl_cv_func_printf_directive_f],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:593: -1- AC_DEFUN([gl_PRINTF_DIRECTIVE_N], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'n' directive],
+ [gl_cv_func_printf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:635: -1- AC_DEFUN([gl_PRINTF_DIRECTIVE_LS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'ls' directive],
+ [gl_cv_func_printf_directive_ls],
+ [
+ AC_TRY_RUN([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ return 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ return 1;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:710: -1- AC_DEFUN([gl_PRINTF_POSITIONS], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
+ [gl_cv_func_printf_positions],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:747: -1- AC_DEFUN([gl_PRINTF_FLAG_GROUPING], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the grouping flag],
+ [gl_cv_func_printf_flag_grouping],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:783: -1- AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
+ [gl_cv_func_printf_flag_leftadjust],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}],
+ [gl_cv_func_printf_flag_leftadjust=yes],
+ [gl_cv_func_printf_flag_leftadjust=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:824: -1- AC_DEFUN([gl_PRINTF_FLAG_ZERO], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the zero flag correctly],
+ [gl_cv_func_printf_flag_zero],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:864: -1- AC_DEFUN([gl_PRINTF_PRECISION], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports large precisions],
+ [gl_cv_func_printf_precision],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:902: -1- AC_DEFUN([gl_PRINTF_ENOMEM], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_MULTIARCH])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
+ [gl_cv_func_printf_enomem],
+ [
+ gl_cv_func_printf_enomem="guessing no"
+ if test "$cross_compiling" = no; then
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+]GL_NOCRASH[
+changequote(,)dnl
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+ dnl A universal build on Apple MacOS X platforms.
+ dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
+ dnl But we need a configuration result that is valid in both modes.
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ fi
+ if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+changequote([,])dnl
+ fi
+ ])
+])
+m4trace:ltdl/m4/printf.m4:1018: -1- AC_DEFUN([gl_SNPRINTF_PRESENCE], [
+ AC_CHECK_FUNCS_ONCE([snprintf])
+])
+m4trace:ltdl/m4/printf.m4:1027: -1- AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
+ [gl_cv_func_snprintf_truncation_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:1104: -1- AC_DEFUN([gl_SNPRINTF_RETVAL_C99], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
+ [gl_cv_func_snprintf_retval_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:1161: -1- AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
+ [gl_cv_func_snprintf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:1226: -1- AC_DEFUN([gl_SNPRINTF_SIZE1], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether snprintf respects a size of 1],
+ [gl_cv_func_snprintf_size1],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}],
+ [gl_cv_func_snprintf_size1=yes],
+ [gl_cv_func_snprintf_size1=no],
+ [gl_cv_func_snprintf_size1="guessing yes"])
+ ])
+])
+m4trace:ltdl/m4/printf.m4:1282: -1- AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
+ [gl_cv_func_vsnprintf_zerosize_c99],
+ [
+ AC_TRY_RUN([
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}],
+ [gl_cv_func_vsnprintf_zerosize_c99=yes],
+ [gl_cv_func_vsnprintf_zerosize_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+m4trace:ltdl/m4/progtest.m4:25: -1- AC_DEFUN([AM_PATH_PROG_WITH_TEST], [
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
+m4trace:ltdl/m4/putenv.m4:12: -1- AC_DEFUN([gl_FUNC_PUTENV], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
+ [gl_cv_func_svid_putenv],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+ ]])],
+ gl_cv_func_svid_putenv=yes,
+ gl_cv_func_svid_putenv=no,
+ dnl When crosscompiling, assume putenv is broken.
+ gl_cv_func_svid_putenv=no)
+ ])
+ if test $gl_cv_func_svid_putenv = no; then
+ REPLACE_PUTENV=1
+ AC_LIBOBJ([putenv])
+ fi
+])
+m4trace:ltdl/m4/quote.m4:8: -1- AC_DEFUN([gl_QUOTE], [
+ AC_LIBOBJ([quote])
+
+ dnl Prerequisites of lib/quote.c.
+ dnl (none)
+])
+m4trace:ltdl/m4/quotearg.m4:7: -1- AC_DEFUN([gl_QUOTEARG], [
+ AC_LIBOBJ([quotearg])
+])
+m4trace:ltdl/m4/rawmemchr.m4:7: -1- AC_DEFUN([gl_FUNC_RAWMEMCHR], [
+ dnl Persuade glibc <string.h> to declare rawmemchr().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([rawmemchr])
+ if test $ac_cv_func_rawmemchr = no; then
+ HAVE_RAWMEMCHR=0
+ gl_PREREQ_RAWMEMCHR
+ fi
+])
+m4trace:ltdl/m4/rawmemchr.m4:21: -1- AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
+m4trace:ltdl/m4/readlink.m4:7: -1- AC_DEFUN([gl_FUNC_READLINK], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([readlink])
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+ AC_LIBOBJ([readlink])
+ gl_PREREQ_READLINK
+ else
+ AC_CACHE_CHECK([whether readlink signature is correct],
+ [gl_cv_decl_readlink_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ /* Cause compilation failure if original declaration has wrong type. */
+ ssize_t readlink (const char *, char *, size_t);]])],
+ [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])])
+ dnl Solaris 9 ignores trailing slash.
+ dnl FreeBSD 7.2 dereferences only one level of links with trailing slash.
+ AC_CACHE_CHECK([whether readlink handles trailing slash correctly],
+ [gl_cv_func_readlink_works],
+ [# We have readlink, so assume ln -s works.
+ ln -s conftest.no-such conftest.link
+ ln -s conftest.link conftest.lnk2
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[char buf[20];
+ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
+ [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
+ [gl_cv_func_readlink_works="guessing no"])
+ rm -f conftest.link conftest.lnk2])
+ if test "$gl_cv_func_readlink_works" != yes; then
+ AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+ fails to recognize a trailing slash.])
+ REPLACE_READLINK=1
+ AC_LIBOBJ([readlink])
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+ AC_LIBOBJ([readlink])
+ fi
+ fi
+])
+m4trace:ltdl/m4/readlink.m4:52: -1- AC_DEFUN([gl_FUNC_READLINK_SEPARATE], [
+ AC_CHECK_FUNCS_ONCE([readlink])
+ gl_PREREQ_READLINK
+])
+m4trace:ltdl/m4/readlink.m4:59: -1- AC_DEFUN([gl_PREREQ_READLINK], [
+ :
+])
+m4trace:ltdl/m4/regex.m4:15: -1- AC_DEFUN([gl_REGEX], [
+ AC_CHECK_HEADERS_ONCE([locale.h])
+
+ AC_ARG_WITH([included-regex],
+ [AS_HELP_STRING([--without-included-regex],
+ [don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).])])
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ AC_CACHE_CHECK([for working re_compile_pattern],
+ [gl_cv_func_re_compile_pattern_working],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+ ]],
+ [[static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;]])],
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ dnl When crosscompiling, assume it is not working.
+ [gl_cv_func_re_compile_pattern_working=no])])
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
+ [Define if you want regoff_t to be at least as wide POSIX requires.])
+ AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
+ [Define to rpl_re_syntax_options if the replacement should be used.])
+ AC_DEFINE([re_set_syntax], [rpl_re_set_syntax],
+ [Define to rpl_re_set_syntax if the replacement should be used.])
+ AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern],
+ [Define to rpl_re_compile_pattern if the replacement should be used.])
+ AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap],
+ [Define to rpl_re_compile_fastmap if the replacement should be used.])
+ AC_DEFINE([re_search], [rpl_re_search],
+ [Define to rpl_re_search if the replacement should be used.])
+ AC_DEFINE([re_search_2], [rpl_re_search_2],
+ [Define to rpl_re_search_2 if the replacement should be used.])
+ AC_DEFINE([re_match], [rpl_re_match],
+ [Define to rpl_re_match if the replacement should be used.])
+ AC_DEFINE([re_match_2], [rpl_re_match_2],
+ [Define to rpl_re_match_2 if the replacement should be used.])
+ AC_DEFINE([re_set_registers], [rpl_re_set_registers],
+ [Define to rpl_re_set_registers if the replacement should be used.])
+ AC_DEFINE([re_comp], [rpl_re_comp],
+ [Define to rpl_re_comp if the replacement should be used.])
+ AC_DEFINE([re_exec], [rpl_re_exec],
+ [Define to rpl_re_exec if the replacement should be used.])
+ AC_DEFINE([regcomp], [rpl_regcomp],
+ [Define to rpl_regcomp if the replacement should be used.])
+ AC_DEFINE([regexec], [rpl_regexec],
+ [Define to rpl_regexec if the replacement should be used.])
+ AC_DEFINE([regerror], [rpl_regerror],
+ [Define to rpl_regerror if the replacement should be used.])
+ AC_DEFINE([regfree], [rpl_regfree],
+ [Define to rpl_regfree if the replacement should be used.])
+ AC_LIBOBJ([regex])
+ gl_PREREQ_REGEX
+ fi
+])
+m4trace:ltdl/m4/regex.m4:220: -1- AC_DEFUN([gl_PREREQ_REGEX], [
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_HEADERS([libintl.h])
+ AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+])
+m4trace:ltdl/m4/rename.m4:16: -1- AC_DEFUN([gl_FUNC_RENAME], [
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([lstat])
+
+ dnl Solaris 10 mistakenly allows rename("file","name/").
+ dnl NetBSD 1.6 mistakenly forbids rename("dir","name/").
+ dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/").
+ dnl The Solaris bug can be worked around without stripping
+ dnl trailing slash, while the NetBSD bug requires stripping;
+ dnl the two conditions can be distinguished by whether hard
+ dnl links are also broken.
+ AC_CACHE_CHECK([whether rename honors trailing slash on destination],
+ [gl_cv_func_rename_slash_dst_works],
+ [rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
+ if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
+#endif
+ ])],
+ [gl_cv_func_rename_slash_dst_works=yes],
+ [gl_cv_func_rename_slash_dst_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_slash_dst_works="guessing no"])
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ ])
+ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
+ [Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6.])
+ fi
+
+ dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
+ dnl Solaris 9 mistakenly allows rename("file/","name").
+ dnl FreeBSD 7.2 mistakenly allows rename("link-to-file/","name").
+ dnl These bugs require stripping trailing slash to avoid corrupting
+ dnl symlinks with a trailing slash.
+ AC_CACHE_CHECK([whether rename honors trailing slash on source],
+ [gl_cv_func_rename_slash_src_works],
+ [rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
+ if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
+#endif
+ ])],
+ [gl_cv_func_rename_slash_src_works=yes],
+ [gl_cv_func_rename_slash_src_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_slash_src_works="guessing no"])
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ ])
+ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
+ [Define if rename does not correctly handle slashes on the source
+ argument, such as on Solaris 9 or cygwin 1.5.])
+ fi
+
+ dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
+ dnl on rename("h1","h2").
+ dnl This bug requires stat'ting targets prior to attempting rename.
+ AC_CACHE_CHECK([whether rename manages hard links correctly],
+ [gl_cv_func_rename_link_works],
+ [rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+]], [if (rename ("conftest.f", "conftest.f1")) return 1;
+ if (unlink ("conftest.f1")) return 2;
+ if (rename ("conftest.f", "conftest.f")) return 3;
+ if (rename ("conftest.f1", "conftest.f1") == 0) return 4;])],
+ [gl_cv_func_rename_link_works=yes],
+ [gl_cv_func_rename_link_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_link_works="guessing no"])
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+ ])
+ if test "x$gl_cv_func_rename_link_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
+ [Define if rename fails to leave hard links alone, as on NetBSD 1.6
+ or Cygwin 1.5.])
+ fi
+
+ dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
+ dnl mingw mistakenly forbids rename("dir1","dir2").
+ dnl These bugs require stripping trailing slash to avoid corrupting
+ dnl symlinks with a trailing slash.
+ AC_CACHE_CHECK([whether rename manages existing destinations correctly],
+ [gl_cv_func_rename_dest_works],
+ [rm -rf conftest.f conftest.d1 conftest.d2
+ touch conftest.f && mkdir conftest.d1 conftest.d2 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
+ if (rename ("conftest.d2", "conftest.f") == 0) return 2;])],
+ [gl_cv_func_rename_dest_works=yes],
+ [gl_cv_func_rename_dest_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_dest_works="guessing no"])
+ rm -rf conftest.f conftest.d1 conftest.d2
+ ])
+ if test "x$gl_cv_func_rename_dest_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
+ [Define if rename does not work when the destination file exists,
+ as on Cygwin 1.5 or Windows.])
+ fi
+])
+m4trace:ltdl/m4/rmdir.m4:7: -1- AC_DEFUN([gl_FUNC_RMDIR], [
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl FIXME: simplify this module in 2010 if no one reports a missing rmdir
+ AC_REPLACE_FUNCS([rmdir])
+ if test $ac_cv_func_rmdir = no; then
+ REPLACE_RMDIR=1
+ # If someone lacks rmdir, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_RMDIR_CHECK" != xyes; then
+ AC_MSG_FAILURE([Your system lacks the rmdir function.
+ Please report this, along with the output of "uname -a", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_RMDIR_CHECK=yes.
+ E.g., ./configure SKIP_RMDIR_CHECK=yes])
+ fi
+ else
+ dnl Detect cygwin 1.5.x bug.
+ AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
+ [mkdir conftest.dir
+ touch conftest.file
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+]], [[return !rmdir ("conftest.file/") || errno != ENOTDIR
+ || !rmdir ("conftest.dir/./");]])],
+ [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
+ [gl_cv_func_rmdir_works="guessing no"])
+ rm -rf conftest.dir conftest.file])
+ if test x"$gl_cv_func_rmdir_works" != xyes; then
+ REPLACE_RMDIR=1
+ AC_LIBOBJ([rmdir])
+ fi
+ fi
+])
+m4trace:ltdl/m4/sched_h.m4:9: -1- AC_DEFUN([gl_SCHED_H], [
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <sched.h>
+ struct sched_param a;
+ int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+ ]])],
+ [SCHED_H=''],
+ [SCHED_H='sched.h'
+
+ gl_CHECK_NEXT_HEADERS([sched.h])
+
+ AC_CHECK_HEADERS_ONCE([sched.h])
+ if test $ac_cv_header_sched_h = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+ AC_SUBST([HAVE_SCHED_H])
+
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [#include <sched.h>])
+ AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+ ])
+ AC_SUBST([SCHED_H])
+])
+m4trace:ltdl/m4/setenv.m4:7: -1- AC_DEFUN([gl_FUNC_SETENV], [
+ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+ AC_LIBOBJ([setenv])
+ fi
+])
+m4trace:ltdl/m4/setenv.m4:16: -1- AC_DEFUN([gl_FUNC_SETENV_SEPARATE], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([setenv])
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ AC_CACHE_CHECK([whether setenv validates arguments],
+ [gl_cv_func_setenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <errno.h>
+ ]], [[
+ if (setenv ("", "", 0) != -1) return 1;
+ if (errno != EINVAL) return 2;
+ if (setenv ("a", "=", 1) != 0) return 3;
+ if (strcmp (getenv ("a"), "=") != 0) return 4;
+ ]])],
+ [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
+ [gl_cv_func_setenv_works="guessing no"])])
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+ AC_LIBOBJ([setenv])
+ fi
+ fi
+ gl_PREREQ_SETENV
+])
+m4trace:ltdl/m4/setenv.m4:44: -1- AC_DEFUN([gl_FUNC_UNSETENV], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_FUNCS([unsetenv])
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ else
+ dnl Some BSDs return void, failing to do error checking.
+ AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
+ [AC_TRY_COMPILE([#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+ AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
+ instead of int.])
+ REPLACE_UNSETENV=1
+ AC_LIBOBJ([unsetenv])
+ fi
+
+ dnl Solaris 10 unsetenv does not remove all copies of a name.
+ AC_CACHE_CHECK([whether unsetenv works on duplicates],
+ [gl_cv_func_unsetenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ ]], [[
+ char entry[] = "b=2";
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry)) return 2;
+ entry[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+ ]])],
+ [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
+ [gl_cv_func_unsetenv_works="guessing no"])])
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
+ AC_LIBOBJ([unsetenv])
+ fi
+ fi
+])
+m4trace:ltdl/m4/setenv.m4:96: -1- AC_DEFUN([gl_PREREQ_SETENV], [
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_HEADERS([search.h])
+ AC_CHECK_FUNCS([tsearch])
+])
+m4trace:ltdl/m4/setenv.m4:106: -1- AC_DEFUN([gl_PREREQ_UNSETENV], [
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+])
+m4trace:ltdl/m4/sig_atomic_t.m4:7: -1- AC_DEFUN([gt_TYPE_SIG_ATOMIC_T], [
+ AC_CHECK_TYPES([sig_atomic_t], ,
+ [AC_DEFINE([sig_atomic_t], [int],
+ [Define as an integer type suitable for memory locations that can be
+ accessed atomically even in the presence of asynchnonous signals.])],
+ [#include <signal.h>])
+])
+m4trace:ltdl/m4/sigaction.m4:8: -1- AC_DEFUN([gl_SIGACTION], [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([sigaction])
+ if test $ac_cv_func_sigaction = yes; then
+ AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+ [[#include <signal.h>]])
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+ AC_LIBOBJ([sigaction])
+ gl_PREREQ_SIGACTION
+ fi
+])
+m4trace:ltdl/m4/sigaction.m4:26: -1- AC_DEFUN([gl_PREREQ_SIGACTION], [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
+ AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
+ AC_CHECK_TYPES([siginfo_t], [], [], [[
+#include <signal.h>
+ ]])
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+])
+m4trace:ltdl/m4/sigaction.m4:42: -1- AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:ltdl/m4/signal_h.m4:7: -1- AC_DEFUN([gl_SIGNAL_H], [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([signal.h])
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ AC_CHECK_TYPE([volatile sig_atomic_t], [],
+ [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
+#include <signal.h>
+ ]])
+ AC_REQUIRE([AC_TYPE_UID_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+])
+m4trace:ltdl/m4/signal_h.m4:26: -1- AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/signal_h.m4:33: -1- AC_DEFUN([gl_SIGNAL_H_DEFAULTS], [
+ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+])
+m4trace:ltdl/m4/signalblocking.m4:12: -1- AC_DEFUN([gl_SIGNALBLOCKING], [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ signals_not_posix=
+ AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
+ if test -z "$signals_not_posix"; then
+ AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+ fi
+])
+m4trace:ltdl/m4/signalblocking.m4:28: -1- AC_DEFUN([gl_PREREQ_SIGPROCMASK], [
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
+ dnl the sigset_t type.
+ AC_SUBST([HAVE_SIGSET_T])
+])
+m4trace:ltdl/m4/signbit.m4:7: -1- AC_DEFUN([gl_SIGNBIT], [
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+/* If signbit is defined as a function, don't use it, since calling it for
+ 'float' or 'long double' arguments would involve conversions.
+ If signbit is not declared at all but exists as a library function, don't
+ use it, since the prototype may not match.
+ If signbit is not declared at all but exists as a compiler built-in, don't
+ use it, since it's preferable to use __builtin_signbit* (no warnings,
+ no conversions). */
+#ifndef signbit
+# error "signbit should be a macro"
+#endif
+#include <string.h>
+]gl_SIGNBIT_TEST_PROGRAM
+, [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no],
+ [gl_cv_func_signbit="guessing no"])
+ ])
+ dnl GCC 4.0 and newer provides three built-ins for signbit.
+ dnl They can be used without warnings, also in C++, regardless of <math.h>.
+ dnl But they may expand to calls to functions, which may or may not be in
+ dnl libc.
+ AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc],
+ [
+ AC_TRY_RUN([
+#if __GNUC__ >= 4
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+#else
+# error "signbit should be three compiler built-ins"
+#endif
+#include <string.h>
+]gl_SIGNBIT_TEST_PROGRAM
+, [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no],
+ [gl_cv_func_signbit_gcc="guessing no"])
+ ])
+ dnl Use the compiler built-ins whenever possible, because they are more
+ dnl efficient than the system library functions (if they exist).
+ if test "$gl_cv_func_signbit_gcc" = yes; then
+ REPLACE_SIGNBIT_USING_GCC=1
+ else
+ if test "$gl_cv_func_signbit" != yes; then
+ REPLACE_SIGNBIT=1
+ AC_LIBOBJ([signbitf])
+ AC_LIBOBJ([signbitd])
+ AC_LIBOBJ([signbitl])
+ gl_FLOAT_SIGN_LOCATION
+ gl_DOUBLE_SIGN_LOCATION
+ gl_LONG_DOUBLE_SIGN_LOCATION
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ dnl Test whether copysignf() is declared.
+ AC_CHECK_DECLS([copysignf], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ dnl Test whether copysignf() can be used without libm.
+ AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
+ [gl_cv_func_copysignf_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ float x, y;],
+ [return copysignf (x, y) < 0;],
+ [gl_cv_func_copysignf_no_libm=yes],
+ [gl_cv_func_copysignf_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
+ [Define if the copysignf function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ dnl Test whether copysign() is declared.
+ AC_CHECK_DECLS([copysign], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ dnl Test whether copysign() can be used without libm.
+ AC_CACHE_CHECK([whether copysign can be used without linking with libm],
+ [gl_cv_func_copysign_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x, y;],
+ [return copysign (x, y) < 0;],
+ [gl_cv_func_copysign_no_libm=yes],
+ [gl_cv_func_copysign_no_libm=no])
+ ])
+ if test $gl_cv_func_copysign_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
+ [Define if the copysign function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ dnl Test whether copysignl() is declared.
+ AC_CHECK_DECLS([copysignl], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ dnl Test whether copysignl() can be used without libm.
+ AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
+ [gl_cv_func_copysignl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x, y;],
+ [return copysignl (x, y) < 0;],
+ [gl_cv_func_copysignl_no_libm=yes],
+ [gl_cv_func_copysignl_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
+ [Define if the copysignl function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+m4trace:ltdl/m4/signbit.m4:126: -1- AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+]])
+m4trace:ltdl/m4/signbit.m4:194: -1- AC_DEFUN([gl_FLOAT_SIGN_LOCATION], [
+ gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT])
+])
+m4trace:ltdl/m4/signbit.m4:199: -1- AC_DEFUN([gl_DOUBLE_SIGN_LOCATION], [
+ gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL])
+])
+m4trace:ltdl/m4/signbit.m4:204: -1- AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION], [
+ gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL])
+])
+m4trace:ltdl/m4/signbit.m4:209: -1- AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION], [
+ AC_CACHE_CHECK([where to find the sign bit in a '$1'],
+ [$2],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { $1 value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0$3 };
+static memory_float minus = { -1.0$3 };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+ ],
+ [$2=`cat conftest.out`],
+ [$2="unknown"],
+ [
+ dnl When cross-compiling, we don't know. It depends on the
+ dnl ABI and compiler version. There are too many cases.
+ $2="unknown"
+ ])
+ rm -f conftest.out
+ ])
+ case "$$2" in
+ word*bit*)
+ word=`echo "$$2" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$$2" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word],
+ [Define as the word index where to find the sign of '$1'.])
+ AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit],
+ [Define as the bit index in the word where to find the sign of '$1'.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/size_max.m4:9: -1- AC_DEFUN([gl_SIZE_MAX], [
+ AC_CHECK_HEADERS([stdint.h])
+ dnl First test whether the system already has SIZE_MAX.
+ AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
+ gl_cv_size_max=
+ AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], [gl_cv_size_max=yes])
+ if test -z "$gl_cv_size_max"; then
+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+ dnl than the type 'unsigned long'. Try hard to find a definition that can
+ dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+ AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
+ [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+ AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
+ [#include <stddef.h>], [fits_in_uint=])
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+ AC_TRY_COMPILE([#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+ ], [], [fits_in_uint=0])
+ fi
+ dnl We cannot use 'expr' to simplify this expression, because 'expr'
+ dnl works only with 'long' integers in the host environment, while we
+ dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ dnl Shouldn't happen, but who knows...
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+ ])
+ if test "$gl_cv_size_max" != yes; then
+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+ fi
+ dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
+ dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
+ dnl #define by AC_DEFINE_UNQUOTED.
+ AH_VERBATIM([SIZE_MAX],
+[/* Define as the maximum value of type 'size_t', if the system doesn't define
+ it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+])
+m4trace:ltdl/m4/snprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_SNPRINTF_POSIX], [
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_snprintf_posix=no
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_TRUNCATION_C99
+ gl_SNPRINTF_RETVAL_C99
+ gl_SNPRINTF_DIRECTIVE_N
+ gl_SNPRINTF_SIZE1
+ gl_VSNPRINTF_ZEROSIZE_C99
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ case "$gl_cv_func_snprintf_truncation_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_retval_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_directive_n" in
+ *yes)
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ case "$gl_cv_func_vsnprintf_zerosize_c99" in
+ *yes)
+ # snprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_snprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_SNPRINTF
+ fi
+])
+m4trace:ltdl/m4/snprintf.m4:7: -1- AC_DEFUN([gl_FUNC_SNPRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_cv_func_snprintf_usable=no
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_SIZE1
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+ gl_REPLACE_SNPRINTF
+ fi
+ AC_CHECK_DECLS_ONCE([snprintf])
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+])
+m4trace:ltdl/m4/snprintf.m4:29: -1- AC_DEFUN([gl_REPLACE_SNPRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ gl_PREREQ_SNPRINTF
+])
+m4trace:ltdl/m4/snprintf.m4:40: -1- AC_DEFUN([gl_PREREQ_SNPRINTF], [:])
+m4trace:ltdl/m4/spawn_h.m4:9: -1- AC_DEFUN([gl_SPAWN_H], [
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+
+ dnl <spawn.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([spawn.h])
+
+ AC_CHECK_HEADERS_ONCE([spawn.h])
+ if test $ac_cv_header_spawn_h = yes; then
+ HAVE_SPAWN_H=1
+ AC_CHECK_TYPES([posix_spawnattr_t], [], [HAVE_POSIX_SPAWNATTR_T=0], [[
+#include <spawn.h>
+ ]])
+ AC_CHECK_TYPES([posix_spawn_file_actions_t], [],
+ [HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0], [[
+#include <spawn.h>
+ ]])
+ else
+ HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+ gl_REPLACE_SPAWN_H
+ fi
+ AC_SUBST([HAVE_SPAWN_H])
+
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <spawn.h>
+ ]], [posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy
+ posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault
+ posix_spawnattr_getsigmask posix_spawnattr_setsigmask
+ posix_spawnattr_getflags posix_spawnattr_setflags
+ posix_spawnattr_getpgroup posix_spawnattr_setpgroup
+ posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy
+ posix_spawnattr_getschedparam posix_spawnattr_setschedparam
+ posix_spawn_file_actions_init posix_spawn_file_actions_destroy
+ posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose
+ posix_spawwn_file_actions_adddup2])
+])
+m4trace:ltdl/m4/spawn_h.m4:54: -1- AC_DEFUN([gl_REPLACE_SPAWN_H], [
+ dnl This is a no-op, because <spawn.h> is always overridden.
+ :
+])
+m4trace:ltdl/m4/spawn_h.m4:60: -1- AC_DEFUN([gl_SPAWN_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/spawn_h.m4:67: -1- AC_DEFUN([gl_SPAWN_H_DEFAULTS], [
+ GNULIB_POSIX_SPAWN=0; AC_SUBST([GNULIB_POSIX_SPAWN])
+ GNULIB_POSIX_SPAWNP=0; AC_SUBST([GNULIB_POSIX_SPAWNP])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY])
+ GNULIB_POSIX_SPAWNATTR_INIT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_INIT])
+ GNULIB_POSIX_SPAWNATTR_GETFLAGS=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETFLAGS])
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETFLAGS])
+ GNULIB_POSIX_SPAWNATTR_GETPGROUP=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETPGROUP])
+ GNULIB_POSIX_SPAWNATTR_SETPGROUP=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETPGROUP])
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM])
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM])
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY])
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY])
+ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT])
+ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT])
+ GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGMASK])
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGMASK])
+ GNULIB_POSIX_SPAWNATTR_DESTROY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_DESTROY])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SPAWN=1; AC_SUBST([HAVE_POSIX_SPAWN])
+ HAVE_POSIX_SPAWNATTR_T=1; AC_SUBST([HAVE_POSIX_SPAWNATTR_T])
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+ AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+ REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN])
+])
+m4trace:ltdl/m4/sprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_SPRINTF_POSIX], [
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_sprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # sprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_sprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_sprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_SPRINTF
+ fi
+])
+m4trace:ltdl/m4/sprintf-posix.m4:100: -1- AC_DEFUN([gl_REPLACE_SPRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([sprintf])
+ REPLACE_SPRINTF=1
+ gl_PREREQ_SPRINTF
+])
+m4trace:ltdl/m4/sprintf-posix.m4:108: -1- AC_DEFUN([gl_PREREQ_SPRINTF], [:])
+m4trace:ltdl/m4/ssize_t.m4:10: -1- AC_DEFUN([gt_TYPE_SSIZE_T], [
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ [AC_TRY_COMPILE([#include <sys/types.h>],
+ [int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+ if test $gt_cv_ssize_t = no; then
+ AC_DEFINE([ssize_t], [int],
+ [Define as a signed type of the same size as size_t.])
+ fi
+])
+m4trace:ltdl/m4/stackovf.m4:26: -1- AC_DEFUN([M4_SYS_STACKOVF], [AC_PREREQ([2.60])dnl We use the _ONCE variants
+AC_REQUIRE([AC_TYPE_SIGNAL])dnl
+
+AC_CHECK_HEADERS_ONCE([siginfo.h])
+AC_CHECK_FUNCS_ONCE([sigaction sigaltstack sigstack sigvec])
+AC_CHECK_MEMBERS([stack_t.ss_sp], [], [],
+[[#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+]])
+
+# Code from Jim Avera <jima@netcom.com>.
+# stackovf.c requires:
+# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
+# 2. Either sigaltstack or sigstack
+# 3. getrlimit, including support for RLIMIT_STACK
+AC_CACHE_CHECK([if stack overflow is detectable], [M4_cv_use_stackovf],
+[M4_cv_use_stackovf=no
+if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
+ if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <sys/time.h>
+#include <sys/resource.h>
+#include <signal.h>
+]], [[struct rlimit r; getrlimit (RLIMIT_STACK, &r);
+#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
+ && (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
+choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
+#endif
+]])], [M4_cv_use_stackovf=yes])
+ fi
+fi])
+
+AM_CONDITIONAL([STACKOVF], [test "$M4_cv_use_stackovf" = yes])
+if test "$M4_cv_use_stackovf" = yes; then
+ AC_DEFINE([USE_STACKOVF], [1],
+ [Define to 1 if using stack overflow detection.])
+ AC_CHECK_TYPES([rlim_t], [],
+ [AC_DEFINE([rlim_t], [int],
+ [Define to int if rlim_t is not defined in sys/resource.h])],
+ [[#include <sys/resource.h>
+]])
+ AC_CHECK_TYPES([stack_t], [],
+ [AC_DEFINE([stack_t], [struct sigaltstack],
+ [Define to struct sigaltstack if stack_t is not in signal.h])],
+ [[#include <signal.h>
+]])
+ AC_CHECK_TYPES([sigcontext], [], [], [[#include <signal.h>
+]])
+ AC_CHECK_TYPES([siginfo_t], [], [], [[#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+]])
+ AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], [], [],
+[[#include <signal.h>
+]])
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <signal.h>
+]],
+ [[struct sigaltstack x; x.ss_base = 0;]])],
+ [AC_DEFINE([ss_sp], [ss_base],
+ [Define to ss_base if stack_t has ss_base instead of ss_sp.])])
+fi
+])
+m4trace:ltdl/m4/stat.m4:9: -1- AC_DEFUN([gl_FUNC_STAT], [
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([lstat])
+ dnl mingw is the only known platform where stat(".") and stat("./") differ
+ AC_CACHE_CHECK([whether stat handles trailing slashes on directories],
+ [gl_cv_func_stat_dir_slash],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
+]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
+ [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no],
+ [case $host_os in
+ mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+ *) gl_cv_func_stat_dir_slash="guessing yes";;
+ esac])])
+ dnl Solaris 9 mistakenly succeeds on stat("file/")
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+ AC_CACHE_CHECK([whether stat handles trailing slashes on files],
+ [gl_cv_func_stat_file_slash],
+ [touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
+]], [[struct stat st;
+ if (!stat ("conftest.tmp/", &st)) return 1;
+#if HAVE_LSTAT
+ if (!stat ("conftest.lnk/", &st)) return 2;
+#endif
+ ]])],
+ [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
+ [gl_cv_func_stat_file_slash="guessing no"])
+ rm -f conftest.tmp conftest.lnk])
+ case $gl_cv_func_stat_dir_slash in
+ *no) REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs
+ help when passed a directory name with a trailing slash]);;
+ esac
+ case $gl_cv_func_stat_file_slash in
+ *no) REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+ help when passed a file name with a trailing slash]);;
+ esac
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ dnl Prerequisites of lib/stat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ fi
+])
+m4trace:ltdl/m4/stdarg.m4:10: -1- AC_DEFUN([gl_STDARG_H], [
+ STDARG_H=''; AC_SUBST([STDARG_H])
+ NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
+ AC_MSG_CHECKING([for va_copy])
+ AC_CACHE_VAL([gl_cv_func_va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+],
+ [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
+ AC_MSG_RESULT([$gl_cv_func_va_copy])
+ if test $gl_cv_func_va_copy = no; then
+ dnl Provide a substitute.
+ dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
+ dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
+ dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
+ dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
+ dnl approach on other platforms, because <stdarg.h> often defines only
+ dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
+ dnl not work in this situation.
+ AC_EGREP_CPP([vaccine],
+ [#if defined _AIX && !defined __GNUC__
+ AIX vaccine
+ #endif
+ ], [gl_aixcc=yes], [gl_aixcc=no])
+ if test $gl_aixcc = yes; then
+ dnl Provide a substitute <stdarg.h> file.
+ STDARG_H=stdarg.h
+ gl_CHECK_NEXT_HEADERS([stdarg.h])
+ dnl Fallback for the case when <stdarg.h> contains only macro definitions.
+ if test "$gl_cv_next_stdarg_h" = '""'; then
+ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+ NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+ fi
+ else
+ dnl Provide a substitute in <config.h>, either __va_copy or as a simple
+ dnl assignment.
+ gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+ [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+ if test $gl_cv_func___va_copy = yes; then
+ AC_DEFINE([va_copy], [__va_copy],
+ [Define as a macro for copying va_list variables.])
+ else
+ AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))])
+ AC_DEFINE([va_copy], [gl_va_copy],
+ [Define as a macro for copying va_list variables.])
+ fi
+ fi
+ fi
+])
+m4trace:ltdl/m4/stdbool.m4:10: -1- AC_DEFUN([AM_STDBOOL_H], [
+ AC_REQUIRE([AC_HEADER_STDBOOL])
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+ AC_SUBST([STDBOOL_H])
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+ AC_SUBST([HAVE__BOOL])
+])
+m4trace:ltdl/m4/stdbool.m4:32: -1- AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+m4trace:ltdl/m4/stdbool.m4:37: -1- AC_DEFUN([AC_HEADER_STDBOOL], [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+ [ac_cv_header_stdbool_h],
+ [AC_TRY_COMPILE(
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+ ],
+ [
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
+ AC_CHECK_TYPES([_Bool])
+ if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
+ fi])
+m4trace:ltdl/m4/stddef_h.m4:8: -1- AC_DEFUN([gl_STDDEF_H], [
+ AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ if test $gt_cv_c_wchar_t = no; then
+ HAVE_WCHAR_T=0
+ STDDEF_H=stddef.h
+ fi
+ AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
+ [gl_cv_decl_null_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ int test[2 * (sizeof NULL == sizeof (void *)) -1];
+]])],
+ [gl_cv_decl_null_works=yes],
+ [gl_cv_decl_null_works=no])])
+ if test $gl_cv_decl_null_works = no; then
+ REPLACE_NULL=1
+ STDDEF_H=stddef.h
+ fi
+ if test -n "$STDDEF_H"; then
+ gl_CHECK_NEXT_HEADERS([stddef.h])
+ fi
+])
+m4trace:ltdl/m4/stddef_h.m4:32: -1- AC_DEFUN([gl_STDDEF_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/stddef_h.m4:39: -1- AC_DEFUN([gl_STDDEF_H_DEFAULTS], [
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
+ HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
+ STDDEF_H=''; AC_SUBST([STDDEF_H])
+])
+m4trace:ltdl/m4/stdint.m4:10: -1- AC_DEFUN([gl_STDINT_H], [
+ AC_PREREQ([2.59])dnl
+
+ dnl Check for long long int and unsigned long long int.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_LONG_LONG_INT])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+
+ dnl Check for <inttypes.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_INTTYPES_H])
+
+ dnl Check for <sys/types.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_TYPES_H])
+
+ gl_CHECK_NEXT_HEADERS([stdint.h])
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+ AC_SUBST([HAVE_STDINT_H])
+
+ dnl Now see whether we need a substitute <stdint.h>.
+ if test $ac_cv_header_stdint_h = yes; then
+ AC_CACHE_CHECK([whether stdint.h conforms to C99],
+ [gl_cv_header_working_stdint_h],
+ [gl_cv_header_working_stdint_h=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+]
+gl_STDINT_INCLUDES
+[
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+ ]])],
+ [dnl Determine whether the various *_MIN, *_MAX macros are usable
+ dnl in preprocessor expression. We could do it by compiling a test
+ dnl program for each of these macros. It is faster to run a program
+ dnl that inspects the macro expansion.
+ dnl This detects a bug on HP-UX 11.23/ia64.
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+]], [[
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+]])],
+ [gl_cv_header_working_stdint_h=yes],
+ [],
+ [dnl When cross-compiling, assume it works.
+ gl_cv_header_working_stdint_h=yes
+ ])
+ ])
+ ])
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+
+ gl_STDINT_TYPE_PROPERTIES
+ STDINT_H=stdint.h
+ fi
+ AC_SUBST([STDINT_H])
+])
+m4trace:ltdl/m4/stdint.m4:305: -1- AC_DEFUN([gl_STDINT_BITSIZEOF], [
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to the number of bits in type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
+ [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
+ [$2
+#include <limits.h>], [result=unknown])
+ eval gl_cv_bitsizeof_${gltype}=\$result
+ ])
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
+ dnl do a syntax check even on unused #if conditions and give an error
+ dnl on valid C code like this:
+ dnl #if 0
+ dnl # if > 32
+ dnl # endif
+ dnl #endif
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+m4trace:ltdl/m4/stdint.m4:343: -1- AC_DEFUN([gl_CHECK_TYPES_SIGNED], [
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to 1 if ']gltype[' is a signed integer type.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+ result=yes, result=no)
+ eval gl_cv_type_${gltype}_signed=\$result
+ ])
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+m4trace:ltdl/m4/stdint.m4:376: -1- AC_DEFUN([gl_INTEGER_TYPE_SUFFIX], [
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+ [Define to l, ll, u, ul, ull, etc., as suitable for
+ constants of type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for $gltype integer literal suffix],
+ [gl_cv_type_${gltype}_suffix],
+ [eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ extern $gltype foo;
+ extern $gltype1 foo;]])],
+ [eval gl_cv_type_${gltype}_suffix=\$glsuf])
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done])
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+])
+m4trace:ltdl/m4/stdint.m4:426: -1- AC_DEFUN([gl_STDINT_INCLUDES], [[
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+]])
+m4trace:ltdl/m4/stdint.m4:442: -1- AC_DEFUN([gl_STDINT_TYPE_PROPERTIES], [
+ AC_REQUIRE([gl_MULTIARCH])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_STDINT_BITSIZEOF([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+])
+m4trace:ltdl/m4/stdint_h.m4:12: -1- AC_DEFUN([gl_AC_HEADER_STDINT_H], [
+ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ [gl_cv_header_stdint_h=yes],
+ [gl_cv_header_stdint_h=no])])
+ if test $gl_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
+m4trace:ltdl/m4/stdio-safer.m4:7: -1- AC_DEFUN([gl_FOPEN_SAFER], [
+ AC_LIBOBJ([fopen-safer])
+])
+m4trace:ltdl/m4/stdio-safer.m4:12: -1- AC_DEFUN([gl_FREOPEN_SAFER], [
+ AC_LIBOBJ([freopen-safer])
+])
+m4trace:ltdl/m4/stdio-safer.m4:17: -1- AC_DEFUN([gl_POPEN_SAFER], [
+ AC_LIBOBJ([popen-safer])
+])
+m4trace:ltdl/m4/stdio-safer.m4:22: -1- AC_DEFUN([gl_TMPFILE_SAFER], [
+ AC_LIBOBJ([tmpfile-safer])
+])
+m4trace:ltdl/m4/stdio_h.m4:7: -1- AC_DEFUN([gl_STDIO_H], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_CHECK_NEXT_HEADERS([stdio.h])
+ dnl No need to create extra modules for these functions. Everyone who uses
+ dnl <stdio.h> likely needs them.
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+ dnl This ifdef is just an optimization, to avoid performing a configure
+ dnl check whose result is not used. It does not make the test of
+ dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
+ AC_LIBOBJ([stdio-write])
+ fi
+ ])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+ ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+ snprintf vdprintf vsnprintf])
+])
+m4trace:ltdl/m4/stdio_h.m4:43: -1- AC_DEFUN([gl_STDIO_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/stdio_h.m4:50: -1- AC_DEFUN([gl_STDIO_H_DEFAULTS], [
+ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF])
+ GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE])
+ GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
+ GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
+ GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF])
+ GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
+ GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE])
+ GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC])
+ GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS])
+ GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
+ GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
+ GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
+ GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
+ GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
+ GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE])
+ GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
+ GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
+ GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN])
+ GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF])
+ GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
+ GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC])
+ GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR])
+ GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS])
+ GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE])
+ GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME])
+ GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT])
+ GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
+ GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
+ GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+ GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
+ GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF])
+ GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF])
+ GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
+ GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF])
+ GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
+ GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
+ GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE])
+ HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
+ HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
+ HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
+ HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
+ HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
+ HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT])
+ HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
+ HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
+ REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF])
+ REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE])
+ REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
+ REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
+ REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
+ REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE])
+ REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
+ REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
+ REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
+ REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL])
+ REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO])
+ REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM])
+ REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
+ REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF])
+ REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR])
+ REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN])
+ REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
+ REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE])
+ REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME])
+ REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT])
+ REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
+ REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
+ REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+ REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
+ REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF])
+ REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
+ REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
+ REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
+ REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
+])
+m4trace:ltdl/m4/stdio_h.m4:136: -1- AC_DEFUN([gl_STDIN_LARGE_OFFSET], [
+ AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+ [gl_cv_var_stdin_large_offset],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif]])],
+ [gl_cv_var_stdin_large_offset=yes],
+ [gl_cv_var_stdin_large_offset=no])])
+])
+m4trace:ltdl/m4/stdlib-safer.m4:7: -1- AC_DEFUN([gl_STDLIB_SAFER], [
+ AC_LIBOBJ([mkstemp-safer])
+])
+m4trace:ltdl/m4/stdlib_h.m4:7: -1- AC_DEFUN([gl_STDLIB_H], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([stdlib.h])
+ AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+ AC_SUBST([HAVE_RANDOM_H])
+ AC_CHECK_TYPES([struct random_data],
+ [], [HAVE_STRUCT_RANDOM_DATA=0],
+ [[#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+ ]])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+ ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp
+ mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r
+ setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv])
+])
+m4trace:ltdl/m4/stdlib_h.m4:41: -1- AC_DEFUN([gl_STDLIB_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/stdlib_h.m4:48: -1- AC_DEFUN([gl_STDLIB_H_DEFAULTS], [
+ GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
+ GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
+ GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
+ GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
+ GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
+ GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
+ GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
+ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
+ GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
+ GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
+ GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+ GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
+ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
+ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
+ GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
+ GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
+ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
+ HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
+ HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
+ HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
+ HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
+ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
+ HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
+ HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
+ HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
+ HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
+ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
+ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
+ HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
+ HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
+ HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
+ HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
+ REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+ REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
+ REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
+ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
+])
+m4trace:ltdl/m4/strchrnul.m4:7: -1- AC_DEFUN([gl_FUNC_STRCHRNUL], [
+ dnl Persuade glibc <string.h> to declare strchrnul().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([strchrnul])
+ if test $ac_cv_func_strchrnul = no; then
+ HAVE_STRCHRNUL=0
+ gl_PREREQ_STRCHRNUL
+ fi
+])
+m4trace:ltdl/m4/strchrnul.m4:21: -1- AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
+m4trace:ltdl/m4/strdup.m4:9: -1- AC_DEFUN([gl_FUNC_STRDUP], [
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([strdup])
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+m4trace:ltdl/m4/strdup.m4:20: -1- AC_DEFUN([gl_FUNC_STRDUP_POSIX], [
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ AC_LIBOBJ([strdup])
+ else
+ AC_REPLACE_FUNCS([strdup])
+ fi
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+m4trace:ltdl/m4/strdup.m4:38: -1- AC_DEFUN([gl_PREREQ_STRDUP], [:])
+m4trace:ltdl/m4/strerror.m4:7: -1- AC_DEFUN([gl_FUNC_STRERROR], [
+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
+ [Define this to 1 if strerror is broken.])
+ fi
+])
+m4trace:ltdl/m4/strerror.m4:18: -1- AC_DEFUN([gl_FUNC_STRERROR_SEPARATE], [
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+ [dnl Assume crossbuild works if it compiles.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no])
+ ])
+ ])
+ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+ dnl to <errno.h>. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+ gl_PREREQ_STRERROR
+ fi
+])
+m4trace:ltdl/m4/strerror.m4:58: -1- AC_DEFUN([gl_PREREQ_STRERROR], [
+ AC_CHECK_DECLS([strerror])
+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h != yes; then
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([winsock2.h])
+ fi
+])
+m4trace:ltdl/m4/string_h.m4:12: -1- AC_DEFUN([gl_HEADER_STRING_H], [
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+m4trace:ltdl/m4/string_h.m4:19: -1- AC_DEFUN([gl_HEADER_STRING_H_BODY], [
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([string.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <string.h>
+ ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
+ strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp])
+])
+m4trace:ltdl/m4/string_h.m4:33: -1- AC_DEFUN([gl_STRING_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/string_h.m4:40: -1- AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS], [
+ GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
+ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
+ GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
+ GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
+ GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
+ GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
+ GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
+ GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
+ GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
+ GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
+ GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
+ GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
+ GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
+ GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
+ GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
+ GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
+ GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
+ GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
+ GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
+ GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
+ GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
+ GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
+ GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
+ GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
+ GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
+ GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
+ GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
+ GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
+ GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
+ GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+ HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
+ HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
+ HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
+ REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
+ REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
+ UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
+])
+m4trace:ltdl/m4/strndup.m4:7: -1- AC_DEFUN([gl_FUNC_STRNDUP], [
+ dnl Persuade glibc <string.h> to declare strndup().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strndup])
+ AC_CHECK_FUNCS_ONCE([strndup])
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ if test $ac_cv_func_strndup = yes; then
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <string.h>
+ #include <stdlib.h>]], [[
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';]])],
+ [gl_cv_func_strndup_works=yes],
+ [gl_cv_func_strndup_works=no],
+ [case $host_os in
+ aix*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac])])
+ case $gl_cv_func_strndup_works in
+ *no)
+ REPLACE_STRNDUP=1
+ AC_LIBOBJ([strndup])
+ ;;
+ esac
+ else
+ AC_LIBOBJ([strndup])
+ fi
+])
+m4trace:ltdl/m4/strnlen.m4:8: -1- AC_DEFUN([gl_FUNC_STRNLEN], [
+ dnl Persuade glibc <string.h> to declare strnlen().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strnlen])
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ AC_FUNC_STRNLEN
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doesn't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ([strnlen])
+ AC_DEFINE([strnlen], [rpl_strnlen],
+ [Define to rpl_strnlen if the replacement function should be used.])
+ gl_PREREQ_STRNLEN
+ fi
+])
+m4trace:ltdl/m4/strnlen.m4:32: -1- AC_DEFUN([gl_PREREQ_STRNLEN], [:])
+m4trace:ltdl/m4/strtod.m4:7: -1- AC_DEFUN([gl_FUNC_STRTOD], [
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_FUNC_STRTOD
+ dnl Note: AC_FUNC_STRTOD does AC_LIBOBJ([strtod]).
+ if test $ac_cv_func_strtod = no; then
+ HAVE_STRTOD=0
+ REPLACE_STRTOD=1
+ gl_PREREQ_STRTOD
+ else
+ AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <math.h>
+#include <errno.h>
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+]], [[
+ {
+ /* Older glibc and Cygwin mis-parse "-0x". */
+ const char *string = "-0x";
+ char *term;
+ double value = strtod (string, &term);
+ double zero = 0.0;
+ if (1.0 / value != -1.0 / zero || term != (string + 2))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
+ but mistakenly sets errno. */
+ const char *string = "inf";
+ char *term;
+ double value;
+ errno = 0;
+ value = strtod (string, &term);
+ if (value != HUGE_VAL || term != (string + 3) || errno)
+ return 1;
+ }
+ {
+ /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
+ const char *string = "nan()";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 5))
+ return 1;
+ }
+ {
+ /* darwin 10.6.1 misparses "nan(". */
+ const char *string = "nan(";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 3))
+ return 1;
+ }
+]])],
+ [gl_cv_func_strtod_works=yes],
+ [gl_cv_func_strtod_works=no],
+ [gl_cv_func_strtod_works="guessing no"])])
+ if test "$gl_cv_func_strtod_works" != yes; then
+ REPLACE_STRTOD=1
+ gl_PREREQ_STRTOD
+ dnl Use undocumented macro to set POW_LIB correctly.
+ _AC_LIBOBJ_STRTOD
+ fi
+ fi
+])
+m4trace:ltdl/m4/strtod.m4:90: -1- AC_DEFUN([gl_PREREQ_STRTOD], [:])
+m4trace:ltdl/m4/strtol.m4:7: -1- AC_DEFUN([gl_FUNC_STRTOL], [
+ AC_REPLACE_FUNCS([strtol])
+])
+m4trace:ltdl/m4/symlink.m4:11: -1- AC_DEFUN([gl_FUNC_SYMLINK], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([symlink])
+ dnl The best we can do on mingw is provide a dummy that always fails, so
+ dnl that compilation can proceed with fewer ifdefs. On Solaris 9 and
+ dnl FreeBSD 7.2, we want to fix a bug with trailing slash handling.
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+ AC_LIBOBJ([symlink])
+ else
+ AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
+ [gl_cv_func_symlink_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[if (!symlink ("a", "conftest.link/")) return 1;
+ if (symlink ("conftest.f", "conftest.lnk2")) return 2;
+ if (!symlink ("a", "conftest.lnk2/")) return 3;]])],
+ [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
+ [gl_cv_func_symlink_works="guessing no"])
+ rm -f conftest.f conftest.link conftest.lnk2])
+ if test "$gl_cv_func_symlink_works" != yes; then
+ REPLACE_SYMLINK=1
+ AC_LIBOBJ([symlink])
+ fi
+ fi
+])
+m4trace:ltdl/m4/sys_stat_h.m4:10: -1- AC_DEFUN([gl_HEADER_SYS_STAT_H], [
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+ dnl For the mkdir substitute.
+ AC_REQUIRE([AC_C_INLINE])
+
+ dnl Check for broken stat macros.
+ AC_REQUIRE([AC_HEADER_STAT])
+
+ gl_CHECK_NEXT_HEADERS([sys/stat.h])
+
+ dnl Define types that are supposed to be defined in <sys/types.h> or
+ dnl <sys/stat.h>.
+ AC_CHECK_TYPE([nlink_t], [],
+ [AC_DEFINE([nlink_t], [int],
+ [Define to the type of st_nlink in struct stat, or a supertype.])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+ ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+ mknod mknodat stat utimensat])
+])
+m4trace:ltdl/m4/sys_stat_h.m4:37: -1- AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/sys_stat_h.m4:44: -1- AC_DEFUN([gl_SYS_STAT_H_DEFAULTS], [
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+ GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT])
+ GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
+ GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
+ GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
+ GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
+ GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT])
+ GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO])
+ GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT])
+ GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD])
+ GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
+ GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
+ GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
+ HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
+ HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS])
+ HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD])
+ HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT])
+ HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT])
+ HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO])
+ HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT])
+ HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
+ HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
+ HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
+ REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
+ REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
+ REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
+ REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
+ REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
+ REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
+ REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD])
+ REPLACE_STAT=0; AC_SUBST([REPLACE_STAT])
+ REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT])
+])
+m4trace:ltdl/m4/sys_time_h.m4:11: -1- AC_DEFUN([gl_HEADER_SYS_TIME_H], [
+ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+ dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+ dnl statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+m4trace:ltdl/m4/sys_time_h.m4:19: -1- AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY], [
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+ if test $ac_cv_header_sys_time_h != yes; then
+ HAVE_SYS_TIME_H=0
+ fi
+
+ AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ ]],
+ [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+ [gl_cv_sys_struct_timeval=yes],
+ [gl_cv_sys_struct_timeval=no])])
+ if test $gl_cv_sys_struct_timeval != yes; then
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+ ]], [gettimeofday])
+])
+m4trace:ltdl/m4/sys_time_h.m4:55: -1- AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/sys_time_h.m4:62: -1- AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS], [
+ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY])
+ dnl Assume POSIX behavior unless another module says otherwise.
+ HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
+ HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
+ HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
+ REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
+])
+m4trace:ltdl/m4/sys_wait_h.m4:7: -1- AC_DEFUN([gl_SYS_WAIT_H], [
+ AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+
+ gl_CHECK_NEXT_HEADERS([sys/wait.h])
+])
+m4trace:ltdl/m4/sys_wait_h.m4:14: -1- AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/sys_wait_h.m4:21: -1- AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS], [
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
+m4trace:ltdl/m4/tempname.m4:10: -1- AC_DEFUN([gl_FUNC_GEN_TEMPNAME], [
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_LIBOBJ([tempname])
+ gl_PREREQ_TEMPNAME
+])
+m4trace:ltdl/m4/tempname.m4:19: -1- AC_DEFUN([gl_PREREQ_TEMPNAME], [
+ :
+])
+m4trace:ltdl/m4/threadlib.m4:24: -1- AC_DEFUN([gl_THREADLIB_EARLY], [
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+m4trace:ltdl/m4/threadlib.m4:31: -1- AC_DEFUN([gl_THREADLIB_EARLY_BODY], [
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+ dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+ dnl AC_GNU_SOURCE.
+ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+ [AC_REQUIRE([AC_GNU_SOURCE])])
+ dnl Check for multithreading.
+ m4_divert_text([DEFAULTS], [gl_use_threads_default=])
+ AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+changequote(,)dnl
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+ dnl bugs that lead to endless loops or crashes. See
+ dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ osf*) gl_use_threads=no ;;
+ cygwin*)
+ case `uname -r` in
+ 1.[0-5].*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ *) gl_use_threads=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # For using <pthread.h>:
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_TRY_LINK test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ fi
+])
+m4trace:ltdl/m4/threadlib.m4:100: -1- AC_DEFUN([gl_THREADLIB_BODY], [
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ AC_MSG_CHECKING([whether imported symbols can be declared weak])
+ gl_have_weak=no
+ AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+ AC_MSG_RESULT([$gl_have_weak])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+ # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+ AC_CHECK_HEADER([pthread.h],
+ [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ gl_have_pthread=
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_mutex_lock((pthread_mutex_t*)0);
+ pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+ [gl_have_pthread=yes])
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+ solaris* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ else
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB([c_r], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+ [thr_self();],
+ [gl_have_solaristhread=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_SOLARIS_THREADS], [1],
+ [Define if the old Solaris multithreading library can be used.])
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+ [Define if references to the old Solaris multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_LINKFLAGS([pth])
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lpth"
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_PTH_THREADS], [1],
+ [Define if the GNU Pth multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+ [Define if references to the GNU Pth multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=win32
+ AC_DEFINE([USE_WIN32_THREADS], [1],
+ [Define if the Win32 multithreading API can be used.])
+ fi
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST([LIBTHREAD])
+ AC_SUBST([LTLIBTHREAD])
+ AC_SUBST([LIBMULTITHREAD])
+ AC_SUBST([LTLIBMULTITHREAD])
+])
+m4trace:ltdl/m4/threadlib.m4:255: -1- AC_DEFUN([gl_THREADLIB], [
+ AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB_BODY])
+])
+m4trace:ltdl/m4/threadlib.m4:268: -1- AC_DEFUN([gl_DISABLE_THREADS], [
+ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+m4trace:ltdl/m4/time_h.m4:11: -1- AC_DEFUN([gl_HEADER_TIME_H], [
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+m4trace:ltdl/m4/time_h.m4:18: -1- AC_DEFUN([gl_HEADER_TIME_H_BODY], [
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([time.h])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+m4trace:ltdl/m4/time_h.m4:26: -1- AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS], [
+ dnl If another module says to replace or to not replace, do that.
+ dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+ dnl this lets maintainers check for portability.
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
+ REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
+ REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+])
+m4trace:ltdl/m4/time_h.m4:41: -1- AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC], [
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CACHE_CHECK([for struct timespec in <time.h>],
+ [gl_cv_sys_struct_timespec_in_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+ [gl_cv_sys_struct_timespec_in_sys_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+ AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+])
+m4trace:ltdl/m4/tmpdir.m4:9: -1- AC_DEFUN([gt_TMPDIR], [
+ AC_CHECK_FUNCS([__secure_getenv])
+])
+m4trace:ltdl/m4/uintmax_t.m4:14: -1- AC_DEFUN([gl_AC_TYPE_UINTMAX_T], [
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE([HAVE_UINTMAX_T], [1],
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+m4trace:ltdl/m4/ulonglong.m4:18: -1- AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT], [
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);]])],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `unsigned long long int'.])
+ fi
+])
+m4trace:ltdl/m4/ulonglong.m4:40: -1- AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG], [
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the 'unsigned long long' type.])
+ fi
+])
+m4trace:ltdl/m4/ungetc.m4:7: -1- AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS], [
+ AC_REQUIRE([AC_PROG_CC])
+
+ AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
+ [gl_cv_func_ungetc_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+ ]], [FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");])],
+ [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
+ [gl_cv_func_ungetc_works='guessing no'])
+ ])
+ if test "$gl_cv_func_ungetc_works" != yes; then
+ AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+ [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+ fi
+])
+m4trace:ltdl/m4/unistd-safer.m4:7: -1- AC_DEFUN([gl_UNISTD_SAFER], [
+ AC_CHECK_FUNCS_ONCE([pipe])
+ AC_LIBOBJ([dup-safer])
+ AC_LIBOBJ([fd-safer])
+ AC_LIBOBJ([pipe-safer])
+])
+m4trace:ltdl/m4/unistd_h.m4:9: -1- AC_DEFUN([gl_UNISTD_H], [
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
+
+ gl_CHECK_NEXT_HEADERS([unistd.h])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+ AC_SUBST([HAVE_UNISTD_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+ ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
+ fsync ftruncate getcwd getdomainname getdtablesize getgroups
+ gethostname getlogin getlogin_r getpagesize getusershell setusershell
+ endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
+ rmdir sleep symlink symlinkat unlink unlinkat usleep])
+])
+m4trace:ltdl/m4/unistd_h.m4:45: -1- AC_DEFUN([gl_UNISTD_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/unistd_h.m4:52: -1- AC_DEFUN([gl_UNISTD_H_DEFAULTS], [
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
+ GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
+ GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
+ GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
+ GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
+ GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
+ GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
+ GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
+ GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
+ GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
+ GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
+ GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
+ GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
+ GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
+ GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
+ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
+ GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
+ GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
+ GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+ GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
+ GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
+ GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
+ GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
+ HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
+ HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
+ HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
+ HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
+ HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
+ HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
+ HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
+ HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
+ HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
+ HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
+ HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
+ HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
+ HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
+ HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL])
+ HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
+ HAVE_LINK=1; AC_SUBST([HAVE_LINK])
+ HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
+ HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
+ HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
+ HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
+ HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
+ HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
+ HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
+ HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
+ HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
+ HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
+ HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
+ HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
+ HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
+ REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
+ REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
+ REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
+ REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
+ REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
+ REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+ REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
+ REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
+ REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
+ REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
+ REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
+ REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
+ REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
+ REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
+ REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
+ REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
+ REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
+ REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
+ REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
+ REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
+ UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+ AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+])
+m4trace:ltdl/m4/unlocked-io.m4:17: -1- AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO], [
+ AC_DEFINE([USE_UNLOCKED_IO], [1],
+ [Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps,
+ but it is not safe for multithreaded apps.])
+
+ dnl Persuade glibc and Solaris <stdio.h> to declare
+ dnl fgets_unlocked(), fputs_unlocked() etc.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([clearerr_unlocked])
+ AC_CHECK_DECLS_ONCE([feof_unlocked])
+ AC_CHECK_DECLS_ONCE([ferror_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fputc_unlocked])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([fread_unlocked])
+ AC_CHECK_DECLS_ONCE([fwrite_unlocked])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+ AC_CHECK_DECLS_ONCE([getchar_unlocked])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ AC_CHECK_DECLS_ONCE([putchar_unlocked])
+])
+m4trace:ltdl/m4/vasnprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_VASNPRINTF_POSIX], [
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vasnprintf_posix=no
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasnprintf = yes; then
+ # vasnprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasnprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasnprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ fi
+])
+m4trace:ltdl/m4/vasnprintf.m4:7: -1- AC_DEFUN([gl_FUNC_VASNPRINTF], [
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ if test $ac_cv_func_vasnprintf = no; then
+ gl_REPLACE_VASNPRINTF
+ fi
+])
+m4trace:ltdl/m4/vasnprintf.m4:15: -1- AC_DEFUN([gl_REPLACE_VASNPRINTF], [
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ AC_LIBOBJ([vasnprintf])
+ AC_LIBOBJ([printf-args])
+ AC_LIBOBJ([printf-parse])
+ AC_LIBOBJ([asnprintf])
+ if test $ac_cv_func_vasnprintf = yes; then
+ AC_DEFINE([REPLACE_VASNPRINTF], [1],
+ [Define if vasnprintf exists but is overridden by gnulib.])
+ fi
+ gl_PREREQ_PRINTF_ARGS
+ gl_PREREQ_PRINTF_PARSE
+ gl_PREREQ_VASNPRINTF
+ gl_PREREQ_ASNPRINTF
+])
+m4trace:ltdl/m4/vasnprintf.m4:33: -1- AC_DEFUN([gl_PREREQ_PRINTF_ARGS], [
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+])
+m4trace:ltdl/m4/vasnprintf.m4:41: -1- AC_DEFUN([gl_PREREQ_PRINTF_PARSE], [
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_REQUIRE([AC_TYPE_SIZE_T])
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
+])
+m4trace:ltdl/m4/vasnprintf.m4:55: -1- AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF], [
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+])
+m4trace:ltdl/m4/vasnprintf.m4:69: -1- AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE], [
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:85: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE], [
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ infinite 'double' arguments.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:101: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE], [
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if
+ dnl NEED_PRINTF_LONG_DOUBLE is already set.
+ AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE])
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ infinite 'long double' arguments.])
+ ;;
+ esac
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:123: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A], [
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'a' and 'A' directives.])
+ AC_CHECK_FUNCS([nl_langinfo])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:139: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F], [
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'F' directive.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:154: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS], [
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'ls' directive.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:169: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING], [
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ ' flag.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:184: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST], [
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ '-' flag.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:199: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO], [
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ 0 flag.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:214: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION], [
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
+ [Define if the vasnprintf implementation needs special code for
+ supporting large precisions without arbitrary bounds.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:236: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM], [
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
+ [Define if the vasnprintf implementation needs special code for
+ surviving out-of-memory conditions.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+m4trace:ltdl/m4/vasnprintf.m4:257: -1- AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS], [
+ AC_REQUIRE([gl_PREREQ_VASNPRINTF])
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+])
+m4trace:ltdl/m4/vasnprintf.m4:274: -1- AC_DEFUN([gl_PREREQ_ASNPRINTF], [
+])
+m4trace:ltdl/m4/vasprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_VASPRINTF_POSIX], [
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vasprintf_posix=no
+ AC_CHECK_FUNCS([vasprintf])
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_VASPRINTF
+ fi
+])
+m4trace:ltdl/m4/vasprintf.m4:8: -1- AC_DEFUN([gl_FUNC_VASPRINTF], [
+ AC_CHECK_FUNCS([vasprintf])
+ if test $ac_cv_func_vasprintf = no; then
+ gl_REPLACE_VASPRINTF
+ fi
+])
+m4trace:ltdl/m4/vasprintf.m4:16: -1- AC_DEFUN([gl_REPLACE_VASPRINTF], [
+ AC_LIBOBJ([vasprintf])
+ AC_LIBOBJ([asprintf])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+ gl_PREREQ_VASPRINTF_H
+ gl_PREREQ_VASPRINTF
+ gl_PREREQ_ASPRINTF
+])
+m4trace:ltdl/m4/vasprintf.m4:32: -1- AC_DEFUN([gl_PREREQ_VASPRINTF_H], [
+ dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+m4trace:ltdl/m4/vasprintf.m4:39: -1- AC_DEFUN([gl_PREREQ_VASPRINTF], [
+])
+m4trace:ltdl/m4/vasprintf.m4:44: -1- AC_DEFUN([gl_PREREQ_ASPRINTF], [
+])
+m4trace:ltdl/m4/version-etc.m4:20: -1- AC_DEFUN([gl_VERSION_ETC], [dnl
+ gl_VERSION_ETC_FLAG([packager],
+ [String identifying the packager of this software])
+ gl_VERSION_ETC_FLAG([packager-version],
+ [Packager-specific version information])
+ gl_VERSION_ETC_FLAG([packager-bug-reports],
+ [Packager info for bug reports (URL/e-mail/...)])
+ if test "X$with_packager" = "X" && \
+ test "X$with_packager_version$with_packager_bug_reports" != "X"
+ then
+ AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
+ fi
+])
+m4trace:ltdl/m4/vfprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_VFPRINTF_POSIX], [
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vfprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # vfprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vfprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vfprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_VFPRINTF
+ fi
+])
+m4trace:ltdl/m4/vfprintf-posix.m4:100: -1- AC_DEFUN([gl_REPLACE_VFPRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([vfprintf])
+ REPLACE_VFPRINTF=1
+ AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1],
+ [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.])
+ gl_PREREQ_VFPRINTF
+])
+m4trace:ltdl/m4/vfprintf-posix.m4:110: -1- AC_DEFUN([gl_PREREQ_VFPRINTF], [:])
+m4trace:ltdl/m4/visibility.m4:23: -1- AC_DEFUN([gl_VISIBILITY], [
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ AC_MSG_CHECKING([for simple visibility declarations])
+ AC_CACHE_VAL([gl_cv_cc_visibility], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ AC_TRY_COMPILE(
+ [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
+ [],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_visibility])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
+m4trace:ltdl/m4/vprintf-posix.m4:7: -1- AC_DEFUN([gl_FUNC_VPRINTF_POSIX], [
+ AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX])
+ if test $gl_cv_func_vfprintf_posix = no; then
+ gl_REPLACE_VPRINTF
+ fi
+])
+m4trace:ltdl/m4/vprintf-posix.m4:15: -1- AC_DEFUN([gl_REPLACE_VPRINTF], [
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([vprintf])
+ REPLACE_VPRINTF=1
+ AC_DEFINE([REPLACE_VPRINTF_POSIX], [1],
+ [Define if vprintf is overridden by a POSIX compliant gnulib implementation.])
+ gl_PREREQ_VPRINTF
+])
+m4trace:ltdl/m4/vprintf-posix.m4:25: -1- AC_DEFUN([gl_PREREQ_VPRINTF], [:])
+m4trace:ltdl/m4/wait-process.m4:7: -1- AC_DEFUN([gl_WAIT_PROCESS], [
+ dnl Prerequisites of lib/wait-process.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
+ AC_CHECK_FUNCS([waitid])
+])
+m4trace:ltdl/m4/warn-on-use.m4:24: -1- AC_DEFUN([gl_WARN_ON_USE_PREPARE], [
+ m4_foreach_w([gl_decl], [$2],
+ [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
+ [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
+ undefining macros.])])dnl
+ for gl_func in m4_flatten([$2]); do
+ AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+ AC_CACHE_CHECK([whether $gl_func is declared without a macro],
+ gl_Symbol,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
+[@%:@undef $gl_func
+ (void) $gl_func;])],
+ [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+ AS_VAR_IF(gl_Symbol, [yes],
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+ dnl shortcut - if the raw declaration exists, then set a cache
+ dnl variable to allow skipping any later AC_CHECK_DECL efforts
+ eval ac_cv_have_decl_$gl_func=yes])
+ AS_VAR_POPDEF([gl_Symbol])dnl
+ done
+])
+m4trace:ltdl/m4/wchar.m4:12: -1- AC_DEFUN([gl_WCHAR_H], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+ wcsrtombs wcsnrtombs wcwidth])
+])
+m4trace:ltdl/m4/wchar.m4:52: -1- AC_DEFUN([gl_WCHAR_H_INLINE_OK], [
+ dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
+ dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
+ dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+ AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
+ [gl_cv_header_wchar_h_correct_inline],
+ [gl_cv_header_wchar_h_correct_inline=yes
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ ])
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted.])
+ fi
+])
+m4trace:ltdl/m4/wchar.m4:100: -1- AC_DEFUN([gl_REPLACE_WCHAR_H], [
+ dnl This is a no-op, because <wchar.h> is always overridden.
+ :
+])
+m4trace:ltdl/m4/wchar.m4:106: -1- AC_DEFUN([gl_WCHAR_MODULE_INDICATOR], [
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+m4trace:ltdl/m4/wchar.m4:113: -1- AC_DEFUN([gl_WCHAR_H_DEFAULTS], [
+ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
+ GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
+ GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
+ GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
+ GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
+ GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
+ GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
+ GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
+ GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
+ GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
+ GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
+ HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
+ HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
+ HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
+ HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
+ HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
+ HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
+ HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
+ HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
+ HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
+ HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+ REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
+ REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
+ REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
+ REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
+ REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
+ REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
+ REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
+ REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
+ REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
+ REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
+ REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
+ REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
+])
+m4trace:ltdl/m4/wchar_t.m4:11: -1- AC_DEFUN([gt_TYPE_WCHAR_T], [
+ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+ [AC_TRY_COMPILE([#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+ if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+ fi
+])
+m4trace:ltdl/m4/wcrtomb.m4:7: -1- AC_DEFUN([gl_FUNC_WCRTOMB], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_WCRTOMB=1
+ fi
+ AC_CHECK_FUNCS_ONCE([wcrtomb])
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ fi
+ if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+ dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
+ dnl returns 0 instead of 1.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wcrtomb return value is correct],
+ [gl_cv_func_wcrtomb_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wcrtomb_retval=yes],
+ [gl_cv_func_wcrtomb_retval=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wcrtomb])
+ gl_PREREQ_WCRTOMB
+ fi
+])
+m4trace:ltdl/m4/wcrtomb.m4:90: -1- AC_DEFUN([gl_PREREQ_WCRTOMB], [
+ :
+])
+m4trace:ltdl/m4/wctob.m4:7: -1- AC_DEFUN([gl_FUNC_WCTOB], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_CHECK_FUNCS_ONCE([wctob])
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl Solaris 9 has the wctob() function but it does not work.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wctob works],
+ [gl_cv_func_wctob_works],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wctob_works=yes],
+ [gl_cv_func_wctob_works=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl IRIX 6.5 has the wctob() function but does not declare it.
+ AC_CHECK_DECLS([wctob], [], [], [
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ fi
+ fi
+ fi
+])
+m4trace:ltdl/m4/wctob.m4:89: -1- AC_DEFUN([gl_PREREQ_WCTOB], [
+ :
+])
+m4trace:ltdl/m4/wctype.m4:12: -1- AC_DEFUN([gl_WCTYPE_H], [
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([iswcntrl])
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+ AC_SUBST([HAVE_ISWCNTRL])
+ AC_CHECK_HEADERS_ONCE([wctype.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ dnl Linux libc5 has an iswprint function that returns 0 for all arguments.
+ dnl The other functions are likely broken in the same way.
+ AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }]])],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif]], [])],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+ ])
+ ])
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ case "$host_os" in
+ mingw*)
+ dnl On mingw, towlower and towupper return random high 16 bits.
+ ;;
+ *)
+ dnl iswcntrl works. towlower and towupper work as well.
+ WCTYPE_H=
+ ;;
+ esac
+ fi
+ fi
+ dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty,
+ dnl for the benefit of builds from non-distclean directories.
+ gl_CHECK_NEXT_HEADERS([wctype.h])
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+ AC_SUBST([HAVE_WCTYPE_H])
+ AC_SUBST([WCTYPE_H])
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+ AC_SUBST([REPLACE_ISWCNTRL])
+])
+m4trace:ltdl/m4/wcwidth.m4:7: -1- AC_DEFUN([gl_FUNC_WCWIDTH], [
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade glibc <wchar.h> to declare wcwidth().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ AC_CHECK_FUNCS_ONCE([wcwidth])
+
+ AC_CHECK_DECLS([wcwidth], [], [], [
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+ dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
+ dnl This leads to bugs in 'ls' (coreutils).
+ AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
+ [gl_cv_func_wcwidth_works],
+ [
+ AC_TRY_RUN([
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+ AC_LIBOBJ([wcwidth])
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+ gl_REPLACE_WCHAR_H
+ fi
+])
+m4trace:ltdl/m4/wint_t.m4:11: -1- AC_DEFUN([gt_TYPE_WINT_T], [
+ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+ fi
+])
+m4trace:ltdl/m4/xalloc.m4:8: -1- AC_DEFUN([gl_XALLOC], [
+ AC_LIBOBJ([xmalloc])
+
+ gl_PREREQ_XALLOC
+ gl_PREREQ_XMALLOC
+])
+m4trace:ltdl/m4/xalloc.m4:17: -1- AC_DEFUN([gl_PREREQ_XALLOC], [
+ AC_REQUIRE([gl_INLINE])
+ :
+])
+m4trace:ltdl/m4/xalloc.m4:23: -1- AC_DEFUN([gl_PREREQ_XMALLOC], [
+ :
+])
+m4trace:ltdl/m4/xsize.m4:7: -1- AC_DEFUN([gl_XSIZE], [
+ dnl Prerequisites of lib/xsize.h.
+ AC_REQUIRE([gl_SIZE_MAX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CHECK_HEADERS([stdint.h])
+])
+m4trace:ltdl/m4/xstrndup.m4:7: -1- AC_DEFUN([gl_XSTRNDUP], [
+ gl_PREREQ_XSTRNDUP
+])
+m4trace:ltdl/m4/xstrndup.m4:13: -1- AC_DEFUN([gl_PREREQ_XSTRNDUP], [
+ :
+])
+m4trace:ltdl/m4/xvasprintf.m4:7: -1- AC_DEFUN([gl_XVASPRINTF], [
+ dnl Prerequisites of lib/xvasprintf.c.
+ AC_REQUIRE([AC_C_INLINE])
+])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:48: -1- m4_pattern_forbid([^M4_[A-Z]])
+m4trace:configure.ac:50: -1- AC_DEFUN([M4_DEFAULT_PRELOAD], [m4 traditional gnu])
+m4trace:configure.ac:51: -1- M4_DEFAULT_PRELOAD
+m4trace:configure.ac:57: -1- AM_INIT_AUTOMAKE([1.10b subdir-objects dist-bzip2 dist-xz
+color-tests parallel-tests silent-rules
+gnu])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:57: -1- AM_SET_CURRENT_AUTOMAKE_VERSION
+m4trace:configure.ac:57: -1- AM_AUTOMAKE_VERSION([1.11.1])
+m4trace:configure.ac:57: -1- _AM_AUTOCONF_VERSION([2.67])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:57: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:57: -1- _AM_SET_OPTIONS([1.10b subdir-objects dist-bzip2 dist-xz
+color-tests parallel-tests silent-rules
+gnu])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([1.10b])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([1.10b])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([subdir-objects])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([subdir-objects])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([dist-bzip2])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([dist-bzip2])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([dist-xz])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([dist-xz])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([color-tests])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([color-tests])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([parallel-tests])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([parallel-tests])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([silent-rules])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([silent-rules])
+m4trace:configure.ac:57: -1- _AM_SET_OPTION([gnu])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([gnu])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:57: -1- _AM_IF_OPTION([no-define], [], [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([no-define])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:57: -1- AM_SANITY_CHECK
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}])
+m4trace:configure.ac:57: -1- AM_MISSING_HAS_RUN
+m4trace:configure.ac:57: -1- AM_AUX_DIR_EXPAND
+m4trace:configure.ac:57: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([AUTOCONF], [autoconf])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([AUTOHEADER], [autoheader])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([MAKEINFO], [makeinfo])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:57: -1- AM_PROG_INSTALL_SH
+m4trace:configure.ac:57: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:57: -1- AM_PROG_INSTALL_STRIP
+m4trace:configure.ac:57: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:57: -1- AM_PROG_MKDIR_P
+m4trace:configure.ac:57: -1- AC_PROG_MKDIR_P
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:57: -1- AM_SET_LEADING_DOT
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:57: -1- _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
+ [_AM_PROG_TAR([v7])])])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([tar-ustar])
+m4trace:configure.ac:57: -1- _AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([tar-pax])
+m4trace:configure.ac:57: -1- _AM_PROG_TAR([v7])
+m4trace:configure.ac:57: -1- AM_MISSING_PROG([AMTAR], [tar])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:57: -1- _AM_IF_OPTION([no-dependencies], [], [AC_PROVIDE_IFELSE([AC_PROG_CC],
+ [_AM_DEPENDENCIES(CC)],
+ [define([AC_PROG_CC],
+ defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [_AM_DEPENDENCIES(CXX)],
+ [define([AC_PROG_CXX],
+ defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_OBJC],
+ [_AM_DEPENDENCIES(OBJC)],
+ [define([AC_PROG_OBJC],
+ defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
+])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([no-dependencies])
+m4trace:configure.ac:57: -1- _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])
+m4trace:configure.ac:57: -2- _AM_MANGLE_OPTION([silent-rules])
+m4trace:configure.ac:57: -1- AM_SILENT_RULES
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:57: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:65: -1- _AM_DEPENDENCIES([CC])
+m4trace:configure.ac:65: -1- AM_SET_DEPDIR
+m4trace:configure.ac:65: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:65: -1- AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:65: -1- AM_MAKE_INCLUDE
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:65: -1- AM_DEP_TRACK
+m4trace:configure.ac:65: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:66: -1- M4_EARLY
+m4trace:configure.ac:66: -1- m4_pattern_forbid([^gl_[A-Z]])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_ES$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_LIBOBJS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_LTLIBOBJS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:66: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:66: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$])
+m4trace:configure.ac:66: -1- AB_INIT
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:66: -1- gl_USE_SYSTEM_EXTENSIONS
+m4trace:configure.ac:66: -1- _m4_warn([obsolete], [The macro `AC_GNU_SOURCE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/specific.m4:310: AC_GNU_SOURCE is expanded from...
+ltdl/m4/gnulib-comp.m4:21: M4_EARLY is expanded from...
+configure.ac:66: the top level])
+m4trace:configure.ac:66: -1- AC_USE_SYSTEM_EXTENSIONS
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:66: -1- AC_PROG_EGREP
+m4trace:configure.ac:66: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_1_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_MINIX$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_XOPEN_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^__EXTENSIONS__$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_ALL_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_GNU_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_TANDEM_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_LARGEFILE_SOURCE$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^HAVE_FSEEKO$])
+m4trace:configure.ac:66: -1- gl_FP_IEEE
+m4trace:configure.ac:68: -1- m4_pattern_allow([^_FILE_OFFSET_BITS$])
+m4trace:configure.ac:68: -1- m4_pattern_allow([^_LARGE_FILES$])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:70: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:71: -1- M4_CHECK_DEBUGGING
+m4trace:configure.ac:71: -1- AC_DISABLE_SHARED
+m4trace:configure.ac:71: -1- m4_pattern_allow([^DEBUG$])
+m4trace:configure.ac:71: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -ggdb3], [M4_cv_prog_compiler_ggdb3], [-ggdb3 -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS -ggdb3"], [CFLAGS="$CFLAGS -g"])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:71: -1- _LT_COMPILER_OPTION([if $compiler accepts -ggdb3], [M4_cv_prog_compiler_ggdb3], [-ggdb3 -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS -ggdb3"], [CFLAGS="$CFLAGS -g"])
+m4trace:configure.ac:71: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:71: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts $WMORE], [M4_cv_prog_compiler_warning_flags], [$WMORE -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS $WMORE"])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:71: -1- _LT_COMPILER_OPTION([if $compiler accepts $WMORE], [M4_cv_prog_compiler_warning_flags], [$WMORE -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS $WMORE"])
+m4trace:configure.ac:71: -1- AC_LIBTOOL_COMPILER_OPTION([if $compiler accepts -Wno-long-long], [M4_cv_prog_compiler_wnolonglong], [-Wno-long-long -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS -Wno-long-long"])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:71: -1- _LT_COMPILER_OPTION([if $compiler accepts -Wno-long-long], [M4_cv_prog_compiler_wnolonglong], [-Wno-long-long -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS -Wno-long-long"])
+m4trace:configure.ac:71: -1- AC_ENABLE_SHARED
+m4trace:configure.ac:78: -1- LT_CONFIG_LTDL_DIR([ltdl])
+m4trace:configure.ac:79: -1- LT_INIT([shared dlopen win32-dll])
+m4trace:configure.ac:79: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:79: -1- LTOPTIONS_VERSION
+m4trace:configure.ac:79: -1- LTSUGAR_VERSION
+m4trace:configure.ac:79: -1- LTVERSION_VERSION
+m4trace:configure.ac:79: -1- LTOBSOLETE_VERSION
+m4trace:configure.ac:79: -1- _LT_PROG_LTMAIN
+m4trace:configure.ac:79: -1- m4_pattern_allow([^AS$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:79: -1- LT_PATH_LD
+m4trace:configure.ac:79: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:79: -1- LT_PATH_NM
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:79: -1- LT_CMD_MAX_LEN
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^lt_ECHO$])
+m4trace:configure.ac:79: -1- _LT_CC_BASENAME([$compiler])
+m4trace:configure.ac:79: -1- _LT_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:79: -1- _LT_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH])
+m4trace:configure.ac:79: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:79: -1- _LT_COMPILER_BOILERPLATE
+m4trace:configure.ac:79: -1- _LT_LINKER_BOILERPLATE
+m4trace:configure.ac:79: -1- _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], [lt_cv_prog_compiler_rtti_exceptions], [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, )="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, ) -fno-rtti -fno-exceptions"])
+m4trace:configure.ac:79: -1- _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, ) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, )], [$_LT_TAGVAR(lt_prog_compiler_pic, )@&t@m4_if([],[],[ -DPIC],[m4_if([],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, ) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, )=" $_LT_TAGVAR(lt_prog_compiler_pic, )" ;;
+ esac], [_LT_TAGVAR(lt_prog_compiler_pic, )=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, )=no])
+m4trace:configure.ac:79: -1- _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], [lt_cv_prog_compiler_static_works], [$lt_tmp_static_flag], [], [_LT_TAGVAR(lt_prog_compiler_static, )=])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:79: -1- LT_SYS_DLOPEN_SELF
+m4trace:configure.ac:79: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:80: -1- LTDL_INIT([nonrecursive])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBLTDL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLDEPS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLINCL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INCLTDL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LTDL$])
+m4trace:configure.ac:80: -1- _LTDL_SETUP
+m4trace:configure.ac:80: -1- LT_SYS_MODULE_EXT
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_MODULE_EXT])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_MODULE_EXT$])
+m4trace:configure.ac:80: -1- LT_SYS_MODULE_PATH
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_MODULE_PATH_VAR])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_MODULE_PATH_VAR$])
+m4trace:configure.ac:80: -1- LT_SYS_DLSEARCH_PATH
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_DLSEARCH_PATH])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLSEARCH_PATH$])
+m4trace:configure.ac:80: -1- LT_LIB_DLLOAD
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLLOADERS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLLOADERS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DLERROR$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DLOPEN$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_SHL_LOAD$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DYLD$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DECL_CYGWIN_CONV_PATH$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DLD$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DLD_LINK$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLPREOPEN$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDLLOADER$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLPREOPEN$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DL$])
+m4trace:configure.ac:80: -1- LT_SYS_SYMBOL_USCORE
+m4trace:configure.ac:80: -1- m4_pattern_allow([^sys_symbol_underscore$])
+m4trace:configure.ac:80: -1- LT_FUNC_DLSYM_USCORE
+m4trace:configure.ac:80: -1- m4_pattern_allow([^NEED_USCORE$])
+m4trace:configure.ac:80: -1- LT_SYS_DLOPEN_DEPLIBS
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDL_DLOPEN_DEPLIBS$])
+m4trace:configure.ac:80: -1- gl_FUNC_ARGZ
+m4trace:configure.ac:80: -1- gl_PREREQ_ARGZ
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ARGZ_H$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ERROR_T$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^error_t$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^__error_t_defined$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_WORKING_ARGZ$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^ARGZ_H$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_PRELOADED_SYMBOLS$])
+m4trace:configure.ac:80: -1- AM_CONDITIONAL([INSTALL_LTDL], [test x"${enable_ltdl_install-no}" != xno])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_LTDL_TRUE$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_LTDL_FALSE$])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([INSTALL_LTDL_TRUE])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([INSTALL_LTDL_FALSE])
+m4trace:configure.ac:80: -1- AM_CONDITIONAL([CONVENIENCE_LTDL], [test x"${enable_ltdl_convenience-no}" != xno])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^CONVENIENCE_LTDL_TRUE$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^CONVENIENCE_LTDL_FALSE$])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([CONVENIENCE_LTDL_TRUE])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([CONVENIENCE_LTDL_FALSE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_CONFIG_H$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_LIBEXT$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLOPEN$])
+m4trace:configure.ac:88: -1- m4_pattern_allow([^HAVE_LIBLTDL$])
+m4trace:configure.ac:99: -1- _LT_COMPILER_OPTION([if $compiler supports -pipe], [M4_cv_prog_compiler_pipe], [-pipe -c conftest.$ac_ext], [], [CFLAGS="$CFLAGS -pipe"])
+m4trace:configure.ac:111: -1- m4_pattern_allow([^DYNAMIC_MODULES$])
+m4trace:configure.ac:116: -2- M4_DEFAULT_PRELOAD
+m4trace:configure.ac:142: -1- m4_pattern_allow([^DLPREOPEN$])
+m4trace:configure.ac:143: -1- m4_pattern_allow([^PREOPEN_DEPENDENCIES$])
+m4trace:configure.ac:149: -1- AM_GNU_GETTEXT([external], [need-formatstring-macros])
+m4trace:configure.ac:149: -1- AM_GNU_GETTEXT_NEED([need-formatstring-macros])
+m4trace:configure.ac:149: -1- AM_PO_SUBDIRS
+m4trace:configure.ac:149: -1- AM_NLS
+m4trace:configure.ac:149: -1- m4_pattern_allow([^USE_NLS$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GETTEXT_MACRO_VERSION$])
+m4trace:configure.ac:149: -1- AM_PATH_PROG_WITH_TEST([MSGFMT], [msgfmt], [$ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], [:])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGFMT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GMSGFMT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGFMT_015$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GMSGFMT_015$])
+m4trace:configure.ac:149: -1- AM_PATH_PROG_WITH_TEST([XGETTEXT], [xgettext], [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)], [:])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT_015$])
+m4trace:configure.ac:149: -1- AM_PATH_PROG_WITH_TEST([MSGMERGE], [msgmerge], [$ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1], [:])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGMERGE$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT_EXTRA_OPTIONS$])
+m4trace:configure.ac:149: -1- AC_LIB_PREPARE_PREFIX
+m4trace:configure.ac:149: -1- AC_LIB_RPATH
+m4trace:configure.ac:149: -1- AC_LIB_PROG_LD
+m4trace:configure.ac:149: -1- AC_LIB_PROG_LD_GNU
+m4trace:configure.ac:149: -1- AM_ICONV_LINKFLAGS_BODY
+m4trace:configure.ac:149: -1- AC_LIB_LINKFLAGS_BODY([iconv])
+m4trace:configure.ac:149: -1- AC_LIB_PREPARE_MULTILIB
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- gt_INTL_MACOSX
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intlmacosx.m4:18: gt_INTL_MACOSX is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_CFPREFERENCESCOPYAPPVALUE$])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intlmacosx.m4:18: gt_INTL_MACOSX is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_CFLOCALECOPYCURRENT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^INTL_MACOSX_LIBS$])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- AM_ICONV_LINK
+m4trace:configure.ac:149: -1- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_ICONV$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LIBICONV$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LTLIBICONV$])
+m4trace:configure.ac:149: -1- AC_LIB_LINKFLAGS_BODY([intl])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^ENABLE_NLS$])
+m4trace:configure.ac:149: -1- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+m4trace:configure.ac:149: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_DCGETTEXT$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^INTLLIBS$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LIBINTL$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LTLIBINTL$])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^POSUB$])
+m4trace:configure.ac:150: -1- AM_GNU_GETTEXT_VERSION([0.16])
+m4trace:configure.ac:151: -1- M4_GNU_GETTEXT
+m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_GETTEXT_H$])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^GETTEXT_H$])
+m4trace:configure.ac:158: -1- M4_INIT
+m4trace:configure.ac:158: -1- AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_COND_LIBTOOL_TRUE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_COND_LIBTOOL_FALSE$])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([GL_COND_LIBTOOL_TRUE])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([GL_COND_LIBTOOL_FALSE])
+m4trace:configure.ac:158: -1- gl_COMMON
+m4trace:configure.ac:158: -1- gl_00GNULIB
+m4trace:configure.ac:158: -1- gl_COMMON_BODY
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTALLOCA$])
+m4trace:configure.ac:158: -1- gl_FUNC_ALLOCA
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ALLOCA$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^C_ALLOCA$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CRAY_STACKSEG_END$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STACK_DIRECTION$])
+m4trace:configure.ac:158: -1- gl_PREREQ_ALLOCA
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ALLOCA_H$])
+m4trace:configure.ac:158: -1- gl_ASSERT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NDEBUG$])
+m4trace:configure.ac:158: -1- gl_FUNC_BTOWC
+m4trace:configure.ac:158: -1- gl_WCHAR_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_BTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCTOB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSINIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBRTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBRLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCRTOMB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCWIDTH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSINIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCRTOMB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCTOB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCWIDTH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSTATE_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_BTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCTOB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSINIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBRTOWC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBRLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCRTOMB$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCWIDTH$])
+m4trace:configure.ac:158: -1- gl_WCHAR_H_INLINE_OK
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_btowc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" btowc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- AM_LANGINFO_CODESET
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/codeset.m4:9: AM_LANGINFO_CODESET is expanded from...
+ltdl/m4/locale-fr.m4:10: gt_LOCALE_FR is expanded from...
+ltdl/m4/btowc.m4:7: gl_FUNC_BTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_CODESET$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/btowc.m4:7: gl_FUNC_BTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([btowc.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_BTOWC
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([btowc])
+m4trace:configure.ac:158: -1- gl_CANONICALIZE_LGPL
+m4trace:configure.ac:158: -1- gl_CANONICALIZE_LGPL_SEPARATE
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_canonicalize_file_name], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" canonicalize_file_name"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_getcwd], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" getcwd"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_readlink], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" readlink"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_DOUBLE_SLASH_ROOT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DOUBLE_SLASH_IS_DISTINCT_ROOT$])
+m4trace:configure.ac:158: -1- gl_FUNC_REALPATH_WORKS
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_realpath], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" realpath"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FUNC_REALPATH_WORKS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([canonicalize-lgpl.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([canonicalize-lgpl.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([canonicalize-lgpl])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CANONICALIZE_LGPL$])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
+m4trace:configure.ac:158: -1- gl_STDLIB_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ATOLL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOADAVG$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETSUBOPT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKDTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKOSTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKOSTEMPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKSTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKSTEMPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RANDOM_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REALPATH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RPMATCH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SETENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOLL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOULL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNSETENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ATOLL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLOADAVG$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETSUBOPT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKOSTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKOSTEMPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKSTEMPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_REALLOC_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_REALPATH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RPMATCH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SETENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOLL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOULL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_RANDOM_DATA$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_LOADAVG_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSETENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKSTEMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PUTENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_REALPATH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SETENV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRTOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNSETENV$])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([realpath])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIGNAL_SAFE_LIST$])
+m4trace:configure.ac:158: -1- gl_CLOEXEC
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([cloexec.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([cloexec])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOEXEC$])
+m4trace:configure.ac:158: -1- gl_CLOSE_STREAM
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([close-stream.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([close-stream])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOSE_STREAM$])
+m4trace:configure.ac:158: -1- gl_CLOSEIN
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([closein.c])
+m4trace:configure.ac:158: -1- gl_CLOSEOUT
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([closeout.c])
+m4trace:configure.ac:158: -1- gl_CONFIG_H
+m4trace:configure.ac:158: -1- gl_DIRNAME
+m4trace:configure.ac:158: -1- gl_DIRNAME_LGPL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([basename-lgpl.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dirname-lgpl.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([stripslash.c])
+m4trace:configure.ac:158: -1- gl_AC_DOS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([basename.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dirname.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([dirname])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DIRNAME$])
+m4trace:configure.ac:158: -1- gl_DIRNAME_LGPL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([basename-lgpl.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dirname-lgpl.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([stripslash.c])
+m4trace:configure.ac:158: -1- gl_DOUBLE_SLASH_ROOT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DOUBLE_SLASH_IS_DISTINCT_ROOT$])
+m4trace:configure.ac:158: -1- gl_FUNC_DUP2
+m4trace:configure.ac:158: -1- gl_UNISTD_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOSE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DUP2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DUP3$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ENVIRON$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_EUIDACCESS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FACCESSAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHDIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHOWNAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSYNC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTRUNCATE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETCWD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDOMAINNAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDTABLESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETGROUPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETHOSTNAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOGIN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOGIN_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETUSERSHELL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LCHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LSEEK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PIPE2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PREAD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_READLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_READLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RMDIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SYMLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SYMLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNISTD_H_GETOPT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNISTD_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_USLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WRITE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DUP2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DUP3$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_EUIDACCESS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FACCESSAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCHOWNAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FSYNC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FTRUNCATE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETDOMAINNAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETDTABLESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETGROUPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETHOSTNAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETLOGIN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETUSERSHELL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LCHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PIPE2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PREAD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_READLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_READLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYMLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYMLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ENVIRON$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLOGIN_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OS_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_PARAM_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_USLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CLOSE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DUP2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCHDIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCHOWNAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETCWD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETGROUPS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LCHOWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LSEEK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PREAD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_READLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RMDIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SYMLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNLINK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNLINKAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_USLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WRITE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNISTD_H_HAVE_WINSOCK2_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_dup2], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" dup2"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dup2.c])
+m4trace:configure.ac:158: -1- gl_REPLACE_DUP2
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dup2.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([dup2])
+m4trace:configure.ac:158: -1- gl_ENVIRON
+m4trace:configure.ac:158: -1- gt_CHECK_VAR_DECL([#include <unistd.h>], [environ])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/environ.m4:20: gt_CHECK_VAR_DECL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ENVIRON_DECL$])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([environ])
+m4trace:configure.ac:158: -1- gl_HEADER_ERRNO_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([errno.h])
+m4trace:configure.ac:158: -1- gl_INCLUDE_NEXT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INCLUDE_NEXT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INCLUDE_NEXT_AS_FIRST_DIRECTIVE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRAGMA_SYSTEM_HEADER$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_errno_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" errno.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_ERRNO_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ERRNO_H$])
+m4trace:configure.ac:158: -1- gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([gl_cv_header_errno_h_EMULTIHOP], [EMULTIHOP], [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EMULTIHOP_HIDDEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EMULTIHOP_VALUE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_ERRNO_VALUE([ENOLINK])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([gl_cv_header_errno_h_ENOLINK], [ENOLINK], [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ENOLINK_HIDDEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ENOLINK_VALUE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([gl_cv_header_errno_h_EOVERFLOW], [EOVERFLOW], [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EOVERFLOW_HIDDEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EOVERFLOW_VALUE$])
+m4trace:configure.ac:158: -1- gl_ERROR
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([error.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_ERROR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRERROR_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STRERROR_R_CHAR_P$])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=error:3:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION_INIT
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=error_at_line:5:c-format])
+m4trace:configure.ac:158: -1- gl_EXECUTE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^mode_t$])
+m4trace:configure.ac:158: -1- gl_EXITFAIL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([exitfail.c])
+m4trace:configure.ac:158: -1- gl_FATAL_SIGNAL
+m4trace:configure.ac:158: -1- gt_TYPE_SIG_ATOMIC_T
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^sig_atomic_t$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_PREREQ_SIG_HANDLER_H
+m4trace:configure.ac:158: -1- gl_FUNC_FCNTL
+m4trace:configure.ac:158: -1- gl_FCNTL_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCNTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPENAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCNTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OPENAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCNTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OPENAT$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_fcntl], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" fcntl"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_REPLACE_FCNTL
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_fcntl], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" fcntl"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fcntl.c])
+m4trace:configure.ac:158: -1- gl_REPLACE_FCNTL
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_fcntl], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" fcntl"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fcntl.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FCNTL_DUPFD_BUGGY$])
+m4trace:configure.ac:158: -1- gl_REPLACE_FCNTL
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_fcntl], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" fcntl"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fcntl.c])
+m4trace:configure.ac:158: -1- gl_FCNTL_MODULE_INDICATOR([fcntl])
+m4trace:configure.ac:158: -1- gl_FCNTL_H
+m4trace:configure.ac:158: -1- gl_FCNTL_O_FLAGS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WORKING_O_NOATIME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WORKING_O_NOFOLLOW$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([fcntl.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_fcntl_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" fcntl.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_FCNTL_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
+ ]], [fcntl openat])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([fd-safer-flag])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FD_SAFER_FLAG$])
+m4trace:configure.ac:158: -1- gl_FUNC_FFLUSH
+m4trace:configure.ac:158: -1- gl_REPLACE_FFLUSH
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fflush.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fseeko.c])
+m4trace:configure.ac:158: -1- gl_STDIO_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCLOSE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FFLUSH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FOPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPURGE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPUTC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPUTS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREOPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSEEK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSEEKO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTELL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTELLO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FWRITE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDELIM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLINE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OBSTACK_PRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PERROR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTCHAR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REMOVE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RENAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RENAMEAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STDIO_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VASPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VDPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VFPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VFPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VSNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VSPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPURGE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETDELIM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLINE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_VSNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RENAMEAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VDPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCLOSE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FFLUSH$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FOPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FPURGE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREOPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSEEK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSEEKO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FTELL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FTELLO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETDELIM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETLINE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PERROR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_POPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_REMOVE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RENAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RENAMEAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STDIO_WRITE_FUNCS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VDPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VFPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VSNPRINTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VSPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_FFLUSH
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([fflush])
+m4trace:configure.ac:158: -1- gl_FILE_NAME_CONCAT
+m4trace:configure.ac:158: -1- gl_FILE_NAME_CONCAT_LGPL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([filenamecat-lgpl.c])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mempcpy], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mempcpy"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([filenamecat.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([filenamecat])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FILENAMECAT$])
+m4trace:configure.ac:158: -1- gl_FILE_NAME_CONCAT_LGPL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([filenamecat-lgpl.c])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mempcpy], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mempcpy"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_C_FLEXIBLE_ARRAY_MEMBER
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLEXIBLE_ARRAY_MEMBER$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLEXIBLE_ARRAY_MEMBER$])
+m4trace:configure.ac:158: -1- gl_FLOAT_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([float.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_float_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" float.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_FLOAT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_FLOAT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLOAT_H$])
+m4trace:configure.ac:158: -1- gl_FUNC_FOPEN
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/fopen.m4:7: gl_FUNC_FOPEN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FOPEN_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fopen.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_FOPEN
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([fopen])
+m4trace:configure.ac:158: -1- gl_FOPEN_SAFER
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fopen-safer.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([fopen-safer])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FOPEN_SAFER$])
+m4trace:configure.ac:158: -1- gl_FUNC_FPENDING
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdio_ext_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdio_ext.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func___fpending], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" __fpending"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL___FPENDING$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PENDING_OUTPUT_N_BYTES$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fpending.c])
+m4trace:configure.ac:158: -1- gl_FUNC_FPURGE
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_fpurge], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" fpurge"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func___fpurge], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" __fpurge"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPURGE$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fpurge.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fpurge.c])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([fpurge])
+m4trace:configure.ac:158: -1- gl_FUNC_FREADING
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func___freading], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" __freading"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXP_NO_LIBM
+m4trace:configure.ac:158: -1- gl_MATH_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ACOSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ASINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ATANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CEILF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CEILL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_COSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_EXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FLOORF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FLOORL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREXP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISFINITE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISINF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNAN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNANF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNAND$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LDEXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LOGL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUND$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUNDF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUNDL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGNBIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SQRTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNCF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNCL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ACOSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ASINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ATANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_EXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNAND$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LOGL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SQRTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ACOSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ASINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ATANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COSL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_EXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FREXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_LDEXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_LOGL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SINL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SQRTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TANL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TRUNC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TRUNCF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CEILF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CEILL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FLOORF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FLOORL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREXP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_HUGE_VAL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISFINITE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISINF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISNAN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LDEXPL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NAN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUND$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUNDF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUNDL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SIGNBIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SIGNBIT_USING_GCC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_TRUNCL$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:59: gl_FUNC_FREXP_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXP_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:93: gl_FUNC_FREXP_WORKS is expanded from...
+ltdl/m4/frexp.m4:59: gl_FUNC_FREXP_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([frexp.c])
+m4trace:configure.ac:158: -1- gl_MATH_MODULE_INDICATOR([frexp])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXPL_NO_LIBM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:63: gl_FUNC_FREXPL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXPL_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:102: gl_FUNC_FREXPL_WORKS is expanded from...
+ltdl/m4/frexpl.m4:63: gl_FUNC_FREXPL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([frexpl.c])
+m4trace:configure.ac:158: -1- gl_MATH_MODULE_INDICATOR([frexpl])
+m4trace:configure.ac:158: -1- gl_FUNC_FSEEKO
+m4trace:configure.ac:158: -1- gl_STDIN_LARGE_OFFSET
+m4trace:configure.ac:158: -1- gl_REPLACE_FSEEKO
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fseeko.c])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([fseeko])
+m4trace:configure.ac:158: -1- gl_FUNC_FTELLO
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_FTELLO
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([ftello.c])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([ftello])
+m4trace:configure.ac:158: -1- gl_FUNC_GETDTABLESIZE
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_getdtablesize], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" getdtablesize"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([getdtablesize.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+m4trace:configure.ac:158: -1- AM_GNU_GETTEXT_VERSION([0.17])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBINTL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTLIBINTL$])
+m4trace:configure.ac:158: -1- gl_FUNC_GETTIMEOFDAY
+m4trace:configure.ac:158: -1- AC_C_RESTRICT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:158: -1- gl_HEADER_SYS_TIME_H
+m4trace:configure.ac:158: -1- gl_HEADER_SYS_TIME_H_BODY
+m4trace:configure.ac:158: -1- gl_HEADER_SYS_TIME_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_TIMEVAL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/time.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([sys/time.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/time.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+ ]], [gettimeofday])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_gettimeofday], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" gettimeofday"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([gettimeofday.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_GETTIMEOFDAY
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- gl_FUNC_GETTIMEOFDAY_CLOBBER
+m4trace:configure.ac:158: -1- gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([gettimeofday.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_GETTIMEOFDAY
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^gmtime$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^localtime$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GETTIMEOFDAY_CLOBBERS_LOCALTIME$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([gettimeofday.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_GETTIMEOFDAY
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GETTIMEOFDAY_TIMEZONE$])
+m4trace:configure.ac:158: -1- gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+m4trace:configure.ac:158: -1- AM_ICONV
+m4trace:configure.ac:158: -1- AM_ICONV_LINK
+m4trace:configure.ac:158: -1- AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+m4trace:configure.ac:158: -1- AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ICONV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBICONV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTLIBICONV$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_CONST$])
+m4trace:configure.ac:158: -1- gl_ICONV_H
+m4trace:configure.ac:158: -1- gl_ICONV_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV_OPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV_UTF$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_H$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([iconv.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_iconv_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" iconv.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_ICONV_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_ICONV_H$])
+m4trace:configure.ac:158: -1- gl_FUNC_ICONV_OPEN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_FLAVOR$])
+m4trace:configure.ac:158: -1- gl_REPLACE_ICONV_OPEN
+m4trace:configure.ac:158: -1- gl_REPLACE_ICONV_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([iconv_open.c])
+m4trace:configure.ac:158: -1- gl_INLINE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INLINE$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_H
+m4trace:configure.ac:158: -1- gl_STDINT_H
+m4trace:configure.ac:158: -1- AC_TYPE_LONG_LONG_INT
+m4trace:configure.ac:158: -1- _AC_TYPE_LONG_LONG_SNIPPET
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AC_TYPE_UNSIGNED_LONG_LONG_INT
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TYPES_H$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stdint.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdint_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdint.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDINT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDINT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_BITYPES_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wchar_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wchar.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_STDINT_TYPE_PROPERTIES
+m4trace:configure.ac:158: -1- gl_MULTIARCH
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AA_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [gl_STDINT_INCLUDES
+#include <limits.h>], [result=unknown])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_PTRDIFF_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIZE_T$])
+m4trace:configure.ac:158: -1- gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [gl_STDINT_INCLUDES
+#include <limits.h>], [result=unknown])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WCHAR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WINT_T$])
+m4trace:configure.ac:158: -1- gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WCHAR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WINT_T$])
+m4trace:configure.ac:158: -1- gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PTRDIFF_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_T_SUFFIX$])
+m4trace:configure.ac:158: -1- gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIG_ATOMIC_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCHAR_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WINT_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDINT_H$])
+m4trace:configure.ac:158: -1- gt_INTTYPES_PRI
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/inttypes-pri.m4:14: gt_INTTYPES_PRI is expanded from...
+ltdl/m4/inttypes.m4:10: gl_INTTYPES_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRI_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRI_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_inttypes_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" inttypes.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_imaxabs], [_AC_CHECK_DECLS([imaxabs])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXABS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_imaxdiv], [_AC_CHECK_DECLS([imaxdiv])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXDIV$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_strtoimax], [_AC_CHECK_DECLS([strtoimax])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOIMAX$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_strtoumax], [_AC_CHECK_DECLS([strtoumax])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOUMAX$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_IMAXABS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_IMAXDIV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOIMAX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOUMAX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXABS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXDIV$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOIMAX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOUMAX$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([inttypes.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_inttypes_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" inttypes.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_TRIGGER_STDC_LIMIT_MACROS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRIPTR_PREFIX$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION([INT32_MAX_LT_INTMAX_MAX], [defined INT32_MAX && defined INTMAX_MAX], [INT32_MAX < INTMAX_MAX], [sizeof (int) < sizeof (long long int)])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INT32_MAX_LT_INTMAX_MAX$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION([INT64_MAX_EQ_LONG_MAX], [defined INT64_MAX], [INT64_MAX == LONG_MAX], [sizeof (long long int) == sizeof (long int)])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INT64_MAX_EQ_LONG_MAX$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION([UINT32_MAX_LT_UINTMAX_MAX], [defined UINT32_MAX && defined UINTMAX_MAX], [UINT32_MAX < UINTMAX_MAX], [sizeof (unsigned int) < sizeof (unsigned long long int)])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UINT32_MAX_LT_UINTMAX_MAX$])
+m4trace:configure.ac:158: -1- gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION([UINT64_MAX_EQ_ULONG_MAX], [defined UINT64_MAX], [UINT64_MAX == ULONG_MAX], [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UINT64_MAX_EQ_ULONG_MAX$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
+ ]], [imaxabs imaxdiv strtoimax strtoumax])
+m4trace:configure.ac:158: -1- gl_FUNC_ISNAND_NO_LIBM
+m4trace:configure.ac:158: -1- gl_HAVE_ISNAND_NO_LIBM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnand.m4:77: gl_HAVE_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/isnand.m4:34: gl_FUNC_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNAND_IN_LIBC$])
+m4trace:configure.ac:158: -1- gl_BUILD_ISNAND
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([isnand.c])
+m4trace:configure.ac:158: -1- gl_DOUBLE_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentd.m4:6: gl_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnand.m4:46: gl_BUILD_ISNAND is expanded from...
+ltdl/m4/isnand.m4:34: gl_FUNC_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_FUNC_ISNANF_NO_LIBM
+m4trace:configure.ac:158: -1- gl_HAVE_ISNANF_NO_LIBM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanf.m4:69: gl_HAVE_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_ISNANF_WORKS
+m4trace:configure.ac:158: -1- gl_FLOAT_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanf.m4:116: gl_ISNANF_WORKS is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanf.m4:116: gl_ISNANF_WORKS is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANF_IN_LIBC$])
+m4trace:configure.ac:158: -1- gl_BUILD_ISNANF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([isnanf.c])
+m4trace:configure.ac:158: -1- gl_FLOAT_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanf.m4:62: gl_BUILD_ISNANF is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_FUNC_ISNANL_NO_LIBM
+m4trace:configure.ac:158: -1- gl_HAVE_ISNANL_NO_LIBM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanl.m4:65: gl_HAVE_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_ISNANL_WORKS
+m4trace:configure.ac:158: -1- gl_BIGENDIAN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanl.m4:114: gl_FUNC_ISNANL_WORKS is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANL_IN_LIBC$])
+m4trace:configure.ac:158: -1- gl_BUILD_ISNANL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([isnanl.c])
+m4trace:configure.ac:158: -1- gl_LONG_DOUBLE_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentl.m4:6: gl_LONG_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanl.m4:58: gl_BUILD_ISNANL is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_LANGINFO_H
+m4trace:configure.ac:158: -1- gl_LANGINFO_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([langinfo.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_langinfo_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" langinfo.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_LANGINFO_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_langinfo_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" langinfo.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_CODESET$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_ERA$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
+ ]], [nl_langinfo])
+m4trace:configure.ac:158: -1- gl_LIST
+m4trace:configure.ac:158: -1- gl_LOCALCHARSET
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_getc_unlocked], [_AC_CHECK_DECLS([getc_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETC_UNLOCKED$])
+m4trace:configure.ac:158: -1- gl_GLIBC21
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GLIBC21$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALCHARSET_TESTS_ENVIRONMENT$])
+m4trace:configure.ac:158: -1- gl_FUNC_LSEEK
+m4trace:configure.ac:158: -1- gl_REPLACE_LSEEK
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([lseek.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LSEEK_PIPE_BROKEN$])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([lseek])
+m4trace:configure.ac:158: -1- gl_FUNC_LSTAT
+m4trace:configure.ac:158: -1- gl_SYS_STAT_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHMODAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSTATAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FUTIMENS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LCHMOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LSTAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKDIRAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKFIFO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKFIFOAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKNOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKNODAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UTIMENSAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCHMODAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FSTATAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FUTIMENS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LCHMOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LSTAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDIRAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKFIFO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKFIFOAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKNOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKNODAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UTIMENSAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSTAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSTATAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUTIMENS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LSTAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKDIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKFIFO$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKNOD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STAT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UTIMENSAT$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_lstat], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" lstat"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([lstat.c])
+m4trace:configure.ac:158: -1- gl_SYS_STAT_MODULE_INDICATOR([lstat])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([malloc.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^malloc$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MALLOC_GNU$])
+m4trace:configure.ac:158: -1- gl_FUNC_MALLOC_POSIX
+m4trace:configure.ac:158: -1- gl_CHECK_MALLOC_POSIX
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/malloc.m4:27: gl_CHECK_MALLOC_POSIX is expanded from...
+ltdl/m4/malloc.m4:11: gl_FUNC_MALLOC_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([malloc.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+m4trace:configure.ac:158: -1- gl_MALLOCA
+m4trace:configure.ac:158: -1- gl_EEMALLOC
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MALLOC_0_IS_NONNULL$])
+m4trace:configure.ac:158: -1- gl_MATH_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([math.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_math_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" math.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_MATH_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_MATH_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <math.h>
+ ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl
+ ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl])
+m4trace:configure.ac:158: -1- gl_MBCHAR
+m4trace:configure.ac:158: -1- gl_MBITER
+m4trace:configure.ac:158: -1- AC_TYPE_MBSTATE_T
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSTATE_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^mbstate_t$])
+m4trace:configure.ac:158: -1- AC_FUNC_MBRTOWC
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRTOWC$])
+m4trace:configure.ac:158: -1- gl_FUNC_MBRTOWC
+m4trace:configure.ac:158: -1- gl_MBSTATE_T_BROKEN
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbsinit], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbsinit"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbrtowc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbrtowc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_INCOMPLETE_STATE
+m4trace:configure.ac:158: -1- gt_LOCALE_JA
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_SANITYCHECK
+m4trace:configure.ac:158: -1- gt_LOCALE_ZH_CN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbrtowc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbrtowc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_NULL_ARG
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:191: gl_MBRTOWC_NULL_ARG is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_RETVAL
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:240: gl_MBRTOWC_RETVAL is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_NUL_RETVAL
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:308: gl_MBRTOWC_NUL_RETVAL is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_NULL_ARG_BUG$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_RETVAL_BUG$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_NUL_RETVAL_BUG$])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([mbrtowc.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_MBRTOWC
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+m4trace:configure.ac:158: -1- gl_FUNC_MBSINIT
+m4trace:configure.ac:158: -1- gl_MBSTATE_T_BROKEN
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbsinit], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbsinit"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbrtowc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbrtowc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_INCOMPLETE_STATE
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbsinit.m4:7: gl_FUNC_MBSINIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_SANITYCHECK
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbsinit.m4:7: gl_FUNC_MBSINIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbsinit], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbsinit"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([mbsinit.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_MBSINIT
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([mbsinit])
+m4trace:configure.ac:158: -1- gl_MBSLEN
+m4trace:configure.ac:158: -1- gl_HEADER_STRING_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMPCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMRCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STPCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STPNCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRCHRNUL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRNDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRNLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRPBRK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRCASESTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOK_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSRCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCASECMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNCASECMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSPCASECMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCASESTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCSPN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSPBRK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSPN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSTOK_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRERROR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSIGNAL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRVERSCMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMPCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMRCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STPCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STPNCPY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCHRNUL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNLEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRPBRK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRSEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCASESTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOK_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRSIGNAL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRVERSCMP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MEMCHR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MEMMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRSTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRCASESTR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRERROR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRNDUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRSIGNAL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRTOK_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNDEFINE_STRTOK_R$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbslen], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbslen"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([mbslen])
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([mbsstr])
+m4trace:configure.ac:158: -1- gl_MBITER
+m4trace:configure.ac:158: -1- gl_FUNC_MEMCHR
+m4trace:configure.ac:158: -1- gl_FUNC_MMAP_ANON
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_mman_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/mman.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mprotect], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mprotect"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMCHR$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- gl_PREREQ_MEMCHR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BP_SYM_H$])
+m4trace:configure.ac:158: -1- gl_PREREQ_MEMCHR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BP_SYM_H$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([memchr.c])
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([memchr])
+m4trace:configure.ac:158: -1- gl_FUNC_MEMMEM
+m4trace:configure.ac:158: -1- gl_FUNC_MEMMEM_SIMPLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMMEM$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_memmem], [_AC_CHECK_DECLS([memmem])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMMEM$])
+m4trace:configure.ac:158: -1- gl_PREREQ_MEMMEM
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([memmem.c])
+m4trace:configure.ac:158: -1- gl_FUNC_MEMMEM_SIMPLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMMEM$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_memmem], [_AC_CHECK_DECLS([memmem])])
+m4trace:configure.ac:158: -1- gl_PREREQ_MEMMEM
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([memmem])
+m4trace:configure.ac:158: -1- gt_FUNC_MKDTEMP
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDTEMP$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- gl_PREREQ_MKDTEMP
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([mkdtemp])
+m4trace:configure.ac:158: -1- gl_FUNC_MKSTEMP
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([mkstemp.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_MKSTEMP
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([mkstemp])
+m4trace:configure.ac:158: -1- gl_MULTIARCH
+m4trace:configure.ac:158: -1- gl_FUNC_NL_LANGINFO
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_nl_langinfo], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" nl_langinfo"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([nl_langinfo.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([nl_langinfo.c])
+m4trace:configure.ac:158: -1- gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OBSTACK$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([obstack.c])
+m4trace:configure.ac:158: -1- gl_FUNC_OBSTACK_PRINTF_POSIX
+m4trace:configure.ac:158: -1- gl_PRINTF_SIZES_C99
+m4trace:configure.ac:158: -1- gl_AC_HEADER_STDINT_H
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/stdint_h.m4:12: gl_AC_HEADER_STDINT_H is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H_WITH_UINTMAX$])
+m4trace:configure.ac:158: -1- gl_AC_HEADER_INTTYPES_H
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/inttypes_h.m4:12: gl_AC_HEADER_INTTYPES_H is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H_WITH_UINTMAX$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:88: gl_PRINTF_LONG_DOUBLE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_INFINITE
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:132: gl_PRINTF_INFINITE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CHECK_PRINTF_SAFE$])
+m4trace:configure.ac:158: -2- GL_NOCRASH
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:237: gl_PRINTF_INFINITE_LONG_DOUBLE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:462: gl_PRINTF_DIRECTIVE_A is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:542: gl_PRINTF_DIRECTIVE_F is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_DIRECTIVE_N
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:593: gl_PRINTF_DIRECTIVE_N is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:635: gl_PRINTF_DIRECTIVE_LS is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_POSITIONS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:710: gl_PRINTF_POSITIONS is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:747: gl_PRINTF_FLAG_GROUPING is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:783: gl_PRINTF_FLAG_LEFTADJUST is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:824: gl_PRINTF_FLAG_ZERO is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_PRECISION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:864: gl_PRINTF_PRECISION is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PRINTF_ENOMEM
+m4trace:configure.ac:158: -2- GL_NOCRASH
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_obstack_printf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" obstack_printf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gt_TYPE_WCHAR_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wchar_t.m4:11: gt_TYPE_WCHAR_T is expanded from...
+ltdl/m4/vasnprintf.m4:33: gl_PREREQ_PRINTF_ARGS is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- gt_TYPE_WINT_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wint_t.m4:11: gt_TYPE_WINT_T is expanded from...
+ltdl/m4/vasnprintf.m4:33: gl_PREREQ_PRINTF_ARGS is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^size_t$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gt_AC_TYPE_INTMAX_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intmax_t.m4:36: gt_AC_TYPE_INTMAX_T is expanded from...
+ltdl/m4/vasnprintf.m4:41: gl_PREREQ_PRINTF_PARSE is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTMAX_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^intmax_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL__SNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_REPLACE_OBSTACK_PRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([obstack_printf.c])
+m4trace:configure.ac:158: -1- gl_DECL_OBSTACK_PRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_obstack_printf], [_AC_CHECK_DECLS([obstack_printf])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([obstack-printf-posix])
+m4trace:configure.ac:158: -1- gl_FUNC_OPEN
+m4trace:configure.ac:158: -1- gl_REPLACE_OPEN
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([open.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_OPEN
+m4trace:configure.ac:158: -1- gl_PROMOTED_TYPE_MODE_T
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PROMOTED_MODE_T$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_lstat], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" lstat"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/open.m4:7: gl_FUNC_OPEN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^OPEN_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- gl_REPLACE_OPEN
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([open.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_OPEN
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([open])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPEN$])
+m4trace:configure.ac:158: -1- gl_FCNTL_MODULE_INDICATOR([open])
+m4trace:configure.ac:158: -1- gl_LIST
+m4trace:configure.ac:158: -1- gl_PATHMAX
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_pathconf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" pathconf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_param_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/param.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_PIPE
+m4trace:configure.ac:158: -1- gl_FUNC_PIPE2
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_pipe2], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" pipe2"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([pipe2])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([pipe2-safer])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PIPE2_SAFER$])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN_BODY
+m4trace:configure.ac:158: -1- gl_SPAWN_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_INIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETFLAGS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETFLAGS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETPGROUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETPGROUP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSIGMASK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSIGMASK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_DESTROY$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWNATTR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN_FILE_ACTIONS_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_posix_spawn], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" posix_spawn"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2736: AC_RUN_IFELSE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/posix_spawn.m4:59: gl_POSIX_SPAWN_WORKS is expanded from...
+ltdl/m4/posix_spawn.m4:13: gl_POSIX_SPAWN_BODY is expanded from...
+ltdl/m4/posix_spawn.m4:8: gl_POSIX_SPAWN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawn_faction_addclose.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addclose])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawn_faction_adddup2.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_adddup2])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawn_faction_addopen.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addopen])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawn_faction_destroy.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_destroy])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawn_faction_init.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_init])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawnattr_destroy.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_destroy])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawnattr_init.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_init])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawnattr_setflags.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setflags])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawnattr_setsigmask.c])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setsigmask])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawnp.c])
+m4trace:configure.ac:158: -1- gl_POSIX_SPAWN_INTERNAL
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([spawni.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PATHS_H$])
+m4trace:configure.ac:158: -1- gl_SPAWN_MODULE_INDICATOR([posix_spawnp])
+m4trace:configure.ac:158: -1- gl_FUNC_PRINTF_FREXP
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXP_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:93: gl_FUNC_FREXP_WORKS is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LDEXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- gl_FUNC_PRINTF_FREXPL
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_FREXPL_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:102: gl_FUNC_FREXPL_WORKS is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_FUNC_LDEXPL_WORKS
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ldexpl.m4:65: gl_FUNC_LDEXPL_WORKS is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LDEXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PROGRAM_INVOCATION_NAME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME$])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])
+m4trace:configure.ac:158: -1- gl_QUOTE
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([quote.c])
+m4trace:configure.ac:158: -1- gl_QUOTEARG
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([quotearg.c])
+m4trace:configure.ac:158: -1- gl_FUNC_RAWMEMCHR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- gl_PREREQ_RAWMEMCHR
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([rawmemchr])
+m4trace:configure.ac:158: -1- gl_FUNC_READLINK
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_readlink], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" readlink"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([readlink.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_READLINK
+m4trace:configure.ac:158: -1- m4_pattern_allow([^READLINK_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([readlink.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([readlink.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([readlink])
+m4trace:configure.ac:158: -1- gl_REGEX
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_locale_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" locale.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^_REGEX_LARGE_OFFSETS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_syntax_options$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_set_syntax$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_compile_pattern$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_compile_fastmap$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_search$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_search_2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_match$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_match_2$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_set_registers$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_comp$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_exec$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regcomp$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regexec$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regerror$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regfree$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([regex.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_REGEX
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LIBINTL_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_isblank], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" isblank"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_iswctype], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" iswctype"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_wcscoll], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" wcscoll"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ISBLANK$])
+m4trace:configure.ac:158: -1- gl_FUNC_RENAME
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_lstat], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" lstat"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([rename.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_TRAILING_SLASH_DEST_BUG$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([rename.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_TRAILING_SLASH_SOURCE_BUG$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([rename.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_HARD_LINK_BUG$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([rename.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_DEST_EXISTS_BUG$])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([rename])
+m4trace:configure.ac:158: -1- gl_FUNC_RMDIR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RMDIR$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([rmdir.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([rmdir])
+m4trace:configure.ac:158: -1- gl_SCHED_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([sched.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sched_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sched.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SCHED_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SCHED_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sched_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sched.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SCHED_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SCHED_PARAM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SCHED_H$])
+m4trace:configure.ac:158: -1- gl_FUNC_SETENV
+m4trace:configure.ac:158: -1- gl_FUNC_SETENV_SEPARATE
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_setenv], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" setenv"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([setenv.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SETENV
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SEARCH_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TSEARCH$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([setenv.c])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([setenv])
+m4trace:configure.ac:158: -1- gl_SIGACTION
+m4trace:configure.ac:158: -1- gl_SIGNAL_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGNAL_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGPROCMASK$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGACTION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SIGNALBLOCKING$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGACTION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TYPE_VOLATILE_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_sigaction], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigaction"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([sigaction.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SIGACTION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^uid_t$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^gid_t$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_sigaltstack], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigaltstack"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_siginterrupt], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" siginterrupt"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:158: -1- gl_SIGNAL_MODULE_INDICATOR([sigaction])
+m4trace:configure.ac:158: -1- gl_SIGNAL_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([signal.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_signal_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" signal.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SIGNAL_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+m4trace:configure.ac:158: -1- gl_SIGNBIT
+m4trace:configure.ac:158: -2- gl_SIGNBIT_TEST_PROGRAM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -2- gl_SIGNBIT_TEST_PROGRAM
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([signbitf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([signbitd.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([signbitl.c])
+m4trace:configure.ac:158: -1- gl_FLOAT_SIGN_LOCATION
+m4trace:configure.ac:158: -1- gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:194: gl_FLOAT_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- gl_DOUBLE_SIGN_LOCATION
+m4trace:configure.ac:158: -1- gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:199: gl_DOUBLE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- gl_LONG_DOUBLE_SIGN_LOCATION
+m4trace:configure.ac:158: -1- gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:204: gl_LONG_DOUBLE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGNF$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGNF_IN_LIBC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGN$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGN_IN_LIBC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGNL$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGNL_IN_LIBC$])
+m4trace:configure.ac:158: -1- gl_MATH_MODULE_INDICATOR([signbit])
+m4trace:configure.ac:158: -1- gl_SIGNALBLOCKING
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([sigprocmask.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SIGPROCMASK
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+m4trace:configure.ac:158: -1- gl_SIZE_MAX
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1], [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)], [#include <stddef.h>], [fits_in_uint=])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/size_max.m4:9: gl_SIZE_MAX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_MAX$])
+m4trace:configure.ac:158: -1- gl_FUNC_SNPRINTF
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SNPRINTF$])
+m4trace:configure.ac:158: -1- gl_SNPRINTF_SIZE1
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1226: gl_SNPRINTF_SIZE1 is expanded from...
+ltdl/m4/snprintf.m4:7: gl_FUNC_SNPRINTF is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_SNPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([snprintf.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_snprintf], [_AC_CHECK_DECLS([snprintf])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([snprintf])
+m4trace:configure.ac:158: -1- gl_FUNC_SNPRINTF_POSIX
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SNPRINTF$])
+m4trace:configure.ac:158: -1- gl_SNPRINTF_TRUNCATION_C99
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1027: gl_SNPRINTF_TRUNCATION_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_SNPRINTF_RETVAL_C99
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1104: gl_SNPRINTF_RETVAL_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_SNPRINTF_DIRECTIVE_N
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1161: gl_SNPRINTF_DIRECTIVE_N is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_SNPRINTF_SIZE1
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1226: gl_SNPRINTF_SIZE1 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_VSNPRINTF_ZEROSIZE_C99
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1282: gl_VSNPRINTF_ZEROSIZE_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_REPLACE_SNPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([snprintf.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SNPRINTF
+m4trace:configure.ac:158: -1- gl_SPAWN_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([spawn.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_spawn_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" spawn.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SPAWN_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SPAWN_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_spawn_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" spawn.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWNATTR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN_FILE_ACTIONS_T$])
+m4trace:configure.ac:158: -1- gl_REPLACE_SPAWN_H
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SPAWN_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <spawn.h>
+ ]], [posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy
+ posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault
+ posix_spawnattr_getsigmask posix_spawnattr_setsigmask
+ posix_spawnattr_getflags posix_spawnattr_setflags
+ posix_spawnattr_getpgroup posix_spawnattr_setpgroup
+ posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy
+ posix_spawnattr_getschedparam posix_spawnattr_setschedparam
+ posix_spawn_file_actions_init posix_spawn_file_actions_destroy
+ posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose
+ posix_spawwn_file_actions_adddup2])
+m4trace:configure.ac:158: -1- gl_FUNC_SPRINTF_POSIX
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_REPLACE_SPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([sprintf.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_SPRINTF
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([sprintf-posix])
+m4trace:configure.ac:158: -1- gt_TYPE_SSIZE_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ssize_t.m4:10: gt_TYPE_SSIZE_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ssize_t$])
+m4trace:configure.ac:158: -1- gl_FUNC_STAT
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_lstat], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" lstat"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUNC_STAT_DIR$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUNC_STAT_FILE$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([stat.c])
+m4trace:configure.ac:158: -1- gl_SYS_STAT_MODULE_INDICATOR([stat])
+m4trace:configure.ac:158: -1- gl_STDARG_H
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDARG_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDARG_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/stdarg.m4:10: gl_STDARG_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stdarg.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdarg_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdarg.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDARG_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDARG_H$])
+m4trace:configure.ac:158: -1- gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+ [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/gnulib-common.m4:136: gl_CACHE_VAL_SILENT is expanded from...
+ltdl/m4/stdarg.m4:10: gl_STDARG_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^va_copy$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^va_copy$])
+m4trace:configure.ac:158: -1- AM_STDBOOL_H
+m4trace:configure.ac:158: -1- AC_HEADER_STDBOOL
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/stdbool.m4:37: AC_HEADER_STDBOOL is expanded from...
+ltdl/m4/stdbool.m4:10: AM_STDBOOL_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__BOOL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDBOOL_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__BOOL$])
+m4trace:configure.ac:158: -1- gl_STDDEF_H
+m4trace:configure.ac:158: -1- gl_STDDEF_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NULL$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDDEF_H$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stddef.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stddef_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stddef.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDDEF_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H$])
+m4trace:configure.ac:158: -1- gl_STDINT_H
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TYPES_H$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stdint.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdint_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdint.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDINT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDINT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_INTTYPES_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_BITYPES_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wchar_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wchar.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_STDINT_TYPE_PROPERTIES
+m4trace:configure.ac:158: -1- gl_STDINT_BITSIZEOF([ptrdiff_t size_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [gl_STDINT_INCLUDES
+#include <limits.h>], [result=unknown])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_PTRDIFF_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIZE_T$])
+m4trace:configure.ac:158: -1- gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT], [gl_STDINT_INCLUDES
+#include <limits.h>], [result=unknown])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WCHAR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WINT_T$])
+m4trace:configure.ac:158: -1- gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WCHAR_T$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WINT_T$])
+m4trace:configure.ac:158: -1- gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PTRDIFF_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_T_SUFFIX$])
+m4trace:configure.ac:158: -1- gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t], [gl_STDINT_INCLUDES])
+m4trace:configure.ac:158: -1- gl_STDINT_INCLUDES
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIG_ATOMIC_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCHAR_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WINT_T_SUFFIX$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDINT_H$])
+m4trace:configure.ac:158: -1- gl_STDIO_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stdio.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdio_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdio.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDIO_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDIO_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+ ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+ snprintf vdprintf vsnprintf])
+m4trace:configure.ac:158: -1- gl_STDLIB_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([stdlib.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_stdlib_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" stdlib.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDLIB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_RANDOM_DATA$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+ ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp
+ mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r
+ setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv])
+m4trace:configure.ac:158: -1- gl_STDLIB_SAFER
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([mkstemp-safer.c])
+m4trace:configure.ac:158: -1- gl_MODULE_INDICATOR([stdlib-safer])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STDLIB_SAFER$])
+m4trace:configure.ac:158: -1- gl_FUNC_STRCHRNUL
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCHRNUL$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- gl_PREREQ_STRCHRNUL
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([strchrnul])
+m4trace:configure.ac:158: -1- gl_FUNC_STRERROR
+m4trace:configure.ac:158: -1- gl_FUNC_STRERROR_SEPARATE
+m4trace:configure.ac:158: -1- gl_PREREQ_STRERROR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_socket_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/socket.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINSOCK2_H$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strerror.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRERROR$])
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([strerror])
+m4trace:configure.ac:158: -1- gl_HEADER_STRING_H
+m4trace:configure.ac:158: -1- gl_HEADER_STRING_H_BODY
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([string.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_string_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" string.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STRING_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STRING_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <string.h>
+ ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
+ strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp])
+m4trace:configure.ac:158: -1- gl_FUNC_STRNDUP
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_strndup], [_AC_CHECK_DECLS([strndup])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNDUP$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_strndup], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" strndup"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strndup.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strndup.c])
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([strndup])
+m4trace:configure.ac:158: -1- gl_FUNC_STRNLEN
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_strnlen], [_AC_CHECK_DECLS([strnlen])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNLEN$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strnlen.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^strnlen$])
+m4trace:configure.ac:158: -1- gl_PREREQ_STRNLEN
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([strnlen])
+m4trace:configure.ac:158: -1- gl_FUNC_STRTOD
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POW_LIB$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strtod.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_STRTOD
+m4trace:configure.ac:158: -1- gl_PREREQ_STRTOD
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([strtod.c])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([strtod])
+m4trace:configure.ac:158: -1- gl_FUNC_STRTOL
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOL$])
+m4trace:configure.ac:158: -1- M4_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- gl_HEADER_SYS_STAT_H
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STAT_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([sys/stat.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_stat_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/stat.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_STAT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^nlink_t$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+ ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+ mknod mknodat stat utimensat])
+m4trace:configure.ac:158: -1- AC_PROG_MKDIR_P
+m4trace:configure.ac:158: -1- gl_HEADER_SYS_TIME_H
+m4trace:configure.ac:158: -1- AC_PROG_MKDIR_P
+m4trace:configure.ac:158: -1- gl_SYS_WAIT_H
+m4trace:configure.ac:158: -1- gl_SYS_WAIT_H_DEFAULTS
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([sys/wait.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_wait_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/wait.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_WAIT_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H$])
+m4trace:configure.ac:158: -1- AC_PROG_MKDIR_P
+m4trace:configure.ac:158: -1- gl_FUNC_GEN_TEMPNAME
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([tempname.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_TEMPNAME
+m4trace:configure.ac:158: -1- gl_HEADER_TIME_H
+m4trace:configure.ac:158: -1- gl_HEADER_TIME_H_BODY
+m4trace:configure.ac:158: -1- gl_HEADER_TIME_H_DEFAULTS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LOCALTIME_R$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKTIME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NANOSLEEP$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRPTIME$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_TIMEGM$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([time.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" time.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_TIME_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_TIME_H$])
+m4trace:configure.ac:158: -1- gl_CHECK_TYPE_STRUCT_TIMESPEC
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_time_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/time.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^TIME_H_DEFINES_STRUCT_TIMESPEC$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC$])
+m4trace:configure.ac:158: -1- gt_TMPDIR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE___SECURE_GETENV$])
+m4trace:configure.ac:158: -1- gl_UNISTD_H
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([unistd.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_UNISTD_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNISTD_H$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+ ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
+ fsync ftruncate getcwd getdomainname getdtablesize getgroups
+ gethostname getlogin getlogin_r getpagesize getusershell setusershell
+ endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
+ rmdir sleep symlink symlinkat unlink unlinkat usleep])
+m4trace:configure.ac:158: -1- gl_UNISTD_SAFER
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_pipe], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" pipe"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([dup-safer.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([fd-safer.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([pipe-safer.c])
+m4trace:configure.ac:158: -1- gl_FUNC_GLIBC_UNLOCKED_IO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^USE_UNLOCKED_IO$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_clearerr_unlocked], [_AC_CHECK_DECLS([clearerr_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_CLEARERR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_feof_unlocked], [_AC_CHECK_DECLS([feof_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FEOF_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_ferror_unlocked], [_AC_CHECK_DECLS([ferror_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FERROR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fflush_unlocked], [_AC_CHECK_DECLS([fflush_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FFLUSH_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fgets_unlocked], [_AC_CHECK_DECLS([fgets_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FGETS_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fputc_unlocked], [_AC_CHECK_DECLS([fputc_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPUTC_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fputs_unlocked], [_AC_CHECK_DECLS([fputs_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPUTS_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fread_unlocked], [_AC_CHECK_DECLS([fread_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FREAD_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_fwrite_unlocked], [_AC_CHECK_DECLS([fwrite_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FWRITE_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_getc_unlocked], [_AC_CHECK_DECLS([getc_unlocked])])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_getchar_unlocked], [_AC_CHECK_DECLS([getchar_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETCHAR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_putc_unlocked], [_AC_CHECK_DECLS([putc_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PUTC_UNLOCKED$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_putchar_unlocked], [_AC_CHECK_DECLS([putchar_unlocked])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PUTCHAR_UNLOCKED$])
+m4trace:configure.ac:158: -1- gl_FUNC_UNSETENV
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSETENV$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([unsetenv.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_UNSETENV
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_unistd_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" unistd.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/setenv.m4:44: gl_FUNC_UNSETENV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^VOID_UNSETENV$])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([unsetenv.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([unsetenv.c])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([unsetenv])
+m4trace:configure.ac:158: -1- gl_FUNC_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_FUNC_VASNPRINTF_POSIX
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_FUNC_VASPRINTF
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asprintf.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASPRINTF_H
+m4trace:configure.ac:158: -1- gl_PREREQ_VASPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASPRINTF
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([vasprintf])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=vasprintf:2:c-format])
+m4trace:configure.ac:158: -1- gl_FUNC_VASPRINTF_POSIX
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_REPLACE_VASPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asprintf.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASPRINTF_H
+m4trace:configure.ac:158: -1- gl_PREREQ_VASPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASPRINTF
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=verror:3:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=verror_at_line:5:c-format])
+m4trace:configure.ac:158: -1- gl_FUNC_VFPRINTF_POSIX
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_FLAG_ZERO
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_PRECISION
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF_ENOMEM
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- gl_REPLACE_VASNPRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_vasnprintf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" vasnprintf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vasnprintf.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-args.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([printf-parse.c])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([asnprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_ARGS
+m4trace:configure.ac:158: -1- gl_PREREQ_PRINTF_PARSE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VASNPRINTF
+m4trace:configure.ac:158: -1- gl_PREREQ_ASNPRINTF
+m4trace:configure.ac:158: -1- gl_REPLACE_VFPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vfprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VFPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VFPRINTF
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
+m4trace:configure.ac:158: -1- gl_FUNC_VPRINTF_POSIX
+m4trace:configure.ac:158: -1- gl_REPLACE_VPRINTF
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([vprintf.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- gl_PREREQ_VPRINTF
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([vprintf-posix])
+m4trace:configure.ac:158: -1- gl_WAIT_PROCESS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WAITID$])
+m4trace:configure.ac:158: -1- gl_WCHAR_H
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wchar_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wchar.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([wchar.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wchar_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wchar.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_WCHAR_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_WCHAR_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- gl_WARN_ON_USE_PREPARE([[
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+ wcsrtombs wcsnrtombs wcwidth])
+m4trace:configure.ac:158: -1- gl_FUNC_WCRTOMB
+m4trace:configure.ac:158: -1- gl_MBSTATE_T_BROKEN
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbsinit], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbsinit"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mbrtowc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mbrtowc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_INCOMPLETE_STATE
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_MBRTOWC_SANITYCHECK
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_wcrtomb], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" wcrtomb"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([wcrtomb.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_WCRTOMB
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+m4trace:configure.ac:158: -1- gl_WCTYPE_H
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_iswcntrl], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" iswcntrl"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISWCNTRL$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wctype_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wctype.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- gl_CHECK_NEXT_HEADERS([wctype.h])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wctype_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wctype.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_WCTYPE_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCTYPE_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCTYPE_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISWCNTRL$])
+m4trace:configure.ac:158: -1- gl_FUNC_WCWIDTH
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_wchar_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" wchar.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_wcwidth], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" wcwidth"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCWIDTH$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wcwidth.m4:7: gl_FUNC_WCWIDTH is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([wcwidth.c])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([wcwidth])
+m4trace:configure.ac:158: -1- gl_XALLOC
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([xmalloc.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_XALLOC
+m4trace:configure.ac:158: -1- gl_PREREQ_XMALLOC
+m4trace:configure.ac:158: -1- gl_LIST
+m4trace:configure.ac:158: -1- M4_LIBSOURCES([xmemdup0.c])
+m4trace:configure.ac:158: -1- gl_LIST
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=xprintf:1:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=xvprintf:1:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=xfprintf:2:c-format])
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=xvfprintf:2:c-format])
+m4trace:configure.ac:158: -1- gl_XSIZE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- gl_XSTRNDUP
+m4trace:configure.ac:158: -1- gl_PREREQ_XSTRNDUP
+m4trace:configure.ac:158: -1- gl_XVASPRINTF
+m4trace:configure.ac:158: -1- AM_XGETTEXT_OPTION([--flag=xasprintf:1:c-format])
+m4trace:configure.ac:158: -1- gl_COMMON
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_TR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_TR_UTF8$])
+m4trace:configure.ac:158: -1- gl_FUNC_UNGETC_WORKS
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FUNC_UNGETC_BROKEN$])
+m4trace:configure.ac:158: -1- gl_FUNC_UNGETC_WORKS
+m4trace:configure.ac:158: -1- gl_FUNC_GETPAGESIZE
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OS_H$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_PARAM_H$])
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([getpagesize.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([getpagesize])
+m4trace:configure.ac:158: -1- gl_DOUBLE_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentd.m4:6: gl_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_FLOAT_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_LONG_DOUBLE_EXPONENT_LOCATION
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentl.m4:6: gl_LONG_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- gl_FUNC_LINK
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_link], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" link"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([link.c])
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([link.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([link])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gt_LOCALE_JA
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- gt_LOCALE_ZH_CN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gt_LOCALE_ZH_CN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- gl_FUNC_MMAP_ANON
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_mman_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/mman.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mprotect], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mprotect"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_FUNC_MMAP_ANON
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Header_sys_mman_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" sys/mman.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_mprotect], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mprotect"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_alarm], [_AC_CHECK_DECLS([alarm])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ALARM$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gl_FUNC_OBSTACK_PRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_obstack_printf], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" obstack_printf"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_REPLACE_OBSTACK_PRINTF
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([obstack_printf.c])
+m4trace:configure.ac:158: -1- gl_DECL_OBSTACK_PRINTF
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_obstack_printf], [_AC_CHECK_DECLS([obstack_printf])])
+m4trace:configure.ac:158: -1- gl_STDIO_MODULE_INDICATOR([obstack-printf])
+m4trace:configure.ac:158: -1- AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POSIX_SPAWN_PORTED_TRUE$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POSIX_SPAWN_PORTED_FALSE$])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([POSIX_SPAWN_PORTED_TRUE])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([POSIX_SPAWN_PORTED_FALSE])
+m4trace:configure.ac:158: -1- gl_FUNC_PUTENV
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([putenv.c])
+m4trace:configure.ac:158: -1- gl_STDLIB_MODULE_INDICATOR([putenv])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CHECK_SNPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- gt_TYPE_WCHAR_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wchar_t.m4:11: gt_TYPE_WCHAR_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- gt_TYPE_WINT_T
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wint_t.m4:11: gt_TYPE_WINT_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- gl_FUNC_STRDUP_POSIX
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([strdup.c])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRDUP$])
+m4trace:configure.ac:158: -1- M4tests_LIBOBJ([$ac_func])
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Check_Decl_strdup], [_AC_CHECK_DECLS([strdup])])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRDUP$])
+m4trace:configure.ac:158: -1- gl_PREREQ_STRDUP
+m4trace:configure.ac:158: -1- gl_STRING_MODULE_INDICATOR([strdup])
+m4trace:configure.ac:158: -1- gl_FUNC_SYMLINK
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_symlink], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" symlink"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([symlink.c])
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([symlink.c])
+m4trace:configure.ac:158: -1- gl_UNISTD_MODULE_INDICATOR([symlink])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^abs_aux_dir$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^abs_aux_dir$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- gt_LOCALE_FR_UTF8
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- gt_LOCALE_JA
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- gt_LOCALE_ZH_CN
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- gl_FUNC_WCTOB
+m4trace:configure.ac:158: -1- AC_DEFUN([_AC_Func_wctob], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" wctob"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([wctob.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_WCTOB
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wctob.m4:7: gl_FUNC_WCTOB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- M4tests_LIBSOURCES([wctob.c])
+m4trace:configure.ac:158: -1- gl_PREREQ_WCTOB
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCTOB$])
+m4trace:configure.ac:158: -1- gl_REPLACE_WCHAR_H
+m4trace:configure.ac:158: -1- gl_WCHAR_MODULE_INDICATOR([wctob])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBTESTS_LIBDEPS$])
+m4trace:configure.ac:160: -1- gl_VERSION_ETC
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER$])
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER_VERSION$])
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER_BUG_REPORTS$])
+m4trace:configure.ac:163: -1- M4_ERROR
+m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_ERROR_H$])
+m4trace:configure.ac:163: -1- m4_pattern_allow([^ERROR_H$])
+m4trace:configure.ac:163: -1- m4_pattern_allow([^INCLUDE_ERROR_H$])
+m4trace:configure.ac:164: -1- M4_GETOPT
+m4trace:configure.ac:164: -1- gl_FUNC_GETOPT_GNU
+m4trace:configure.ac:164: -1- gl_FUNC_GETOPT_POSIX
+m4trace:configure.ac:164: -1- gl_GETOPT_IFELSE([
+ gl_REPLACE_GETOPT
+ ], [])
+m4trace:configure.ac:164: -1- gl_GETOPT_CHECK_HEADERS
+m4trace:configure.ac:164: -1- gl_CHECK_NEXT_HEADERS([getopt.h])
+m4trace:configure.ac:164: -1- AC_DEFUN([_AC_Header_getopt_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" getopt.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^NEXT_GETOPT_H$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- AC_DEFUN([_AC_Header_getopt_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" getopt.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_LONG_ONLY$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_DECL_OPTRESET$])
+m4trace:configure.ac:164: -1- gl_REPLACE_GETOPT
+m4trace:configure.ac:164: -1- gl_GETOPT_SUBSTITUTE_HEADER
+m4trace:configure.ac:164: -1- m4_pattern_allow([^__GETOPT_PREFIX$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_H$])
+m4trace:configure.ac:164: -1- gl_PREREQ_GETOPT
+m4trace:configure.ac:164: -1- AC_DEFUN([_AC_Check_Decl_getenv], [_AC_CHECK_DECLS([getenv])])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_DECL_GETENV$])
+m4trace:configure.ac:164: -1- AM_CONDITIONAL([GETOPT], [test -n "$M4_replace_getopt"])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_TRUE$])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_FALSE$])
+m4trace:configure.ac:164: -1- _AM_SUBST_NOTMAKE([GETOPT_TRUE])
+m4trace:configure.ac:164: -1- _AM_SUBST_NOTMAKE([GETOPT_FALSE])
+m4trace:configure.ac:165: -1- M4_OBSTACK
+m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE_OBSTACK_H$])
+m4trace:configure.ac:165: -1- m4_pattern_allow([^OBSTACK_H$])
+m4trace:configure.ac:165: -1- m4_pattern_allow([^INCLUDE_OBSTACK_H$])
+m4trace:configure.ac:166: -1- M4_REGEX
+m4trace:configure.ac:166: -1- m4_pattern_allow([^REGEX_H$])
+m4trace:configure.ac:166: -1- m4_pattern_allow([^INCLUDE_REGEX_H$])
+m4trace:configure.ac:167: -1- M4_RENAME
+m4trace:configure.ac:167: -1- m4_pattern_allow([^RENAME_OPEN_FILE_WORKS$])
+m4trace:configure.ac:173: -1- m4_pattern_allow([^PERL$])
+m4trace:configure.ac:180: -1- m4_pattern_allow([^size_t$])
+m4trace:configure.ac:181: -1- AC_COMPUTE_INT([AS_TR_SH([ac_cv_sizeof_long long int])], [(long int) (sizeof (long long int))], [AC_INCLUDES_DEFAULT([])], [if test "$AS_TR_SH([ac_cv_type_long long int])" = yes; then
+ AC_MSG_FAILURE([cannot compute sizeof (long long int)], 77)
+ else
+ AS_TR_SH([ac_cv_sizeof_long long int])=0
+ fi])
+m4trace:configure.ac:181: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$])
+m4trace:configure.ac:188: -1- AC_DEFUN([_AC_Header_limits_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" limits.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:195: -1- m4_pattern_allow([^INCLUDE_STDBOOL_H$])
+m4trace:configure.ac:202: -1- AC_DEFUN([_AC_Func_calloc], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" calloc"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:202: -1- AC_DEFUN([_AC_Func_strerror], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" strerror"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:204: -1- AM_WITH_DMALLOC
+m4trace:configure.ac:204: -1- m4_pattern_allow([^WITH_DMALLOC$])
+m4trace:configure.ac:206: -1- M4_SYS_STACKOVF
+m4trace:configure.ac:206: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/types.m4:738: AC_TYPE_SIGNAL is expanded from...
+ltdl/m4/stackovf.m4:26: M4_SYS_STACKOVF is expanded from...
+configure.ac:206: the top level])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^RETSIGTYPE$])
+m4trace:configure.ac:206: -1- AC_DEFUN([_AC_Header_siginfo_h], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_header_list], [" siginfo.h"])])
+_AC_HEADERS_EXPANSION])
+m4trace:configure.ac:206: -1- AC_DEFUN([_AC_Func_sigaction], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigaction"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:206: -1- AC_DEFUN([_AC_Func_sigaltstack], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigaltstack"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:206: -1- AC_DEFUN([_AC_Func_sigstack], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigstack"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:206: -1- AC_DEFUN([_AC_Func_sigvec], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" sigvec"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STACK_T_SS_SP$])
+m4trace:configure.ac:206: -1- AM_CONDITIONAL([STACKOVF], [test "$M4_cv_use_stackovf" = yes])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^STACKOVF_TRUE$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^STACKOVF_FALSE$])
+m4trace:configure.ac:206: -1- _AM_SUBST_NOTMAKE([STACKOVF_TRUE])
+m4trace:configure.ac:206: -1- _AM_SUBST_NOTMAKE([STACKOVF_FALSE])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^USE_STACKOVF$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_RLIM_T$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^rlim_t$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STACK_T$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^stack_t$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_SIGCONTEXT$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^ss_sp$])
+m4trace:configure.ac:209: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
+m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRFTIME$])
+m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRFTIME$])
+m4trace:configure.ac:211: -1- AC_DEFUN([_AC_Func_getcwd], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" getcwd"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:211: -1- AC_DEFUN([_AC_Func_gethostname], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" gethostname"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:211: -1- AC_DEFUN([_AC_Func_mktime], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" mktime"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:211: -1- AC_DEFUN([_AC_Func_uname], [m4_divert_text([INIT_PREPARE], [AS_VAR_APPEND([ac_func_list], [" uname"])])
+_AC_FUNCS_EXPANSION])
+m4trace:configure.ac:218: -1- M4_LIB_GMP
+m4trace:configure.ac:218: -1- m4_pattern_allow([^HAVE_GMP_H$])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^M4_gmp_save_LIBS$])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^LIBADD_GMP$])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^USE_GMP$])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^USE_GMP$])
+m4trace:configure.ac:219: -1- AM_CONDITIONAL([USE_GMP], [test "x$USE_GMP" = xyes])
+m4trace:configure.ac:219: -1- m4_pattern_allow([^USE_GMP_TRUE$])
+m4trace:configure.ac:219: -1- m4_pattern_allow([^USE_GMP_FALSE$])
+m4trace:configure.ac:219: -1- _AM_SUBST_NOTMAKE([USE_GMP_TRUE])
+m4trace:configure.ac:219: -1- _AM_SUBST_NOTMAKE([USE_GMP_FALSE])
+m4trace:configure.ac:220: -1- M4_SYSCMD
+m4trace:configure.ac:220: -1- m4_pattern_allow([^M4_SYSCMD_SHELL$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:235: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:235: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:235: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LT_CONFIG_H$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^ltdl_LIBOBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^ltdl_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^CONFIG_INCLUDE$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4_LIBOBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4tests_LIBOBJS$])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4tests_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- _AC_AM_CONFIG_HEADER_HOOK(["$ac_file"])
+m4trace:configure.ac:235: -1- _AM_OUTPUT_DEPENDENCY_COMMANDS
+m4trace:configure.ac:235: -1- _LT_PROG_LTMAIN
diff --git a/autom4te.cache/traces.1 b/autom4te.cache/traces.1
new file mode 100644
index 00000000..9a9253a7
--- /dev/null
+++ b/autom4te.cache/traces.1
@@ -0,0 +1,6541 @@
+m4trace:aclocal.m4:1042: -1- m4_include([ltdl/m4/00gnulib.m4])
+m4trace:aclocal.m4:1043: -1- m4_include([ltdl/m4/alloca.m4])
+m4trace:aclocal.m4:1044: -1- m4_include([ltdl/m4/argz.m4])
+m4trace:aclocal.m4:1045: -1- m4_include([ltdl/m4/assert.m4])
+m4trace:aclocal.m4:1046: -1- m4_include([ltdl/m4/autobuild.m4])
+m4trace:aclocal.m4:1047: -1- m4_include([ltdl/m4/btowc.m4])
+m4trace:aclocal.m4:1048: -1- m4_include([ltdl/m4/canonicalize.m4])
+m4trace:aclocal.m4:1049: -1- m4_include([ltdl/m4/cloexec.m4])
+m4trace:aclocal.m4:1050: -1- m4_include([ltdl/m4/close-stream.m4])
+m4trace:aclocal.m4:1051: -1- m4_include([ltdl/m4/closein.m4])
+m4trace:aclocal.m4:1052: -1- m4_include([ltdl/m4/closeout.m4])
+m4trace:aclocal.m4:1053: -1- m4_include([ltdl/m4/codeset.m4])
+m4trace:aclocal.m4:1054: -1- m4_include([ltdl/m4/config-h.m4])
+m4trace:aclocal.m4:1055: -1- m4_include([ltdl/m4/debug.m4])
+m4trace:aclocal.m4:1056: -1- m4_include([ltdl/m4/dirname.m4])
+m4trace:aclocal.m4:1057: -1- m4_include([ltdl/m4/dos.m4])
+m4trace:aclocal.m4:1058: -1- m4_include([ltdl/m4/double-slash-root.m4])
+m4trace:aclocal.m4:1059: -1- m4_include([ltdl/m4/dup2.m4])
+m4trace:aclocal.m4:1060: -1- m4_include([ltdl/m4/eealloc.m4])
+m4trace:aclocal.m4:1061: -1- m4_include([ltdl/m4/environ.m4])
+m4trace:aclocal.m4:1062: -1- m4_include([ltdl/m4/errno_h.m4])
+m4trace:aclocal.m4:1063: -1- m4_include([ltdl/m4/error.m4])
+m4trace:aclocal.m4:1064: -1- m4_include([ltdl/m4/execute.m4])
+m4trace:aclocal.m4:1065: -1- m4_include([ltdl/m4/exitfail.m4])
+m4trace:aclocal.m4:1066: -1- m4_include([ltdl/m4/exponentd.m4])
+m4trace:aclocal.m4:1067: -1- m4_include([ltdl/m4/exponentf.m4])
+m4trace:aclocal.m4:1068: -1- m4_include([ltdl/m4/exponentl.m4])
+m4trace:aclocal.m4:1069: -1- m4_include([ltdl/m4/extensions.m4])
+m4trace:aclocal.m4:1070: -1- m4_include([ltdl/m4/fatal-signal.m4])
+m4trace:aclocal.m4:1071: -1- m4_include([ltdl/m4/fcntl-o.m4])
+m4trace:aclocal.m4:1072: -1- m4_include([ltdl/m4/fcntl.m4])
+m4trace:aclocal.m4:1073: -1- m4_include([ltdl/m4/fcntl_h.m4])
+m4trace:aclocal.m4:1074: -1- m4_include([ltdl/m4/fflush.m4])
+m4trace:aclocal.m4:1075: -1- m4_include([ltdl/m4/filenamecat.m4])
+m4trace:aclocal.m4:1076: -1- m4_include([ltdl/m4/flexmember.m4])
+m4trace:aclocal.m4:1077: -1- m4_include([ltdl/m4/float_h.m4])
+m4trace:aclocal.m4:1078: -1- m4_include([ltdl/m4/fopen.m4])
+m4trace:aclocal.m4:1079: -1- m4_include([ltdl/m4/fpending.m4])
+m4trace:aclocal.m4:1080: -1- m4_include([ltdl/m4/fpieee.m4])
+m4trace:aclocal.m4:1081: -1- m4_include([ltdl/m4/fpurge.m4])
+m4trace:aclocal.m4:1082: -1- m4_include([ltdl/m4/freading.m4])
+m4trace:aclocal.m4:1083: -1- m4_include([ltdl/m4/frexp.m4])
+m4trace:aclocal.m4:1084: -1- m4_include([ltdl/m4/frexpl.m4])
+m4trace:aclocal.m4:1085: -1- m4_include([ltdl/m4/fseeko.m4])
+m4trace:aclocal.m4:1086: -1- m4_include([ltdl/m4/ftello.m4])
+m4trace:aclocal.m4:1087: -1- m4_include([ltdl/m4/getdtablesize.m4])
+m4trace:aclocal.m4:1088: -1- m4_include([ltdl/m4/getopt.m4])
+m4trace:aclocal.m4:1089: -1- m4_include([ltdl/m4/getpagesize.m4])
+m4trace:aclocal.m4:1090: -1- m4_include([ltdl/m4/gettext.m4])
+m4trace:aclocal.m4:1091: -1- m4_include([ltdl/m4/gettimeofday.m4])
+m4trace:aclocal.m4:1092: -1- m4_include([ltdl/m4/gl_list.m4])
+m4trace:aclocal.m4:1093: -1- m4_include([ltdl/m4/glibc21.m4])
+m4trace:aclocal.m4:1094: -1- m4_include([ltdl/m4/gmp.m4])
+m4trace:aclocal.m4:1095: -1- m4_include([ltdl/m4/gnulib-common.m4])
+m4trace:aclocal.m4:1096: -1- m4_include([ltdl/m4/gnulib-comp.m4])
+m4trace:aclocal.m4:1097: -1- m4_include([ltdl/m4/iconv.m4])
+m4trace:aclocal.m4:1098: -1- m4_include([ltdl/m4/iconv_h.m4])
+m4trace:aclocal.m4:1099: -1- m4_include([ltdl/m4/iconv_open.m4])
+m4trace:aclocal.m4:1100: -1- m4_include([ltdl/m4/include_next.m4])
+m4trace:aclocal.m4:1101: -1- m4_include([ltdl/m4/inline.m4])
+m4trace:aclocal.m4:1102: -1- m4_include([ltdl/m4/intlmacosx.m4])
+m4trace:aclocal.m4:1103: -1- m4_include([ltdl/m4/intmax_t.m4])
+m4trace:aclocal.m4:1104: -1- m4_include([ltdl/m4/inttypes-pri.m4])
+m4trace:aclocal.m4:1105: -1- m4_include([ltdl/m4/inttypes.m4])
+m4trace:aclocal.m4:1106: -1- m4_include([ltdl/m4/inttypes_h.m4])
+m4trace:aclocal.m4:1107: -1- m4_include([ltdl/m4/isnand.m4])
+m4trace:aclocal.m4:1108: -1- m4_include([ltdl/m4/isnanf.m4])
+m4trace:aclocal.m4:1109: -1- m4_include([ltdl/m4/isnanl.m4])
+m4trace:aclocal.m4:1110: -1- m4_include([ltdl/m4/langinfo_h.m4])
+m4trace:aclocal.m4:1111: -1- m4_include([ltdl/m4/ldexpl.m4])
+m4trace:aclocal.m4:1112: -1- m4_include([ltdl/m4/lib-ld.m4])
+m4trace:aclocal.m4:1113: -1- m4_include([ltdl/m4/lib-link.m4])
+m4trace:aclocal.m4:1114: -1- m4_include([ltdl/m4/lib-prefix.m4])
+m4trace:aclocal.m4:1115: -1- m4_include([ltdl/m4/libtool.m4])
+m4trace:aclocal.m4:1116: -1- m4_include([ltdl/m4/link.m4])
+m4trace:aclocal.m4:1117: -1- m4_include([ltdl/m4/localcharset.m4])
+m4trace:aclocal.m4:1118: -1- m4_include([ltdl/m4/locale-fr.m4])
+m4trace:aclocal.m4:1119: -1- m4_include([ltdl/m4/locale-ja.m4])
+m4trace:aclocal.m4:1120: -1- m4_include([ltdl/m4/locale-tr.m4])
+m4trace:aclocal.m4:1121: -1- m4_include([ltdl/m4/locale-zh.m4])
+m4trace:aclocal.m4:1122: -1- m4_include([ltdl/m4/longlong.m4])
+m4trace:aclocal.m4:1123: -1- m4_include([ltdl/m4/lseek.m4])
+m4trace:aclocal.m4:1124: -1- m4_include([ltdl/m4/lstat.m4])
+m4trace:aclocal.m4:1125: -1- m4_include([ltdl/m4/ltdl.m4])
+m4trace:aclocal.m4:1126: -1- m4_include([ltdl/m4/ltoptions.m4])
+m4trace:aclocal.m4:1127: -1- m4_include([ltdl/m4/ltsugar.m4])
+m4trace:aclocal.m4:1128: -1- m4_include([ltdl/m4/ltversion.m4])
+m4trace:aclocal.m4:1129: -1- m4_include([ltdl/m4/lt~obsolete.m4])
+m4trace:aclocal.m4:1130: -1- m4_include([ltdl/m4/m4-error.m4])
+m4trace:aclocal.m4:1131: -1- m4_include([ltdl/m4/m4-getopt.m4])
+m4trace:aclocal.m4:1132: -1- m4_include([ltdl/m4/m4-gettext.m4])
+m4trace:aclocal.m4:1133: -1- m4_include([ltdl/m4/m4-obstack.m4])
+m4trace:aclocal.m4:1134: -1- m4_include([ltdl/m4/m4-regex.m4])
+m4trace:aclocal.m4:1135: -1- m4_include([ltdl/m4/m4-rename.m4])
+m4trace:aclocal.m4:1136: -1- m4_include([ltdl/m4/m4-syscmd.m4])
+m4trace:aclocal.m4:1137: -1- m4_include([ltdl/m4/malloc.m4])
+m4trace:aclocal.m4:1138: -1- m4_include([ltdl/m4/malloca.m4])
+m4trace:aclocal.m4:1139: -1- m4_include([ltdl/m4/math_h.m4])
+m4trace:aclocal.m4:1140: -1- m4_include([ltdl/m4/mbchar.m4])
+m4trace:aclocal.m4:1141: -1- m4_include([ltdl/m4/mbiter.m4])
+m4trace:aclocal.m4:1142: -1- m4_include([ltdl/m4/mbrtowc.m4])
+m4trace:aclocal.m4:1143: -1- m4_include([ltdl/m4/mbsinit.m4])
+m4trace:aclocal.m4:1144: -1- m4_include([ltdl/m4/mbslen.m4])
+m4trace:aclocal.m4:1145: -1- m4_include([ltdl/m4/mbstate_t.m4])
+m4trace:aclocal.m4:1146: -1- m4_include([ltdl/m4/memchr.m4])
+m4trace:aclocal.m4:1147: -1- m4_include([ltdl/m4/memmem.m4])
+m4trace:aclocal.m4:1148: -1- m4_include([ltdl/m4/mkdtemp.m4])
+m4trace:aclocal.m4:1149: -1- m4_include([ltdl/m4/mkstemp.m4])
+m4trace:aclocal.m4:1150: -1- m4_include([ltdl/m4/mmap-anon.m4])
+m4trace:aclocal.m4:1151: -1- m4_include([ltdl/m4/mode_t.m4])
+m4trace:aclocal.m4:1152: -1- m4_include([ltdl/m4/multiarch.m4])
+m4trace:aclocal.m4:1153: -1- m4_include([ltdl/m4/nl_langinfo.m4])
+m4trace:aclocal.m4:1154: -1- m4_include([ltdl/m4/nls.m4])
+m4trace:aclocal.m4:1155: -1- m4_include([ltdl/m4/nocrash.m4])
+m4trace:aclocal.m4:1156: -1- m4_include([ltdl/m4/obstack-printf-posix.m4])
+m4trace:aclocal.m4:1157: -1- m4_include([ltdl/m4/obstack-printf.m4])
+m4trace:aclocal.m4:1158: -1- m4_include([ltdl/m4/open.m4])
+m4trace:aclocal.m4:1159: -1- m4_include([ltdl/m4/pathmax.m4])
+m4trace:aclocal.m4:1160: -1- m4_include([ltdl/m4/pipe.m4])
+m4trace:aclocal.m4:1161: -1- m4_include([ltdl/m4/pipe2.m4])
+m4trace:aclocal.m4:1162: -1- m4_include([ltdl/m4/po.m4])
+m4trace:aclocal.m4:1163: -1- m4_include([ltdl/m4/posix_spawn.m4])
+m4trace:aclocal.m4:1164: -1- m4_include([ltdl/m4/printf-frexp.m4])
+m4trace:aclocal.m4:1165: -1- m4_include([ltdl/m4/printf-frexpl.m4])
+m4trace:aclocal.m4:1166: -1- m4_include([ltdl/m4/printf.m4])
+m4trace:aclocal.m4:1167: -1- m4_include([ltdl/m4/progtest.m4])
+m4trace:aclocal.m4:1168: -1- m4_include([ltdl/m4/putenv.m4])
+m4trace:aclocal.m4:1169: -1- m4_include([ltdl/m4/quote.m4])
+m4trace:aclocal.m4:1170: -1- m4_include([ltdl/m4/quotearg.m4])
+m4trace:aclocal.m4:1171: -1- m4_include([ltdl/m4/rawmemchr.m4])
+m4trace:aclocal.m4:1172: -1- m4_include([ltdl/m4/readlink.m4])
+m4trace:aclocal.m4:1173: -1- m4_include([ltdl/m4/regex.m4])
+m4trace:aclocal.m4:1174: -1- m4_include([ltdl/m4/rename.m4])
+m4trace:aclocal.m4:1175: -1- m4_include([ltdl/m4/rmdir.m4])
+m4trace:aclocal.m4:1176: -1- m4_include([ltdl/m4/sched_h.m4])
+m4trace:aclocal.m4:1177: -1- m4_include([ltdl/m4/setenv.m4])
+m4trace:aclocal.m4:1178: -1- m4_include([ltdl/m4/sig_atomic_t.m4])
+m4trace:aclocal.m4:1179: -1- m4_include([ltdl/m4/sigaction.m4])
+m4trace:aclocal.m4:1180: -1- m4_include([ltdl/m4/signal_h.m4])
+m4trace:aclocal.m4:1181: -1- m4_include([ltdl/m4/signalblocking.m4])
+m4trace:aclocal.m4:1182: -1- m4_include([ltdl/m4/signbit.m4])
+m4trace:aclocal.m4:1183: -1- m4_include([ltdl/m4/size_max.m4])
+m4trace:aclocal.m4:1184: -1- m4_include([ltdl/m4/snprintf-posix.m4])
+m4trace:aclocal.m4:1185: -1- m4_include([ltdl/m4/snprintf.m4])
+m4trace:aclocal.m4:1186: -1- m4_include([ltdl/m4/spawn_h.m4])
+m4trace:aclocal.m4:1187: -1- m4_include([ltdl/m4/sprintf-posix.m4])
+m4trace:aclocal.m4:1188: -1- m4_include([ltdl/m4/ssize_t.m4])
+m4trace:aclocal.m4:1189: -1- m4_include([ltdl/m4/stackovf.m4])
+m4trace:aclocal.m4:1190: -1- m4_include([ltdl/m4/stat.m4])
+m4trace:aclocal.m4:1191: -1- m4_include([ltdl/m4/stdarg.m4])
+m4trace:aclocal.m4:1192: -1- m4_include([ltdl/m4/stdbool.m4])
+m4trace:aclocal.m4:1193: -1- m4_include([ltdl/m4/stddef_h.m4])
+m4trace:aclocal.m4:1194: -1- m4_include([ltdl/m4/stdint.m4])
+m4trace:aclocal.m4:1195: -1- m4_include([ltdl/m4/stdint_h.m4])
+m4trace:aclocal.m4:1196: -1- m4_include([ltdl/m4/stdio-safer.m4])
+m4trace:aclocal.m4:1197: -1- m4_include([ltdl/m4/stdio_h.m4])
+m4trace:aclocal.m4:1198: -1- m4_include([ltdl/m4/stdlib-safer.m4])
+m4trace:aclocal.m4:1199: -1- m4_include([ltdl/m4/stdlib_h.m4])
+m4trace:aclocal.m4:1200: -1- m4_include([ltdl/m4/strchrnul.m4])
+m4trace:aclocal.m4:1201: -1- m4_include([ltdl/m4/strdup.m4])
+m4trace:aclocal.m4:1202: -1- m4_include([ltdl/m4/strerror.m4])
+m4trace:aclocal.m4:1203: -1- m4_include([ltdl/m4/string_h.m4])
+m4trace:aclocal.m4:1204: -1- m4_include([ltdl/m4/strndup.m4])
+m4trace:aclocal.m4:1205: -1- m4_include([ltdl/m4/strnlen.m4])
+m4trace:aclocal.m4:1206: -1- m4_include([ltdl/m4/strtod.m4])
+m4trace:aclocal.m4:1207: -1- m4_include([ltdl/m4/strtol.m4])
+m4trace:aclocal.m4:1208: -1- m4_include([ltdl/m4/symlink.m4])
+m4trace:aclocal.m4:1209: -1- m4_include([ltdl/m4/sys_stat_h.m4])
+m4trace:aclocal.m4:1210: -1- m4_include([ltdl/m4/sys_time_h.m4])
+m4trace:aclocal.m4:1211: -1- m4_include([ltdl/m4/sys_wait_h.m4])
+m4trace:aclocal.m4:1212: -1- m4_include([ltdl/m4/tempname.m4])
+m4trace:aclocal.m4:1213: -1- m4_include([ltdl/m4/time_h.m4])
+m4trace:aclocal.m4:1214: -1- m4_include([ltdl/m4/tmpdir.m4])
+m4trace:aclocal.m4:1215: -1- m4_include([ltdl/m4/ulonglong.m4])
+m4trace:aclocal.m4:1216: -1- m4_include([ltdl/m4/ungetc.m4])
+m4trace:aclocal.m4:1217: -1- m4_include([ltdl/m4/unistd-safer.m4])
+m4trace:aclocal.m4:1218: -1- m4_include([ltdl/m4/unistd_h.m4])
+m4trace:aclocal.m4:1219: -1- m4_include([ltdl/m4/unlocked-io.m4])
+m4trace:aclocal.m4:1220: -1- m4_include([ltdl/m4/vasnprintf-posix.m4])
+m4trace:aclocal.m4:1221: -1- m4_include([ltdl/m4/vasnprintf.m4])
+m4trace:aclocal.m4:1222: -1- m4_include([ltdl/m4/vasprintf-posix.m4])
+m4trace:aclocal.m4:1223: -1- m4_include([ltdl/m4/vasprintf.m4])
+m4trace:aclocal.m4:1224: -1- m4_include([ltdl/m4/version-etc.m4])
+m4trace:aclocal.m4:1225: -1- m4_include([ltdl/m4/vfprintf-posix.m4])
+m4trace:aclocal.m4:1226: -1- m4_include([ltdl/m4/vprintf-posix.m4])
+m4trace:aclocal.m4:1227: -1- m4_include([ltdl/m4/wait-process.m4])
+m4trace:aclocal.m4:1228: -1- m4_include([ltdl/m4/warn-on-use.m4])
+m4trace:aclocal.m4:1229: -1- m4_include([ltdl/m4/wchar.m4])
+m4trace:aclocal.m4:1230: -1- m4_include([ltdl/m4/wchar_t.m4])
+m4trace:aclocal.m4:1231: -1- m4_include([ltdl/m4/wcrtomb.m4])
+m4trace:aclocal.m4:1232: -1- m4_include([ltdl/m4/wctob.m4])
+m4trace:aclocal.m4:1233: -1- m4_include([ltdl/m4/wctype.m4])
+m4trace:aclocal.m4:1234: -1- m4_include([ltdl/m4/wcwidth.m4])
+m4trace:aclocal.m4:1235: -1- m4_include([ltdl/m4/wint_t.m4])
+m4trace:aclocal.m4:1236: -1- m4_include([ltdl/m4/xalloc.m4])
+m4trace:aclocal.m4:1237: -1- m4_include([ltdl/m4/xsize.m4])
+m4trace:aclocal.m4:1238: -1- m4_include([ltdl/m4/xstrndup.m4])
+m4trace:aclocal.m4:1239: -1- m4_include([ltdl/m4/xvasprintf.m4])
+m4trace:configure.ac:30: -1- AC_INIT([GNU M4], [1.9a.577-b3131-dirty], [bug-m4@gnu.org])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?A[CHUM]_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([_AC_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS'])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^AS_FLAGS$])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?m4_])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^dnl$])
+m4trace:configure.ac:30: -1- m4_pattern_forbid([^_?AS_])
+m4trace:configure.ac:30: -1- AC_SUBST([SHELL])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([SHELL])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^SHELL$])
+m4trace:configure.ac:30: -1- AC_SUBST([PATH_SEPARATOR])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PATH_SEPARATOR])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PATH_SEPARATOR$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_NAME])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_TARNAME])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_VERSION])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_STRING])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:30: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([PACKAGE_URL])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:30: -1- AC_SUBST([exec_prefix], [NONE])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([exec_prefix])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^exec_prefix$])
+m4trace:configure.ac:30: -1- AC_SUBST([prefix], [NONE])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([prefix])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^prefix$])
+m4trace:configure.ac:30: -1- AC_SUBST([program_transform_name], [s,x,x,])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([program_transform_name])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^program_transform_name$])
+m4trace:configure.ac:30: -1- AC_SUBST([bindir], ['${exec_prefix}/bin'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([bindir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^bindir$])
+m4trace:configure.ac:30: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sbindir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sbindir$])
+m4trace:configure.ac:30: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([libexecdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^libexecdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([datarootdir], ['${prefix}/share'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([datarootdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^datarootdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([datadir], ['${datarootdir}'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([datadir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^datadir$])
+m4trace:configure.ac:30: -1- AC_SUBST([sysconfdir], ['${prefix}/etc'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sysconfdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sysconfdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([sharedstatedir], ['${prefix}/com'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([sharedstatedir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^sharedstatedir$])
+m4trace:configure.ac:30: -1- AC_SUBST([localstatedir], ['${prefix}/var'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([localstatedir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^localstatedir$])
+m4trace:configure.ac:30: -1- AC_SUBST([includedir], ['${prefix}/include'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([includedir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^includedir$])
+m4trace:configure.ac:30: -1- AC_SUBST([oldincludedir], ['/usr/include'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([oldincludedir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^oldincludedir$])
+m4trace:configure.ac:30: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME],
+ ['${datarootdir}/doc/${PACKAGE_TARNAME}'],
+ ['${datarootdir}/doc/${PACKAGE}'])])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([docdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^docdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([infodir], ['${datarootdir}/info'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([infodir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^infodir$])
+m4trace:configure.ac:30: -1- AC_SUBST([htmldir], ['${docdir}'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([htmldir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^htmldir$])
+m4trace:configure.ac:30: -1- AC_SUBST([dvidir], ['${docdir}'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([dvidir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^dvidir$])
+m4trace:configure.ac:30: -1- AC_SUBST([pdfdir], ['${docdir}'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([pdfdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^pdfdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([psdir], ['${docdir}'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([psdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^psdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([libdir], ['${exec_prefix}/lib'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([libdir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^libdir$])
+m4trace:configure.ac:30: -1- AC_SUBST([localedir], ['${datarootdir}/locale'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:30: -1- AC_SUBST([mandir], ['${datarootdir}/man'])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([mandir])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^mandir$])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_NAME$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */
+@%:@undef PACKAGE_NAME])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_TARNAME$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */
+@%:@undef PACKAGE_TARNAME])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_VERSION$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */
+@%:@undef PACKAGE_VERSION])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_STRING$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */
+@%:@undef PACKAGE_STRING])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */
+@%:@undef PACKAGE_BUGREPORT])
+m4trace:configure.ac:30: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^PACKAGE_URL$])
+m4trace:configure.ac:30: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */
+@%:@undef PACKAGE_URL])
+m4trace:configure.ac:30: -1- AC_SUBST([DEFS])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([DEFS])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^DEFS$])
+m4trace:configure.ac:30: -1- AC_SUBST([ECHO_C])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_C])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_C$])
+m4trace:configure.ac:30: -1- AC_SUBST([ECHO_N])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_N])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_N$])
+m4trace:configure.ac:30: -1- AC_SUBST([ECHO_T])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([ECHO_T])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^ECHO_T$])
+m4trace:configure.ac:30: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:30: -1- AC_SUBST([build_alias])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([build_alias])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^build_alias$])
+m4trace:configure.ac:30: -1- AC_SUBST([host_alias])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([host_alias])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^host_alias$])
+m4trace:configure.ac:30: -1- AC_SUBST([target_alias])
+m4trace:configure.ac:30: -1- AC_SUBST_TRACE([target_alias])
+m4trace:configure.ac:30: -1- m4_pattern_allow([^target_alias$])
+m4trace:configure.ac:33: -1- AC_CONFIG_AUX_DIR([build-aux])
+m4trace:configure.ac:35: -1- AC_CONFIG_LIBOBJ_DIR([gnu])
+m4trace:configure.ac:37: -1- AC_CONFIG_HEADERS([gnu/config.h:gnu/config.hin])
+m4trace:configure.ac:38: -1- AC_CONFIG_FILES([tests/m4], [chmod +x tests/m4])
+m4trace:configure.ac:48: -1- m4_pattern_forbid([^M4_[A-Z]])
+m4trace:configure.ac:57: -1- AM_INIT_AUTOMAKE([1.10b subdir-objects dist-bzip2 dist-xz
+color-tests parallel-tests silent-rules
+gnu])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_[A-Z]+FLAGS$])
+m4trace:configure.ac:57: -1- AM_AUTOMAKE_VERSION([1.11.1])
+m4trace:configure.ac:57: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:57: -1- AC_SUBST([INSTALL_PROGRAM])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([INSTALL_PROGRAM])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_PROGRAM$])
+m4trace:configure.ac:57: -1- AC_SUBST([INSTALL_SCRIPT])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([INSTALL_SCRIPT])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_SCRIPT$])
+m4trace:configure.ac:57: -1- AC_SUBST([INSTALL_DATA])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([INSTALL_DATA])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_DATA$])
+m4trace:configure.ac:57: -1- AC_SUBST([am__isrc], [' -I$(srcdir)'])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([am__isrc])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__isrc$])
+m4trace:configure.ac:57: -1- _AM_SUBST_NOTMAKE([am__isrc])
+m4trace:configure.ac:57: -1- AC_SUBST([CYGPATH_W])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([CYGPATH_W])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^CYGPATH_W$])
+m4trace:configure.ac:57: -1- AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([PACKAGE])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:57: -1- AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([VERSION])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:57: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^PACKAGE$])
+m4trace:configure.ac:57: -1- AH_OUTPUT([PACKAGE], [/* Name of package */
+@%:@undef PACKAGE])
+m4trace:configure.ac:57: -1- AC_DEFINE_TRACE_LITERAL([VERSION])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^VERSION$])
+m4trace:configure.ac:57: -1- AH_OUTPUT([VERSION], [/* Version number of package */
+@%:@undef VERSION])
+m4trace:configure.ac:57: -1- AC_REQUIRE_AUX_FILE([missing])
+m4trace:configure.ac:57: -1- AC_SUBST([ACLOCAL])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([ACLOCAL])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^ACLOCAL$])
+m4trace:configure.ac:57: -1- AC_SUBST([AUTOCONF])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AUTOCONF])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOCONF$])
+m4trace:configure.ac:57: -1- AC_SUBST([AUTOMAKE])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AUTOMAKE])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOMAKE$])
+m4trace:configure.ac:57: -1- AC_SUBST([AUTOHEADER])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AUTOHEADER])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AUTOHEADER$])
+m4trace:configure.ac:57: -1- AC_SUBST([MAKEINFO])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([MAKEINFO])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MAKEINFO$])
+m4trace:configure.ac:57: -1- AC_SUBST([install_sh])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([install_sh])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^install_sh$])
+m4trace:configure.ac:57: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:57: -1- AC_SUBST([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([INSTALL_STRIP_PROGRAM])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^INSTALL_STRIP_PROGRAM$])
+m4trace:configure.ac:57: -1- AC_REQUIRE_AUX_FILE([install-sh])
+m4trace:configure.ac:57: -1- AC_SUBST([MKDIR_P])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:57: -1- AC_SUBST([MKDIR_P])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^MKDIR_P$])
+m4trace:configure.ac:57: -1- AC_SUBST([mkdir_p], ["$MKDIR_P"])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([mkdir_p])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^mkdir_p$])
+m4trace:configure.ac:57: -1- AC_SUBST([AWK])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AWK])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AWK$])
+m4trace:configure.ac:57: -1- AC_SUBST([SET_MAKE])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([SET_MAKE])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^SET_MAKE$])
+m4trace:configure.ac:57: -1- AC_SUBST([am__leading_dot])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([am__leading_dot])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__leading_dot$])
+m4trace:configure.ac:57: -1- AC_SUBST([AMTAR])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AMTAR])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AMTAR$])
+m4trace:configure.ac:57: -1- AC_SUBST([am__tar])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([am__tar])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__tar$])
+m4trace:configure.ac:57: -1- AC_SUBST([am__untar])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([am__untar])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^am__untar$])
+m4trace:configure.ac:57: -1- AM_SILENT_RULES
+m4trace:configure.ac:57: -1- AC_SUBST([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AM_DEFAULT_VERBOSITY])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_DEFAULT_VERBOSITY$])
+m4trace:configure.ac:57: -1- AC_SUBST([AM_BACKSLASH])
+m4trace:configure.ac:57: -1- AC_SUBST_TRACE([AM_BACKSLASH])
+m4trace:configure.ac:57: -1- m4_pattern_allow([^AM_BACKSLASH$])
+m4trace:configure.ac:57: -1- _AM_SUBST_NOTMAKE([AM_BACKSLASH])
+m4trace:configure.ac:65: -1- AC_SUBST([CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([CFLAGS])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CFLAGS])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CFLAGS$])
+m4trace:configure.ac:65: -1- AC_SUBST([LDFLAGS])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([LDFLAGS])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^LDFLAGS$])
+m4trace:configure.ac:65: -1- AC_SUBST([LIBS])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([LIBS])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^LIBS$])
+m4trace:configure.ac:65: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:65: -1- AC_SUBST([CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([ac_ct_CC])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([ac_ct_CC])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^ac_ct_CC$])
+m4trace:configure.ac:65: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([EXEEXT])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^EXEEXT$])
+m4trace:configure.ac:65: -1- AC_SUBST([OBJEXT], [$ac_cv_objext])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([OBJEXT])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^OBJEXT$])
+m4trace:configure.ac:65: -1- AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([DEPDIR])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^DEPDIR$])
+m4trace:configure.ac:65: -1- AC_SUBST([am__include])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__include])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__include$])
+m4trace:configure.ac:65: -1- AC_SUBST([am__quote])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__quote])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__quote$])
+m4trace:configure.ac:65: -1- AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+m4trace:configure.ac:65: -1- AC_SUBST([AMDEP_TRUE])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([AMDEP_TRUE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEP_TRUE$])
+m4trace:configure.ac:65: -1- AC_SUBST([AMDEP_FALSE])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([AMDEP_FALSE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEP_FALSE$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEP_TRUE])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEP_FALSE])
+m4trace:configure.ac:65: -1- AC_SUBST([AMDEPBACKSLASH])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([AMDEPBACKSLASH])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^AMDEPBACKSLASH$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])
+m4trace:configure.ac:65: -1- AC_SUBST([CCDEPMODE], [depmode=$am_cv_CC_dependencies_compiler_type])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([CCDEPMODE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^CCDEPMODE$])
+m4trace:configure.ac:65: -1- AM_CONDITIONAL([am__fastdepCC], [
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3])
+m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_TRUE])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_TRUE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_TRUE$])
+m4trace:configure.ac:65: -1- AC_SUBST([am__fastdepCC_FALSE])
+m4trace:configure.ac:65: -1- AC_SUBST_TRACE([am__fastdepCC_FALSE])
+m4trace:configure.ac:65: -1- m4_pattern_allow([^am__fastdepCC_FALSE$])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_TRUE])
+m4trace:configure.ac:65: -1- _AM_SUBST_NOTMAKE([am__fastdepCC_FALSE])
+m4trace:configure.ac:66: -1- m4_pattern_forbid([^gl_[A-Z]])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_ES$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_LIBOBJS$])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^gl_LTLIBOBJS$])
+m4trace:configure.ac:66: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([RANLIB])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:66: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([NO_MINUS_C_MINUS_O])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^NO_MINUS_C_MINUS_O$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([NO_MINUS_C_MINUS_O], [/* Define to 1 if your C compiler doesn\'t accept -c and -o together. */
+@%:@undef NO_MINUS_C_MINUS_O])
+m4trace:configure.ac:66: -1- AC_REQUIRE_AUX_FILE([compile])
+m4trace:configure.ac:66: -1- AC_CANONICAL_BUILD
+m4trace:configure.ac:66: -1- AC_REQUIRE_AUX_FILE([config.sub])
+m4trace:configure.ac:66: -1- AC_REQUIRE_AUX_FILE([config.guess])
+m4trace:configure.ac:66: -1- AC_SUBST([build], [$ac_cv_build])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([build])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build$])
+m4trace:configure.ac:66: -1- AC_SUBST([build_cpu], [$[1]])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([build_cpu])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_cpu$])
+m4trace:configure.ac:66: -1- AC_SUBST([build_vendor], [$[2]])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([build_vendor])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_vendor$])
+m4trace:configure.ac:66: -1- AC_SUBST([build_os])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([build_os])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^build_os$])
+m4trace:configure.ac:66: -1- AC_CANONICAL_HOST
+m4trace:configure.ac:66: -1- AC_SUBST([host], [$ac_cv_host])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([host])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host$])
+m4trace:configure.ac:66: -1- AC_SUBST([host_cpu], [$[1]])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([host_cpu])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_cpu$])
+m4trace:configure.ac:66: -1- AC_SUBST([host_vendor], [$[2]])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([host_vendor])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_vendor$])
+m4trace:configure.ac:66: -1- AC_SUBST([host_os])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([host_os])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^host_os$])
+m4trace:configure.ac:66: -1- _m4_warn([obsolete], [The macro `AC_GNU_SOURCE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/specific.m4:310: AC_GNU_SOURCE is expanded from...
+ltdl/m4/gnulib-comp.m4:21: M4_EARLY is expanded from...
+configure.ac:66: the top level])
+m4trace:configure.ac:66: -1- AC_SUBST([CPP])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:66: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:66: -1- AC_SUBST([CPP])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:66: -1- AC_SUBST([GREP])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:66: -1- AC_SUBST([EGREP])
+m4trace:configure.ac:66: -1- AC_SUBST_TRACE([EGREP])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^EGREP$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^STDC_HEADERS$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */
+@%:@undef STDC_HEADERS])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the <sys/types.h> header file. */
+@%:@undef HAVE_SYS_TYPES_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+@%:@undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+@%:@undef HAVE_STRING_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the <memory.h> header file. */
+@%:@undef HAVE_MEMORY_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the <strings.h> header file. */
+@%:@undef HAVE_STRINGS_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_SOURCE$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([_POSIX_SOURCE], [/* Define to 1 if you need to in order for `stat\' and other things to work. */
+@%:@undef _POSIX_SOURCE])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_1_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_1_SOURCE$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([_POSIX_1_SOURCE], [/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+@%:@undef _POSIX_1_SOURCE])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_MINIX])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_MINIX$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([_MINIX], [/* Define to 1 if on MINIX. */
+@%:@undef _MINIX])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_XOPEN_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_XOPEN_SOURCE$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([_XOPEN_SOURCE], [/* Define to 500 only on HP-UX. */
+@%:@undef _XOPEN_SOURCE])
+m4trace:configure.ac:66: -1- AH_OUTPUT([__EXTENSIONS__], [/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([__EXTENSIONS__])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^__EXTENSIONS__$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_ALL_SOURCE$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_GNU_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_GNU_SOURCE$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_PTHREAD_SEMANTICS])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_TANDEM_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_TANDEM_SOURCE$])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([_LARGEFILE_SOURCE])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^_LARGEFILE_SOURCE$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([_LARGEFILE_SOURCE], [/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+@%:@undef _LARGEFILE_SOURCE])
+m4trace:configure.ac:66: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FSEEKO])
+m4trace:configure.ac:66: -1- m4_pattern_allow([^HAVE_FSEEKO$])
+m4trace:configure.ac:66: -1- AH_OUTPUT([HAVE_FSEEKO], [/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+@%:@undef HAVE_FSEEKO])
+m4trace:configure.ac:68: -1- AC_DEFINE_TRACE_LITERAL([_FILE_OFFSET_BITS])
+m4trace:configure.ac:68: -1- m4_pattern_allow([^_FILE_OFFSET_BITS$])
+m4trace:configure.ac:68: -1- AH_OUTPUT([_FILE_OFFSET_BITS], [/* Number of bits in a file offset, on hosts where this is settable. */
+@%:@undef _FILE_OFFSET_BITS])
+m4trace:configure.ac:68: -1- AC_DEFINE_TRACE_LITERAL([_LARGE_FILES])
+m4trace:configure.ac:68: -1- m4_pattern_allow([^_LARGE_FILES$])
+m4trace:configure.ac:68: -1- AH_OUTPUT([_LARGE_FILES], [/* Define for large files, on AIX-style hosts. */
+@%:@undef _LARGE_FILES])
+m4trace:configure.ac:69: -1- AC_SUBST([CPP])
+m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:69: -1- AC_SUBST([CPPFLAGS])
+m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CPPFLAGS])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPPFLAGS$])
+m4trace:configure.ac:69: -1- AC_SUBST([CPP])
+m4trace:configure.ac:69: -1- AC_SUBST_TRACE([CPP])
+m4trace:configure.ac:69: -1- m4_pattern_allow([^CPP$])
+m4trace:configure.ac:70: -1- AM_PROG_CC_C_O
+m4trace:configure.ac:70: -1- AC_REQUIRE_AUX_FILE([compile])
+m4trace:configure.ac:71: -1- AC_DEFINE_TRACE_LITERAL([DEBUG])
+m4trace:configure.ac:71: -1- m4_pattern_allow([^DEBUG$])
+m4trace:configure.ac:71: -1- AH_OUTPUT([DEBUG], [/* Define this to enable additional runtime debugging */
+@%:@undef DEBUG])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:71: -1- AC_SUBST([SED])
+m4trace:configure.ac:71: -1- AC_SUBST_TRACE([SED])
+m4trace:configure.ac:71: -1- m4_pattern_allow([^SED$])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:71: -1- _m4_warn([obsolete], [The macro `AC_LIBTOOL_COMPILER_OPTION' is obsolete.
+You should run autoupdate.], [ltdl/m4/libtool.m4:1444: AC_LIBTOOL_COMPILER_OPTION is expanded from...
+ltdl/m4/debug.m4:30: M4_CHECK_DEBUGGING is expanded from...
+configure.ac:71: the top level])
+m4trace:configure.ac:78: -1- LT_CONFIG_LTDL_DIR([ltdl])
+m4trace:configure.ac:79: -1- LT_INIT([shared dlopen win32-dll])
+m4trace:configure.ac:79: -1- m4_pattern_forbid([^_?LT_[A-Z_]+$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])
+m4trace:configure.ac:79: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
+m4trace:configure.ac:79: -1- AC_SUBST([AS])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([AS])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^AS$])
+m4trace:configure.ac:79: -1- AC_SUBST([DLLTOOL])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([DLLTOOL])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DLLTOOL$])
+m4trace:configure.ac:79: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- AC_SUBST([LIBTOOL])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([LIBTOOL])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LIBTOOL$])
+m4trace:configure.ac:79: -1- AC_SUBST([FGREP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([FGREP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^FGREP$])
+m4trace:configure.ac:79: -1- AC_SUBST([GREP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([GREP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^GREP$])
+m4trace:configure.ac:79: -1- AC_SUBST([LD])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([LD])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LD$])
+m4trace:configure.ac:79: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:79: -1- AC_SUBST([ac_ct_DUMPBIN])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([ac_ct_DUMPBIN])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^ac_ct_DUMPBIN$])
+m4trace:configure.ac:79: -1- AC_SUBST([DUMPBIN])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([DUMPBIN])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DUMPBIN$])
+m4trace:configure.ac:79: -1- AC_SUBST([NM])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([NM])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^NM$])
+m4trace:configure.ac:79: -1- AC_SUBST([LN_S], [$as_ln_s])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([LN_S])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LN_S$])
+m4trace:configure.ac:79: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- AC_SUBST([OBJDUMP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([OBJDUMP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OBJDUMP$])
+m4trace:configure.ac:79: -1- AC_SUBST([AR])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([AR])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^AR$])
+m4trace:configure.ac:79: -1- AC_SUBST([STRIP])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([STRIP])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^STRIP$])
+m4trace:configure.ac:79: -1- AC_SUBST([RANLIB])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([RANLIB])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^RANLIB$])
+m4trace:configure.ac:79: -1- m4_pattern_allow([LT_OBJDIR])
+m4trace:configure.ac:79: -1- AC_DEFINE_TRACE_LITERAL([LT_OBJDIR])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LT_OBJDIR$])
+m4trace:configure.ac:79: -1- AH_OUTPUT([LT_OBJDIR], [/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+@%:@undef LT_OBJDIR])
+m4trace:configure.ac:79: -1- AC_SUBST([lt_ECHO])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([lt_ECHO])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^lt_ECHO$])
+m4trace:configure.ac:79: -1- LT_SUPPORTED_TAG([CC])
+m4trace:configure.ac:79: -1- AC_SUBST([DSYMUTIL])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([DSYMUTIL])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^DSYMUTIL$])
+m4trace:configure.ac:79: -1- AC_SUBST([NMEDIT])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([NMEDIT])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^NMEDIT$])
+m4trace:configure.ac:79: -1- AC_SUBST([LIPO])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([LIPO])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^LIPO$])
+m4trace:configure.ac:79: -1- AC_SUBST([OTOOL])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([OTOOL])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OTOOL$])
+m4trace:configure.ac:79: -1- AC_SUBST([OTOOL64])
+m4trace:configure.ac:79: -1- AC_SUBST_TRACE([OTOOL64])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^OTOOL64$])
+m4trace:configure.ac:79: -1- AH_OUTPUT([HAVE_DLFCN_H], [/* Define to 1 if you have the <dlfcn.h> header file. */
+@%:@undef HAVE_DLFCN_H])
+m4trace:configure.ac:79: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLFCN_H])
+m4trace:configure.ac:79: -1- m4_pattern_allow([^HAVE_DLFCN_H$])
+m4trace:configure.ac:80: -1- AC_SUBST([LIBLTDL])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LIBLTDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBLTDL$])
+m4trace:configure.ac:80: -1- AC_SUBST([LTDLDEPS])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LTDLDEPS])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLDEPS$])
+m4trace:configure.ac:80: -1- AC_SUBST([LTDLINCL])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LTDLINCL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLINCL$])
+m4trace:configure.ac:80: -1- AC_SUBST([INCLTDL])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INCLTDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INCLTDL$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LTDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LTDL$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_LTDL], [/* Define this if a modern libltdl is already installed */
+@%:@undef HAVE_LTDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_MODULE_EXT])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([LT_MODULE_EXT])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_MODULE_EXT$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([LT_MODULE_EXT], [/* Define to the extension used for runtime loadable modules, say, ".so". */
+@%:@undef LT_MODULE_EXT])
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_MODULE_PATH_VAR])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([LT_MODULE_PATH_VAR])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_MODULE_PATH_VAR$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([LT_MODULE_PATH_VAR], [/* Define to the name of the environment variable that determines the run-time
+ module search path. */
+@%:@undef LT_MODULE_PATH_VAR])
+m4trace:configure.ac:80: -1- m4_pattern_allow([LT_DLSEARCH_PATH])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([LT_DLSEARCH_PATH])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLSEARCH_PATH$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([LT_DLSEARCH_PATH], [/* Define to the system default library search path. */
+@%:@undef LT_DLSEARCH_PATH])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLLOADERS$])
+m4trace:configure.ac:80: -1- AC_SUBST([LT_DLLOADERS])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LT_DLLOADERS])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLLOADERS$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define if you have the libdl library or equivalent. */
+@%:@undef HAVE_LIBDL])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define if you have the libdl library or equivalent. */
+@%:@undef HAVE_LIBDL])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDL$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define if you have the libdl library or equivalent. */
+@%:@undef HAVE_LIBDL])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DLERROR], [/* Define to 1 if you have the `dlerror\' function. */
+@%:@undef HAVE_DLERROR])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLERROR])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DLERROR$])
+m4trace:configure.ac:80: -1- AC_SUBST([LIBADD_DLOPEN])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LIBADD_DLOPEN])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DLOPEN$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SHL_LOAD])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_SHL_LOAD], [/* Define if you have the shl_load function. */
+@%:@undef HAVE_SHL_LOAD])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SHL_LOAD])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_SHL_LOAD$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_SHL_LOAD], [/* Define if you have the shl_load function. */
+@%:@undef HAVE_SHL_LOAD])
+m4trace:configure.ac:80: -1- AC_SUBST([LIBADD_SHL_LOAD])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LIBADD_SHL_LOAD])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_SHL_LOAD$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DYLD])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DYLD$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DYLD], [/* Define if you have the _dyld_func_lookup function. */
+@%:@undef HAVE_DYLD])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_CYGWIN_CONV_PATH])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DECL_CYGWIN_CONV_PATH$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DECL_CYGWIN_CONV_PATH], [/* Define to 1 if you have the declaration of `cygwin_conv_path\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_CYGWIN_CONV_PATH])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DLD])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_DLD$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DLD], [/* Define if you have the GNU dld library. */
+@%:@undef HAVE_DLD])
+m4trace:configure.ac:80: -1- AC_SUBST([LIBADD_DLD_LINK])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LIBADD_DLD_LINK])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DLD_LINK$])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLPREOPEN$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDLLOADER])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_LIBDLLOADER$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_LIBDLLOADER], [/* Define if libdlloader will be built on this platform */
+@%:@undef HAVE_LIBDLLOADER])
+m4trace:configure.ac:80: -1- AC_SUBST([LT_DLPREOPEN])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LT_DLPREOPEN])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_DLPREOPEN$])
+m4trace:configure.ac:80: -1- AC_SUBST([LIBADD_DL])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LIBADD_DL])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LIBADD_DL$])
+m4trace:configure.ac:80: -1- AC_SUBST([sys_symbol_underscore])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([sys_symbol_underscore])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^sys_symbol_underscore$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([NEED_USCORE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^NEED_USCORE$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([NEED_USCORE], [/* Define if dlsym() requires a leading underscore in symbol names. */
+@%:@undef NEED_USCORE])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([LTDL_DLOPEN_DEPLIBS])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDL_DLOPEN_DEPLIBS$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([LTDL_DLOPEN_DEPLIBS], [/* Define if the OS needs help to load dependent libraries for dlopen(). */
+@%:@undef LTDL_DLOPEN_DEPLIBS])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_H], [/* Define to 1 if you have the <argz.h> header file. */
+@%:@undef HAVE_ARGZ_H])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ARGZ_H])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ARGZ_H$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ERROR_T])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_ERROR_T$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ERROR_T], [/* Define to 1 if the system has the type `error_t\'. */
+@%:@undef HAVE_ERROR_T])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([error_t])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^error_t$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([error_t], [/* Define to a type to use for `error_t\' if it is not otherwise available. */
+@%:@undef error_t])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([__error_t_defined])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^__error_t_defined$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([__error_t_defined], [/* Define so that glibc/gnulib argp.h does not typedef error_t. */
+@%:@undef __error_t_defined])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_ADD], [/* Define to 1 if you have the `argz_add\' function. */
+@%:@undef HAVE_ARGZ_ADD])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_APPEND], [/* Define to 1 if you have the `argz_append\' function. */
+@%:@undef HAVE_ARGZ_APPEND])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_COUNT], [/* Define to 1 if you have the `argz_count\' function. */
+@%:@undef HAVE_ARGZ_COUNT])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_CREATE_SEP], [/* Define to 1 if you have the `argz_create_sep\' function. */
+@%:@undef HAVE_ARGZ_CREATE_SEP])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_INSERT], [/* Define to 1 if you have the `argz_insert\' function. */
+@%:@undef HAVE_ARGZ_INSERT])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_NEXT], [/* Define to 1 if you have the `argz_next\' function. */
+@%:@undef HAVE_ARGZ_NEXT])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_ARGZ_STRINGIFY], [/* Define to 1 if you have the `argz_stringify\' function. */
+@%:@undef HAVE_ARGZ_STRINGIFY])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_ARGZ])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_WORKING_ARGZ$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_WORKING_ARGZ], [/* This value is set to 1 to indicate that the system argz facility works */
+@%:@undef HAVE_WORKING_ARGZ])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- AC_SUBST([ARGZ_H])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([ARGZ_H])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^ARGZ_H$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PRELOADED_SYMBOLS])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^HAVE_PRELOADED_SYMBOLS$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_PRELOADED_SYMBOLS], [/* Define if libtool can extract symbol lists from object files. */
+@%:@undef HAVE_PRELOADED_SYMBOLS])
+m4trace:configure.ac:80: -1- AM_CONDITIONAL([INSTALL_LTDL], [test x"${enable_ltdl_install-no}" != xno])
+m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_LTDL_TRUE])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_LTDL_TRUE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_LTDL_TRUE$])
+m4trace:configure.ac:80: -1- AC_SUBST([INSTALL_LTDL_FALSE])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([INSTALL_LTDL_FALSE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^INSTALL_LTDL_FALSE$])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([INSTALL_LTDL_TRUE])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([INSTALL_LTDL_FALSE])
+m4trace:configure.ac:80: -1- AM_CONDITIONAL([CONVENIENCE_LTDL], [test x"${enable_ltdl_convenience-no}" != xno])
+m4trace:configure.ac:80: -1- AC_SUBST([CONVENIENCE_LTDL_TRUE])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([CONVENIENCE_LTDL_TRUE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^CONVENIENCE_LTDL_TRUE$])
+m4trace:configure.ac:80: -1- AC_SUBST([CONVENIENCE_LTDL_FALSE])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([CONVENIENCE_LTDL_FALSE])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^CONVENIENCE_LTDL_FALSE$])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([CONVENIENCE_LTDL_TRUE])
+m4trace:configure.ac:80: -1- _AM_SUBST_NOTMAKE([CONVENIENCE_LTDL_FALSE])
+m4trace:configure.ac:80: -1- AC_SUBST([LT_CONFIG_H])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LT_CONFIG_H])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_CONFIG_H$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DL_H], [/* Define to 1 if you have the <dl.h> header file. */
+@%:@undef HAVE_DL_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_SYS_DL_H], [/* Define to 1 if you have the <sys/dl.h> header file. */
+@%:@undef HAVE_SYS_DL_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DLD_H], [/* Define to 1 if you have the <dld.h> header file. */
+@%:@undef HAVE_DLD_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_MACH_O_DYLD_H], [/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+@%:@undef HAVE_MACH_O_DYLD_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the <dirent.h> header file. */
+@%:@undef HAVE_DIRENT_H])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_CLOSEDIR], [/* Define to 1 if you have the `closedir\' function. */
+@%:@undef HAVE_CLOSEDIR])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_OPENDIR], [/* Define to 1 if you have the `opendir\' function. */
+@%:@undef HAVE_OPENDIR])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_READDIR], [/* Define to 1 if you have the `readdir\' function. */
+@%:@undef HAVE_READDIR])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */
+@%:@undef HAVE_STRLCAT])
+m4trace:configure.ac:80: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */
+@%:@undef HAVE_STRLCPY])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^_LT_LIBOBJS$])
+m4trace:configure.ac:80: -1- AC_DEFINE_TRACE_LITERAL([LT_LIBEXT])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LT_LIBEXT$])
+m4trace:configure.ac:80: -1- AH_OUTPUT([LT_LIBEXT], [/* The archive extension */
+@%:@undef LT_LIBEXT])
+m4trace:configure.ac:80: -1- AC_SUBST([LTDLOPEN])
+m4trace:configure.ac:80: -1- AC_SUBST_TRACE([LTDLOPEN])
+m4trace:configure.ac:80: -1- m4_pattern_allow([^LTDLOPEN$])
+m4trace:configure.ac:88: -1- AH_OUTPUT([HAVE_LIBLTDL], [/* Define to 1 if you have the `ltdl\' library (-lltdl). */
+@%:@undef HAVE_LIBLTDL])
+m4trace:configure.ac:88: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBLTDL])
+m4trace:configure.ac:88: -1- m4_pattern_allow([^HAVE_LIBLTDL$])
+m4trace:configure.ac:111: -1- AC_SUBST([DYNAMIC_MODULES], [$DYNAMIC_MODULES])
+m4trace:configure.ac:111: -1- AC_SUBST_TRACE([DYNAMIC_MODULES])
+m4trace:configure.ac:111: -1- m4_pattern_allow([^DYNAMIC_MODULES$])
+m4trace:configure.ac:142: -1- AC_SUBST([DLPREOPEN])
+m4trace:configure.ac:142: -1- AC_SUBST_TRACE([DLPREOPEN])
+m4trace:configure.ac:142: -1- m4_pattern_allow([^DLPREOPEN$])
+m4trace:configure.ac:143: -1- AC_SUBST([PREOPEN_DEPENDENCIES])
+m4trace:configure.ac:143: -1- AC_SUBST_TRACE([PREOPEN_DEPENDENCIES])
+m4trace:configure.ac:143: -1- m4_pattern_allow([^PREOPEN_DEPENDENCIES$])
+m4trace:configure.ac:149: -1- AM_GNU_GETTEXT([external], [need-formatstring-macros])
+m4trace:configure.ac:149: -1- AC_SUBST([USE_NLS])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([USE_NLS])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^USE_NLS$])
+m4trace:configure.ac:149: -1- AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([GETTEXT_MACRO_VERSION])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GETTEXT_MACRO_VERSION$])
+m4trace:configure.ac:149: -1- AC_SUBST([MSGFMT])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([MSGFMT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGFMT$])
+m4trace:configure.ac:149: -1- AC_SUBST([GMSGFMT])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([GMSGFMT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GMSGFMT$])
+m4trace:configure.ac:149: -1- AC_SUBST([MSGFMT_015])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([MSGFMT_015])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGFMT_015$])
+m4trace:configure.ac:149: -1- AC_SUBST([GMSGFMT_015])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([GMSGFMT_015])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^GMSGFMT_015$])
+m4trace:configure.ac:149: -1- AC_SUBST([XGETTEXT])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([XGETTEXT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT$])
+m4trace:configure.ac:149: -1- AC_SUBST([XGETTEXT_015])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([XGETTEXT_015])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT_015$])
+m4trace:configure.ac:149: -1- AC_SUBST([MSGMERGE])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([MSGMERGE])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^MSGMERGE$])
+m4trace:configure.ac:149: -1- AC_SUBST([localedir])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([localedir])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^localedir$])
+m4trace:configure.ac:149: -1- AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([XGETTEXT_EXTRA_OPTIONS])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^XGETTEXT_EXTRA_OPTIONS$])
+m4trace:configure.ac:149: -1- AC_REQUIRE_AUX_FILE([config.rpath])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intlmacosx.m4:18: gt_INTL_MACOSX is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CFPREFERENCESCOPYAPPVALUE])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_CFPREFERENCESCOPYAPPVALUE$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_CFPREFERENCESCOPYAPPVALUE], [/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+@%:@undef HAVE_CFPREFERENCESCOPYAPPVALUE])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intlmacosx.m4:18: gt_INTL_MACOSX is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_CFLOCALECOPYCURRENT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_CFLOCALECOPYCURRENT$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_CFLOCALECOPYCURRENT], [/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+@%:@undef HAVE_CFLOCALECOPYCURRENT])
+m4trace:configure.ac:149: -1- AC_SUBST([INTL_MACOSX_LIBS])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([INTL_MACOSX_LIBS])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^INTL_MACOSX_LIBS$])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ICONV])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_ICONV$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_ICONV], [/* Define if you have the iconv() function and it works. */
+@%:@undef HAVE_ICONV])
+m4trace:configure.ac:149: -1- AC_SUBST([LIBICONV])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([LIBICONV])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LIBICONV$])
+m4trace:configure.ac:149: -1- AC_SUBST([LTLIBICONV])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([LTLIBICONV])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LTLIBICONV$])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/gettext.m4:57: AM_GNU_GETTEXT is expanded from...
+configure.ac:149: the top level])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_NLS])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^ENABLE_NLS$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([ENABLE_NLS], [/* Define to 1 if translation of program messages to the user\'s native
+ language is requested. */
+@%:@undef ENABLE_NLS])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTEXT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_GETTEXT$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_GETTEXT], [/* Define if the GNU gettext() function is already present or preinstalled. */
+@%:@undef HAVE_GETTEXT])
+m4trace:configure.ac:149: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DCGETTEXT])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^HAVE_DCGETTEXT$])
+m4trace:configure.ac:149: -1- AH_OUTPUT([HAVE_DCGETTEXT], [/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+@%:@undef HAVE_DCGETTEXT])
+m4trace:configure.ac:149: -1- AC_SUBST([INTLLIBS])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([INTLLIBS])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^INTLLIBS$])
+m4trace:configure.ac:149: -1- AC_SUBST([LIBINTL])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([LIBINTL])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LIBINTL$])
+m4trace:configure.ac:149: -1- AC_SUBST([LTLIBINTL])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([LTLIBINTL])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^LTLIBINTL$])
+m4trace:configure.ac:149: -1- AC_SUBST([POSUB])
+m4trace:configure.ac:149: -1- AC_SUBST_TRACE([POSUB])
+m4trace:configure.ac:149: -1- m4_pattern_allow([^POSUB$])
+m4trace:configure.ac:151: -1- AH_OUTPUT([HAVE_GETTEXT_H], [/* Define to 1 if you have the <gettext.h> header file. */
+@%:@undef HAVE_GETTEXT_H])
+m4trace:configure.ac:151: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETTEXT_H])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^HAVE_GETTEXT_H$])
+m4trace:configure.ac:151: -1- AC_SUBST([GETTEXT_H])
+m4trace:configure.ac:151: -1- AC_SUBST_TRACE([GETTEXT_H])
+m4trace:configure.ac:151: -1- m4_pattern_allow([^GETTEXT_H$])
+m4trace:configure.ac:151: -1- AC_CONFIG_FILES([po/Makefile.in])
+m4trace:configure.ac:158: -1- AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+m4trace:configure.ac:158: -1- AC_SUBST([GL_COND_LIBTOOL_TRUE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GL_COND_LIBTOOL_TRUE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_COND_LIBTOOL_TRUE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GL_COND_LIBTOOL_FALSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GL_COND_LIBTOOL_FALSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_COND_LIBTOOL_FALSE$])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([GL_COND_LIBTOOL_TRUE])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([GL_COND_LIBTOOL_FALSE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([isoc99_inline], [/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of \'extern inline\' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+m4trace:configure.ac:158: -1- AH_OUTPUT([unused_parameter], [/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+])
+m4trace:configure.ac:158: -1- AC_SUBST([LTALLOCA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LTALLOCA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTALLOCA$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ALLOCA_H], [/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+@%:@undef HAVE_ALLOCA_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have `alloca\', as a function or macro. */
+@%:@undef HAVE_ALLOCA])
+m4trace:configure.ac:158: -1- AC_SUBST([ALLOCA], [\${LIBOBJDIR}alloca.$ac_objext])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ALLOCA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ALLOCA$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([C_ALLOCA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^C_ALLOCA$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([C_ALLOCA], [/* Define to 1 if using `alloca.c\'. */
+@%:@undef C_ALLOCA])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([CRAY_STACKSEG_END])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CRAY_STACKSEG_END$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([CRAY_STACKSEG_END], [/* Define to one of `_getb67\', `GETB67\', `getb67\' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c\' support on those systems.
+ */
+@%:@undef CRAY_STACKSEG_END])
+m4trace:configure.ac:158: -1- AH_OUTPUT([STACK_DIRECTION], [/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+@%:@undef STACK_DIRECTION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([STACK_DIRECTION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STACK_DIRECTION$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ALLOCA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ALLOCA$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ALLOCA], [/* Define to 1 if you have \'alloca\' after including <alloca.h>, a header that
+ may be supplied by this distribution. */
+@%:@undef HAVE_ALLOCA])
+m4trace:configure.ac:158: -1- AC_SUBST([ALLOCA_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ALLOCA_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ALLOCA_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NDEBUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NDEBUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NDEBUG], [/* Define to 1 if assertions should be disabled. */
+@%:@undef NDEBUG])
+m4trace:configure.ac:158: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler
+ calls it, or to nothing if \'inline\' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_BTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_BTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_BTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WCTOB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WCTOB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCTOB$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSINIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSINIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSINIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBRTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBRTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBRTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBRLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBRLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBRLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WCRTOMB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WCRTOMB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCRTOMB$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WCSRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WCSRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WCWIDTH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WCWIDTH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WCWIDTH$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_BTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_BTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSINIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBRLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBRLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBSRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBSRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCRTOMB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCRTOMB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCRTOMB$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCSRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCSRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_WCTOB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_WCTOB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCTOB$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_WCWIDTH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_WCWIDTH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCWIDTH$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBSTATE_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBSTATE_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSTATE_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_BTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_BTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_BTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WCTOB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WCTOB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCTOB$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBSINIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBSINIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSINIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBRTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBRTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBRTOWC$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBRLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBRLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBRLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBSRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBSRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MBSNRTOWCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WCRTOMB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WCRTOMB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCRTOMB$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WCSRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WCSRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCSRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCSNRTOMBS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WCWIDTH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WCWIDTH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WCWIDTH$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_BTOWC], [/* Define to 1 if you have the `btowc\' function. */
+@%:@undef HAVE_BTOWC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/codeset.m4:9: AM_LANGINFO_CODESET is expanded from...
+ltdl/m4/locale-fr.m4:10: gt_LOCALE_FR is expanded from...
+ltdl/m4/btowc.m4:7: gl_FUNC_BTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LANGINFO_CODESET])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_CODESET$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LANGINFO_CODESET], [/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+@%:@undef HAVE_LANGINFO_CODESET])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/btowc.m4:7: gl_FUNC_BTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_CANONICALIZE_FILE_NAME], [/* Define to 1 if you have the `canonicalize_file_name\' function. */
+@%:@undef HAVE_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */
+@%:@undef HAVE_GETCWD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_READLINK], [/* Define to 1 if you have the `readlink\' function. */
+@%:@undef HAVE_READLINK])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_SLASH_IS_DISTINCT_ROOT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DOUBLE_SLASH_IS_DISTINCT_ROOT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DOUBLE_SLASH_IS_DISTINCT_ROOT], [/* Define to 1 if // is a file system root distinct from /. */
+@%:@undef DOUBLE_SLASH_IS_DISTINCT_ROOT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_REALPATH], [/* Define to 1 if you have the `realpath\' function. */
+@%:@undef HAVE_REALPATH])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FUNC_REALPATH_WORKS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FUNC_REALPATH_WORKS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FUNC_REALPATH_WORKS], [/* Define to 1 if realpath() can malloc memory, always gives an absolute path,
+ and handles trailing slash correctly. */
+@%:@undef FUNC_REALPATH_WORKS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+@%:@undef HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_CANONICALIZE_LGPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CANONICALIZE_LGPL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_CANONICALIZE_LGPL], [/* Define to 1 when using the gnulib module canonicalize-lgpl. */
+@%:@undef GNULIB_CANONICALIZE_LGPL])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ATOLL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ATOLL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ATOLL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETLOADAVG])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETLOADAVG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOADAVG$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETSUBOPT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETSUBOPT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETSUBOPT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKDTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKDTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKDTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKOSTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKOSTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKOSTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKOSTEMPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKOSTEMPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKOSTEMPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKSTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKSTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKSTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKSTEMPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKSTEMPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKSTEMPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PUTENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PUTENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RANDOM_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RANDOM_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RANDOM_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_REALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_REALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_REALPATH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_REALPATH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REALPATH$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RPMATCH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RPMATCH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RPMATCH$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SETENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOLL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOLL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOLL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOULL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOULL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOULL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UNSETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UNSETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNSETENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ATOLL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ATOLL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ATOLL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_CALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_CALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_GETLOADAVG])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_GETLOADAVG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLOADAVG$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETSUBOPT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETSUBOPT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETSUBOPT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKDTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKDTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKOSTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKOSTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKOSTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKOSTEMPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKOSTEMPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKOSTEMPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKSTEMPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKSTEMPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKSTEMPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_RANDOM_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_RANDOM_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_REALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_REALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_REALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_REALPATH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_REALPATH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_REALPATH$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_RPMATCH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_RPMATCH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RPMATCH$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SETENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRTOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRTOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRTOLL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRTOLL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOLL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRTOULL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRTOULL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOULL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRUCT_RANDOM_DATA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_RANDOM_DATA$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_LOADAVG_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_LOADAVG_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_LOADAVG_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UNSETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UNSETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSETENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CANONICALIZE_FILE_NAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MKSTEMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MKSTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKSTEMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_PUTENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_PUTENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PUTENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_REALPATH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_REALPATH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_REALPATH$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SETENV$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRTOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRTOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRTOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_UNSETENV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_UNSETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNSETENV$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([SIGNAL_SAFE_LIST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIGNAL_SAFE_LIST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIGNAL_SAFE_LIST], [/* Define if lists must be signal-safe. */
+@%:@undef SIGNAL_SAFE_LIST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_CLOEXEC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOEXEC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_CLOEXEC], [/* Define to 1 when using the gnulib module cloexec. */
+@%:@undef GNULIB_CLOEXEC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_CLOSE_STREAM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOSE_STREAM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_CLOSE_STREAM], [/* Define to 1 when using the gnulib module close-stream. */
+@%:@undef GNULIB_CLOSE_STREAM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX], [/* Define on systems for which file names may have a so-called `drive letter\'
+ prefix, define this to compute the length of that prefix, including the
+ colon. */
+@%:@undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ISSLASH], [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == \'/\' || (C) == \'\\\\\')
+#else
+# define ISSLASH(C) ((C) == \'/\')
+#endif])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR], [/* Define if the backslash character may also serve as a file name component
+ separator. */
+@%:@undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE], [/* Define if a drive letter prefix denotes a relative path if it is not
+ followed by a file name component separator. */
+@%:@undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_DIRNAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DIRNAME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_DIRNAME], [/* Define to 1 when using the gnulib module dirname. */
+@%:@undef GNULIB_DIRNAME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DOUBLE_SLASH_IS_DISTINCT_ROOT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DOUBLE_SLASH_IS_DISTINCT_ROOT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DOUBLE_SLASH_IS_DISTINCT_ROOT], [/* Define to 1 if // is a file system root distinct from /. */
+@%:@undef DOUBLE_SLASH_IS_DISTINCT_ROOT])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CLOSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CLOSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CLOSE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_DUP2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_DUP2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DUP2$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_DUP3])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_DUP3])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DUP3$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ENVIRON])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ENVIRON])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ENVIRON$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_EUIDACCESS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_EUIDACCESS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_EUIDACCESS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FACCESSAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FACCESSAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FACCESSAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FCHDIR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FCHDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHDIR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FCHOWNAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FCHOWNAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHOWNAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FSYNC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FSYNC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSYNC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FTRUNCATE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FTRUNCATE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTRUNCATE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETCWD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETCWD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETCWD$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETDOMAINNAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETDOMAINNAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDOMAINNAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDTABLESIZE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETGROUPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETGROUPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETGROUPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETHOSTNAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETHOSTNAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETHOSTNAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETLOGIN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETLOGIN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOGIN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETLOGIN_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETLOGIN_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLOGIN_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETPAGESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETPAGESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETUSERSHELL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETUSERSHELL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETUSERSHELL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LCHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LCHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LCHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LSEEK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LSEEK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LSEEK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PIPE2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PIPE2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PIPE2$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PREAD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PREAD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PREAD$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_READLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_READLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_READLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_READLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_READLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_READLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RMDIR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RMDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RMDIR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SYMLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SYMLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SYMLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SYMLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SYMLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SYMLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UNISTD_H_GETOPT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UNISTD_H_GETOPT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNISTD_H_GETOPT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UNISTD_H_SIGPIPE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNISTD_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UNLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UNLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UNLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UNLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UNLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_USLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_USLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_USLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_WRITE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_WRITE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_WRITE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_CHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_CHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_CHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DUP2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DUP2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DUP2$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DUP3])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DUP3])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DUP3$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_EUIDACCESS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_EUIDACCESS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_EUIDACCESS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FACCESSAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FACCESSAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FACCESSAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FCHOWNAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FCHOWNAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCHOWNAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FSYNC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FSYNC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FSYNC$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FTRUNCATE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FTRUNCATE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FTRUNCATE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETDOMAINNAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETDOMAINNAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETDOMAINNAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETDTABLESIZE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETGROUPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETGROUPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETGROUPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETHOSTNAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETHOSTNAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETHOSTNAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETLOGIN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETLOGIN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETLOGIN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETUSERSHELL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETUSERSHELL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETUSERSHELL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LCHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LCHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LCHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_PIPE2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_PIPE2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PIPE2$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_PREAD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_PREAD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PREAD$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_READLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_READLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_READLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_READLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_READLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_READLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYMLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYMLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYMLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYMLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYMLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYMLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_ENVIRON])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_ENVIRON])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ENVIRON$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_GETLOGIN_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_GETLOGIN_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLOGIN_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_OS_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_OS_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OS_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_PARAM_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UNLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UNLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_USLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_USLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_USLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_CHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_CHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_CLOSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_CLOSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CLOSE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_DUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_DUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_DUP2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_DUP2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DUP2$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FCHDIR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FCHDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCHDIR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FCHOWNAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FCHOWNAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCHOWNAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETCWD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETCWD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETCWD$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETGROUPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETGROUPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETGROUPS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LCHOWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LCHOWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LCHOWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LSEEK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LSEEK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LSEEK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_PREAD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_PREAD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PREAD$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_READLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_READLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_READLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_RMDIR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_RMDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RMDIR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SYMLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SYMLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SYMLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_UNLINK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_UNLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNLINK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_UNLINKAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_UNLINKAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UNLINKAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_USLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_USLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_USLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_WRITE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_WRITE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_WRITE$])
+m4trace:configure.ac:158: -1- AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([UNISTD_H_HAVE_WINSOCK2_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNISTD_H_HAVE_WINSOCK2_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DUP2], [/* Define to 1 if you have the `dup2\' function. */
+@%:@undef HAVE_DUP2])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/environ.m4:20: gt_CHECK_VAR_DECL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ENVIRON_DECL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ENVIRON_DECL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ENVIRON_DECL], [/* Define if you have the declaration of environ. */
+@%:@undef HAVE_ENVIRON_DECL])
+m4trace:configure.ac:158: -1- AC_SUBST([INCLUDE_NEXT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([INCLUDE_NEXT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INCLUDE_NEXT$])
+m4trace:configure.ac:158: -1- AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INCLUDE_NEXT_AS_FIRST_DIRECTIVE$])
+m4trace:configure.ac:158: -1- AC_SUBST([PRAGMA_SYSTEM_HEADER])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([PRAGMA_SYSTEM_HEADER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRAGMA_SYSTEM_HEADER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ERRNO_H], [/* Define to 1 if you have the <errno.h> header file. */
+@%:@undef HAVE_ERRNO_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_ERRNO_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_ERRNO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_ERRNO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_ERRNO_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_ERRNO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_ERRNO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([ERRNO_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ERRNO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ERRNO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([EMULTIHOP_HIDDEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([EMULTIHOP_HIDDEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EMULTIHOP_HIDDEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([EMULTIHOP_VALUE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([EMULTIHOP_VALUE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EMULTIHOP_VALUE$])
+m4trace:configure.ac:158: -1- AC_SUBST([ENOLINK_HIDDEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ENOLINK_HIDDEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ENOLINK_HIDDEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([ENOLINK_VALUE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ENOLINK_VALUE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ENOLINK_VALUE$])
+m4trace:configure.ac:158: -1- AC_SUBST([EOVERFLOW_HIDDEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([EOVERFLOW_HIDDEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EOVERFLOW_HIDDEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([EOVERFLOW_VALUE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([EOVERFLOW_VALUE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^EOVERFLOW_VALUE$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRERROR_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR_R$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRERROR_R], [/* Define to 1 if you have the declaration of `strerror_r\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRERROR_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRERROR_R], [/* Define to 1 if you have the `strerror_r\' function. */
+@%:@undef HAVE_STRERROR_R])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRERROR_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRERROR_R$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([STRERROR_R_CHAR_P])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STRERROR_R_CHAR_P$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([STRERROR_R_CHAR_P], [/* Define to 1 if strerror_r returns char *. */
+@%:@undef STRERROR_R_CHAR_P])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([mode_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^mode_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([mode_t], [/* Define to `int\' if <sys/types.h> does not define. */
+@%:@undef mode_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIG_ATOMIC_T], [/* Define to 1 if the system has the type `sig_atomic_t\'. */
+@%:@undef HAVE_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([sig_atomic_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^sig_atomic_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([sig_atomic_t], [/* Define as an integer type suitable for memory locations that can be
+ accessed atomically even in the presence of asynchnonous signals. */
+@%:@undef sig_atomic_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FCNTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FCNTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCNTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_OPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_OPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_OPENAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_OPENAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPENAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FCNTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FCNTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCNTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_OPENAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_OPENAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OPENAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FCNTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FCNTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCNTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_OPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_OPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_OPENAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_OPENAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OPENAT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL], [/* Define to 1 if you have the `fcntl\' function. */
+@%:@undef HAVE_FCNTL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL], [/* Define to 1 if you have the `fcntl\' function. */
+@%:@undef HAVE_FCNTL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL], [/* Define to 1 if you have the `fcntl\' function. */
+@%:@undef HAVE_FCNTL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FCNTL_DUPFD_BUGGY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FCNTL_DUPFD_BUGGY$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FCNTL_DUPFD_BUGGY], [/* Define this to 1 if F_DUPFD behavior does not match POSIX */
+@%:@undef FCNTL_DUPFD_BUGGY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL], [/* Define to 1 if you have the `fcntl\' function. */
+@%:@undef HAVE_FCNTL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_O_NOATIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WORKING_O_NOATIME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WORKING_O_NOATIME], [/* Define to 1 if O_NOATIME works. */
+@%:@undef HAVE_WORKING_O_NOATIME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WORKING_O_NOFOLLOW])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WORKING_O_NOFOLLOW$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WORKING_O_NOFOLLOW], [/* Define to 1 if O_NOFOLLOW works. */
+@%:@undef HAVE_WORKING_O_NOFOLLOW])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FCNTL_H], [/* Define to 1 if you have the <fcntl.h> header file. */
+@%:@undef HAVE_FCNTL_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_FCNTL_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_FCNTL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_FCNTL_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_FCNTL_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_FCNTL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_FCNTL_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FCNTL], [/* Define to 1 if fcntl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FCNTL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_OPENAT], [/* Define to 1 if openat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_OPENAT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_FD_SAFER_FLAG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FD_SAFER_FLAG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_FD_SAFER_FLAG], [/* Define to 1 when using the gnulib module fd-safer-flag. */
+@%:@undef GNULIB_FD_SAFER_FLAG])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_DPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_DPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_DPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FCLOSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FCLOSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCLOSE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FFLUSH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FFLUSH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FFLUSH$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FOPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FOPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FOPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FPURGE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FPURGE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPURGE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FPUTC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FPUTC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPUTC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FPUTS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FPUTS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FPUTS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FREOPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FREOPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREOPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FSEEK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FSEEK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSEEK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FSEEKO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FSEEKO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSEEKO$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FTELL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FTELL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTELL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FTELLO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FTELLO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FTELLO$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FWRITE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FWRITE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FWRITE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETDELIM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETDELIM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETDELIM$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETLINE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETLINE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETLINE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_OBSTACK_PRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OBSTACK_PRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PERROR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PERROR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PUTC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PUTC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PUTCHAR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PUTCHAR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTCHAR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_PUTS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_PUTS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PUTS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_REMOVE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_REMOVE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_REMOVE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RENAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RENAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RENAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RENAMEAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RENAMEAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RENAMEAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STDIO_H_SIGPIPE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STDIO_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VASPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VASPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VASPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VDPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VDPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VDPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VFPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VFPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VFPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VFPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VFPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VFPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VSNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VSNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VSNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_VSPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_VSPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_VSPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_FPURGE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_FPURGE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPURGE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_GETDELIM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_GETDELIM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETDELIM$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_GETLINE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_GETLINE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETLINE$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_SNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_VSNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_VSNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_VSNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_RENAMEAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_RENAMEAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RENAMEAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_VDPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_VDPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VDPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_DPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_DPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_DPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FCLOSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FCLOSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FCLOSE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FFLUSH])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FFLUSH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FFLUSH$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FOPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FOPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FOPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FPURGE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FPURGE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FPURGE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FREOPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FREOPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREOPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FSEEK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FSEEK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSEEK$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FSEEKO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FSEEKO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSEEKO$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FTELL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FTELL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FTELL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FTELLO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FTELLO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FTELLO$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETDELIM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETDELIM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETDELIM$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETLINE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETLINE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETLINE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_PERROR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_PERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PERROR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_POPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_POPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_POPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_PRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_PRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_REMOVE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_REMOVE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_REMOVE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_RENAME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_RENAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RENAME$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_RENAMEAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_RENAMEAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_RENAMEAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STDIO_WRITE_FUNCS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STDIO_WRITE_FUNCS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VASPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VASPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VDPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VDPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VDPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VFPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VFPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VFPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VSNPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VSNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VSNPRINTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_VSPRINTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_VSPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VSPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MEMPCPY], [/* Define to 1 if you have the `mempcpy\' function. */
+@%:@undef HAVE_MEMPCPY])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_FILENAMECAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FILENAMECAT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_FILENAMECAT], [/* Define to 1 when using the gnulib module filenamecat. */
+@%:@undef GNULIB_FILENAMECAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MEMPCPY], [/* Define to 1 if you have the `mempcpy\' function. */
+@%:@undef HAVE_MEMPCPY])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLEXIBLE_ARRAY_MEMBER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLEXIBLE_ARRAY_MEMBER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLEXIBLE_ARRAY_MEMBER], [/* Define to nothing if C supports flexible array members, and to 1 if it does
+ not. That way, with a declaration like `struct s { int n; double
+ d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };\', the struct hack can be used with pre-C99
+ compilers. When computing the size of such an object, don\'t use \'sizeof
+ (struct s)\' as it overestimates the size. Use \'offsetof (struct s, d)\'
+ instead. Don\'t use \'offsetof (struct s, d@<:@0@:>@)\', as this doesn\'t work with
+ MSVC and with C++ compilers. */
+@%:@undef FLEXIBLE_ARRAY_MEMBER])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLEXIBLE_ARRAY_MEMBER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLEXIBLE_ARRAY_MEMBER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FLOAT_H], [/* Define to 1 if you have the <float.h> header file. */
+@%:@undef HAVE_FLOAT_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_FLOAT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_FLOAT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_FLOAT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_FLOAT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_FLOAT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_FLOAT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([FLOAT_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([FLOAT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLOAT_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/fopen.m4:7: gl_FUNC_FOPEN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FOPEN_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FOPEN_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FOPEN_TRAILING_SLASH_BUG], [/* Define to 1 if fopen() fails to recognize a trailing slash. */
+@%:@undef FOPEN_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_FOPEN_SAFER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FOPEN_SAFER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_FOPEN_SAFER], [/* Define to 1 when using the gnulib module fopen-safer. */
+@%:@undef GNULIB_FOPEN_SAFER])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDIO_EXT_H], [/* Define to 1 if you have the <stdio_ext.h> header file. */
+@%:@undef HAVE_STDIO_EXT_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE___FPENDING], [/* Define to 1 if you have the `__fpending\' function. */
+@%:@undef HAVE___FPENDING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL___FPENDING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL___FPENDING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL___FPENDING], [/* Define to 1 if you have the declaration of `__fpending\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL___FPENDING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([PENDING_OUTPUT_N_BYTES])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PENDING_OUTPUT_N_BYTES$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([PENDING_OUTPUT_N_BYTES], [/* the number of pending output bytes on stream `fp\' */
+@%:@undef PENDING_OUTPUT_N_BYTES])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FPURGE], [/* Define to 1 if you have the `fpurge\' function. */
+@%:@undef HAVE_FPURGE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE___FPURGE], [/* Define to 1 if you have the `__fpurge\' function. */
+@%:@undef HAVE___FPURGE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FPURGE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPURGE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FPURGE], [/* Define to 1 if you have the declaration of `fpurge\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_FPURGE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE___FREADING], [/* Define to 1 if you have the `__freading\' function. */
+@%:@undef HAVE___FREADING])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ACOSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ACOSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ACOSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ASINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ASINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ASINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ATANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ATANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ATANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CEILF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CEILF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CEILF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_CEILL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_CEILL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_CEILL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_COSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_COSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_COSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_EXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_EXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_EXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FLOORF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FLOORF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FLOORF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FLOORL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FLOORL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FLOORL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FREXP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FREXP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREXP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FREXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FREXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FREXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISFINITE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISFINITE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISFINITE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISINF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISINF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISINF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISNAN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISNAN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNAN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISNANF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISNANF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNANF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISNAND])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISNAND])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNAND$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ISNANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ISNANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ISNANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LDEXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LDEXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LDEXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LOGL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LOGL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LOGL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ROUND])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ROUND])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUND$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ROUNDF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ROUNDF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUNDF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_ROUNDL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_ROUNDL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_ROUNDL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SIGNBIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SIGNBIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGNBIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SQRTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SQRTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SQRTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_TANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_TANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_TRUNC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_TRUNC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNC$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_TRUNCF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_TRUNCF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNCF$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_TRUNCL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_TRUNCL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_TRUNCL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ACOSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ACOSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ACOSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ASINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ASINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ASINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ATANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ATANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ATANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_COSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_COSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_EXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_EXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_EXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ISNANF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ISNANF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANF$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ISNAND])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ISNAND])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNAND$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ISNANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ISNANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LOGL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LOGL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LOGL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SQRTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SQRTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SQRTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_TANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_TANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_ACOSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_ACOSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ACOSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_ASINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_ASINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ASINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_ATANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_ATANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ATANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_COSL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_COSL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COSL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_EXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_EXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_EXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_FREXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_FREXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FREXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_LDEXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_LDEXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_LDEXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_LOGL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_LOGL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_LOGL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_SINL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_SINL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SINL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_SQRTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_SQRTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SQRTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_TANL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_TANL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TANL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_TRUNC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_TRUNC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TRUNC$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_TRUNCF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_TRUNCF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_TRUNCF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_CEILF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_CEILF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CEILF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_CEILL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_CEILL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_CEILL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FLOORF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FLOORF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FLOORF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FLOORL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FLOORL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FLOORL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FREXP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FREXP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREXP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FREXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FREXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FREXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_HUGE_VAL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_HUGE_VAL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_HUGE_VAL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ISFINITE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ISFINITE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISFINITE$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ISINF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ISINF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISINF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ISNAN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ISNAN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISNAN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LDEXPL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LDEXPL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LDEXPL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_NAN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_NAN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NAN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ROUND])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ROUND])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUND$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ROUNDF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ROUNDF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUNDF$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ROUNDL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ROUNDL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ROUNDL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SIGNBIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SIGNBIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SIGNBIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_SIGNBIT_USING_GCC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_SIGNBIT_USING_GCC$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_TRUNCL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_TRUNCL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_TRUNCL$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:59: gl_FUNC_FREXP_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:93: gl_FUNC_FREXP_WORKS is expanded from...
+ltdl/m4/frexp.m4:59: gl_FUNC_FREXP_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FREXP_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FREXP_IN_LIBC], [/* Define if the frexp() function is available in libc. */
+@%:@undef HAVE_FREXP_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:63: gl_FUNC_FREXPL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:102: gl_FUNC_FREXPL_WORKS is expanded from...
+ltdl/m4/frexpl.m4:63: gl_FUNC_FREXPL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FREXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FREXPL_IN_LIBC], [/* Define if the frexpl() function is available in libc. */
+@%:@undef HAVE_FREXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ftello.m4:7: gl_FUNC_FTELLO is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */
+@%:@undef HAVE_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- AC_SUBST([LIBINTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LIBINTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBINTL$])
+m4trace:configure.ac:158: -1- AC_SUBST([LTLIBINTL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LTLIBINTL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTLIBINTL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([restrict], [/* Define to the equivalent of the C99 \'restrict\' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it\'ll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([restrict])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([restrict])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^restrict$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRUCT_TIMEVAL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRUCT_TIMEVAL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_TIMEVAL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_GETTIMEOFDAY$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+@%:@undef HAVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+@%:@undef HAVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SYS_TIME_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SYS_TIME_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETTIMEOFDAY], [/* Define to 1 if gettimeofday is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_GETTIMEOFDAY], [/* Define to 1 if you have the `gettimeofday\' function. */
+@%:@undef HAVE_GETTIMEOFDAY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIMEB_H], [/* Define to 1 if you have the <sys/timeb.h> header file. */
+@%:@undef HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE__FTIME], [/* Define to 1 if you have the `_ftime\' function. */
+@%:@undef HAVE__FTIME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE__FTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIMEB_H], [/* Define to 1 if you have the <sys/timeb.h> header file. */
+@%:@undef HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE__FTIME], [/* Define to 1 if you have the `_ftime\' function. */
+@%:@undef HAVE__FTIME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE__FTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([gmtime])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^gmtime$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([gmtime], [/* Define to rpl_gmtime if the replacement function should be used. */
+@%:@undef gmtime])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([localtime])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^localtime$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([localtime], [/* Define to rpl_localtime if the replacement function should be used. */
+@%:@undef localtime])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GETTIMEOFDAY_CLOBBERS_LOCALTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GETTIMEOFDAY_CLOBBERS_LOCALTIME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [/* Define if gettimeofday clobbers the localtime buffer. */
+@%:@undef GETTIMEOFDAY_CLOBBERS_LOCALTIME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIMEB_H], [/* Define to 1 if you have the <sys/timeb.h> header file. */
+@%:@undef HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIMEB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TIMEB_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE__FTIME], [/* Define to 1 if you have the `_ftime\' function. */
+@%:@undef HAVE__FTIME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE__FTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__FTIME$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GETTIMEOFDAY_TIMEZONE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GETTIMEOFDAY_TIMEZONE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GETTIMEOFDAY_TIMEZONE], [/* Define this to \'void\' or \'struct timezone\' to match the system\'s
+ declaration of the second argument to gettimeofday. */
+@%:@undef GETTIMEOFDAY_TIMEZONE])
+m4trace:configure.ac:158: -1- AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [], [GNUmakefile=$GNUmakefile])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/iconv.m4:20: AM_ICONV_LINK is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ICONV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ICONV$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ICONV], [/* Define if you have the iconv() function and it works. */
+@%:@undef HAVE_ICONV])
+m4trace:configure.ac:158: -1- AC_SUBST([LIBICONV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LIBICONV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBICONV$])
+m4trace:configure.ac:158: -1- AC_SUBST([LTLIBICONV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LTLIBICONV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LTLIBICONV$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/iconv.m4:173: AM_ICONV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ICONV_CONST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_CONST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ICONV_CONST], [/* Define as const if the declaration of iconv() needs const. */
+@%:@undef ICONV_CONST])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ICONV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ICONV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ICONV_OPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ICONV_OPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV_OPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ICONV_UTF])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ICONV_UTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ICONV_UTF$])
+m4trace:configure.ac:158: -1- AC_SUBST([ICONV_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([ICONV_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ICONV_H], [/* Define to 1 if you have the <iconv.h> header file. */
+@%:@undef HAVE_ICONV_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_ICONV_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_ICONV_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_ICONV_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_ICONV_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_ICONV_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_ICONV_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ICONV_FLAVOR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ICONV_FLAVOR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ICONV_FLAVOR], [/* Define to a symbolic name denoting the flavor of iconv_open()
+ implementation. */
+@%:@undef ICONV_FLAVOR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INLINE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INLINE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INLINE], [/* Define to 1 if the compiler supports one of the keywords \'inline\',
+ \'__inline__\', \'__inline\' and effectively inlines functions marked as such.
+ */
+@%:@undef HAVE_INLINE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Define to 1 if the system has the type `long long int\'. */
+@%:@undef HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNSIGNED_LONG_LONG_INT], [/* Define to 1 if the system has the type `unsigned long long int\'. */
+@%:@undef HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_TYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_TYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TYPES_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDINT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDINT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_INTTYPES_H], [/* Define to 1 if you have the <sys/inttypes.h> header file. */
+@%:@undef HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_BITYPES_H], [/* Define to 1 if you have the <sys/bitypes.h> header file. */
+@%:@undef HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_BITYPES_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([AA_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AA_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([AA_APPLE_UNIVERSAL_BUILD], [/* Define if the compiler is building for multiple architectures of Apple
+ platforms at once. */
+@%:@undef AA_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- AC_SUBST([APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_PTRDIFF_T], [/* Define to the number of bits in type \'ptrdiff_t\'. */
+@%:@undef BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_SIZE_T], [/* Define to the number of bits in type \'size_t\'. */
+@%:@undef BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_PTRDIFF_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIZE_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_SIG_ATOMIC_T], [/* Define to the number of bits in type \'sig_atomic_t\'. */
+@%:@undef BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_WCHAR_T], [/* Define to the number of bits in type \'wchar_t\'. */
+@%:@undef BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_WINT_T], [/* Define to the number of bits in type \'wint_t\'. */
+@%:@undef BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WCHAR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_SIG_ATOMIC_T], [/* Define to 1 if \'sig_atomic_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_WCHAR_T], [/* Define to 1 if \'wchar_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_WINT_T], [/* Define to 1 if \'wint_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WCHAR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([PTRDIFF_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'ptrdiff_t\'. */
+@%:@undef PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIZE_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'size_t\'. */
+@%:@undef SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST([PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PTRDIFF_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIG_ATOMIC_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'sig_atomic_t\'. */
+@%:@undef SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WCHAR_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'wchar_t\'. */
+@%:@undef WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WINT_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'wint_t\'. */
+@%:@undef WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST([SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIG_ATOMIC_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCHAR_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WINT_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDINT_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/inttypes-pri.m4:14: gt_INTTYPES_PRI is expanded from...
+ltdl/m4/inttypes.m4:10: gl_INTTYPES_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([PRI_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRI_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([PRI_MACROS_BROKEN], [/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+@%:@undef PRI_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- AC_SUBST([PRI_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([PRI_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRI_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_IMAXABS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXABS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_IMAXABS], [/* Define to 1 if you have the declaration of `imaxabs\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_IMAXABS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_IMAXDIV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXDIV$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_IMAXDIV], [/* Define to 1 if you have the declaration of `imaxdiv\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_IMAXDIV])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRTOIMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOIMAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRTOIMAX], [/* Define to 1 if you have the declaration of `strtoimax\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRTOIMAX])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRTOUMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOUMAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRTOUMAX], [/* Define to 1 if you have the declaration of `strtoumax\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRTOUMAX])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_IMAXABS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_IMAXABS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_IMAXABS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_IMAXDIV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_IMAXDIV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_IMAXDIV$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOIMAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOIMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOIMAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOUMAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOUMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOUMAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_IMAXABS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_IMAXABS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXABS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_IMAXDIV])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_IMAXDIV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_IMAXDIV$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRTOIMAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRTOIMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOIMAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRTOUMAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRTOUMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOUMAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the <inttypes.h> header file. */
+@%:@undef HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_INTTYPES_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GL_TRIGGER_STDC_LIMIT_MACROS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GL_TRIGGER_STDC_LIMIT_MACROS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GL_TRIGGER_STDC_LIMIT_MACROS], [/* Define to make the limit macros in <stdint.h> visible. */
+@%:@undef GL_TRIGGER_STDC_LIMIT_MACROS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([__STDC_LIMIT_MACROS_ZZZ], [/* Ensure that <stdint.h> defines the limit macros, since gnulib\'s
+ <inttypes.h> relies on them. */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+m4trace:configure.ac:158: -1- AC_SUBST([PRIPTR_PREFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([PRIPTR_PREFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PRIPTR_PREFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([INT32_MAX_LT_INTMAX_MAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([INT32_MAX_LT_INTMAX_MAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INT32_MAX_LT_INTMAX_MAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([INT64_MAX_EQ_LONG_MAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([INT64_MAX_EQ_LONG_MAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^INT64_MAX_EQ_LONG_MAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([UINT32_MAX_LT_UINTMAX_MAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([UINT32_MAX_LT_UINTMAX_MAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UINT32_MAX_LT_UINTMAX_MAX$])
+m4trace:configure.ac:158: -1- AC_SUBST([UINT64_MAX_EQ_ULONG_MAX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([UINT64_MAX_EQ_ULONG_MAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UINT64_MAX_EQ_ULONG_MAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_IMAXABS], [/* Define to 1 if imaxabs is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_IMAXABS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_IMAXDIV], [/* Define to 1 if imaxdiv is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_IMAXDIV])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOIMAX], [/* Define to 1 if strtoimax is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOIMAX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOUMAX], [/* Define to 1 if strtoumax is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOUMAX])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnand.m4:77: gl_HAVE_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/isnand.m4:34: gl_FUNC_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ISNAND_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNAND_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISNAND_IN_LIBC], [/* Define if the isnan(double) function is available in libc. */
+@%:@undef HAVE_ISNAND_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentd.m4:6: gl_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnand.m4:46: gl_BUILD_ISNAND is expanded from...
+ltdl/m4/isnand.m4:34: gl_FUNC_ISNAND_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
+@%:@undef AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'double\'. */
+@%:@undef DBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'double\'. */
+@%:@undef DBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanf.m4:69: gl_HAVE_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanf.m4:116: gl_ISNANF_WORKS is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'float\'. */
+@%:@undef FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'float\'. */
+@%:@undef FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanf.m4:116: gl_ISNANF_WORKS is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ISNANF_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANF_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISNANF_IN_LIBC], [/* Define if the isnan(float) function is available in libc. */
+@%:@undef HAVE_ISNANF_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanf.m4:62: gl_BUILD_ISNANF is expanded from...
+ltdl/m4/isnanf.m4:42: gl_FUNC_ISNANF_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'float\'. */
+@%:@undef FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'float\'. */
+@%:@undef FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanl.m4:65: gl_HAVE_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WORDS_BIGENDIAN$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
+@%:@undef AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/isnanl.m4:114: gl_FUNC_ISNANL_WORKS is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ISNANL_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISNANL_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISNANL_IN_LIBC], [/* Define if the isnan(long double) function is available in libc. */
+@%:@undef HAVE_ISNANL_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentl.m4:6: gl_LONG_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/isnanl.m4:58: gl_BUILD_ISNANL is expanded from...
+ltdl/m4/isnanl.m4:38: gl_FUNC_ISNANL_NO_LIBM is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'long double\'. */
+@%:@undef LDBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'long double\'. */
+@%:@undef LDBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LANGINFO_H], [/* Define to 1 if you have the <langinfo.h> header file. */
+@%:@undef HAVE_LANGINFO_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_LANGINFO_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_LANGINFO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_LANGINFO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LANGINFO_H], [/* Define to 1 if you have the <langinfo.h> header file. */
+@%:@undef HAVE_LANGINFO_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LANGINFO_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LANGINFO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LANGINFO_CODESET])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LANGINFO_CODESET])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_CODESET$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LANGINFO_ERA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LANGINFO_ERA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LANGINFO_ERA$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_NL_LANGINFO], [/* Define to 1 if nl_langinfo is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_GETC_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETC_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_GETC_UNLOCKED], [/* Define to 1 if you have the declaration of `getc_unlocked\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_GETC_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_SUBST([GLIBC21])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GLIBC21])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GLIBC21$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALCHARSET_TESTS_ENVIRONMENT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALCHARSET_TESTS_ENVIRONMENT$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LSEEK_PIPE_BROKEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LSEEK_PIPE_BROKEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LSEEK_PIPE_BROKEN], [/* Define to 1 if lseek does not detect pipes. */
+@%:@undef LSEEK_PIPE_BROKEN])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FCHMODAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FCHMODAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FCHMODAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FSTATAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FSTATAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FSTATAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_FUTIMENS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_FUTIMENS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_FUTIMENS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LCHMOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LCHMOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LCHMOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_LSTAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_LSTAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_LSTAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKDIRAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKDIRAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKDIRAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKFIFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKFIFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKFIFO$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKFIFOAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKFIFOAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKFIFOAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKNOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKNOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKNOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MKNODAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MKNODAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MKNODAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_UTIMENSAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_UTIMENSAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_UTIMENSAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FCHMODAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FCHMODAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FCHMODAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FSTATAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FSTATAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FSTATAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_FUTIMENS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_FUTIMENS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FUTIMENS$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LCHMOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LCHMOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LCHMOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LSTAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LSTAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LSTAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKDIRAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKDIRAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDIRAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKFIFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKFIFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKFIFO$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKFIFOAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKFIFOAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKFIFOAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKNOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKNOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKNOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MKNODAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MKNODAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKNODAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UTIMENSAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UTIMENSAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UTIMENSAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FSTAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FSTAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSTAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FSTATAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FSTATAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FSTATAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_FUTIMENS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_FUTIMENS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUTIMENS$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LSTAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LSTAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LSTAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MKDIR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MKDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKDIR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MKFIFO])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MKFIFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKFIFO$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MKNOD])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MKNOD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKNOD$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STAT$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_UTIMENSAT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_UTIMENSAT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_UTIMENSAT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LSTAT], [/* Define to 1 if you have the `lstat\' function. */
+@%:@undef HAVE_LSTAT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LSTAT_FOLLOWS_SLASHED_SYMLINK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LSTAT_FOLLOWS_SLASHED_SYMLINK$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LSTAT_FOLLOWS_SLASHED_SYMLINK], [/* Define to 1 if `lstat\' dereferences a symlink specified with a trailing
+ slash. */
+@%:@undef LSTAT_FOLLOWS_SLASHED_SYMLINK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MALLOC], [/* Define to 1 if your system has a GNU libc compatible `malloc\' function, and
+ to 0 otherwise. */
+@%:@undef HAVE_MALLOC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([malloc])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^malloc$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([malloc], [/* Define to rpl_malloc if the replacement function should be used. */
+@%:@undef malloc])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_MALLOC_GNU])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MALLOC_GNU$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_MALLOC_GNU], [/* Define to indicate the \'malloc\' module. */
+@%:@undef GNULIB_MALLOC_GNU])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/malloc.m4:27: gl_CHECK_MALLOC_POSIX is expanded from...
+ltdl/m4/malloc.m4:11: gl_FUNC_MALLOC_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MALLOC_POSIX], [/* Define if the \'malloc\' function is POSIX compliant. */
+@%:@undef HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MALLOC_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MALLOC_POSIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MALLOC_0_IS_NONNULL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MALLOC_0_IS_NONNULL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MALLOC_0_IS_NONNULL], [/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+@%:@undef MALLOC_0_IS_NONNULL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MATH_H], [/* Define to 1 if you have the <math.h> header file. */
+@%:@undef HAVE_MATH_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_MATH_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_MATH_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_MATH_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_MATH_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_MATH_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_MATH_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ACOSL], [/* Define to 1 if acosl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ACOSL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ASINL], [/* Define to 1 if asinl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ASINL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ATANL], [/* Define to 1 if atanl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ATANL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_CEILF], [/* Define to 1 if ceilf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_CEILF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_CEILL], [/* Define to 1 if ceill is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_CEILL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_COSL], [/* Define to 1 if cosl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_COSL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_EXPL], [/* Define to 1 if expl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_EXPL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FLOORF], [/* Define to 1 if floorf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FLOORF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FLOORL], [/* Define to 1 if floorl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FLOORL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FREXPL], [/* Define to 1 if frexpl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FREXPL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LDEXPL], [/* Define to 1 if ldexpl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LDEXPL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LOGL], [/* Define to 1 if logl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LOGL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ROUND], [/* Define to 1 if round is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ROUND])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ROUNDF], [/* Define to 1 if roundf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ROUNDF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ROUNDL], [/* Define to 1 if roundl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ROUNDL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SINL], [/* Define to 1 if sinl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SINL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SQRTL], [/* Define to 1 if sqrtl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SQRTL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_TANL], [/* Define to 1 if tanl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_TANL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_TRUNC], [/* Define to 1 if trunc is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_TRUNC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_TRUNCF], [/* Define to 1 if truncf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_TRUNCF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_TRUNCL], [/* Define to 1 if truncl is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_TRUNCL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MBSTATE_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSTATE_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSTATE_T], [/* Define to 1 if <wchar.h> declares mbstate_t. */
+@%:@undef HAVE_MBSTATE_T])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([mbstate_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^mbstate_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([mbstate_t], [/* Define to a type if <wchar.h> does not define. */
+@%:@undef mbstate_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBRTOWC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if mbrtowc and mbstate_t are properly declared. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSINIT], [/* Define to 1 if you have the `mbsinit\' function. */
+@%:@undef HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if you have the `mbrtowc\' function. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_JA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_JA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if you have the `mbrtowc\' function. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:191: gl_MBRTOWC_NULL_ARG is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:240: gl_MBRTOWC_RETVAL is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:308: gl_MBRTOWC_NUL_RETVAL is expanded from...
+ltdl/m4/mbrtowc.m4:8: gl_FUNC_MBRTOWC is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MBRTOWC_NULL_ARG_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_NULL_ARG_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MBRTOWC_NULL_ARG_BUG], [/* Define if the mbrtowc function has the NULL string argument bug. */
+@%:@undef MBRTOWC_NULL_ARG_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MBRTOWC_RETVAL_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_RETVAL_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MBRTOWC_RETVAL_BUG], [/* Define if the mbrtowc function returns a wrong return value. */
+@%:@undef MBRTOWC_RETVAL_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MBRTOWC_NUL_RETVAL_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MBRTOWC_NUL_RETVAL_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MBRTOWC_NUL_RETVAL_BUG], [/* Define if the mbrtowc function does not return 0 for a NUL character. */
+@%:@undef MBRTOWC_NUL_RETVAL_BUG])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSINIT], [/* Define to 1 if you have the `mbsinit\' function. */
+@%:@undef HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if you have the `mbrtowc\' function. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbsinit.m4:7: gl_FUNC_MBSINIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/mbsinit.m4:7: gl_FUNC_MBSINIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSINIT], [/* Define to 1 if you have the `mbsinit\' function. */
+@%:@undef HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MEMCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MEMMEM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMMEM$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MEMPCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MEMPCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMPCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MEMRCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MEMRCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MEMRCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_RAWMEMCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_RAWMEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STPCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STPCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STPCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STPNCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STPNCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STPNCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRCHRNUL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRCHRNUL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRCHRNUL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRNDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRNDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRNDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRNLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRNLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRNLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRPBRK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRPBRK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRPBRK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRSEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRSEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRSTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRSTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRCASESTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRCASESTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRCASESTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRTOK_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRTOK_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRTOK_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSNLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSNLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSRCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSRCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSRCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSSTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSSTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSCASECMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSCASECMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCASECMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSNCASECMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSNCASECMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSNCASECMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSPCASECMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSPCASECMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSPCASECMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSCASESTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSCASESTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCASESTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSCSPN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSCSPN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSCSPN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSPBRK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSPBRK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSPBRK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSSPN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSSPN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSPN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSSEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSSEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSSEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_MBSTOK_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_MBSTOK_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_MBSTOK_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRERROR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRERROR$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRSIGNAL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRSIGNAL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRSIGNAL$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_STRVERSCMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_STRVERSCMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STRVERSCMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MBSLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MBSLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MBSLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_MEMMEM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMMEM$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_MEMPCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_MEMPCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMPCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_MEMRCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_MEMRCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMRCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_RAWMEMCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_RAWMEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STPCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STPCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STPCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STPNCPY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STPNCPY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STPNCPY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRCHRNUL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRCHRNUL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCHRNUL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRNDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRNDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRNLEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRNLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNLEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRPBRK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRPBRK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRPBRK$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRSEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRSEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRSEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRCASESTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRCASESTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCASESTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRTOK_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRTOK_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRTOK_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRERROR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_DECL_STRSIGNAL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_DECL_STRSIGNAL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRSIGNAL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRVERSCMP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRVERSCMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRVERSCMP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MEMCHR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MEMCHR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MEMMEM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MEMMEM$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRSTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRSTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRSTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRCASESTR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRCASESTR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRCASESTR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRERROR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRERROR$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRNDUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRNDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRNDUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRSIGNAL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRSIGNAL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRSIGNAL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRTOK_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRTOK_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRTOK_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([UNDEFINE_STRTOK_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([UNDEFINE_STRTOK_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^UNDEFINE_STRTOK_R$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSLEN], [/* Define to 1 if you have the `mbslen\' function. */
+@%:@undef HAVE_MBSLEN])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MAP_ANONYMOUS], [/* Define to a substitute value for mmap()\'s MAP_ANONYMOUS flag. */
+@%:@undef MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MAP_ANONYMOUS], [/* Define to 1 if mmap()\'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>. */
+@%:@undef HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
+@%:@undef HAVE_SYS_MMAN_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */
+@%:@undef HAVE_MPROTECT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MEMCHR], [/* Define to 1 if you have the `memchr\' function. */
+@%:@undef HAVE_MEMCHR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMCHR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_BP_SYM_H], [/* Define to 1 if you have the <bp-sym.h> header file. */
+@%:@undef HAVE_BP_SYM_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BP_SYM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BP_SYM_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_BP_SYM_H], [/* Define to 1 if you have the <bp-sym.h> header file. */
+@%:@undef HAVE_BP_SYM_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BP_SYM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_BP_SYM_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MEMMEM], [/* Define to 1 if you have the `memmem\' function. */
+@%:@undef HAVE_MEMMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMMEM$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_MEMMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_MEMMEM], [/* Define to 1 if you have the declaration of `memmem\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_MEMMEM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MEMMEM], [/* Define to 1 if you have the `memmem\' function. */
+@%:@undef HAVE_MEMMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MEMMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MKDTEMP], [/* Define to 1 if you have the `mkdtemp\' function. */
+@%:@undef HAVE_MKDTEMP])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MKDTEMP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MKDTEMP$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_NL_LANGINFO], [/* Define if nl_langinfo exists but is overridden by gnulib. */
+@%:@undef REPLACE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OBSTACK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OBSTACK$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_OBSTACK], [/* Define to 1 if libc includes obstacks. */
+@%:@undef HAVE_OBSTACK])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/stdint_h.m4:12: gl_AC_HEADER_STDINT_H is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDINT_H_WITH_UINTMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H_WITH_UINTMAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDINT_H_WITH_UINTMAX], [/* Define if <stdint.h> exists, doesn\'t clash with <sys/types.h>, and declares
+ uintmax_t. */
+@%:@undef HAVE_STDINT_H_WITH_UINTMAX])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/inttypes_h.m4:12: gl_AC_HEADER_INTTYPES_H is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTTYPES_H_WITH_UINTMAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H_WITH_UINTMAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INTTYPES_H_WITH_UINTMAX], [/* Define if <inttypes.h> exists, doesn\'t clash with <sys/types.h>, and
+ declares uintmax_t. */
+@%:@undef HAVE_INTTYPES_H_WITH_UINTMAX])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:11: gl_PRINTF_SIZES_C99 is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:88: gl_PRINTF_LONG_DOUBLE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:132: gl_PRINTF_INFINITE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([CHECK_PRINTF_SAFE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CHECK_PRINTF_SAFE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([CHECK_PRINTF_SAFE], [/* Define if you wish *printf() functions that have a safe handling of
+ non-IEEE-754 \'long double\' values. */
+@%:@undef CHECK_PRINTF_SAFE])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:237: gl_PRINTF_INFINITE_LONG_DOUBLE is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:462: gl_PRINTF_DIRECTIVE_A is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:542: gl_PRINTF_DIRECTIVE_F is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:593: gl_PRINTF_DIRECTIVE_N is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:635: gl_PRINTF_DIRECTIVE_LS is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:710: gl_PRINTF_POSITIONS is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:747: gl_PRINTF_FLAG_GROUPING is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:783: gl_PRINTF_FLAG_LEFTADJUST is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:824: gl_PRINTF_FLAG_ZERO is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:864: gl_PRINTF_PRECISION is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_OBSTACK_PRINTF], [/* Define to 1 if you have the `obstack_printf\' function. */
+@%:@undef HAVE_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wchar_t.m4:11: gt_TYPE_WCHAR_T is expanded from...
+ltdl/m4/vasnprintf.m4:33: gl_PREREQ_PRINTF_ARGS is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_T], [/* Define if you have the \'wchar_t\' type. */
+@%:@undef HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wint_t.m4:11: gt_TYPE_WINT_T is expanded from...
+ltdl/m4/vasnprintf.m4:33: gl_PREREQ_PRINTF_ARGS is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WINT_T], [/* Define if you have the \'wint_t\' type. */
+@%:@undef HAVE_WINT_T])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([size_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^size_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
+@%:@undef size_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/intmax_t.m4:36: gt_AC_TYPE_INTMAX_T is expanded from...
+ltdl/m4/vasnprintf.m4:41: gl_PREREQ_PRINTF_PARSE is expanded from...
+ltdl/m4/vasnprintf.m4:15: gl_REPLACE_VASNPRINTF is expanded from...
+ltdl/m4/obstack-printf-posix.m4:7: gl_FUNC_OBSTACK_PRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_INTMAX_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTMAX_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_INTMAX_T], [/* Define if you have the \'intmax_t\' type in <stdint.h> or <inttypes.h>. */
+@%:@undef HAVE_INTMAX_T])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([intmax_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^intmax_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([intmax_t], [/* Define to long or long long if <stdint.h> and <inttypes.h> don\'t define. */
+@%:@undef intmax_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */
+@%:@undef HAVE_SNPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRNLEN], [/* Define to 1 if you have the `strnlen\' function. */
+@%:@undef HAVE_STRNLEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCSLEN], [/* Define to 1 if you have the `wcslen\' function. */
+@%:@undef HAVE_WCSLEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCSNLEN], [/* Define to 1 if you have the `wcsnlen\' function. */
+@%:@undef HAVE_WCSNLEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if you have the `mbrtowc\' function. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCRTOMB], [/* Define to 1 if you have the `wcrtomb\' function. */
+@%:@undef HAVE_WCRTOMB])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL__SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL__SNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL__SNPRINTF], [/* Define to 1 if you have the declaration of `_snprintf\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL__SNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_OBSTACK_PRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_OBSTACK_PRINTF], [/* Define to 1 if you have the declaration of `obstack_printf\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([PROMOTED_MODE_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PROMOTED_MODE_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([PROMOTED_MODE_T], [/* Define to the type that is the result of default argument promotions of
+ type mode_t. */
+@%:@undef PROMOTED_MODE_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LSTAT], [/* Define to 1 if you have the `lstat\' function. */
+@%:@undef HAVE_LSTAT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/open.m4:7: gl_FUNC_OPEN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([OPEN_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^OPEN_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([OPEN_TRAILING_SLASH_BUG], [/* Define to 1 if open() fails to recognize a trailing slash. */
+@%:@undef OPEN_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_OPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_OPEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_OPEN], [/* Define to 1 when using the gnulib module open. */
+@%:@undef GNULIB_OPEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_PATHCONF], [/* Define to 1 if you have the `pathconf\' function. */
+@%:@undef HAVE_PATHCONF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+@%:@undef HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_PIPE2], [/* Define to 1 if you have the `pipe2\' function. */
+@%:@undef HAVE_PIPE2])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_PIPE2_SAFER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_PIPE2_SAFER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_PIPE2_SAFER], [/* Define to 1 when using the gnulib module pipe2-safer. */
+@%:@undef GNULIB_PIPE2_SAFER])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_INIT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_INIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_INIT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETFLAGS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETFLAGS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETFLAGS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETFLAGS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETFLAGS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETFLAGS$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETPGROUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETPGROUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETPGROUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETPGROUP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETPGROUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETPGROUP$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGMASK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_GETSIGMASK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_GETSIGMASK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGMASK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_SETSIGMASK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_SETSIGMASK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_POSIX_SPAWNATTR_DESTROY])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_POSIX_SPAWNATTR_DESTROY])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_POSIX_SPAWNATTR_DESTROY$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_POSIX_SPAWNATTR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_POSIX_SPAWNATTR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWNATTR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN_FILE_ACTIONS_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_POSIX_SPAWN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_POSIX_SPAWN], [/* Define to 1 if you have the `posix_spawn\' function. */
+@%:@undef HAVE_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- _m4_warn([cross], [AC_RUN_IFELSE called without default to allow cross compiling], [../../lib/autoconf/general.m4:2736: AC_RUN_IFELSE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/posix_spawn.m4:59: gl_POSIX_SPAWN_WORKS is expanded from...
+ltdl/m4/posix_spawn.m4:13: gl_POSIX_SPAWN_BODY is expanded from...
+ltdl/m4/posix_spawn.m4:8: gl_POSIX_SPAWN is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_PATHS_H], [/* Define to 1 if you have the <paths.h> header file. */
+@%:@undef HAVE_PATHS_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PATHS_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_PATHS_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_CONFSTR], [/* Define to 1 if you have the `confstr\' function. */
+@%:@undef HAVE_CONFSTR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SCHED_SETPARAM], [/* Define to 1 if you have the `sched_setparam\' function. */
+@%:@undef HAVE_SCHED_SETPARAM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SCHED_SETSCHEDULER], [/* Define to 1 if you have the `sched_setscheduler\' function. */
+@%:@undef HAVE_SCHED_SETSCHEDULER])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SETEGID], [/* Define to 1 if you have the `setegid\' function. */
+@%:@undef HAVE_SETEGID])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SETEUID], [/* Define to 1 if you have the `seteuid\' function. */
+@%:@undef HAVE_SETEUID])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VFORK], [/* Define to 1 if you have the `vfork\' function. */
+@%:@undef HAVE_VFORK])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexp.m4:93: gl_FUNC_FREXP_WORKS is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FREXP_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FREXP_IN_LIBC], [/* Define if the frexp function is available in libc. */
+@%:@undef HAVE_FREXP_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexp.m4:9: gl_FUNC_PRINTF_FREXP is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDEXP_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LDEXP_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LDEXP_IN_LIBC], [/* Define if the ldexp function is available in libc. */
+@%:@undef HAVE_LDEXP_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/frexpl.m4:102: gl_FUNC_FREXPL_WORKS is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FREXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_FREXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_FREXPL_IN_LIBC], [/* Define if the frexpl function is available in libc. */
+@%:@undef HAVE_FREXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ldexpl.m4:65: gl_FUNC_LDEXPL_WORKS is expanded from...
+ltdl/m4/printf-frexpl.m4:9: gl_FUNC_PRINTF_FREXPL is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDEXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LDEXPL_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LDEXPL_IN_LIBC], [/* Define if the ldexpl function is available in libc. */
+@%:@undef HAVE_LDEXPL_IN_LIBC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_PROGRAM_INVOCATION_NAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PROGRAM_INVOCATION_NAME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_PROGRAM_INVOCATION_NAME], [/* Define to 1 if you have the declaration of `program_invocation_name\', and
+ to 0 if you don\'t. */
+@%:@undef HAVE_DECL_PROGRAM_INVOCATION_NAME])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME], [/* Define to 1 if you have the declaration of `program_invocation_short_name\',
+ and to 0 if you don\'t. */
+@%:@undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAWMEMCHR], [/* Define to 1 if you have the `rawmemchr\' function. */
+@%:@undef HAVE_RAWMEMCHR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RAWMEMCHR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RAWMEMCHR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_READLINK], [/* Define to 1 if you have the `readlink\' function. */
+@%:@undef HAVE_READLINK])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([READLINK_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^READLINK_TRAILING_SLASH_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([READLINK_TRAILING_SLASH_BUG], [/* Define to 1 if readlink fails to recognize a trailing slash. */
+@%:@undef READLINK_TRAILING_SLASH_BUG])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LOCALE_H], [/* Define to 1 if you have the <locale.h> header file. */
+@%:@undef HAVE_LOCALE_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([_REGEX_LARGE_OFFSETS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^_REGEX_LARGE_OFFSETS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([_REGEX_LARGE_OFFSETS], [/* Define if you want regoff_t to be at least as wide POSIX requires. */
+@%:@undef _REGEX_LARGE_OFFSETS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_syntax_options])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_syntax_options$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_syntax_options], [/* Define to rpl_re_syntax_options if the replacement should be used. */
+@%:@undef re_syntax_options])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_set_syntax])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_set_syntax$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_set_syntax], [/* Define to rpl_re_set_syntax if the replacement should be used. */
+@%:@undef re_set_syntax])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_compile_pattern])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_compile_pattern$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_compile_pattern], [/* Define to rpl_re_compile_pattern if the replacement should be used. */
+@%:@undef re_compile_pattern])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_compile_fastmap])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_compile_fastmap$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_compile_fastmap], [/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+@%:@undef re_compile_fastmap])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_search])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_search$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_search], [/* Define to rpl_re_search if the replacement should be used. */
+@%:@undef re_search])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_search_2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_search_2$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_search_2], [/* Define to rpl_re_search_2 if the replacement should be used. */
+@%:@undef re_search_2])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_match])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_match$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_match], [/* Define to rpl_re_match if the replacement should be used. */
+@%:@undef re_match])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_match_2])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_match_2$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_match_2], [/* Define to rpl_re_match_2 if the replacement should be used. */
+@%:@undef re_match_2])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_set_registers])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_set_registers$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_set_registers], [/* Define to rpl_re_set_registers if the replacement should be used. */
+@%:@undef re_set_registers])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_comp])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_comp$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_comp], [/* Define to rpl_re_comp if the replacement should be used. */
+@%:@undef re_comp])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([re_exec])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^re_exec$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([re_exec], [/* Define to rpl_re_exec if the replacement should be used. */
+@%:@undef re_exec])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([regcomp])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regcomp$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([regcomp], [/* Define to rpl_regcomp if the replacement should be used. */
+@%:@undef regcomp])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([regexec])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regexec$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([regexec], [/* Define to rpl_regexec if the replacement should be used. */
+@%:@undef regexec])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([regerror])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regerror$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([regerror], [/* Define to rpl_regerror if the replacement should be used. */
+@%:@undef regerror])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([regfree])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^regfree$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([regfree], [/* Define to rpl_regfree if the replacement should be used. */
+@%:@undef regfree])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LIBINTL_H], [/* Define to 1 if you have the <libintl.h> header file. */
+@%:@undef HAVE_LIBINTL_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBINTL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LIBINTL_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISBLANK], [/* Define to 1 if you have the `isblank\' function. */
+@%:@undef HAVE_ISBLANK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISWCTYPE], [/* Define to 1 if you have the `iswctype\' function. */
+@%:@undef HAVE_ISWCTYPE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCSCOLL], [/* Define to 1 if you have the `wcscoll\' function. */
+@%:@undef HAVE_WCSCOLL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_ISBLANK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ISBLANK$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_ISBLANK], [/* Define to 1 if you have the declaration of `isblank\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_ISBLANK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LSTAT], [/* Define to 1 if you have the `lstat\' function. */
+@%:@undef HAVE_LSTAT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([RENAME_TRAILING_SLASH_DEST_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_TRAILING_SLASH_DEST_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([RENAME_TRAILING_SLASH_DEST_BUG], [/* Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6. */
+@%:@undef RENAME_TRAILING_SLASH_DEST_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([RENAME_TRAILING_SLASH_SOURCE_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_TRAILING_SLASH_SOURCE_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([RENAME_TRAILING_SLASH_SOURCE_BUG], [/* Define if rename does not correctly handle slashes on the source argument,
+ such as on Solaris 9 or cygwin 1.5. */
+@%:@undef RENAME_TRAILING_SLASH_SOURCE_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([RENAME_HARD_LINK_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_HARD_LINK_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([RENAME_HARD_LINK_BUG], [/* Define if rename fails to leave hard links alone, as on NetBSD 1.6 or
+ Cygwin 1.5. */
+@%:@undef RENAME_HARD_LINK_BUG])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([RENAME_DEST_EXISTS_BUG])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^RENAME_DEST_EXISTS_BUG$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([RENAME_DEST_EXISTS_BUG], [/* Define if rename does not work when the destination file exists, as on
+ Cygwin 1.5 or Windows. */
+@%:@undef RENAME_DEST_EXISTS_BUG])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RMDIR], [/* Define to 1 if you have the `rmdir\' function. */
+@%:@undef HAVE_RMDIR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RMDIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RMDIR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SCHED_H], [/* Define to 1 if you have the <sched.h> header file. */
+@%:@undef HAVE_SCHED_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SCHED_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SCHED_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SCHED_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SCHED_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SCHED_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SCHED_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SCHED_H], [/* Define to 1 if you have the <sched.h> header file. */
+@%:@undef HAVE_SCHED_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SCHED_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SCHED_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SCHED_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRUCT_SCHED_PARAM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SCHED_PARAM$])
+m4trace:configure.ac:158: -1- AC_SUBST([SCHED_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SCHED_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SCHED_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SETENV], [/* Define to 1 if you have the `setenv\' function. */
+@%:@undef HAVE_SETENV])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SEARCH_H], [/* Define to 1 if you have the <search.h> header file. */
+@%:@undef HAVE_SEARCH_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SEARCH_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SEARCH_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_TSEARCH], [/* Define to 1 if you have the `tsearch\' function. */
+@%:@undef HAVE_TSEARCH])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TSEARCH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TSEARCH$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SIGNAL_H_SIGPIPE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGNAL_H_SIGPIPE$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SIGPROCMASK])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SIGPROCMASK])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGPROCMASK$])
+m4trace:configure.ac:158: -1- AC_SUBST([GNULIB_SIGACTION])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([GNULIB_SIGACTION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_SIGACTION$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_POSIX_SIGNALBLOCKING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SIGNALBLOCKING$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGINFO_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGINFO_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGACTION])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGACTION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGACTION$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_TYPE_VOLATILE_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */
+@%:@undef HAVE_SIGACTION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRUCT_SIGACTION_SA_SIGACTION], [/* Define to 1 if `sa_sigaction\' is a member of `struct sigaction\'. */
+@%:@undef HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([uid_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^uid_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([uid_t], [/* Define to `int\' if <sys/types.h> doesn\'t define. */
+@%:@undef uid_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([gid_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^gid_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([gid_t], [/* Define to `int\' if <sys/types.h> doesn\'t define. */
+@%:@undef gid_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGALTSTACK], [/* Define to 1 if you have the `sigaltstack\' function. */
+@%:@undef HAVE_SIGALTSTACK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGINTERRUPT], [/* Define to 1 if you have the `siginterrupt\' function. */
+@%:@undef HAVE_SIGINTERRUPT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIGINFO_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGINFO_T], [/* Define to 1 if the system has the type `siginfo_t\'. */
+@%:@undef HAVE_SIGINFO_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNAL_H], [/* Define to 1 if you have the <signal.h> header file. */
+@%:@undef HAVE_SIGNAL_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SIGNAL_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SIGNAL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SIGNAL_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGACTION], [/* Define to 1 if sigaction is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGACTION])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGADDSET], [/* Define to 1 if sigaddset is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGADDSET])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGDELSET], [/* Define to 1 if sigdelset is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGDELSET])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGEMPTYSET], [/* Define to 1 if sigemptyset is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGEMPTYSET])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGFILLSET], [/* Define to 1 if sigfillset is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGFILLSET])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGISMEMBER], [/* Define to 1 if sigismember is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGISMEMBER])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGPENDING], [/* Define to 1 if sigpending is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGPENDING])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SIGPROCMASK], [/* Define to 1 if sigprocmask is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SIGPROCMASK])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:194: gl_FLOAT_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_SIGNBIT_WORD], [/* Define as the word index where to find the sign of \'float\'. */
+@%:@undef FLT_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_SIGNBIT_BIT], [/* Define as the bit index in the word where to find the sign of \'float\'. */
+@%:@undef FLT_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:199: gl_DOUBLE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_SIGNBIT_WORD], [/* Define as the word index where to find the sign of \'double\'. */
+@%:@undef DBL_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_SIGNBIT_BIT], [/* Define as the bit index in the word where to find the sign of \'double\'. */
+@%:@undef DBL_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:209: gl_FLOATTYPE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:204: gl_LONG_DOUBLE_SIGN_LOCATION is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_SIGNBIT_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_SIGNBIT_WORD], [/* Define as the word index where to find the sign of \'long double\'. */
+@%:@undef LDBL_SIGNBIT_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_SIGNBIT_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_SIGNBIT_BIT], [/* Define as the bit index in the word where to find the sign of \'long
+ double\'. */
+@%:@undef LDBL_SIGNBIT_BIT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_COPYSIGNF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGNF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_COPYSIGNF], [/* Define to 1 if you have the declaration of `copysignf\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_COPYSIGNF])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_COPYSIGNF_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGNF_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_COPYSIGNF_IN_LIBC], [/* Define if the copysignf function is declared in <math.h> and available in
+ libc. */
+@%:@undef HAVE_COPYSIGNF_IN_LIBC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_COPYSIGN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_COPYSIGN], [/* Define to 1 if you have the declaration of `copysign\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_COPYSIGN])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_COPYSIGN_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGN_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_COPYSIGN_IN_LIBC], [/* Define if the copysign function is declared in <math.h> and available in
+ libc. */
+@%:@undef HAVE_COPYSIGN_IN_LIBC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_COPYSIGNL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_COPYSIGNL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_COPYSIGNL], [/* Define to 1 if you have the declaration of `copysignl\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_COPYSIGNL])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2675: AC_TRY_LINK is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/signbit.m4:7: gl_SIGNBIT is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_COPYSIGNL_IN_LIBC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_COPYSIGNL_IN_LIBC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_COPYSIGNL_IN_LIBC], [/* Define if the copysignl function is declared in <math.h> and available in
+ libc. */
+@%:@undef HAVE_COPYSIGNL_IN_LIBC])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGSET_T], [/* Define to 1 if the system has the type `sigset_t\'. */
+@%:@undef HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGSET_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGSET_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/size_max.m4:9: gl_SIZE_MAX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([SIZE_MAX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_MAX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIZE_MAX], [/* Define as the maximum value of type \'size_t\', if the system doesn\'t define
+ it. */
+@%:@undef SIZE_MAX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIZE_MAX], [/* Define as the maximum value of type \'size_t\', if the system doesn\'t define
+ it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */
+@%:@undef HAVE_SNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SNPRINTF$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1226: gl_SNPRINTF_SIZE1 is expanded from...
+ltdl/m4/snprintf.m4:7: gl_FUNC_SNPRINTF is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_SNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_SNPRINTF], [/* Define to 1 if you have the declaration of `snprintf\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_SNPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SNPRINTF], [/* Define to 1 if you have the `snprintf\' function. */
+@%:@undef HAVE_SNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SNPRINTF$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1027: gl_SNPRINTF_TRUNCATION_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1104: gl_SNPRINTF_RETVAL_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1161: gl_SNPRINTF_DIRECTIVE_N is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1226: gl_SNPRINTF_SIZE1 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/printf.m4:1282: gl_VSNPRINTF_ZEROSIZE_C99 is expanded from...
+ltdl/m4/snprintf-posix.m4:7: gl_FUNC_SNPRINTF_POSIX is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SPAWN_H], [/* Define to 1 if you have the <spawn.h> header file. */
+@%:@undef HAVE_SPAWN_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SPAWN_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SPAWN_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SPAWN_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SPAWN_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SPAWN_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SPAWN_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SPAWN_H], [/* Define to 1 if you have the <spawn.h> header file. */
+@%:@undef HAVE_SPAWN_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_POSIX_SPAWNATTR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWNATTR_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_POSIX_SPAWNATTR_T], [/* Define to 1 if the system has the type `posix_spawnattr_t\'. */
+@%:@undef HAVE_POSIX_SPAWNATTR_T])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_POSIX_SPAWN_FILE_ACTIONS_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_POSIX_SPAWN_FILE_ACTIONS_T], [/* Define to 1 if the system has the type `posix_spawn_file_actions_t\'. */
+@%:@undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SPAWN_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SPAWN_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SPAWN_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWN], [/* Define to 1 if posix_spawn is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNP], [/* Define to 1 if posix_spawnp is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT], [/* Define to 1 if posix_spawnattr_init is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY], [/* Define to 1 if posix_spawnattr_destroy is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT], [/* Define to 1 if posix_spawnattr_getsigdefault is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT], [/* Define to 1 if posix_spawnattr_setsigdefault is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK], [/* Define to 1 if posix_spawnattr_getsigmask is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK], [/* Define to 1 if posix_spawnattr_setsigmask is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS], [/* Define to 1 if posix_spawnattr_getflags is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS], [/* Define to 1 if posix_spawnattr_setflags is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP], [/* Define to 1 if posix_spawnattr_getpgroup is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP], [/* Define to 1 if posix_spawnattr_setpgroup is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY], [/* Define to 1 if posix_spawnattr_getschedpolicy is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY], [/* Define to 1 if posix_spawnattr_setschedpolicy is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM], [/* Define to 1 if posix_spawnattr_getschedparam is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM], [/* Define to 1 if posix_spawnattr_setschedparam is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT], [/* Define to 1 if posix_spawn_file_actions_init is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY], [/* Define to 1 if posix_spawn_file_actions_destroy is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN], [/* Define to 1 if posix_spawn_file_actions_addopen is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE], [/* Define to 1 if posix_spawn_file_actions_addclose is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POSIX_SPAWWN_FILE_ACTIONS_ADDDUP2], [/* Define to 1 if posix_spawwn_file_actions_adddup2 is declared even after
+ undefining macros. */
+@%:@undef HAVE_RAW_DECL_POSIX_SPAWWN_FILE_ACTIONS_ADDDUP2])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/ssize_t.m4:10: gt_TYPE_SSIZE_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ssize_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ssize_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ssize_t], [/* Define as a signed type of the same size as size_t. */
+@%:@undef ssize_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LSTAT], [/* Define to 1 if you have the `lstat\' function. */
+@%:@undef HAVE_LSTAT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_FUNC_STAT_DIR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUNC_STAT_DIR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_FUNC_STAT_DIR], [/* Define to 1 if stat needs help when passed a directory name with a trailing
+ slash */
+@%:@undef REPLACE_FUNC_STAT_DIR])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_FUNC_STAT_FILE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_FUNC_STAT_FILE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_FUNC_STAT_FILE], [/* Define to 1 if stat needs help when passed a file name with a trailing
+ slash */
+@%:@undef REPLACE_FUNC_STAT_FILE])
+m4trace:configure.ac:158: -1- AC_SUBST([STDARG_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([STDARG_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDARG_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDARG_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDARG_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDARG_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/stdarg.m4:10: gl_STDARG_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the <stdarg.h> header file. */
+@%:@undef HAVE_STDARG_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDARG_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDARG_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDARG_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDARG_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDARG_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDARG_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+ltdl/m4/gnulib-common.m4:136: gl_CACHE_VAL_SILENT is expanded from...
+ltdl/m4/stdarg.m4:10: gl_STDARG_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([va_copy])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^va_copy$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([va_copy], [/* Define as a macro for copying va_list variables. */
+@%:@undef va_copy])
+m4trace:configure.ac:158: -1- AH_OUTPUT([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([va_copy])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^va_copy$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([va_copy], [/* Define as a macro for copying va_list variables. */
+@%:@undef va_copy])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/stdbool.m4:37: AC_HEADER_STDBOOL is expanded from...
+ltdl/m4/stdbool.m4:10: AM_STDBOOL_H is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE__BOOL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__BOOL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE__BOOL], [/* Define to 1 if the system has the type `_Bool\'. */
+@%:@undef HAVE__BOOL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDBOOL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDBOOL_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDBOOL_H], [/* Define to 1 if stdbool.h conforms to C99. */
+@%:@undef HAVE_STDBOOL_H])
+m4trace:configure.ac:158: -1- AC_SUBST([STDBOOL_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([STDBOOL_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDBOOL_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE__BOOL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE__BOOL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE__BOOL$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_NULL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_NULL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NULL$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([STDDEF_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([STDDEF_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDDEF_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDDEF_H], [/* Define to 1 if you have the <stddef.h> header file. */
+@%:@undef HAVE_STDDEF_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDDEF_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDDEF_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDDEF_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDDEF_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDDEF_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDDEF_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UNSIGNED_LONG_LONG_INT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSIGNED_LONG_LONG_INT$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_TYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_TYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_TYPES_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDINT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDINT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_INTTYPES_H], [/* Define to 1 if you have the <sys/inttypes.h> header file. */
+@%:@undef HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_BITYPES_H], [/* Define to 1 if you have the <sys/bitypes.h> header file. */
+@%:@undef HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_INTTYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_INTTYPES_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SYS_BITYPES_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_BITYPES_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_PTRDIFF_T], [/* Define to the number of bits in type \'ptrdiff_t\'. */
+@%:@undef BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_SIZE_T], [/* Define to the number of bits in type \'size_t\'. */
+@%:@undef BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_PTRDIFF_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_PTRDIFF_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_SIZE_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIZE_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_SIG_ATOMIC_T], [/* Define to the number of bits in type \'sig_atomic_t\'. */
+@%:@undef BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_WCHAR_T], [/* Define to the number of bits in type \'wchar_t\'. */
+@%:@undef BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([BITSIZEOF_WINT_T], [/* Define to the number of bits in type \'wint_t\'. */
+@%:@undef BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WCHAR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([BITSIZEOF_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^BITSIZEOF_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_SIG_ATOMIC_T], [/* Define to 1 if \'sig_atomic_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_WCHAR_T], [/* Define to 1 if \'wchar_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SIGNED_WINT_T], [/* Define to 1 if \'wint_t\' is a signed integer type. */
+@%:@undef HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_SIG_ATOMIC_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_SIG_ATOMIC_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WCHAR_T$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_SIGNED_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SIGNED_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([PTRDIFF_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'ptrdiff_t\'. */
+@%:@undef PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIZE_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'size_t\'. */
+@%:@undef SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST([PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([PTRDIFF_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^PTRDIFF_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SIZE_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIZE_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([SIG_ATOMIC_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'sig_atomic_t\'. */
+@%:@undef SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WCHAR_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'wchar_t\'. */
+@%:@undef WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WINT_T_SUFFIX], [/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ \'wint_t\'. */
+@%:@undef WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST([SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SIG_ATOMIC_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SIG_ATOMIC_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([WCHAR_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCHAR_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([WINT_T_SUFFIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WINT_T_SUFFIX$])
+m4trace:configure.ac:158: -1- AC_SUBST([STDINT_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STDINT_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDIO_H], [/* Define to 1 if you have the <stdio.h> header file. */
+@%:@undef HAVE_STDIO_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDIO_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDIO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDIO_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDIO_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDIO_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDIO_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_DPRINTF], [/* Define to 1 if dprintf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_DPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FPURGE], [/* Define to 1 if fpurge is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FPURGE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FSEEKO], [/* Define to 1 if fseeko is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FSEEKO])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FTELLO], [/* Define to 1 if ftello is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FTELLO])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETDELIM], [/* Define to 1 if getdelim is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETDELIM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETLINE], [/* Define to 1 if getline is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETLINE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_POPEN], [/* Define to 1 if popen is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_POPEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_RENAMEAT], [/* Define to 1 if renameat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_RENAMEAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SNPRINTF], [/* Define to 1 if snprintf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SNPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_VDPRINTF], [/* Define to 1 if vdprintf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_VDPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_VSNPRINTF], [/* Define to 1 if vsnprintf is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_VSNPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the <stdlib.h> header file. */
+@%:@undef HAVE_STDLIB_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STDLIB_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STDLIB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STDLIB_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STDLIB_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STDLIB_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STDLIB_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RANDOM_H], [/* Define to 1 if you have the <random.h> header file. */
+@%:@undef HAVE_RANDOM_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RANDOM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_RANDOM_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_RANDOM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_RANDOM_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_RANDOM_DATA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRUCT_RANDOM_DATA$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRUCT_RANDOM_DATA], [/* Define to 1 if the system has the type `struct random_data\'. */
+@%:@undef HAVE_STRUCT_RANDOM_DATA])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ATOLL], [/* Define to 1 if atoll is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ATOLL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_CANONICALIZE_FILE_NAME], [/* Define to 1 if canonicalize_file_name is declared even after undefining
+ macros. */
+@%:@undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETLOADAVG], [/* Define to 1 if getloadavg is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETLOADAVG])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETSUBOPT], [/* Define to 1 if getsubopt is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETSUBOPT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKDTEMP], [/* Define to 1 if mkdtemp is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKDTEMP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKOSTEMP], [/* Define to 1 if mkostemp is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKOSTEMP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKOSTEMPS], [/* Define to 1 if mkostemps is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKOSTEMPS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKSTEMP], [/* Define to 1 if mkstemp is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKSTEMP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKSTEMPS], [/* Define to 1 if mkstemps is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKSTEMPS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_RANDOM_R], [/* Define to 1 if random_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_RANDOM_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_INITSTAT_R], [/* Define to 1 if initstat_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_INITSTAT_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SRANDOM_R], [/* Define to 1 if srandom_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SRANDOM_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SETSTATE_R], [/* Define to 1 if setstate_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SETSTATE_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_REALPATH], [/* Define to 1 if realpath is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_REALPATH])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_RPMATCH], [/* Define to 1 if rpmatch is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_RPMATCH])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SETENV], [/* Define to 1 if setenv is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SETENV])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOD], [/* Define to 1 if strtod is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOLL], [/* Define to 1 if strtoll is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOLL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOULL], [/* Define to 1 if strtoull is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOULL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_UNSETENV], [/* Define to 1 if unsetenv is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_UNSETENV])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([GNULIB_STDLIB_SAFER])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^GNULIB_STDLIB_SAFER$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([GNULIB_STDLIB_SAFER], [/* Define to 1 when using the gnulib module stdlib-safer. */
+@%:@undef GNULIB_STDLIB_SAFER])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRCHRNUL], [/* Define to 1 if you have the `strchrnul\' function. */
+@%:@undef HAVE_STRCHRNUL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRCHRNUL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRCHRNUL$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRERROR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRERROR], [/* Define to 1 if you have the declaration of `strerror\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRERROR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_SOCKET_H], [/* Define to 1 if you have the <sys/socket.h> header file. */
+@%:@undef HAVE_SYS_SOCKET_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WINSOCK2_H], [/* Define to 1 if you have the <winsock2.h> header file. */
+@%:@undef HAVE_WINSOCK2_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WINSOCK2_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINSOCK2_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_STRERROR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRERROR$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_STRERROR], [/* Define this to 1 if strerror is broken. */
+@%:@undef REPLACE_STRERROR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the <string.h> header file. */
+@%:@undef HAVE_STRING_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_STRING_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_STRING_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_STRING_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_STRING_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_STRING_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_STRING_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MEMMEM], [/* Define to 1 if memmem is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MEMMEM])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MEMPCPY], [/* Define to 1 if mempcpy is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MEMPCPY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MEMRCHR], [/* Define to 1 if memrchr is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MEMRCHR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_RAWMEMCHR], [/* Define to 1 if rawmemchr is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_RAWMEMCHR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STPCPY], [/* Define to 1 if stpcpy is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STPCPY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STPNCPY], [/* Define to 1 if stpncpy is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STPNCPY])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRCHRNUL], [/* Define to 1 if strchrnul is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRCHRNUL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRDUP], [/* Define to 1 if strdup is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRDUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRNDUP], [/* Define to 1 if strndup is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRNDUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRNLEN], [/* Define to 1 if strnlen is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRNLEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRPBRK], [/* Define to 1 if strpbrk is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRPBRK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRSEP], [/* Define to 1 if strsep is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRSEP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRCASESTR], [/* Define to 1 if strcasestr is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRCASESTR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRTOK_R], [/* Define to 1 if strtok_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRTOK_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRSIGNAL], [/* Define to 1 if strsignal is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRSIGNAL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STRVERSCMP], [/* Define to 1 if strverscmp is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STRVERSCMP])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRNDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNDUP$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRNDUP], [/* Define to 1 if you have the declaration of `strndup\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRNDUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRNDUP], [/* Define to 1 if you have the `strndup\' function. */
+@%:@undef HAVE_STRNDUP])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRNLEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRNLEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRNLEN], [/* Define to 1 if you have the declaration of `strnlen\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_STRNLEN])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([strnlen])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^strnlen$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([strnlen], [/* Define to rpl_strnlen if the replacement function should be used. */
+@%:@undef strnlen])
+m4trace:configure.ac:158: -1- AC_SUBST([POW_LIB])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([POW_LIB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POW_LIB$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRTOL], [/* Define to 1 if you have the `strtol\' function. */
+@%:@undef HAVE_STRTOL])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRTOL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRTOL$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([STAT_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^STAT_MACROS_BROKEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([STAT_MACROS_BROKEN], [/* Define to 1 if the `S_IS*\' macros in <sys/stat.h> do not work properly. */
+@%:@undef STAT_MACROS_BROKEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the <sys/stat.h> header file. */
+@%:@undef HAVE_SYS_STAT_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SYS_STAT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SYS_STAT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_STAT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([nlink_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^nlink_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([nlink_t], [/* Define to the type of st_nlink in struct stat, or a supertype. */
+@%:@undef nlink_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FCHMODAT], [/* Define to 1 if fchmodat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FCHMODAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FSTATAT], [/* Define to 1 if fstatat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FSTATAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FUTIMENS], [/* Define to 1 if futimens is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FUTIMENS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LCHMOD], [/* Define to 1 if lchmod is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LCHMOD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LSTAT], [/* Define to 1 if lstat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LSTAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKDIRAT], [/* Define to 1 if mkdirat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKDIRAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKFIFO], [/* Define to 1 if mkfifo is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKFIFO])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKFIFOAT], [/* Define to 1 if mkfifoat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKFIFOAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKNOD], [/* Define to 1 if mknod is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKNOD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MKNODAT], [/* Define to 1 if mknodat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MKNODAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_STAT], [/* Define to 1 if stat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_STAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_UTIMENSAT], [/* Define to 1 if utimensat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_UTIMENSAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_WAIT_H], [/* Define to 1 if you have the <sys/wait.h> header file. */
+@%:@undef HAVE_SYS_WAIT_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_SYS_WAIT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_SYS_WAIT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_SYS_WAIT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_LOCALTIME_R])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_LOCALTIME_R])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_LOCALTIME_R$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_MKTIME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_MKTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_MKTIME$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_NANOSLEEP])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_NANOSLEEP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_NANOSLEEP$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_STRPTIME])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_STRPTIME])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_STRPTIME$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_TIMEGM])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_TIMEGM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_TIMEGM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_TIME_H], [/* Define to 1 if you have the <time.h> header file. */
+@%:@undef HAVE_TIME_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_TIME_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_TIME_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_TIME_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_TIME_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_TIME_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_TIME_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the <sys/time.h> header file. */
+@%:@undef HAVE_SYS_TIME_H])
+m4trace:configure.ac:158: -1- AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([TIME_H_DEFINES_STRUCT_TIMESPEC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^TIME_H_DEFINES_STRUCT_TIMESPEC$])
+m4trace:configure.ac:158: -1- AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^SYS_TIME_H_DEFINES_STRUCT_TIMESPEC$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE___SECURE_GETENV], [/* Define to 1 if you have the `__secure_getenv\' function. */
+@%:@undef HAVE___SECURE_GETENV])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE___SECURE_GETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE___SECURE_GETENV$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_UNISTD_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_UNISTD_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_UNISTD_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_UNISTD_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_UNISTD_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_UNISTD_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNISTD_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_CHOWN], [/* Define to 1 if chown is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_CHOWN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_DUP2], [/* Define to 1 if dup2 is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_DUP2])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_DUP3], [/* Define to 1 if dup3 is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_DUP3])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ENVIRON], [/* Define to 1 if environ is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ENVIRON])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_EUIDACCESS], [/* Define to 1 if euidaccess is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_EUIDACCESS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FACCESSAT], [/* Define to 1 if faccessat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FACCESSAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FCHDIR], [/* Define to 1 if fchdir is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FCHDIR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FCHOWNAT], [/* Define to 1 if fchownat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FCHOWNAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FSYNC], [/* Define to 1 if fsync is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FSYNC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_FTRUNCATE], [/* Define to 1 if ftruncate is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_FTRUNCATE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETCWD], [/* Define to 1 if getcwd is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETCWD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETDOMAINNAME], [/* Define to 1 if getdomainname is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETDOMAINNAME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETDTABLESIZE], [/* Define to 1 if getdtablesize is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETDTABLESIZE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETGROUPS], [/* Define to 1 if getgroups is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETGROUPS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETHOSTNAME], [/* Define to 1 if gethostname is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETHOSTNAME])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETLOGIN], [/* Define to 1 if getlogin is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETLOGIN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETLOGIN_R], [/* Define to 1 if getlogin_r is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETLOGIN_R])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETPAGESIZE], [/* Define to 1 if getpagesize is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETPAGESIZE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_GETUSERSHELL], [/* Define to 1 if getusershell is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_GETUSERSHELL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SETUSERSHELL], [/* Define to 1 if setusershell is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SETUSERSHELL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_ENDUSERSHELL], [/* Define to 1 if endusershell is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_ENDUSERSHELL])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LCHOWN], [/* Define to 1 if lchown is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LCHOWN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LINK], [/* Define to 1 if link is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LINK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LINKAT], [/* Define to 1 if linkat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LINKAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_LSEEK], [/* Define to 1 if lseek is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_LSEEK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_PIPE2], [/* Define to 1 if pipe2 is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_PIPE2])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_PREAD], [/* Define to 1 if pread is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_PREAD])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_READLINK], [/* Define to 1 if readlink is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_READLINK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_READLINKAT], [/* Define to 1 if readlinkat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_READLINKAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_RMDIR], [/* Define to 1 if rmdir is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_RMDIR])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SLEEP], [/* Define to 1 if sleep is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SLEEP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SYMLINK], [/* Define to 1 if symlink is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SYMLINK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_SYMLINKAT], [/* Define to 1 if symlinkat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_SYMLINKAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_UNLINK], [/* Define to 1 if unlink is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_UNLINK])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_UNLINKAT], [/* Define to 1 if unlinkat is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_UNLINKAT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_USLEEP], [/* Define to 1 if usleep is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_USLEEP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_PIPE], [/* Define to 1 if you have the `pipe\' function. */
+@%:@undef HAVE_PIPE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([USE_UNLOCKED_IO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^USE_UNLOCKED_IO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([USE_UNLOCKED_IO], [/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps, but it is not
+ safe for multithreaded apps. */
+@%:@undef USE_UNLOCKED_IO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_CLEARERR_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_CLEARERR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_CLEARERR_UNLOCKED], [/* Define to 1 if you have the declaration of `clearerr_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_CLEARERR_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FEOF_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FEOF_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FEOF_UNLOCKED], [/* Define to 1 if you have the declaration of `feof_unlocked\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_FEOF_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FERROR_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FERROR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FERROR_UNLOCKED], [/* Define to 1 if you have the declaration of `ferror_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FERROR_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FFLUSH_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FFLUSH_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FFLUSH_UNLOCKED], [/* Define to 1 if you have the declaration of `fflush_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FFLUSH_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FGETS_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FGETS_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FGETS_UNLOCKED], [/* Define to 1 if you have the declaration of `fgets_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FGETS_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FPUTC_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPUTC_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FPUTC_UNLOCKED], [/* Define to 1 if you have the declaration of `fputc_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FPUTC_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FPUTS_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FPUTS_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FPUTS_UNLOCKED], [/* Define to 1 if you have the declaration of `fputs_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FPUTS_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FREAD_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FREAD_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FREAD_UNLOCKED], [/* Define to 1 if you have the declaration of `fread_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FREAD_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_FWRITE_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_FWRITE_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_FWRITE_UNLOCKED], [/* Define to 1 if you have the declaration of `fwrite_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_FWRITE_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_GETCHAR_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_GETCHAR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_GETCHAR_UNLOCKED], [/* Define to 1 if you have the declaration of `getchar_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_GETCHAR_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_PUTC_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PUTC_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_PUTC_UNLOCKED], [/* Define to 1 if you have the declaration of `putc_unlocked\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_PUTC_UNLOCKED])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_PUTCHAR_UNLOCKED])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_PUTCHAR_UNLOCKED$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_PUTCHAR_UNLOCKED], [/* Define to 1 if you have the declaration of `putchar_unlocked\', and to 0 if
+ you don\'t. */
+@%:@undef HAVE_DECL_PUTCHAR_UNLOCKED])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNSETENV], [/* Define to 1 if you have the `unsetenv\' function. */
+@%:@undef HAVE_UNSETENV])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UNSETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_UNSETENV$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the <unistd.h> header file. */
+@%:@undef HAVE_UNISTD_H])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/setenv.m4:44: gl_FUNC_UNSETENV is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([VOID_UNSETENV])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^VOID_UNSETENV$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([VOID_UNSETENV], [/* Define to 1 if unsetenv returns void instead of int. */
+@%:@undef VOID_UNSETENV])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASPRINTF], [/* Define to 1 if you have the `vasprintf\' function. */
+@%:@undef HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASPRINTF], [/* Define to 1 if you have the `vasprintf\' function. */
+@%:@undef HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VASPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_VASPRINTF$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_INFINITE_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_INFINITE_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for infinite
+ \'long double\' arguments. */
+@%:@undef NEED_PRINTF_INFINITE_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_A$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_A], [/* Define if the vasnprintf implementation needs special code for the \'a\' and
+ \'A\' directives. */
+@%:@undef NEED_PRINTF_DIRECTIVE_A])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_NL_LANGINFO], [/* Define to 1 if you have the `nl_langinfo\' function. */
+@%:@undef HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NL_LANGINFO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_NL_LANGINFO$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_F$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_F], [/* Define if the vasnprintf implementation needs special code for the \'F\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_F])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DIRECTIVE_LS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DIRECTIVE_LS], [/* Define if the vasnprintf implementation needs special code for the \'ls\'
+ directive. */
+@%:@undef NEED_PRINTF_DIRECTIVE_LS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_GROUPING$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_GROUPING], [/* Define if the vasnprintf implementation needs special code for the \' flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_GROUPING])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_LEFTADJUST$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_LEFTADJUST], [/* Define if the vasnprintf implementation needs special code for the \'-\'
+ flag. */
+@%:@undef NEED_PRINTF_FLAG_LEFTADJUST])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_FLAG_ZERO$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_FLAG_ZERO], [/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+@%:@undef NEED_PRINTF_FLAG_ZERO])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_UNBOUNDED_PRECISION$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_UNBOUNDED_PRECISION], [/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+@%:@undef NEED_PRINTF_UNBOUNDED_PRECISION])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_ENOMEM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_ENOMEM], [/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+@%:@undef NEED_PRINTF_ENOMEM])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'double\'
+ arguments. */
+@%:@undef NEED_PRINTF_DOUBLE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEED_PRINTF_LONG_DOUBLE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([NEED_PRINTF_LONG_DOUBLE], [/* Define if the vasnprintf implementation needs special code for \'long
+ double\' arguments. */
+@%:@undef NEED_PRINTF_LONG_DOUBLE])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_VASNPRINTF], [/* Define to 1 if you have the `vasnprintf\' function. */
+@%:@undef HAVE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VASNPRINTF$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VASNPRINTF], [/* Define if vasnprintf exists but is overridden by gnulib. */
+@%:@undef REPLACE_VASNPRINTF])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([ptrdiff_t])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^ptrdiff_t$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([ptrdiff_t], [/* Define as the type of the result of subtracting two pointers, if the system
+ doesn\'t define it. */
+@%:@undef ptrdiff_t])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VFPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VFPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VFPRINTF_POSIX], [/* Define if vfprintf is overridden by a POSIX compliant gnulib
+ implementation. */
+@%:@undef REPLACE_VFPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([REPLACE_VPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_VPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([REPLACE_VPRINTF_POSIX], [/* Define if vprintf is overridden by a POSIX compliant gnulib implementation.
+ */
+@%:@undef REPLACE_VPRINTF_POSIX])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WAITID], [/* Define to 1 if you have the `waitid\' function. */
+@%:@undef HAVE_WAITID])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WAITID])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WAITID$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_WCHAR_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_WCHAR_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_WCHAR_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_WCHAR_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_WCHAR_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_WCHAR_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_BTOWC], [/* Define to 1 if btowc is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_BTOWC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_WCTOB], [/* Define to 1 if wctob is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_WCTOB])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MBSINIT], [/* Define to 1 if mbsinit is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MBSINIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MBRTOWC], [/* Define to 1 if mbrtowc is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MBRTOWC])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MBRLEN], [/* Define to 1 if mbrlen is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MBRLEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MBSRTOWCS], [/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MBSRTOWCS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_MBSNRTOWCS], [/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_MBSNRTOWCS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_WCRTOMB], [/* Define to 1 if wcrtomb is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_WCRTOMB])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_WCSRTOMBS], [/* Define to 1 if wcsrtombs is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_WCSRTOMBS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_WCSNRTOMBS], [/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_WCSNRTOMBS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_RAW_DECL_WCWIDTH], [/* Define to 1 if wcwidth is declared even after undefining macros. */
+@%:@undef HAVE_RAW_DECL_WCWIDTH])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBSINIT], [/* Define to 1 if you have the `mbsinit\' function. */
+@%:@undef HAVE_MBSINIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MBRTOWC], [/* Define to 1 if you have the `mbrtowc\' function. */
+@%:@undef HAVE_MBRTOWC])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:91: gl_MBRTOWC_INCOMPLETE_STATE is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/mbrtowc.m4:139: gl_MBRTOWC_SANITYCHECK is expanded from...
+ltdl/m4/mbrtowc.m4:60: gl_MBSTATE_T_BROKEN is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCRTOMB], [/* Define to 1 if you have the `wcrtomb\' function. */
+@%:@undef HAVE_WCRTOMB])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wcrtomb.m4:7: gl_FUNC_WCRTOMB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_ISWCNTRL], [/* Define to 1 if you have the `iswcntrl\' function. */
+@%:@undef HAVE_ISWCNTRL])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_ISWCNTRL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_ISWCNTRL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_ISWCNTRL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCTYPE_H], [/* Define to 1 if you have the <wctype.h> header file. */
+@%:@undef HAVE_WCTYPE_H])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCTYPE_H], [/* Define to 1 if you have the <wctype.h> header file. */
+@%:@undef HAVE_WCTYPE_H])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_WCTYPE_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_WCTYPE_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_WCTYPE_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([HAVE_WCTYPE_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([HAVE_WCTYPE_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCTYPE_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([WCTYPE_H])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([WCTYPE_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^WCTYPE_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([REPLACE_ISWCNTRL])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([REPLACE_ISWCNTRL])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^REPLACE_ISWCNTRL$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_H], [/* Define to 1 if you have the <wchar.h> header file. */
+@%:@undef HAVE_WCHAR_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCWIDTH], [/* Define to 1 if you have the `wcwidth\' function. */
+@%:@undef HAVE_WCWIDTH])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_WCWIDTH])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCWIDTH$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_WCWIDTH], [/* Define to 1 if you have the declaration of `wcwidth\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_WCWIDTH])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wcwidth.m4:7: gl_FUNC_WCWIDTH is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the <stdint.h> header file. */
+@%:@undef HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDINT_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STDINT_H$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_TR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_TR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_TR_UTF8$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FUNC_UNGETC_BROKEN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FUNC_UNGETC_BROKEN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FUNC_UNGETC_BROKEN], [/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
+@%:@undef FUNC_UNGETC_BROKEN])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_GETPAGESIZE], [/* Define to 1 if you have the `getpagesize\' function. */
+@%:@undef HAVE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPAGESIZE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_GETPAGESIZE$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_OS_H], [/* Define to 1 if you have the <OS.h> header file. */
+@%:@undef HAVE_OS_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OS_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_OS_H$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the <sys/param.h> header file. */
+@%:@undef HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_PARAM_H])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_SYS_PARAM_H$])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentd.m4:6: gl_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */
+@%:@undef AC_APPLE_UNIVERSAL_BUILD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'double\'. */
+@%:@undef DBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([DBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^DBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([DBL_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'double\'. */
+@%:@undef DBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentf.m4:6: gl_FLOAT_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'float\'. */
+@%:@undef FLT_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^FLT_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([FLT_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'float\'. */
+@%:@undef FLT_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/exponentl.m4:6: gl_LONG_DOUBLE_EXPONENT_LOCATION is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_WORD$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_EXPBIT0_WORD], [/* Define as the word index where to find the exponent of \'long double\'. */
+@%:@undef LDBL_EXPBIT0_WORD])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([LDBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LDBL_EXPBIT0_BIT$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([LDBL_EXPBIT0_BIT], [/* Define as the bit index in the word where to find bit 0 of the exponent of
+ \'long double\'. */
+@%:@undef LDBL_EXPBIT0_BIT])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_LINK], [/* Define to 1 if you have the `link\' function. */
+@%:@undef HAVE_LINK])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_JA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_JA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MAP_ANONYMOUS], [/* Define to a substitute value for mmap()\'s MAP_ANONYMOUS flag. */
+@%:@undef MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MAP_ANONYMOUS], [/* Define to 1 if mmap()\'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>. */
+@%:@undef HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
+@%:@undef HAVE_SYS_MMAN_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */
+@%:@undef HAVE_MPROTECT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([MAP_ANONYMOUS], [/* Define to a substitute value for mmap()\'s MAP_ANONYMOUS flag. */
+@%:@undef MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_MAP_ANONYMOUS$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MAP_ANONYMOUS], [/* Define to 1 if mmap()\'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>. */
+@%:@undef HAVE_MAP_ANONYMOUS])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYS_MMAN_H], [/* Define to 1 if you have the <sys/mman.h> header file. */
+@%:@undef HAVE_SYS_MMAN_H])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_MPROTECT], [/* Define to 1 if you have the `mprotect\' function. */
+@%:@undef HAVE_MPROTECT])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_ALARM])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_ALARM$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_ALARM], [/* Define to 1 if you have the declaration of `alarm\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_ALARM])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_OBSTACK_PRINTF], [/* Define to 1 if you have the `obstack_printf\' function. */
+@%:@undef HAVE_OBSTACK_PRINTF])
+m4trace:configure.ac:158: -1- AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
+m4trace:configure.ac:158: -1- AC_SUBST([POSIX_SPAWN_PORTED_TRUE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([POSIX_SPAWN_PORTED_TRUE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POSIX_SPAWN_PORTED_TRUE$])
+m4trace:configure.ac:158: -1- AC_SUBST([POSIX_SPAWN_PORTED_FALSE])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([POSIX_SPAWN_PORTED_FALSE])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^POSIX_SPAWN_PORTED_FALSE$])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([POSIX_SPAWN_PORTED_TRUE])
+m4trace:configure.ac:158: -1- _AM_SUBST_NOTMAKE([POSIX_SPAWN_PORTED_FALSE])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([CHECK_SNPRINTF_POSIX])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^CHECK_SNPRINTF_POSIX$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([CHECK_SNPRINTF_POSIX], [/* Define to 1 for strict checking in test-snprintf.c. */
+@%:@undef CHECK_SNPRINTF_POSIX])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wchar_t.m4:11: gt_TYPE_WCHAR_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WCHAR_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCHAR_T], [/* Define if you have the \'wchar_t\' type. */
+@%:@undef HAVE_WCHAR_T])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2602: AC_TRY_COMPILE is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wint_t.m4:11: gt_TYPE_WINT_T is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_WINT_T])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_WINT_T$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WINT_T], [/* Define if you have the \'wint_t\' type. */
+@%:@undef HAVE_WINT_T])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_STRDUP], [/* Define to 1 if you have the `strdup\' function. */
+@%:@undef HAVE_STRDUP])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_STRDUP$])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_STRDUP])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_STRDUP$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_STRDUP], [/* Define to 1 if you have the declaration of `strdup\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_STRDUP])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_SYMLINK], [/* Define to 1 if you have the `symlink\' function. */
+@%:@undef HAVE_SYMLINK])
+m4trace:configure.ac:158: -1- AC_SUBST([abs_aux_dir])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([abs_aux_dir])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^abs_aux_dir$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([abs_aux_dir])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([abs_aux_dir])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^abs_aux_dir$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_FR_UTF8])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_FR_UTF8$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_JA])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_JA])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_JA$])
+m4trace:configure.ac:158: -1- AC_SUBST([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LOCALE_ZH_CN])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LOCALE_ZH_CN$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_WCTOB], [/* Define to 1 if you have the `wctob\' function. */
+@%:@undef HAVE_WCTOB])
+m4trace:configure.ac:158: -1- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/general.m4:2752: AC_TRY_RUN is expanded from...
+../../lib/m4sugar/m4sh.m4:598: AS_IF is expanded from...
+../../lib/autoconf/general.m4:2019: AC_CACHE_VAL is expanded from...
+../../lib/autoconf/general.m4:2040: AC_CACHE_CHECK is expanded from...
+ltdl/m4/wctob.m4:7: gl_FUNC_WCTOB is expanded from...
+ltdl/m4/gnulib-comp.m4:44: M4_INIT is expanded from...
+configure.ac:158: the top level])
+m4trace:configure.ac:158: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_WCTOB])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^HAVE_DECL_WCTOB$])
+m4trace:configure.ac:158: -1- AH_OUTPUT([HAVE_DECL_WCTOB], [/* Define to 1 if you have the declaration of `wctob\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_WCTOB])
+m4trace:configure.ac:158: -1- AC_SUBST([LIBTESTS_LIBDEPS])
+m4trace:configure.ac:158: -1- AC_SUBST_TRACE([LIBTESTS_LIBDEPS])
+m4trace:configure.ac:158: -1- m4_pattern_allow([^LIBTESTS_LIBDEPS$])
+m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_PACKAGER])
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER$])
+m4trace:configure.ac:160: -1- AH_OUTPUT([PACKAGE_PACKAGER], [/* String identifying the packager of this software */
+@%:@undef PACKAGE_PACKAGER])
+m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_PACKAGER_VERSION])
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER_VERSION$])
+m4trace:configure.ac:160: -1- AH_OUTPUT([PACKAGE_PACKAGER_VERSION], [/* Packager-specific version information */
+@%:@undef PACKAGE_PACKAGER_VERSION])
+m4trace:configure.ac:160: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_PACKAGER_BUG_REPORTS])
+m4trace:configure.ac:160: -1- m4_pattern_allow([^PACKAGE_PACKAGER_BUG_REPORTS$])
+m4trace:configure.ac:160: -1- AH_OUTPUT([PACKAGE_PACKAGER_BUG_REPORTS], [/* Packager info for bug reports (URL/e-mail/...) */
+@%:@undef PACKAGE_PACKAGER_BUG_REPORTS])
+m4trace:configure.ac:163: -1- AH_OUTPUT([HAVE_ERROR_H], [/* Define to 1 if you have the <error.h> header file. */
+@%:@undef HAVE_ERROR_H])
+m4trace:configure.ac:163: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ERROR_H])
+m4trace:configure.ac:163: -1- m4_pattern_allow([^HAVE_ERROR_H$])
+m4trace:configure.ac:163: -1- AC_SUBST([ERROR_H])
+m4trace:configure.ac:163: -1- AC_SUBST_TRACE([ERROR_H])
+m4trace:configure.ac:163: -1- m4_pattern_allow([^ERROR_H$])
+m4trace:configure.ac:163: -1- AC_SUBST([INCLUDE_ERROR_H])
+m4trace:configure.ac:163: -1- AC_SUBST_TRACE([INCLUDE_ERROR_H])
+m4trace:configure.ac:163: -1- m4_pattern_allow([^INCLUDE_ERROR_H$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
+@%:@undef HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- AC_SUBST([NEXT_GETOPT_H], [AS_VAR_GET([gl_next_header])])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([NEXT_GETOPT_H])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^NEXT_GETOPT_H$])
+m4trace:configure.ac:164: -1- AC_SUBST([NEXT_AS_FIRST_DIRECTIVE_GETOPT_H], [$gl_next_as_first_directive])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([NEXT_AS_FIRST_DIRECTIVE_GETOPT_H])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^NEXT_AS_FIRST_DIRECTIVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
+@%:@undef HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- AC_SUBST([HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_GETOPT_H], [/* Define to 1 if you have the <getopt.h> header file. */
+@%:@undef HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_H])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_H$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_GETOPT_LONG_ONLY], [/* Define to 1 if you have the `getopt_long_only\' function. */
+@%:@undef HAVE_GETOPT_LONG_ONLY])
+m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETOPT_LONG_ONLY])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_GETOPT_LONG_ONLY$])
+m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_OPTRESET])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_DECL_OPTRESET$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_DECL_OPTRESET], [/* Define to 1 if you have the declaration of `optreset\', and to 0 if you
+ don\'t. */
+@%:@undef HAVE_DECL_OPTRESET])
+m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([__GETOPT_PREFIX])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^__GETOPT_PREFIX$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([__GETOPT_PREFIX], [/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+@%:@undef __GETOPT_PREFIX])
+m4trace:configure.ac:164: -1- AC_SUBST([GETOPT_H])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([GETOPT_H])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_H$])
+m4trace:configure.ac:164: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_GETENV])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^HAVE_DECL_GETENV$])
+m4trace:configure.ac:164: -1- AH_OUTPUT([HAVE_DECL_GETENV], [/* Define to 1 if you have the declaration of `getenv\', and to 0 if you don\'t.
+ */
+@%:@undef HAVE_DECL_GETENV])
+m4trace:configure.ac:164: -1- AM_CONDITIONAL([GETOPT], [test -n "$M4_replace_getopt"])
+m4trace:configure.ac:164: -1- AC_SUBST([GETOPT_TRUE])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([GETOPT_TRUE])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_TRUE$])
+m4trace:configure.ac:164: -1- AC_SUBST([GETOPT_FALSE])
+m4trace:configure.ac:164: -1- AC_SUBST_TRACE([GETOPT_FALSE])
+m4trace:configure.ac:164: -1- m4_pattern_allow([^GETOPT_FALSE$])
+m4trace:configure.ac:164: -1- _AM_SUBST_NOTMAKE([GETOPT_TRUE])
+m4trace:configure.ac:164: -1- _AM_SUBST_NOTMAKE([GETOPT_FALSE])
+m4trace:configure.ac:165: -1- AH_OUTPUT([HAVE_OBSTACK_H], [/* Define to 1 if you have the <obstack.h> header file. */
+@%:@undef HAVE_OBSTACK_H])
+m4trace:configure.ac:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_OBSTACK_H])
+m4trace:configure.ac:165: -1- m4_pattern_allow([^HAVE_OBSTACK_H$])
+m4trace:configure.ac:165: -1- AC_SUBST([OBSTACK_H])
+m4trace:configure.ac:165: -1- AC_SUBST_TRACE([OBSTACK_H])
+m4trace:configure.ac:165: -1- m4_pattern_allow([^OBSTACK_H$])
+m4trace:configure.ac:165: -1- AC_SUBST([INCLUDE_OBSTACK_H])
+m4trace:configure.ac:165: -1- AC_SUBST_TRACE([INCLUDE_OBSTACK_H])
+m4trace:configure.ac:165: -1- m4_pattern_allow([^INCLUDE_OBSTACK_H$])
+m4trace:configure.ac:166: -1- AC_SUBST([REGEX_H])
+m4trace:configure.ac:166: -1- AC_SUBST_TRACE([REGEX_H])
+m4trace:configure.ac:166: -1- m4_pattern_allow([^REGEX_H$])
+m4trace:configure.ac:166: -1- AC_SUBST([INCLUDE_REGEX_H])
+m4trace:configure.ac:166: -1- AC_SUBST_TRACE([INCLUDE_REGEX_H])
+m4trace:configure.ac:166: -1- m4_pattern_allow([^INCLUDE_REGEX_H$])
+m4trace:configure.ac:167: -1- AC_DEFINE_TRACE_LITERAL([RENAME_OPEN_FILE_WORKS])
+m4trace:configure.ac:167: -1- m4_pattern_allow([^RENAME_OPEN_FILE_WORKS$])
+m4trace:configure.ac:167: -1- AH_OUTPUT([RENAME_OPEN_FILE_WORKS], [/* Define to 1 if a file can be renamed while open, or to 0 if not. */
+@%:@undef RENAME_OPEN_FILE_WORKS])
+m4trace:configure.ac:173: -1- AC_SUBST([PERL])
+m4trace:configure.ac:173: -1- AC_SUBST_TRACE([PERL])
+m4trace:configure.ac:173: -1- m4_pattern_allow([^PERL$])
+m4trace:configure.ac:180: -1- AC_DEFINE_TRACE_LITERAL([size_t])
+m4trace:configure.ac:180: -1- m4_pattern_allow([^size_t$])
+m4trace:configure.ac:180: -1- AH_OUTPUT([size_t], [/* Define to `unsigned int\' if <sys/types.h> does not define. */
+@%:@undef size_t])
+m4trace:configure.ac:181: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT])
+m4trace:configure.ac:181: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$])
+m4trace:configure.ac:181: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of `long long int\', as computed by sizeof. */
+@%:@undef SIZEOF_LONG_LONG_INT])
+m4trace:configure.ac:188: -1- AH_OUTPUT([HAVE_LIMITS_H], [/* Define to 1 if you have the <limits.h> header file. */
+@%:@undef HAVE_LIMITS_H])
+m4trace:configure.ac:195: -1- AC_SUBST([INCLUDE_STDBOOL_H])
+m4trace:configure.ac:195: -1- AC_SUBST_TRACE([INCLUDE_STDBOOL_H])
+m4trace:configure.ac:195: -1- m4_pattern_allow([^INCLUDE_STDBOOL_H$])
+m4trace:configure.ac:202: -1- AH_OUTPUT([HAVE_CALLOC], [/* Define to 1 if you have the `calloc\' function. */
+@%:@undef HAVE_CALLOC])
+m4trace:configure.ac:202: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */
+@%:@undef HAVE_STRERROR])
+m4trace:configure.ac:204: -1- AC_DEFINE_TRACE_LITERAL([WITH_DMALLOC])
+m4trace:configure.ac:204: -1- m4_pattern_allow([^WITH_DMALLOC$])
+m4trace:configure.ac:204: -1- AH_OUTPUT([WITH_DMALLOC], [/* Define if using the dmalloc debugging malloc package */
+@%:@undef WITH_DMALLOC])
+m4trace:configure.ac:206: -1- _m4_warn([obsolete], [The macro `AC_TYPE_SIGNAL' is obsolete.
+You should run autoupdate.], [../../lib/autoconf/types.m4:738: AC_TYPE_SIGNAL is expanded from...
+ltdl/m4/stackovf.m4:26: M4_SYS_STACKOVF is expanded from...
+configure.ac:206: the top level])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([RETSIGTYPE])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^RETSIGTYPE$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([RETSIGTYPE], [/* Define as the return type of signal handlers (`int\' or `void\'). */
+@%:@undef RETSIGTYPE])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGINFO_H], [/* Define to 1 if you have the <siginfo.h> header file. */
+@%:@undef HAVE_SIGINFO_H])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGACTION], [/* Define to 1 if you have the `sigaction\' function. */
+@%:@undef HAVE_SIGACTION])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGALTSTACK], [/* Define to 1 if you have the `sigaltstack\' function. */
+@%:@undef HAVE_SIGALTSTACK])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGSTACK], [/* Define to 1 if you have the `sigstack\' function. */
+@%:@undef HAVE_SIGSTACK])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGVEC], [/* Define to 1 if you have the `sigvec\' function. */
+@%:@undef HAVE_SIGVEC])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STACK_T_SS_SP])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STACK_T_SS_SP$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_STACK_T_SS_SP], [/* Define to 1 if `ss_sp\' is a member of `stack_t\'. */
+@%:@undef HAVE_STACK_T_SS_SP])
+m4trace:configure.ac:206: -1- AM_CONDITIONAL([STACKOVF], [test "$M4_cv_use_stackovf" = yes])
+m4trace:configure.ac:206: -1- AC_SUBST([STACKOVF_TRUE])
+m4trace:configure.ac:206: -1- AC_SUBST_TRACE([STACKOVF_TRUE])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^STACKOVF_TRUE$])
+m4trace:configure.ac:206: -1- AC_SUBST([STACKOVF_FALSE])
+m4trace:configure.ac:206: -1- AC_SUBST_TRACE([STACKOVF_FALSE])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^STACKOVF_FALSE$])
+m4trace:configure.ac:206: -1- _AM_SUBST_NOTMAKE([STACKOVF_TRUE])
+m4trace:configure.ac:206: -1- _AM_SUBST_NOTMAKE([STACKOVF_FALSE])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([USE_STACKOVF])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^USE_STACKOVF$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([USE_STACKOVF], [/* Define to 1 if using stack overflow detection. */
+@%:@undef USE_STACKOVF])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_RLIM_T$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_RLIM_T], [/* Define to 1 if the system has the type `rlim_t\'. */
+@%:@undef HAVE_RLIM_T])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([rlim_t])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^rlim_t$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([rlim_t], [/* Define to int if rlim_t is not defined in sys/resource.h */
+@%:@undef rlim_t])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STACK_T])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STACK_T$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_STACK_T], [/* Define to 1 if the system has the type `stack_t\'. */
+@%:@undef HAVE_STACK_T])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([stack_t])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^stack_t$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([stack_t], [/* Define to struct sigaltstack if stack_t is not in signal.h */
+@%:@undef stack_t])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIGCONTEXT])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_SIGCONTEXT$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGCONTEXT], [/* Define to 1 if the system has the type `sigcontext\'. */
+@%:@undef HAVE_SIGCONTEXT])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SIGINFO_T])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_SIGINFO_T$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_SIGINFO_T], [/* Define to 1 if the system has the type `siginfo_t\'. */
+@%:@undef HAVE_SIGINFO_T])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^HAVE_STRUCT_SIGACTION_SA_SIGACTION$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([HAVE_STRUCT_SIGACTION_SA_SIGACTION], [/* Define to 1 if `sa_sigaction\' is a member of `struct sigaction\'. */
+@%:@undef HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+m4trace:configure.ac:206: -1- AC_DEFINE_TRACE_LITERAL([ss_sp])
+m4trace:configure.ac:206: -1- m4_pattern_allow([^ss_sp$])
+m4trace:configure.ac:206: -1- AH_OUTPUT([ss_sp], [/* Define to ss_base if stack_t has ss_base instead of ss_sp. */
+@%:@undef ss_sp])
+m4trace:configure.ac:209: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME])
+m4trace:configure.ac:209: -1- m4_pattern_allow([^TM_IN_SYS_TIME$])
+m4trace:configure.ac:209: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your <sys/time.h> declares `struct tm\'. */
+@%:@undef TM_IN_SYS_TIME])
+m4trace:configure.ac:210: -1- AH_OUTPUT([HAVE_STRFTIME], [/* Define to 1 if you have the `strftime\' function. */
+@%:@undef HAVE_STRFTIME])
+m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
+m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRFTIME$])
+m4trace:configure.ac:210: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRFTIME])
+m4trace:configure.ac:210: -1- m4_pattern_allow([^HAVE_STRFTIME$])
+m4trace:configure.ac:211: -1- AH_OUTPUT([HAVE_GETCWD], [/* Define to 1 if you have the `getcwd\' function. */
+@%:@undef HAVE_GETCWD])
+m4trace:configure.ac:211: -1- AH_OUTPUT([HAVE_GETHOSTNAME], [/* Define to 1 if you have the `gethostname\' function. */
+@%:@undef HAVE_GETHOSTNAME])
+m4trace:configure.ac:211: -1- AH_OUTPUT([HAVE_MKTIME], [/* Define to 1 if you have the `mktime\' function. */
+@%:@undef HAVE_MKTIME])
+m4trace:configure.ac:211: -1- AH_OUTPUT([HAVE_UNAME], [/* Define to 1 if you have the `uname\' function. */
+@%:@undef HAVE_UNAME])
+m4trace:configure.ac:218: -1- AH_OUTPUT([HAVE_GMP_H], [/* Define to 1 if you have the <gmp.h> header file. */
+@%:@undef HAVE_GMP_H])
+m4trace:configure.ac:218: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GMP_H])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^HAVE_GMP_H$])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^M4_gmp_save_LIBS$])
+m4trace:configure.ac:218: -1- AC_SUBST([LIBADD_GMP])
+m4trace:configure.ac:218: -1- AC_SUBST_TRACE([LIBADD_GMP])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^LIBADD_GMP$])
+m4trace:configure.ac:218: -1- AC_DEFINE_TRACE_LITERAL([USE_GMP])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^USE_GMP$])
+m4trace:configure.ac:218: -1- AH_OUTPUT([USE_GMP], [/* Define to 1 if using the GNU multiple precision library. */
+@%:@undef USE_GMP])
+m4trace:configure.ac:218: -1- AC_SUBST([USE_GMP], [$M4_cv_using_lib_gmp])
+m4trace:configure.ac:218: -1- AC_SUBST_TRACE([USE_GMP])
+m4trace:configure.ac:218: -1- m4_pattern_allow([^USE_GMP$])
+m4trace:configure.ac:219: -1- AM_CONDITIONAL([USE_GMP], [test "x$USE_GMP" = xyes])
+m4trace:configure.ac:219: -1- AC_SUBST([USE_GMP_TRUE])
+m4trace:configure.ac:219: -1- AC_SUBST_TRACE([USE_GMP_TRUE])
+m4trace:configure.ac:219: -1- m4_pattern_allow([^USE_GMP_TRUE$])
+m4trace:configure.ac:219: -1- AC_SUBST([USE_GMP_FALSE])
+m4trace:configure.ac:219: -1- AC_SUBST_TRACE([USE_GMP_FALSE])
+m4trace:configure.ac:219: -1- m4_pattern_allow([^USE_GMP_FALSE$])
+m4trace:configure.ac:219: -1- _AM_SUBST_NOTMAKE([USE_GMP_TRUE])
+m4trace:configure.ac:219: -1- _AM_SUBST_NOTMAKE([USE_GMP_FALSE])
+m4trace:configure.ac:220: -1- AC_DEFINE_TRACE_LITERAL([M4_SYSCMD_SHELL])
+m4trace:configure.ac:220: -1- m4_pattern_allow([^M4_SYSCMD_SHELL$])
+m4trace:configure.ac:220: -1- AH_OUTPUT([M4_SYSCMD_SHELL], [/* Shell used by syscmd and esyscmd, must accept -c argument. */
+@%:@undef M4_SYSCMD_SHELL])
+m4trace:configure.ac:226: -1- AC_CONFIG_FILES([
+Makefile
+gnu/Makefile
+doc/Makefile
+m4/system.h:m4/system_.h
+tests/atlocal
+tests/gnu/Makefile
+])
+m4trace:configure.ac:235: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([LIB@&t@OBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LIB@&t@OBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([LTLIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LTLIBOBJS$])
+m4trace:configure.ac:235: -1- AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])
+m4trace:configure.ac:235: -1- AC_SUBST([am__EXEEXT_TRUE])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([am__EXEEXT_TRUE])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^am__EXEEXT_TRUE$])
+m4trace:configure.ac:235: -1- AC_SUBST([am__EXEEXT_FALSE])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([am__EXEEXT_FALSE])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^am__EXEEXT_FALSE$])
+m4trace:configure.ac:235: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_TRUE])
+m4trace:configure.ac:235: -1- _AM_SUBST_NOTMAKE([am__EXEEXT_FALSE])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^LT_CONFIG_H$])
+m4trace:configure.ac:235: -1- AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([ltdl_LIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^ltdl_LIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([ltdl_LTLIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^ltdl_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([CONFIG_INCLUDE], [gnu/config.h])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([CONFIG_INCLUDE])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^CONFIG_INCLUDE$])
+m4trace:configure.ac:235: -1- AC_SUBST([M4_LIBOBJS], [$M4_libobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([M4_LIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4_LIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([M4_LTLIBOBJS], [$M4_ltlibobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([M4_LTLIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([M4tests_LIBOBJS], [$M4tests_libobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([M4tests_LIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4tests_LIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST([M4tests_LTLIBOBJS], [$M4tests_ltlibobjs])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([M4tests_LTLIBOBJS])
+m4trace:configure.ac:235: -1- m4_pattern_allow([^M4tests_LTLIBOBJS$])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([top_builddir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([top_build_prefix])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([srcdir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([abs_srcdir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([top_srcdir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([abs_top_srcdir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([builddir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([abs_builddir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([abs_top_builddir])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([INSTALL])
+m4trace:configure.ac:235: -1- AC_SUBST_TRACE([MKDIR_P])
+m4trace:configure.ac:235: -1- AC_REQUIRE_AUX_FILE([ltmain.sh])
diff --git a/build-aux/arg-nonnull.h b/build-aux/arg-nonnull.h
new file mode 100755
index 00000000..7e3e2db8
--- /dev/null
+++ b/build-aux/arg-nonnull.h
@@ -0,0 +1,26 @@
+/* A C macro for declaring that specific arguments must not be NULL.
+ Copyright (C) 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 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* _GL_ARG_NONNULL((n,...,m)) tells the compiler and static analyzer tools
+ that the values passed as arguments n, ..., m must be non-NULL pointers.
+ n = 1 stands for the first argument, n = 2 for the second argument etc. */
+#ifndef _GL_ARG_NONNULL
+# if (__GNUC__ == 3 && __GNUC_MINOR__ >= 3) || __GNUC__ > 3
+# define _GL_ARG_NONNULL(params) __attribute__ ((__nonnull__ params))
+# else
+# define _GL_ARG_NONNULL(params)
+# endif
+#endif
diff --git a/build-aux/config.rpath b/build-aux/config.rpath
new file mode 100755
index 00000000..17298f23
--- /dev/null
+++ b/build-aux/config.rpath
@@ -0,0 +1,672 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2010 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's _LT_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux* | k*bsd*-gnu)
+ case $cc_basename in
+ ecc*)
+ wl='-Wl,'
+ ;;
+ icc* | ifort*)
+ wl='-Wl,'
+ ;;
+ lf95*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ wl='-Wl,'
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's _LT_LINKER_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ gnu* | linux* | k*bsd*-gnu)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's _LT_SYS_DYNAMIC_LINKER.
+# Unlike libtool.m4, here we don't care about _all_ names of the library, but
+# only about the one the linker finds when passed -lNAME. This is the last
+# element of library_names_spec in libtool.m4, or possibly two of them if the
+# linker has special search rules.
+library_names_spec= # the last element of library_names_spec in libtool.m4
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ library_names_spec='$libname.a'
+ ;;
+ aix[4-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ amigaos*)
+ library_names_spec='$libname.a'
+ ;;
+ beos*)
+ library_names_spec='$libname$shrext'
+ ;;
+ bsdi[45]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ cygwin* | mingw* | pw32* | cegcc*)
+ shrext=.dll
+ library_names_spec='$libname.dll.a $libname.lib'
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ library_names_spec='$libname$shrext'
+ ;;
+ dgux*)
+ library_names_spec='$libname$shrext'
+ ;;
+ freebsd1*)
+ ;;
+ freebsd* | dragonfly*)
+ case "$host_os" in
+ freebsd[123]*)
+ library_names_spec='$libname$shrext$versuffix' ;;
+ *)
+ library_names_spec='$libname$shrext' ;;
+ esac
+ ;;
+ gnu*)
+ library_names_spec='$libname$shrext'
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ library_names_spec='$libname$shrext'
+ ;;
+ interix[3-9]*)
+ library_names_spec='$libname$shrext'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ library_names_spec='$libname$shrext'
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux* | k*bsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ knetbsd*-gnu)
+ library_names_spec='$libname$shrext'
+ ;;
+ netbsd*)
+ library_names_spec='$libname$shrext'
+ ;;
+ newsos6)
+ library_names_spec='$libname$shrext'
+ ;;
+ nto-qnx*)
+ library_names_spec='$libname$shrext'
+ ;;
+ openbsd*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ library_names_spec='$libname.a'
+ ;;
+ osf3* | osf4* | osf5*)
+ library_names_spec='$libname$shrext'
+ ;;
+ rdos*)
+ ;;
+ solaris*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sunos4*)
+ library_names_spec='$libname$shrext$versuffix'
+ ;;
+ sysv4 | sysv4.3*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv4*MP*)
+ library_names_spec='$libname$shrext'
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ library_names_spec='$libname$shrext'
+ ;;
+ uts4*)
+ library_names_spec='$libname$shrext'
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_libname_spec=`echo "X$libname_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_library_names_spec=`echo "X$library_names_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Format of library name prefix.
+libname_spec="$escaped_libname_spec"
+
+# Library names that the linker finds when passed -lNAME.
+library_names_spec="$escaped_library_names_spec"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/build-aux/config.rpath~ b/build-aux/config.rpath~
new file mode 100755
index 00000000..c492a93b
--- /dev/null
+++ b/build-aux/config.rpath~
@@ -0,0 +1,614 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2006 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+# Code taken from libtool.m4's _LT_CC_BASENAME.
+
+for cc_temp in $CC""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`echo "$cc_temp" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case $cc_basename in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux*)
+ case $cc_basename in
+ icc* | ecc*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ interix3*)
+ hardcode_direct=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = no; then
+ hardcode_libdir_flag_spec=
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case $cc_basename in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | kfreebsd*-gnu | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+ hpux11*)
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ ;;
+ *)
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6*)
+ hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`'
+ hardcode_libdir_separator=':'
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ ;;
+ aix4* | aix5*)
+ ;;
+ amigaos*)
+ ;;
+ beos*)
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ ;;
+ dgux*)
+ ;;
+ freebsd1*)
+ ;;
+ kfreebsd*-gnu)
+ ;;
+ freebsd* | dragonfly*)
+ ;;
+ gnu*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $host_cpu in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ ;;
+ interix3*)
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux*)
+ ;;
+ knetbsd*-gnu)
+ ;;
+ netbsd*)
+ ;;
+ newsos6)
+ ;;
+ nto-qnx*)
+ ;;
+ openbsd*)
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ ;;
+ osf3* | osf4* | osf5*)
+ ;;
+ solaris*)
+ ;;
+ sunos4*)
+ ;;
+ sysv4 | sysv4.3*)
+ ;;
+ sysv4*MP*)
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ ;;
+ uts4*)
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/build-aux/gendocs.sh b/build-aux/gendocs.sh
new file mode 100755
index 00000000..67d5b52c
--- /dev/null
+++ b/build-aux/gendocs.sh
@@ -0,0 +1,367 @@
+#!/bin/sh -e
+# gendocs.sh -- generate a GNU manual in many formats. This script is
+# mentioned in maintain.texi. See the help message below for usage details.
+
+scriptversion=2010-02-13.20
+
+# Copyright 2003, 2004, 2005, 2006, 2007, 2008, 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 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# Original author: Mohit Agarwal.
+# Send bug reports and any other correspondence to bug-texinfo@gnu.org.
+
+prog=`basename "$0"`
+srcdir=`pwd`
+
+scripturl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh"
+templateurl="http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template"
+
+: ${SETLANG="env LANG= LC_MESSAGES= LC_ALL= LANGUAGE="}
+: ${MAKEINFO="makeinfo"}
+: ${TEXI2DVI="texi2dvi -t @finalout"}
+: ${DVIPS="dvips"}
+: ${DOCBOOK2HTML="docbook2html"}
+: ${DOCBOOK2PDF="docbook2pdf"}
+: ${DOCBOOK2PS="docbook2ps"}
+: ${DOCBOOK2TXT="docbook2txt"}
+: ${GENDOCS_TEMPLATE_DIR="."}
+: ${TEXI2HTML="texi2html"}
+unset CDPATH
+unset use_texi2html
+
+version="gendocs.sh $scriptversion
+
+Copyright 2009 Free Software Foundation, Inc.
+There is NO warranty. You may redistribute this software
+under the terms of the GNU General Public License.
+For more information about these matters, see the files named COPYING."
+
+usage="Usage: $prog [OPTION]... PACKAGE MANUAL-TITLE
+
+Generate various output formats from PACKAGE.texinfo (or .texi or .txi) source.
+See the GNU Maintainers document for a more extensive discussion:
+ http://www.gnu.org/prep/maintain_toc.html
+
+Options:
+ -s SRCFILE read Texinfo from SRCFILE, instead of PACKAGE.{texinfo|texi|txi}
+ -o OUTDIR write files into OUTDIR, instead of manual/.
+ --email ADR use ADR as contact in generated web pages.
+ --docbook convert to DocBook too (xml, txt, html, pdf and ps).
+ --html ARG pass indicated ARG to makeinfo or texi2html for HTML targets.
+ --texi2html use texi2html to generate HTML targets.
+ --help display this help and exit successfully.
+ --version display version information and exit successfully.
+
+Simple example: $prog --email bug-gnu-emacs@gnu.org emacs \"GNU Emacs Manual\"
+
+Typical sequence:
+ cd PACKAGESOURCE/doc
+ wget \"$scripturl\"
+ wget \"$templateurl\"
+ $prog --email BUGLIST MANUAL \"GNU MANUAL - One-line description\"
+
+Output will be in a new subdirectory \"manual\" (by default, use -o OUTDIR
+to override). Move all the new files into your web CVS tree, as
+explained in the Web Pages node of maintain.texi.
+
+Please use the --email ADDRESS option to specify your bug-reporting
+address in the generated HTML pages.
+
+MANUAL-TITLE is included as part of the HTML <title> of the overall
+manual/index.html file. It should include the name of the package being
+documented. manual/index.html is created by substitution from the file
+$GENDOCS_TEMPLATE_DIR/gendocs_template. (Feel free to modify the
+generic template for your own purposes.)
+
+If you have several manuals, you'll need to run this script several
+times with different MANUAL values, specifying a different output
+directory with -o each time. Then write (by hand) an overall index.html
+with links to them all.
+
+If a manual's Texinfo sources are spread across several directories,
+first copy or symlink all Texinfo sources into a single directory.
+(Part of the script's work is to make a tar.gz of the sources.)
+
+You can set the environment variables MAKEINFO, TEXI2DVI, and DVIPS to
+control the programs that get executed, and GENDOCS_TEMPLATE_DIR to
+control where the gendocs_template file is looked for. (With --docbook,
+the environment variables DOCBOOK2HTML, DOCBOOK2PDF, DOCBOOK2PS, and
+DOCBOOK2TXT are also respected.)
+
+By default, makeinfo is run in the default (English) locale, since
+that's the language of most Texinfo manuals. If you happen to have a
+non-English manual and non-English web site, see the SETLANG setting
+in the source.
+
+Email bug reports or enhancement requests to bug-texinfo@gnu.org.
+"
+
+calcsize()
+{
+ size=`ls -ksl $1 | awk '{print $1}'`
+ echo $size
+}
+
+MANUAL_TITLE=
+PACKAGE=
+EMAIL=webmasters@gnu.org # please override with --email
+htmlarg=
+outdir=manual
+srcfile=
+
+while test $# -gt 0; do
+ case $1 in
+ --email) shift; EMAIL=$1;;
+ --help) echo "$usage"; exit 0;;
+ --version) echo "$version"; exit 0;;
+ -s) shift; srcfile=$1;;
+ -o) shift; outdir=$1;;
+ --docbook) docbook=yes;;
+ --html) shift; htmlarg=$1;;
+ --texi2html) use_texi2html=1;;
+ -*)
+ echo "$0: Unknown option \`$1'." >&2
+ echo "$0: Try \`--help' for more information." >&2
+ exit 1;;
+ *)
+ if test -z "$PACKAGE"; then
+ PACKAGE=$1
+ elif test -z "$MANUAL_TITLE"; then
+ MANUAL_TITLE=$1
+ else
+ echo "$0: extra non-option argument \`$1'." >&2
+ exit 1
+ fi;;
+ esac
+ shift
+done
+
+if test -n "$srcfile"; then
+ :
+elif test -s "$srcdir/$PACKAGE.texinfo"; then
+ srcfile=$srcdir/$PACKAGE.texinfo
+elif test -s "$srcdir/$PACKAGE.texi"; then
+ srcfile=$srcdir/$PACKAGE.texi
+elif test -s "$srcdir/$PACKAGE.txi"; then
+ srcfile=$srcdir/$PACKAGE.txi
+else
+ echo "$0: cannot find .texinfo or .texi or .txi for $PACKAGE in $srcdir." >&2
+ exit 1
+fi
+
+if test ! -r $GENDOCS_TEMPLATE_DIR/gendocs_template; then
+ echo "$0: cannot read $GENDOCS_TEMPLATE_DIR/gendocs_template." >&2
+ echo "$0: it is available from $templateurl." >&2
+ exit 1
+fi
+
+case $outdir in
+ /*) dotdot_outdir="$outdir";;
+ *) dotdot_outdir="../$outdir";;
+esac
+
+echo Generating output formats for $srcfile
+
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.info \"$srcfile\""
+echo "Generating info files... ($cmd)"
+eval "$cmd"
+mkdir -p $outdir/
+tar czf $outdir/$PACKAGE.info.tar.gz $PACKAGE.info*
+info_tgz_size=`calcsize $outdir/$PACKAGE.info.tar.gz`
+# do not mv the info files, there's no point in having them available
+# separately on the web.
+
+cmd="${TEXI2DVI} \"$srcfile\""
+echo "Generating dvi ... ($cmd)"
+eval "$cmd"
+
+# now, before we compress dvi:
+echo Generating postscript...
+${DVIPS} $PACKAGE -o
+gzip -f -9 $PACKAGE.ps
+ps_gz_size=`calcsize $PACKAGE.ps.gz`
+mv $PACKAGE.ps.gz $outdir/
+
+# compress/finish dvi:
+gzip -f -9 $PACKAGE.dvi
+dvi_gz_size=`calcsize $PACKAGE.dvi.gz`
+mv $PACKAGE.dvi.gz $outdir/
+
+cmd="${TEXI2DVI} --pdf \"$srcfile\""
+echo "Generating pdf ... ($cmd)"
+eval "$cmd"
+pdf_size=`calcsize $PACKAGE.pdf`
+mv $PACKAGE.pdf $outdir/
+
+cmd="$SETLANG $MAKEINFO -o $PACKAGE.txt --no-split --no-headers \"$srcfile\""
+echo "Generating ASCII... ($cmd)"
+eval "$cmd"
+ascii_size=`calcsize $PACKAGE.txt`
+gzip -f -9 -c $PACKAGE.txt >$outdir/$PACKAGE.txt.gz
+ascii_gz_size=`calcsize $outdir/$PACKAGE.txt.gz`
+mv $PACKAGE.txt $outdir/
+
+html_split()
+{
+ opt="--split=$1 $htmlarg --node-files"
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $opt \"$srcfile\""
+ echo "Generating html by $1... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ ln -sf ${PACKAGE}.html index.html
+ tar -czf $dotdot_outdir/${PACKAGE}.html_$1.tar.gz -- *.html
+ )
+ eval html_$1_tgz_size=`calcsize $outdir/${PACKAGE}.html_$1.tar.gz`
+ rm -f $outdir/html_$1/*.html
+ mkdir -p $outdir/html_$1/
+ mv ${split_html_dir}/*.html $outdir/html_$1/
+ rmdir ${split_html_dir}
+}
+
+if test -z "$use_texi2html"; then
+ opt="--no-split --html -o $PACKAGE.html $htmlarg"
+ cmd="$SETLANG $MAKEINFO $opt \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
+ html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
+ mv $PACKAGE.html $outdir/
+
+ cmd="$SETLANG $MAKEINFO --html -o $PACKAGE.html $htmlarg \"$srcfile\""
+ echo "Generating html by node... ($cmd)"
+ eval "$cmd"
+ split_html_dir=$PACKAGE.html
+ (
+ cd ${split_html_dir} || exit 1
+ tar -czf $dotdot_outdir/${PACKAGE}.html_node.tar.gz -- *.html
+ )
+ html_node_tgz_size=`calcsize $outdir/${PACKAGE}.html_node.tar.gz`
+ rm -f $outdir/html_node/*.html
+ mkdir -p $outdir/html_node/
+ mv ${split_html_dir}/*.html $outdir/html_node/
+ rmdir ${split_html_dir}
+else
+ cmd="$SETLANG $TEXI2HTML --output $PACKAGE.html $htmlarg \"$srcfile\""
+ echo "Generating monolithic html... ($cmd)"
+ rm -rf $PACKAGE.html # in case a directory is left over
+ eval "$cmd"
+ html_mono_size=`calcsize $PACKAGE.html`
+ gzip -f -9 -c $PACKAGE.html >$outdir/$PACKAGE.html.gz
+ html_mono_gz_size=`calcsize $outdir/$PACKAGE.html.gz`
+ mv $PACKAGE.html $outdir/
+
+ html_split node
+ html_split chapter
+ html_split section
+fi
+
+echo Making .tar.gz for sources...
+d=`dirname $srcfile`
+srcfiles=`ls $d/*.texinfo $d/*.texi $d/*.txi $d/*.eps 2>/dev/null` || true
+tar cvzfh $outdir/$PACKAGE.texi.tar.gz $srcfiles
+texi_tgz_size=`calcsize $outdir/$PACKAGE.texi.tar.gz`
+
+if test -n "$docbook"; then
+ cmd="$SETLANG $MAKEINFO -o - --docbook \"$srcfile\" > ${srcdir}/$PACKAGE-db.xml"
+ echo "Generating docbook XML... ($cmd)"
+ eval "$cmd"
+ docbook_xml_size=`calcsize $PACKAGE-db.xml`
+ gzip -f -9 -c $PACKAGE-db.xml >$outdir/$PACKAGE-db.xml.gz
+ docbook_xml_gz_size=`calcsize $outdir/$PACKAGE-db.xml.gz`
+ mv $PACKAGE-db.xml $outdir/
+
+ cmd="${DOCBOOK2HTML} -o $split_html_db_dir ${outdir}/$PACKAGE-db.xml"
+ echo "Generating docbook HTML... ($cmd)"
+ eval "$cmd"
+ split_html_db_dir=html_node_db
+ (
+ cd ${split_html_db_dir} || exit 1
+ tar -czf $dotdot_outdir/${PACKAGE}.html_node_db.tar.gz -- *.html
+ )
+ html_node_db_tgz_size=`calcsize $outdir/${PACKAGE}.html_node_db.tar.gz`
+ rm -f $outdir/html_node_db/*.html
+ mkdir -p $outdir/html_node_db
+ mv ${split_html_db_dir}/*.html $outdir/html_node_db/
+ rmdir ${split_html_db_dir}
+
+ cmd="${DOCBOOK2TXT} ${outdir}/$PACKAGE-db.xml"
+ echo "Generating docbook ASCII... ($cmd)"
+ eval "$cmd"
+ docbook_ascii_size=`calcsize $PACKAGE-db.txt`
+ mv $PACKAGE-db.txt $outdir/
+
+ cmd="${DOCBOOK2PS} ${outdir}/$PACKAGE-db.xml"
+ echo "Generating docbook PS... ($cmd)"
+ eval "$cmd"
+ gzip -f -9 -c $PACKAGE-db.ps >$outdir/$PACKAGE-db.ps.gz
+ docbook_ps_gz_size=`calcsize $outdir/$PACKAGE-db.ps.gz`
+ mv $PACKAGE-db.ps $outdir/
+
+ cmd="${DOCBOOK2PDF} ${outdir}/$PACKAGE-db.xml"
+ echo "Generating docbook PDF... ($cmd)"
+ eval "$cmd"
+ docbook_pdf_size=`calcsize $PACKAGE-db.pdf`
+ mv $PACKAGE-db.pdf $outdir/
+fi
+
+echo "Writing index file..."
+if test -z "$use_texi2html"; then
+ CONDS="/%%IF *HTML_SECTION%%/,/%%ENDIF *HTML_SECTION%%/d;\
+ /%%IF *HTML_CHAPTER%%/,/%%ENDIF *HTML_CHAPTER%%/d"
+else
+ CONDS="/%%ENDIF.*%%/d;/%%IF *HTML_SECTION%%/d;/%%IF *HTML_CHAPTER%%/d"
+fi
+curdate=`$SETLANG date '+%B %d, %Y'`
+sed \
+ -e "s!%%TITLE%%!$MANUAL_TITLE!g" \
+ -e "s!%%EMAIL%%!$EMAIL!g" \
+ -e "s!%%PACKAGE%%!$PACKAGE!g" \
+ -e "s!%%DATE%%!$curdate!g" \
+ -e "s!%%HTML_MONO_SIZE%%!$html_mono_size!g" \
+ -e "s!%%HTML_MONO_GZ_SIZE%%!$html_mono_gz_size!g" \
+ -e "s!%%HTML_NODE_TGZ_SIZE%%!$html_node_tgz_size!g" \
+ -e "s!%%HTML_SECTION_TGZ_SIZE%%!$html_section_tgz_size!g" \
+ -e "s!%%HTML_CHAPTER_TGZ_SIZE%%!$html_chapter_tgz_size!g" \
+ -e "s!%%INFO_TGZ_SIZE%%!$info_tgz_size!g" \
+ -e "s!%%DVI_GZ_SIZE%%!$dvi_gz_size!g" \
+ -e "s!%%PDF_SIZE%%!$pdf_size!g" \
+ -e "s!%%PS_GZ_SIZE%%!$ps_gz_size!g" \
+ -e "s!%%ASCII_SIZE%%!$ascii_size!g" \
+ -e "s!%%ASCII_GZ_SIZE%%!$ascii_gz_size!g" \
+ -e "s!%%TEXI_TGZ_SIZE%%!$texi_tgz_size!g" \
+ -e "s!%%DOCBOOK_HTML_NODE_TGZ_SIZE%%!$html_node_db_tgz_size!g" \
+ -e "s!%%DOCBOOK_ASCII_SIZE%%!$docbook_ascii_size!g" \
+ -e "s!%%DOCBOOK_PS_GZ_SIZE%%!$docbook_ps_gz_size!g" \
+ -e "s!%%DOCBOOK_PDF_SIZE%%!$docbook_pdf_size!g" \
+ -e "s!%%DOCBOOK_XML_SIZE%%!$docbook_xml_size!g" \
+ -e "s!%%DOCBOOK_XML_GZ_SIZE%%!$docbook_xml_gz_size!g" \
+ -e "s,%%SCRIPTURL%%,$scripturl,g" \
+ -e "s!%%SCRIPTNAME%%!$prog!g" \
+ -e "$CONDS" \
+$GENDOCS_TEMPLATE_DIR/gendocs_template >$outdir/index.html
+
+echo "Done, see $outdir/ subdirectory for new files."
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/build-aux/git-version-gen b/build-aux/git-version-gen
new file mode 100755
index 00000000..16da2a8f
--- /dev/null
+++ b/build-aux/git-version-gen
@@ -0,0 +1,151 @@
+#!/bin/sh
+# Print a version string.
+scriptversion=2010-02-24.17; # UTC
+
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This script is derived from GIT-VERSION-GEN from GIT: http://git.or.cz/.
+# It may be run two ways:
+# - from a git repository in which the "git describe" command below
+# produces useful output (thus requiring at least one signed tag)
+# - from a non-git-repo directory containing a .tarball-version file, which
+# presumes this script is invoked like "./git-version-gen .tarball-version".
+
+# In order to use intra-version strings in your project, you will need two
+# separate generated version string files:
+#
+# .tarball-version - present only in a distribution tarball, and not in
+# a checked-out repository. Created with contents that were learned at
+# the last time autoconf was run, and used by git-version-gen. Must not
+# be present in either $(srcdir) or $(builddir) for git-version-gen to
+# give accurate answers during normal development with a checked out tree,
+# but must be present in a tarball when there is no version control system.
+# Therefore, it cannot be used in any dependencies. GNUmakefile has
+# hooks to force a reconfigure at distribution time to get the value
+# correct, without penalizing normal development with extra reconfigures.
+#
+# .version - present in a checked-out repository and in a distribution
+# tarball. Usable in dependencies, particularly for files that don't
+# want to depend on config.h but do want to track version changes.
+# Delete this file prior to any autoconf run where you want to rebuild
+# files to pick up a version string change; and leave it stale to
+# minimize rebuild time after unrelated changes to configure sources.
+#
+# It is probably wise to add these two files to .gitignore, so that you
+# don't accidentally commit either generated file.
+#
+# Use the following line in your configure.ac, so that $(VERSION) will
+# automatically be up-to-date each time configure is run (and note that
+# since configure.ac no longer includes a version string, Makefile rules
+# should not depend on configure.ac for version updates).
+#
+# AC_INIT([GNU project],
+# m4_esyscmd([build-aux/git-version-gen .tarball-version]),
+# [bug-project@example])
+#
+# Then use the following lines in your Makefile.am, so that .version
+# will be present for dependencies, and so that .tarball-version will
+# exist in distribution tarballs.
+#
+# BUILT_SOURCES = $(top_srcdir)/.version
+# $(top_srcdir)/.version:
+# echo $(VERSION) > $@-t && mv $@-t $@
+# dist-hook:
+# echo $(VERSION) > $(distdir)/.tarball-version
+
+case $# in
+ 1) ;;
+ *) echo 1>&2 "Usage: $0 \$srcdir/.tarball-version"; exit 1;;
+esac
+
+tarball_version_file=$1
+nl='
+'
+
+# First see if there is a tarball-only version file.
+# then try "git describe", then default.
+if test -f $tarball_version_file
+then
+ v=`cat $tarball_version_file` || exit 1
+ case $v in
+ *$nl*) v= ;; # reject multi-line output
+ [0-9]*) ;;
+ *) v= ;;
+ esac
+ test -z "$v" \
+ && echo "$0: WARNING: $tarball_version_file seems to be damaged" 1>&2
+fi
+
+if test -n "$v"
+then
+ : # use $v
+elif test -d .git \
+ && v=`git describe --abbrev=4 --match='v*' HEAD 2>/dev/null \
+ || git describe --abbrev=4 HEAD 2>/dev/null` \
+ && case $v in
+ v[0-9]*) ;;
+ *) (exit 1) ;;
+ esac
+then
+ # Is this a new git that lists number of commits since the last
+ # tag or the previous older version that did not?
+ # Newer: v6.10-77-g0f8faeb
+ # Older: v6.10-g0f8faeb
+ case $v in
+ *-*-*) : git describe is okay three part flavor ;;
+ *-*)
+ : git describe is older two part flavor
+ # Recreate the number of commits and rewrite such that the
+ # result is the same as if we were using the newer version
+ # of git describe.
+ vtag=`echo "$v" | sed 's/-.*//'`
+ numcommits=`git rev-list "$vtag"..HEAD | wc -l`
+ v=`echo "$v" | sed "s/\(.*\)-\(.*\)/\1-$numcommits-\2/"`;
+ ;;
+ esac
+
+ # Change the first '-' to a '.', so version-comparing tools work properly.
+ # Remove the "g" in git describe's output string, to save a byte.
+ v=`echo "$v" | sed 's/-/./;s/\(.*\)-g/\1-/'`;
+else
+ v=UNKNOWN
+fi
+
+v=`echo "$v" |sed 's/^v//'`
+
+# Don't declare a version "dirty" merely because a time stamp has changed.
+git status > /dev/null 2>&1
+
+dirty=`sh -c 'git diff-index --name-only HEAD' 2>/dev/null` || dirty=
+case "$dirty" in
+ '') ;;
+ *) # Append the suffix only if there isn't one already.
+ case $v in
+ *-dirty) ;;
+ *) v="$v-dirty" ;;
+ esac ;;
+esac
+
+# Omit the trailing newline, so that m4_esyscmd can use the result directly.
+echo "$v" | tr -d '\012'
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/gnupload b/build-aux/gnupload
new file mode 100755
index 00000000..c28a5cc1
--- /dev/null
+++ b/build-aux/gnupload
@@ -0,0 +1,413 @@
+#!/bin/sh
+# Sign files and upload them.
+
+scriptversion=2010-02-08.07; # UTC
+
+# Copyright (C) 2004, 2005, 2006, 2007, 2008, 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 General Public License as published by
+# the Free Software Foundation; either version 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Originally written by Alexandre Duret-Lutz <adl@gnu.org>.
+
+set -e
+
+GPG='gpg --batch --no-tty'
+conffile=.gnuploadrc
+to=
+dry_run=false
+symlink_files=
+delete_files=
+delete_symlinks=
+collect_var=
+dbg=
+
+usage="Usage: $0 [OPTION]... [CMD] FILE... [[CMD] FILE...]
+
+Sign all FILES, and process them at selected destinations according to CMD.
+<http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>
+explains further.
+
+Commands:
+ --delete delete FILES from destination
+ --symlink create symbolic links
+ --rmsymlink remove symbolic links
+ -- treat the remaining arguments as files to upload
+
+Options:
+ --help print this help text and exit
+ --to DEST specify one destination for FILES
+ (multiple --to options are allowed)
+ --user NAME sign with key NAME
+ --symlink-regex[=EXPR] use sed script EXPR to compute symbolic link names
+ --dry-run do nothing, show what would have been done
+ --version output version information and exit
+
+If --symlink-regex is given without EXPR, then the link target name
+is created by replacing the version information with \`-latest', e.g.:
+
+ foo-1.3.4.tar.gz -> foo-latest.tar.gz
+
+Recognized destinations are:
+ alpha.gnu.org:DIRECTORY
+ savannah.gnu.org:DIRECTORY
+ savannah.nongnu.org:DIRECTORY
+ ftp.gnu.org:DIRECTORY
+ build directive files and upload files by FTP
+ download.gnu.org.ua:{alpha|ftp}/DIRECTORY
+ build directive files and upload files by SFTP
+ [user@]host:DIRECTORY upload files with scp
+
+Options and commands are applied in order. If the file $conffile exists
+in the current working directory, its contents are prepended to the
+actual command line options. Use this to keep your defaults. Comments
+(#) and empty lines in $conffile are allowed.
+
+Examples:
+1. Upload foobar-1.0.tar.gz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz
+
+2. Upload foobar-1.0.tar.gz and foobar-1.0.tar.xz to ftp.gnu.org:
+ gnupload --to ftp.gnu.org:foobar foobar-1.0.tar.gz foobar-1.0.tar.xz
+
+3. Same as above, and also create symbolic links to foobar-latest.tar.*:
+ gnupload --to ftp.gnu.org:foobar \\
+ --symlink-regex \\
+ foobar-1.0.tar.gz foobar-1.0.tar.xz
+
+4. Upload foobar-0.9.90.tar.gz to two sites:
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ foobar-0.9.90.tar.gz
+
+5. Delete oopsbar-0.9.91.tar.gz and upload foobar-0.9.91.tar.gz
+ (the -- terminates the list of files to delete):
+ gnupload --to alpha.gnu.org:foobar \\
+ --to sources.redhat.com:~ftp/pub/foobar \\
+ --delete oopsbar-0.9.91.tar.gz \\
+ -- foobar-0.9.91.tar.gz
+
+gnupload uses the ncftpput program to do the transfers; if you don't
+happen to have an ncftp package installed, the ncftpput-ftp script in
+the build-aux/ directory of the gnulib package
+(http://savannah.gnu.org/projects/gnulib) may serve as a replacement.
+
+Report bugs to <bug-automake@gnu.org>.
+Send patches to <automake-patches@gnu.org>."
+
+# Read local configuration file
+if test -r "$conffile"; then
+ echo "$0: Reading configuration file $conffile"
+ eval set x "`sed 's/#.*$//;/^$/d' \"$conffile\" | tr '\012\015' ' '` \"\$@\""
+ shift
+fi
+
+while test -n "$1"; do
+ case $1 in
+ -*)
+ collect_var=
+ case $1 in
+ --help)
+ echo "$usage"
+ exit $?
+ ;;
+ --to)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --to" 1>&2
+ exit 1
+ else
+ to="$to $2"
+ shift
+ fi
+ ;;
+ --user)
+ if test -z "$2"; then
+ echo "$0: Missing argument for --user" 1>&2
+ exit 1
+ else
+ GPG="$GPG --local-user $2"
+ shift
+ fi
+ ;;
+ --delete)
+ collect_var=delete_files
+ ;;
+ --rmsymlink)
+ collect_var=delete_symlinks
+ ;;
+ --symlink-regex=*)
+ symlink_expr=`expr "$1" : '[^=]*=\(.*\)'`
+ ;;
+ --symlink-regex)
+ symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|'
+ ;;
+ --symlink)
+ collect_var=symlink_files
+ ;;
+ --dry-run|-n)
+ dry_run=:
+ ;;
+ --version)
+ echo "gnupload $scriptversion"
+ exit $?
+ ;;
+ --)
+ shift
+ break
+ ;;
+ -*)
+ echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
+ exit 1
+ ;;
+ esac
+ ;;
+ *)
+ if test -z "$collect_var"; then
+ break
+ else
+ eval "$collect_var=\"\$$collect_var $1\""
+ fi
+ ;;
+ esac
+ shift
+done
+
+dprint()
+{
+ echo "Running $*..."
+}
+
+if $dry_run; then
+ dbg=dprint
+fi
+
+if test -z "$to"; then
+ echo "$0: Missing destination sites" >&2
+ exit 1
+fi
+
+if test -n "$symlink_files"; then
+ x=`echo "$symlink_files" | sed 's/[^ ]//g;s/ //g'`
+ if test -n "$x"; then
+ echo "$0: Odd number of symlink arguments" >&2
+ exit 1
+ fi
+fi
+
+if test $# = 0; then
+ if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then
+ echo "$0: No file to upload" 1>&2
+ exit 1
+ fi
+else
+ # Make sure all files exist. We don't want to ask
+ # for the passphrase if the script will fail.
+ for file
+ do
+ if test ! -f $file; then
+ echo "$0: Cannot find \`$file'" 1>&2
+ exit 1
+ elif test -n "$symlink_expr"; then
+ linkname=`echo $file | sed "$symlink_expr"`
+ if test -z "$linkname"; then
+ echo "$0: symlink expression produces empty results" >&2
+ exit 1
+ elif test "$linkname" = $file; then
+ echo "$0: symlink expression does not alter file name" >&2
+ exit 1
+ fi
+ fi
+ done
+fi
+
+# Make sure passphrase is not exported in the environment.
+unset passphrase
+
+# Reset PATH to be sure that echo is a built-in. We will later use
+# `echo $passphrase' to output the passphrase, so it is important that
+# it is a built-in (third-party programs tend to appear in `ps'
+# listings with their arguments...).
+# Remember this script runs with `set -e', so if echo is not built-in
+# it will exit now.
+PATH=/empty echo -n "Enter GPG passphrase: "
+stty -echo
+read -r passphrase
+stty echo
+echo
+
+if test $# -ne 0; then
+ for file
+ do
+ echo "Signing $file..."
+ rm -f $file.sig
+ echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
+ done
+fi
+
+
+# mkdirective DESTDIR BASE FILE STMT
+# Arguments: See upload, below
+mkdirective ()
+{
+ stmt="$4"
+ if test -n "$3"; then
+ stmt="
+filename: $3$stmt"
+ fi
+
+ cat >${2}.directive<<EOF
+version: 1.1
+directory: $1
+comment: gnupload v. $scriptversion$stmt
+EOF
+ if $dry_run; then
+ echo "File ${2}.directive:"
+ cat ${2}.directive
+ echo "File ${2}.directive:" | sed 's/./-/g'
+ fi
+}
+
+mksymlink ()
+{
+ while test $# -ne 0
+ do
+ echo "symlink: $1 $2"
+ shift
+ shift
+ done
+}
+
+# upload DEST DESTDIR BASE FILE STMT FILES
+# Arguments:
+# DEST Destination site;
+# DESTDIR Destination directory;
+# BASE Base name for the directive file;
+# FILE Name of the file to distribute (may be empty);
+# STMT Additional statements for the directive file;
+# FILES List of files to upload.
+upload ()
+{
+ dest=$1
+ destdir=$2
+ base=$3
+ file=$4
+ stmt=$5
+ files=$6
+
+ rm -f $base.directive $base.directive.asc
+ case $dest in
+ alpha.gnu.org:*)
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files $base.directive.asc
+ ;;
+ ftp.gnu.org:*)
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc
+ ;;
+ savannah.gnu.org:*)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files
+ ;;
+ savannah.nongnu.org:*)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files
+ ;;
+ download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*)
+ destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'`
+ destdir_topdir=`echo "$destdir" | sed 's,/.*,,'`
+ mkdirective "$destdir_p1" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ for f in $files $base.directive.asc
+ do
+ echo put $f
+ done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir
+ ;;
+ /*)
+ dest_host=`echo "$dest" | sed 's,:.*,,'`
+ mkdirective "$destdir" "$base" "$file" "$stmt"
+ echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign $base.directive
+ $dbg cp $files $base.directive.asc $dest_host
+ ;;
+ *)
+ if test -z "$files"; then
+ echo "$0: warning: standalone directives not applicable for $dest" >&2
+ fi
+ $dbg scp $files $dest
+ ;;
+ esac
+ rm -f $base.directive $base.directive.asc
+}
+
+#####
+# Process any standalone directives
+stmt=
+if test -n "$symlink_files"; then
+ stmt="$stmt
+`mksymlink $symlink_files`"
+fi
+
+for file in $delete_files
+do
+ stmt="$stmt
+archive: $file"
+done
+
+for file in $delete_symlinks
+do
+ stmt="$stmt
+rmsymlink: $file"
+done
+
+if test -n "$stmt"; then
+ for dest in $to
+ do
+ destdir=`echo $dest | sed 's/[^:]*://'`
+ upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt"
+ done
+fi
+
+# Process actual uploads
+for dest in $to
+do
+ for file
+ do
+ echo "Uploading $file to $dest..."
+ stmt=
+ files="$file $file.sig"
+ destdir=`echo $dest | sed 's/[^:]*://'`
+ if test -n "$symlink_expr"; then
+ linkname=`echo $file | sed "$symlink_expr"`
+ stmt="$stmt
+symlink: $file $linkname
+symlink: $file.sig $linkname.sig"
+ fi
+ upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files"
+ done
+done
+
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/ltmain.sh b/build-aux/ltmain.sh
new file mode 100755
index 00000000..d88da2c2
--- /dev/null
+++ b/build-aux/ltmain.sh
@@ -0,0 +1,8413 @@
+# Generated from ltmain.m4sh.
+
+# ltmain.sh (GNU libtool) 2.2.6b
+# Written by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007 2008 Free Software Foundation, Inc.
+# This is free software; see the source for copying conditions. There is NO
+# warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+
+# GNU Libtool is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html,
+# or obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+# Usage: $progname [OPTION]... [MODE-ARG]...
+#
+# Provide generalized library-building support services.
+#
+# --config show all configuration variables
+# --debug enable verbose shell tracing
+# -n, --dry-run display commands without modifying any files
+# --features display basic configuration information and exit
+# --mode=MODE use operation mode MODE
+# --preserve-dup-deps don't remove duplicate dependency libraries
+# --quiet, --silent don't print informational messages
+# --tag=TAG use configuration variables from tag TAG
+# -v, --verbose print informational messages (default)
+# --version print version information
+# -h, --help print short or long help message
+#
+# MODE must be one of the following:
+#
+# clean remove files from the build directory
+# compile compile a source file into a libtool object
+# execute automatically set library path, then run a program
+# finish complete the installation of libtool libraries
+# install install libraries or executables
+# link create a library or an executable
+# uninstall remove libraries from an installed directory
+#
+# MODE-ARGS vary depending on the MODE.
+# Try `$progname --help --mode=MODE' for a more detailed description of MODE.
+#
+# When reporting a bug, please describe a test case to reproduce it and
+# include the following information:
+#
+# host-triplet: $host
+# shell: $SHELL
+# compiler: $LTCC
+# compiler flags: $LTCFLAGS
+# linker: $LD (gnu? $with_gnu_ld)
+# $progname: (GNU libtool) 2.2.6b Debian-2.2.6b-2
+# automake: $automake_version
+# autoconf: $autoconf_version
+#
+# Report bugs to <bug-libtool@gnu.org>.
+
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION="2.2.6b Debian-2.2.6b-2"
+TIMESTAMP=""
+package_revision=1.3017
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# NLS nuisances: We save the old values to restore during execute mode.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+lt_user_locale=
+lt_safe_locale=
+for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+do
+ eval "if test \"\${$lt_var+set}\" = set; then
+ save_$lt_var=\$$lt_var
+ $lt_var=C
+ export $lt_var
+ lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\"
+ lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\"
+ fi"
+done
+
+$lt_unset CDPATH
+
+
+
+
+
+: ${CP="cp -f"}
+: ${ECHO="echo"}
+: ${EGREP="/bin/grep -E"}
+: ${FGREP="/bin/grep -F"}
+: ${GREP="/bin/grep"}
+: ${LN_S="ln -s"}
+: ${MAKE="make"}
+: ${MKDIR="mkdir"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+: ${SED="/bin/sed"}
+: ${SHELL="${CONFIG_SHELL-/bin/sh}"}
+: ${Xsed="$SED -e 1s/^X//"}
+
+# Global variables:
+EXIT_SUCCESS=0
+EXIT_FAILURE=1
+EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing.
+EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake.
+
+exit_status=$EXIT_SUCCESS
+
+# Make sure IFS has a sensible default
+lt_nl='
+'
+IFS=" $lt_nl"
+
+dirname="s,/[^/]*$,,"
+basename="s,^.*/,,"
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+# Generated shell functions inserted here.
+
+# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh
+# is ksh but when the shell is invoked as "sh" and the current value of
+# the _XPG environment variable is not equal to 1 (one), the special
+# positional parameter $0, within a function call, is the name of the
+# function.
+progpath="$0"
+
+# The name of this program:
+# In the unlikely event $progname began with a '-', it would play havoc with
+# func_echo (imagine progname=-n), so we prepend ./ in that case:
+func_dirname_and_basename "$progpath"
+progname=$func_basename_result
+case $progname in
+ -*) progname=./$progname ;;
+esac
+
+# Make sure we have an absolute path for reexecution:
+case $progpath in
+ [\\/]*|[A-Za-z]:\\*) ;;
+ *[\\/]*)
+ progdir=$func_dirname_result
+ progdir=`cd "$progdir" && pwd`
+ progpath="$progdir/$progname"
+ ;;
+ *)
+ save_IFS="$IFS"
+ IFS=:
+ for progdir in $PATH; do
+ IFS="$save_IFS"
+ test -x "$progdir/$progname" && break
+ done
+ IFS="$save_IFS"
+ test -n "$progdir" || progdir=`pwd`
+ progpath="$progdir/$progname"
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed="${SED}"' -e 1s/^X//'
+sed_quote_subst='s/\([`"$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Re-`\' parameter expansions in output of double_quote_subst that were
+# `\'-ed in input to the same. If an odd number of `\' preceded a '$'
+# in input to double_quote_subst, that '$' was protected from expansion.
+# Since each input `\' is now two `\'s, look for any number of runs of
+# four `\'s followed by two `\'s and then a '$'. `\' that '$'.
+bs='\\'
+bs2='\\\\'
+bs4='\\\\\\\\'
+dollar='\$'
+sed_double_backslash="\
+ s/$bs4/&\\
+/g
+ s/^$bs2$dollar/$bs&/
+ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g
+ s/\n//g"
+
+# Standard options:
+opt_dry_run=false
+opt_help=false
+opt_quiet=false
+opt_verbose=false
+opt_warning=:
+
+# func_echo arg...
+# Echo program name prefixed message, along with the current mode
+# name if it has been set yet.
+func_echo ()
+{
+ $ECHO "$progname${mode+: }$mode: $*"
+}
+
+# func_verbose arg...
+# Echo program name prefixed message in verbose mode only.
+func_verbose ()
+{
+ $opt_verbose && func_echo ${1+"$@"}
+
+ # A bug in bash halts the script if the last line of a function
+ # fails when set -e is in force, so we need another command to
+ # work around that:
+ :
+}
+
+# func_error arg...
+# Echo program name prefixed message to standard error.
+func_error ()
+{
+ $ECHO "$progname${mode+: }$mode: "${1+"$@"} 1>&2
+}
+
+# func_warning arg...
+# Echo program name prefixed warning message to standard error.
+func_warning ()
+{
+ $opt_warning && $ECHO "$progname${mode+: }$mode: warning: "${1+"$@"} 1>&2
+
+ # bash bug again:
+ :
+}
+
+# func_fatal_error arg...
+# Echo program name prefixed message to standard error, and exit.
+func_fatal_error ()
+{
+ func_error ${1+"$@"}
+ exit $EXIT_FAILURE
+}
+
+# func_fatal_help arg...
+# Echo program name prefixed message to standard error, followed by
+# a help hint, and exit.
+func_fatal_help ()
+{
+ func_error ${1+"$@"}
+ func_fatal_error "$help"
+}
+help="Try \`$progname --help' for more information." ## default
+
+
+# func_grep expression filename
+# Check whether EXPRESSION matches any line of FILENAME, without output.
+func_grep ()
+{
+ $GREP "$1" "$2" >/dev/null 2>&1
+}
+
+
+# func_mkdir_p directory-path
+# Make sure the entire path to DIRECTORY-PATH is available.
+func_mkdir_p ()
+{
+ my_directory_path="$1"
+ my_dir_list=
+
+ if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then
+
+ # Protect directory names starting with `-'
+ case $my_directory_path in
+ -*) my_directory_path="./$my_directory_path" ;;
+ esac
+
+ # While some portion of DIR does not yet exist...
+ while test ! -d "$my_directory_path"; do
+ # ...make a list in topmost first order. Use a colon delimited
+ # list incase some portion of path contains whitespace.
+ my_dir_list="$my_directory_path:$my_dir_list"
+
+ # If the last portion added has no slash in it, the list is done
+ case $my_directory_path in */*) ;; *) break ;; esac
+
+ # ...otherwise throw away the child directory and loop
+ my_directory_path=`$ECHO "X$my_directory_path" | $Xsed -e "$dirname"`
+ done
+ my_dir_list=`$ECHO "X$my_dir_list" | $Xsed -e 's,:*$,,'`
+
+ save_mkdir_p_IFS="$IFS"; IFS=':'
+ for my_dir in $my_dir_list; do
+ IFS="$save_mkdir_p_IFS"
+ # mkdir can fail with a `File exist' error if two processes
+ # try to create one of the directories concurrently. Don't
+ # stop in that case!
+ $MKDIR "$my_dir" 2>/dev/null || :
+ done
+ IFS="$save_mkdir_p_IFS"
+
+ # Bail out if we (or some other process) failed to create a directory.
+ test -d "$my_directory_path" || \
+ func_fatal_error "Failed to create \`$1'"
+ fi
+}
+
+
+# func_mktempdir [string]
+# Make a temporary directory that won't clash with other running
+# libtool processes, and avoids race conditions if possible. If
+# given, STRING is the basename for that directory.
+func_mktempdir ()
+{
+ my_template="${TMPDIR-/tmp}/${1-$progname}"
+
+ if test "$opt_dry_run" = ":"; then
+ # Return a directory name, but don't create it in dry-run mode
+ my_tmpdir="${my_template}-$$"
+ else
+
+ # If mktemp works, use that first and foremost
+ my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null`
+
+ if test ! -d "$my_tmpdir"; then
+ # Failing that, at least try and use $RANDOM to avoid a race
+ my_tmpdir="${my_template}-${RANDOM-0}$$"
+
+ save_mktempdir_umask=`umask`
+ umask 0077
+ $MKDIR "$my_tmpdir"
+ umask $save_mktempdir_umask
+ fi
+
+ # If we're not in dry-run mode, bomb out on failure
+ test -d "$my_tmpdir" || \
+ func_fatal_error "cannot create temporary directory \`$my_tmpdir'"
+ fi
+
+ $ECHO "X$my_tmpdir" | $Xsed
+}
+
+
+# func_quote_for_eval arg
+# Aesthetically quote ARG to be evaled later.
+# This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT
+# is double-quoted, suitable for a subsequent eval, whereas
+# FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters
+# which are still active within double quotes backslashified.
+func_quote_for_eval ()
+{
+ case $1 in
+ *[\\\`\"\$]*)
+ func_quote_for_eval_unquoted_result=`$ECHO "X$1" | $Xsed -e "$sed_quote_subst"` ;;
+ *)
+ func_quote_for_eval_unquoted_result="$1" ;;
+ esac
+
+ case $func_quote_for_eval_unquoted_result in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting, command substitution and and variable
+ # expansion for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\""
+ ;;
+ *)
+ func_quote_for_eval_result="$func_quote_for_eval_unquoted_result"
+ esac
+}
+
+
+# func_quote_for_expand arg
+# Aesthetically quote ARG to be evaled later; same as above,
+# but do not quote variable references.
+func_quote_for_expand ()
+{
+ case $1 in
+ *[\\\`\"]*)
+ my_arg=`$ECHO "X$1" | $Xsed \
+ -e "$double_quote_subst" -e "$sed_double_backslash"` ;;
+ *)
+ my_arg="$1" ;;
+ esac
+
+ case $my_arg in
+ # Double-quote args containing shell metacharacters to delay
+ # word splitting and command substitution for a subsequent eval.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ my_arg="\"$my_arg\""
+ ;;
+ esac
+
+ func_quote_for_expand_result="$my_arg"
+}
+
+
+# func_show_eval cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it.
+func_show_eval ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$my_cmd"
+ my_status=$?
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+# func_show_eval_locale cmd [fail_exp]
+# Unless opt_silent is true, then output CMD. Then, if opt_dryrun is
+# not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP
+# is given, then evaluate it. Use the saved locale for evaluation.
+func_show_eval_locale ()
+{
+ my_cmd="$1"
+ my_fail_exp="${2-:}"
+
+ ${opt_silent-false} || {
+ func_quote_for_expand "$my_cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+
+ if ${opt_dry_run-false}; then :; else
+ eval "$lt_user_locale
+ $my_cmd"
+ my_status=$?
+ eval "$lt_safe_locale"
+ if test "$my_status" -eq 0; then :; else
+ eval "(exit $my_status); $my_fail_exp"
+ fi
+ fi
+}
+
+
+
+
+
+# func_version
+# Echo version message to standard output and exit.
+func_version ()
+{
+ $SED -n '/^# '$PROGRAM' (GNU /,/# warranty; / {
+ s/^# //
+ s/^# *$//
+ s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_usage
+# Echo short help message to standard output and exit.
+func_usage ()
+{
+ $SED -n '/^# Usage:/,/# -h/ {
+ s/^# //
+ s/^# *$//
+ s/\$progname/'$progname'/
+ p
+ }' < "$progpath"
+ $ECHO
+ $ECHO "run \`$progname --help | more' for full usage"
+ exit $?
+}
+
+# func_help
+# Echo long help message to standard output and exit.
+func_help ()
+{
+ $SED -n '/^# Usage:/,/# Report bugs to/ {
+ s/^# //
+ s/^# *$//
+ s*\$progname*'$progname'*
+ s*\$host*'"$host"'*
+ s*\$SHELL*'"$SHELL"'*
+ s*\$LTCC*'"$LTCC"'*
+ s*\$LTCFLAGS*'"$LTCFLAGS"'*
+ s*\$LD*'"$LD"'*
+ s/\$with_gnu_ld/'"$with_gnu_ld"'/
+ s/\$automake_version/'"`(automake --version) 2>/dev/null |$SED 1q`"'/
+ s/\$autoconf_version/'"`(autoconf --version) 2>/dev/null |$SED 1q`"'/
+ p
+ }' < "$progpath"
+ exit $?
+}
+
+# func_missing_arg argname
+# Echo program name prefixed message to standard error and set global
+# exit_cmd.
+func_missing_arg ()
+{
+ func_error "missing argument for $1"
+ exit_cmd=exit
+}
+
+exit_cmd=:
+
+
+
+
+
+# Check that we have a working $ECHO.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t'; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell, and then maybe $ECHO will work.
+ exec $SHELL "$progpath" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit $EXIT_SUCCESS
+fi
+
+magic="%%%MAGIC variable%%%"
+magic_exe="%%%MAGIC EXE variable%%%"
+
+# Global variables.
+# $mode is unset
+nonopt=
+execute_dlfiles=
+preserve_args=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+extracted_archives=
+extracted_serial=0
+
+opt_dry_run=false
+opt_duplicate_deps=false
+opt_silent=false
+opt_debug=:
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+# func_fatal_configuration arg...
+# Echo program name prefixed message to standard error, followed by
+# a configuration failure hint, and exit.
+func_fatal_configuration ()
+{
+ func_error ${1+"$@"}
+ func_error "See the $PACKAGE documentation for more information."
+ func_fatal_error "Fatal configuration error."
+}
+
+
+# func_config
+# Display the configuration for all the tags in this script.
+func_config ()
+{
+ re_begincf='^# ### BEGIN LIBTOOL'
+ re_endcf='^# ### END LIBTOOL'
+
+ # Default configuration.
+ $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath"
+
+ # Now print the configurations for the tags.
+ for tagname in $taglist; do
+ $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath"
+ done
+
+ exit $?
+}
+
+# func_features
+# Display the features supported by this script.
+func_features ()
+{
+ $ECHO "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ $ECHO "enable shared libraries"
+ else
+ $ECHO "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ $ECHO "enable static libraries"
+ else
+ $ECHO "disable static libraries"
+ fi
+
+ exit $?
+}
+
+# func_enable_tag tagname
+# Verify that TAGNAME is valid, and either flag an error and exit, or
+# enable the TAGNAME tag. We also add TAGNAME to the global $taglist
+# variable here.
+func_enable_tag ()
+{
+ # Global variable:
+ tagname="$1"
+
+ re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$"
+ re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$"
+ sed_extractcf="/$re_begincf/,/$re_endcf/p"
+
+ # Validate tagname.
+ case $tagname in
+ *[!-_A-Za-z0-9,/]*)
+ func_fatal_error "invalid tag name: $tagname"
+ ;;
+ esac
+
+ # Don't test for the "default" C tag, as we know it's
+ # there but not specially marked.
+ case $tagname in
+ CC) ;;
+ *)
+ if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then
+ taglist="$taglist $tagname"
+
+ # Evaluate the configuration. Be careful to quote the path
+ # and the sed script, to avoid splitting on whitespace, but
+ # also don't use non-portable quotes within backquotes within
+ # quotes we have to do it in 2 steps:
+ extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"`
+ eval "$extractedcf"
+ else
+ func_error "ignoring unknown tag $tagname"
+ fi
+ ;;
+ esac
+}
+
+# Parse options once, thoroughly. This comes as soon as possible in
+# the script to make things like `libtool --version' happen quickly.
+{
+
+ # Shorthand for --mode=foo, only valid as the first argument
+ case $1 in
+ clean|clea|cle|cl)
+ shift; set dummy --mode clean ${1+"$@"}; shift
+ ;;
+ compile|compil|compi|comp|com|co|c)
+ shift; set dummy --mode compile ${1+"$@"}; shift
+ ;;
+ execute|execut|execu|exec|exe|ex|e)
+ shift; set dummy --mode execute ${1+"$@"}; shift
+ ;;
+ finish|finis|fini|fin|fi|f)
+ shift; set dummy --mode finish ${1+"$@"}; shift
+ ;;
+ install|instal|insta|inst|ins|in|i)
+ shift; set dummy --mode install ${1+"$@"}; shift
+ ;;
+ link|lin|li|l)
+ shift; set dummy --mode link ${1+"$@"}; shift
+ ;;
+ uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u)
+ shift; set dummy --mode uninstall ${1+"$@"}; shift
+ ;;
+ esac
+
+ # Parse non-mode specific arguments:
+ while test "$#" -gt 0; do
+ opt="$1"
+ shift
+
+ case $opt in
+ --config) func_config ;;
+
+ --debug) preserve_args="$preserve_args $opt"
+ func_echo "enabling shell trace mode"
+ opt_debug='set -x'
+ $opt_debug
+ ;;
+
+ -dlopen) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ execute_dlfiles="$execute_dlfiles $1"
+ shift
+ ;;
+
+ --dry-run | -n) opt_dry_run=: ;;
+ --features) func_features ;;
+ --finish) mode="finish" ;;
+
+ --mode) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ case $1 in
+ # Valid mode arguments:
+ clean) ;;
+ compile) ;;
+ execute) ;;
+ finish) ;;
+ install) ;;
+ link) ;;
+ relink) ;;
+ uninstall) ;;
+
+ # Catch anything else as an error
+ *) func_error "invalid argument for $opt"
+ exit_cmd=exit
+ break
+ ;;
+ esac
+
+ mode="$1"
+ shift
+ ;;
+
+ --preserve-dup-deps)
+ opt_duplicate_deps=: ;;
+
+ --quiet|--silent) preserve_args="$preserve_args $opt"
+ opt_silent=:
+ ;;
+
+ --verbose| -v) preserve_args="$preserve_args $opt"
+ opt_silent=false
+ ;;
+
+ --tag) test "$#" -eq 0 && func_missing_arg "$opt" && break
+ preserve_args="$preserve_args $opt $1"
+ func_enable_tag "$1" # tagname is set here
+ shift
+ ;;
+
+ # Separate optargs to long options:
+ -dlopen=*|--mode=*|--tag=*)
+ func_opt_split "$opt"
+ set dummy "$func_opt_split_opt" "$func_opt_split_arg" ${1+"$@"}
+ shift
+ ;;
+
+ -\?|-h) func_usage ;;
+ --help) opt_help=: ;;
+ --version) func_version ;;
+
+ -*) func_fatal_help "unrecognized option \`$opt'" ;;
+
+ *) nonopt="$opt"
+ break
+ ;;
+ esac
+ done
+
+
+ case $host in
+ *cygwin* | *mingw* | *pw32* | *cegcc*)
+ # don't eliminate duplications in $postdeps and $predeps
+ opt_duplicate_compiler_generated_deps=:
+ ;;
+ *)
+ opt_duplicate_compiler_generated_deps=$opt_duplicate_deps
+ ;;
+ esac
+
+ # Having warned about all mis-specified options, bail out if
+ # anything was wrong.
+ $exit_cmd $EXIT_FAILURE
+}
+
+# func_check_version_match
+# Ensure that we are using m4 macros, and libtool script from the same
+# release of libtool.
+func_check_version_match ()
+{
+ if test "$package_revision" != "$macro_revision"; then
+ if test "$VERSION" != "$macro_version"; then
+ if test -z "$macro_version"; then
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from an older release.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, but the
+$progname: definition of this LT_INIT comes from $PACKAGE $macro_version.
+$progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION
+$progname: and run autoconf again.
+_LT_EOF
+ fi
+ else
+ cat >&2 <<_LT_EOF
+$progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision,
+$progname: but the definition of this LT_INIT comes from revision $macro_revision.
+$progname: You should recreate aclocal.m4 with macros from revision $package_revision
+$progname: of $PACKAGE $VERSION and run autoconf again.
+_LT_EOF
+ fi
+
+ exit $EXIT_MISMATCH
+ fi
+}
+
+
+## ----------- ##
+## Main. ##
+## ----------- ##
+
+$opt_help || {
+ # Sanity checks first:
+ func_check_version_match
+
+ if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ func_fatal_configuration "not configured to build any kind of library"
+ fi
+
+ test -z "$mode" && func_fatal_error "error: you must specify a MODE."
+
+
+ # Darwin sucks
+ eval std_shrext=\"$shrext_cmds\"
+
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ func_error "unrecognized option \`-dlopen'"
+ $ECHO "$help" 1>&2
+ exit $EXIT_FAILURE
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$progname --help --mode=$mode' for more information."
+}
+
+
+# func_lalib_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_lalib_p ()
+{
+ test -f "$1" &&
+ $SED -e 4q "$1" 2>/dev/null \
+ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1
+}
+
+# func_lalib_unsafe_p file
+# True iff FILE is a libtool `.la' library or `.lo' object file.
+# This function implements the same check as func_lalib_p without
+# resorting to external programs. To this end, it redirects stdin and
+# closes it afterwards, without saving the original file descriptor.
+# As a safety measure, use it only where a negative result would be
+# fatal anyway. Works if `file' does not exist.
+func_lalib_unsafe_p ()
+{
+ lalib_p=no
+ if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then
+ for lalib_p_l in 1 2 3 4
+ do
+ read lalib_p_line
+ case "$lalib_p_line" in
+ \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;;
+ esac
+ done
+ exec 0<&5 5<&-
+ fi
+ test "$lalib_p" = yes
+}
+
+# func_ltwrapper_script_p file
+# True iff FILE is a libtool wrapper script
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_script_p ()
+{
+ func_lalib_p "$1"
+}
+
+# func_ltwrapper_executable_p file
+# True iff FILE is a libtool wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_executable_p ()
+{
+ func_ltwrapper_exec_suffix=
+ case $1 in
+ *.exe) ;;
+ *) func_ltwrapper_exec_suffix=.exe ;;
+ esac
+ $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1
+}
+
+# func_ltwrapper_scriptname file
+# Assumes file is an ltwrapper_executable
+# uses $file to determine the appropriate filename for a
+# temporary ltwrapper_script.
+func_ltwrapper_scriptname ()
+{
+ func_ltwrapper_scriptname_result=""
+ if func_ltwrapper_executable_p "$1"; then
+ func_dirname_and_basename "$1" "" "."
+ func_stripname '' '.exe' "$func_basename_result"
+ func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper"
+ fi
+}
+
+# func_ltwrapper_p file
+# True iff FILE is a libtool wrapper script or wrapper executable
+# This function is only a basic sanity check; it will hardly flush out
+# determined imposters.
+func_ltwrapper_p ()
+{
+ func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1"
+}
+
+
+# func_execute_cmds commands fail_cmd
+# Execute tilde-delimited COMMANDS.
+# If FAIL_CMD is given, eval that upon failure.
+# FAIL_CMD may read-access the current command in variable CMD!
+func_execute_cmds ()
+{
+ $opt_debug
+ save_ifs=$IFS; IFS='~'
+ for cmd in $1; do
+ IFS=$save_ifs
+ eval cmd=\"$cmd\"
+ func_show_eval "$cmd" "${2-:}"
+ done
+ IFS=$save_ifs
+}
+
+
+# func_source file
+# Source FILE, adding directory component if necessary.
+# Note that it is not necessary on cygwin/mingw to append a dot to
+# FILE even if both FILE and FILE.exe exist: automatic-append-.exe
+# behavior happens only for exec(3), not for open(2)! Also, sourcing
+# `FILE.' does not work on cygwin managed mounts.
+func_source ()
+{
+ $opt_debug
+ case $1 in
+ */* | *\\*) . "$1" ;;
+ *) . "./$1" ;;
+ esac
+}
+
+
+# func_infer_tag arg
+# Infer tagged configuration to use if any are available and
+# if one wasn't chosen via the "--tag" command line option.
+# Only attempt this if the compiler in the base compile
+# command doesn't match the default compiler.
+# arg is usually of the form 'gcc ...'
+func_infer_tag ()
+{
+ $opt_debug
+ if test -n "$available_tags" && test -z "$tagname"; then
+ CC_quoted=
+ for arg in $CC; do
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case $@ in
+ # Blanks in the command may have been stripped by the calling shell,
+ # but not from the CC environment variable when configure was run.
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*) ;;
+ # Blanks at the start of $base_compile will cause this to fail
+ # if we don't check for them as well.
+ *)
+ for z in $available_tags; do
+ if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then
+ # Evaluate the configuration.
+ eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`"
+ CC_quoted=
+ for arg in $CC; do
+ # Double-quote args containing other shell metacharacters.
+ func_quote_for_eval "$arg"
+ CC_quoted="$CC_quoted $func_quote_for_eval_result"
+ done
+ case "$@ " in
+ " $CC "* | "$CC "* | " `$ECHO $CC` "* | "`$ECHO $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$ECHO $CC_quoted` "* | "`$ECHO $CC_quoted` "*)
+ # The compiler in the base compile command matches
+ # the one in the tagged configuration.
+ # Assume this is the tagged configuration we want.
+ tagname=$z
+ break
+ ;;
+ esac
+ fi
+ done
+ # If $tagname still isn't set, then no tagged configuration
+ # was found and let the user know that the "--tag" command
+ # line option must be used.
+ if test -z "$tagname"; then
+ func_echo "unable to infer tagged configuration"
+ func_fatal_error "specify a tag with \`--tag'"
+# else
+# func_verbose "using $tagname tagged configuration"
+ fi
+ ;;
+ esac
+ fi
+}
+
+
+
+# func_write_libtool_object output_name pic_name nonpic_name
+# Create a libtool object file (analogous to a ".la" file),
+# but don't create it if we're doing a dry run.
+func_write_libtool_object ()
+{
+ write_libobj=${1}
+ if test "$build_libtool_libs" = yes; then
+ write_lobj=\'${2}\'
+ else
+ write_lobj=none
+ fi
+
+ if test "$build_old_libs" = yes; then
+ write_oldobj=\'${3}\'
+ else
+ write_oldobj=none
+ fi
+
+ $opt_dry_run || {
+ cat >${write_libobj}T <<EOF
+# $write_libobj - a libtool object file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# Name of the PIC object.
+pic_object=$write_lobj
+
+# Name of the non-PIC object
+non_pic_object=$write_oldobj
+
+EOF
+ $MV "${write_libobj}T" "${write_libobj}"
+ }
+}
+
+# func_mode_compile arg...
+func_mode_compile ()
+{
+ $opt_debug
+ # Get the compilation command and the source file.
+ base_compile=
+ srcfile="$nonopt" # always keep a non-empty value in "srcfile"
+ suppress_opt=yes
+ suppress_output=
+ arg_mode=normal
+ libobj=
+ later=
+ pie_flag=
+
+ for arg
+ do
+ case $arg_mode in
+ arg )
+ # do not "continue". Instead, add this to base_compile
+ lastarg="$arg"
+ arg_mode=normal
+ ;;
+
+ target )
+ libobj="$arg"
+ arg_mode=normal
+ continue
+ ;;
+
+ normal )
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ test -n "$libobj" && \
+ func_fatal_error "you cannot specify \`-o' more than once"
+ arg_mode=target
+ continue
+ ;;
+
+ -pie | -fpie | -fPIE)
+ pie_flag="$pie_flag $arg"
+ continue
+ ;;
+
+ -shared | -static | -prefer-pic | -prefer-non-pic)
+ later="$later $arg"
+ continue
+ ;;
+
+ -no-suppress)
+ suppress_opt=no
+ continue
+ ;;
+
+ -Xcompiler)
+ arg_mode=arg # the next one goes into the "base_compile" arg list
+ continue # The current "srcfile" will either be retained or
+ ;; # replaced later. I would guess that would be a bug.
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ lastarg=
+ save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$arg"
+ lastarg="$lastarg $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$lastarg"
+ lastarg=$func_stripname_result
+
+ # Add the arguments to base_compile.
+ base_compile="$base_compile $lastarg"
+ continue
+ ;;
+
+ *)
+ # Accept the current argument as the source file.
+ # The previous "srcfile" becomes the current argument.
+ #
+ lastarg="$srcfile"
+ srcfile="$arg"
+ ;;
+ esac # case $arg
+ ;;
+ esac # case $arg_mode
+
+ # Aesthetically quote the previous argument.
+ func_quote_for_eval "$lastarg"
+ base_compile="$base_compile $func_quote_for_eval_result"
+ done # for arg
+
+ case $arg_mode in
+ arg)
+ func_fatal_error "you must specify an argument for -Xcompile"
+ ;;
+ target)
+ func_fatal_error "you must specify a target with \`-o'"
+ ;;
+ *)
+ # Get the name of the library object.
+ test -z "$libobj" && {
+ func_basename "$srcfile"
+ libobj="$func_basename_result"
+ }
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ case $libobj in
+ *.[cCFSifmso] | \
+ *.ada | *.adb | *.ads | *.asm | \
+ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \
+ *.[fF][09]? | *.for | *.java | *.obj | *.sx)
+ func_xform "$libobj"
+ libobj=$func_xform_result
+ ;;
+ esac
+
+ case $libobj in
+ *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;;
+ *)
+ func_fatal_error "cannot determine name of library object from \`$libobj'"
+ ;;
+ esac
+
+ func_infer_tag $base_compile
+
+ for arg in $later; do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ continue
+ ;;
+
+ -static)
+ build_libtool_libs=no
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+ esac
+ done
+
+ func_quote_for_eval "$libobj"
+ test "X$libobj" != "X$func_quote_for_eval_result" \
+ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \
+ && func_warning "libobj name \`$libobj' may not contain shell special characters."
+ func_dirname_and_basename "$obj" "/" ""
+ objname="$func_basename_result"
+ xdir="$func_dirname_result"
+ lobj=${xdir}$objdir/$objname
+
+ test -z "$base_compile" && \
+ func_fatal_help "you must specify a compilation command"
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $lobj $libobj ${libobj}T"
+ else
+ removelist="$lobj $libobj ${libobj}T"
+ fi
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2* | cegcc*)
+ pic_mode=default
+ ;;
+ esac
+ if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$ECHO "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ else
+ output_obj=
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do
+ func_echo "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ $ECHO "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+ removelist="$removelist $output_obj"
+ $ECHO "$srcfile" > "$lockfile"
+ fi
+
+ $opt_dry_run || $RM $removelist
+ removelist="$removelist $lockfile"
+ trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+ func_quote_for_eval "$srcfile"
+ qsrcfile=$func_quote_for_eval_result
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ command="$base_compile $qsrcfile $pic_flag"
+ else
+ # Don't build PIC code
+ command="$base_compile $qsrcfile"
+ fi
+
+ func_mkdir_p "$xdir$objdir"
+
+ if test -z "$output_obj"; then
+ # Place PIC objects in $objdir
+ command="$command -o $lobj"
+ fi
+
+ func_show_eval_locale "$command" \
+ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then
+ func_show_eval '$MV "$output_obj" "$lobj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+
+ # Allow error messages only from the first compilation.
+ if test "$suppress_opt" = yes; then
+ suppress_output=' >/dev/null 2>&1'
+ fi
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $qsrcfile$pie_flag"
+ else
+ command="$base_compile $qsrcfile $pic_flag"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ func_show_eval_locale "$command" \
+ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE'
+
+ if test "$need_locks" = warn &&
+ test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then
+ $ECHO "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $opt_dry_run || $RM $removelist
+ exit $EXIT_FAILURE
+ fi
+
+ # Just move the object if needed
+ if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then
+ func_show_eval '$MV "$output_obj" "$obj"' \
+ 'error=$?; $opt_dry_run || $RM $removelist; exit $error'
+ fi
+ fi
+
+ $opt_dry_run || {
+ func_write_libtool_object "$libobj" "$objdir/$objname" "$objname"
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ removelist=$lockfile
+ $RM "$lockfile"
+ fi
+ }
+
+ exit $EXIT_SUCCESS
+}
+
+$opt_help || {
+test "$mode" = compile && func_mode_compile ${1+"$@"}
+}
+
+func_mode_help ()
+{
+ # We need to display help for each of the modes.
+ case $mode in
+ "")
+ # Generic help is extracted from the usage comments
+ # at the start of this file.
+ func_help
+ ;;
+
+ clean)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ compile)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -no-suppress do not suppress compiler output for multiple passes
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -shared do not build a \`.o' file suitable for static linking
+ -static only build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+ execute)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+ finish)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+ install)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The following components of INSTALL-COMMAND are treated specially:
+
+ -inst-prefix PREFIX-DIR Use PREFIX-DIR as a staging area for installation
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+ link)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -precious-files-regex REGEX
+ don't remove output files matching REGEX
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -shared only do dynamic linking of libtool libraries
+ -shrext SUFFIX override the standard shared library file extension
+ -static do not do any dynamic linking of uninstalled libtool libraries
+ -static-libtool-libs
+ do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+ -weak LIBNAME declare that the target provides the LIBNAME interface
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+ uninstall)
+ $ECHO \
+"Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+ *)
+ func_fatal_help "invalid operation mode \`$mode'"
+ ;;
+ esac
+
+ $ECHO
+ $ECHO "Try \`$progname --help' for more information about other modes."
+
+ exit $?
+}
+
+ # Now that we've collected a possible --mode arg, show help if necessary
+ $opt_help && func_mode_help
+
+
+# func_mode_execute arg...
+func_mode_execute ()
+{
+ $opt_debug
+ # The first argument is the command name.
+ cmd="$nonopt"
+ test -z "$cmd" && \
+ func_fatal_help "you must specify a COMMAND"
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ test -f "$file" \
+ || func_fatal_help "\`$file' is not a file"
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$lib' is not a valid libtool archive"
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+ func_source "$file"
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && \
+ func_warning "\`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ if test ! -f "$dir/$dlname"; then
+ func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'"
+ fi
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ ;;
+
+ *)
+ func_warning "\`-dlopen' is ignored for non-libtool libraries and objects"
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if func_ltwrapper_script_p "$file"; then
+ func_source "$file"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ elif func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ func_source "$func_ltwrapper_scriptname_result"
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ func_quote_for_eval "$file"
+ args="$args $func_quote_for_eval_result"
+ done
+
+ if test "X$opt_dry_run" = Xfalse; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved environment variables
+ for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES
+ do
+ eval "if test \"\${save_$lt_var+set}\" = set; then
+ $lt_var=\$save_$lt_var; export $lt_var
+ else
+ $lt_unset $lt_var
+ fi"
+ done
+
+ # Now prepare to actually exec the command.
+ exec_cmd="\$cmd$args"
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\""
+ $ECHO "export $shlibpath_var"
+ fi
+ $ECHO "$cmd$args"
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = execute && func_mode_execute ${1+"$@"}
+
+
+# func_mode_finish arg...
+func_mode_finish ()
+{
+ $opt_debug
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ func_execute_cmds "$finish_cmds" 'admincmds="$admincmds
+'"$cmd"'"'
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $opt_dry_run || eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ $opt_silent && exit $EXIT_SUCCESS
+
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ $ECHO "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ $ECHO " $libdir"
+ done
+ $ECHO
+ $ECHO "If you ever happen to want to link against installed libraries"
+ $ECHO "in a given directory, LIBDIR, you must either use libtool, and"
+ $ECHO "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ $ECHO "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ $ECHO " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ $ECHO " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ $ECHO " - add LIBDIR to the \`$runpath_var' environment variable"
+ $ECHO " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ $ECHO " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ $ECHO " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ $ECHO " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ $ECHO
+
+ $ECHO "See any operating system documentation about shared libraries for"
+ case $host in
+ solaris2.[6789]|solaris2.1[0-9])
+ $ECHO "more information, such as the ld(1), crle(1) and ld.so(8) manual"
+ $ECHO "pages."
+ ;;
+ *)
+ $ECHO "more information, such as the ld(1) and ld.so(8) manual pages."
+ ;;
+ esac
+ $ECHO "X----------------------------------------------------------------------" | $Xsed
+ exit $EXIT_SUCCESS
+}
+
+test "$mode" = finish && func_mode_finish ${1+"$@"}
+
+
+# func_mode_install arg...
+func_mode_install ()
+{
+ $opt_debug
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $ECHO "X$nonopt" | $GREP shtool >/dev/null; then
+ # Aesthetically quote it.
+ func_quote_for_eval "$nonopt"
+ install_prog="$func_quote_for_eval_result "
+ arg=$1
+ shift
+ else
+ install_prog=
+ arg=$nonopt
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog$func_quote_for_eval_result"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest=$arg
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f)
+ case " $install_prog " in
+ *[\\\ /]cp\ *) ;;
+ *) prev=$arg ;;
+ esac
+ ;;
+ -g | -m | -o)
+ prev=$arg
+ ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*)
+ ;;
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest=$arg
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ func_quote_for_eval "$arg"
+ install_prog="$install_prog $func_quote_for_eval_result"
+ done
+
+ test -z "$install_prog" && \
+ func_fatal_help "you must specify an install program"
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prev' option requires an argument"
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ func_fatal_help "no file or destination specified"
+ else
+ func_fatal_help "you must specify a destination"
+ fi
+ fi
+
+ # Strip any trailing slash from the destination.
+ func_stripname '' '/' "$dest"
+ dest=$func_stripname_result
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ func_dirname_and_basename "$dest" "" "."
+ destdir="$func_dirname_result"
+ destname="$func_basename_result"
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files; shift
+ test "$#" -gt 1 && \
+ func_fatal_help "\`$dest' is not a directory"
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ func_fatal_help "\`$destdir' must be an absolute directory name"
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$file" \
+ || func_fatal_help "\`$file' is not a valid libtool archive"
+
+ library_names=
+ old_library=
+ relink_command=
+ func_source "$file"
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ func_dirname "$file" "/" ""
+ dir="$func_dirname_result"
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ # Determine the prefix the user has applied to our future dir.
+ inst_prefix_dir=`$ECHO "X$destdir" | $Xsed -e "s%$libdir\$%%"`
+
+ # Don't allow the user to place us outside of our expected
+ # location b/c this prevents finding dependent libraries that
+ # are installed to the same prefix.
+ # At present, this check doesn't affect windows .dll's that
+ # are installed into $libdir/../bin (currently, that works fine)
+ # but it's something to keep an eye on.
+ test "$inst_prefix_dir" = "$destdir" && \
+ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir"
+
+ if test -n "$inst_prefix_dir"; then
+ # Stick the inst_prefix_dir data into the link command.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"`
+ else
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "s%@inst_prefix_dir@%%"`
+ fi
+
+ func_warning "relinking \`$file'"
+ func_show_eval "$relink_command" \
+ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"'
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names; shift
+ if test -n "$1"; then
+ realname="$1"
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ func_show_eval "$install_prog $dir/$srcname $destdir/$realname" \
+ 'exit $?'
+ tstripme="$stripme"
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ case $realname in
+ *.dll.a)
+ tstripme=""
+ ;;
+ esac
+ ;;
+ esac
+ if test -n "$tstripme" && test -n "$striplib"; then
+ func_show_eval "$striplib $destdir/$realname" 'exit $?'
+ fi
+
+ if test "$#" -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ # Try `ln -sf' first, because the `ln' binary might depend on
+ # the symlink we replace! Solaris /bin/ln does not understand -f,
+ # so we also need to try rm && ln -s.
+ for linkname
+ do
+ test "$linkname" != "$realname" \
+ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })"
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ func_execute_cmds "$postinstall_cmds" 'exit $?'
+ fi
+
+ # Install the pseudo-library for information purposes.
+ func_basename "$file"
+ name="$func_basename_result"
+ instname="$dir/$name"i
+ func_show_eval "$install_prog $instname $destdir/$name" 'exit $?'
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ func_lo2o "$destfile"
+ staticdest=$func_lo2o_result
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ func_fatal_help "cannot copy a libtool object to \`$destfile'"
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ test -n "$destfile" && \
+ func_show_eval "$install_prog $file $destfile" 'exit $?'
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ func_lo2o "$file"
+ staticobj=$func_lo2o_result
+ func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?'
+ fi
+ exit $EXIT_SUCCESS
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ func_basename "$file"
+ destfile="$func_basename_result"
+ destfile="$destdir/$destfile"
+ fi
+
+ # If the file is missing, and there is a .exe on the end, strip it
+ # because it is most likely a libtool script we actually want to
+ # install
+ stripped_ext=""
+ case $file in
+ *.exe)
+ if test ! -f "$file"; then
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ stripped_ext=".exe"
+ fi
+ ;;
+ esac
+
+ # Do a test to see if this is really a libtool program.
+ case $host in
+ *cygwin* | *mingw*)
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ wrapper=$func_ltwrapper_scriptname_result
+ else
+ func_stripname '' '.exe' "$file"
+ wrapper=$func_stripname_result
+ fi
+ ;;
+ *)
+ wrapper=$file
+ ;;
+ esac
+ if func_ltwrapper_script_p "$wrapper"; then
+ notinst_deplibs=
+ relink_command=
+
+ func_source "$wrapper"
+
+ # Check the variables that should have been set.
+ test -z "$generated_by_libtool_version" && \
+ func_fatal_error "invalid libtool wrapper script \`$wrapper'"
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ func_source "$lib"
+ fi
+ libfile="$libdir/"`$ECHO "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ func_warning "\`$lib' has not been installed in \`$libdir'"
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ func_source "$wrapper"
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ $opt_dry_run || {
+ if test "$finalize" = yes; then
+ tmpdir=`func_mktempdir`
+ func_basename "$file$stripped_ext"
+ file="$func_basename_result"
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $opt_silent || {
+ func_quote_for_expand "$relink_command"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ if eval "$relink_command"; then :
+ else
+ func_error "error: relink \`$file' with the above command before installing it"
+ $opt_dry_run || ${RM}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ func_warning "cannot relink \`$file'"
+ fi
+ }
+ else
+ # Install the binary that we compiled earlier.
+ file=`$ECHO "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyway
+ case $install_prog,$host in
+ */usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ func_stripname '' '.exe' "$destfile"
+ destfile=$func_stripname_result
+ ;;
+ esac
+ ;;
+ esac
+ func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?'
+ $opt_dry_run || if test -n "$outputname"; then
+ ${RM}r "$tmpdir"
+ fi
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ func_basename "$file"
+ name="$func_basename_result"
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ func_show_eval "$install_prog \$file \$oldlib" 'exit $?'
+
+ if test -n "$stripme" && test -n "$old_striplib"; then
+ func_show_eval "$old_striplib $oldlib" 'exit $?'
+ fi
+
+ # Do each command in the postinstall commands.
+ func_execute_cmds "$old_postinstall_cmds" 'exit $?'
+ done
+
+ test -n "$future_libdirs" && \
+ func_warning "remember to run \`$progname --finish$future_libdirs'"
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ $opt_dry_run && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs'
+ else
+ exit $EXIT_SUCCESS
+ fi
+}
+
+test "$mode" = install && func_mode_install ${1+"$@"}
+
+
+# func_generate_dlsyms outputname originator pic_p
+# Extract symbols from dlprefiles and create ${outputname}S.o with
+# a dlpreopen symbol table.
+func_generate_dlsyms ()
+{
+ $opt_debug
+ my_outputname="$1"
+ my_originator="$2"
+ my_pic_p="${3-no}"
+ my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'`
+ my_dlsyms=
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ my_dlsyms="${my_outputname}S.c"
+ else
+ func_error "not configured to extract global symbols from dlpreopened files"
+ fi
+ fi
+
+ if test -n "$my_dlsyms"; then
+ case $my_dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${my_outputname}.nm"
+
+ func_show_eval "$RM $nlist ${nlist}S ${nlist}T"
+
+ # Parse the name list into a source file.
+ func_verbose "creating $output_objdir/$my_dlsyms"
+
+ $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\
+/* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */
+/* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ func_verbose "generating symbol list for \`$output'"
+
+ $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$ECHO "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for progfile in $progfiles; do
+ func_verbose "extracting global C symbols from \`$progfile'"
+ $opt_dry_run || eval "$NM $progfile | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $opt_dry_run || {
+ eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $opt_dry_run || {
+ eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ }
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$outputname.exp"
+ $opt_dry_run || {
+ $RM $export_symbols
+ eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ else
+ $opt_dry_run || {
+ eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"'
+ eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T'
+ eval '$MV "$nlist"T "$nlist"'
+ case $host in
+ *cygwin | *mingw* | *cegcc* )
+ eval "echo EXPORTS "'> "$output_objdir/$outputname.def"'
+ eval 'cat "$nlist" >> "$output_objdir/$outputname.def"'
+ ;;
+ esac
+ }
+ fi
+ fi
+
+ for dlprefile in $dlprefiles; do
+ func_verbose "extracting global C symbols from \`$dlprefile'"
+ func_basename "$dlprefile"
+ name="$func_basename_result"
+ $opt_dry_run || {
+ eval '$ECHO ": $name " >> "$nlist"'
+ eval "$NM $dlprefile 2>/dev/null | $global_symbol_pipe >> '$nlist'"
+ }
+ done
+
+ $opt_dry_run || {
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $MV "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if $GREP -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
+ :
+ else
+ $GREP -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"'
+ else
+ $ECHO '/* NONE */' >> "$output_objdir/$my_dlsyms"
+ fi
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+
+/* The mapping between symbol names and symbols. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+/* DATA imports from DLLs on WIN32 con't be const, because
+ runtime relocations are performed -- see ld's documentation
+ on pseudo-relocs. */"
+ lt_dlsym_const= ;;
+ *osf5*)
+ echo >> "$output_objdir/$my_dlsyms" "\
+/* This system does not cope well with relocations in const data */"
+ lt_dlsym_const= ;;
+ *)
+ lt_dlsym_const=const ;;
+ esac
+
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+extern $lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[];
+$lt_dlsym_const lt_dlsymlist
+lt_${my_prefix}_LTX_preloaded_symbols[] =
+{\
+ { \"$my_originator\", (void *) 0 },"
+
+ case $need_lib_prefix in
+ no)
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ *)
+ eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms"
+ ;;
+ esac
+ $ECHO >> "$output_objdir/$my_dlsyms" "\
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_${my_prefix}_LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ } # !$opt_dry_run
+
+ pic_flag_for_symtable=
+ case "$compile_command " in
+ *" -static "*) ;;
+ *)
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;;
+ *-*-hpux*)
+ pic_flag_for_symtable=" $pic_flag" ;;
+ *)
+ if test "X$my_pic_p" != Xno; then
+ pic_flag_for_symtable=" $pic_flag"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ symtab_cflags=
+ for arg in $LTCFLAGS; do
+ case $arg in
+ -pie | -fpie | -fPIE) ;;
+ *) symtab_cflags="$symtab_cflags $arg" ;;
+ esac
+ done
+
+ # Now compile the dynamic symbol file.
+ func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?'
+
+ # Clean up the generated files.
+ func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"'
+
+ # Transform the symbol file into the correct name.
+ symfileobj="$output_objdir/${my_outputname}S.$objext"
+ case $host in
+ *cygwin* | *mingw* | *cegcc* )
+ if test -f "$output_objdir/$my_outputname.def"; then
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"`
+ else
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ fi
+ ;;
+ *)
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$symfileobj%"`
+ ;;
+ esac
+ ;;
+ *)
+ func_fatal_error "unknown suffix for \`$my_dlsyms'"
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$ECHO "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+}
+
+# func_win32_libid arg
+# return the library type of file 'arg'
+#
+# Need a lot of goo to handle *both* DLLs and import libs
+# Has to be a shell function in order to 'eat' the argument
+# that is supplied when $file_magic_command is called.
+func_win32_libid ()
+{
+ $opt_debug
+ win32_libid_type="unknown"
+ win32_fileres=`file -L $1 2>/dev/null`
+ case $win32_fileres in
+ *ar\ archive\ import\ library*) # definitely import
+ win32_libid_type="x86 archive import"
+ ;;
+ *ar\ archive*) # could be an import, or static
+ if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null |
+ $EGREP 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then
+ win32_nmres=`eval $NM -f posix -A $1 |
+ $SED -n -e '
+ 1,100{
+ / I /{
+ s,.*,import,
+ p
+ q
+ }
+ }'`
+ case $win32_nmres in
+ import*) win32_libid_type="x86 archive import";;
+ *) win32_libid_type="x86 archive static";;
+ esac
+ fi
+ ;;
+ *DLL*)
+ win32_libid_type="x86 DLL"
+ ;;
+ *executable*) # but shell scripts are "executable" too...
+ case $win32_fileres in
+ *MS\ Windows\ PE\ Intel*)
+ win32_libid_type="x86 DLL"
+ ;;
+ esac
+ ;;
+ esac
+ $ECHO "$win32_libid_type"
+}
+
+
+
+# func_extract_an_archive dir oldlib
+func_extract_an_archive ()
+{
+ $opt_debug
+ f_ex_an_ar_dir="$1"; shift
+ f_ex_an_ar_oldlib="$1"
+ func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" 'exit $?'
+ if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib"
+ fi
+}
+
+
+# func_extract_archives gentop oldlib ...
+func_extract_archives ()
+{
+ $opt_debug
+ my_gentop="$1"; shift
+ my_oldlibs=${1+"$@"}
+ my_oldobjs=""
+ my_xlib=""
+ my_xabs=""
+ my_xdir=""
+
+ for my_xlib in $my_oldlibs; do
+ # Extract the objects.
+ case $my_xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;;
+ *) my_xabs=`pwd`"/$my_xlib" ;;
+ esac
+ func_basename "$my_xlib"
+ my_xlib="$func_basename_result"
+ my_xlib_u=$my_xlib
+ while :; do
+ case " $extracted_archives " in
+ *" $my_xlib_u "*)
+ func_arith $extracted_serial + 1
+ extracted_serial=$func_arith_result
+ my_xlib_u=lt$extracted_serial-$my_xlib ;;
+ *) break ;;
+ esac
+ done
+ extracted_archives="$extracted_archives $my_xlib_u"
+ my_xdir="$my_gentop/$my_xlib_u"
+
+ func_mkdir_p "$my_xdir"
+
+ case $host in
+ *-darwin*)
+ func_verbose "Extracting $my_xabs"
+ # Do not bother doing anything if just a dry run
+ $opt_dry_run || {
+ darwin_orig_dir=`pwd`
+ cd $my_xdir || exit $?
+ darwin_archive=$my_xabs
+ darwin_curdir=`pwd`
+ darwin_base_archive=`basename "$darwin_archive"`
+ darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true`
+ if test -n "$darwin_arches"; then
+ darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'`
+ darwin_arch=
+ func_verbose "$darwin_base_archive has multiple architectures $darwin_arches"
+ for darwin_arch in $darwin_arches ; do
+ func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}"
+ cd "unfat-$$/${darwin_base_archive}-${darwin_arch}"
+ func_extract_an_archive "`pwd`" "${darwin_base_archive}"
+ cd "$darwin_curdir"
+ $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}"
+ done # $darwin_arches
+ ## Okay now we've a bunch of thin objects, gotta fatten them up :)
+ darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u`
+ darwin_file=
+ darwin_files=
+ for darwin_file in $darwin_filelist; do
+ darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP`
+ $LIPO -create -output "$darwin_file" $darwin_files
+ done # $darwin_filelist
+ $RM -rf unfat-$$
+ cd "$darwin_orig_dir"
+ else
+ cd $darwin_orig_dir
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ fi # $darwin_arches
+ } # !$opt_dry_run
+ ;;
+ *)
+ func_extract_an_archive "$my_xdir" "$my_xabs"
+ ;;
+ esac
+ my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP`
+ done
+
+ func_extract_archives_result="$my_oldobjs"
+}
+
+
+
+# func_emit_wrapper_part1 [arg=no]
+#
+# Emit the first part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part1 ()
+{
+ func_emit_wrapper_part1_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part1_arg1=$1
+ fi
+
+ $ECHO "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='${SED} -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# Be Bourne compatible
+if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac
+fi
+BIN_SH=xpg4; export BIN_SH # for Tru64
+DUALCASE=1; export DUALCASE # for MKS sh
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variables:
+ generated_by_libtool_version='$macro_version'
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$ECHO are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ ECHO=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`{ \$ECHO '\t'; } 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$ECHO works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$ECHO will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $ECHO "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$ECHO \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$ECHO \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\`
+ done
+"
+}
+# end: func_emit_wrapper_part1
+
+# func_emit_wrapper_part2 [arg=no]
+#
+# Emit the second part of a libtool wrapper script on stdout.
+# For more information, see the description associated with
+# func_emit_wrapper(), below.
+func_emit_wrapper_part2 ()
+{
+ func_emit_wrapper_part2_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_part2_arg1=$1
+ fi
+
+ $ECHO "\
+
+ # Usually 'no', except on cygwin/mingw when embedded into
+ # the cwrapper.
+ WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_part2_arg1
+ if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then
+ # special case for '.'
+ if test \"\$thisdir\" = \".\"; then
+ thisdir=\`pwd\`
+ fi
+ # remove .libs from thisdir
+ case \"\$thisdir\" in
+ *[\\\\/]$objdir ) thisdir=\`\$ECHO \"X\$thisdir\" | \$Xsed -e 's%[\\\\/][^\\\\/]*$%%'\` ;;
+ $objdir ) thisdir=. ;;
+ esac
+ fi
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ $ECHO "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" ||
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $MKDIR \"\$progdir\"
+ else
+ $RM \"\$progdir/\$file\"
+ fi"
+
+ $ECHO "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $ECHO \"\$relink_command_output\" >&2
+ $RM \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $RM \"\$progdir/\$program\";
+ $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $RM \"\$progdir/\$file\"
+ fi"
+ else
+ $ECHO "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ $ECHO "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $ECHO "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$ECHO \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $ECHO "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $ECHO "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2* | *-cegcc*)
+ $ECHO "\
+ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $ECHO "\
+ exec \"\$progdir/\$program\" \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $ECHO "\
+ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2
+ \$ECHO \"This script is just a wrapper for \$program.\" 1>&2
+ $ECHO \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+}
+# end: func_emit_wrapper_part2
+
+
+# func_emit_wrapper [arg=no]
+#
+# Emit a libtool wrapper script on stdout.
+# Don't directly open a file because we may want to
+# incorporate the script contents within a cygwin/mingw
+# wrapper executable. Must ONLY be called from within
+# func_mode_link because it depends on a number of variables
+# set therein.
+#
+# ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR
+# variable will take. If 'yes', then the emitted script
+# will assume that the directory in which it is stored is
+# the $objdir directory. This is a cygwin/mingw-specific
+# behavior.
+func_emit_wrapper ()
+{
+ func_emit_wrapper_arg1=no
+ if test -n "$1" ; then
+ func_emit_wrapper_arg1=$1
+ fi
+
+ # split this up so that func_emit_cwrapperexe_src
+ # can call each part independently.
+ func_emit_wrapper_part1 "${func_emit_wrapper_arg1}"
+ func_emit_wrapper_part2 "${func_emit_wrapper_arg1}"
+}
+
+
+# func_to_host_path arg
+#
+# Convert paths to host format when used with build tools.
+# Intended for use with "native" mingw (where libtool itself
+# is running under the msys shell), or in the following cross-
+# build environments:
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+# where wine is equipped with the `winepath' executable.
+# In the native mingw case, the (msys) shell automatically
+# converts paths for any non-msys applications it launches,
+# but that facility isn't available from inside the cwrapper.
+# Similar accommodations are necessary for $host mingw and
+# $build cygwin. Calling this function does no harm for other
+# $host/$build combinations not listed above.
+#
+# ARG is the path (on $build) that should be converted to
+# the proper representation for $host. The result is stored
+# in $func_to_host_path_result.
+func_to_host_path ()
+{
+ func_to_host_path_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ case $build in
+ *mingw* ) # actually, msys
+ # awkward: cmd appends spaces to result
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_path_tmp1=`( cmd //c echo "$1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_path_tmp1=`cygpath -w "$1"`
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # Unfortunately, winepath does not exit with a non-zero
+ # error code, so we are forced to check the contents of
+ # stdout. On the other hand, if the command is not
+ # found, the shell will set an exit code of 127 and print
+ # *an error message* to stdout. So we must check for both
+ # error code of zero AND non-empty stdout, which explains
+ # the odd construction:
+ func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
+ if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
+ func_to_host_path_result=`echo "$func_to_host_path_tmp1" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ else
+ # Allow warning below.
+ func_to_host_path_result=""
+ fi
+ ;;
+ esac
+ if test -z "$func_to_host_path_result" ; then
+ func_error "Could not determine host path corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback:
+ func_to_host_path_result="$1"
+ fi
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_path
+
+# func_to_host_pathlist arg
+#
+# Convert pathlists to host format when used with build tools.
+# See func_to_host_path(), above. This function supports the
+# following $build/$host combinations (but does no harm for
+# combinations not listed here):
+# $build $host
+# mingw (msys) mingw [e.g. native]
+# cygwin mingw
+# *nix + wine mingw
+#
+# Path separators are also converted from $build format to
+# $host format. If ARG begins or ends with a path separator
+# character, it is preserved (but converted to $host format)
+# on output.
+#
+# ARG is a pathlist (on $build) that should be converted to
+# the proper representation on $host. The result is stored
+# in $func_to_host_pathlist_result.
+func_to_host_pathlist ()
+{
+ func_to_host_pathlist_result="$1"
+ if test -n "$1" ; then
+ case $host in
+ *mingw* )
+ lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g'
+ # Remove leading and trailing path separator characters from
+ # ARG. msys behavior is inconsistent here, cygpath turns them
+ # into '.;' and ';.', and winepath ignores them completely.
+ func_to_host_pathlist_tmp2="$1"
+ # Once set for this call, this variable should not be
+ # reassigned. It is used in tha fallback case.
+ func_to_host_pathlist_tmp1=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e 's|^:*||' -e 's|:*$||'`
+ case $build in
+ *mingw* ) # Actually, msys.
+ # Awkward: cmd appends spaces to result.
+ lt_sed_strip_trailing_spaces="s/[ ]*\$//"
+ func_to_host_pathlist_tmp2=`( cmd //c echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_sed_strip_trailing_spaces" ) 2>/dev/null || echo ""`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ *cygwin* )
+ func_to_host_pathlist_tmp2=`cygpath -w -p "$func_to_host_pathlist_tmp1"`
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp2" |\
+ $SED -e "$lt_sed_naive_backslashify"`
+ ;;
+ * )
+ # unfortunately, winepath doesn't convert pathlists
+ func_to_host_pathlist_result=""
+ func_to_host_pathlist_oldIFS=$IFS
+ IFS=:
+ for func_to_host_pathlist_f in $func_to_host_pathlist_tmp1 ; do
+ IFS=$func_to_host_pathlist_oldIFS
+ if test -n "$func_to_host_pathlist_f" ; then
+ func_to_host_path "$func_to_host_pathlist_f"
+ if test -n "$func_to_host_path_result" ; then
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_to_host_pathlist_result="$func_to_host_path_result"
+ else
+ func_to_host_pathlist_result="$func_to_host_pathlist_result;$func_to_host_path_result"
+ fi
+ fi
+ fi
+ IFS=:
+ done
+ IFS=$func_to_host_pathlist_oldIFS
+ ;;
+ esac
+ if test -z "$func_to_host_pathlist_result" ; then
+ func_error "Could not determine the host path(s) corresponding to"
+ func_error " '$1'"
+ func_error "Continuing, but uninstalled executables may not work."
+ # Fallback. This may break if $1 contains DOS-style drive
+ # specifications. The fix is not to complicate the expression
+ # below, but for the user to provide a working wine installation
+ # with winepath so that path translation in the cross-to-mingw
+ # case works properly.
+ lt_replace_pathsep_nix_to_dos="s|:|;|g"
+ func_to_host_pathlist_result=`echo "$func_to_host_pathlist_tmp1" |\
+ $SED -e "$lt_replace_pathsep_nix_to_dos"`
+ fi
+ # Now, add the leading and trailing path separators back
+ case "$1" in
+ :* ) func_to_host_pathlist_result=";$func_to_host_pathlist_result"
+ ;;
+ esac
+ case "$1" in
+ *: ) func_to_host_pathlist_result="$func_to_host_pathlist_result;"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+}
+# end: func_to_host_pathlist
+
+# func_emit_cwrapperexe_src
+# emit the source code for a wrapper executable on stdout
+# Must ONLY be called from within func_mode_link because
+# it depends on a number of variable set therein.
+func_emit_cwrapperexe_src ()
+{
+ cat <<EOF
+
+/* $cwrappersource - temporary wrapper executable for $objdir/$outputname
+ Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+
+ The $output program cannot be directly executed until all the libtool
+ libraries that it depends on are installed.
+
+ This wrapper executable should never be moved out of the build directory.
+ If it is, it will not operate correctly.
+
+ Currently, it simply execs the wrapper *script* "$SHELL $output",
+ but could eventually absorb all of the scripts functionality and
+ exec $objdir/$outputname directly.
+*/
+EOF
+ cat <<"EOF"
+#include <stdio.h>
+#include <stdlib.h>
+#ifdef _MSC_VER
+# include <direct.h>
+# include <process.h>
+# include <io.h>
+# define setmode _setmode
+#else
+# include <unistd.h>
+# include <stdint.h>
+# ifdef __CYGWIN__
+# include <io.h>
+# define HAVE_SETENV
+# ifdef __STRICT_ANSI__
+char *realpath (const char *, char *);
+int putenv (char *);
+int setenv (const char *, const char *, int);
+# endif
+# endif
+#endif
+#include <malloc.h>
+#include <stdarg.h>
+#include <assert.h>
+#include <string.h>
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <sys/stat.h>
+
+#if defined(PATH_MAX)
+# define LT_PATHMAX PATH_MAX
+#elif defined(MAXPATHLEN)
+# define LT_PATHMAX MAXPATHLEN
+#else
+# define LT_PATHMAX 1024
+#endif
+
+#ifndef S_IXOTH
+# define S_IXOTH 0
+#endif
+#ifndef S_IXGRP
+# define S_IXGRP 0
+#endif
+
+#ifdef _MSC_VER
+# define S_IXUSR _S_IEXEC
+# define stat _stat
+# ifndef _INTPTR_T_DEFINED
+# define intptr_t int
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR
+# define DIR_SEPARATOR '/'
+# define PATH_SEPARATOR ':'
+#endif
+
+#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \
+ defined (__OS2__)
+# define HAVE_DOS_BASED_FILE_SYSTEM
+# define FOPEN_WB "wb"
+# ifndef DIR_SEPARATOR_2
+# define DIR_SEPARATOR_2 '\\'
+# endif
+# ifndef PATH_SEPARATOR_2
+# define PATH_SEPARATOR_2 ';'
+# endif
+#endif
+
+#ifndef DIR_SEPARATOR_2
+# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR)
+#else /* DIR_SEPARATOR_2 */
+# define IS_DIR_SEPARATOR(ch) \
+ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2))
+#endif /* DIR_SEPARATOR_2 */
+
+#ifndef PATH_SEPARATOR_2
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR)
+#else /* PATH_SEPARATOR_2 */
+# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2)
+#endif /* PATH_SEPARATOR_2 */
+
+#ifdef __CYGWIN__
+# define FOPEN_WB "wb"
+#endif
+
+#ifndef FOPEN_WB
+# define FOPEN_WB "w"
+#endif
+#ifndef _O_BINARY
+# define _O_BINARY 0
+#endif
+
+#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type)))
+#define XFREE(stale) do { \
+ if (stale) { free ((void *) stale); stale = 0; } \
+} while (0)
+
+#undef LTWRAPPER_DEBUGPRINTF
+#if defined DEBUGWRAPPER
+# define LTWRAPPER_DEBUGPRINTF(args) ltwrapper_debugprintf args
+static void
+ltwrapper_debugprintf (const char *fmt, ...)
+{
+ va_list args;
+ va_start (args, fmt);
+ (void) vfprintf (stderr, fmt, args);
+ va_end (args);
+}
+#else
+# define LTWRAPPER_DEBUGPRINTF(args)
+#endif
+
+const char *program_name = NULL;
+
+void *xmalloc (size_t num);
+char *xstrdup (const char *string);
+const char *base_name (const char *name);
+char *find_executable (const char *wrapper);
+char *chase_symlinks (const char *pathspec);
+int make_executable (const char *path);
+int check_executable (const char *path);
+char *strendzap (char *str, const char *pat);
+void lt_fatal (const char *message, ...);
+void lt_setenv (const char *name, const char *value);
+char *lt_extend_str (const char *orig_value, const char *add, int to_end);
+void lt_opt_process_env_set (const char *arg);
+void lt_opt_process_env_prepend (const char *arg);
+void lt_opt_process_env_append (const char *arg);
+int lt_split_name_value (const char *arg, char** name, char** value);
+void lt_update_exe_path (const char *name, const char *value);
+void lt_update_lib_path (const char *name, const char *value);
+
+static const char *script_text_part1 =
+EOF
+
+ func_emit_wrapper_part1 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+ cat <<EOF
+
+static const char *script_text_part2 =
+EOF
+ func_emit_wrapper_part2 yes |
+ $SED -e 's/\([\\"]\)/\\\1/g' \
+ -e 's/^/ "/' -e 's/$/\\n"/'
+ echo ";"
+
+ cat <<EOF
+const char * MAGIC_EXE = "$magic_exe";
+const char * LIB_PATH_VARNAME = "$shlibpath_var";
+EOF
+
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ func_to_host_pathlist "$temp_rpath"
+ cat <<EOF
+const char * LIB_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * LIB_PATH_VALUE = "";
+EOF
+ fi
+
+ if test -n "$dllsearchpath"; then
+ func_to_host_pathlist "$dllsearchpath:"
+ cat <<EOF
+const char * EXE_PATH_VARNAME = "PATH";
+const char * EXE_PATH_VALUE = "$func_to_host_pathlist_result";
+EOF
+ else
+ cat <<"EOF"
+const char * EXE_PATH_VARNAME = "";
+const char * EXE_PATH_VALUE = "";
+EOF
+ fi
+
+ if test "$fast_install" = yes; then
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "lt-$outputname"; /* hopefully, no .exe */
+EOF
+ else
+ cat <<EOF
+const char * TARGET_PROGRAM_NAME = "$outputname"; /* hopefully, no .exe */
+EOF
+ fi
+
+
+ cat <<"EOF"
+
+#define LTWRAPPER_OPTION_PREFIX "--lt-"
+#define LTWRAPPER_OPTION_PREFIX_LENGTH 5
+
+static const size_t opt_prefix_len = LTWRAPPER_OPTION_PREFIX_LENGTH;
+static const char *ltwrapper_option_prefix = LTWRAPPER_OPTION_PREFIX;
+
+static const char *dumpscript_opt = LTWRAPPER_OPTION_PREFIX "dump-script";
+
+static const size_t env_set_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 7;
+static const char *env_set_opt = LTWRAPPER_OPTION_PREFIX "env-set";
+ /* argument is putenv-style "foo=bar", value of foo is set to bar */
+
+static const size_t env_prepend_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 11;
+static const char *env_prepend_opt = LTWRAPPER_OPTION_PREFIX "env-prepend";
+ /* argument is putenv-style "foo=bar", new value of foo is bar${foo} */
+
+static const size_t env_append_opt_len = LTWRAPPER_OPTION_PREFIX_LENGTH + 10;
+static const char *env_append_opt = LTWRAPPER_OPTION_PREFIX "env-append";
+ /* argument is putenv-style "foo=bar", new value of foo is ${foo}bar */
+
+int
+main (int argc, char *argv[])
+{
+ char **newargz;
+ int newargc;
+ char *tmp_pathspec;
+ char *actual_cwrapper_path;
+ char *actual_cwrapper_name;
+ char *target_name;
+ char *lt_argv_zero;
+ intptr_t rval = 127;
+
+ int i;
+
+ program_name = (char *) xstrdup (base_name (argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) argv[0] : %s\n", argv[0]));
+ LTWRAPPER_DEBUGPRINTF (("(main) program_name : %s\n", program_name));
+
+ /* very simple arg parsing; don't want to rely on getopt */
+ for (i = 1; i < argc; i++)
+ {
+ if (strcmp (argv[i], dumpscript_opt) == 0)
+ {
+EOF
+ case "$host" in
+ *mingw* | *cygwin* )
+ # make stdout use "unix" line endings
+ echo " setmode(1,_O_BINARY);"
+ ;;
+ esac
+
+ cat <<"EOF"
+ printf ("%s", script_text_part1);
+ printf ("%s", script_text_part2);
+ return 0;
+ }
+ }
+
+ newargz = XMALLOC (char *, argc + 1);
+ tmp_pathspec = find_executable (argv[0]);
+ if (tmp_pathspec == NULL)
+ lt_fatal ("Couldn't find %s", argv[0]);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (before symlink chase) at : %s\n",
+ tmp_pathspec));
+
+ actual_cwrapper_path = chase_symlinks (tmp_pathspec);
+ LTWRAPPER_DEBUGPRINTF (("(main) found exe (after symlink chase) at : %s\n",
+ actual_cwrapper_path));
+ XFREE (tmp_pathspec);
+
+ actual_cwrapper_name = xstrdup( base_name (actual_cwrapper_path));
+ strendzap (actual_cwrapper_path, actual_cwrapper_name);
+
+ /* wrapper name transforms */
+ strendzap (actual_cwrapper_name, ".exe");
+ tmp_pathspec = lt_extend_str (actual_cwrapper_name, ".exe", 1);
+ XFREE (actual_cwrapper_name);
+ actual_cwrapper_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ /* target_name transforms -- use actual target program name; might have lt- prefix */
+ target_name = xstrdup (base_name (TARGET_PROGRAM_NAME));
+ strendzap (target_name, ".exe");
+ tmp_pathspec = lt_extend_str (target_name, ".exe", 1);
+ XFREE (target_name);
+ target_name = tmp_pathspec;
+ tmp_pathspec = 0;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) libtool target name: %s\n",
+ target_name));
+EOF
+
+ cat <<EOF
+ newargz[0] =
+ XMALLOC (char, (strlen (actual_cwrapper_path) +
+ strlen ("$objdir") + 1 + strlen (actual_cwrapper_name) + 1));
+ strcpy (newargz[0], actual_cwrapper_path);
+ strcat (newargz[0], "$objdir");
+ strcat (newargz[0], "/");
+EOF
+
+ cat <<"EOF"
+ /* stop here, and copy so we don't have to do this twice */
+ tmp_pathspec = xstrdup (newargz[0]);
+
+ /* do NOT want the lt- prefix here, so use actual_cwrapper_name */
+ strcat (newargz[0], actual_cwrapper_name);
+
+ /* DO want the lt- prefix here if it exists, so use target_name */
+ lt_argv_zero = lt_extend_str (tmp_pathspec, target_name, 1);
+ XFREE (tmp_pathspec);
+ tmp_pathspec = NULL;
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ {
+ char* p;
+ while ((p = strchr (newargz[0], '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ while ((p = strchr (lt_argv_zero, '\\')) != NULL)
+ {
+ *p = '/';
+ }
+ }
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+ XFREE (target_name);
+ XFREE (actual_cwrapper_path);
+ XFREE (actual_cwrapper_name);
+
+ lt_setenv ("BIN_SH", "xpg4"); /* for Tru64 */
+ lt_setenv ("DUALCASE", "1"); /* for MSK sh */
+ lt_update_lib_path (LIB_PATH_VARNAME, LIB_PATH_VALUE);
+ lt_update_exe_path (EXE_PATH_VARNAME, EXE_PATH_VALUE);
+
+ newargc=0;
+ for (i = 1; i < argc; i++)
+ {
+ if (strncmp (argv[i], env_set_opt, env_set_opt_len) == 0)
+ {
+ if (argv[i][env_set_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_set_opt_len + 1;
+ lt_opt_process_env_set (p);
+ }
+ else if (argv[i][env_set_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_set (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_set_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_prepend_opt, env_prepend_opt_len) == 0)
+ {
+ if (argv[i][env_prepend_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_prepend_opt_len + 1;
+ lt_opt_process_env_prepend (p);
+ }
+ else if (argv[i][env_prepend_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_prepend (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_prepend_opt);
+ continue;
+ }
+ if (strncmp (argv[i], env_append_opt, env_append_opt_len) == 0)
+ {
+ if (argv[i][env_append_opt_len] == '=')
+ {
+ const char *p = argv[i] + env_append_opt_len + 1;
+ lt_opt_process_env_append (p);
+ }
+ else if (argv[i][env_append_opt_len] == '\0' && i + 1 < argc)
+ {
+ lt_opt_process_env_append (argv[++i]); /* don't copy */
+ }
+ else
+ lt_fatal ("%s missing required argument", env_append_opt);
+ continue;
+ }
+ if (strncmp (argv[i], ltwrapper_option_prefix, opt_prefix_len) == 0)
+ {
+ /* however, if there is an option in the LTWRAPPER_OPTION_PREFIX
+ namespace, but it is not one of the ones we know about and
+ have already dealt with, above (inluding dump-script), then
+ report an error. Otherwise, targets might begin to believe
+ they are allowed to use options in the LTWRAPPER_OPTION_PREFIX
+ namespace. The first time any user complains about this, we'll
+ need to make LTWRAPPER_OPTION_PREFIX a configure-time option
+ or a configure.ac-settable value.
+ */
+ lt_fatal ("Unrecognized option in %s namespace: '%s'",
+ ltwrapper_option_prefix, argv[i]);
+ }
+ /* otherwise ... */
+ newargz[++newargc] = xstrdup (argv[i]);
+ }
+ newargz[++newargc] = NULL;
+
+ LTWRAPPER_DEBUGPRINTF (("(main) lt_argv_zero : %s\n", (lt_argv_zero ? lt_argv_zero : "<NULL>")));
+ for (i = 0; i < newargc; i++)
+ {
+ LTWRAPPER_DEBUGPRINTF (("(main) newargz[%d] : %s\n", i, (newargz[i] ? newargz[i] : "<NULL>")));
+ }
+
+EOF
+
+ case $host_os in
+ mingw*)
+ cat <<"EOF"
+ /* execv doesn't actually work on mingw as expected on unix */
+ rval = _spawnv (_P_WAIT, lt_argv_zero, (const char * const *) newargz);
+ if (rval == -1)
+ {
+ /* failed to start process */
+ LTWRAPPER_DEBUGPRINTF (("(main) failed to launch target \"%s\": errno = %d\n", lt_argv_zero, errno));
+ return 127;
+ }
+ return rval;
+EOF
+ ;;
+ *)
+ cat <<"EOF"
+ execv (lt_argv_zero, newargz);
+ return rval; /* =127, but avoids unused variable warning */
+EOF
+ ;;
+ esac
+
+ cat <<"EOF"
+}
+
+void *
+xmalloc (size_t num)
+{
+ void *p = (void *) malloc (num);
+ if (!p)
+ lt_fatal ("Memory exhausted");
+
+ return p;
+}
+
+char *
+xstrdup (const char *string)
+{
+ return string ? strcpy ((char *) xmalloc (strlen (string) + 1),
+ string) : NULL;
+}
+
+const char *
+base_name (const char *name)
+{
+ const char *base;
+
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ /* Skip over the disk name in MSDOS pathnames. */
+ if (isalpha ((unsigned char) name[0]) && name[1] == ':')
+ name += 2;
+#endif
+
+ for (base = name; *name; name++)
+ if (IS_DIR_SEPARATOR (*name))
+ base = name + 1;
+ return base;
+}
+
+int
+check_executable (const char *path)
+{
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(check_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if ((stat (path, &st) >= 0)
+ && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH)))
+ return 1;
+ else
+ return 0;
+}
+
+int
+make_executable (const char *path)
+{
+ int rval = 0;
+ struct stat st;
+
+ LTWRAPPER_DEBUGPRINTF (("(make_executable) : %s\n",
+ path ? (*path ? path : "EMPTY!") : "NULL!"));
+ if ((!path) || (!*path))
+ return 0;
+
+ if (stat (path, &st) >= 0)
+ {
+ rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR);
+ }
+ return rval;
+}
+
+/* Searches for the full path of the wrapper. Returns
+ newly allocated full path name if found, NULL otherwise
+ Does not chase symlinks, even on platforms that support them.
+*/
+char *
+find_executable (const char *wrapper)
+{
+ int has_slash = 0;
+ const char *p;
+ const char *p_next;
+ /* static buffer for getcwd */
+ char tmp[LT_PATHMAX + 1];
+ int tmp_len;
+ char *concat_name;
+
+ LTWRAPPER_DEBUGPRINTF (("(find_executable) : %s\n",
+ wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"));
+
+ if ((wrapper == NULL) || (*wrapper == '\0'))
+ return NULL;
+
+ /* Absolute path? */
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':')
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ else
+ {
+#endif
+ if (IS_DIR_SEPARATOR (wrapper[0]))
+ {
+ concat_name = xstrdup (wrapper);
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+#if defined (HAVE_DOS_BASED_FILE_SYSTEM)
+ }
+#endif
+
+ for (p = wrapper; *p; p++)
+ if (*p == '/')
+ {
+ has_slash = 1;
+ break;
+ }
+ if (!has_slash)
+ {
+ /* no slashes; search PATH */
+ const char *path = getenv ("PATH");
+ if (path != NULL)
+ {
+ for (p = path; *p; p = p_next)
+ {
+ const char *q;
+ size_t p_len;
+ for (q = p; *q; q++)
+ if (IS_PATH_SEPARATOR (*q))
+ break;
+ p_len = q - p;
+ p_next = (*q == '\0' ? q : q + 1);
+ if (p_len == 0)
+ {
+ /* empty path: current directory */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name =
+ XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+ }
+ else
+ {
+ concat_name =
+ XMALLOC (char, p_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, p, p_len);
+ concat_name[p_len] = '/';
+ strcpy (concat_name + p_len + 1, wrapper);
+ }
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ }
+ }
+ /* not found in PATH; assume curdir */
+ }
+ /* Relative path | not found in path: prepend cwd */
+ if (getcwd (tmp, LT_PATHMAX) == NULL)
+ lt_fatal ("getcwd failed");
+ tmp_len = strlen (tmp);
+ concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1);
+ memcpy (concat_name, tmp, tmp_len);
+ concat_name[tmp_len] = '/';
+ strcpy (concat_name + tmp_len + 1, wrapper);
+
+ if (check_executable (concat_name))
+ return concat_name;
+ XFREE (concat_name);
+ return NULL;
+}
+
+char *
+chase_symlinks (const char *pathspec)
+{
+#ifndef S_ISLNK
+ return xstrdup (pathspec);
+#else
+ char buf[LT_PATHMAX];
+ struct stat s;
+ char *tmp_pathspec = xstrdup (pathspec);
+ char *p;
+ int has_symlinks = 0;
+ while (strlen (tmp_pathspec) && !has_symlinks)
+ {
+ LTWRAPPER_DEBUGPRINTF (("checking path component for symlinks: %s\n",
+ tmp_pathspec));
+ if (lstat (tmp_pathspec, &s) == 0)
+ {
+ if (S_ISLNK (s.st_mode) != 0)
+ {
+ has_symlinks = 1;
+ break;
+ }
+
+ /* search backwards for last DIR_SEPARATOR */
+ p = tmp_pathspec + strlen (tmp_pathspec) - 1;
+ while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ p--;
+ if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p)))
+ {
+ /* no more DIR_SEPARATORS left */
+ break;
+ }
+ *p = '\0';
+ }
+ else
+ {
+ char *errstr = strerror (errno);
+ lt_fatal ("Error accessing file %s (%s)", tmp_pathspec, errstr);
+ }
+ }
+ XFREE (tmp_pathspec);
+
+ if (!has_symlinks)
+ {
+ return xstrdup (pathspec);
+ }
+
+ tmp_pathspec = realpath (pathspec, buf);
+ if (tmp_pathspec == 0)
+ {
+ lt_fatal ("Could not follow symlinks for %s", pathspec);
+ }
+ return xstrdup (tmp_pathspec);
+#endif
+}
+
+char *
+strendzap (char *str, const char *pat)
+{
+ size_t len, patlen;
+
+ assert (str != NULL);
+ assert (pat != NULL);
+
+ len = strlen (str);
+ patlen = strlen (pat);
+
+ if (patlen <= len)
+ {
+ str += len - patlen;
+ if (strcmp (str, pat) == 0)
+ *str = '\0';
+ }
+ return str;
+}
+
+static void
+lt_error_core (int exit_status, const char *mode,
+ const char *message, va_list ap)
+{
+ fprintf (stderr, "%s: %s: ", program_name, mode);
+ vfprintf (stderr, message, ap);
+ fprintf (stderr, ".\n");
+
+ if (exit_status >= 0)
+ exit (exit_status);
+}
+
+void
+lt_fatal (const char *message, ...)
+{
+ va_list ap;
+ va_start (ap, message);
+ lt_error_core (EXIT_FAILURE, "FATAL", message, ap);
+ va_end (ap);
+}
+
+void
+lt_setenv (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_setenv) setting '%s' to '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+ {
+#ifdef HAVE_SETENV
+ /* always make a copy, for consistency with !HAVE_SETENV */
+ char *str = xstrdup (value);
+ setenv (name, str, 1);
+#else
+ int len = strlen (name) + 1 + strlen (value) + 1;
+ char *str = XMALLOC (char, len);
+ sprintf (str, "%s=%s", name, value);
+ if (putenv (str) != EXIT_SUCCESS)
+ {
+ XFREE (str);
+ }
+#endif
+ }
+}
+
+char *
+lt_extend_str (const char *orig_value, const char *add, int to_end)
+{
+ char *new_value;
+ if (orig_value && *orig_value)
+ {
+ int orig_value_len = strlen (orig_value);
+ int add_len = strlen (add);
+ new_value = XMALLOC (char, add_len + orig_value_len + 1);
+ if (to_end)
+ {
+ strcpy (new_value, orig_value);
+ strcpy (new_value + orig_value_len, add);
+ }
+ else
+ {
+ strcpy (new_value, add);
+ strcpy (new_value + add_len, orig_value);
+ }
+ }
+ else
+ {
+ new_value = xstrdup (add);
+ }
+ return new_value;
+}
+
+int
+lt_split_name_value (const char *arg, char** name, char** value)
+{
+ const char *p;
+ int len;
+ if (!arg || !*arg)
+ return 1;
+
+ p = strchr (arg, (int)'=');
+
+ if (!p)
+ return 1;
+
+ *value = xstrdup (++p);
+
+ len = strlen (arg) - strlen (*value);
+ *name = XMALLOC (char, len);
+ strncpy (*name, arg, len-1);
+ (*name)[len - 1] = '\0';
+
+ return 0;
+}
+
+void
+lt_opt_process_env_set (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_set_opt, arg);
+ }
+
+ lt_setenv (name, value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_prepend (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_prepend_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_opt_process_env_append (const char *arg)
+{
+ char *name = NULL;
+ char *value = NULL;
+ char *new_value = NULL;
+
+ if (lt_split_name_value (arg, &name, &value) != 0)
+ {
+ XFREE (name);
+ XFREE (value);
+ lt_fatal ("bad argument for %s: '%s'", env_append_opt, arg);
+ }
+
+ new_value = lt_extend_str (getenv (name), value, 1);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ XFREE (name);
+ XFREE (value);
+}
+
+void
+lt_update_exe_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_exe_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ /* some systems can't cope with a ':'-terminated path #' */
+ int len = strlen (new_value);
+ while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1]))
+ {
+ new_value[len-1] = '\0';
+ }
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+void
+lt_update_lib_path (const char *name, const char *value)
+{
+ LTWRAPPER_DEBUGPRINTF (("(lt_update_lib_path) modifying '%s' by prepending '%s'\n",
+ (name ? name : "<NULL>"),
+ (value ? value : "<NULL>")));
+
+ if (name && *name && value && *value)
+ {
+ char *new_value = lt_extend_str (getenv (name), value, 0);
+ lt_setenv (name, new_value);
+ XFREE (new_value);
+ }
+}
+
+
+EOF
+}
+# end: func_emit_cwrapperexe_src
+
+# func_mode_link arg...
+func_mode_link ()
+{
+ $opt_debug
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invocation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args=$nonopt
+ base_compile="$nonopt $@"
+ compile_command=$nonopt
+ finalize_command=$nonopt
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+ inst_prefix_dir=
+ new_inherited_linker_flags=
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ non_pic_objects=
+ precious_files_regex=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+ vinfo_number=no
+ weak_libs=
+ single_module="${wl}-single_module"
+ func_infer_tag $base_compile
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -shared)
+ test "$build_libtool_libs" != yes && \
+ func_fatal_configuration "can not build a shared library"
+ build_old_libs=no
+ break
+ ;;
+ -all-static | -static | -static-libtool-libs)
+ case $arg in
+ -all-static)
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ func_warning "complete static linking is impossible in this configuration"
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ -static)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=built
+ ;;
+ -static-libtool-libs)
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ prefer_static_libs=yes
+ ;;
+ esac
+ build_libtool_libs=no
+ build_old_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test "$#" -gt 0; do
+ arg="$1"
+ shift
+ func_quote_for_eval "$arg"
+ qarg=$func_quote_for_eval_unquoted_result
+ func_append libtool_args " $func_quote_for_eval_result"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ func_append compile_command " @OUTPUT@"
+ func_append finalize_command " @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ func_append compile_command " @SYMFILE@"
+ func_append finalize_command " @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ test -f "$arg" \
+ || func_fatal_error "symbol file \`$arg' does not exist"
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ framework)
+ case $host in
+ *-*-darwin*)
+ case "$deplibs " in
+ *" $qarg.ltframework "*) ;;
+ *) deplibs="$deplibs $qarg.ltframework" # this is fixed later
+ ;;
+ esac
+ ;;
+ esac
+ prev=
+ continue
+ ;;
+ inst_prefix)
+ inst_prefix_dir="$arg"
+ prev=
+ continue
+ ;;
+ objectlist)
+ if test -f "$arg"; then
+ save_arg=$arg
+ moreargs=
+ for fil in `cat "$save_arg"`
+ do
+# moreargs="$moreargs $fil"
+ arg=$fil
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ done
+ else
+ func_fatal_error "link input file \`$arg' does not exist"
+ fi
+ arg=$save_arg
+ prev=
+ continue
+ ;;
+ precious_regex)
+ precious_files_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ shrext)
+ shrext_cmds="$arg"
+ prev=
+ continue
+ ;;
+ weak)
+ weak_libs="$weak_libs $arg"
+ prev=
+ continue
+ ;;
+ xcclinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ func_append compile_command " $qarg"
+ func_append finalize_command " $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ func_append compile_command " $wl$qarg"
+ func_append finalize_command " $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n "$prev"
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ # See comment for -static flag below, for more details.
+ func_append compile_command " $link_static_flag"
+ func_append finalize_command " $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ func_fatal_error "\`-allow-undefined' must not be used because it is the default"
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ func_fatal_error "more than one -exported-symbols argument is not allowed"
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ -framework)
+ prev=framework
+ continue
+ ;;
+
+ -inst-prefix-dir)
+ prev=inst_prefix
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix* | /*-*-irix*)
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ func_stripname '-L' '' "$arg"
+ dir=$func_stripname_result
+ if test -z "$dir"; then
+ if test "$#" -gt 0; then
+ func_fatal_error "require no space between \`-L' and \`$1'"
+ else
+ func_fatal_error "need path for \`-L' option"
+ fi
+ fi
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ test -z "$absdir" && \
+ func_fatal_error "cannot determine absolute directory name of \`$dir'"
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`$ECHO "X$dir" | $Xsed -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ ::) dllsearchpath=$dir;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C and math libraries are in the System framework
+ deplibs="$deplibs System.ltframework"
+ continue
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ elif test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ # Tru64 UNIX uses -model [arg] to determine the layout of C++
+ # classes, name mangling, and exception handling.
+ # Darwin uses the -arch flag to determine output architecture.
+ -model|-arch|-isysroot)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ prev=xcompiler
+ continue
+ ;;
+
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ compiler_flags="$compiler_flags $arg"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ case "$new_inherited_linker_flags " in
+ *" $arg "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $arg" ;;
+ esac
+ continue
+ ;;
+
+ -multi_module)
+ single_module="${wl}-multi_module"
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # and Darwin in order for the loader to find any dlls it needs.
+ func_warning "\`-no-install' is ignored for $host"
+ func_warning "assuming \`-no-fast-install' instead"
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -objectlist)
+ prev=objectlist
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -precious-files-regex)
+ prev=precious_regex
+ continue
+ ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ func_stripname '-R' '' "$arg"
+ dir=$func_stripname_result
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ func_fatal_error "only absolute run-paths are allowed"
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -shared)
+ # The effects of -shared are defined in a previous loop.
+ continue
+ ;;
+
+ -shrext)
+ prev=shrext
+ continue
+ ;;
+
+ -static | -static-libtool-libs)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -version-number)
+ prev=vinfo
+ vinfo_number=yes
+ continue
+ ;;
+
+ -weak)
+ prev=weak
+ continue
+ ;;
+
+ -Wc,*)
+ func_stripname '-Wc,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Wl,*)
+ func_stripname '-Wl,' '' "$arg"
+ args=$func_stripname_result
+ arg=
+ save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ func_quote_for_eval "$flag"
+ arg="$arg $wl$func_quote_for_eval_result"
+ compiler_flags="$compiler_flags $wl$func_quote_for_eval_result"
+ linker_flags="$linker_flags $func_quote_for_eval_result"
+ done
+ IFS="$save_ifs"
+ func_stripname ' ' '' "$arg"
+ arg=$func_stripname_result
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ -XCClinker)
+ prev=xcclinker
+ continue
+ ;;
+
+ # -msg_* for osf cc
+ -msg_*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ # -64, -mips[0-9] enable 64-bit mode on the SGI compiler
+ # -r[0-9][0-9]* specifies the processor on the SGI compiler
+ # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler
+ # +DA*, +DD* enable 64-bit mode on the HP compiler
+ # -q* pass through compiler args for the IBM compiler
+ # -m*, -t[45]*, -txscale* pass through architecture-specific
+ # compiler args for GCC
+ # -F/path gives path to uninstalled frameworks, gcc on darwin
+ # -p, -pg, --coverage, -fprofile-* pass through profiling flag for GCC
+ # @file GCC response files
+ -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \
+ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ compiler_flags="$compiler_flags $arg"
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+
+ *.$objext)
+ # A standard object.
+ objs="$objs $arg"
+ ;;
+
+ *.lo)
+ # A libtool-controlled object.
+
+ # Check to see that this really is a libtool object.
+ if func_lalib_unsafe_p "$arg"; then
+ pic_object=
+ non_pic_object=
+
+ # Read the .lo file
+ func_source "$arg"
+
+ if test -z "$pic_object" ||
+ test -z "$non_pic_object" ||
+ test "$pic_object" = none &&
+ test "$non_pic_object" = none; then
+ func_fatal_error "cannot find name of object for \`$arg'"
+ fi
+
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ if test "$pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ pic_object="$xdir$pic_object"
+
+ if test "$prev" = dlfiles; then
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $pic_object"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ # CHECK ME: I think I busted this. -Ossama
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles $pic_object"
+ prev=
+ fi
+
+ # A PIC object.
+ func_append libobjs " $pic_object"
+ arg="$pic_object"
+ fi
+
+ # Non-PIC object.
+ if test "$non_pic_object" != none; then
+ # Prepend the subdirectory the object is found in.
+ non_pic_object="$xdir$non_pic_object"
+
+ # A standard non-PIC object
+ func_append non_pic_objects " $non_pic_object"
+ if test -z "$pic_object" || test "$pic_object" = none ; then
+ arg="$non_pic_object"
+ fi
+ else
+ # If the PIC object exists, use it instead.
+ # $xdir was prepended to $pic_object above.
+ non_pic_object="$pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ fi
+ else
+ # Only an error if not doing a dry-run.
+ if $opt_dry_run; then
+ # Extract subdirectory from the argument.
+ func_dirname "$arg" "/" ""
+ xdir="$func_dirname_result"
+
+ func_lo2o "$arg"
+ pic_object=$xdir$objdir/$func_lo2o_result
+ non_pic_object=$xdir$func_lo2o_result
+ func_append libobjs " $pic_object"
+ func_append non_pic_objects " $non_pic_object"
+ else
+ func_fatal_error "\`$arg' is not a valid libtool object"
+ fi
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ func_quote_for_eval "$arg"
+ arg="$func_quote_for_eval_result"
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+ done # argument parsing loop
+
+ test -n "$prev" && \
+ func_fatal_help "the \`$prevarg' option requires an argument"
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ func_append compile_command " $arg"
+ func_append finalize_command " $arg"
+ fi
+
+ oldlibs=
+ # calculate the name of the file, without its directory
+ func_basename "$output"
+ outputname="$func_basename_result"
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$ECHO \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ func_dirname "$output" "/" ""
+ output_objdir="$func_dirname_result$objdir"
+ # Create the object directory.
+ func_mkdir_p "$output_objdir"
+
+ # Determine the type of output
+ case $output in
+ "")
+ func_fatal_help "you must specify an output file"
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ if $opt_duplicate_deps ; then
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ libs="$libs $deplib"
+ done
+
+ if test "$linkmode" = lib; then
+ libs="$predeps $libs $compiler_lib_search_path $postdeps"
+
+ # Compute libraries that are listed more than once in $predeps
+ # $postdeps and mark them as special (i.e., whose duplicates are
+ # not to be eliminated).
+ pre_post_deps=
+ if $opt_duplicate_compiler_generated_deps; then
+ for pre_post_dep in $predeps $postdeps; do
+ case "$pre_post_deps " in
+ *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;;
+ esac
+ pre_post_deps="$pre_post_deps $pre_post_dep"
+ done
+ fi
+ pre_post_deps=
+ fi
+
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+
+ case $linkmode in
+ lib)
+ passes="conv dlpreopen link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file"
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+
+ for pass in $passes; do
+ # The preopen pass in lib mode reverses $deplibs; put it back here
+ # so that -L comes before libs that need it for instance...
+ if test "$linkmode,$pass" = "lib,link"; then
+ ## FIXME: Find the place where the list is rebuilt in the wrong
+ ## order, and fix it there properly
+ tmp_deplibs=
+ for deplib in $deplibs; do
+ tmp_deplibs="$deplib $tmp_deplibs"
+ done
+ deplibs="$tmp_deplibs"
+ fi
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan"; then
+ libs="$deplibs"
+ deplibs=
+ fi
+ if test "$linkmode" = prog; then
+ case $pass in
+ dlopen) libs="$dlfiles" ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link)
+ libs="$deplibs %DEPLIBS%"
+ test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs"
+ ;;
+ esac
+ fi
+ if test "$linkmode,$pass" = "lib,dlpreopen"; then
+ # Collect and forward deplibs of preopened libtool libs
+ for lib in $dlprefiles; do
+ # Ignore non-libtool-libs
+ dependency_libs=
+ case $lib in
+ *.la) func_source "$lib" ;;
+ esac
+
+ # Collect preopened libtool deplibs, except any this library
+ # has declared as weak libs
+ for deplib in $dependency_libs; do
+ deplib_base=`$ECHO "X$deplib" | $Xsed -e "$basename"`
+ case " $weak_libs " in
+ *" $deplib_base "*) ;;
+ *) deplibs="$deplibs $deplib" ;;
+ esac
+ done
+ done
+ libs="$dlprefiles"
+ fi
+ if test "$pass" = dlopen; then
+ # Collect dlpreopened libraries
+ save_deplibs="$deplibs"
+ deplibs=
+ fi
+
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe|-threads)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags $deplib"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -l*)
+ if test "$linkmode" != lib && test "$linkmode" != prog; then
+ func_warning "\`-l' is ignored for archives/objects"
+ continue
+ fi
+ func_stripname '-l' '' "$deplib"
+ name=$func_stripname_result
+ if test "$linkmode" = lib; then
+ searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path"
+ else
+ searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path"
+ fi
+ for searchdir in $searchdirs; do
+ for search_ext in .la $std_shrext .so .a; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}${search_ext}"
+ if test -f "$lib"; then
+ if test "$search_ext" = ".la"; then
+ found=yes
+ else
+ found=no
+ fi
+ break 2
+ fi
+ done
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ else # deplib is a libtool library
+ # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib,
+ # We need to do some special things here, and not later.
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $deplib "*)
+ if func_lalib_p "$lib"; then
+ library_names=
+ old_library=
+ func_source "$lib"
+ for l in $old_library $library_names; do
+ ll="$l"
+ done
+ if test "X$ll" = "X$old_library" ; then # only static version available
+ found=no
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+ lib=$ladir/$old_library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ fi
+ ;;
+ *) ;;
+ esac
+ fi
+ fi
+ ;; # -l
+ *.ltframework)
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ if test "$linkmode" = lib ; then
+ case "$new_inherited_linker_flags " in
+ *" $deplib "*) ;;
+ * ) new_inherited_linker_flags="$new_inherited_linker_flags $deplib" ;;
+ esac
+ fi
+ fi
+ continue
+ ;;
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test "$pass" = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ prog)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test "$pass" = scan; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ *)
+ func_warning "\`-L' is ignored for archives/objects"
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test "$pass" = link; then
+ func_stripname '-R' '' "$deplib"
+ dir=$func_stripname_result
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ # Linking convenience modules into shared libraries is allowed,
+ # but linking other static libraries is non-portable.
+ case " $dlpreconveniencelibs " in
+ *" $deplib "*) ;;
+ *)
+ valid_a_lib=no
+ case $deplibs_check_method in
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ if eval "\$ECHO \"X$deplib\"" 2>/dev/null | $Xsed -e 10q \
+ | $EGREP "$match_pattern_regex" > /dev/null; then
+ valid_a_lib=yes
+ fi
+ ;;
+ pass_all)
+ valid_a_lib=yes
+ ;;
+ esac
+ if test "$valid_a_lib" != yes; then
+ $ECHO
+ $ECHO "*** Warning: Trying to link with static lib archive $deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because the file extensions .$libext of this argument makes me believe"
+ $ECHO "*** that it is just a static archive that I should not use here."
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the"
+ $ECHO "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ ;;
+ esac
+ continue
+ ;;
+ prog)
+ if test "$pass" != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test "$pass" = conv; then
+ deplibs="$deplib $deplibs"
+ elif test "$linkmode" = prog; then
+ if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+
+ if test "$found" = yes || test -f "$lib"; then :
+ else
+ func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'"
+ fi
+
+ # Check to see that this really is a libtool archive.
+ func_lalib_unsafe_p "$lib" \
+ || func_fatal_error "\`$lib' is not a valid libtool archive"
+
+ func_dirname "$lib" "" "."
+ ladir="$func_dirname_result"
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ inherited_linker_flags=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variables installed, or shouldnotlink
+ installed=yes
+ shouldnotlink=no
+ avoidtemprpath=
+
+
+ # Read the .la file
+ func_source "$lib"
+
+ # Convert "-framework foo" to "foo.ltframework"
+ if test -n "$inherited_linker_flags"; then
+ tmp_inherited_linker_flags=`$ECHO "X$inherited_linker_flags" | $Xsed -e 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
+ case " $new_inherited_linker_flags " in
+ *" $tmp_inherited_linker_flag "*) ;;
+ *) new_inherited_linker_flags="$new_inherited_linker_flags $tmp_inherited_linker_flag";;
+ esac
+ done
+ fi
+ dependency_libs=`$ECHO "X $dependency_libs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test "$linkmode" != prog && test "$linkmode" != lib; }; then
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test "$pass" = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test "$linkmode" != prog && test "$linkmode" != lib; then
+ func_fatal_error "\`$lib' is not a convenience library"
+ fi
+ continue
+ fi # $pass = conv
+
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ func_fatal_error "cannot find name of link library for \`$lib'"
+ fi
+
+ # This library was specified with -dlopen.
+ if test "$pass" = dlopen; then
+ if test -z "$libdir"; then
+ func_fatal_error "cannot -dlopen a convenience library: \`$lib'"
+ fi
+ if test -z "$dlname" ||
+ test "$dlopen_support" != yes ||
+ test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload. We also need to preload any
+ # dependent libraries so libltdl's deplib preloader doesn't
+ # bomb out in the load deplibs phase.
+ dlprefiles="$dlprefiles $lib $dependency_libs"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ func_warning "cannot determine absolute directory name of \`$ladir'"
+ func_warning "passing it literally to the linker, although it might fail"
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ func_basename "$lib"
+ laname="$func_basename_result"
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ func_warning "library \`$lib' was moved."
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes
+ else
+ if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ dir="$ladir"
+ absdir="$abs_ladir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi
+ fi # $installed = yes
+ func_stripname 'lib' '.la' "$laname"
+ name=$func_stripname_result
+
+ # This library was specified with -dlpreopen.
+ if test "$pass" = dlpreopen; then
+ if test -z "$libdir" && test "$linkmode" = prog; then
+ func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'"
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Keep a list of preopened convenience libraries to check
+ # that they are being used correctly in the link pass.
+ test -z "$libdir" && \
+ dlpreconveniencelibs="$dlpreconveniencelibs $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test "$linkmode" = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs" # used for prog,scan pass
+ fi
+ continue
+ fi
+
+
+ if test "$linkmode" = prog && test "$pass" != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) func_stripname '-L' '' "$deplib"
+ newlib_search_path="$newlib_search_path $func_stripname_result"
+ ;;
+ esac
+ # Need to link against all dependency_libs?
+ if test "$linkalldeplibs" = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ if test "$linkmode,$pass" = "prog,link"; then
+ if test -n "$library_names" &&
+ { { test "$prefer_static_libs" = no ||
+ test "$prefer_static_libs,$installed" = "built,yes"; } ||
+ test -z "$old_library"; }; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath:" in
+ *"$absdir:"*) ;;
+ *) temp_rpath="$temp_rpath$absdir:" ;;
+ esac
+ fi
+
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+ fi
+
+ link_static=no # Whether the deplib will be linked statically
+ use_static_libs=$prefer_static_libs
+ if test "$use_static_libs" = built && test "$installed" = yes; then
+ use_static_libs=no
+ fi
+ if test -n "$library_names" &&
+ { test "$use_static_libs" = no || test -z "$old_library"; }; then
+ case $host in
+ *cygwin* | *mingw* | *cegcc*)
+ # No point in relinking DLLs because paths are not encoded
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=no
+ ;;
+ *)
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+ ;;
+ esac
+ # This is a shared library
+
+ # Warn about portability, can't link against -module's on some
+ # systems (darwin). Don't bleat about dlopened modules though!
+ dlopenmodule=""
+ for dlpremoduletest in $dlprefiles; do
+ if test "X$dlpremoduletest" = "X$lib"; then
+ dlopenmodule="$dlpremoduletest"
+ break
+ fi
+ done
+ if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then
+ $ECHO
+ if test "$linkmode" = prog; then
+ $ECHO "*** Warning: Linking the executable $output against the loadable module"
+ else
+ $ECHO "*** Warning: Linking the shared library $output against the loadable module"
+ fi
+ $ECHO "*** $linklib is not portable!"
+ fi
+ if test "$linkmode" = lib &&
+ test "$hardcode_into_libs" = yes; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin* | mingw* | *cegcc*)
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ func_basename "$soroot"
+ soname="$func_basename_result"
+ func_stripname 'lib' '.dll' "$soname"
+ newlib=libimp-$func_stripname_result.a
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ func_verbose "extracting exported symbol list from \`$soname'"
+ func_execute_cmds "$extract_expsyms_cmds" 'exit $?'
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ func_verbose "generating import library for \`$soname'"
+ func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?'
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n "$old_archive_from_expsyms_cmds"
+
+ if test "$linkmode" = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ case $host in
+ *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;;
+ *-*-sysv4*uw2*) add_dir="-L$dir" ;;
+ *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \
+ *-*-unixware7*) add_dir="-L$dir" ;;
+ *-*-darwin* )
+ # if the lib is a (non-dlopened) module then we can not
+ # link against it, someone is ignoring the earlier warnings
+ if /usr/bin/file -L $add 2> /dev/null |
+ $GREP ": [^:]* bundle" >/dev/null ; then
+ if test "X$dlopenmodule" != "X$lib"; then
+ $ECHO "*** Warning: lib $linklib is a module, not a shared library"
+ if test -z "$old_library" ; then
+ $ECHO
+ $ECHO "*** And there doesn't seem to be a static archive available"
+ $ECHO "*** The link will probably fail, sorry"
+ else
+ add="$dir/$old_library"
+ fi
+ elif test -n "$old_library"; then
+ add="$dir/$old_library"
+ fi
+ fi
+ esac
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ func_fatal_configuration "unsupported hardcode properties"
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes &&
+ test "$hardcode_minus_L" != yes &&
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test "$linkmode" = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes &&
+ test "$hardcode_direct_absolute" = no; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ elif test "$hardcode_automatic" = yes; then
+ if test -n "$inst_prefix_dir" &&
+ test -f "$inst_prefix_dir$libdir/$linklib" ; then
+ add="$inst_prefix_dir$libdir/$linklib"
+ else
+ add="$libdir/$linklib"
+ fi
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ # Try looking first in the location we're being installed to.
+ if test -n "$inst_prefix_dir"; then
+ case $libdir in
+ [\\/]*)
+ add_dir="$add_dir -L$inst_prefix_dir$libdir"
+ ;;
+ esac
+ fi
+ add="-l$name"
+ fi
+
+ if test "$linkmode" = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test "$linkmode" = prog; then
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ $ECHO
+ $ECHO "*** Warning: This system can not link to static lib archive $lib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ $ECHO "*** But as you try to build a module library, libtool will still create "
+ $ECHO "*** a static module, that should work as long as the dlopening application"
+ $ECHO "*** is linked with the -dlopen flag to resolve symbols at runtime."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test "$linkmode" = lib; then
+ if test -n "$dependency_libs" &&
+ { test "$hardcode_into_libs" != yes ||
+ test "$build_old_libs" = yes ||
+ test "$link_static" = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) func_stripname '-R' '' "$libdir"
+ temp_xrpath=$func_stripname_result
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ if $opt_duplicate_deps ; then
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ fi
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test "$link_all_deplibs" != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ path=
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ func_dirname "$deplib" "" "."
+ dir="$func_dirname_result"
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ func_warning "cannot determine absolute directory name of \`$dir'"
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if $GREP "^installed=no" $deplib > /dev/null; then
+ case $host in
+ *-*-darwin*)
+ depdepl=
+ eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib`
+ if test -n "$deplibrary_names" ; then
+ for tmp in $deplibrary_names ; do
+ depdepl=$tmp
+ done
+ if test -f "$absdir/$objdir/$depdepl" ; then
+ depdepl="$absdir/$objdir/$depdepl"
+ darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ if test -z "$darwin_install_name"; then
+ darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'`
+ fi
+ compiler_flags="$compiler_flags ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}"
+ linker_flags="$linker_flags -dylib_file ${darwin_install_name}:${depdepl}"
+ path=
+ fi
+ fi
+ ;;
+ *)
+ path="-L$absdir/$objdir"
+ ;;
+ esac
+ else
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ test "$absdir" != "$libdir" && \
+ func_warning "\`$deplib' seems to be moved"
+
+ path="-L$absdir"
+ fi
+ ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$path $deplibs" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test "$pass" = link; then
+ if test "$linkmode" = "prog"; then
+ compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
+ finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
+ else
+ compiler_flags="$compiler_flags "`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
+ fi
+ dependency_libs="$newdependency_libs"
+ if test "$pass" = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test "$pass" != dlopen; then
+ if test "$pass" != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ # FIXME: Pedantically, this is the right thing to do, so
+ # that some nasty dependency loop isn't accidentally
+ # broken:
+ #new_libs="$deplib $new_libs"
+ # Pragmatically, this seems to cause very few problems in
+ # practice:
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ -R*) ;;
+ *)
+ # And here is the reason: when a library appears more
+ # than once as an explicit dependence of a library, or
+ # is implicitly linked in more than once by the
+ # compiler, it is considered special, and multiple
+ # occurrences thereof are not removed. Compare this
+ # with having the same library being listed as a
+ # dependency of multiple other libraries: in this case,
+ # we know (pedantically, we assume) the library does not
+ # need to be listed more than once, so we keep only the
+ # last copy. This is not always right, but it is rare
+ # enough that we require users that really mean to play
+ # such unportable linking tricks to link the library
+ # using -Wl,-lname, so that libtool does not consider it
+ # for duplicate removal.
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ # Last step: remove runtime libs from dependency_libs
+ # (they stay in deplibs)
+ tmp_libs=
+ for i in $dependency_libs ; do
+ case " $predeps $postdeps $compiler_lib_search_path " in
+ *" $i "*)
+ i=""
+ ;;
+ esac
+ if test -n "$i" ; then
+ tmp_libs="$tmp_libs $i"
+ fi
+ done
+ dependency_libs=$tmp_libs
+ done # for pass
+ if test "$linkmode" = prog; then
+ dlfiles="$newdlfiles"
+ fi
+ if test "$linkmode" = prog || test "$linkmode" = lib; then
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for archives"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for archives" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for archives"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for archives"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for archives"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for archives"
+
+ test -n "$export_symbols$export_symbols_regex" && \
+ func_warning "\`-export-symbols' is ignored for archives"
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ func_stripname 'lib' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ test "$module" = no && \
+ func_fatal_help "libtool library \`$output' must begin with \`lib'"
+
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ func_stripname '' '.la' "$outputname"
+ name=$func_stripname_result
+ eval shared_ext=\"$shrext_cmds\"
+ eval libname=\"$libname_spec\"
+ else
+ func_stripname '' '.la' "$outputname"
+ libname=$func_stripname_result
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs"
+ else
+ $ECHO
+ $ECHO "*** Warning: Linking the shared library $output against the non-libtool"
+ $ECHO "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ test "$dlself" != no && \
+ func_warning "\`-dlopen self' is ignored for libtool libraries"
+
+ set dummy $rpath
+ shift
+ test "$#" -gt 1 && \
+ func_warning "ignoring multiple \`-rpath's for a libtool library"
+
+ install_libdir="$1"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ # Some compilers have problems with a `.al' extension so
+ # convenience libraries should have the same extension an
+ # archive normally would.
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info/-version-number' is ignored for convenience libraries"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for convenience libraries"
+ else
+
+ # Parse the version information argument.
+ save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ shift
+ IFS="$save_ifs"
+
+ test -n "$7" && \
+ func_fatal_help "too many parameters to \`-version-info'"
+
+ # convert absolute version numbers to libtool ages
+ # this retains compatibility with .la files and attempts
+ # to make the code below a bit more comprehensible
+
+ case $vinfo_number in
+ yes)
+ number_major="$1"
+ number_minor="$2"
+ number_revision="$3"
+ #
+ # There are really only two kinds -- those that
+ # use the current revision as the major version
+ # and those that subtract age and use age as
+ # a minor version. But, then there is irix
+ # which has an extra 1 added just for fun
+ #
+ case $version_type in
+ darwin|linux|osf|windows|none)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_revision"
+ ;;
+ freebsd-aout|freebsd-elf|sunos)
+ current="$number_major"
+ revision="$number_minor"
+ age="0"
+ ;;
+ irix|nonstopux)
+ func_arith $number_major + $number_minor
+ current=$func_arith_result
+ age="$number_minor"
+ revision="$number_minor"
+ lt_irix_increment=no
+ ;;
+ *)
+ func_fatal_configuration "$modename: unknown library version type \`$version_type'"
+ ;;
+ esac
+ ;;
+ no)
+ current="$1"
+ revision="$2"
+ age="$3"
+ ;;
+ esac
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "CURRENT \`$current' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $revision in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "REVISION \`$revision' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ case $age in
+ 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;;
+ *)
+ func_error "AGE \`$age' must be a nonnegative integer"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ ;;
+ esac
+
+ if test "$age" -gt "$current"; then
+ func_error "AGE \`$age' is greater than the current interface number \`$current'"
+ func_fatal_error "\`$vinfo' is not valid version information"
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ func_arith $current + 1
+ minor_current=$func_arith_result
+ xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ irix | nonstopux)
+ if test "X$lt_irix_increment" = "Xno"; then
+ func_arith $current - $age
+ else
+ func_arith $current - $age + 1
+ fi
+ major=$func_arith_result
+
+ case $version_type in
+ nonstopux) verstring_prefix=nonstopux ;;
+ *) verstring_prefix=sgi ;;
+ esac
+ verstring="$verstring_prefix$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test "$loop" -ne 0; do
+ func_arith $revision - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring_prefix$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ func_arith $current - $age
+ major=.$func_arith_result
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test "$loop" -ne 0; do
+ func_arith $current - $loop
+ iface=$func_arith_result
+ func_arith $loop - 1
+ loop=$func_arith_result
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ qnx)
+ major=".$current"
+ versuffix=".$current"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ func_arith $current - $age
+ major=$func_arith_result
+ versuffix="-$major"
+ ;;
+
+ *)
+ func_fatal_configuration "unknown library version type \`$version_type'"
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ func_warning "undefined symbols not allowed in $host shared libraries"
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+
+ fi
+
+ func_generate_dlsyms "$libname" "$libname" "yes"
+ libobjs="$libobjs $symfileobj"
+ test "X$libobjs" = "X " && libobjs=
+
+ if test "$mode" != relink; then
+ # Remove our outputs, but don't remove object files since they
+ # may have been created when compiling PIC objects.
+ removelist=
+ tempremovelist=`$ECHO "$output_objdir/*"`
+ for p in $tempremovelist; do
+ case $p in
+ *.$objext | *.gcno)
+ ;;
+ $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*)
+ if test "X$precious_files_regex" != "X"; then
+ if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1
+ then
+ continue
+ fi
+ fi
+ removelist="$removelist $p"
+ ;;
+ *) ;;
+ esac
+ done
+ test -n "$removelist" && \
+ func_show_eval "${RM}r \$removelist"
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ #for path in $notinst_path; do
+ # lib_search_path=`$ECHO "X$lib_search_path " | $Xsed -e "s% $path % %g"`
+ # deplibs=`$ECHO "X$deplibs " | $Xsed -e "s% -L$path % %g"`
+ # dependency_libs=`$ECHO "X$dependency_libs " | $Xsed -e "s% -L$path % %g"`
+ #done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs System.ltframework"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *-*-sco3.2v5* | *-*-sco5v6*)
+ # Causes problems with __ctype
+ ;;
+ *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*)
+ # Compiler inserts libc in the correct place for threads to work
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test "$build_libtool_need_lc" = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behavior.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $opt_dry_run || $RM conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $deplibs; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which I believe you do not have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use it for"
+ $ECHO "*** its dynamic dependency list that programs get resolved with at runtime."
+ fi
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ else
+ # Error occurred in the first compile. Let's try to salvage
+ # the situation: Compile a separate program for each library.
+ for i in $deplibs; do
+ case $i in
+ -l*)
+ func_stripname -l '' "$i"
+ name=$func_stripname_result
+ $opt_dry_run || $RM conftest
+ if $LTCC $LTCFLAGS -o conftest conftest.c $i; then
+ ldd_output=`ldd conftest`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $i "*)
+ newdeplibs="$newdeplibs $i"
+ i=""
+ ;;
+ esac
+ fi
+ if test -n "$i" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ deplib_matches=`eval "\\$ECHO \"$library_names_spec\""`
+ set dummy $deplib_matches; shift
+ deplib_match=$1
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: dynamic linker does not accept needed library $i."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because a test_compile did reveal that the linker did not use this one"
+ $ECHO "*** as a dynamic dependency that programs can get resolved with at runtime."
+ fi
+ fi
+ else
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning! Library $i is needed by this library but I was not able to"
+ $ECHO "*** make it link in! You will probably need to install it or some"
+ $ECHO "*** library that it depends on before this library will be fully"
+ $ECHO "*** functional. Installing it before continuing would be even better."
+ fi
+ ;;
+ *)
+ newdeplibs="$newdeplibs $i"
+ ;;
+ esac
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method; shift
+ file_magic_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null |
+ $GREP " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$ECHO "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null |
+ $SED -e 10q |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for file magic test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a file magic. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method; shift
+ match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"`
+ for a_deplib in $deplibs; do
+ case $a_deplib in
+ -l*)
+ func_stripname -l '' "$a_deplib"
+ name=$func_stripname_result
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ case " $predeps $postdeps " in
+ *" $a_deplib "*)
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ ;;
+ esac
+ fi
+ if test -n "$a_deplib" ; then
+ libname=`eval "\\$ECHO \"$libname_spec\""`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ potlib="$potent_lib" # see symlink-check above in file_magic test
+ if eval "\$ECHO \"X$potent_lib\"" 2>/dev/null | $Xsed -e 10q | \
+ $EGREP "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ fi
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ $ECHO
+ $ECHO "*** Warning: linker path does not have real file for library $a_deplib."
+ $ECHO "*** I have the capability to make that library automatically link in when"
+ $ECHO "*** you link to this library. But I can only do this if you have a"
+ $ECHO "*** shared version of the library, which you do not appear to have"
+ $ECHO "*** because I did check the linker path looking for a file starting"
+ if test -z "$potlib" ; then
+ $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)"
+ else
+ $ECHO "*** with $libname and none of the candidates passed a file format test"
+ $ECHO "*** using a regex pattern. Last file checked: $potlib"
+ fi
+ fi
+ ;;
+ *)
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ ;;
+ esac
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ tmp_deplibs=`$ECHO "X $deplibs" | $Xsed \
+ -e 's/ -lc$//' -e 's/ -[LR][^ ]*//g'`
+ if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then
+ for i in $predeps $postdeps ; do
+ # can't use Xsed below, because $i might contain '/'
+ tmp_deplibs=`$ECHO "X $tmp_deplibs" | $Xsed -e "s,$i,,"`
+ done
+ fi
+ if $ECHO "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' |
+ $GREP . >/dev/null; then
+ $ECHO
+ if test "X$deplibs_check_method" = "Xnone"; then
+ $ECHO "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ $ECHO "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ $ECHO "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library with the System framework
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ $ECHO
+ $ECHO "*** Warning: libtool could not satisfy all declared inter-library"
+ $ECHO "*** dependencies of module $libname. Therefore, libtool will create"
+ $ECHO "*** a static module, that should work as long as the dlopening"
+ $ECHO "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ $ECHO
+ $ECHO "*** However, this would only work if libtool was able to extract symbol"
+ $ECHO "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ $ECHO "*** not find such a program. So, this module is probably useless."
+ $ECHO "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ $ECHO "*** The inter-library dependencies that have been dropped here will be"
+ $ECHO "*** automatically added whenever a program is linked with this library"
+ $ECHO "*** or is declared to -dlopen it."
+
+ if test "$allow_undefined" = no; then
+ $ECHO
+ $ECHO "*** Since this library must not contain undefined symbols,"
+ $ECHO "*** because either the platform does not support them or"
+ $ECHO "*** it was explicitly requested with -no-undefined,"
+ $ECHO "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ case $host in
+ *-*-darwin*)
+ newdeplibs=`$ECHO "X $newdeplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ new_inherited_linker_flags=`$ECHO "X $new_inherited_linker_flags" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ deplibs=`$ECHO "X $deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ deplibs="$new_libs"
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test "$hardcode_into_libs" = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ if test -n "$hardcode_libdir_flag_spec_ld"; then
+ eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\"
+ else
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval shared_ext=\"$shrext_cmds\"
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ shift
+ realname="$1"
+ shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ if test -z "$dlname"; then
+ dlname=$soname
+ fi
+
+ lib="$output_objdir/$realname"
+ linknames=
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$ECHO "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ test "X$libobjs" = "X " && libobjs=
+
+ delfiles=
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp"
+ export_symbols="$output_objdir/$libname.uexp"
+ delfiles="$delfiles $export_symbols"
+ fi
+
+ orig_export_symbols=
+ case $host_os in
+ cygwin* | mingw* | cegcc*)
+ if test -n "$export_symbols" && test -z "$export_symbols_regex"; then
+ # exporting using user supplied symfile
+ if test "x`$SED 1q $export_symbols`" != xEXPORTS; then
+ # and it's NOT already a .def file. Must figure out
+ # which of the given symbols are data symbols and tag
+ # them as such. So, trigger use of export_symbols_cmds.
+ # export_symbols gets reassigned inside the "prepare
+ # the list of exported symbols" if statement, so the
+ # include_expsyms logic still works.
+ orig_export_symbols="$export_symbols"
+ export_symbols=
+ always_export_symbols=yes
+ fi
+ fi
+ ;;
+ esac
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ cmds=$export_symbols_cmds
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ func_len " $cmd"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ func_show_eval "$cmd" 'exit $?'
+ skipped_export=false
+ else
+ # The command line is too long to execute in one step.
+ func_verbose "using reloadable object file for export list..."
+ skipped_export=:
+ # Break out early, otherwise skipped_export may be
+ # set to false by a later but shorter cmd.
+ break
+ fi
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+
+ tmp_deplibs=
+ for test_deplib in $deplibs; do
+ case " $convenience " in
+ *" $test_deplib "*) ;;
+ *)
+ tmp_deplibs="$tmp_deplibs $test_deplib"
+ ;;
+ esac
+ done
+ deplibs="$tmp_deplibs"
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec" &&
+ test "$compiler_needs_object" = yes &&
+ test -z "$libobjs"; then
+ # extract the archives, so we have objects to list.
+ # TODO: could optimize this to just extract one archive.
+ whole_archive_flag_spec=
+ fi
+ if test -n "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ else
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ eval test_cmds=\"$module_expsym_cmds\"
+ cmds=$module_expsym_cmds
+ else
+ eval test_cmds=\"$module_cmds\"
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval test_cmds=\"$archive_expsym_cmds\"
+ cmds=$archive_expsym_cmds
+ else
+ eval test_cmds=\"$archive_cmds\"
+ cmds=$archive_cmds
+ fi
+ fi
+
+ if test "X$skipped_export" != "X:" &&
+ func_len " $test_cmds" &&
+ len=$func_len_result &&
+ test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ :
+ else
+ # The command line is too long to link in one step, link piecewise
+ # or, if using GNU ld and skipped_export is not :, use a linker
+ # script.
+
+ # Save the value of $output and $libobjs because we want to
+ # use them later. If we have whole_archive_flag_spec, we
+ # want to use save_libobjs as it was before
+ # whole_archive_flag_spec was expanded, because we can't
+ # assume the linker understands whole_archive_flag_spec.
+ # This may have to be revisited, in case too many
+ # convenience libraries get linked in and end up exceeding
+ # the spec.
+ if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then
+ save_libobjs=$libobjs
+ fi
+ save_output=$output
+ output_la=`$ECHO "X$output" | $Xsed -e "$basename"`
+
+ # Clear the reloadable object creation command queue and
+ # initialize k to one.
+ test_cmds=
+ concat_cmds=
+ objlist=
+ last_robj=
+ k=1
+
+ if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then
+ output=${output_objdir}/${output_la}.lnkscript
+ func_verbose "creating GNU ld script: $output"
+ $ECHO 'INPUT (' > $output
+ for obj in $save_libobjs
+ do
+ $ECHO "$obj" >> $output
+ done
+ $ECHO ')' >> $output
+ delfiles="$delfiles $output"
+ elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then
+ output=${output_objdir}/${output_la}.lnk
+ func_verbose "creating linker input file list: $output"
+ : > $output
+ set x $save_libobjs
+ shift
+ firstobj=
+ if test "$compiler_needs_object" = yes; then
+ firstobj="$1 "
+ shift
+ fi
+ for obj
+ do
+ $ECHO "$obj" >> $output
+ done
+ delfiles="$delfiles $output"
+ output=$firstobj\"$file_list_spec$output\"
+ else
+ if test -n "$save_libobjs"; then
+ func_verbose "creating reloadable object files..."
+ output=$output_objdir/$output_la-${k}.$objext
+ eval test_cmds=\"$reload_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+
+ # Loop over the list of objects to be linked.
+ for obj in $save_libobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ if test "X$objlist" = X ||
+ test "$len" -lt "$max_cmd_len"; then
+ func_append objlist " $obj"
+ else
+ # The command $test_cmds is almost too long, add a
+ # command to the queue.
+ if test "$k" -eq 1 ; then
+ # The first file doesn't have a previous command to add.
+ eval concat_cmds=\"$reload_cmds $objlist $last_robj\"
+ else
+ # All subsequent reloadable object files will link in
+ # the last one created.
+ eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj~\$RM $last_robj\"
+ fi
+ last_robj=$output_objdir/$output_la-${k}.$objext
+ func_arith $k + 1
+ k=$func_arith_result
+ output=$output_objdir/$output_la-${k}.$objext
+ objlist=$obj
+ func_len " $last_robj"
+ func_arith $len0 + $func_len_result
+ len=$func_arith_result
+ fi
+ done
+ # Handle the remaining objects by creating one last
+ # reloadable object file. All subsequent reloadable object
+ # files will link in the last one created.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\"
+ fi
+ delfiles="$delfiles $output"
+
+ else
+ output=
+ fi
+
+ if ${skipped_export-false}; then
+ func_verbose "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $opt_dry_run || $RM $export_symbols
+ libobjs=$output
+ # Append the command to create the export file.
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\"
+ if test -n "$last_robj"; then
+ eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\"
+ fi
+ fi
+
+ test -n "$save_libobjs" &&
+ func_verbose "creating a temporary reloadable object file: $output"
+
+ # Loop through the commands generated above and execute them.
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $concat_cmds; do
+ IFS="$save_ifs"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ if test -n "$export_symbols_regex" && ${skipped_export-false}; then
+ func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ func_show_eval '$MV "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+
+ if ${skipped_export-false}; then
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ tmp_export_symbols="$export_symbols"
+ test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols"
+ $opt_dry_run || eval '$ECHO "X$include_expsyms" | $Xsed | $SP2NL >> "$tmp_export_symbols"'
+ fi
+
+ if test -n "$orig_export_symbols"; then
+ # The given exports_symbols file has to be filtered, so filter it.
+ func_verbose "filter symbol list for \`$libname.la' to tag DATA exports"
+ # FIXME: $output_objdir/$libname.filter potentially contains lots of
+ # 's' commands which not all seds can handle. GNU sed should be fine
+ # though. Also, the filter scales superlinearly with the number of
+ # global variables. join(1) would be nice here, but unfortunately
+ # isn't a blessed tool.
+ $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter
+ delfiles="$delfiles $export_symbols $output_objdir/$libname.filter"
+ export_symbols=$output_objdir/$libname.def
+ $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols
+ fi
+ fi
+
+ libobjs=$output
+ # Restore the value of output.
+ output=$save_output
+
+ if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+ # Expand the library linking commands again to reset the
+ # value of $libobjs for piecewise linking.
+
+ # Do each of the archive commands.
+ if test "$module" = yes && test -n "$module_cmds" ; then
+ if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then
+ cmds=$module_expsym_cmds
+ else
+ cmds=$module_cmds
+ fi
+ else
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ cmds=$archive_expsym_cmds
+ else
+ cmds=$archive_cmds
+ fi
+ fi
+ fi
+
+ if test -n "$delfiles"; then
+ # Append the command to remove temporary files to $cmds.
+ eval cmds=\"\$cmds~\$RM $delfiles\"
+ fi
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ libobjs="$libobjs $func_extract_archives_result"
+ test "X$libobjs" = "X " && libobjs=
+ fi
+
+ save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ eval cmd=\"$cmd\"
+ $opt_silent || {
+ func_quote_for_expand "$cmd"
+ eval "func_echo $func_quote_for_expand_result"
+ }
+ $opt_dry_run || eval "$cmd" || {
+ lt_exit=$?
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ ( cd "$output_objdir" && \
+ $RM "${realname}T" && \
+ $MV "${realname}U" "$realname" )
+ fi
+
+ exit $lt_exit
+ }
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $?
+
+ if test -n "$convenience"; then
+ if test -z "$whole_archive_flag_spec"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?'
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ func_warning "\`-dlopen' is ignored for objects"
+ fi
+
+ case " $deplibs" in
+ *\ -l* | *\ -L*)
+ func_warning "\`-l' and \`-L' are ignored for objects" ;;
+ esac
+
+ test -n "$rpath" && \
+ func_warning "\`-rpath' is ignored for objects"
+
+ test -n "$xrpath" && \
+ func_warning "\`-R' is ignored for objects"
+
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for objects"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for objects"
+
+ case $output in
+ *.lo)
+ test -n "$objs$old_deplibs" && \
+ func_fatal_error "cannot build library object \`$output' from non-libtool objects"
+
+ libobj=$output
+ func_lo2o "$libobj"
+ obj=$func_lo2o_result
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $opt_dry_run || $RM $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec and hope we can get by with
+ # turning comma into space..
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\"
+ reload_conv_objs=$reload_objs\ `$ECHO "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'`
+ else
+ gentop="$output_objdir/${obj}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $convenience
+ reload_conv_objs="$reload_objs $func_extract_archives_result"
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$ECHO "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ # $show "echo timestamp > $libobj"
+ # $opt_dry_run || eval "echo timestamp > $libobj" || exit $?
+ exit $EXIT_SUCCESS
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ func_execute_cmds "$reload_cmds" 'exit $?'
+ fi
+
+ if test -n "$gentop"; then
+ func_show_eval '${RM}r "$gentop"'
+ fi
+
+ exit $EXIT_SUCCESS
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result.exe;;
+ esac
+ test -n "$vinfo" && \
+ func_warning "\`-version-info' is ignored for programs"
+
+ test -n "$release" && \
+ func_warning "\`-release' is ignored for programs"
+
+ test "$preload" = yes \
+ && test "$dlopen_support" = unknown \
+ && test "$dlopen_self" = unknown \
+ && test "$dlopen_self_static" = unknown && \
+ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support."
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's/ -lc / System.ltframework /'`
+ ;;
+ esac
+
+ case $host in
+ *-*-darwin*)
+ # Don't allow lazy linking, it breaks C++ global constructors
+ # But is supposedly fixed on 10.4 or later (yay!).
+ if test "$tagname" = CXX ; then
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0} in
+ 10.[0123])
+ compile_command="$compile_command ${wl}-bind_at_load"
+ finalize_command="$finalize_command ${wl}-bind_at_load"
+ ;;
+ esac
+ fi
+ # Time to change all our "foo.ltframework" stuff back to "-framework foo"
+ compile_deplibs=`$ECHO "X $compile_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ finalize_deplibs=`$ECHO "X $finalize_deplibs" | $Xsed -e 's% \([^ $]*\).ltframework% -framework \1%g'`
+ ;;
+ esac
+
+
+ # move library search paths that coincide with paths to not yet
+ # installed libraries to the beginning of the library search list
+ new_libs=
+ for path in $notinst_path; do
+ case " $new_libs " in
+ *" -L$path/$objdir "*) ;;
+ *)
+ case " $compile_deplibs " in
+ *" -L$path/$objdir "*)
+ new_libs="$new_libs -L$path/$objdir" ;;
+ esac
+ ;;
+ esac
+ done
+ for deplib in $compile_deplibs; do
+ case $deplib in
+ -L*)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ ;;
+ *) new_libs="$new_libs $deplib" ;;
+ esac
+ done
+ compile_deplibs="$new_libs"
+
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
+ testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'`
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ ::) dllsearchpath=$libdir;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ case :$dllsearchpath: in
+ *":$testbindir:"*) ;;
+ ::) dllsearchpath=$testbindir;;
+ *) dllsearchpath="$dllsearchpath:$testbindir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$ECHO "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$ECHO "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ func_generate_dlsyms "$outputname" "@PROGRAM@" "no"
+
+ # template prelinking step
+ if test -n "$prelink_cmds"; then
+ func_execute_cmds "$prelink_cmds" 'exit $?'
+ fi
+
+ wrappers_required=yes
+ case $host in
+ *cygwin* | *mingw* )
+ if test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ *cegcc)
+ # Disable wrappers for cegcc, we are cross compiling anyway.
+ wrappers_required=no
+ ;;
+ *)
+ if test "$need_relink" = no || test "$build_libtool_libs" != yes; then
+ wrappers_required=no
+ fi
+ ;;
+ esac
+ if test "$wrappers_required" = no; then
+ # Replace the output file specification.
+ compile_command=`$ECHO "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ exit_status=0
+ func_show_eval "$link_command" 'exit_status=$?'
+
+ # Delete the generated files.
+ if test -f "$output_objdir/${outputname}S.${objext}"; then
+ func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"'
+ fi
+
+ exit $exit_status
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $opt_dry_run || $RM $output
+ # Link the executable and exit
+ func_show_eval "$link_command" 'exit $?'
+ exit $EXIT_SUCCESS
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ func_warning "this platform does not like uninstalled shared libraries"
+ func_warning "\`$output' will be relinked during installation"
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$ECHO "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$ECHO "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ func_show_eval "$link_command" 'exit $?'
+
+ # Now create the wrapper script.
+ func_verbose "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ relink_command="(cd `pwd`; $relink_command)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $ECHO for shipping.
+ if test "X$ECHO" = "X$SHELL $progpath --fallback-echo"; then
+ case $progpath in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$progpath --fallback-echo";;
+ esac
+ qecho=`$ECHO "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$ECHO "X$ECHO" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if not in dry run mode.
+ $opt_dry_run || {
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) func_stripname '' '.exe' "$output"
+ output=$func_stripname_result ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*)
+ exeext=.exe
+ func_stripname '' '.exe' "$outputname"
+ outputname=$func_stripname_result ;;
+ *) exeext= ;;
+ esac
+ case $host in
+ *cygwin* | *mingw* )
+ func_dirname_and_basename "$output" "" "."
+ output_name=$func_basename_result
+ output_path=$func_dirname_result
+ cwrappersource="$output_path/$objdir/lt-$output_name.c"
+ cwrapper="$output_path/$output_name.exe"
+ $RM $cwrappersource $cwrapper
+ trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_cwrapperexe_src > $cwrappersource
+
+ # The wrapper executable is built using the $host compiler,
+ # because it contains $host paths and files. If cross-
+ # compiling, it, like the target executable, must be
+ # executed on the $host or under an emulation environment.
+ $opt_dry_run || {
+ $LTCC $LTCFLAGS -o $cwrapper $cwrappersource
+ $STRIP $cwrapper
+ }
+
+ # Now, create the wrapper script for func_source use:
+ func_ltwrapper_scriptname $cwrapper
+ $RM $func_ltwrapper_scriptname_result
+ trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15
+ $opt_dry_run || {
+ # note: this script will not be executed, so do not chmod.
+ if test "x$build" = "x$host" ; then
+ $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result
+ else
+ func_emit_wrapper no > $func_ltwrapper_scriptname_result
+ fi
+ }
+ ;;
+ * )
+ $RM $output
+ trap "$RM $output; exit $EXIT_FAILURE" 1 2 15
+
+ func_emit_wrapper no > $output
+ chmod +x $output
+ ;;
+ esac
+ }
+ exit $EXIT_SUCCESS
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save $symfileobj"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$old_deplibs $non_pic_objects"
+ if test "$preload" = yes && test -f "$symfileobj"; then
+ oldobjs="$oldobjs $symfileobj"
+ fi
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $addlibs
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ cmds=$old_archive_from_new_cmds
+ else
+
+ # Add any objects from preloaded convenience libraries
+ if test -n "$dlprefiles"; then
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+
+ func_extract_archives $gentop $dlprefiles
+ oldobjs="$oldobjs $func_extract_archives_result"
+ fi
+
+ # POSIX demands no paths to be encoded in archives. We have
+ # to avoid creating archives with duplicate basenames if we
+ # might have to extract them afterwards, e.g., when creating a
+ # static archive out of a convenience library, or when linking
+ # the entirety of a libtool archive into another (currently
+ # not supported by libtool).
+ if (for obj in $oldobjs
+ do
+ func_basename "$obj"
+ $ECHO "$func_basename_result"
+ done | sort | sort -uc >/dev/null 2>&1); then
+ :
+ else
+ $ECHO "copying selected object files to avoid basename conflicts..."
+ gentop="$output_objdir/${outputname}x"
+ generated="$generated $gentop"
+ func_mkdir_p "$gentop"
+ save_oldobjs=$oldobjs
+ oldobjs=
+ counter=1
+ for obj in $save_oldobjs
+ do
+ func_basename "$obj"
+ objbase="$func_basename_result"
+ case " $oldobjs " in
+ " ") oldobjs=$obj ;;
+ *[\ /]"$objbase "*)
+ while :; do
+ # Make sure we don't pick an alternate name that also
+ # overlaps.
+ newobj=lt$counter-$objbase
+ func_arith $counter + 1
+ counter=$func_arith_result
+ case " $oldobjs " in
+ *[\ /]"$newobj "*) ;;
+ *) if test ! -f "$gentop/$newobj"; then break; fi ;;
+ esac
+ done
+ func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj"
+ oldobjs="$oldobjs $gentop/$newobj"
+ ;;
+ *) oldobjs="$oldobjs $obj" ;;
+ esac
+ done
+ fi
+ eval cmds=\"$old_archive_cmds\"
+
+ func_len " $cmds"
+ len=$func_len_result
+ if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then
+ cmds=$old_archive_cmds
+ else
+ # the command line is too long to link in one step, link in parts
+ func_verbose "using piecewise archive linking..."
+ save_RANLIB=$RANLIB
+ RANLIB=:
+ objlist=
+ concat_cmds=
+ save_oldobjs=$oldobjs
+ oldobjs=
+ # Is there a better way of finding the last object in the list?
+ for obj in $save_oldobjs
+ do
+ last_oldobj=$obj
+ done
+ eval test_cmds=\"$old_archive_cmds\"
+ func_len " $test_cmds"
+ len0=$func_len_result
+ len=$len0
+ for obj in $save_oldobjs
+ do
+ func_len " $obj"
+ func_arith $len + $func_len_result
+ len=$func_arith_result
+ func_append objlist " $obj"
+ if test "$len" -lt "$max_cmd_len"; then
+ :
+ else
+ # the above command should be used before it gets too long
+ oldobjs=$objlist
+ if test "$obj" = "$last_oldobj" ; then
+ RANLIB=$save_RANLIB
+ fi
+ test -z "$concat_cmds" || concat_cmds=$concat_cmds~
+ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\"
+ objlist=
+ len=$len0
+ fi
+ done
+ RANLIB=$save_RANLIB
+ oldobjs=$objlist
+ if test "X$oldobjs" = "X" ; then
+ eval cmds=\"\$concat_cmds\"
+ else
+ eval cmds=\"\$concat_cmds~\$old_archive_cmds\"
+ fi
+ fi
+ fi
+ func_execute_cmds "$cmds" 'exit $?'
+ done
+
+ test -n "$generated" && \
+ func_show_eval "${RM}r$generated"
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ func_verbose "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ func_quote_for_eval "$var_value"
+ relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)"
+ relink_command=`$ECHO "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ if test "$hardcode_automatic" = yes ; then
+ relink_command=
+ fi
+
+ # Only create the output if not a dry run.
+ $opt_dry_run || {
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ func_basename "$deplib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$deplib' is not a valid libtool archive"
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+
+ for lib in $dlfiles; do
+ case $lib in
+ *.la)
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlfiles="$newdlfiles $libdir/$name"
+ ;;
+ *) newdlfiles="$newdlfiles $lib" ;;
+ esac
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ *.la)
+ # Only pass preopened files to the pseudo-archive (for
+ # eventual linking with the app. that links it) if we
+ # didn't already link the preopened objects directly into
+ # the library:
+ func_basename "$lib"
+ name="$func_basename_result"
+ eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ test -z "$libdir" && \
+ func_fatal_error "\`$lib' is not a valid libtool archive"
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ ;;
+ esac
+ done
+ dlprefiles="$newdlprefiles"
+ else
+ newdlfiles=
+ for lib in $dlfiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlfiles="$newdlfiles $abs"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ case $lib in
+ [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;;
+ *) abs=`pwd`"/$lib" ;;
+ esac
+ newdlprefiles="$newdlprefiles $abs"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $RM $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $ECHO > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Linker flags that can not go in dependency_libs.
+inherited_linker_flags='$new_inherited_linker_flags'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Names of additional weak libraries provided by this library
+weak_library_names='$weak_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Should we warn about portability when linking against -modules?
+shouldnotlink=$module
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test "$need_relink" = yes; then
+ $ECHO >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ }
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?'
+ ;;
+ esac
+ exit $EXIT_SUCCESS
+}
+
+{ test "$mode" = link || test "$mode" = relink; } &&
+ func_mode_link ${1+"$@"}
+
+
+# func_mode_uninstall arg...
+func_mode_uninstall ()
+{
+ $opt_debug
+ RM="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) RM="$RM $arg"; rmforce=yes ;;
+ -*) RM="$RM $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ test -z "$RM" && \
+ func_fatal_help "you must specify an RM program"
+
+ rmdirs=
+
+ origobjdir="$objdir"
+ for file in $files; do
+ func_dirname "$file" "" "."
+ dir="$func_dirname_result"
+ if test "X$dir" = X.; then
+ objdir="$origobjdir"
+ else
+ objdir="$dir/$origobjdir"
+ fi
+ func_basename "$file"
+ name="$func_basename_result"
+ test "$mode" = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test "$mode" = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if { test -L "$file"; } >/dev/null 2>&1 ||
+ { test -h "$file"; } >/dev/null 2>&1 ||
+ test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if func_lalib_p "$file"; then
+ func_source $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+
+ case "$mode" in
+ clean)
+ case " $library_names " in
+ # " " in the beginning catches empty $dlname
+ *" $dlname "*) ;;
+ *) rmfiles="$rmfiles $objdir/$dlname" ;;
+ esac
+ test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+ ;;
+ uninstall)
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1'
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ ;;
+ esac
+ fi
+ ;;
+
+ *.lo)
+ # Possibly a libtool object, so verify it.
+ if func_lalib_p "$file"; then
+
+ # Read the .lo file
+ func_source $dir/$name
+
+ # Add PIC object to the list of files to remove.
+ if test -n "$pic_object" &&
+ test "$pic_object" != none; then
+ rmfiles="$rmfiles $dir/$pic_object"
+ fi
+
+ # Add non-PIC object to the list of files to remove.
+ if test -n "$non_pic_object" &&
+ test "$non_pic_object" != none; then
+ rmfiles="$rmfiles $dir/$non_pic_object"
+ fi
+ fi
+ ;;
+
+ *)
+ if test "$mode" = clean ; then
+ noexename=$name
+ case $file in
+ *.exe)
+ func_stripname '' '.exe' "$file"
+ file=$func_stripname_result
+ func_stripname '' '.exe' "$name"
+ noexename=$func_stripname_result
+ # $file with .exe has already been added to rmfiles,
+ # add $file without .exe
+ rmfiles="$rmfiles $file"
+ ;;
+ esac
+ # Do a test to see if this is a libtool program.
+ if func_ltwrapper_p "$file"; then
+ if func_ltwrapper_executable_p "$file"; then
+ func_ltwrapper_scriptname "$file"
+ relink_command=
+ func_source $func_ltwrapper_scriptname_result
+ rmfiles="$rmfiles $func_ltwrapper_scriptname_result"
+ else
+ relink_command=
+ func_source $dir/$noexename
+ fi
+
+ # note $name still contains .exe if it was in $file originally
+ # as does the version of $file that was added into $rmfiles
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ if test "X$noexename" != "X$name" ; then
+ rmfiles="$rmfiles $objdir/lt-${noexename}.c"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ func_show_eval "$RM $rmfiles" 'exit_status=1'
+ done
+ objdir="$origobjdir"
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ func_show_eval "rmdir $dir >/dev/null 2>&1"
+ fi
+ done
+
+ exit $exit_status
+}
+
+{ test "$mode" = uninstall || test "$mode" = clean; } &&
+ func_mode_uninstall ${1+"$@"}
+
+test -z "$mode" && {
+ help="$generic_help"
+ func_fatal_help "you must specify a MODE"
+}
+
+test -z "$exec_cmd" && \
+ func_fatal_help "invalid operation mode \`$mode'"
+
+if test -n "$exec_cmd"; then
+ eval exec "$exec_cmd"
+ exit $EXIT_FAILURE
+fi
+
+exit $exit_status
+
+
+# The TAGs below are defined such that we never get into a situation
+# in which we disable both kinds of libraries. Given conflicting
+# choices, we go for a static library, that is the most portable,
+# since we can't tell whether shared libraries were disabled because
+# the user asked for that or because the platform doesn't support
+# them. This is particularly important on AIX, because we don't
+# support having both static and shared libraries enabled at the same
+# time on that platform, so we default to a shared-only configuration.
+# If a disable-shared tag is given, we'll fallback to a static-only
+# configuration. But we'll never go from static-only to shared-only.
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-shared
+build_libtool_libs=no
+build_old_libs=yes
+# ### END LIBTOOL TAG CONFIG: disable-shared
+
+# ### BEGIN LIBTOOL TAG CONFIG: disable-static
+build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac`
+# ### END LIBTOOL TAG CONFIG: disable-static
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
+# vi:sw=2
+
diff --git a/build-aux/update-copyright b/build-aux/update-copyright
new file mode 100755
index 00000000..28ff4418
--- /dev/null
+++ b/build-aux/update-copyright
@@ -0,0 +1,266 @@
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+ & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+ if 0;
+# Update an FSF copyright year list to include the current year.
+
+my $VERSION = '2009-12-28.11:09'; # UTC
+
+# Copyright (C) 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 General Public License as published by
+# the Free Software Foundation; either version 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering and Joel E. Denny
+
+# The arguments to this script should be names of files that contain FSF
+# copyright statements to be updated. For example, you might wish to
+# use the update-copyright target rule in maint.mk from gnulib's
+# maintainer-makefile module.
+#
+# Iff an FSF copyright statement is recognized in a file and the final
+# year is not the current year, then the statement is updated for the
+# new year and it is reformatted to:
+#
+# 1. Fit within 72 columns.
+# 2. Convert 2-digit years to 4-digit years by prepending "19".
+# 3. Expand copyright year intervals. (See "Environment variables"
+# below.)
+#
+# A warning is printed for every file for which no FSF copyright
+# statement is recognized.
+#
+# Each file's FSF copyright statement must be formated correctly in
+# order to be recognized. For example, each of these is fine:
+#
+# Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+#
+# # Copyright (C) 1990-2005, 2007-2009 Free Software
+# # Foundation, Inc.
+#
+# /*
+# * Copyright &copy; 90,2005,2007-2009
+# * Free Software Foundation, Inc.
+# */
+#
+# However, the following format is not recognized because the line
+# prefix changes after the first line:
+#
+# ## Copyright (C) 1990-2005, 2007-2009 Free Software
+# # Foundation, Inc.
+#
+# The following copyright statement is not recognized because the
+# copyright holder is not the FSF:
+#
+# Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+#
+# However, any correctly formatted FSF copyright statement following
+# either of the previous two copyright statements would be recognized.
+#
+# The exact conditions that a file's FSF copyright statement must meet
+# to be recognized are:
+#
+# 1. It is the first FSF copyright statement that meets all of the
+# following conditions. Subsequent FSF copyright statements are
+# ignored.
+# 2. Its format is "Copyright (C)", then a list of copyright years,
+# and then the name of the copyright holder, which is "Free
+# Software Foundation, Inc.".
+# 3. The "(C)" takes one of the following forms or is omitted
+# entirely:
+#
+# A. (C)
+# B. (c)
+# C. @copyright{}
+# D. &copy;
+#
+# 4. The "Copyright" appears at the beginning of a line except that it
+# may be prefixed by any sequence (e.g., a comment) of no more than
+# 5 characters.
+# 5. Iff such a prefix is present, the same prefix appears at the
+# beginning of each remaining line within the FSF copyright
+# statement. There is one exception in order to support C-style
+# comments: if the first line's prefix contains nothing but
+# whitespace surrounding a "/*", then the prefix for all subsequent
+# lines is the same as the first line's prefix except with each of
+# "/" and possibly "*" replaced by a " ". The replacement of "*"
+# by " " is consistent throughout all subsequent lines.
+# 6. Blank lines, even if preceded by the prefix, do not appear
+# within the FSF copyright statement.
+# 7. Each copyright year is 2 or 4 digits, and years are separated by
+# commas or dashes. Whitespace may appear after commas.
+#
+# Environment variables:
+#
+# 1. If UPDATE_COPYRIGHT_FORCE=1, a recognized FSF copyright statement
+# is reformatted even if it does not need updating for the new
+# year. If unset or set to 0, only updated FSF copyright
+# statements are reformatted.
+# 2. If UPDATE_COPYRIGHT_USE_INTERVALS=1, every series of consecutive
+# copyright years (such as 90, 1991, 1992-2007, 2008) in a
+# reformatted FSF copyright statement is collapsed to a single
+# interval (such as 1990-2008). If unset or set to 0, all existing
+# copyright year intervals in a reformatted FSF copyright statement
+# are expanded instead.
+# 3. For testing purposes, you can set the assumed current year in
+# UPDATE_COPYRIGHT_YEAR.
+# 4. The default maximum line length for a copyright line is 72.
+# Set UPDATE_COPYRIGHT_MAX_LINE_LENGTH to use a different length.
+
+use strict;
+use warnings;
+
+my $copyright_re = 'Copyright';
+my $circle_c_re = '(?:\([cC]\)|@copyright{}|&copy;)';
+my $holder = 'Free Software Foundation, Inc.';
+my $prefix_max = 5;
+my $margin = $ENV{UPDATE_COPYRIGHT_MAX_LINE_LENGTH};
+!$margin || $margin !~ m/^\d+$/
+ and $margin = 72;
+
+my $tab_width = 8;
+
+my $this_year = $ENV{UPDATE_COPYRIGHT_YEAR};
+if (!$this_year || $this_year !~ m/^\d{4}$/)
+ {
+ my ($sec, $min, $hour, $mday, $month, $year) = localtime (time ());
+ $this_year = $year + 1900;
+ }
+
+# Unless the file consistently uses "\r\n" as the EOL, use "\n" instead.
+my $eol = /(?:^|[^\r])\n/ ? "\n" : "\r\n";
+
+my $leading;
+my $prefix;
+my $ws_re;
+my $stmt_re;
+while (/(^|\n)(.{0,$prefix_max})$copyright_re/g)
+ {
+ $leading = "$1$2";
+ $prefix = $2;
+ if ($prefix =~ /^(\s*\/)\*(\s*)$/)
+ {
+ $prefix =~ s,/, ,;
+ my $prefix_ws = $prefix;
+ $prefix_ws =~ s/\*/ /; # Only whitespace.
+ if (/\G(?:[^*\n]|\*[^\/\n])*\*?\n$prefix_ws/)
+ {
+ $prefix = $prefix_ws;
+ }
+ }
+ $ws_re = '[ \t\r\f]'; # \s without \n
+ $ws_re =
+ "(?:$ws_re*(?:$ws_re|\\n" . quotemeta($prefix) . ")$ws_re*)";
+ my $holder_re = $holder;
+ $holder_re =~ s/\s/$ws_re/g;
+ my $stmt_remainder_re =
+ "(?:$ws_re$circle_c_re)?"
+ . "$ws_re(?:(?:\\d\\d)?\\d\\d(?:,$ws_re?|-))*"
+ . "((?:\\d\\d)?\\d\\d)$ws_re$holder_re";
+ if (/\G$stmt_remainder_re/)
+ {
+ $stmt_re =
+ quotemeta($leading) . "($copyright_re$stmt_remainder_re)";
+ last;
+ }
+ }
+if (defined $stmt_re)
+ {
+ /$stmt_re/ or die; # Should never die.
+ my $stmt = $1;
+ my $final_year_orig = $2;
+
+ # Handle two-digit year numbers like "98" and "99".
+ my $final_year = $final_year_orig;
+ $final_year <= 99
+ and $final_year += 1900;
+
+ if ($final_year != $this_year)
+ {
+ # Update the year.
+ $stmt =~ s/$final_year_orig/$final_year, $this_year/;
+ }
+ if ($final_year != $this_year || $ENV{'UPDATE_COPYRIGHT_FORCE'})
+ {
+ # Normalize all whitespace including newline-prefix sequences.
+ $stmt =~ s/$ws_re/ /g;
+
+ # Put spaces after commas.
+ $stmt =~ s/, ?/, /g;
+
+ # Convert 2-digit to 4-digit years.
+ $stmt =~ s/(\b\d\d\b)/19$1/g;
+
+ # Make the use of intervals consistent.
+ if (!$ENV{UPDATE_COPYRIGHT_USE_INTERVALS})
+ {
+ $stmt =~ s/(\d{4})-(\d{4})/join(', ', $1..$2)/eg;
+ }
+ else
+ {
+ $stmt =~
+ s/
+ (\d{4})
+ (?:
+ (,\ |-)
+ ((??{
+ if ($2 eq '-') { '\d{4}'; }
+ elsif (!$3) { $1 + 1; }
+ else { $3 + 1; }
+ }))
+ )+
+ /$1-$3/gx;
+ }
+
+ # Format within margin.
+ my $stmt_wrapped;
+ my $text_margin = $margin - length($prefix);
+ if ($prefix =~ /^(\t+)/)
+ {
+ $text_margin -= length($1) * ($tab_width - 1);
+ }
+ while (length $stmt)
+ {
+ if (($stmt =~ s/^(.{1,$text_margin})(?: |$)//)
+ || ($stmt =~ s/^([\S]+)(?: |$)//))
+ {
+ my $line = $1;
+ $stmt_wrapped .= $stmt_wrapped ? "$eol$prefix" : $leading;
+ $stmt_wrapped .= $line;
+ }
+ else
+ {
+ # Should be unreachable, but we don't want an infinite
+ # loop if it can be reached.
+ die;
+ }
+ }
+
+ # Replace the old copyright statement.
+ s/$stmt_re/$stmt_wrapped/;
+ }
+ }
+else
+ {
+ print STDERR "$ARGV: warning: FSF copyright statement not found\n";
+ }
+
+# Local variables:
+# mode: perl
+# indent-tabs-mode: nil
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "my $VERSION = '"
+# time-stamp-format: "%:y-%02m-%02d.%02H:%02M"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "'; # UTC"
+# End:
diff --git a/build-aux/useless-if-before-free b/build-aux/useless-if-before-free
new file mode 100755
index 00000000..6aa7d396
--- /dev/null
+++ b/build-aux/useless-if-before-free
@@ -0,0 +1,209 @@
+eval '(exit $?0)' && eval 'exec perl -wST "$0" ${1+"$@"}'
+ & eval 'exec perl -wST "$0" $argv:q'
+ if 0;
+# Detect instances of "if (p) free (p);".
+# Likewise for "if (p != NULL) free (p);". And with braces.
+# Also detect "if (NULL != p) free (p);".
+# And with 0 in place of NULL.
+
+my $VERSION = '2009-04-16 15:57'; # UTC
+# The definition above must lie within the first 8 lines in order
+# for the Emacs time-stamp write hook (at end) to update it.
+# If you change this file with Emacs, please let the write hook
+# do its job. Otherwise, update this string manually.
+
+# Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Written by Jim Meyering
+
+use strict;
+use warnings;
+use Getopt::Long;
+
+(my $ME = $0) =~ s|.*/||;
+
+# use File::Coda; # http://meyering.net/code/Coda/
+END {
+ defined fileno STDOUT or return;
+ close STDOUT and return;
+ warn "$ME: failed to close standard output: $!\n";
+ $? ||= 1;
+}
+
+sub usage ($)
+{
+ my ($exit_code) = @_;
+ my $STREAM = ($exit_code == 0 ? *STDOUT : *STDERR);
+ if ($exit_code != 0)
+ {
+ print $STREAM "Try `$ME --help' for more information.\n";
+ }
+ else
+ {
+ print $STREAM <<EOF;
+Usage: $ME [OPTIONS] FILE...
+
+Detect any instance in FILE of a useless "if" test before a free call, e.g.,
+"if (p) free (p);". Any such test may be safely removed without affecting
+the semantics of the C code in FILE. Use --name=FOO --name=BAR to also
+detect free-like functions named FOO and BAR.
+
+OPTIONS:
+
+ --list print only the name of each matching FILE (\0-terminated)
+ --name=N add name N to the list of \`free\'-like functions to detect;
+ may be repeated
+
+ --help display this help and exit
+ --version output version information and exit
+
+Exit status:
+
+ 0 one or more matches
+ 1 no match
+ 2 an error
+
+EXAMPLE:
+
+For example, this command prints all removable "if" tests before "free"
+and "kfree" calls in the linux kernel sources:
+
+ git ls-files -z |xargs -0 $ME --name=kfree
+
+EOF
+ }
+ exit $exit_code;
+}
+
+sub is_NULL ($)
+{
+ my ($expr) = @_;
+ return ($expr eq 'NULL' || $expr eq '0');
+}
+
+{
+ sub EXIT_MATCH {0}
+ sub EXIT_NO_MATCH {1}
+ sub EXIT_ERROR {2}
+ my $err = EXIT_NO_MATCH;
+
+ my $list;
+ my @name = qw(free);
+ GetOptions
+ (
+ help => sub { usage 0 },
+ version => sub { print "$ME version $VERSION\n"; exit },
+ list => \$list,
+ 'name=s@' => \@name,
+ ) or usage 1;
+
+ # Make sure we have the right number of non-option arguments.
+ # Always tell the user why we fail.
+ @ARGV < 1
+ and (warn "$ME: missing FILE argument\n"), usage EXIT_ERROR;
+
+ my $or = join '|', @name;
+ my $regexp = qr/(?:$or)/;
+
+ # Set the input record separator.
+ # Note: this makes it impractical to print line numbers.
+ $/ = '"';
+
+ my $found_match = 0;
+ FILE:
+ foreach my $file (@ARGV)
+ {
+ open FH, '<', $file
+ or (warn "$ME: can't open `$file' for reading: $!\n"),
+ $err = EXIT_ERROR, next;
+ while (defined (my $line = <FH>))
+ {
+ while ($line =~
+ /\b(if\s*\(\s*([^)]+?)(?:\s*!=\s*([^)]+?))?\s*\)
+ # 1 2 3
+ (?: \s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)|
+ \s*\{\s*$regexp\s*\((?:\s*\([^)]+\))?\s*([^)]+)\)\s*;\s*\}))/sxg)
+ {
+ my $all = $1;
+ my ($lhs, $rhs) = ($2, $3);
+ my ($free_opnd, $braced_free_opnd) = ($4, $5);
+ my $non_NULL;
+ if (!defined $rhs) { $non_NULL = $lhs }
+ elsif (is_NULL $rhs) { $non_NULL = $lhs }
+ elsif (is_NULL $lhs) { $non_NULL = $rhs }
+ else { next }
+
+ # Compare the non-NULL part of the "if" expression and the
+ # free'd expression, without regard to white space.
+ $non_NULL =~ tr/ \t//d;
+ my $e2 = defined $free_opnd ? $free_opnd : $braced_free_opnd;
+ $e2 =~ tr/ \t//d;
+ if ($non_NULL eq $e2)
+ {
+ $found_match = 1;
+ $list
+ and (print "$file\0"), next FILE;
+ print "$file: $all\n";
+ }
+ }
+ }
+ }
+ continue
+ {
+ close FH;
+ }
+
+ $found_match && $err == EXIT_NO_MATCH
+ and $err = EXIT_MATCH;
+
+ exit $err;
+}
+
+my $foo = <<'EOF';
+# The above is to *find* them.
+# This adjusts them, removing the unnecessary "if (p)" part.
+
+# FIXME: do something like this as an option (doesn't do braces):
+free=xfree
+git grep -l -z "$free *(" \
+ | xargs -0 useless-if-before-free -l --name="$free" \
+ | xargs -0 perl -0x3b -pi -e \
+ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s+('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\))/$2/s'
+
+# Use the following to remove redundant uses of kfree inside braces.
+# Note that -0777 puts perl in slurp-whole-file mode;
+# but we have plenty of memory, these days...
+free=kfree
+git grep -l -z "$free *(" \
+ | xargs -0 useless-if-before-free -l --name="$free" \
+ | xargs -0 perl -0777 -pi -e \
+ 's/\bif\s*\(\s*(\S+?)(?:\s*!=\s*(?:0|NULL))?\s*\)\s*\{\s*('"$free"'\s*\((?:\s*\([^)]+\))?\s*\1\s*\);)\s*\}[^\n]*$/$2/gms'
+
+Be careful that the result of the above transformation is valid.
+If the matched string is followed by "else", then obviously, it won't be.
+
+When modifying files, refuse to process anything other than a regular file.
+EOF
+
+## Local Variables:
+## mode: perl
+## indent-tabs-mode: nil
+## eval: (add-hook 'write-file-hooks 'time-stamp)
+## time-stamp-start: "my $VERSION = '"
+## time-stamp-format: "%:y-%02m-%02d %02H:%02M"
+## time-stamp-time-zone: "UTC"
+## time-stamp-end: "'; # UTC"
+## End:
diff --git a/build-aux/vc-list-files b/build-aux/vc-list-files
new file mode 100755
index 00000000..b9f2fbd8
--- /dev/null
+++ b/build-aux/vc-list-files
@@ -0,0 +1,116 @@
+#!/bin/sh
+# List version-controlled file names.
+
+# Print a version string.
+scriptversion=2010-02-21.13; # UTC
+
+# Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+
+# List the specified version-controlled files.
+# With no argument, list them all. With a single DIRECTORY argument,
+# list the version-controlled files in that directory.
+
+# If there's an argument, it must be a single, "."-relative directory name.
+# cvsu is part of the cvsutils package: http://www.red-bean.com/cvsutils/
+
+postprocess=
+case $1 in
+ --help) cat <<EOF
+Usage: $0 [-C SRCDIR] [DIR]
+
+Output a list of version-controlled files in DIR (default .), relative to
+SRCDIR (default .). SRCDIR must be the top directory of a checkout.
+
+Options:
+ --help print this help, then exit
+ --version print version number, then exit
+ -C SRCDIR change directory to SRCDIR before generating list
+
+Report bugs and patches to <bug-gnulib@gnu.org>.
+EOF
+ exit ;;
+
+ --version)
+ year=`echo "$scriptversion" | sed 's/[^0-9].*//'`
+ cat <<EOF
+vc-list-files $scriptversion
+Copyright (C) $year Free Software Foundation, Inc,
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+EOF
+ exit ;;
+
+ -C)
+ test "$2" = . || postprocess="| sed 's|^|$2/|'"
+ cd "$2" || exit 1
+ shift; shift ;;
+esac
+
+dir=
+case $# in
+ 0) ;;
+ 1) dir=$1 ;;
+ *) echo "$0: too many arguments" 1>&2
+ echo "Usage: $0 [-C srcdir] [DIR]" 1>&2; exit 1;;
+esac
+
+test "x$dir" = x && dir=.
+
+if test -d .git; then
+ test "x$dir" = x. \
+ && dir= sed_esc= \
+ || { dir="$dir/"; sed_esc=`echo "$dir"|env sed 's,\([\\/]\),\\\\\1,g'`; }
+ # Ignore git symlinks - either they point into the tree, in which case
+ # we don't need to visit the target twice, or they point somewhere
+ # else (often into a submodule), in which case the content does not
+ # belong to this package.
+ eval exec git ls-tree -r 'HEAD:"$dir"' \
+ \| sed -n '"s/^100[^ ]*./$sed_esc/p"' $postprocess
+elif test -d .hg; then
+ eval exec hg locate '"$dir/*"' $postprocess
+elif test -d .bzr; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ eval exec bzr ls -R --versioned '"$dir"' $postprocess
+elif test -d CVS; then
+ test "$postprocess" = '' && postprocess="| sed 's|^\./||'"
+ if test -x build-aux/cvsu; then
+ eval build-aux/cvsu --find --types=AFGM '"$dir"' $postprocess
+ elif (cvsu --help) >/dev/null 2>&1; then
+ eval cvsu --find --types=AFGM '"$dir"' $postprocess
+ else
+ eval awk -F/ \''{ \
+ if (!$1 && $3 !~ /^-/) { \
+ f=FILENAME; \
+ if (f ~ /CVS\/Entries$/) \
+ f = substr(f, 1, length(f)-11); \
+ print f $2; \
+ }}'\'' \
+ `find "$dir" -name Entries -print` /dev/null' $postprocess
+ fi
+else
+ echo "$0: Failed to determine type of version control used in `pwd`" 1>&2
+ exit 1
+fi
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-time-zone: "UTC"
+# time-stamp-end: "; # UTC"
+# End:
diff --git a/build-aux/warn-on-use.h b/build-aux/warn-on-use.h
new file mode 100755
index 00000000..b314d36b
--- /dev/null
+++ b/build-aux/warn-on-use.h
@@ -0,0 +1,75 @@
+/* A C macro for emitting warnings if a function is used.
+ Copyright (C) 2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* _GL_WARN_ON_USE(function, "literal string") issues a declaration
+ for FUNCTION which will then trigger a compiler warning containing
+ the text of "literal string" anywhere that function is called, if
+ supported by the compiler. If the compiler does not support this
+ feature, the macro expands to an unused extern declaration.
+
+ This macro is useful for marking a function as a potential
+ portability trap, with the intent that "literal string" include
+ instructions on the replacement function that should be used
+ instead. However, one of the reasons that a function is a
+ portability trap is if it has the wrong signature. Declaring
+ FUNCTION with a different signature in C is a compilation error, so
+ this macro must use the same type as any existing declaration so
+ that programs that avoid the problematic FUNCTION do not fail to
+ compile merely because they included a header that poisoned the
+ function. But this implies that _GL_WARN_ON_USE is only safe to
+ use if FUNCTION is known to already have a declaration. Use of
+ this macro implies that there must not be any other macro hiding
+ the declaration of FUNCTION; but undefining FUNCTION first is part
+ of the poisoning process anyway (although for symbols that are
+ provided only via a macro, the result is a compilation error rather
+ than a warning containing "literal string"). Also note that in
+ C++, it is only safe to use if FUNCTION has no overloads.
+
+ For an example, it is possible to poison 'getline' by:
+ - adding a call to gl_WARN_ON_USE_PREPARE([[#include <stdio.h>]],
+ [getline]) in configure.ac, which potentially defines
+ HAVE_RAW_DECL_GETLINE
+ - adding this code to a header that wraps the system <stdio.h>:
+ #undef getline
+ #if HAVE_RAW_DECL_GETLINE
+ _GL_WARN_ON_USE (getline, "getline is required by POSIX 2008, but"
+ "not universally present; use the gnulib module getline");
+ #endif
+
+ It is not possible to directly poison global variables. But it is
+ possible to write a wrapper accessor function, and poison that
+ (less common usage, like &environ, will cause a compilation error
+ rather than issue the nice warning, but the end result of informing
+ the developer about their portability problem is still achieved):
+ #if HAVE_RAW_DECL_ENVIRON
+ static inline char ***rpl_environ (void) { return &environ; }
+ _GL_WARN_ON_USE (rpl_environ, "environ is not always properly declared");
+ # undef environ
+ # define environ (*rpl_environ ())
+ #endif
+ */
+#ifndef _GL_WARN_ON_USE
+
+# if 4 < __GNUC__ || (__GNUC__ == 4 && 3 <= __GNUC_MINOR__)
+/* A compiler attribute is available in gcc versions 4.3.0 and later. */
+# define _GL_WARN_ON_USE(function, message) \
+extern __typeof__ (function) function __attribute__ ((__warning__ (message)))
+
+# else /* Unsupported. */
+# define _GL_WARN_ON_USE(function, message) \
+extern int _gl_warn_on_use
+# endif
+#endif
diff --git a/configure b/configure
new file mode 100755
index 00000000..e2ea56a0
--- /dev/null
+++ b/configure
@@ -0,0 +1,45149 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.67 for GNU M4 1.9a.577-b3131-dirty.
+#
+# Report bugs to <bug-m4@gnu.org>.
+#
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
+#
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test "x$CONFIG_SHELL" = x; then
+ as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '\${1+\"\$@\"}'='\"\$@\"'
+ setopt NO_GLOB_SUBST
+else
+ case \`(set -o) 2>/dev/null\` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+"
+ as_required="as_fn_return () { (exit \$1); }
+as_fn_success () { as_fn_return 0; }
+as_fn_failure () { as_fn_return 1; }
+as_fn_ret_success () { return 0; }
+as_fn_ret_failure () { return 1; }
+
+exitcode=0
+as_fn_success || { exitcode=1; echo as_fn_success failed.; }
+as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
+as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
+as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
+if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
+
+else
+ exitcode=1; echo positional parameters were not saved.
+fi
+test x\$exitcode = x0 || exit 1"
+ as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
+ as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
+ eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
+ test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
+test \$(( 1 + 1 )) = 2 || exit 1"
+ if (eval "$as_required") 2>/dev/null; then :
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+ if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
+
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_found=false
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ as_found=:
+ case $as_dir in #(
+ /*)
+ for as_base in sh bash ksh sh5; do
+ # Try only shells that exist, to save several forks.
+ as_shell=$as_dir/$as_base
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ CONFIG_SHELL=$as_shell as_have_required=yes
+ if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
+ break 2
+fi
+fi
+ done;;
+ esac
+ as_found=false
+done
+$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
+ { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
+ CONFIG_SHELL=$SHELL as_have_required=yes
+fi; }
+IFS=$as_save_IFS
+
+
+ if test "x$CONFIG_SHELL" != x; then :
+ # We cannot yet assume a decent shell, so we have to provide a
+ # neutralization value for shells without unset; and this also
+ # works around shells that cannot unset nonexistent variables.
+ BASH_ENV=/dev/null
+ ENV=/dev/null
+ (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+ if test x$as_have_required = xno; then :
+ $as_echo "$0: This script requires a shell more modern than all"
+ $as_echo "$0: the shells that I found on your system."
+ if test x${ZSH_VERSION+set} = xset ; then
+ $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
+ $as_echo "$0: be upgraded to zsh 4.3.4 or later."
+ else
+ $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-m4@gnu.org
+$0: about your system, including any error possibly output
+$0: before this message. Then install a modern shell, or
+$0: manually run the script under such a shell if you do
+$0: have one."
+ fi
+ exit 1
+fi
+fi
+fi
+SHELL=${CONFIG_SHELL-/bin/sh}
+export SHELL
+# Unset more variables known to interfere with behavior of common tools.
+CLICOLOR_FORCE= GREP_OPTIONS=
+unset CLICOLOR_FORCE GREP_OPTIONS
+
+## --------------------- ##
+## M4sh Shell Functions. ##
+## --------------------- ##
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+
+ as_lineno_1=$LINENO as_lineno_1a=$LINENO
+ as_lineno_2=$LINENO as_lineno_2a=$LINENO
+ eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
+ test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
+ # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+lt_ltdl_dir='ltdl'
+
+
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\$\\$0,'$0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+$*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL $0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "$0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo"
+fi
+
+
+
+
+lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"
+
+test -n "$DJDIR" || exec 7<&0 </dev/null
+exec 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+
+# Identity of this package.
+PACKAGE_NAME='GNU M4'
+PACKAGE_TARNAME='m4'
+PACKAGE_VERSION='1.9a.577-b3131-dirty'
+PACKAGE_STRING='GNU M4 1.9a.577-b3131-dirty'
+PACKAGE_BUGREPORT='bug-m4@gnu.org'
+PACKAGE_URL='http://www.gnu.org/software/m4/'
+
+ac_unique_file="src/m4.h"
+ac_config_libobj_dir=gnu
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+gt_needs=
+ac_func_list=
+ac_header_list=
+gl_getopt_required=POSIX
+ac_subst_vars='M4tests_LTLIBOBJS
+M4tests_LIBOBJS
+M4_LTLIBOBJS
+M4_LIBOBJS
+CONFIG_INCLUDE
+ltdl_LTLIBOBJS
+ltdl_LIBOBJS
+am__EXEEXT_FALSE
+am__EXEEXT_TRUE
+LTLIBOBJS
+LIBOBJS
+USE_GMP_FALSE
+USE_GMP_TRUE
+USE_GMP
+LIBADD_GMP
+STACKOVF_FALSE
+STACKOVF_TRUE
+INCLUDE_STDBOOL_H
+PERL
+INCLUDE_REGEX_H
+REGEX_H
+INCLUDE_OBSTACK_H
+OBSTACK_H
+GETOPT_FALSE
+GETOPT_TRUE
+GETOPT_H
+HAVE_GETOPT_H
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
+NEXT_GETOPT_H
+INCLUDE_ERROR_H
+ERROR_H
+LIBTESTS_LIBDEPS
+abs_aux_dir
+POSIX_SPAWN_PORTED_FALSE
+POSIX_SPAWN_PORTED_TRUE
+LOCALE_TR_UTF8
+REPLACE_ISWCNTRL
+WCTYPE_H
+HAVE_WCTYPE_H
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
+NEXT_WCTYPE_H
+HAVE_ISWCNTRL
+HAVE_WINT_T
+HAVE_WCHAR_H
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
+NEXT_WCHAR_H
+HAVE_UNISTD_H
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
+NEXT_UNISTD_H
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
+TIME_H_DEFINES_STRUCT_TIMESPEC
+NEXT_AS_FIRST_DIRECTIVE_TIME_H
+NEXT_TIME_H
+REPLACE_TIMEGM
+REPLACE_STRPTIME
+REPLACE_NANOSLEEP
+REPLACE_MKTIME
+REPLACE_LOCALTIME_R
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H
+NEXT_SYS_WAIT_H
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
+NEXT_SYS_STAT_H
+POW_LIB
+NEXT_AS_FIRST_DIRECTIVE_STRING_H
+NEXT_STRING_H
+HAVE_RANDOM_H
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
+NEXT_STDLIB_H
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H
+NEXT_STDIO_H
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
+NEXT_STDDEF_H
+STDDEF_H
+HAVE_WCHAR_T
+REPLACE_NULL
+HAVE__BOOL
+STDBOOL_H
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H
+NEXT_STDARG_H
+STDARG_H
+HAVE_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H
+NEXT_SPAWN_H
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
+NEXT_SIGNAL_H
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
+HAVE_STRUCT_SIGACTION_SA_SIGACTION
+HAVE_SIGACTION
+HAVE_SIGINFO_T
+HAVE_SIGSET_T
+HAVE_POSIX_SIGNALBLOCKING
+GNULIB_SIGACTION
+GNULIB_SIGPROCMASK
+GNULIB_SIGNAL_H_SIGPIPE
+SCHED_H
+HAVE_STRUCT_SCHED_PARAM
+HAVE_SCHED_H
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H
+NEXT_SCHED_H
+REPLACE_POSIX_SPAWN
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T
+HAVE_POSIX_SPAWNATTR_T
+HAVE_POSIX_SPAWN
+GNULIB_POSIX_SPAWNATTR_DESTROY
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM
+GNULIB_POSIX_SPAWNATTR_SETPGROUP
+GNULIB_POSIX_SPAWNATTR_GETPGROUP
+GNULIB_POSIX_SPAWNATTR_SETFLAGS
+GNULIB_POSIX_SPAWNATTR_GETFLAGS
+GNULIB_POSIX_SPAWNATTR_INIT
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT
+GNULIB_POSIX_SPAWNP
+GNULIB_POSIX_SPAWN
+UNDEFINE_STRTOK_R
+REPLACE_STRTOK_R
+REPLACE_STRSIGNAL
+REPLACE_STRNDUP
+REPLACE_STRERROR
+REPLACE_STRCASESTR
+REPLACE_STRSTR
+REPLACE_STRDUP
+REPLACE_MEMMEM
+REPLACE_MEMCHR
+HAVE_STRVERSCMP
+HAVE_DECL_STRSIGNAL
+HAVE_DECL_STRERROR
+HAVE_DECL_STRTOK_R
+HAVE_STRCASESTR
+HAVE_STRSEP
+HAVE_STRPBRK
+HAVE_DECL_STRNLEN
+HAVE_DECL_STRNDUP
+HAVE_DECL_STRDUP
+HAVE_STRCHRNUL
+HAVE_STPNCPY
+HAVE_STPCPY
+HAVE_RAWMEMCHR
+HAVE_DECL_MEMRCHR
+HAVE_MEMPCPY
+HAVE_DECL_MEMMEM
+HAVE_MBSLEN
+GNULIB_STRVERSCMP
+GNULIB_STRSIGNAL
+GNULIB_STRERROR
+GNULIB_MBSTOK_R
+GNULIB_MBSSEP
+GNULIB_MBSSPN
+GNULIB_MBSPBRK
+GNULIB_MBSCSPN
+GNULIB_MBSCASESTR
+GNULIB_MBSPCASECMP
+GNULIB_MBSNCASECMP
+GNULIB_MBSCASECMP
+GNULIB_MBSSTR
+GNULIB_MBSRCHR
+GNULIB_MBSCHR
+GNULIB_MBSNLEN
+GNULIB_MBSLEN
+GNULIB_STRTOK_R
+GNULIB_STRCASESTR
+GNULIB_STRSTR
+GNULIB_STRSEP
+GNULIB_STRPBRK
+GNULIB_STRNLEN
+GNULIB_STRNDUP
+GNULIB_STRDUP
+GNULIB_STRCHRNUL
+GNULIB_STPNCPY
+GNULIB_STPCPY
+GNULIB_RAWMEMCHR
+GNULIB_MEMRCHR
+GNULIB_MEMPCPY
+GNULIB_MEMMEM
+GNULIB_MEMCHR
+LOCALE_FR_UTF8
+LOCALE_ZH_CN
+LOCALE_JA
+NEXT_AS_FIRST_DIRECTIVE_MATH_H
+NEXT_MATH_H
+REPLACE_UTIMENSAT
+REPLACE_STAT
+REPLACE_MKNOD
+REPLACE_MKFIFO
+REPLACE_MKDIR
+REPLACE_LSTAT
+REPLACE_FUTIMENS
+REPLACE_FSTATAT
+REPLACE_FSTAT
+HAVE_UTIMENSAT
+HAVE_MKNODAT
+HAVE_MKNOD
+HAVE_MKFIFOAT
+HAVE_MKFIFO
+HAVE_MKDIRAT
+HAVE_LSTAT
+HAVE_LCHMOD
+HAVE_FUTIMENS
+HAVE_FSTATAT
+HAVE_FCHMODAT
+GNULIB_UTIMENSAT
+GNULIB_STAT
+GNULIB_MKNODAT
+GNULIB_MKNOD
+GNULIB_MKFIFOAT
+GNULIB_MKFIFO
+GNULIB_MKDIRAT
+GNULIB_LSTAT
+GNULIB_LCHMOD
+GNULIB_FUTIMENS
+GNULIB_FSTATAT
+GNULIB_FCHMODAT
+LOCALCHARSET_TESTS_ENVIRONMENT
+GLIBC21
+HAVE_LANGINFO_ERA
+HAVE_LANGINFO_CODESET
+HAVE_LANGINFO_H
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
+NEXT_LANGINFO_H
+REPLACE_NL_LANGINFO
+HAVE_NL_LANGINFO
+GNULIB_NL_LANGINFO
+UINT64_MAX_EQ_ULONG_MAX
+UINT32_MAX_LT_UINTMAX_MAX
+INT64_MAX_EQ_LONG_MAX
+INT32_MAX_LT_INTMAX_MAX
+PRIPTR_PREFIX
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
+NEXT_INTTYPES_H
+HAVE_DECL_STRTOUMAX
+HAVE_DECL_STRTOIMAX
+HAVE_DECL_IMAXDIV
+HAVE_DECL_IMAXABS
+GNULIB_STRTOUMAX
+GNULIB_STRTOIMAX
+GNULIB_IMAXDIV
+GNULIB_IMAXABS
+PRI_MACROS_BROKEN
+STDINT_H
+WINT_T_SUFFIX
+WCHAR_T_SUFFIX
+SIG_ATOMIC_T_SUFFIX
+SIZE_T_SUFFIX
+PTRDIFF_T_SUFFIX
+HAVE_SIGNED_WINT_T
+HAVE_SIGNED_WCHAR_T
+HAVE_SIGNED_SIG_ATOMIC_T
+BITSIZEOF_WINT_T
+BITSIZEOF_WCHAR_T
+BITSIZEOF_SIG_ATOMIC_T
+BITSIZEOF_SIZE_T
+BITSIZEOF_PTRDIFF_T
+APPLE_UNIVERSAL_BUILD
+HAVE_SYS_BITYPES_H
+HAVE_SYS_INTTYPES_H
+HAVE_STDINT_H
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H
+NEXT_STDINT_H
+HAVE_SYS_TYPES_H
+HAVE_INTTYPES_H
+HAVE_UNSIGNED_LONG_LONG_INT
+HAVE_LONG_LONG_INT
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H
+NEXT_ICONV_H
+ICONV_H
+REPLACE_ICONV_UTF
+REPLACE_ICONV_OPEN
+REPLACE_ICONV
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
+NEXT_SYS_TIME_H
+REPLACE_GETTIMEOFDAY
+HAVE_SYS_TIME_H
+HAVE_STRUCT_TIMEVAL
+HAVE_GETTIMEOFDAY
+GNULIB_GETTIMEOFDAY
+REPLACE_TRUNCL
+REPLACE_SIGNBIT_USING_GCC
+REPLACE_SIGNBIT
+REPLACE_ROUNDL
+REPLACE_ROUNDF
+REPLACE_ROUND
+REPLACE_NAN
+REPLACE_LDEXPL
+REPLACE_ISNAN
+REPLACE_ISINF
+REPLACE_ISFINITE
+REPLACE_HUGE_VAL
+REPLACE_FREXPL
+REPLACE_FREXP
+REPLACE_FLOORL
+REPLACE_FLOORF
+REPLACE_CEILL
+REPLACE_CEILF
+HAVE_DECL_TRUNCF
+HAVE_DECL_TRUNC
+HAVE_DECL_TANL
+HAVE_DECL_SQRTL
+HAVE_DECL_SINL
+HAVE_DECL_LOGL
+HAVE_DECL_LDEXPL
+HAVE_DECL_FREXPL
+HAVE_DECL_EXPL
+HAVE_DECL_COSL
+HAVE_DECL_ATANL
+HAVE_DECL_ASINL
+HAVE_DECL_ACOSL
+HAVE_TANL
+HAVE_SQRTL
+HAVE_SINL
+HAVE_LOGL
+HAVE_ISNANL
+HAVE_ISNAND
+HAVE_ISNANF
+HAVE_EXPL
+HAVE_COSL
+HAVE_ATANL
+HAVE_ASINL
+HAVE_ACOSL
+GNULIB_TRUNCL
+GNULIB_TRUNCF
+GNULIB_TRUNC
+GNULIB_TANL
+GNULIB_SQRTL
+GNULIB_SINL
+GNULIB_SIGNBIT
+GNULIB_ROUNDL
+GNULIB_ROUNDF
+GNULIB_ROUND
+GNULIB_LOGL
+GNULIB_LDEXPL
+GNULIB_ISNANL
+GNULIB_ISNAND
+GNULIB_ISNANF
+GNULIB_ISNAN
+GNULIB_ISINF
+GNULIB_ISFINITE
+GNULIB_FREXPL
+GNULIB_FREXP
+GNULIB_FLOORL
+GNULIB_FLOORF
+GNULIB_EXPL
+GNULIB_COSL
+GNULIB_CEILL
+GNULIB_CEILF
+GNULIB_ATANL
+GNULIB_ASINL
+GNULIB_ACOSL
+FLOAT_H
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
+NEXT_FLOAT_H
+REPLACE_VSPRINTF
+REPLACE_VSNPRINTF
+REPLACE_VPRINTF
+REPLACE_VFPRINTF
+REPLACE_VDPRINTF
+REPLACE_VASPRINTF
+REPLACE_STDIO_WRITE_FUNCS
+REPLACE_SPRINTF
+REPLACE_SNPRINTF
+REPLACE_RENAMEAT
+REPLACE_RENAME
+REPLACE_REMOVE
+REPLACE_PRINTF
+REPLACE_POPEN
+REPLACE_PERROR
+REPLACE_OBSTACK_PRINTF
+REPLACE_GETLINE
+REPLACE_GETDELIM
+REPLACE_FTELLO
+REPLACE_FTELL
+REPLACE_FSEEKO
+REPLACE_FSEEK
+REPLACE_FREOPEN
+REPLACE_FPURGE
+REPLACE_FPRINTF
+REPLACE_FOPEN
+REPLACE_FFLUSH
+REPLACE_FCLOSE
+REPLACE_DPRINTF
+HAVE_VDPRINTF
+HAVE_VASPRINTF
+HAVE_RENAMEAT
+HAVE_DPRINTF
+HAVE_DECL_VSNPRINTF
+HAVE_DECL_SNPRINTF
+HAVE_DECL_OBSTACK_PRINTF
+HAVE_DECL_GETLINE
+HAVE_DECL_GETDELIM
+HAVE_DECL_FPURGE
+GNULIB_VSPRINTF_POSIX
+GNULIB_VSNPRINTF
+GNULIB_VPRINTF_POSIX
+GNULIB_VPRINTF
+GNULIB_VFPRINTF_POSIX
+GNULIB_VFPRINTF
+GNULIB_VDPRINTF
+GNULIB_VASPRINTF
+GNULIB_STDIO_H_SIGPIPE
+GNULIB_SPRINTF_POSIX
+GNULIB_SNPRINTF
+GNULIB_RENAMEAT
+GNULIB_RENAME
+GNULIB_REMOVE
+GNULIB_PUTS
+GNULIB_PUTCHAR
+GNULIB_PUTC
+GNULIB_PRINTF_POSIX
+GNULIB_PRINTF
+GNULIB_POPEN
+GNULIB_PERROR
+GNULIB_OBSTACK_PRINTF_POSIX
+GNULIB_OBSTACK_PRINTF
+GNULIB_GETLINE
+GNULIB_GETDELIM
+GNULIB_FWRITE
+GNULIB_FTELLO
+GNULIB_FTELL
+GNULIB_FSEEKO
+GNULIB_FSEEK
+GNULIB_FREOPEN
+GNULIB_FPUTS
+GNULIB_FPUTC
+GNULIB_FPURGE
+GNULIB_FPRINTF_POSIX
+GNULIB_FPRINTF
+GNULIB_FOPEN
+GNULIB_FFLUSH
+GNULIB_FCLOSE
+GNULIB_DPRINTF
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
+NEXT_FCNTL_H
+REPLACE_OPENAT
+REPLACE_OPEN
+REPLACE_FCNTL
+HAVE_OPENAT
+HAVE_FCNTL
+GNULIB_OPENAT
+GNULIB_OPEN
+GNULIB_FCNTL
+EOVERFLOW_VALUE
+EOVERFLOW_HIDDEN
+ENOLINK_VALUE
+ENOLINK_HIDDEN
+EMULTIHOP_VALUE
+EMULTIHOP_HIDDEN
+ERRNO_H
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
+NEXT_ERRNO_H
+PRAGMA_SYSTEM_HEADER
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE
+INCLUDE_NEXT
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
+UNISTD_H_HAVE_WINSOCK2_H
+REPLACE_WRITE
+REPLACE_USLEEP
+REPLACE_UNLINKAT
+REPLACE_UNLINK
+REPLACE_SYMLINK
+REPLACE_SLEEP
+REPLACE_RMDIR
+REPLACE_READLINK
+REPLACE_PREAD
+REPLACE_LSEEK
+REPLACE_LINKAT
+REPLACE_LINK
+REPLACE_LCHOWN
+REPLACE_GETPAGESIZE
+REPLACE_GETGROUPS
+REPLACE_GETCWD
+REPLACE_FCHOWNAT
+REPLACE_FCHDIR
+REPLACE_DUP2
+REPLACE_DUP
+REPLACE_CLOSE
+REPLACE_CHOWN
+HAVE_USLEEP
+HAVE_UNLINKAT
+HAVE_SYS_PARAM_H
+HAVE_OS_H
+HAVE_DECL_GETLOGIN_R
+HAVE_DECL_ENVIRON
+HAVE_SYMLINKAT
+HAVE_SYMLINK
+HAVE_SLEEP
+HAVE_READLINKAT
+HAVE_READLINK
+HAVE_PREAD
+HAVE_PIPE2
+HAVE_LINKAT
+HAVE_LINK
+HAVE_LCHOWN
+HAVE_GETUSERSHELL
+HAVE_GETPAGESIZE
+HAVE_GETLOGIN
+HAVE_GETHOSTNAME
+HAVE_GETGROUPS
+HAVE_GETDTABLESIZE
+HAVE_GETDOMAINNAME
+HAVE_FTRUNCATE
+HAVE_FSYNC
+HAVE_FCHOWNAT
+HAVE_FACCESSAT
+HAVE_EUIDACCESS
+HAVE_DUP3
+HAVE_DUP2
+HAVE_CHOWN
+GNULIB_WRITE
+GNULIB_USLEEP
+GNULIB_UNLINKAT
+GNULIB_UNLINK
+GNULIB_UNISTD_H_SIGPIPE
+GNULIB_UNISTD_H_GETOPT
+GNULIB_SYMLINKAT
+GNULIB_SYMLINK
+GNULIB_SLEEP
+GNULIB_RMDIR
+GNULIB_READLINKAT
+GNULIB_READLINK
+GNULIB_PREAD
+GNULIB_PIPE2
+GNULIB_LSEEK
+GNULIB_LINKAT
+GNULIB_LINK
+GNULIB_LCHOWN
+GNULIB_GETUSERSHELL
+GNULIB_GETPAGESIZE
+GNULIB_GETLOGIN_R
+GNULIB_GETLOGIN
+GNULIB_GETHOSTNAME
+GNULIB_GETGROUPS
+GNULIB_GETDTABLESIZE
+GNULIB_GETDOMAINNAME
+GNULIB_GETCWD
+GNULIB_FTRUNCATE
+GNULIB_FSYNC
+GNULIB_FCHOWNAT
+GNULIB_FCHDIR
+GNULIB_FACCESSAT
+GNULIB_EUIDACCESS
+GNULIB_ENVIRON
+GNULIB_DUP3
+GNULIB_DUP2
+GNULIB_CLOSE
+GNULIB_CHOWN
+REPLACE_UNSETENV
+REPLACE_STRTOD
+REPLACE_SETENV
+REPLACE_REALPATH
+REPLACE_PUTENV
+REPLACE_MKSTEMP
+REPLACE_CANONICALIZE_FILE_NAME
+HAVE_UNSETENV
+HAVE_SYS_LOADAVG_H
+HAVE_STRUCT_RANDOM_DATA
+HAVE_STRTOULL
+HAVE_STRTOLL
+HAVE_STRTOD
+HAVE_SETENV
+HAVE_RPMATCH
+HAVE_REALPATH
+HAVE_REALLOC_POSIX
+HAVE_RANDOM_R
+HAVE_MKSTEMPS
+HAVE_MKOSTEMPS
+HAVE_MKOSTEMP
+HAVE_MKDTEMP
+HAVE_MALLOC_POSIX
+HAVE_GETSUBOPT
+HAVE_DECL_GETLOADAVG
+HAVE_CANONICALIZE_FILE_NAME
+HAVE_CALLOC_POSIX
+HAVE_ATOLL
+GNULIB_UNSETENV
+GNULIB_STRTOULL
+GNULIB_STRTOLL
+GNULIB_STRTOD
+GNULIB_SETENV
+GNULIB_RPMATCH
+GNULIB_REALPATH
+GNULIB_REALLOC_POSIX
+GNULIB_RANDOM_R
+GNULIB_PUTENV
+GNULIB_MKSTEMPS
+GNULIB_MKSTEMP
+GNULIB_MKOSTEMPS
+GNULIB_MKOSTEMP
+GNULIB_MKDTEMP
+GNULIB_MALLOC_POSIX
+GNULIB_GETSUBOPT
+GNULIB_GETLOADAVG
+GNULIB_CANONICALIZE_FILE_NAME
+GNULIB_CALLOC_POSIX
+GNULIB_ATOLL
+LOCALE_FR
+REPLACE_WCWIDTH
+REPLACE_WCSNRTOMBS
+REPLACE_WCSRTOMBS
+REPLACE_WCRTOMB
+REPLACE_MBSNRTOWCS
+REPLACE_MBSRTOWCS
+REPLACE_MBRLEN
+REPLACE_MBRTOWC
+REPLACE_MBSINIT
+REPLACE_WCTOB
+REPLACE_BTOWC
+REPLACE_MBSTATE_T
+HAVE_DECL_WCWIDTH
+HAVE_DECL_WCTOB
+HAVE_WCSNRTOMBS
+HAVE_WCSRTOMBS
+HAVE_WCRTOMB
+HAVE_MBSNRTOWCS
+HAVE_MBSRTOWCS
+HAVE_MBRLEN
+HAVE_MBRTOWC
+HAVE_MBSINIT
+HAVE_BTOWC
+GNULIB_WCWIDTH
+GNULIB_WCSNRTOMBS
+GNULIB_WCSRTOMBS
+GNULIB_WCRTOMB
+GNULIB_MBSNRTOWCS
+GNULIB_MBSRTOWCS
+GNULIB_MBRLEN
+GNULIB_MBRTOWC
+GNULIB_MBSINIT
+GNULIB_WCTOB
+GNULIB_BTOWC
+ALLOCA_H
+ALLOCA
+LTALLOCA
+GL_COND_LIBTOOL_FALSE
+GL_COND_LIBTOOL_TRUE
+GETTEXT_H
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+LTLIBICONV
+LIBICONV
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+PREOPEN_DEPENDENCIES
+DLPREOPEN
+DYNAMIC_MODULES
+LTDLOPEN
+LT_CONFIG_H
+CONVENIENCE_LTDL_FALSE
+CONVENIENCE_LTDL_TRUE
+INSTALL_LTDL_FALSE
+INSTALL_LTDL_TRUE
+ARGZ_H
+sys_symbol_underscore
+LIBADD_DL
+LT_DLPREOPEN
+LIBADD_DLD_LINK
+LIBADD_SHL_LOAD
+LIBADD_DLOPEN
+LT_DLLOADERS
+INCLTDL
+LTDLINCL
+LTDLDEPS
+LIBLTDL
+OTOOL64
+OTOOL
+LIPO
+NMEDIT
+DSYMUTIL
+lt_ECHO
+AR
+LN_S
+NM
+ac_ct_DUMPBIN
+DUMPBIN
+LD
+FGREP
+LIBTOOL
+OBJDUMP
+DLLTOOL
+AS
+SED
+EGREP
+GREP
+CPP
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+RANLIB
+am__fastdepCC_FALSE
+am__fastdepCC_TRUE
+CCDEPMODE
+AMDEPBACKSLASH
+AMDEP_FALSE
+AMDEP_TRUE
+am__quote
+am__include
+DEPDIR
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
+am__untar
+am__tar
+AMTAR
+am__leading_dot
+SET_MAKE
+AWK
+mkdir_p
+MKDIR_P
+INSTALL_STRIP_PROGRAM
+STRIP
+install_sh
+MAKEINFO
+AUTOHEADER
+AUTOMAKE
+AUTOCONF
+ACLOCAL
+VERSION
+PACKAGE
+CYGPATH_W
+am__isrc
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_URL
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_silent_rules
+enable_dependency_tracking
+enable_largefile
+enable_debug
+enable_shared
+enable_static
+with_pic
+enable_fast_install
+with_gnu_ld
+enable_libtool_lock
+with_included_ltdl
+with_ltdl_include
+with_ltdl_lib
+enable_ltdl_install
+with_modules
+enable_nls
+enable_rpath
+with_libiconv_prefix
+with_libintl_prefix
+enable_assert
+with_included_regex
+with_packager
+with_packager_version
+with_packager_bug_reports
+with_included_obstack
+with_dmalloc
+with_gmp
+with_syscmd_shell
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+CPP'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *=) ac_optarg= ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid feature name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ as_fn_error $? "invalid package name: $ac_useropt"
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ case $ac_envvar in #(
+ '' | [0-9]* | *[!_$as_cr_alnum]* )
+ as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
+ esac
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ as_fn_error $? "missing argument to $ac_option"
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used" >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ as_fn_error $? "working directory cannot be determined"
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ as_fn_error $? "pwd does not report name of working directory"
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures GNU M4 1.9a.577-b3131-dirty to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking ...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/m4]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+Program names:
+ --program-prefix=PREFIX prepend PREFIX to installed program names
+ --program-suffix=SUFFIX append SUFFIX to installed program names
+ --program-transform-name=PROGRAM run sed PROGRAM on installed program names
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of GNU M4 1.9a.577-b3131-dirty:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-silent-rules less verbose build output (undo: `make V=1')
+ --disable-silent-rules verbose build output (undo: `make V=0')
+ --disable-dependency-tracking speeds up one-time build
+ --enable-dependency-tracking do not reject slow dependency extractors
+ --disable-largefile omit support for large files
+ --enable-debug build for debugging [default=no]
+ --enable-shared[=PKGS] build shared libraries [default=no]
+ --enable-static[=PKGS] build static libraries [default=yes]
+ --enable-fast-install[=PKGS]
+ optimize for fast installation [default=yes]
+ --disable-libtool-lock avoid locking (might break parallel builds)
+ --enable-ltdl-install install libltdl
+ --disable-nls do not use Native Language Support
+ --disable-rpath do not hardcode runtime library paths
+ --disable-assert turn off assertions
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-pic try to use only PIC/non-PIC objects [default=use
+ both]
+ --with-gnu-ld assume the C compiler uses GNU ld [default=no]
+ --with-included-ltdl use the GNU ltdl sources included here
+ --with-ltdl-include=DIR use the ltdl headers installed in DIR
+ --with-ltdl-lib=DIR use the libltdl.la installed in DIR
+ --with-modules=MODULES preload MODULES [default: m4 traditional gnu]
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+ --without-included-regex
+ don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).
+ --with-packager String identifying the packager of this software
+ --with-packager-version Packager-specific version information
+ --with-packager-bug-reports
+ Packager info for bug reports (URL/e-mail/...)
+ --with-included-obstack use the obstack implementation included here
+ --with-dmalloc use dmalloc, as in
+ http://www.dmalloc.com/dmalloc.tar.gz
+ --without-gmp don't use GNU multiple precision arithmetic library
+ --with-syscmd-shell shell used by syscmd [/bin/sh]
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ CPP C preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+GNU M4 configure 1.9a.577-b3131-dirty
+generated by GNU Autoconf 2.67
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+
+## ------------------------ ##
+## Autoconf initialization. ##
+## ------------------------ ##
+
+# ac_fn_c_try_compile LINENO
+# --------------------------
+# Try to compile conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext
+ if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_compile
+
+# ac_fn_c_try_cpp LINENO
+# ----------------------
+# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_cpp ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } > conftest.i && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_cpp
+
+# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists, giving a warning if it cannot be compiled using
+# the include files in INCLUDES and setting the cache variable VAR
+# accordingly.
+ac_fn_c_check_header_mongrel ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if eval "test \"\${$3+set}\"" = set; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
+$as_echo_n "checking $2 usability... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_header_compiler=yes
+else
+ ac_header_compiler=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
+$as_echo_n "checking $2 presence... " >&6; }
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <$2>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ ac_header_preproc=yes
+else
+ ac_header_preproc=no
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
+ yes:no: )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
+( $as_echo "## ----------------------------- ##
+## Report this to bug-m4@gnu.org ##
+## ----------------------------- ##"
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=\$ac_header_compiler"
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_mongrel
+
+# ac_fn_c_try_run LINENO
+# ----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
+# that executables *can* be run.
+ac_fn_c_try_run ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=$ac_status
+fi
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_run
+
+# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
+# -------------------------------------------------------
+# Tests whether HEADER exists and can be compiled using the include files in
+# INCLUDES, setting the cache variable VAR accordingly.
+ac_fn_c_check_header_compile ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+#include <$2>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_header_compile
+
+# ac_fn_c_try_link LINENO
+# -----------------------
+# Try to link conftest.$ac_ext, and return whether this succeeded.
+ac_fn_c_try_link ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ rm -f conftest.$ac_objext conftest$ac_exeext
+ if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ grep -v '^ *+' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ mv -f conftest.er1 conftest.err
+ fi
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then :
+ ac_retval=0
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_retval=1
+fi
+ # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
+ # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
+ # interfere with the next link command; also delete a directory that is
+ # left behind by Apple's compiler. We do this before executing the actions.
+ rm -rf conftest.dSYM conftest_ipa8_conftest.oo
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_try_link
+
+# ac_fn_c_check_func LINENO FUNC VAR
+# ----------------------------------
+# Tests whether FUNC exists, setting the cache variable VAR accordingly
+ac_fn_c_check_func ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $2 innocuous_$2
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $2 (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $2
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $2 ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$2 || defined __stub___$2
+choke me
+#endif
+
+int
+main ()
+{
+return $2 ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_func
+
+# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
+# ---------------------------------------------
+# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
+# accordingly.
+ac_fn_c_check_decl ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ as_decl_name=`echo $2|sed 's/ *(.*//'`
+ as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
+$as_echo_n "checking whether $as_decl_name is declared... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+#ifndef $as_decl_name
+#ifdef __cplusplus
+ (void) $as_decl_use;
+#else
+ (void) $as_decl_name;
+#endif
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$3=yes"
+else
+ eval "$3=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_decl
+
+# ac_fn_c_check_type LINENO TYPE VAR INCLUDES
+# -------------------------------------------
+# Tests whether TYPE exists after having included INCLUDES, setting cache
+# variable VAR accordingly.
+ac_fn_c_check_type ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
+$as_echo_n "checking for $2... " >&6; }
+if eval "test \"\${$3+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval "$3=no"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof ($2))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+if (sizeof (($2)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ eval "$3=yes"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$3
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_type
+
+# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
+# --------------------------------------------
+# Tries to find the compile-time value of EXPR in a program that includes
+# INCLUDES, setting VAR accordingly. Returns whether the value could be
+# computed
+ac_fn_c_compute_int ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid; break
+else
+ as_fn_arith $ac_mid + 1 && ac_lo=$as_val
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_lo=$ac_mid; break
+else
+ as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ ac_lo= ac_hi=
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+int
+main ()
+{
+static int test_array [1 - 2 * !(($2) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_hi=$ac_mid
+else
+ as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in #((
+?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
+'') ac_retval=1 ;;
+esac
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$4
+static long int longval () { return $2; }
+static unsigned long int ulongval () { return $2; }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (($2) < 0)
+ {
+ long int i = longval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ($2))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ echo >>conftest.val; read $3 <conftest.val; ac_retval=0
+else
+ ac_retval=1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+rm -f conftest.val
+
+ fi
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ as_fn_set_status $ac_retval
+
+} # ac_fn_c_compute_int
+
+# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
+# ----------------------------------------------------
+# Tries to find if the field MEMBER exists in type AGGR, after including
+# INCLUDES, setting cache variable VAR accordingly.
+ac_fn_c_check_member ()
+{
+ as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
+$as_echo_n "checking for $2.$3... " >&6; }
+if eval "test \"\${$4+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$5
+int
+main ()
+{
+static $2 ac_aggr;
+if (sizeof ac_aggr.$3)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$4=yes"
+else
+ eval "$4=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$4
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+
+} # ac_fn_c_check_member
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+ done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
+ 2)
+ as_fn_append ac_configure_args1 " '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ as_fn_append ac_configure_args " '$ac_arg'"
+ ;;
+ esac
+ done
+done
+{ ac_configure_args0=; unset ac_configure_args0;}
+{ ac_configure_args1=; unset ac_configure_args1;}
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ $as_echo "## ---------------- ##
+## Cache variables. ##
+## ---------------- ##"
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ $as_echo "## ----------------- ##
+## Output variables. ##
+## ----------------- ##"
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ $as_echo "## ------------------- ##
+## File substitutions. ##
+## ------------------- ##"
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ $as_echo "## ----------- ##
+## confdefs.h. ##
+## ----------- ##"
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+$as_echo "/* confdefs.h */" > confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_URL "$PACKAGE_URL"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ # We do not want a PATH search for config.site.
+ case $CONFIG_SITE in #((
+ -*) ac_site_file1=./$CONFIG_SITE;;
+ */*) ac_site_file1=$CONFIG_SITE;;
+ *) ac_site_file1=./$CONFIG_SITE;;
+ esac
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file" \
+ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special files
+ # actually), so we avoid doing that. DJGPP emulates it as a regular file.
+ if test /dev/null != "$cache_file" && test -f "$cache_file"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+gt_needs="$gt_needs need-formatstring-macros"
+as_fn_append ac_func_list " btowc"
+as_fn_append ac_func_list " canonicalize_file_name"
+as_fn_append ac_func_list " getcwd"
+as_fn_append ac_func_list " readlink"
+as_fn_append ac_func_list " realpath"
+as_fn_append ac_header_list " sys/param.h"
+as_fn_append ac_func_list " dup2"
+as_fn_append ac_header_list " errno.h"
+as_fn_append ac_header_list " unistd.h"
+as_fn_append ac_func_list " fcntl"
+as_fn_append ac_header_list " fcntl.h"
+as_fn_append ac_func_list " mempcpy"
+as_fn_append ac_header_list " float.h"
+as_fn_append ac_header_list " stdio_ext.h"
+as_fn_append ac_func_list " __fpending"
+as_fn_append ac_func_list " fpurge"
+as_fn_append ac_func_list " __fpurge"
+as_fn_append ac_func_list " __freading"
+as_fn_append ac_func_list " getdtablesize"
+as_fn_append ac_header_list " sys/time.h"
+as_fn_append ac_func_list " gettimeofday"
+as_fn_append ac_header_list " iconv.h"
+as_fn_append ac_header_list " stdint.h"
+as_fn_append ac_header_list " wchar.h"
+as_fn_append ac_header_list " inttypes.h"
+as_fn_append ac_header_list " langinfo.h"
+as_fn_append ac_func_list " lstat"
+as_fn_append ac_header_list " math.h"
+as_fn_append ac_func_list " mbsinit"
+as_fn_append ac_func_list " mbrtowc"
+as_fn_append ac_func_list " mbslen"
+as_fn_append ac_header_list " sys/mman.h"
+as_fn_append ac_func_list " mprotect"
+as_fn_append ac_func_list " nl_langinfo"
+as_fn_append ac_func_list " obstack_printf"
+as_fn_append ac_func_list " vasnprintf"
+as_fn_append ac_func_list " pathconf"
+as_fn_append ac_func_list " pipe2"
+as_fn_append ac_func_list " posix_spawn"
+gl_printf_safe=yes
+as_fn_append ac_header_list " locale.h"
+as_fn_append ac_func_list " isblank"
+as_fn_append ac_func_list " iswctype"
+as_fn_append ac_func_list " wcscoll"
+as_fn_append ac_header_list " sched.h"
+as_fn_append ac_func_list " setenv"
+as_fn_append ac_func_list " sigaction"
+as_fn_append ac_func_list " sigaltstack"
+as_fn_append ac_func_list " siginterrupt"
+as_fn_append ac_header_list " signal.h"
+as_fn_append ac_header_list " spawn.h"
+as_fn_append ac_header_list " stdarg.h"
+as_fn_append ac_header_list " stddef.h"
+as_fn_append ac_header_list " stdio.h"
+as_fn_append ac_header_list " stdlib.h"
+as_fn_append ac_header_list " sys/socket.h"
+as_fn_append ac_header_list " string.h"
+as_fn_append ac_func_list " strndup"
+as_fn_append ac_header_list " sys/stat.h"
+as_fn_append ac_header_list " sys/wait.h"
+as_fn_append ac_header_list " time.h"
+as_fn_append ac_func_list " pipe"
+as_fn_append ac_func_list " wcrtomb"
+as_fn_append ac_func_list " iswcntrl"
+as_fn_append ac_header_list " wctype.h"
+as_fn_append ac_func_list " wcwidth"
+as_fn_append ac_func_list " link"
+as_fn_append ac_func_list " symlink"
+as_fn_append ac_func_list " wctob"
+M4_replace_getopt=
+gl_getopt_required=GNU
+as_fn_append ac_header_list " getopt.h"
+as_fn_append ac_header_list " limits.h"
+as_fn_append ac_func_list " calloc"
+as_fn_append ac_func_list " strerror"
+as_fn_append ac_header_list " siginfo.h"
+as_fn_append ac_func_list " sigstack"
+as_fn_append ac_func_list " sigvec"
+as_fn_append ac_func_list " gethostname"
+as_fn_append ac_func_list " mktime"
+as_fn_append ac_func_list " uname"
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) as_fn_append ac_configure_args " '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+fi
+## -------------------- ##
+## Main body of script. ##
+## -------------------- ##
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+ac_aux_dir=
+for ac_dir in build-aux "$srcdir"/build-aux; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+
+
+ac_config_commands="$ac_config_commands tests/atconfig"
+
+ac_config_headers="$ac_config_headers gnu/config.h:gnu/config.hin"
+
+ac_config_files="$ac_config_files tests/m4"
+
+
+
+## -------------------------- ##
+## M4 specific configuration. ##
+## -------------------------- ##
+
+
+
+M4_default_preload="m4 traditional gnu"
+
+
+## ------------------------ ##
+## Automake Initialization. ##
+## ------------------------ ##
+am__api_version='1.11'
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in #((
+ ./ | .// | /[cC]/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+ done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
+$as_echo_n "checking whether build environment is sane... " >&6; }
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name. Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+ *[\\\"\#\$\&\'\`$am_lf]*)
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+esac
+case $srcdir in
+ *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+esac
+
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments. Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+ set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
+ if test "$*" = "X"; then
+ # -L didn't work.
+ set X `ls -t "$srcdir/configure" conftest.file`
+ fi
+ rm -f conftest.file
+ if test "$*" != "X $srcdir/configure conftest.file" \
+ && test "$*" != "X conftest.file $srcdir/configure"; then
+
+ # If neither matched, then we have a broken ls. This can happen
+ # if, for instance, CONFIG_SHELL is bash and it inherits a
+ # broken ls alias from the environment. This has actually
+ # happened. Such a system could not be considered "sane".
+ as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
+alias in your environment" "$LINENO" 5
+ fi
+
+ test "$2" = conftest.file
+ )
+then
+ # Ok.
+ :
+else
+ as_fn_error $? "newly created file is older than distributed files!
+Check your system clock" "$LINENO" 5
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+test "$program_prefix" != NONE &&
+ program_transform_name="s&^&$program_prefix&;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+ program_transform_name="s&\$&$program_suffix&;$program_transform_name"
+# Double any \ or $.
+# By default was `s,x,x', remove it if useless.
+ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
+program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+if test x"${MISSING+set}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+ *)
+ MISSING="\${SHELL} $am_aux_dir/missing" ;;
+ esac
+fi
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+ am_missing_run="$MISSING --run "
+else
+ am_missing_run=
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
+$as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
+fi
+
+if test x"${install_sh}" != xset; then
+ case $am_aux_dir in
+ *\ * | *\ *)
+ install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+ *)
+ install_sh="\${SHELL} $am_aux_dir/install-sh"
+ esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'. However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+ done
+IFS=$as_save_IFS
+
+fi
+
+ test -d ./--version && rmdir ./--version
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+for ac_prog in gawk mawk nawk awk
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AWK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AWK"; then
+ ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AWK="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
+$as_echo "$AWK" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$AWK" && break
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+ am__leading_dot=.
+else
+ am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+ enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no) AM_DEFAULT_VERBOSITY=1;;
+*) AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
+if test "`cd $srcdir && pwd`" != "`pwd`"; then
+ # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
+ # is not polluted with repeated "-I."
+ am__isrc=' -I$(srcdir)'
+ # test to see if srcdir already configured
+ if test -f $srcdir/config.status; then
+ as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+ fi
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+ if (cygpath --version) >/dev/null 2>/dev/null; then
+ CYGPATH_W='cygpath -w'
+ else
+ CYGPATH_W=echo
+ fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE='m4'
+ VERSION='1.9a.577-b3131-dirty'
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+# We need awk for the "check" target. The system "awk" is bad on
+# some platforms.
+# Always define AMTAR for backward compatibility.
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+
+
+
+
+
+
+
+## ------------------ ##
+## C compiler checks. ##
+## ------------------ ##
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "no acceptable C compiler found in \$PATH
+See \`config.log' for more details" "$LINENO" 5 ; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+for ac_option in --version -v -V -qversion; do
+ { { ac_try="$ac_compiler $ac_option >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compiler $ac_option >&5") 2>conftest.err
+ ac_status=$?
+ if test -s conftest.err; then
+ sed '10a\
+... rest of stderr output deleted ...
+ 10q' conftest.err >conftest.er1
+ cat conftest.er1 >&5
+ fi
+ rm -f conftest.er1 conftest.err
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+done
+
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { { ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+if test -z "$ac_file"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "C compiler cannot create executables
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+ac_exeext=$ac_cv_exeext
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest conftest$ac_cv_exeext
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *f = fopen ("conftest.out", "w");
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files="$ac_clean_files conftest.out"
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+if test "$cross_compiling" != yes; then
+ { { ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ if { ac_try='./conftest$ac_cv_exeext'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
+ac_clean_files=$ac_clean_files_save
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { { ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then :
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot compute suffix of object files: cannot compile
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_compiler_gnu=yes
+else
+ ac_compiler_gnu=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+else
+ CFLAGS=""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+else
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_g=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+ @echo this is the am__doit target
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
+$as_echo_n "checking for style of include used by $am_make... " >&6; }
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# Ignore all kinds of additional output from `make'.
+case `$am_make -s -f confmf 2> /dev/null` in #(
+*the\ am__doit\ target*)
+ am__include=include
+ am__quote=
+ _am_result=GNU
+ ;;
+esac
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+ echo '.include "confinc"' > confmf
+ case `$am_make -s -f confmf 2> /dev/null` in #(
+ *the\ am__doit\ target*)
+ am__include=.include
+ am__quote="\""
+ _am_result=BSD
+ ;;
+ esac
+fi
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
+$as_echo "$_am_result" >&6; }
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then :
+ enableval=$enable_dependency_tracking;
+fi
+
+if test "x$enable_dependency_tracking" != xno; then
+ am_depcomp="$ac_aux_dir/depcomp"
+ AMDEPBACKSLASH='\'
+fi
+ if test "x$enable_dependency_tracking" != xno; then
+ AMDEP_TRUE=
+ AMDEP_FALSE='#'
+else
+ AMDEP_TRUE='#'
+ AMDEP_FALSE=
+fi
+
+
+
+depcc="$CC" am_compiler_list=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
+$as_echo_n "checking dependency style of $depcc... " >&6; }
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+ # We make a subdir and do the tests there. Otherwise we can end up
+ # making bogus files that we don't know about and never remove. For
+ # instance it was reported that on HP-UX the gcc test will end up
+ # making a dummy file named `D' -- because `-MD' means `put the output
+ # in D'.
+ mkdir conftest.dir
+ # Copy depcomp to subdir because otherwise we won't find it if we're
+ # using a relative directory.
+ cp "$am_depcomp" conftest.dir
+ cd conftest.dir
+ # We will build objects and dependencies in a subdirectory because
+ # it helps to detect inapplicable dependency modes. For instance
+ # both Tru64's cc and ICC support -MD to output dependencies as a
+ # side effect of compilation, but ICC will put the dependencies in
+ # the current directory while Tru64 will put them in the object
+ # directory.
+ mkdir sub
+
+ am_cv_CC_dependencies_compiler_type=none
+ if test "$am_compiler_list" = ""; then
+ am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+ fi
+ am__universal=false
+ case " $depcc " in #(
+ *\ -arch\ *\ -arch\ *) am__universal=true ;;
+ esac
+
+ for depmode in $am_compiler_list; do
+ # Setup a source with many dependencies, because some compilers
+ # like to wrap large dependency lists on column 80 (with \), and
+ # we should not choose a depcomp mode which is confused by this.
+ #
+ # We need to recreate these files for each test, as the compiler may
+ # overwrite some of them when testing with obscure command lines.
+ # This happens at least with the AIX C compiler.
+ : > sub/conftest.c
+ for i in 1 2 3 4 5 6; do
+ echo '#include "conftst'$i'.h"' >> sub/conftest.c
+ # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
+ # Solaris 8's {/usr,}/bin/sh.
+ touch sub/conftst$i.h
+ done
+ echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+ # We check with `-c' and `-o' for the sake of the "dashmstdout"
+ # mode. It turns out that the SunPro C++ compiler does not properly
+ # handle `-M -o', and we need to detect this. Also, some Intel
+ # versions had trouble with output in subdirs
+ am__obj=sub/conftest.${OBJEXT-o}
+ am__minus_obj="-o $am__obj"
+ case $depmode in
+ gcc)
+ # This depmode causes a compiler race in universal mode.
+ test "$am__universal" = false || continue
+ ;;
+ nosideeffect)
+ # after this tag, mechanisms are not by side-effect, so they'll
+ # only be used when explicitly requested
+ if test "x$enable_dependency_tracking" = xyes; then
+ continue
+ else
+ break
+ fi
+ ;;
+ msvisualcpp | msvcmsys)
+ # This compiler won't grok `-c -o', but also, the minuso test has
+ # not run yet. These depmodes are late enough in the game, and
+ # so weak that their functioning should not be impacted.
+ am__obj=conftest.${OBJEXT-o}
+ am__minus_obj=
+ ;;
+ none) break ;;
+ esac
+ if depmode=$depmode \
+ source=sub/conftest.c object=$am__obj \
+ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
+ >/dev/null 2>conftest.err &&
+ grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+ grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
+ ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+ # icc doesn't choke on unknown options, it will just issue warnings
+ # or remarks (even with -Werror). So we grep stderr for any message
+ # that says an option was ignored or not supported.
+ # When given -MP, icc 7.0 and 7.1 complain thusly:
+ # icc: Command line warning: ignoring option '-M'; no argument required
+ # The diagnosis changed in icc 8.0:
+ # icc: Command line remark: option '-MP' not supported
+ if (grep 'ignoring option' conftest.err ||
+ grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
+ am_cv_CC_dependencies_compiler_type=$depmode
+ break
+ fi
+ fi
+ done
+
+ cd ..
+ rm -rf conftest.dir
+else
+ am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
+$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+ if
+ test "x$enable_dependency_tracking" != xno \
+ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+ am__fastdepCC_TRUE=
+ am__fastdepCC_FALSE='#'
+else
+ am__fastdepCC_TRUE='#'
+ am__fastdepCC_FALSE=
+fi
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+if test "x$CC" != xcc; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
+$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
+$as_echo_n "checking whether cc understands -c and -o together... " >&6; }
+fi
+set dummy $CC; ac_cc=`$as_echo "$2" |
+ sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+rm -f conftest2.*
+if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+then
+ eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+ if test "x$CC" != xcc; then
+ # Test first that cc exists at all.
+ if { ac_try='cc -c conftest.$ac_ext >&5'
+ { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; }; then
+ ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
+ rm -f conftest2.*
+ if { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } &&
+ test -f conftest2.$ac_objext && { { case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
+$as_echo "$ac_try_echo"; } >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; };
+ then
+ # cc works too.
+ :
+ else
+ # cc exists but doesn't like -o.
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+ fi
+ fi
+ fi
+else
+ eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f core conftest*
+
+fi
+if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+
+$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
+
+fi
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5 ;;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5 ;;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdc=yes
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ ac_cv_header_stdc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+$as_echo "#define STDC_HEADERS 1" >>confdefs.h
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+ ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
+if test "x$ac_cv_header_minix_config_h" = x""yes; then :
+ MINIX=yes
+else
+ MINIX=
+fi
+
+
+ if test "$MINIX" = yes; then
+
+$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
+
+
+$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
+
+
+$as_echo "#define _MINIX 1" >>confdefs.h
+
+ fi
+
+ case "$host_os" in
+ hpux*)
+
+$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
+$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
+if test "${ac_cv_safe_to_define___extensions__+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# define __EXTENSIONS__ 1
+ $ac_includes_default
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_safe_to_define___extensions__=yes
+else
+ ac_cv_safe_to_define___extensions__=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
+$as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+ $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
+
+ $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
+
+ $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
+$as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_source+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGEFILE_SOURCE 1
+#include <sys/types.h> /* for off_t */
+ #include <stdio.h>
+int
+main ()
+{
+int (*fp) (FILE *, off_t, int) = fseeko;
+ return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_sys_largefile_source=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_cv_sys_largefile_source=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
+$as_echo "$ac_cv_sys_largefile_source" >&6; }
+case $ac_cv_sys_largefile_source in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
+_ACEOF
+;;
+esac
+rm -rf conftest*
+
+# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
+# in glibc 2.1.3, but that breaks too many other things.
+# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
+if test $ac_cv_sys_largefile_source != unknown; then
+
+$as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
+
+fi
+
+
+
+
+ # IEEE behaviour is the default on all CPUs except Alpha and SH
+ # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+ # and the GCC 4.1.2 manual).
+ case "$host_cpu" in
+ alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+ sh*)
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+ esac
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
+$as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
+if test "${ac_cv_prog_cc_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c99=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <wchar.h>
+#include <stdio.h>
+
+// Check varargs macros. These examples are taken from C99 6.10.3.5.
+#define debug(...) fprintf (stderr, __VA_ARGS__)
+#define showlist(...) puts (#__VA_ARGS__)
+#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
+static void
+test_varargs_macros (void)
+{
+ int x = 1234;
+ int y = 5678;
+ debug ("Flag");
+ debug ("X = %d\n", x);
+ showlist (The first, second, and third items.);
+ report (x>y, "x is %d but y is %d", x, y);
+}
+
+// Check long long types.
+#define BIG64 18446744073709551615ull
+#define BIG32 4294967295ul
+#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
+#if !BIG_OK
+ your preprocessor is broken;
+#endif
+#if BIG_OK
+#else
+ your preprocessor is broken;
+#endif
+static long long int bignum = -9223372036854775807LL;
+static unsigned long long int ubignum = BIG64;
+
+struct incomplete_array
+{
+ int datasize;
+ double data[];
+};
+
+struct named_init {
+ int number;
+ const wchar_t *name;
+ double average;
+};
+
+typedef const char *ccp;
+
+static inline int
+test_restrict (ccp restrict text)
+{
+ // See if C++-style comments work.
+ // Iterate through items via the restricted pointer.
+ // Also check for declarations in for loops.
+ for (unsigned int i = 0; *(text+i) != '\0'; ++i)
+ continue;
+ return 0;
+}
+
+// Check varargs and va_copy.
+static void
+test_varargs (const char *format, ...)
+{
+ va_list args;
+ va_start (args, format);
+ va_list args_copy;
+ va_copy (args_copy, args);
+
+ const char *str;
+ int number;
+ float fnumber;
+
+ while (*format)
+ {
+ switch (*format++)
+ {
+ case 's': // string
+ str = va_arg (args_copy, const char *);
+ break;
+ case 'd': // int
+ number = va_arg (args_copy, int);
+ break;
+ case 'f': // float
+ fnumber = va_arg (args_copy, double);
+ break;
+ default:
+ break;
+ }
+ }
+ va_end (args_copy);
+ va_end (args);
+}
+
+int
+main ()
+{
+
+ // Check bool.
+ _Bool success = false;
+
+ // Check restrict.
+ if (test_restrict ("String literal") == 0)
+ success = true;
+ char *restrict newvar = "Another string";
+
+ // Check varargs.
+ test_varargs ("s, d' f .", "string", 65, 34.234);
+ test_varargs_macros ();
+
+ // Check flexible array members.
+ struct incomplete_array *ia =
+ malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
+ ia->datasize = 10;
+ for (int i = 0; i < ia->datasize; ++i)
+ ia->data[i] = i * 1.234;
+
+ // Check named initializers.
+ struct named_init ni = {
+ .number = 34,
+ .name = L"Test wide string",
+ .average = 543.34343,
+ };
+
+ ni.number = 58;
+
+ int dynamic_array[ni.number];
+ dynamic_array[ni.number - 1] = 543;
+
+ // work around unused variable warnings
+ return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
+ || dynamic_array[ni.number - 1] != 543);
+
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c99=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c99" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c99" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c99"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
+$as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c99" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_prog_cc_c89=$ac_arg
+fi
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+if test "x$ac_cv_prog_cc_c89" != xno; then :
+ ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
+else
+ ac_cv_prog_cc_stdc=no
+fi
+
+fi
+ ;;
+esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
+$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
+ if test "${ac_cv_prog_cc_stdc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+fi
+
+ case $ac_cv_prog_cc_stdc in #(
+ no) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;; #(
+ '') :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
+$as_echo "none needed" >&6; } ;; #(
+ *) :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
+$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
+esac
+
+
+
+
+
+
+
+
+ if test -z "$AB_PACKAGE"; then
+ AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild project... $AB_PACKAGE" >&5
+$as_echo "$as_me: autobuild project... $AB_PACKAGE" >&6;}
+
+ if test -z "$AB_VERSION"; then
+ AB_VERSION=${PACKAGE_VERSION:-$VERSION}
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild revision... $AB_VERSION" >&5
+$as_echo "$as_me: autobuild revision... $AB_VERSION" >&6;}
+
+ hostname=`hostname`
+ if test "$hostname"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild hostname... $hostname" >&5
+$as_echo "$as_me: autobuild hostname... $hostname" >&6;}
+ fi
+
+
+
+ date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: autobuild timestamp... $date" >&5
+$as_echo "$as_me: autobuild timestamp... $date" >&6;}
+ fi
+
+
+
+
+
+
+
+
+
+# Check whether --enable-largefile was given.
+if test "${enable_largefile+set}" = set; then :
+ enableval=$enable_largefile;
+fi
+
+if test "$enable_largefile" != no; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
+$as_echo_n "checking for special C compiler options needed for large files... " >&6; }
+if test "${ac_cv_sys_largefile_CC+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_sys_largefile_CC=no
+ if test "$GCC" != yes; then
+ ac_save_CC=$CC
+ while :; do
+ # IRIX 6.2 and later do not support large files by default,
+ # so use the C compiler's -n32 option if that helps.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ if ac_fn_c_try_compile "$LINENO"; then :
+ break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ CC="$CC -n32"
+ if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_largefile_CC=' -n32'; break
+fi
+rm -f core conftest.err conftest.$ac_objext
+ break
+ done
+ CC=$ac_save_CC
+ rm -f conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
+$as_echo "$ac_cv_sys_largefile_CC" >&6; }
+ if test "$ac_cv_sys_largefile_CC" != no; then
+ CC=$CC$ac_cv_sys_largefile_CC
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
+$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
+if test "${ac_cv_sys_file_offset_bits+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _FILE_OFFSET_BITS 64
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_file_offset_bits=64; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_file_offset_bits=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
+$as_echo "$ac_cv_sys_file_offset_bits" >&6; }
+case $ac_cv_sys_file_offset_bits in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ if test $ac_cv_sys_file_offset_bits = unknown; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
+$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
+if test "${ac_cv_sys_large_files+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ while :; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=no; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#define _LARGE_FILES 1
+#include <sys/types.h>
+ /* Check that off_t can represent 2**63 - 1 correctly.
+ We can't simply define LARGE_OFF_T to be 9223372036854775807,
+ since some C++ compilers masquerading as C compilers
+ incorrectly reject 9223372036854775807. */
+#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
+ int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
+ && LARGE_OFF_T % 2147483647 == 1)
+ ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_sys_large_files=1; break
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_cv_sys_large_files=unknown
+ break
+done
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
+$as_echo "$ac_cv_sys_large_files" >&6; }
+case $ac_cv_sys_large_files in #(
+ no | unknown) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define _LARGE_FILES $ac_cv_sys_large_files
+_ACEOF
+;;
+esac
+rm -rf conftest*
+ fi
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+
+else
+ # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if ac_fn_c_try_cpp "$LINENO"; then :
+ # Broken: success on invalid input.
+continue
+else
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.i conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.i conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then :
+
+else
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details" "$LINENO" 5 ; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+# FIXME: we rely on the cache variable name because
+# there is no other way.
+set dummy $CC
+am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
+if test "$am_t" != yes; then
+ # Losing compiler, so override with the script.
+ # FIXME: It is wrong to rewrite CC.
+ # But if we don't then we get into trouble of one sort or another.
+ # A longer-term fix would be to have automake use am__CC in this case,
+ # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
+ CC="$am_aux_dir/compile $CC"
+fi
+
+
+: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
+$as_echo_n "checking for a sed that does not truncate output... " >&6; }
+if test "${ac_cv_path_SED+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
+ for ac_i in 1 2 3 4 5 6 7; do
+ ac_script="$ac_script$as_nl$ac_script"
+ done
+ echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
+ { ac_script=; unset ac_script;}
+ if test -z "$SED"; then
+ ac_path_SED_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_SED" && $as_test_x "$ac_path_SED"; } || continue
+# Check for GNU ac_path_SED and select it if it is found.
+ # Check for GNU $ac_path_SED
+case `"$ac_path_SED" --version 2>&1` in
+*GNU*)
+ ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo '' >> "conftest.nl"
+ "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_SED_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_SED="$ac_path_SED"
+ ac_path_SED_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_SED_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_SED"; then
+ as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
+ fi
+else
+ ac_cv_path_SED=$SED
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
+$as_echo "$ac_cv_path_SED" >&6; }
+ SED="$ac_cv_path_SED"
+ rm -f conftest.sed
+
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-debug was given.
+if test "${enable_debug+set}" = set; then :
+ enableval=$enable_debug;
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for compilation debug mode" >&5
+$as_echo_n "checking for compilation debug mode... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${enable_debug-no}" >&5
+$as_echo "${enable_debug-no}" >&6; }
+
+: ${rm=rm -f}
+: ${RM=rm -f}
+
+set dummy $CC
+compiler="${compiler-$2}"
+test -n "$rm" || rm="rm -f"
+
+if test "X$enable_debug" = Xyes; then
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=no
+fi
+
+
+
+
+
+
+
+
+
+
+$as_echo "#define DEBUG 1" >>confdefs.h
+
+ M4_default_preload="m4 traditional gnu load \
+import modtest mpeval shadow stdlib time"
+ if test "$GCC" = yes; then
+ case "$CFLAGS" in
+ *-O* ) CFLAGS=`echo $CFLAGS | $SED 's/-O[^ ]* / /;s/-O[^ ]*$//'` ;;
+ esac
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -ggdb3" >&5
+$as_echo_n "checking if $compiler accepts -ggdb3... " >&6; }
+if test "${M4_cv_prog_compiler_ggdb3+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_ggdb3=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-ggdb3 -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6703: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6707: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_ggdb3=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_ggdb3" >&5
+$as_echo "$M4_cv_prog_compiler_ggdb3" >&6; }
+
+if test x"$M4_cv_prog_compiler_ggdb3" = xyes; then
+ CFLAGS="$CFLAGS -ggdb3"
+else
+ CFLAGS="$CFLAGS -g"
+fi
+
+ ;;
+ esac
+ CFLAGS="$CFLAGS -Wall"
+ WMORE="-Wshadow -Wpointer-arith -Wcast-align -Wnested-externs"
+ WMORE="$WMORE -Wmissing-prototypes -Wmissing-declarations -Winline"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts $WMORE" >&5
+$as_echo_n "checking if $compiler accepts $WMORE... " >&6; }
+if test "${M4_cv_prog_compiler_warning_flags+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_warning_flags=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$WMORE -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6752: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6756: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_warning_flags=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_warning_flags" >&5
+$as_echo "$M4_cv_prog_compiler_warning_flags" >&6; }
+
+if test x"$M4_cv_prog_compiler_warning_flags" = xyes; then
+ CFLAGS="$CFLAGS $WMORE"
+else
+ :
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler accepts -Wno-long-long" >&5
+$as_echo_n "checking if $compiler accepts -Wno-long-long... " >&6; }
+if test "${M4_cv_prog_compiler_wnolonglong+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_wnolonglong=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-Wno-long-long -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:6797: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:6801: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_wnolonglong=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_wnolonglong" >&5
+$as_echo "$M4_cv_prog_compiler_wnolonglong" >&6; }
+
+if test x"$M4_cv_prog_compiler_wnolonglong" = xyes; then
+ CFLAGS="$CFLAGS -Wno-long-long"
+else
+ :
+fi
+
+ else
+ case "$CFLAGS" in
+ *-g* ) ;;
+ * ) CFLAGS="$CFLAGS -g" ;;
+ esac
+ fi
+else
+ # Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+
+
+ case "$CFLAGS" in
+ *-g* ) CFLAGS=`echo "$CFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+ case "$CXXFLAGS" in
+ *-g* ) CXXFLAGS=`echo "$CXXFLAGS" |\
+ $SED -e 's/ -g / /g;s/ -g$//;s/^-g //g;s/^-g$//'`
+ ;;
+ esac
+fi
+
+
+
+## ----------------------- ##
+## Libtool initialization. ##
+## ----------------------- ##
+
+
+
+
+
+
+
+
+
+case `pwd` in
+ *\ * | *\ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5
+$as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;;
+esac
+
+
+
+macro_version='2.2.6b'
+macro_revision='1.3017'
+
+
+
+
+
+
+
+
+
+
+
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
+$as_echo_n "checking for fgrep... " >&6; }
+if test "${ac_cv_path_FGREP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
+ then ac_cv_path_FGREP="$GREP -F"
+ else
+ if test -z "$FGREP"; then
+ ac_path_FGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in fgrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_FGREP" && $as_test_x "$ac_path_FGREP"; } || continue
+# Check for GNU ac_path_FGREP and select it if it is found.
+ # Check for GNU $ac_path_FGREP
+case `"$ac_path_FGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'FGREP' >> "conftest.nl"
+ "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ as_fn_arith $ac_count + 1 && ac_count=$as_val
+ if test $ac_count -gt ${ac_path_FGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_FGREP="$ac_path_FGREP"
+ ac_path_FGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_FGREP_found && break 3
+ done
+ done
+ done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_FGREP"; then
+ as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+ fi
+else
+ ac_cv_path_FGREP=$FGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
+$as_echo "$ac_cv_path_FGREP" >&6; }
+ FGREP="$ac_cv_path_FGREP"
+
+
+test -z "$GREP" && GREP=grep
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
+$as_echo_n "checking for ld used by $CC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | ?:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${lt_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${lt_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_gnu_ld" >&5
+$as_echo "$lt_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5
+$as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; }
+if test "${lt_cv_path_NM+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5
+$as_echo "$lt_cv_path_NM" >&6; }
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DUMPBIN"; then
+ ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DUMPBIN=$ac_cv_prog_DUMPBIN
+if test -n "$DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
+$as_echo "$DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$DUMPBIN" && break
+ done
+fi
+if test -z "$DUMPBIN"; then
+ ac_ct_DUMPBIN=$DUMPBIN
+ for ac_prog in "dumpbin -symbols" "link -dump -symbols"
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DUMPBIN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DUMPBIN"; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DUMPBIN="$ac_prog"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN
+if test -n "$ac_ct_DUMPBIN"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5
+$as_echo "$ac_ct_DUMPBIN" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_DUMPBIN" && break
+done
+
+ if test "x$ac_ct_DUMPBIN" = x; then
+ DUMPBIN=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DUMPBIN=$ac_ct_DUMPBIN
+ fi
+fi
+
+
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5
+$as_echo_n "checking the name lister ($NM) interface... " >&6; }
+if test "${lt_cv_nm_interface+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:7281: $ac_compile\"" >&5)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:7284: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&5
+ (eval echo "\"\$as_me:7287: output\"" >&5)
+ cat conftest.out >&5
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5
+$as_echo "$lt_cv_nm_interface" >&6; }
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
+$as_echo_n "checking whether ln -s works... " >&6; }
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
+$as_echo "no, using $LN_S" >&6; }
+fi
+
+# find the maximum length of command line arguments
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5
+$as_echo_n "checking the maximum length of command line arguments... " >&6; }
+if test "${lt_cv_sys_max_cmd_len+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL $0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+
+fi
+
+if test -n $lt_cv_sys_max_cmd_len ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5
+$as_echo "$lt_cv_sys_max_cmd_len" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5
+$as_echo "none" >&6; }
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5
+$as_echo_n "checking whether the shell understands some XSI constructs... " >&6; }
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5
+$as_echo "$xsi_shell" >&6; }
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5
+$as_echo_n "checking whether the shell understands \"+=\"... " >&6; }
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5
+$as_echo "$lt_shell_append" >&6; }
+
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+
+
+
+
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5
+$as_echo_n "checking for $LD option to reload object files... " >&6; }
+if test "${lt_cv_ld_reload_flag+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_reload_flag='-r'
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5
+$as_echo "$lt_cv_ld_reload_flag" >&6; }
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5
+$as_echo_n "checking how to recognize dependent libraries... " >&6; }
+if test "${lt_cv_deplibs_check_method+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[4-9]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[45]*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[3-9]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5
+$as_echo "$lt_cv_deplibs_check_method" >&6; }
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AR"; then
+ ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AR="${ac_tool_prefix}ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
+$as_echo "$AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AR"; then
+ ac_ct_AR=$AR
+ # Extract the first word of "ar", so it can be a program name with args.
+set dummy ar; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AR+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AR"; then
+ ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AR="ar"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AR=$ac_cv_prog_ac_ct_AR
+if test -n "$ac_ct_AR"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
+$as_echo "$ac_ct_AR" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AR" = x; then
+ AR="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AR=$ac_ct_AR
+ fi
+else
+ AR="$ac_cv_prog_AR"
+fi
+
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+
+
+
+
+
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$STRIP"; then
+ ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+ ac_ct_STRIP=$STRIP
+ # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_STRIP"; then
+ ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_STRIP="strip"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_STRIP" = x; then
+ STRIP=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ STRIP=$ac_ct_STRIP
+ fi
+else
+ STRIP="$ac_cv_prog_STRIP"
+fi
+
+test -z "$STRIP" && STRIP=:
+
+
+
+
+
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+test -z "$RANLIB" && RANLIB=:
+
+
+
+
+
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5
+$as_echo_n "checking command to parse $NM output from $compiler object... " >&6; }
+if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[BCDEGRST]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([_A-Za-z][_A-Za-z0-9]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[BCDT]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[ABCDGISTW]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[ABCDEGRST]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[BCDEGRST]'
+ ;;
+osf*)
+ symcode='[BCDEGQRST]'
+ ;;
+solaris*)
+ symcode='[BDRT]'
+ ;;
+sco3.2v5*)
+ symcode='[DT]'
+ ;;
+sysv4.2uw2*)
+ symcode='[DT]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[ABDT]'
+ ;;
+sysv4)
+ symcode='[DFNSTU]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[ABCDGIRSTW]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK '"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag"
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&5
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&5
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "$progname: failed program was:" >&5
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+
+fi
+
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5
+$as_echo "failed" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
+$as_echo "ok" >&6; }
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --enable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then :
+ enableval=$enable_libtool_lock;
+fi
+
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '#line 8485 "configure"' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5
+$as_echo_n "checking whether the C compiler needs -belf... " >&6; }
+if test "${lt_cv_cc_needs_belf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_cc_needs_belf=yes
+else
+ lt_cv_cc_needs_belf=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5
+$as_echo "$lt_cv_cc_needs_belf" >&6; }
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+
+
+ case $host_os in
+ rhapsody* | darwin*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DSYMUTIL"; then
+ ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DSYMUTIL=$ac_cv_prog_DSYMUTIL
+if test -n "$DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
+$as_echo "$DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DSYMUTIL"; then
+ ac_ct_DSYMUTIL=$DSYMUTIL
+ # Extract the first word of "dsymutil", so it can be a program name with args.
+set dummy dsymutil; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DSYMUTIL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DSYMUTIL"; then
+ ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DSYMUTIL="dsymutil"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL
+if test -n "$ac_ct_DSYMUTIL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5
+$as_echo "$ac_ct_DSYMUTIL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DSYMUTIL" = x; then
+ DSYMUTIL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DSYMUTIL=$ac_ct_DSYMUTIL
+ fi
+else
+ DSYMUTIL="$ac_cv_prog_DSYMUTIL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args.
+set dummy ${ac_tool_prefix}nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NMEDIT"; then
+ ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+NMEDIT=$ac_cv_prog_NMEDIT
+if test -n "$NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5
+$as_echo "$NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_NMEDIT"; then
+ ac_ct_NMEDIT=$NMEDIT
+ # Extract the first word of "nmedit", so it can be a program name with args.
+set dummy nmedit; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_NMEDIT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_NMEDIT"; then
+ ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_NMEDIT="nmedit"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT
+if test -n "$ac_ct_NMEDIT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5
+$as_echo "$ac_ct_NMEDIT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_NMEDIT" = x; then
+ NMEDIT=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ NMEDIT=$ac_ct_NMEDIT
+ fi
+else
+ NMEDIT="$ac_cv_prog_NMEDIT"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args.
+set dummy ${ac_tool_prefix}lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$LIPO"; then
+ ac_cv_prog_LIPO="$LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_LIPO="${ac_tool_prefix}lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+LIPO=$ac_cv_prog_LIPO
+if test -n "$LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
+$as_echo "$LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_LIPO"; then
+ ac_ct_LIPO=$LIPO
+ # Extract the first word of "lipo", so it can be a program name with args.
+set dummy lipo; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_LIPO+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_LIPO"; then
+ ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_LIPO="lipo"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO
+if test -n "$ac_ct_LIPO"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5
+$as_echo "$ac_ct_LIPO" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_LIPO" = x; then
+ LIPO=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ LIPO=$ac_ct_LIPO
+ fi
+else
+ LIPO="$ac_cv_prog_LIPO"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL"; then
+ ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL="${ac_tool_prefix}otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL=$ac_cv_prog_OTOOL
+if test -n "$OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
+$as_echo "$OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL"; then
+ ac_ct_OTOOL=$OTOOL
+ # Extract the first word of "otool", so it can be a program name with args.
+set dummy otool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL"; then
+ ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL="otool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL
+if test -n "$ac_ct_OTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5
+$as_echo "$ac_ct_OTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL" = x; then
+ OTOOL=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL=$ac_ct_OTOOL
+ fi
+else
+ OTOOL="$ac_cv_prog_OTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args.
+set dummy ${ac_tool_prefix}otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OTOOL64"; then
+ ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OTOOL64=$ac_cv_prog_OTOOL64
+if test -n "$OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5
+$as_echo "$OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OTOOL64"; then
+ ac_ct_OTOOL64=$OTOOL64
+ # Extract the first word of "otool64", so it can be a program name with args.
+set dummy otool64; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OTOOL64+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OTOOL64"; then
+ ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OTOOL64="otool64"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64
+if test -n "$ac_ct_OTOOL64"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5
+$as_echo "$ac_ct_OTOOL64" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OTOOL64" = x; then
+ OTOOL64=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OTOOL64=$ac_ct_OTOOL64
+ fi
+else
+ OTOOL64="$ac_cv_prog_OTOOL64"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5
+$as_echo_n "checking for -single_module linker flag... " >&6; }
+if test "${lt_cv_apple_cc_single_mod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&5
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&5
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5
+$as_echo "$lt_cv_apple_cc_single_mod" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5
+$as_echo_n "checking for -exported_symbols_list linker flag... " >&6; }
+if test "${lt_cv_ld_exported_symbols_list+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ lt_cv_ld_exported_symbols_list=yes
+else
+ lt_cv_ld_exported_symbols_list=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5
+$as_echo "$lt_cv_ld_exported_symbols_list" >&6; }
+ case $host_os in
+ rhapsody* | darwin1.[012])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[91]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[012]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+
+for ac_header in dlfcn.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_dlfcn_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLFCN_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+# Set options
+# Check whether --enable-shared was given.
+if test "${enable_shared+set}" = set; then :
+ enableval=$enable_shared; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_shared=yes
+fi
+
+
+
+
+enable_dlopen=yes
+enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$AS"; then
+ ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_AS="${ac_tool_prefix}as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+AS=$ac_cv_prog_AS
+if test -n "$AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
+$as_echo "$AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_AS"; then
+ ac_ct_AS=$AS
+ # Extract the first word of "as", so it can be a program name with args.
+set dummy as; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_AS+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_AS"; then
+ ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_AS="as"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_AS=$ac_cv_prog_ac_ct_AS
+if test -n "$ac_ct_AS"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5
+$as_echo "$ac_ct_AS" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_AS" = x; then
+ AS="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ AS=$ac_ct_AS
+ fi
+else
+ AS="$ac_cv_prog_AS"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
+set dummy ${ac_tool_prefix}dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$DLLTOOL"; then
+ ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+DLLTOOL=$ac_cv_prog_DLLTOOL
+if test -n "$DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
+$as_echo "$DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_DLLTOOL"; then
+ ac_ct_DLLTOOL=$DLLTOOL
+ # Extract the first word of "dlltool", so it can be a program name with args.
+set dummy dlltool; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_DLLTOOL"; then
+ ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_DLLTOOL="dlltool"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
+if test -n "$ac_ct_DLLTOOL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
+$as_echo "$ac_ct_DLLTOOL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_DLLTOOL" = x; then
+ DLLTOOL="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ DLLTOOL=$ac_ct_DLLTOOL
+ fi
+else
+ DLLTOOL="$ac_cv_prog_DLLTOOL"
+fi
+
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args.
+set dummy ${ac_tool_prefix}objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$OBJDUMP"; then
+ ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+OBJDUMP=$ac_cv_prog_OBJDUMP
+if test -n "$OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
+$as_echo "$OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_OBJDUMP"; then
+ ac_ct_OBJDUMP=$OBJDUMP
+ # Extract the first word of "objdump", so it can be a program name with args.
+set dummy objdump; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_OBJDUMP"; then
+ ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_OBJDUMP="objdump"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
+if test -n "$ac_ct_OBJDUMP"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
+$as_echo "$ac_ct_OBJDUMP" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_OBJDUMP" = x; then
+ OBJDUMP="false"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ OBJDUMP=$ac_ct_OBJDUMP
+ fi
+else
+ OBJDUMP="$ac_cv_prog_OBJDUMP"
+fi
+
+ ;;
+esac
+
+test -z "$AS" && AS=as
+
+
+
+
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+
+
+
+
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+
+
+
+
+
+
+
+
+
+
+ # Check whether --enable-static was given.
+if test "${enable_static+set}" = set; then :
+ enableval=$enable_static; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_static=yes
+fi
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-pic was given.
+if test "${with_pic+set}" = set; then :
+ withval=$with_pic; pic_mode="$withval"
+else
+ pic_mode=default
+fi
+
+
+test -z "$pic_mode" && pic_mode=default
+
+
+
+
+
+
+
+ # Check whether --enable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then :
+ enableval=$enable_fast_install; p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac
+else
+ enable_fast_install=yes
+fi
+
+
+
+
+
+
+
+
+
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+test -z "$LN_S" && LN_S="ln -s"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5
+$as_echo_n "checking for objdir... " >&6; }
+if test "${lt_cv_objdir+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5
+$as_echo "$lt_cv_objdir" >&6; }
+objdir=$lt_cv_objdir
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_OBJDIR "$lt_cv_objdir/"
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\(["`\\]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+for cc_temp in $compiler""; do
+ case $cc_temp in
+ compile | *[\\/]compile | ccache | *[\\/]ccache ) ;;
+ distcc | *[\\/]distcc | purify | *[\\/]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5
+$as_echo_n "checking for ${ac_tool_prefix}file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/${ac_tool_prefix}file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5
+$as_echo_n "checking for file... " >&6; }
+if test "${lt_cv_path_MAGIC_CMD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $MAGIC_CMD in
+[\\/*] | ?:[\\/]*)
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ ac_dummy="/usr/bin$PATH_SEPARATOR$PATH"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/file; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/file"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5
+$as_echo "$MAGIC_CMD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ else
+ MAGIC_CMD=:
+ fi
+fi
+
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+
+lt_save_CC="$CC"
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+objext=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+
+
+
+
+
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+
+lt_prog_compiler_no_builtin_flag=
+
+if test "$GCC" = yes; then
+ lt_prog_compiler_no_builtin_flag=' -fno-builtin'
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5
+$as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; }
+if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_rtti_exceptions=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-fno-rtti -fno-exceptions"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:10040: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:10044: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_rtti_exceptions=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5
+$as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; }
+
+if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then
+ lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions"
+else
+ :
+fi
+
+fi
+
+
+
+
+
+
+ lt_prog_compiler_wl=
+lt_prog_compiler_pic=
+lt_prog_compiler_static=
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5
+$as_echo_n "checking for $compiler option to produce PIC... " >&6; }
+
+ if test "$GCC" = yes; then
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_static='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ lt_prog_compiler_pic='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[3-9]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ lt_prog_compiler_can_build_shared=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ lt_prog_compiler_pic=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ lt_prog_compiler_pic='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ lt_prog_compiler_wl='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ lt_prog_compiler_static='-Bstatic'
+ else
+ lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ lt_prog_compiler_pic='-DDLL_EXPORT'
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ lt_prog_compiler_pic='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ lt_prog_compiler_static='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ lt_prog_compiler_wl='-Wl,'
+ # PIC (with -KPIC) is the default.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fPIC'
+ lt_prog_compiler_static='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='--shared'
+ lt_prog_compiler_static='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-fpic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+ ccc*)
+ lt_prog_compiler_wl='-Wl,'
+ # All Alpha code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-qpic'
+ lt_prog_compiler_static='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ lt_prog_compiler_wl=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ lt_prog_compiler_pic='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ lt_prog_compiler_wl='-Wl,'
+ # All OSF/1 code is PIC.
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ rdos*)
+ lt_prog_compiler_static='-non_shared'
+ ;;
+
+ solaris*)
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ lt_prog_compiler_wl='-Qoption ld ';;
+ *)
+ lt_prog_compiler_wl='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ lt_prog_compiler_wl='-Qoption ld '
+ lt_prog_compiler_pic='-PIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ lt_prog_compiler_pic='-Kconform_pic'
+ lt_prog_compiler_static='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_pic='-KPIC'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ unicos*)
+ lt_prog_compiler_wl='-Wl,'
+ lt_prog_compiler_can_build_shared=no
+ ;;
+
+ uts4*)
+ lt_prog_compiler_pic='-pic'
+ lt_prog_compiler_static='-Bstatic'
+ ;;
+
+ *)
+ lt_prog_compiler_can_build_shared=no
+ ;;
+ esac
+ fi
+
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ lt_prog_compiler_pic=
+ ;;
+ *)
+ lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC"
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_prog_compiler_pic" >&5
+$as_echo "$lt_prog_compiler_pic" >&6; }
+
+
+
+
+
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$lt_prog_compiler_pic"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5
+$as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; }
+if test "${lt_cv_prog_compiler_pic_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_pic_works=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$lt_prog_compiler_pic -DPIC"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:10379: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:10383: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_pic_works=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5
+$as_echo "$lt_cv_prog_compiler_pic_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_pic_works" = xyes; then
+ case $lt_prog_compiler_pic in
+ "" | " "*) ;;
+ *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;;
+ esac
+else
+ lt_prog_compiler_pic=
+ lt_prog_compiler_can_build_shared=no
+fi
+
+fi
+
+
+
+
+
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5
+$as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; }
+if test "${lt_cv_prog_compiler_static_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_static_works=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $lt_tmp_static_flag"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&5
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ else
+ lt_cv_prog_compiler_static_works=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5
+$as_echo "$lt_cv_prog_compiler_static_works" >&6; }
+
+if test x"$lt_cv_prog_compiler_static_works" = xyes; then
+ :
+else
+ lt_prog_compiler_static=
+fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:10484: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:10488: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5
+$as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; }
+if test "${lt_cv_prog_compiler_c_o+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_prog_compiler_c_o=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:10539: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&5
+ echo "$as_me:10543: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ lt_cv_prog_compiler_c_o=yes
+ fi
+ fi
+ chmod u+w . 2>&5
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5
+$as_echo "$lt_cv_prog_compiler_c_o" >&6; }
+
+
+
+
+hard_links="nottested"
+if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5
+$as_echo_n "checking if we can lock with hard links... " >&6; }
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5
+$as_echo "$hard_links" >&6; }
+ if test "$hard_links" = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5
+$as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;}
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5
+$as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; }
+
+ runpath_var=
+ allow_undefined_flag=
+ always_export_symbols=no
+ archive_cmds=
+ archive_expsym_cmds=
+ compiler_needs_object=no
+ enable_shared_with_static_runtimes=no
+ export_dynamic_flag_spec=
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ hardcode_automatic=no
+ hardcode_direct=no
+ hardcode_direct_absolute=no
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld=
+ hardcode_libdir_separator=
+ hardcode_minus_L=no
+ hardcode_shlibpath_var=unsupported
+ inherit_rpath=no
+ link_all_deplibs=unknown
+ module_cmds=
+ module_expsym_cmds=
+ old_archive_from_new_cmds=
+ old_archive_from_expsyms_cmds=
+ thread_safe_flag_spec=
+ whole_archive_flag_spec=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ include_expsyms=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ link_all_deplibs=no
+ ;;
+ esac
+
+ ld_shlibs=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ export_dynamic_flag_spec='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ whole_archive_flag_spec=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[3-9]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ allow_undefined_flag=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
+ # as there is no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ allow_undefined_flag=unsupported
+ always_export_symbols=no
+ enable_shared_with_static_runtimes=yes
+ export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ interix[3-9]*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ whole_archive_flag_spec=
+ tmp_sharedflag='--shared' ;;
+ xl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ compiler_needs_object=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive'
+ hardcode_libdir_flag_spec=
+ hardcode_libdir_flag_spec_ld='-rpath $libdir'
+ archive_cmds='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*)
+ ld_shlibs=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+
+ if test "$ld_shlibs" = no; then
+ runpath_var=
+ hardcode_libdir_flag_spec=
+ export_dynamic_flag_spec=
+ whole_archive_flag_spec=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ allow_undefined_flag=unsupported
+ always_export_symbols=yes
+ archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ archive_cmds=''
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ file_list_spec='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ link_all_deplibs=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ export_dynamic_flag_spec='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ always_export_symbols=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ allow_undefined_flag='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ allow_undefined_flag="-z nodefs"
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ no_undefined_flag=' ${wl}-bernotok'
+ allow_undefined_flag=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ whole_archive_flag_spec='$convenience'
+ archive_cmds_need_lc=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ archive_expsym_cmds=''
+ ;;
+ m68k)
+ archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[45]*)
+ export_dynamic_flag_spec=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ allow_undefined_flag=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ archive_cmds='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ old_archive_from_new_cmds='true'
+ # FIXME: Should let the user specify the lib program.
+ old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ fix_srcfile_path='`cygpath -w "$srcfile"`'
+ enable_shared_with_static_runtimes=yes
+ ;;
+
+ darwin* | rhapsody*)
+
+
+ archive_cmds_need_lc=no
+ hardcode_direct=no
+ hardcode_automatic=yes
+ hardcode_shlibpath_var=unsupported
+ whole_archive_flag_spec=''
+ link_all_deplibs=yes
+ allow_undefined_flag="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+
+ else
+ ld_shlibs=no
+ fi
+
+ ;;
+
+ dgux*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ archive_cmds='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ export_dynamic_flag_spec='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_flag_spec_ld='+b $libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ hardcode_direct=no
+ hardcode_shlibpath_var=no
+ ;;
+ *)
+ hardcode_direct=yes
+ hardcode_direct_absolute=yes
+ export_dynamic_flag_spec='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+int foo(void) {}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS="$save_LDFLAGS"
+ else
+ archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ inherit_rpath=yes
+ link_all_deplibs=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ newsos6)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_shlibpath_var=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ hardcode_direct=yes
+ hardcode_shlibpath_var=no
+ hardcode_direct_absolute=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ export_dynamic_flag_spec='${wl}-E'
+ else
+ case $host_os in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ ld_shlibs=no
+ fi
+ ;;
+
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ allow_undefined_flag=unsupported
+ archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ allow_undefined_flag=' -expect_unresolved \*'
+ archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ archive_cmds_need_lc='no'
+ hardcode_libdir_separator=:
+ ;;
+
+ solaris*)
+ no_undefined_flag=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ archive_cmds='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_shlibpath_var=no
+ case $host_os in
+ solaris2.[0-5] | solaris2.[0-5].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ whole_archive_flag_spec='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ link_all_deplibs=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ reload_cmds='$CC -r -o $output$reload_objs'
+ hardcode_direct=no
+ ;;
+ motorola)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ hardcode_shlibpath_var=no
+ ;;
+
+ sysv4.3*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ export_dynamic_flag_spec='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_shlibpath_var=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ ld_shlibs=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*)
+ no_undefined_flag='${wl}-z,text'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ no_undefined_flag='${wl}-z,text'
+ allow_undefined_flag='${wl}-z,nodefs'
+ archive_cmds_need_lc=no
+ hardcode_shlibpath_var=no
+ hardcode_libdir_flag_spec='${wl}-R,$libdir'
+ hardcode_libdir_separator=':'
+ link_all_deplibs=yes
+ export_dynamic_flag_spec='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_shlibpath_var=no
+ ;;
+
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ export_dynamic_flag_spec='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5
+$as_echo "$ld_shlibs" >&6; }
+test "$ld_shlibs" = no && can_build_shared=no
+
+with_gnu_ld=$with_gnu_ld
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$archive_cmds_need_lc" in
+x|xyes)
+ # Assume -lc should be added
+ archive_cmds_need_lc=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $archive_cmds in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5
+$as_echo_n "checking whether -lc should be explicitly linked in... " >&6; }
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$lt_prog_compiler_wl
+ pic_flag=$lt_prog_compiler_pic
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$allow_undefined_flag
+ allow_undefined_flag=
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5
+ (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }
+ then
+ archive_cmds_need_lc=no
+ else
+ archive_cmds_need_lc=yes
+ fi
+ allow_undefined_flag=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $archive_cmds_need_lc" >&5
+$as_echo "$archive_cmds_need_lc" >&6; }
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5
+$as_echo_n "checking dynamic linker characteristics... " >&6; }
+
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[lt_foo]++; }
+ if (lt_freq[lt_foo] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[4-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[01] | aix4.[01].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[45]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[123]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[01]* | freebsdelf3.[01]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[2-9]* | freebsdelf3.[2-9]* | \
+ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[3-9]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \
+ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\""
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then :
+ shlibpath_overrides_runpath=yes
+fi
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[89] | openbsd2.[89].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5
+$as_echo "$dynamic_linker" >&6; }
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5
+$as_echo_n "checking how to hardcode library paths into programs... " >&6; }
+hardcode_action=
+if test -n "$hardcode_libdir_flag_spec" ||
+ test -n "$runpath_var" ||
+ test "X$hardcode_automatic" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$hardcode_direct" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no &&
+ test "$hardcode_minus_L" != no; then
+ # Linking always hardcodes the temporary library directory.
+ hardcode_action=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ hardcode_action=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ hardcode_action=unsupported
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5
+$as_echo "$hardcode_action" >&6; }
+
+if test "$hardcode_action" = relink ||
+ test "$inherit_rpath" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+
+
+
+
+
+
+ if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+
+fi
+
+ ;;
+
+ *)
+ ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+ lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"
+else
+ ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen"
+if test "x$ac_cv_func_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
+$as_echo_n "checking for dlopen in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlopen=yes
+else
+ ac_cv_lib_dl_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
+$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
+if test "x$ac_cv_lib_dl_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+ lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+ lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+
+fi
+
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5
+$as_echo_n "checking whether a program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 12923 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5
+$as_echo "$lt_cv_dlopen_self" >&6; }
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5
+$as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; }
+if test "${lt_cv_dlopen_self_static+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ lt_cv_dlopen_self_static=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 13019 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;;
+ x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;;
+ esac
+ else :
+ # compilation failed
+ lt_cv_dlopen_self_static=no
+ fi
+fi
+rm -fr conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5
+$as_echo "$lt_cv_dlopen_self_static" >&6; }
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+striplib=
+old_striplib=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5
+$as_echo_n "checking whether stripping libraries is possible... " >&6; }
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ fi
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+ ;;
+ esac
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ # Report which library types will actually be built
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5
+$as_echo_n "checking if libtool supports shared libraries... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5
+$as_echo "$can_build_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5
+$as_echo_n "checking whether to build shared libraries... " >&6; }
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[4-9]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5
+$as_echo "$enable_shared" >&6; }
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5
+$as_echo_n "checking whether to build static libraries... " >&6; }
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5
+$as_echo "$enable_static" >&6; }
+
+
+
+
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+CC="$lt_save_CC"
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_config_commands="$ac_config_commands libtool"
+
+
+
+
+# Only expand once:
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which extension is used for runtime loadable modules" >&5
+$as_echo_n "checking which extension is used for runtime loadable modules... " >&6; }
+if test "${libltdl_cv_shlibext+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_shlibext" >&5
+$as_echo "$libltdl_cv_shlibext" >&6; }
+if test -n "$libltdl_cv_shlibext"; then
+
+cat >>confdefs.h <<_ACEOF
+#define LT_MODULE_EXT "$libltdl_cv_shlibext"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which variable specifies run-time module search path" >&5
+$as_echo_n "checking which variable specifies run-time module search path... " >&6; }
+if test "${lt_cv_module_path_var+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_module_path_var="$shlibpath_var"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_module_path_var" >&5
+$as_echo "$lt_cv_module_path_var" >&6; }
+if test -n "$lt_cv_module_path_var"; then
+
+cat >>confdefs.h <<_ACEOF
+#define LT_MODULE_PATH_VAR "$lt_cv_module_path_var"
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for the default library search path" >&5
+$as_echo_n "checking for the default library search path... " >&6; }
+if test "${lt_cv_sys_dlsearch_path+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlsearch_path" >&5
+$as_echo "$lt_cv_sys_dlsearch_path" >&6; }
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+
+cat >>confdefs.h <<_ACEOF
+#define LT_DLSEARCH_PATH "$sys_dlsearch_path"
+_ACEOF
+
+fi
+
+
+LT_DLLOADERS=
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+LIBADD_DLOPEN=
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
+$as_echo_n "checking for library containing dlopen... " >&6; }
+if test "${ac_cv_search_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dl; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_search_dlopen=$ac_res
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext
+ if test "${ac_cv_search_dlopen+set}" = set; then :
+ break
+fi
+done
+if test "${ac_cv_search_dlopen+set}" = set; then :
+
+else
+ ac_cv_search_dlopen=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
+$as_echo "$ac_cv_search_dlopen" >&6; }
+ac_res=$ac_cv_search_dlopen
+if test "$ac_res" != no; then :
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
+
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+
+int
+main ()
+{
+dlopen(0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
+
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5
+$as_echo_n "checking for dlopen in -lsvld... " >&6; }
+if test "${ac_cv_lib_svld_dlopen+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsvld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlopen ();
+int
+main ()
+{
+return dlopen ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_svld_dlopen=yes
+else
+ ac_cv_lib_svld_dlopen=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5
+$as_echo "$ac_cv_lib_svld_dlopen" >&6; }
+if test "x$ac_cv_lib_svld_dlopen" = x""yes; then :
+
+$as_echo "#define HAVE_LIBDL 1" >>confdefs.h
+
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"
+fi
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ for ac_func in dlerror
+do :
+ ac_fn_c_check_func "$LINENO" "dlerror" "ac_cv_func_dlerror"
+if test "x$ac_cv_func_dlerror" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_DLERROR 1
+_ACEOF
+
+fi
+done
+
+ LIBS="$lt_save_LIBS"
+fi
+
+
+LIBADD_SHL_LOAD=
+ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load"
+if test "x$ac_cv_func_shl_load" = x""yes; then :
+
+$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5
+$as_echo_n "checking for shl_load in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_shl_load+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shl_load ();
+int
+main ()
+{
+return shl_load ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_shl_load=yes
+else
+ ac_cv_lib_dld_shl_load=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5
+$as_echo "$ac_cv_lib_dld_shl_load" >&6; }
+if test "x$ac_cv_lib_dld_shl_load" = x""yes; then :
+
+$as_echo "#define HAVE_SHL_LOAD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"
+fi
+
+fi
+
+
+
+case $host_os in
+darwin[1567].*)
+# We only want this for pre-Mac OS X 10.4.
+ ac_fn_c_check_func "$LINENO" "_dyld_func_lookup" "ac_cv_func__dyld_func_lookup"
+if test "x$ac_cv_func__dyld_func_lookup" = x""yes; then :
+
+$as_echo "#define HAVE_DYLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"
+fi
+
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ ac_fn_c_check_decl "$LINENO" "cygwin_conv_path" "ac_cv_have_decl_cygwin_conv_path" "#include <sys/cygwin.h>
+"
+if test "x$ac_cv_have_decl_cygwin_conv_path" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CYGWIN_CONV_PATH $ac_have_decl
+_ACEOF
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5
+$as_echo_n "checking for dld_link in -ldld... " >&6; }
+if test "${ac_cv_lib_dld_dld_link+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldld $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dld_link ();
+int
+main ()
+{
+return dld_link ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dld_dld_link=yes
+else
+ ac_cv_lib_dld_dld_link=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5
+$as_echo "$ac_cv_lib_dld_dld_link" >&6; }
+if test "x$ac_cv_lib_dld_dld_link" = x""yes; then :
+
+$as_echo "#define HAVE_DLD 1" >>confdefs.h
+
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"
+fi
+
+
+
+
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+
+$as_echo "#define HAVE_LIBDLLOADER 1" >>confdefs.h
+
+fi
+
+
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for _ prefix in compiled symbols" >&5
+$as_echo_n "checking for _ prefix in compiled symbols... " >&6; }
+if test "${lt_cv_sys_symbol_underscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist\""; } >&5
+ (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&5
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&5
+ fi
+ else
+ echo "configure: failed program was:" >&5
+ cat conftest.c >&5
+ fi
+ rm -rf conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_symbol_underscore" >&5
+$as_echo "$lt_cv_sys_symbol_underscore" >&6; }
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+
+
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we have to add an underscore for dlsym" >&5
+$as_echo_n "checking whether we have to add an underscore for dlsym... " >&6; }
+if test "${libltdl_cv_need_uscore+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ if test "$cross_compiling" = yes; then :
+ libltdl_cv_need_uscore=cross
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+#line 13691 "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}
+_LT_EOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&5 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) libltdl_cv_need_uscore=no ;;
+ x$lt_dlneed_uscore) libltdl_cv_need_uscore=yes ;;
+ x$lt_dlunknown|x*) ;;
+ esac
+ else :
+ # compilation failed
+
+ fi
+fi
+rm -fr conftest*
+
+ LIBS="$save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_need_uscore" >&5
+$as_echo "$libltdl_cv_need_uscore" >&6; }
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+
+$as_echo "#define NEED_USCORE 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether deplibs are loaded by dlopen" >&5
+$as_echo_n "checking whether deplibs are loaded by dlopen... " >&6; }
+if test "${lt_cv_sys_dlopen_deplibs+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[4-9]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[12345]*|irix6.[01]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[1234]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_dlopen_deplibs" >&5
+$as_echo "$lt_cv_sys_dlopen_deplibs" >&6; }
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+
+$as_echo "#define LTDL_DLOPEN_DEPLIBS 1" >>confdefs.h
+
+fi
+
+:
+
+for ac_header in argz.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_argz_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ARGZ_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ac_fn_c_check_type "$LINENO" "error_t" "ac_cv_type_error_t" "#if defined(HAVE_ARGZ_H)
+# include <argz.h>
+#endif
+"
+if test "x$ac_cv_type_error_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_ERROR_T 1
+_ACEOF
+
+
+else
+
+$as_echo "#define error_t int" >>confdefs.h
+
+
+$as_echo "#define __error_t_defined 1" >>confdefs.h
+
+fi
+
+
+ARGZ_H=
+for ac_func in argz_add argz_append argz_count argz_create_sep argz_insert \
+ argz_next argz_stringify
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+ ARGZ_H=argz.h;
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+done
+
+
+if test -z "$ARGZ_H"; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if argz actually works" >&5
+$as_echo_n "checking if argz actually works... " >&6; }
+if test "${lt_cv_sys_argz_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $host_os in #(
+ *cygwin*)
+ lt_cv_sys_argz_works=no
+ if test "$cross_compiling" != no; then
+ lt_cv_sys_argz_works="guessing no"
+ else
+ lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+ save_IFS=$IFS
+ IFS=-.
+ set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+ IFS=$save_IFS
+ lt_os_major=${2-0}
+ lt_os_minor=${3-0}
+ lt_os_micro=${4-0}
+ if test "$lt_os_major" -gt 1 \
+ || { test "$lt_os_major" -eq 1 \
+ && { test "$lt_os_minor" -gt 5 \
+ || { test "$lt_os_minor" -eq 5 \
+ && test "$lt_os_micro" -gt 24; }; }; }; then
+ lt_cv_sys_argz_works=yes
+ fi
+ fi
+ ;; #(
+ *) lt_cv_sys_argz_works=yes ;;
+ esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_argz_works" >&5
+$as_echo "$lt_cv_sys_argz_works" >&6; }
+ if test $lt_cv_sys_argz_works = yes; then :
+
+$as_echo "#define HAVE_WORKING_ARGZ 1" >>confdefs.h
+
+else
+ ARGZ_H=argz.h
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS argz.$ac_objext"
+
+fi
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether libtool supports -dlopen/-dlpreopen" >&5
+$as_echo_n "checking whether libtool supports -dlopen/-dlpreopen... " >&6; }
+if test "${libltdl_cv_preloaded_symbols+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$lt_cv_sys_global_symbol_pipe"; then
+ libltdl_cv_preloaded_symbols=yes
+ else
+ libltdl_cv_preloaded_symbols=no
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libltdl_cv_preloaded_symbols" >&5
+$as_echo "$libltdl_cv_preloaded_symbols" >&6; }
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+
+$as_echo "#define HAVE_PRELOADED_SYMBOLS 1" >>confdefs.h
+
+fi
+
+# Set options
+
+
+
+
+
+
+
+
+
+
+
+# Check whether --with-included_ltdl was given.
+if test "${with_included_ltdl+set}" = set; then :
+ withval=$with_included_ltdl;
+fi
+
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ ac_fn_c_check_header_compile "$LINENO" "ltdl.h" "ac_cv_header_ltdl_h" "$ac_includes_default
+
+"
+if test "x$ac_cv_header_ltdl_h" = x""yes; then :
+ ac_fn_c_check_decl "$LINENO" "lt_dlinterface_register" "ac_cv_have_decl_lt_dlinterface_register" "$ac_includes_default
+ #include <ltdl.h>
+"
+if test "x$ac_cv_have_decl_lt_dlinterface_register" = x""yes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dladvise_preload in -lltdl" >&5
+$as_echo_n "checking for lt_dladvise_preload in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dladvise_preload+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dladvise_preload ();
+int
+main ()
+{
+return lt_dladvise_preload ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dladvise_preload=yes
+else
+ ac_cv_lib_ltdl_lt_dladvise_preload=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dladvise_preload" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dladvise_preload" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dladvise_preload" = x""yes; then :
+ with_included_ltdl=no
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+else
+ with_included_ltdl=yes
+fi
+
+
+fi
+
+
+
+
+# Check whether --with-ltdl_include was given.
+if test "${with_ltdl_include+set}" = set; then :
+ withval=$with_ltdl_include;
+fi
+
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ as_fn_error $? "invalid ltdl include directory: \`$with_ltdl_include'" "$LINENO" 5
+ fi
+else
+ with_ltdl_include=no
+fi
+
+
+# Check whether --with-ltdl_lib was given.
+if test "${with_ltdl_lib+set}" = set; then :
+ withval=$with_ltdl_lib;
+fi
+
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ as_fn_error $? "invalid ltdl library directory: \`$with_ltdl_lib'" "$LINENO" 5
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ case $enable_ltdl_convenience in
+ no) as_fn_error $? "this package needs a convenience libltdl" "$LINENO" 5 ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+esac
+LIBLTDL='${top_build_prefix}'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+LTDLDEPS=$LIBLTDL
+LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+
+
+
+
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+
+
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+
+$as_echo "#define HAVE_LTDL 1" >>confdefs.h
+
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ as_fn_error $? "\`--with-ltdl-include' and \`--with-ltdl-lib' options must be used together" "$LINENO" 5
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl headers" >&5
+$as_echo_n "checking where to find libltdl headers... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LTDLINCL" >&5
+$as_echo "$LTDLINCL" >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find libltdl library" >&5
+$as_echo_n "checking where to find libltdl library... " >&6; }
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLTDL" >&5
+$as_echo "$LIBLTDL" >&6; }
+
+
+
+# Check whether --enable-ltdl-install was given.
+if test "${enable_ltdl_install+set}" = set; then :
+ enableval=$enable_ltdl_install;
+fi
+
+
+case ,${enable_ltdl_install},${enable_ltdl_convenience} in
+ *yes*) ;;
+ *) enable_ltdl_convenience=yes ;;
+esac
+
+ if test x"${enable_ltdl_install-no}" != xno; then
+ INSTALL_LTDL_TRUE=
+ INSTALL_LTDL_FALSE='#'
+else
+ INSTALL_LTDL_TRUE='#'
+ INSTALL_LTDL_FALSE=
+fi
+
+ if test x"${enable_ltdl_convenience-no}" != xno; then
+ CONVENIENCE_LTDL_TRUE=
+ CONVENIENCE_LTDL_FALSE='#'
+else
+ CONVENIENCE_LTDL_TRUE='#'
+ CONVENIENCE_LTDL_FALSE=
+fi
+
+
+
+
+
+
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+
+
+
+for ac_header in unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+for ac_func in closedir opendir readdir
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__dirent.$ac_objext"
+
+fi
+done
+
+for ac_func in strlcat strlcpy
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+else
+
+
+ _LT_LIBOBJS="$_LT_LIBOBJS lt__strl.$ac_objext"
+
+fi
+done
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define LT_LIBEXT "$libext"
+_ACEOF
+
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+
+
+
+
+
+
+
+
+# Only expand once:
+
+
+
+# The lt_dlhandle_iterate symbol was added with libtool-2.2
+if test "x$with_included_ltdl" != "xyes"; then
+ save_CFLAGS="$CFLAGS"
+ save_LDFLAGS="$LDFLAGS"
+ CFLAGS="$CFLAGS $LTDLINCL"
+ LDFLAGS="$LDFLAGS $LIBLTDL"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lt_dlhandle_iterate in -lltdl" >&5
+$as_echo_n "checking for lt_dlhandle_iterate in -lltdl... " >&6; }
+if test "${ac_cv_lib_ltdl_lt_dlhandle_iterate+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lltdl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char lt_dlhandle_iterate ();
+int
+main ()
+{
+return lt_dlhandle_iterate ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=yes
+else
+ ac_cv_lib_ltdl_lt_dlhandle_iterate=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ltdl_lt_dlhandle_iterate" >&5
+$as_echo "$ac_cv_lib_ltdl_lt_dlhandle_iterate" >&6; }
+if test "x$ac_cv_lib_ltdl_lt_dlhandle_iterate" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBLTDL 1
+_ACEOF
+
+ LIBS="-lltdl $LIBS"
+
+else
+ as_fn_error $? "installed libltdl is too old" "$LINENO" 5
+fi
+
+ LDFLAGS="$save_LDFLAGS"
+ CFLAGS="$save_CFLAGS"
+fi
+
+
+# Use gcc's -pipe option if available: for faster compilation.
+case "$CFLAGS" in
+ *-pipe* ) ;;
+ * ) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -pipe" >&5
+$as_echo_n "checking if $compiler supports -pipe... " >&6; }
+if test "${M4_cv_prog_compiler_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_prog_compiler_pipe=no
+ ac_outfile=conftest.$ac_objext
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="-pipe -c conftest.$ac_ext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:14370: $lt_compile\"" >&5)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&5
+ echo "$as_me:14374: \$? = $ac_status" >&5
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ M4_cv_prog_compiler_pipe=yes
+ fi
+ fi
+ $RM conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_prog_compiler_pipe" >&5
+$as_echo "$M4_cv_prog_compiler_pipe" >&6; }
+
+if test x"$M4_cv_prog_compiler_pipe" = xyes; then
+ CFLAGS="$CFLAGS -pipe"
+else
+ :
+fi
+
+ ;;
+esac
+
+## ------------------------------- ##
+## Preloaded module configuration. ##
+## ------------------------------- ##
+if test "x$enable_shared" != xno; then :
+ DYNAMIC_MODULES=yes
+else
+ DYNAMIC_MODULES=no
+fi
+DYNAMIC_MODULES=$DYNAMIC_MODULES
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for modules to preload" >&5
+$as_echo_n "checking for modules to preload... " >&6; }
+ DLPREOPEN=
+
+
+# Check whether --with-modules was given.
+if test "${with_modules+set}" = set; then :
+ withval=$with_modules; use_modules="$withval"
+else
+ use_modules="$M4_default_preload"
+fi
+
+
+ PREOPEN_DEPENDENCIES=
+ DLPREOPEN="-dlpreopen force"
+ if test -z "$use_modules"; then
+ use_modules=none
+ else
+ if test "$use_modules" != yes; then
+ for module in $use_modules; do
+ case $module in
+ no|none) break ;;
+ m4|traditional|gnu|load|mpeval) dir=modules ;;
+ import|modtest|shadow|stdlib|time) dir=tests ;;
+ *) as_fn_error $? "Unrecognized module \`$module' in --with-modules" "$LINENO" 5
+ ;;
+ esac
+ DLPREOPEN="$DLPREOPEN -dlpreopen $dir/$module.la"
+ PREOPEN_DEPENDENCIES="$PREOPEN_DEPENDENCIES $dir/$module.la"
+ done
+ fi
+ fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $use_modules" >&5
+$as_echo "$use_modules" >&6; }
+
+
+
+
+## ---------------- ##
+## Gettext support. ##
+## ---------------- ##
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then :
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$localedir" || localedir='${datadir}/locale'
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then :
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then :
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
+$as_echo_n "checking for 64-bit host... " >&6; }
+if test "${gl_cv_solaris_64bit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef _LP64
+sixtyfour bits
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
+ gl_cv_solaris_64bit=yes
+else
+ gl_cv_solaris_64bit=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
+$as_echo "$gl_cv_solaris_64bit" >&6; }
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then :
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ HAVE_LIBICONV=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'iconv'; then
+ LIBICONV_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libc+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libc=yes"
+else
+ eval "$gt_func_gnugettext_libc=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+eval ac_res=\$$gt_func_gnugettext_libc
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then :
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ HAVE_LIBINTL=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = 'intl'; then
+ LIBINTL_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if eval "test \"\${$gt_func_gnugettext_libintl+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ eval "$gt_func_gnugettext_libintl=yes"
+else
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+eval ac_res=\$$gt_func_gnugettext_libintl
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ fi
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+$as_echo "#define ENABLE_NLS 1" >>confdefs.h
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
+
+
+$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+
+
+for ac_header in gettext.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gettext.h" "ac_cv_header_gettext_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gettext_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETTEXT_H 1
+_ACEOF
+ GETTEXT_H=""
+else
+ GETTEXT_H="gettext.h"
+fi
+
+done
+
+
+
+ac_config_files="$ac_config_files po/Makefile.in"
+
+
+
+
+
+## --------------- ##
+## Gnulib support. ##
+## --------------- ##
+
+
+
+
+
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_working_alloca_h=yes
+else
+ ac_cv_working_alloca_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_alloca_works=yes
+else
+ ac_cv_func_alloca_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+
+
+
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+$as_echo "#define C_ALLOCA 1" >>confdefs.h
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then :
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_c_stack_direction=0
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_stack_direction=1
+else
+ ac_cv_c_stack_direction=-1
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_inline=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+
+ GNULIB_BTOWC=0;
+ GNULIB_WCTOB=0;
+ GNULIB_MBSINIT=0;
+ GNULIB_MBRTOWC=0;
+ GNULIB_MBRLEN=0;
+ GNULIB_MBSRTOWCS=0;
+ GNULIB_MBSNRTOWCS=0;
+ GNULIB_WCRTOMB=0;
+ GNULIB_WCSRTOMBS=0;
+ GNULIB_WCSNRTOMBS=0;
+ GNULIB_WCWIDTH=0;
+ HAVE_BTOWC=1;
+ HAVE_MBSINIT=1;
+ HAVE_MBRTOWC=1;
+ HAVE_MBRLEN=1;
+ HAVE_MBSRTOWCS=1;
+ HAVE_MBSNRTOWCS=1;
+ HAVE_WCRTOMB=1;
+ HAVE_WCSRTOMBS=1;
+ HAVE_WCSNRTOMBS=1;
+ HAVE_DECL_WCTOB=1;
+ HAVE_DECL_WCWIDTH=1;
+ REPLACE_MBSTATE_T=0;
+ REPLACE_BTOWC=0;
+ REPLACE_WCTOB=0;
+ REPLACE_MBSINIT=0;
+ REPLACE_MBRTOWC=0;
+ REPLACE_MBRLEN=0;
+ REPLACE_MBSRTOWCS=0;
+ REPLACE_MBSNRTOWCS=0;
+ REPLACE_WCRTOMB=0;
+ REPLACE_WCSRTOMBS=0;
+ REPLACE_WCSNRTOMBS=0;
+ REPLACE_WCWIDTH=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
+$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
+if test "${gl_cv_header_wchar_h_correct_inline+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_wchar_h_correct_inline=yes
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; }; then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
+$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted." "$LINENO" 5
+ fi
+
+
+
+
+ for ac_func in $ac_func_list
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
+$as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
+if test "${am_cv_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int
+main ()
+{
+char* cs = nl_langinfo(CODESET); return !cs;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_langinfo_codeset=yes
+else
+ am_cv_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
+$as_echo "$am_cv_langinfo_codeset" >&6; }
+ if test $am_cv_langinfo_codeset = yes; then
+
+$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
+
+ fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
+$as_echo_n "checking whether realpath works... " >&6; }
+if test "${gl_cv_func_realpath_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ touch conftest.a
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_realpath_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char *name1 = realpath ("conftest.a", NULL);
+ char *name2 = realpath ("conftest.b/../conftest.a", NULL);
+ char *name3 = realpath ("conftest.a/", NULL);
+ return !(name1 && *name1 == '/' && !name2 && !name3);
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_realpath_works=yes
+else
+ gl_cv_func_realpath_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
+$as_echo "$gl_cv_func_realpath_works" >&6; }
+ if test "$gl_cv_func_realpath_works" = yes; then
+
+$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
+
+ fi
+
+
+
+
+ for ac_header in $ac_header_list
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
+"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ATOLL=0;
+ GNULIB_CALLOC_POSIX=0;
+ GNULIB_CANONICALIZE_FILE_NAME=0;
+ GNULIB_GETLOADAVG=0;
+ GNULIB_GETSUBOPT=0;
+ GNULIB_MALLOC_POSIX=0;
+ GNULIB_MKDTEMP=0;
+ GNULIB_MKOSTEMP=0;
+ GNULIB_MKOSTEMPS=0;
+ GNULIB_MKSTEMP=0;
+ GNULIB_MKSTEMPS=0;
+ GNULIB_PUTENV=0;
+ GNULIB_RANDOM_R=0;
+ GNULIB_REALLOC_POSIX=0;
+ GNULIB_REALPATH=0;
+ GNULIB_RPMATCH=0;
+ GNULIB_SETENV=0;
+ GNULIB_STRTOD=0;
+ GNULIB_STRTOLL=0;
+ GNULIB_STRTOULL=0;
+ GNULIB_UNSETENV=0;
+ HAVE_ATOLL=1;
+ HAVE_CALLOC_POSIX=1;
+ HAVE_CANONICALIZE_FILE_NAME=1;
+ HAVE_DECL_GETLOADAVG=1;
+ HAVE_GETSUBOPT=1;
+ HAVE_MALLOC_POSIX=1;
+ HAVE_MKDTEMP=1;
+ HAVE_MKOSTEMP=1;
+ HAVE_MKOSTEMPS=1;
+ HAVE_MKSTEMPS=1;
+ HAVE_RANDOM_R=1;
+ HAVE_REALLOC_POSIX=1;
+ HAVE_REALPATH=1;
+ HAVE_RPMATCH=1;
+ HAVE_SETENV=1;
+ HAVE_STRTOD=1;
+ HAVE_STRTOLL=1;
+ HAVE_STRTOULL=1;
+ HAVE_STRUCT_RANDOM_DATA=1;
+ HAVE_SYS_LOADAVG_H=0;
+ HAVE_UNSETENV=1;
+ REPLACE_CANONICALIZE_FILE_NAME=0;
+ REPLACE_MKSTEMP=0;
+ REPLACE_PUTENV=0;
+ REPLACE_REALPATH=0;
+ REPLACE_SETENV=0;
+ REPLACE_STRTOD=0;
+ REPLACE_UNSETENV=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system is Windows or MSDOS" >&5
+$as_echo_n "checking whether system is Windows or MSDOS... " >&6; }
+if test "${ac_cv_win_or_dos+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_win_or_dos=yes
+else
+ ac_cv_win_or_dos=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_win_or_dos" >&5
+$as_echo "$ac_cv_win_or_dos" >&6; }
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether drive letter can start relative path" >&5
+$as_echo_n "checking whether drive letter can start relative path... " >&6; }
+if test "${ac_cv_drive_letter_can_be_relative+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if defined __CYGWIN__
+drive letters are always absolute
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_drive_letter_can_be_relative=yes
+else
+ ac_cv_drive_letter_can_be_relative=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_drive_letter_can_be_relative" >&5
+$as_echo "$ac_cv_drive_letter_can_be_relative" >&6; }
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX $ac_fs_accepts_drive_letter_prefix
+_ACEOF
+
+
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR $ac_fs_backslash_is_file_name_separator
+_ACEOF
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE $ac_fs_drive_letter_can_be_relative
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+ GNULIB_CHOWN=0;
+ GNULIB_CLOSE=0;
+ GNULIB_DUP2=0;
+ GNULIB_DUP3=0;
+ GNULIB_ENVIRON=0;
+ GNULIB_EUIDACCESS=0;
+ GNULIB_FACCESSAT=0;
+ GNULIB_FCHDIR=0;
+ GNULIB_FCHOWNAT=0;
+ GNULIB_FSYNC=0;
+ GNULIB_FTRUNCATE=0;
+ GNULIB_GETCWD=0;
+ GNULIB_GETDOMAINNAME=0;
+ GNULIB_GETDTABLESIZE=0;
+ GNULIB_GETGROUPS=0;
+ GNULIB_GETHOSTNAME=0;
+ GNULIB_GETLOGIN=0;
+ GNULIB_GETLOGIN_R=0;
+ GNULIB_GETPAGESIZE=0;
+ GNULIB_GETUSERSHELL=0;
+ GNULIB_LCHOWN=0;
+ GNULIB_LINK=0;
+ GNULIB_LINKAT=0;
+ GNULIB_LSEEK=0;
+ GNULIB_PIPE2=0;
+ GNULIB_PREAD=0;
+ GNULIB_READLINK=0;
+ GNULIB_READLINKAT=0;
+ GNULIB_RMDIR=0;
+ GNULIB_SLEEP=0;
+ GNULIB_SYMLINK=0;
+ GNULIB_SYMLINKAT=0;
+ GNULIB_UNISTD_H_GETOPT=0;
+ GNULIB_UNISTD_H_SIGPIPE=0;
+ GNULIB_UNLINK=0;
+ GNULIB_UNLINKAT=0;
+ GNULIB_USLEEP=0;
+ GNULIB_WRITE=0;
+ HAVE_CHOWN=1;
+ HAVE_DUP2=1;
+ HAVE_DUP3=1;
+ HAVE_EUIDACCESS=1;
+ HAVE_FACCESSAT=1;
+ HAVE_FCHOWNAT=1;
+ HAVE_FSYNC=1;
+ HAVE_FTRUNCATE=1;
+ HAVE_GETDOMAINNAME=1;
+ HAVE_GETDTABLESIZE=1;
+ HAVE_GETGROUPS=1;
+ HAVE_GETHOSTNAME=1;
+ HAVE_GETLOGIN=1;
+ HAVE_GETPAGESIZE=1;
+ HAVE_GETUSERSHELL=1;
+ HAVE_LCHOWN=1;
+ HAVE_LINK=1;
+ HAVE_LINKAT=1;
+ HAVE_PIPE2=1;
+ HAVE_PREAD=1;
+ HAVE_READLINK=1;
+ HAVE_READLINKAT=1;
+ HAVE_SLEEP=1;
+ HAVE_SYMLINK=1;
+ HAVE_SYMLINKAT=1;
+ HAVE_DECL_ENVIRON=1;
+ HAVE_DECL_GETLOGIN_R=1;
+ HAVE_OS_H=0;
+ HAVE_SYS_PARAM_H=0;
+ HAVE_UNLINKAT=1;
+ HAVE_USLEEP=1;
+ REPLACE_CHOWN=0;
+ REPLACE_CLOSE=0;
+ REPLACE_DUP=0;
+ REPLACE_DUP2=0;
+ REPLACE_FCHDIR=0;
+ REPLACE_FCHOWNAT=0;
+ REPLACE_GETCWD=0;
+ REPLACE_GETGROUPS=0;
+ REPLACE_GETPAGESIZE=0;
+ REPLACE_LCHOWN=0;
+ REPLACE_LINK=0;
+ REPLACE_LINKAT=0;
+ REPLACE_LSEEK=0;
+ REPLACE_PREAD=0;
+ REPLACE_READLINK=0;
+ REPLACE_RMDIR=0;
+ REPLACE_SLEEP=0;
+ REPLACE_SYMLINK=0;
+ REPLACE_UNLINK=0;
+ REPLACE_UNLINKAT=0;
+ REPLACE_USLEEP=0;
+ REPLACE_WRITE=0;
+ UNISTD_H_HAVE_WINSOCK2_H=0;
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
+$as_echo_n "checking if environ is properly declared... " >&6; }
+ if test "${gt_cv_var_environ_declaration+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ extern struct { int foo; } environ;
+int
+main ()
+{
+environ.foo = 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_var_environ_declaration=no
+else
+ gt_cv_var_environ_declaration=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
+$as_echo "$gt_cv_var_environ_declaration" >&6; }
+ if test $gt_cv_var_environ_declaration = yes; then
+
+$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
+
+ fi
+
+
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
+$as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
+if test "${gl_cv_have_include_next+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=yes
+else
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <conftest.h>
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_have_include_next=buggy
+else
+ gl_cv_have_include_next=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
+$as_echo "$gl_cv_have_include_next" >&6; }
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
+$as_echo_n "checking for complete errno.h... " >&6; }
+if test "${gl_cv_header_errno_h_complete+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "booboo" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_complete=no
+else
+ gl_cv_header_errno_h_complete=yes
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
+$as_echo "$gl_cv_header_errno_h_complete" >&6; }
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_errno_h='<'errno.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
+$as_echo_n "checking absolute name of <errno.h>... " >&6; }
+if test "${gl_cv_next_errno_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_errno_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <errno.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/errno.h#{
+ s#.*"\(.*/errno.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_errno_h='<'errno.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
+$as_echo "$gl_cv_next_errno_h" >&6; }
+ fi
+ NEXT_ERRNO_H=$gl_cv_next_errno_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'errno.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_errno_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
+
+
+
+ ERRNO_H='errno.h'
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
+$as_echo_n "checking for EMULTIHOP value... " >&6; }
+if test "${gl_cv_header_errno_h_EMULTIHOP+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=yes
+else
+ gl_cv_header_errno_h_EMULTIHOP=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EMULTIHOP
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EMULTIHOP=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
+$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
+ case $gl_cv_header_errno_h_EMULTIHOP in
+ yes | no)
+ EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
+ ;;
+ *)
+ EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
+$as_echo_n "checking for ENOLINK value... " >&6; }
+if test "${gl_cv_header_errno_h_ENOLINK+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=yes
+else
+ gl_cv_header_errno_h_ENOLINK=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ENOLINK
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_ENOLINK=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_ENOLINK = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
+$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
+ case $gl_cv_header_errno_h_ENOLINK in
+ yes | no)
+ ENOLINK_HIDDEN=0; ENOLINK_VALUE=
+ ;;
+ *)
+ ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
+ ;;
+ esac
+
+
+ fi
+
+
+ if test -n "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
+$as_echo_n "checking for EOVERFLOW value... " >&6; }
+if test "${gl_cv_header_errno_h_EOVERFLOW+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=yes
+else
+ gl_cv_header_errno_h_EOVERFLOW=no
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef EOVERFLOW
+yes
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "yes" >/dev/null 2>&1; then :
+ gl_cv_header_errno_h_EOVERFLOW=hidden
+fi
+rm -f conftest*
+
+ if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
+ if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+"; then :
+
+fi
+
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
+$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
+ case $gl_cv_header_errno_h_EOVERFLOW in
+ yes | no)
+ EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
+ ;;
+ *)
+ EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
+ ;;
+ esac
+
+
+ fi
+
+
+ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror_r" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR_R $ac_have_decl
+_ACEOF
+
+for ac_func in strerror_r
+do :
+ ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
+if test "x$ac_cv_func_strerror_r" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRERROR_R 1
+_ACEOF
+
+fi
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
+$as_echo_n "checking whether strerror_r returns char *... " >&6; }
+if test "${ac_cv_func_strerror_r_char_p+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ ac_cv_func_strerror_r_char_p=no
+ if test $ac_cv_have_decl_strerror_r = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ char *p = strerror_r (0, buf, sizeof buf);
+ return !p || x;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ else
+ # strerror_r is not declared. Choose between
+ # systems that have relatively inaccessible declarations for the
+ # function. BeOS and DEC UNIX 4.0 fall in this category, but the
+ # former has a strerror_r that returns char*, while the latter
+ # has a strerror_r that returns `int'.
+ # This test should segfault on the DEC system.
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ extern char *strerror_r ();
+int
+main ()
+{
+char buf[100];
+ char x = *strerror_r (0, buf, sizeof buf);
+ return ! isalpha (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strerror_r_char_p=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
+$as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
+if test $ac_cv_func_strerror_r_char_p = yes; then
+
+$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
+
+fi
+
+
+ XGETTEXT_EXTRA_OPTIONS=
+
+ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
+if test "x$ac_cv_type_mode_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define mode_t int
+_ACEOF
+
+fi
+
+
+ ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h>
+"
+if test "x$ac_cv_type_sig_atomic_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIG_ATOMIC_T 1
+_ACEOF
+
+
+else
+
+$as_echo "#define sig_atomic_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+ GNULIB_FCNTL=0;
+ GNULIB_OPEN=0;
+ GNULIB_OPENAT=0;
+ HAVE_FCNTL=1;
+ HAVE_OPENAT=1;
+ REPLACE_FCNTL=0;
+ REPLACE_OPEN=0;
+ REPLACE_OPENAT=0;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
+$as_echo_n "checking for working fcntl.h... " >&6; }
+if test "${gl_cv_header_working_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_fcntl_h=cross-compiling
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+
+int
+main ()
+{
+
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_fcntl_h=yes
+else
+ case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
+$as_echo "$gl_cv_header_working_fcntl_h" >&6; }
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOATIME $ac_val
+_ACEOF
+
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_WORKING_O_NOFOLLOW $ac_val
+_ACEOF
+
+
+
+
+
+ GNULIB_DPRINTF=0;
+ GNULIB_FCLOSE=0;
+ GNULIB_FFLUSH=0;
+ GNULIB_FOPEN=0;
+ GNULIB_FPRINTF=0;
+ GNULIB_FPRINTF_POSIX=0;
+ GNULIB_FPURGE=0;
+ GNULIB_FPUTC=0;
+ GNULIB_FPUTS=0;
+ GNULIB_FREOPEN=0;
+ GNULIB_FSEEK=0;
+ GNULIB_FSEEKO=0;
+ GNULIB_FTELL=0;
+ GNULIB_FTELLO=0;
+ GNULIB_FWRITE=0;
+ GNULIB_GETDELIM=0;
+ GNULIB_GETLINE=0;
+ GNULIB_OBSTACK_PRINTF=0;
+ GNULIB_OBSTACK_PRINTF_POSIX=0;
+ GNULIB_PERROR=0;
+ GNULIB_POPEN=0;
+ GNULIB_PRINTF=0;
+ GNULIB_PRINTF_POSIX=0;
+ GNULIB_PUTC=0;
+ GNULIB_PUTCHAR=0;
+ GNULIB_PUTS=0;
+ GNULIB_REMOVE=0;
+ GNULIB_RENAME=0;
+ GNULIB_RENAMEAT=0;
+ GNULIB_SNPRINTF=0;
+ GNULIB_SPRINTF_POSIX=0;
+ GNULIB_STDIO_H_SIGPIPE=0;
+ GNULIB_VASPRINTF=0;
+ GNULIB_VDPRINTF=0;
+ GNULIB_VFPRINTF=0;
+ GNULIB_VFPRINTF_POSIX=0;
+ GNULIB_VPRINTF=0;
+ GNULIB_VPRINTF_POSIX=0;
+ GNULIB_VSNPRINTF=0;
+ GNULIB_VSPRINTF_POSIX=0;
+ HAVE_DECL_FPURGE=1;
+ HAVE_DECL_GETDELIM=1;
+ HAVE_DECL_GETLINE=1;
+ HAVE_DECL_OBSTACK_PRINTF=1;
+ HAVE_DECL_SNPRINTF=1;
+ HAVE_DECL_VSNPRINTF=1;
+ HAVE_DPRINTF=1;
+ HAVE_RENAMEAT=1;
+ HAVE_VASPRINTF=1;
+ HAVE_VDPRINTF=1;
+ REPLACE_DPRINTF=0;
+ REPLACE_FCLOSE=0;
+ REPLACE_FFLUSH=0;
+ REPLACE_FOPEN=0;
+ REPLACE_FPRINTF=0;
+ REPLACE_FPURGE=0;
+ REPLACE_FREOPEN=0;
+ REPLACE_FSEEK=0;
+ REPLACE_FSEEKO=0;
+ REPLACE_FTELL=0;
+ REPLACE_FTELLO=0;
+ REPLACE_GETDELIM=0;
+ REPLACE_GETLINE=0;
+ REPLACE_OBSTACK_PRINTF=0;
+ REPLACE_PERROR=0;
+ REPLACE_POPEN=0;
+ REPLACE_PRINTF=0;
+ REPLACE_REMOVE=0;
+ REPLACE_RENAME=0;
+ REPLACE_RENAMEAT=0;
+ REPLACE_SNPRINTF=0;
+ REPLACE_SPRINTF=0;
+ REPLACE_STDIO_WRITE_FUNCS=0;
+ REPLACE_VASPRINTF=0;
+ REPLACE_VDPRINTF=0;
+ REPLACE_VFPRINTF=0;
+ REPLACE_VPRINTF=0;
+ REPLACE_VSNPRINTF=0;
+ REPLACE_VSPRINTF=0;
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ GNULIB_ACOSL=0;
+ GNULIB_ASINL=0;
+ GNULIB_ATANL=0;
+ GNULIB_CEILF=0;
+ GNULIB_CEILL=0;
+ GNULIB_COSL=0;
+ GNULIB_EXPL=0;
+ GNULIB_FLOORF=0;
+ GNULIB_FLOORL=0;
+ GNULIB_FREXP=0;
+ GNULIB_FREXPL=0;
+ GNULIB_ISFINITE=0;
+ GNULIB_ISINF=0;
+ GNULIB_ISNAN=0;
+ GNULIB_ISNANF=0;
+ GNULIB_ISNAND=0;
+ GNULIB_ISNANL=0;
+ GNULIB_LDEXPL=0;
+ GNULIB_LOGL=0;
+ GNULIB_ROUND=0;
+ GNULIB_ROUNDF=0;
+ GNULIB_ROUNDL=0;
+ GNULIB_SIGNBIT=0;
+ GNULIB_SINL=0;
+ GNULIB_SQRTL=0;
+ GNULIB_TANL=0;
+ GNULIB_TRUNC=0;
+ GNULIB_TRUNCF=0;
+ GNULIB_TRUNCL=0;
+ HAVE_ACOSL=1;
+ HAVE_ASINL=1;
+ HAVE_ATANL=1;
+ HAVE_COSL=1;
+ HAVE_EXPL=1;
+ HAVE_ISNANF=1;
+ HAVE_ISNAND=1;
+ HAVE_ISNANL=1;
+ HAVE_LOGL=1;
+ HAVE_SINL=1;
+ HAVE_SQRTL=1;
+ HAVE_TANL=1;
+ HAVE_DECL_ACOSL=1;
+ HAVE_DECL_ASINL=1;
+ HAVE_DECL_ATANL=1;
+ HAVE_DECL_COSL=1;
+ HAVE_DECL_EXPL=1;
+ HAVE_DECL_FREXPL=1;
+ HAVE_DECL_LDEXPL=1;
+ HAVE_DECL_LOGL=1;
+ HAVE_DECL_SINL=1;
+ HAVE_DECL_SQRTL=1;
+ HAVE_DECL_TANL=1;
+ HAVE_DECL_TRUNC=1;
+ HAVE_DECL_TRUNCF=1;
+ REPLACE_CEILF=0;
+ REPLACE_CEILL=0;
+ REPLACE_FLOORF=0;
+ REPLACE_FLOORL=0;
+ REPLACE_FREXP=0;
+ REPLACE_FREXPL=0;
+ REPLACE_HUGE_VAL=0;
+ REPLACE_ISFINITE=0;
+ REPLACE_ISINF=0;
+ REPLACE_ISNAN=0;
+ REPLACE_LDEXPL=0;
+ REPLACE_NAN=0;
+ REPLACE_ROUND=0;
+ REPLACE_ROUNDF=0;
+ REPLACE_ROUNDL=0;
+ REPLACE_SIGNBIT=0;
+ REPLACE_SIGNBIT_USING_GCC=0;
+ REPLACE_TRUNCL=0;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
+$as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
+if test "${gl_cv_var_stdin_large_offset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_var_stdin_large_offset=yes
+else
+ gl_cv_var_stdin_large_offset=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
+$as_echo "$gl_cv_var_stdin_large_offset" >&6; }
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
+$as_echo_n "checking for C/C++ restrict keyword... " >&6; }
+if test "${ac_cv_c_restrict+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }
+int
+main ()
+{
+int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_restrict=$ac_kw
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_restrict" != no && break
+ done
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
+$as_echo "$ac_cv_c_restrict" >&6; }
+
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) $as_echo "#define restrict /**/" >>confdefs.h
+ ;;
+ *) cat >>confdefs.h <<_ACEOF
+#define restrict $ac_cv_c_restrict
+_ACEOF
+ ;;
+ esac
+
+
+ GNULIB_GETTIMEOFDAY=0;
+ HAVE_GETTIMEOFDAY=1;
+ HAVE_STRUCT_TIMEVAL=1;
+ HAVE_SYS_TIME_H=1;
+ REPLACE_GETTIMEOFDAY=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
+$as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
+if test "${gl_cv_next_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/time.h#{
+ s#.*"\(.*/sys/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_time_h='<'sys/time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
+$as_echo "$gl_cv_next_sys_time_h" >&6; }
+ fi
+ NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_sys_time_h != yes; then
+ HAVE_SYS_TIME_H=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
+$as_echo_n "checking for struct timeval... " >&6; }
+if test "${gl_cv_sys_struct_timeval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+
+int
+main ()
+{
+static struct timeval x; x.tv_sec = x.tv_usec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timeval=yes
+else
+ gl_cv_sys_struct_timeval=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
+$as_echo "$gl_cv_sys_struct_timeval" >&6; }
+ if test $gl_cv_sys_struct_timeval != yes; then
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+
+ for gl_func in gettimeofday; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+ REPLACE_ICONV=0;
+ REPLACE_ICONV_OPEN=0;
+ REPLACE_ICONV_UTF=0;
+ ICONV_H='';
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
+$as_echo_n "checking for long long int... " >&6; }
+if test "${ac_cv_type_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ ac_cv_type_long_long_int=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+ #ifndef LLONG_MAX
+ # define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ # define LLONG_MAX (HALF - 1 + HALF)
+ #endif
+int
+main ()
+{
+long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_type_long_long_int=yes
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ ac_cv_type_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
+$as_echo "$ac_cv_type_long_long_int" >&6; }
+ if test $ac_cv_type_long_long_int = yes; then
+
+$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
+$as_echo_n "checking for unsigned long long int... " >&6; }
+if test "${ac_cv_type_unsigned_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;
+int
+main ()
+{
+unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_type_unsigned_long_long_int=yes
+else
+ ac_cv_type_unsigned_long_long_int=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
+$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+
+$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+ gl_cv_c_multiarch=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $gl_cv_c_multiarch = yes; then
+
+$as_echo "#define AA_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+ for ac_header in inttypes.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
+if test "x$ac_cv_header_inttypes_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
+$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
+if test "${gt_cv_inttypes_pri_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_inttypes_pri_broken=no
+else
+ gt_cv_inttypes_pri_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
+$as_echo "$gt_cv_inttypes_pri_broken" >&6; }
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define PRI_MACROS_BROKEN 1
+_ACEOF
+
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "imaxabs" "ac_cv_have_decl_imaxabs" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxabs" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IMAXABS $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "imaxdiv" "ac_cv_have_decl_imaxdiv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_imaxdiv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_IMAXDIV $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoimax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOIMAX $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strtoumax" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRTOUMAX $ac_have_decl
+_ACEOF
+
+
+ GNULIB_IMAXABS=0;
+ GNULIB_IMAXDIV=0;
+ GNULIB_STRTOIMAX=0;
+ GNULIB_STRTOUMAX=0;
+ HAVE_DECL_IMAXABS=1;
+ HAVE_DECL_IMAXDIV=1;
+ HAVE_DECL_STRTOIMAX=1;
+ HAVE_DECL_STRTOUMAX=1;
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
+$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
+$as_echo "$ac_cv_c_bigendian" >&6; }
+ case $ac_cv_c_bigendian in #(
+ yes)
+ $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
+;; #(
+ no)
+ ;; #(
+ universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ as_fn_error $? "unknown endianness
+ presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
+ esac
+
+
+
+ GNULIB_NL_LANGINFO=0;
+ HAVE_NL_LANGINFO=1;
+ REPLACE_NL_LANGINFO=0;
+
+
+
+ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2.1 or newer" >&5
+$as_echo_n "checking whether we are using the GNU C Library 2.1 or newer... " >&6; }
+if test "${ac_cv_gnu_library_2_1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
+ ac_cv_gnu_library_2_1=yes
+else
+ ac_cv_gnu_library_2_1=no
+fi
+rm -f conftest*
+
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
+$as_echo "$ac_cv_gnu_library_2_1" >&6; }
+
+ GLIBC21="$ac_cv_gnu_library_2_1"
+
+
+
+ GNULIB_FCHMODAT=0;
+ GNULIB_FSTATAT=0;
+ GNULIB_FUTIMENS=0;
+ GNULIB_LCHMOD=0;
+ GNULIB_LSTAT=0;
+ GNULIB_MKDIRAT=0;
+ GNULIB_MKFIFO=0;
+ GNULIB_MKFIFOAT=0;
+ GNULIB_MKNOD=0;
+ GNULIB_MKNODAT=0;
+ GNULIB_STAT=0;
+ GNULIB_UTIMENSAT=0;
+ HAVE_FCHMODAT=1;
+ HAVE_FSTATAT=1;
+ HAVE_FUTIMENS=1;
+ HAVE_LCHMOD=1;
+ HAVE_LSTAT=1;
+ HAVE_MKDIRAT=1;
+ HAVE_MKFIFO=1;
+ HAVE_MKFIFOAT=1;
+ HAVE_MKNOD=1;
+ HAVE_MKNODAT=1;
+ HAVE_UTIMENSAT=1;
+ REPLACE_FSTAT=0;
+ REPLACE_FSTATAT=0;
+ REPLACE_FUTIMENS=0;
+ REPLACE_LSTAT=0;
+ REPLACE_MKDIR=0;
+ REPLACE_MKFIFO=0;
+ REPLACE_MKNOD=0;
+ REPLACE_STAT=0;
+ REPLACE_UTIMENSAT=0;
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
+$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
+if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -f conftest.sym conftest.file
+echo >conftest.file
+if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+struct stat sbuf;
+ /* Linux will dereference the symlink and fail, as required by POSIX.
+ That is better in the sense that it means we will not
+ have to compile and use the lstat wrapper. */
+ return lstat ("conftest.sym/", &sbuf) == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_lstat_dereferences_slashed_symlink=yes
+else
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+else
+ # If the `ln -s' command failed, then we probably don't even
+ # have an lstat function.
+ ac_cv_func_lstat_dereferences_slashed_symlink=no
+fi
+rm -f conftest.sym conftest.file
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5
+$as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; }
+
+test $ac_cv_func_lstat_dereferences_slashed_symlink = yes &&
+
+cat >>confdefs.h <<_ACEOF
+#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
+_ACEOF
+
+
+if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lstat.$ac_objext"
+
+fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
+$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
+if test "${gl_cv_func_malloc_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_malloc_posix=yes
+else
+ gl_cv_func_malloc_posix=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
+$as_echo "$gl_cv_func_malloc_posix" >&6; }
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+ gl_cv_func_malloc_0_nonnull=1
+else
+ gl_cv_func_malloc_0_nonnull=0
+fi
+
+
+cat >>confdefs.h <<_ACEOF
+#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
+_ACEOF
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
+$as_echo_n "checking for mbstate_t... " >&6; }
+if test "${ac_cv_type_mbstate_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+# include <wchar.h>
+int
+main ()
+{
+mbstate_t x; return sizeof x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_mbstate_t=yes
+else
+ ac_cv_type_mbstate_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
+$as_echo "$ac_cv_type_mbstate_t" >&6; }
+ if test $ac_cv_type_mbstate_t = yes; then
+
+$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
+
+ else
+
+$as_echo "#define mbstate_t int" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5
+$as_echo_n "checking whether mbrtowc and mbstate_t are properly declared... " >&6; }
+if test "${ac_cv_func_mbrtowc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+int
+main ()
+{
+wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_mbrtowc=yes
+else
+ ac_cv_func_mbrtowc=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5
+$as_echo "$ac_cv_func_mbrtowc" >&6; }
+ if test $ac_cv_func_mbrtowc = yes; then
+
+$as_echo "#define HAVE_MBRTOWC 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+ GNULIB_MEMCHR=0;
+ GNULIB_MEMMEM=0;
+ GNULIB_MEMPCPY=0;
+ GNULIB_MEMRCHR=0;
+ GNULIB_RAWMEMCHR=0;
+ GNULIB_STPCPY=0;
+ GNULIB_STPNCPY=0;
+ GNULIB_STRCHRNUL=0;
+ GNULIB_STRDUP=0;
+ GNULIB_STRNDUP=0;
+ GNULIB_STRNLEN=0;
+ GNULIB_STRPBRK=0;
+ GNULIB_STRSEP=0;
+ GNULIB_STRSTR=0;
+ GNULIB_STRCASESTR=0;
+ GNULIB_STRTOK_R=0;
+ GNULIB_MBSLEN=0;
+ GNULIB_MBSNLEN=0;
+ GNULIB_MBSCHR=0;
+ GNULIB_MBSRCHR=0;
+ GNULIB_MBSSTR=0;
+ GNULIB_MBSCASECMP=0;
+ GNULIB_MBSNCASECMP=0;
+ GNULIB_MBSPCASECMP=0;
+ GNULIB_MBSCASESTR=0;
+ GNULIB_MBSCSPN=0;
+ GNULIB_MBSPBRK=0;
+ GNULIB_MBSSPN=0;
+ GNULIB_MBSSEP=0;
+ GNULIB_MBSTOK_R=0;
+ GNULIB_STRERROR=0;
+ GNULIB_STRSIGNAL=0;
+ GNULIB_STRVERSCMP=0;
+ HAVE_MBSLEN=0;
+ HAVE_DECL_MEMMEM=1;
+ HAVE_MEMPCPY=1;
+ HAVE_DECL_MEMRCHR=1;
+ HAVE_RAWMEMCHR=1;
+ HAVE_STPCPY=1;
+ HAVE_STPNCPY=1;
+ HAVE_STRCHRNUL=1;
+ HAVE_DECL_STRDUP=1;
+ HAVE_DECL_STRNDUP=1;
+ HAVE_DECL_STRNLEN=1;
+ HAVE_STRPBRK=1;
+ HAVE_STRSEP=1;
+ HAVE_STRCASESTR=1;
+ HAVE_DECL_STRTOK_R=1;
+ HAVE_DECL_STRERROR=1;
+ HAVE_DECL_STRSIGNAL=1;
+ HAVE_STRVERSCMP=1;
+ REPLACE_MEMCHR=0;
+ REPLACE_MEMMEM=0;
+ REPLACE_STRDUP=0;
+ REPLACE_STRSTR=0;
+ REPLACE_STRCASESTR=0;
+ REPLACE_STRERROR=0;
+ REPLACE_STRNDUP=0;
+ REPLACE_STRSIGNAL=0;
+ REPLACE_STRTOK_R=0;
+ UNDEFINE_STRTOK_R=0;
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memchr
+do :
+ ac_fn_c_check_func "$LINENO" "memchr" "ac_cv_func_memchr"
+if test "x$ac_cv_func_memchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_memchr = no; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+ fi
+
+ if test $ac_cv_func_memchr = yes; then
+ # Detect platform-specific bugs in some versions of glibc:
+ # memchr should not dereference anything with length 0
+ # http://bugzilla.redhat.com/499689
+ # memchr should not dereference overestimated length after a match
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # Assume that memchr works on platforms that lack mprotect.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
+$as_echo_n "checking whether memchr works... " >&6; }
+if test "${gl_cv_func_memchr_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_memchr_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+
+int
+main ()
+{
+
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
+#endif
+ if (fence)
+ {
+ if (memchr (fence, 0, 0))
+ return 1;
+ strcpy (fence - 9, "12345678");
+ if (memchr (fence - 9, 0, 79) != fence - 1)
+ return 2;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memchr_works=yes
+else
+ gl_cv_func_memchr_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
+$as_echo "$gl_cv_func_memchr_works" >&6; }
+ if test "$gl_cv_func_memchr_works" != yes; then
+
+ for ac_header in bp-sym.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
+if test "x$ac_cv_header_bp_sym_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_BP_SYM_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ REPLACE_MEMCHR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memchr.$ac_objext"
+
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
+if test "x$ac_cv_have_decl_memmem" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_MEMMEM $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
+$as_echo_n "checking for stdint.h... " >&6; }
+if test "${gl_cv_header_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <stdint.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_stdint_h=yes
+else
+ gl_cv_header_stdint_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
+$as_echo "$gl_cv_header_stdint_h" >&6; }
+ if test $gl_cv_header_stdint_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
+$as_echo_n "checking for inttypes.h... " >&6; }
+if test "${gl_cv_header_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <inttypes.h>
+int
+main ()
+{
+uintmax_t i = (uintmax_t) -1; return !i;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_inttypes_h=yes
+else
+ gl_cv_header_inttypes_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
+$as_echo "$gl_cv_header_inttypes_h" >&6; }
+ if test $gl_cv_header_inttypes_h = yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_INTTYPES_H_WITH_UINTMAX 1
+_ACEOF
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5
+$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; }
+if test "${gl_cv_func_printf_sizes_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_sizes_c99=yes
+else
+ gl_cv_func_printf_sizes_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5
+$as_echo "$gl_cv_func_printf_sizes_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_long_double=yes
+else
+ gl_cv_func_printf_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5
+$as_echo "$gl_cv_func_printf_long_double" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite=yes
+else
+ gl_cv_func_printf_infinite=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5
+$as_echo "$gl_cv_func_printf_infinite" >&6; }
+
+
+
+
+
+ if test -n "$gl_printf_safe"; then
+
+$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h
+
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5
+$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; }
+if test "${gl_cv_func_printf_infinite_long_double+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_infinite_long_double=yes
+else
+ gl_cv_func_printf_infinite_long_double=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5
+$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; }
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5
+$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; }
+if test "${gl_cv_func_printf_directive_a+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "BZ2908" >/dev/null 2>&1; then :
+ gl_cv_func_printf_directive_a="guessing yes"
+else
+ gl_cv_func_printf_directive_a="guessing no"
+fi
+rm -f conftest*
+
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_a=yes
+else
+ gl_cv_func_printf_directive_a=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5
+$as_echo "$gl_cv_func_printf_directive_a" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5
+$as_echo_n "checking whether printf supports the 'F' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_f+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_f=yes
+else
+ gl_cv_func_printf_directive_f=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5
+$as_echo "$gl_cv_func_printf_directive_f" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5
+$as_echo_n "checking whether printf supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_n=yes
+else
+ gl_cv_func_printf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5
+$as_echo "$gl_cv_func_printf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5
+$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; }
+if test "${gl_cv_func_printf_directive_ls+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ return 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ return 1;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_directive_ls=yes
+else
+ gl_cv_func_printf_directive_ls=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5
+$as_echo "$gl_cv_func_printf_directive_ls" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
+$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
+if test "${gl_cv_func_printf_positions+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_positions=yes
+else
+ gl_cv_func_printf_positions=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
+$as_echo "$gl_cv_func_printf_positions" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5
+$as_echo_n "checking whether printf supports the grouping flag... " >&6; }
+if test "${gl_cv_func_printf_flag_grouping+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_grouping=yes
+else
+ gl_cv_func_printf_flag_grouping=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5
+$as_echo "$gl_cv_func_printf_flag_grouping" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5
+$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_leftadjust+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_leftadjust=yes
+else
+ gl_cv_func_printf_flag_leftadjust=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5
+$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5
+$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; }
+if test "${gl_cv_func_printf_flag_zero+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_flag_zero=yes
+else
+ gl_cv_func_printf_flag_zero=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5
+$as_echo "$gl_cv_func_printf_flag_zero" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5
+$as_echo_n "checking whether printf supports large precisions... " >&6; }
+if test "${gl_cv_func_printf_precision+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_printf_precision=yes
+else
+ gl_cv_func_printf_precision=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5
+$as_echo "$gl_cv_func_printf_precision" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5
+$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; }
+if test "${gl_cv_func_printf_enomem+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_func_printf_enomem="guessing no"
+ if test "$cross_compiling" = no; then
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data1024;
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ fi
+ if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5
+$as_echo "$gl_cv_func_printf_enomem" >&6; }
+
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
+$as_echo_n "checking for intmax_t... " >&6; }
+if test "${gt_cv_c_intmax_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+
+int
+main ()
+{
+intmax_t x = -1; return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_intmax_t=yes
+else
+ gt_cv_c_intmax_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
+$as_echo "$gt_cv_c_intmax_t" >&6; }
+ if test $gt_cv_c_intmax_t = yes; then
+
+$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
+
+ else
+
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+
+cat >>confdefs.h <<_ACEOF
+#define intmax_t $ac_type
+_ACEOF
+
+ fi
+
+
+
+
+
+
+ for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl__snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL__SNPRINTF $ac_have_decl
+_ACEOF
+
+
+ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_obstack_printf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl
+_ACEOF
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
+$as_echo_n "checking for promoted mode_t type... " >&6; }
+if test "${gl_cv_promoted_mode_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_promoted_mode_t='int'
+else
+ gl_cv_promoted_mode_t='mode_t'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
+$as_echo "$gl_cv_promoted_mode_t" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PROMOTED_MODE_T $gl_cv_promoted_mode_t
+_ACEOF
+
+
+
+
+
+
+
+ GNULIB_POSIX_SPAWN=0;
+ GNULIB_POSIX_SPAWNP=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0;
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0;
+ GNULIB_POSIX_SPAWNATTR_INIT=0;
+ GNULIB_POSIX_SPAWNATTR_GETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=0;
+ GNULIB_POSIX_SPAWNATTR_GETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_SETPGROUP=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0;
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0;
+ GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0;
+ GNULIB_POSIX_SPAWNATTR_DESTROY=0;
+ HAVE_POSIX_SPAWN=1;
+ HAVE_POSIX_SPAWNATTR_T=1;
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+
+ REPLACE_POSIX_SPAWN=0;
+
+
+
+
+
+
+ if test $ac_cv_func_posix_spawn = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5
+$as_echo_n "checking whether posix_spawn works... " >&6; }
+if test "${gl_cv_func_posix_spawn_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ setvbuf (stdout, NULL, _IOFBF, 0);
+ puts ("This should be seen only once.");
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ if (err == ENOENT)
+ return 0;
+ else
+ {
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ close (ofd[1]);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 127)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext > conftest.out \
+ && echo 'This should be seen only once.' > conftest.ok \
+ && cmp conftest.out conftest.ok > /dev/null; then
+ gl_cv_func_posix_spawn_works=yes
+ else
+ gl_cv_func_posix_spawn_works=no
+ fi
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test $gl_cv_func_posix_spawn_works = yes; then
+ if test "$cross_compiling" = yes; then :
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "cannot run test program while cross compiling
+See \`config.log' for more details" "$LINENO" 5 ; }
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Test whether posix_spawn_file_actions_addopen supports filename arguments
+ that contain special characters such as '*'. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "conftest"
+#define DATA_FILENAME "conftest%=*#?"
+
+static int
+parent_main (void)
+{
+ FILE *fp;
+ char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ /* Create a data file with specific contents. */
+ fp = fopen (DATA_FILENAME, "wb");
+ if (fp == NULL)
+ {
+ perror ("cannot create data file");
+ return 1;
+ }
+ fwrite ("Halle Potta", 1, 11, fp);
+ if (fflush (fp) || fclose (fp))
+ {
+ perror ("cannot prepare data file");
+ return 1;
+ }
+
+ /* Avoid reading from our stdin, as it could block. */
+ freopen ("/dev/null", "rb", stdin);
+
+ /* Test whether posix_spawn_file_actions_addopen with this file name
+ actually works, but spawning a child that reads from this file. */
+ actions_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
+ || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ errno = err;
+ perror ("subprocess failed");
+ return 1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ return 1;
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ return 1;
+ }
+ return 0;
+}
+
+static int
+child_main (void)
+{
+ char buf[1024];
+
+ /* See if reading from STDIN_FILENO yields the expected contents. */
+ if (fread (buf, 1, sizeof (buf), stdin) == 11
+ && memcmp (buf, "Halle Potta", 11) == 0)
+ return 0;
+ else
+ return 2;
+}
+
+static void
+cleanup_then_die (int sig)
+{
+ /* Clean up data file. */
+ unlink (DATA_FILENAME);
+
+ /* Re-raise the signal and die from it. */
+ signal (sig, SIG_DFL);
+ raise (sig);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int exitstatus;
+
+ if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
+ {
+ /* This is the parent process. */
+ signal (SIGINT, cleanup_then_die);
+ signal (SIGTERM, cleanup_then_die);
+ #ifdef SIGHUP
+ signal (SIGHUP, cleanup_then_die);
+ #endif
+
+ exitstatus = parent_main ();
+ }
+ else
+ {
+ /* This is the child process. */
+
+ exitstatus = child_main ();
+ }
+ unlink (DATA_FILENAME);
+ return exitstatus;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+
+else
+ gl_cv_func_posix_spawn_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+ else
+ case "$host_os" in
+ aix*) gl_cv_func_posix_spawn_works="guessing no";;
+ *) gl_cv_func_posix_spawn_works="guessing yes";;
+ esac
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5
+$as_echo "$gl_cv_func_posix_spawn_works" >&6; }
+
+ case "$gl_cv_func_posix_spawn_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN=1 ;;
+ esac
+ else
+ HAVE_POSIX_SPAWN=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
+$as_echo_n "checking whether setenv validates arguments... " >&6; }
+if test "${gl_cv_func_setenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_setenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+ #include <errno.h>
+
+int
+main ()
+{
+
+ if (setenv ("", "", 0) != -1) return 1;
+ if (errno != EINVAL) return 2;
+ if (setenv ("a", "=", 1) != 0) return 3;
+ if (strcmp (getenv ("a"), "=") != 0) return 4;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_setenv_works=yes
+else
+ gl_cv_func_setenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
+$as_echo "$gl_cv_func_setenv_works" >&6; }
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+ for ac_header in search.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
+if test "x$ac_cv_header_search_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SEARCH_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in tsearch
+do :
+ ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
+if test "x$ac_cv_func_tsearch" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_TSEARCH 1
+_ACEOF
+
+fi
+done
+
+
+
+
+ GNULIB_SIGNAL_H_SIGPIPE=0;
+ GNULIB_SIGPROCMASK=0;
+ GNULIB_SIGACTION=0;
+ HAVE_POSIX_SIGNALBLOCKING=1;
+ HAVE_SIGSET_T=1;
+ HAVE_SIGINFO_T=1;
+ HAVE_SIGACTION=1;
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
+$as_echo_n "checking for uid_t in sys/types.h... " >&6; }
+if test "${ac_cv_type_uid_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "uid_t" >/dev/null 2>&1; then :
+ ac_cv_type_uid_t=yes
+else
+ ac_cv_type_uid_t=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
+$as_echo "$ac_cv_type_uid_t" >&6; }
+if test $ac_cv_type_uid_t = no; then
+
+$as_echo "#define uid_t int" >>confdefs.h
+
+
+$as_echo "#define gid_t int" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
+if test "x$ac_cv_have_decl_snprintf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SNPRINTF $ac_have_decl
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
+$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
+if test "${ac_cv_header_stdbool_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+
+int
+main ()
+{
+
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stdbool_h=yes
+else
+ ac_cv_header_stdbool_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
+$as_echo "$ac_cv_header_stdbool_h" >&6; }
+ ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
+if test "x$ac_cv_type__Bool" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE__BOOL 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_header_stdbool_h = yes; then
+
+$as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
+
+ fi
+
+ REPLACE_NULL=0;
+ HAVE_WCHAR_T=1;
+ STDDEF_H='';
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -z "$ERRNO_H"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
+$as_echo_n "checking for working strerror function... " >&6; }
+if test "${gl_cv_func_working_strerror+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+return !*strerror (-2);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_strerror=yes
+else
+ gl_cv_func_working_strerror=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
+$as_echo "$gl_cv_func_working_strerror" >&6; }
+ if test $gl_cv_func_working_strerror = no; then
+ REPLACE_STRERROR=1
+ fi
+ else
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+
+ ac_fn_c_check_decl "$LINENO" "strerror" "ac_cv_have_decl_strerror" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strerror" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRERROR $ac_have_decl
+_ACEOF
+
+
+ if test $ac_cv_header_sys_socket_h != yes; then
+ for ac_header in winsock2.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
+if test "x$ac_cv_header_winsock2_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_WINSOCK2_H 1
+_ACEOF
+
+fi
+
+done
+
+ fi
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_string_h='<'string.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
+$as_echo_n "checking absolute name of <string.h>... " >&6; }
+if test "${gl_cv_next_string_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_string_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/string.h#{
+ s#.*"\(.*/string.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_string_h='<'string.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
+$as_echo "$gl_cv_next_string_h" >&6; }
+ fi
+ NEXT_STRING_H=$gl_cv_next_string_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'string.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_string_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strndup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNDUP $ac_have_decl
+_ACEOF
+
+
+
+ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strnlen" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRNLEN $ac_have_decl
+_ACEOF
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
+$as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
+if test "${ac_cv_header_stat_broken+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/stat.h>
+
+#if defined S_ISBLK && defined S_IFDIR
+extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
+#endif
+
+#if defined S_ISBLK && defined S_IFCHR
+extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
+#endif
+
+#if defined S_ISLNK && defined S_IFREG
+extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
+#endif
+
+#if defined S_ISSOCK && defined S_IFREG
+extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
+#endif
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_header_stat_broken=no
+else
+ ac_cv_header_stat_broken=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
+$as_echo "$ac_cv_header_stat_broken" >&6; }
+if test $ac_cv_header_stat_broken = yes; then
+
+$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
+
+fi
+
+
+
+
+
+
+
+
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
+ REPLACE_MKTIME=GNULIB_PORTCHECK;
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
+ REPLACE_STRPTIME=GNULIB_PORTCHECK;
+ REPLACE_TIMEGM=GNULIB_PORTCHECK;
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
+$as_echo_n "checking for struct timespec in <time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
+$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
+if test "${gl_cv_sys_struct_timespec_in_sys_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+
+int
+main ()
+{
+static struct timespec x; x.tv_sec = x.tv_nsec;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_sys_struct_timespec_in_sys_time_h=yes
+else
+ gl_cv_sys_struct_timespec_in_sys_time_h=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
+$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_time_h='<'time.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
+$as_echo_n "checking absolute name of <time.h>... " >&6; }
+if test "${gl_cv_next_time_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_time_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <time.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/time.h#{
+ s#.*"\(.*/time.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_time_h='<'time.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
+$as_echo "$gl_cv_next_time_h" >&6; }
+ fi
+ NEXT_TIME_H=$gl_cv_next_time_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'time.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_time_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_clearerr_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_feof_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_ferror_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fflush_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fgets_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fputs_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fread_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_fwrite_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putc_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
+if test "x$ac_cv_have_decl_putchar_unlocked" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ungetc works on arbitrary bytes" >&5
+$as_echo_n "checking whether ungetc works on arbitrary bytes... " >&6; }
+if test "${gl_cv_func_ungetc_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_ungetc_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ungetc_works=yes
+else
+ gl_cv_func_ungetc_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ungetc_works" >&5
+$as_echo "$gl_cv_func_ungetc_works" >&6; }
+ if test "$gl_cv_func_ungetc_works" != yes; then
+
+$as_echo "#define FUNC_UNGETC_BROKEN 1" >>confdefs.h
+
+ fi
+
+
+
+ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
+if test "x$ac_cv_have_decl_alarm" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ALARM $ac_have_decl
+_ACEOF
+
+ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
+if test "x$ac_cv_have_decl_strdup" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_STRDUP $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if true; then
+ GL_COND_LIBTOOL_TRUE=
+ GL_COND_LIBTOOL_FALSE='#'
+else
+ GL_COND_LIBTOOL_TRUE='#'
+ GL_COND_LIBTOOL_FALSE=
+fi
+
+ gl_cond_libtool=true
+
+
+
+
+
+
+
+
+
+ gl_source_base='gnu'
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+
+
+
+
+
+
+ if test $ac_cv_func_alloca_works = no; then
+ :
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
+$as_echo_n "checking for alloca as a compiler built-in... " >&6; }
+if test "${gl_cv_rpl_alloca+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Need own alloca" >/dev/null 2>&1; then :
+ gl_cv_rpl_alloca=yes
+else
+ gl_cv_rpl_alloca=no
+fi
+rm -f conftest*
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
+$as_echo "$gl_cv_rpl_alloca" >&6; }
+ if test $gl_cv_rpl_alloca = yes; then
+
+$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
+
+ ALLOCA_H=alloca.h
+ else
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5
+$as_echo_n "checking whether to enable assertions... " >&6; }
+ # Check whether --enable-assert was given.
+if test "${enable_assert+set}" = set; then :
+ enableval=$enable_assert; if test "x$enableval" = xno; then :
+
+$as_echo "#define NDEBUG 1" >>confdefs.h
+
+elif test "x$enableval" != xyes; then :
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5
+$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;}
+ enable_assert=yes
+fi
+else
+ enable_assert=yes
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5
+$as_echo "$enable_assert" >&6; }
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
+$as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
+if test "${gl_cv_func_btowc_eof+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_btowc_eof=yes
+else
+ gl_cv_func_btowc_eof=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
+$as_echo "$gl_cv_func_btowc_eof" >&6; }
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS btowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_BTOWC=1
+
+
+
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS canonicalize-lgpl.$ac_objext"
+
+ REPLACE_REALPATH=1
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+
+
+
+$as_echo "#define GNULIB_CANONICALIZE_LGPL 1" >>confdefs.h
+
+
+
+
+ GNULIB_CANONICALIZE_FILE_NAME=1
+
+
+
+ GNULIB_REALPATH=1
+
+
+$as_echo "#define SIGNAL_SAFE_LIST 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS cloexec.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_CLOEXEC 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS close-stream.$ac_objext"
+
+
+ :
+
+
+
+$as_echo "#define GNULIB_CLOSE_STREAM 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closein.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS closeout.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_DIRNAME 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS basename-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dirname-lgpl.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stripslash.$ac_objext"
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
+$as_echo_n "checking whether // is distinct from /... " >&6; }
+if test "${gl_cv_double_slash_root+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
+$as_echo "$gl_cv_double_slash_root" >&6; }
+ if test "$gl_cv_double_slash_root" = yes; then
+
+$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
+$as_echo_n "checking whether dup2 works... " >&6; }
+if test "${gl_cv_func_dup2_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works=no;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works=no;;
+ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+ # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+ gl_cv_func_dup2_works=no;;
+ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ gl_cv_func_dup2_works=no;;
+ *) gl_cv_func_dup2_works=yes;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <unistd.h>
+#include <errno.h>
+int
+main ()
+{
+if (dup2 (1, 1) == 0)
+ return 1;
+ close (0);
+ if (dup2 (0, 0) != -1)
+ return 2;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (1, 1000000) == -1 && errno != EBADF)
+ return 3;
+ return 0;
+
+ ;
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_dup2_works=yes
+else
+ gl_cv_func_dup2_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
+$as_echo "$gl_cv_func_dup2_works" >&6; }
+ if test "$gl_cv_func_dup2_works" = no; then
+
+
+ if test $ac_cv_func_dup2 = yes; then
+ REPLACE_DUP2=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup2.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_DUP2=1
+
+
+
+
+ GNULIB_ENVIRON=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
+$as_echo_n "checking for error_at_line... " >&6; }
+if test "${ac_cv_lib_error_at_line+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <error.h>
+int
+main ()
+{
+error_at_line (0, 0, "", 0, "an error occurred");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_error_at_line=yes
+else
+ ac_cv_lib_error_at_line=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
+$as_echo "$ac_cv_lib_error_at_line" >&6; }
+if test $ac_cv_lib_error_at_line = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS error.$ac_objext"
+
+fi
+
+
+
+
+ :
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS exitfail.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
+$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ # Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+
+int
+main ()
+{
+return fcntl (0, F_DUPFD, -1) != -1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_works=yes
+else
+ gl_cv_func_fcntl_f_dupfd_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *)
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+
+$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
+ ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
+$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
+if test "${gl_cv_func_fcntl_f_dupfd_cloexec+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_fcntl_f_dupfd_cloexec=yes
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ gl_cv_func_fcntl_f_dupfd_cloexec=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
+$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+
+
+
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fcntl.$ac_objext"
+
+
+ fi
+ fi
+
+
+
+ GNULIB_FCNTL=1
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
+$as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
+if test "${gl_cv_next_fcntl_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_fcntl_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/fcntl.h#{
+ s#.*"\(.*/fcntl.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_fcntl_h='<'fcntl.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
+$as_echo "$gl_cv_next_fcntl_h" >&6; }
+ fi
+ NEXT_FCNTL_H=$gl_cv_next_fcntl_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'fcntl.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_fcntl_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
+
+
+
+
+
+ for gl_func in fcntl openat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <fcntl.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+$as_echo "#define GNULIB_FD_SAFER_FLAG 1" >>confdefs.h
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fflush works on input streams" >&5
+$as_echo_n "checking whether fflush works on input streams... " >&6; }
+if test "${gl_cv_func_fflush_stdin+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ echo hello world > conftest.txt
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fflush_stdin=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <unistd.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fflush_stdin=yes
+else
+ gl_cv_func_fflush_stdin=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm conftest.txt
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fflush_stdin" >&5
+$as_echo "$gl_cv_func_fflush_stdin" >&6; }
+ if test $gl_cv_func_fflush_stdin = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fflush.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FFLUSH=1
+ REPLACE_FSEEKO=1
+
+
+ :
+
+
+ fi
+
+
+
+ GNULIB_FFLUSH=1
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_FILENAMECAT 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS filenamecat-lgpl.$ac_objext"
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
+$as_echo_n "checking for flexible array member... " >&6; }
+if test "${ac_cv_c_flexmember+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };
+int
+main ()
+{
+int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_flexmember=yes
+else
+ ac_cv_c_flexmember=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
+$as_echo "$ac_cv_c_flexmember" >&6; }
+ if test $ac_cv_c_flexmember = yes; then
+
+$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
+
+ else
+ $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
+
+ fi
+
+
+
+
+ FLOAT_H=
+ case "$host_os" in
+ beos* | openbsd*)
+ FLOAT_H=float.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_float_h='<'float.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
+$as_echo_n "checking absolute name of <float.h>... " >&6; }
+if test "${gl_cv_next_float_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_float_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <float.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/float.h#{
+ s#.*"\(.*/float.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_float_h='<'float.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
+$as_echo "$gl_cv_next_float_h" >&6; }
+ fi
+ NEXT_FLOAT_H=$gl_cv_next_float_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'float.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_float_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
+
+
+
+ ;;
+ esac
+
+
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+ REPLACE_FOPEN=1
+ gl_cv_func_fopen_slash="guessing no"
+ ;;
+ *)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5
+$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_fopen_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
+ hpux*) gl_cv_func_fopen_slash="guessing no" ;;
+ *) gl_cv_func_fopen_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+ return fopen ("conftest.sl/", "w") != NULL;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fopen_slash=yes
+else
+ gl_cv_func_fopen_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5
+$as_echo "$gl_cv_func_fopen_slash" >&6; }
+ ;;
+ esac
+ case "$gl_cv_func_fopen_slash" in
+ *no)
+
+$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_FOPEN=1
+ ;;
+ esac
+ if test $REPLACE_FOPEN = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen.$ac_objext"
+
+
+
+
+ fi
+
+
+
+ GNULIB_FOPEN=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fopen-safer.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_FOPEN_SAFER 1" >>confdefs.h
+
+
+
+
+
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
+"
+if test "x$ac_cv_have_decl___fpending" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL___FPENDING $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_func___fpending = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
+$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
+if test "${ac_cv_sys_pending_output_n_bytes+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+FILE *fp = stdin; (void) ($ac_expr);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fp_done=yes
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
+$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
+_ACEOF
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpending.$ac_objext"
+
+ fi
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h>
+"
+if test "x$ac_cv_have_decl_fpurge" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_FPURGE $ac_have_decl
+_ACEOF
+
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fpurge works" >&5
+$as_echo_n "checking whether fpurge works... " >&6; }
+if test "${gl_cv_func_fpurge_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_fpurge_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+FILE *f = fopen ("conftest.txt", "w+");
+ if (!f) return 1;
+ if (fputc ('a', f) != 'a') return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != EOF) return 4;
+ if (fpurge (f) != 0) return 5;
+ if (putc ('b', f) != 'b') return 6;
+ if (fclose (f) != 0) return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+ if (fgetc (f) != 'a') return 9;
+ if (fgetc (f) != 'b') return 10;
+ if (fgetc (f) != EOF) return 11;
+ if (fclose (f) != 0) return 12;
+ if (remove ("conftest.txt") != 0) return 13;
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_fpurge_works=yes
+else
+ gl_cv_func_fpurge_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fpurge_works" >&5
+$as_echo "$gl_cv_func_fpurge_works" >&6; }
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fpurge.$ac_objext"
+
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+
+
+
+ GNULIB_FPURGE=1
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+int
+main ()
+{
+int e; return frexp (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp_no_libm=yes ;;
+ *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
+ esac
+ else
+ gl_func_frexp_no_libm=no
+ REPLACE_FREXP=1
+ fi
+ if test $gl_func_frexp_no_libm = yes; then
+
+$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexp.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXP=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+int
+main ()
+{
+int e; return frexpl (x, &e) > 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ else
+ HAVE_DECL_FREXPL=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS frexpl.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_FREXPL=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
+$as_echo_n "checking for fseeko... " >&6; }
+if test "${gl_cv_func_fseeko+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+fseeko (stdin, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_fseeko=yes
+else
+ gl_cv_func_fseeko=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
+$as_echo "$gl_cv_func_fseeko" >&6; }
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fseeko.$ac_objext"
+
+
+ REPLACE_FSEEKO=1
+
+
+ fi
+
+
+
+ GNULIB_FSEEKO=1
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ftello" >&5
+$as_echo_n "checking for ftello... " >&6; }
+if test "${gl_cv_func_ftello+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+ftello (stdin);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ftello=yes
+else
+ gl_cv_func_ftello=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ftello" >&5
+$as_echo "$gl_cv_func_ftello" >&6; }
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS ftello.$ac_objext"
+
+
+ REPLACE_FTELLO=1
+
+ fi
+
+
+
+ GNULIB_FTELLO=1
+
+
+
+
+ if test $ac_cv_func_getdtablesize != yes; then
+ HAVE_GETDTABLESIZE=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS getdtablesize.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_GETDTABLESIZE=1
+
+
+
+
+
+
+
+
+
+
+ gl_gettimeofday_timezone=void
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
+$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
+if test "${gl_cv_func_gettimeofday_clobber+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_gettimeofday_clobber=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_gettimeofday_clobber=no
+else
+ gl_cv_func_gettimeofday_clobber=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
+$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+
+$as_echo "#define gmtime rpl_gmtime" >>confdefs.h
+
+
+$as_echo "#define localtime rpl_localtime" >>confdefs.h
+
+
+
+$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
+$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
+if test "${gl_cv_func_gettimeofday_posix_signature+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+ struct timeval c;
+ int gettimeofday (struct timeval *restrict, void *restrict);
+
+int
+main ()
+{
+/* glibc uses struct timezone * rather than the POSIX void *
+ if _GNU_SOURCE is defined. However, since the only portable
+ use of gettimeofday uses NULL as the second parameter, and
+ since the glibc definition is actually more typesafe, it is
+ not worth wrapping this to get a compliant signature. */
+ int (*f) (struct timeval *restrict, void *restrict)
+ = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=yes
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_gettimeofday_posix_signature=almost
+else
+ gl_cv_func_gettimeofday_posix_signature=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
+$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
+ if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+ gl_gettimeofday_timezone='struct timezone'
+ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS gettimeofday.$ac_objext"
+
+
+ for ac_header in sys/timeb.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_timeb_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_TIMEB_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in _ftime
+do :
+ ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
+if test "x$ac_cv_func__ftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE__FTIME 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+ fi
+
+cat >>confdefs.h <<_ACEOF
+#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
+_ACEOF
+
+
+
+
+ GNULIB_GETTIMEOFDAY=1
+
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ am_cv_func_iconv_works=yes
+else
+ am_cv_func_iconv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+$as_echo "#define HAVE_ICONV 1" >>confdefs.h
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if test "${am_cv_proto_iconv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ am_cv_proto_iconv_arg1=""
+else
+ am_cv_proto_iconv_arg1="const"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result:
+ $am_cv_proto_iconv" >&5
+$as_echo "
+ $am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <iconv.h>" >&5
+$as_echo_n "checking absolute name of <iconv.h>... " >&6; }
+if test "${gl_cv_next_iconv_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_iconv_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <iconv.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_iconv_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/iconv.h#{
+ s#.*"\(.*/iconv.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_iconv_h='<'iconv.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_iconv_h" >&5
+$as_echo "$gl_cv_next_iconv_h" >&6; }
+ fi
+ NEXT_ICONV_H=$gl_cv_next_iconv_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'iconv.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_iconv_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_ICONV_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <iconv.h>
+ #if defined _LIBICONV_VERSION || defined __GLIBC__
+ gnu_iconv
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "gnu_iconv" >/dev/null 2>&1; then :
+ gl_func_iconv_gnu=yes
+else
+ gl_func_iconv_gnu=no
+fi
+rm -f conftest*
+
+ if test $gl_func_iconv_gnu = no; then
+ iconv_flavor=
+ case "$host_os" in
+ aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
+ irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
+ hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
+ osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
+ solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+ esac
+ if test -n "$iconv_flavor"; then
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_FLAVOR $iconv_flavor
+_ACEOF
+
+
+
+
+ ICONV_H='iconv.h'
+
+ REPLACE_ICONV_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS iconv_open.$ac_objext"
+
+
+ fi
+ fi
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
+$as_echo_n "checking whether the compiler generally respects inline... " >&6; }
+if test "${gl_cv_c_inline_effective+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_c_inline_effective=yes
+else
+ gl_cv_c_inline_effective=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
+$as_echo "$gl_cv_c_inline_effective" >&6; }
+ if test $gl_cv_c_inline_effective = yes; then
+
+$as_echo "#define HAVE_INLINE 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether inttypes.h conforms to C99" >&5
+$as_echo_n "checking whether inttypes.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_working_inttypes_h=yes
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_inttypes_h" >&5
+$as_echo "$gl_cv_header_working_inttypes_h" >&6; }
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
+$as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
+if test "${gl_cv_next_inttypes_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/inttypes.h#{
+ s#.*"\(.*/inttypes.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_inttypes_h='<'inttypes.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
+$as_echo "$gl_cv_next_inttypes_h" >&6; }
+ fi
+ NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'inttypes.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_inttypes_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+$as_echo "#define GL_TRIGGER_STDC_LIMIT_MACROS 1" >>confdefs.h
+
+
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ PRIPTR_PREFIX='"l"'
+ else
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ PRIPTR_PREFIX='"'$glpfx'"'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
+$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
+if test "${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT32_MAX && defined INTMAX_MAX
+ #define CONDITION (INT32_MAX < INTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (int) < sizeof (long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
+else
+ gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
+$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
+ if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
+ INT32_MAX_LT_INTMAX_MAX=1;
+ else
+ INT32_MAX_LT_INTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
+$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
+if test "${gl_cv_test_INT64_MAX_EQ_LONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined INT64_MAX
+ #define CONDITION (INT64_MAX == LONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (long long int) == sizeof (long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
+else
+ gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
+$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
+ if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
+ INT64_MAX_EQ_LONG_MAX=1;
+ else
+ INT64_MAX_EQ_LONG_MAX=0;
+ fi
+
+
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
+$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
+if test "${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT32_MAX && defined UINTMAX_MAX
+ #define CONDITION (UINT32_MAX < UINTMAX_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
+else
+ gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
+$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
+ if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
+ UINT32_MAX_LT_UINTMAX_MAX=1;
+ else
+ UINT32_MAX_LT_UINTMAX_MAX=0;
+ fi
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
+$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
+if test "${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if defined UINT64_MAX
+ #define CONDITION (UINT64_MAX == ULONG_MAX)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
+else
+ gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
+$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
+ if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
+ UINT64_MAX_EQ_ULONG_MAX=1;
+ else
+ UINT64_MAX_EQ_ULONG_MAX=0;
+ fi
+
+
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+
+ for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <inttypes.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnand_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnan ((double)(x))
+ #else
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;
+int
+main ()
+{
+return isnand (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnand_no_libm=yes
+else
+ gl_cv_func_isnand_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
+$as_echo "$gl_cv_func_isnand_no_libm" >&6; }
+
+ if test $gl_cv_func_isnand_no_libm = yes; then
+
+$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnand.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;
+int
+main ()
+{
+return isnanf (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanf_no_libm=yes
+else
+ gl_cv_func_isnanf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5
+$as_echo "$gl_cv_func_isnanf_no_libm" >&6; }
+
+ if test $gl_cv_func_isnanf_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5
+$as_echo_n "checking whether isnan(float) works... " >&6; }
+if test "${gl_cv_func_isnanf_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
+ *) gl_cv_func_isnanf_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+#endif
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaN() (0.0f / 0.0f)
+#endif
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; float value; } memory_float;
+int main()
+{
+ memory_float m;
+
+ if (isnanf (1.0f / 0.0f))
+ return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanf_works=yes
+else
+ gl_cv_func_isnanf_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5
+$as_echo "$gl_cv_func_isnanf_works" >&6; }
+
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
+
+$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanf.$ac_objext"
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
+$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_isnanl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;
+int
+main ()
+{
+return isnanl (x);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_isnanl_no_libm=yes
+else
+ gl_cv_func_isnanl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
+$as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
+
+ gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
+ if test $gl_func_isnanl_no_libm = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
+$as_echo_n "checking whether isnanl works... " >&6; }
+if test "${gl_cv_func_isnanl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+ *)
+ case "$host_os" in
+ netbsd*) gl_cv_func_isnanl_works="guessing no";;
+ *) gl_cv_func_isnanl_works="guessing yes";;
+ esac
+ ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+#elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+#endif
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
+int main ()
+{
+ memory_long_double m;
+ unsigned int i;
+
+ if (!isnanl (NaNl ()))
+ return 1;
+
+ /* The isnanl function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit (since the exponent never extends to
+ bit 31). */
+ m.value = NaNl ();
+ m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ for (i = 0; i < NWORDS; i++)
+ m.word[i] |= 1;
+ if (!isnanl (m.value))
+ return 1;
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_isnanl_works=yes
+else
+ gl_cv_func_isnanl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
+$as_echo "$gl_cv_func_isnanl_works" >&6; }
+
+ case "$gl_cv_func_isnanl_works" in
+ *yes) ;;
+ *) gl_func_isnanl_no_libm=no ;;
+ esac
+ fi
+ if test $gl_func_isnanl_no_libm = yes; then
+
+$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS isnanl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
+$as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
+if test "${gl_cv_next_langinfo_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/langinfo.h#{
+ s#.*"\(.*/langinfo.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_langinfo_h='<'langinfo.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
+$as_echo "$gl_cv_next_langinfo_h" >&6; }
+ fi
+ NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'langinfo.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_langinfo_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
+
+
+
+
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
+$as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
+if test "${gl_cv_header_langinfo_codeset+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = CODESET;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_codeset=yes
+else
+ gl_cv_header_langinfo_codeset=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
+$as_echo "$gl_cv_header_langinfo_codeset" >&6; }
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
+$as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
+if test "${gl_cv_header_langinfo_era+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+int a = ERA;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_langinfo_era=yes
+else
+ gl_cv_header_langinfo_era=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
+$as_echo "$gl_cv_header_langinfo_era" >&6; }
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+
+
+
+
+
+ for gl_func in nl_langinfo; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <langinfo.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
+$as_echo_n "checking whether lseek detects pipes... " >&6; }
+if test "${gl_cv_func_lseek_pipe+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test $cross_compiling = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int main ()
+{
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_lseek_pipe=yes
+else
+ gl_cv_func_lseek_pipe=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
+$as_echo "$gl_cv_func_lseek_pipe" >&6; }
+ if test $gl_cv_func_lseek_pipe = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS lseek.$ac_objext"
+
+
+ REPLACE_LSEEK=1
+
+$as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
+
+
+ fi
+
+
+
+ GNULIB_LSEEK=1
+
+
+
+
+ if test $ac_cv_func_lstat = yes; then
+
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+
+ else
+ HAVE_LSTAT=0
+ fi
+
+
+
+ GNULIB_LSTAT=1
+
+
+ for ac_header in stdlib.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdlib_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDLIB_H 1
+_ACEOF
+
+fi
+
+done
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
+$as_echo_n "checking for GNU libc compatible malloc... " >&6; }
+if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_malloc_0_nonnull=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined STDC_HEADERS || defined HAVE_STDLIB_H
+# include <stdlib.h>
+#else
+char *malloc ();
+#endif
+
+int
+main ()
+{
+return ! malloc (0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_malloc_0_nonnull=yes
+else
+ ac_cv_func_malloc_0_nonnull=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
+$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
+if test $ac_cv_func_malloc_0_nonnull = yes; then :
+
+$as_echo "#define HAVE_MALLOC 1" >>confdefs.h
+
+else
+ $as_echo "#define HAVE_MALLOC 0" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+
+$as_echo "#define malloc rpl_malloc" >>confdefs.h
+
+fi
+
+
+
+$as_echo "#define GNULIB_MALLOC_GNU 1" >>confdefs.h
+
+
+
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+
+$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
+
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS malloc.$ac_objext"
+
+ HAVE_MALLOC_POSIX=0
+ fi
+
+
+
+
+ GNULIB_MALLOC_POSIX=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_math_h='<'math.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
+$as_echo_n "checking absolute name of <math.h>... " >&6; }
+if test "${gl_cv_next_math_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_math_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/math.h#{
+ s#.*"\(.*/math.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_math_h='<'math.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
+$as_echo "$gl_cv_next_math_h" >&6; }
+ fi
+ NEXT_MATH_H=$gl_cv_next_math_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'math.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_math_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
+$as_echo_n "checking whether NAN macro works... " >&6; }
+if test "${gl_cv_header_math_nan_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_nan_works=yes
+else
+ gl_cv_header_math_nan_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
+$as_echo "$gl_cv_header_math_nan_works" >&6; }
+ if test $gl_cv_header_math_nan_works = no; then
+ REPLACE_NAN=1
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
+$as_echo_n "checking whether HUGE_VAL works... " >&6; }
+if test "${gl_cv_header_math_huge_val_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+int
+main ()
+{
+/* Solaris 10 has a broken definition of HUGE_VAL. */
+ double d = HUGE_VAL;
+ return d == 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_header_math_huge_val_works=yes
+else
+ gl_cv_header_math_huge_val_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
+$as_echo "$gl_cv_header_math_huge_val_works" >&6; }
+ if test $gl_cv_header_math_huge_val_works = no; then
+ REPLACE_HUGE_VAL=1
+ fi
+
+
+ for gl_func in acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
+$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
+if test "${gl_cv_func_mbrtowc_null_arg+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_null_arg=yes
+else
+ gl_cv_func_mbrtowc_null_arg=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg" >&5
+$as_echo "$gl_cv_func_mbrtowc_null_arg" >&6; }
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
+$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
+if test "${gl_cv_func_mbrtowc_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_retval=yes
+else
+ gl_cv_func_mbrtowc_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
+$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
+if test "${gl_cv_func_mbrtowc_nul_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_nul_retval=yes
+else
+ gl_cv_func_mbrtowc_nul_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
+$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
+
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *)
+$as_echo "#define MBRTOWC_NULL_ARG_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *)
+$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *)
+$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
+
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbrtowc.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBRTOWC=1
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mbsinit.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_MBSINIT=1
+
+
+
+
+ if test $ac_cv_func_mbslen = yes; then
+ HAVE_MBSLEN=1
+ else
+ HAVE_MBSLEN=0
+ fi
+
+
+
+ GNULIB_MBSLEN=1
+
+
+
+ GNULIB_MBSSTR=1
+
+
+
+
+
+ :
+
+
+
+
+ GNULIB_MEMCHR=1
+
+
+
+ if test $ac_cv_have_decl_memmem = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
+$as_echo_n "checking whether memmem works in linear time... " >&6; }
+if test "${gl_cv_func_memmem_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_MAJOR >= 1007
+ Lucky user
+ #endif
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Lucky user" >/dev/null 2>&1; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works="guessing no"
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+
+int
+main ()
+{
+size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ void *result = 0;
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack memmem. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+ /* Check for quadratic performance. */
+ if (haystack && needle)
+ {
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ }
+ /* Check for empty needle behavior. */
+ return !result || !memmem ("a", 1, 0, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_memmem_works=yes
+else
+ gl_cv_func_memmem_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works" >&5
+$as_echo "$gl_cv_func_memmem_works" >&6; }
+ if test "$gl_cv_func_memmem_works" != yes; then
+ REPLACE_MEMMEM=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS memmem.$ac_objext"
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in memmem
+do :
+ ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem"
+if test "x$ac_cv_func_memmem" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MEMMEM 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ :
+
+
+
+ GNULIB_MEMMEM=1
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in mkdtemp
+do :
+ ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
+if test "x$ac_cv_func_mkdtemp" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_MKDTEMP 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_mkdtemp = no; then
+ HAVE_MKDTEMP=0
+ :
+
+ fi
+
+
+
+ GNULIB_MKDTEMP=1
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mkstemp" >&5
+$as_echo_n "checking for working mkstemp... " >&6; }
+if test "${gl_cv_func_working_mkstemp+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ mkdir conftest.mkstemp
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_working_mkstemp=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_working_mkstemp=yes
+else
+ gl_cv_func_working_mkstemp=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.mkstemp
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mkstemp" >&5
+$as_echo "$gl_cv_func_working_mkstemp" >&6; }
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp.$ac_objext"
+
+
+
+ fi
+
+
+
+ GNULIB_MKSTEMP=1
+
+
+
+
+
+
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+
+$as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS nl_langinfo.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_NL_LANGINFO=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
+$as_echo_n "checking for obstacks... " >&6; }
+if test "${ac_cv_func_obstack+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #include "obstack.h"
+int
+main ()
+{
+struct obstack mem;
+ #define obstack_chunk_alloc malloc
+ #define obstack_chunk_free free
+ obstack_init (&mem);
+ obstack_free (&mem, 0);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_func_obstack=yes
+else
+ ac_cv_func_obstack=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
+$as_echo "$ac_cv_func_obstack" >&6; }
+if test $ac_cv_func_obstack = yes; then
+
+$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
+
+else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack.$ac_objext"
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_obstack_printf_posix=no
+
+ if test $ac_cv_func_obstack_printf = yes ; then
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # obstack_printf exists and is
+ # already POSIX compliant.
+ gl_cv_func_obstack_printf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_obstack_printf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF_POSIX=1
+
+
+
+ case "$host_os" in
+ mingw* | pw*)
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ *)
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
+$as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
+if test "${gl_cv_func_open_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ freebsd*) gl_cv_func_open_slash="guessing no" ;;
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
+#endif
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_open_slash=yes
+else
+ gl_cv_func_open_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.sl conftest.tmp conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
+$as_echo "$gl_cv_func_open_slash" >&6; }
+ case "$gl_cv_func_open_slash" in
+ *no)
+
+$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+
+
+ REPLACE_OPEN=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS open.$ac_objext"
+
+
+
+
+ :
+
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+$as_echo "#define GNULIB_OPEN 1" >>confdefs.h
+
+
+
+
+ GNULIB_OPEN=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_pipe2 != yes; then
+ HAVE_PIPE2=0
+ fi
+
+
+
+ GNULIB_PIPE2=1
+
+
+
+$as_echo "#define GNULIB_PIPE2_SAFER 1" >>confdefs.h
+
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addclose.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_adddup2.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_addopen.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawn_faction_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_destroy.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_DESTROY=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_init.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_INIT=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setflags.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnattr_setsigmask.$ac_objext"
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1
+
+
+
+
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawnp.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS spawni.$ac_objext"
+
+ for ac_header in paths.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default"
+if test "x$ac_cv_header_paths_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_PATHS_H 1
+_ACEOF
+
+fi
+
+done
+
+ for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork
+do :
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
+if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+ fi
+
+
+ GNULIB_POSIX_SPAWNP=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp can be used without linking with libm" >&5
+$as_echo_n "checking whether frexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return frexp (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexp_no_libm=yes
+else
+ gl_cv_func_frexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
+$as_echo "$gl_cv_func_frexp_no_libm" >&6; }
+ if test $gl_cv_func_frexp_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
+$as_echo_n "checking whether frexp works... " >&6; }
+if test "${gl_cv_func_frexp_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexp_works=yes
+else
+ gl_cv_func_frexp_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
+$as_echo "$gl_cv_func_frexp_works" >&6; }
+
+ case "$gl_cv_func_frexp_works" in
+ *yes)
+
+$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h
+
+ ;;
+ esac
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexp_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x;
+ int y;
+int
+main ()
+{
+return ldexp (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexp_no_libm=yes
+else
+ gl_cv_func_ldexp_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5
+$as_echo "$gl_cv_func_ldexp_no_libm" >&6; }
+ if test $gl_cv_func_ldexp_no_libm = yes; then
+
+$as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h
+
+ fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether frexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_frexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return frexpl (x, &y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_frexpl_no_libm=yes
+else
+ gl_cv_func_frexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
+$as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
+$as_echo_n "checking whether frexpl works... " >&6; }
+if test "${gl_cv_func_frexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_frexpl_works=yes
+else
+ gl_cv_func_frexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
+$as_echo "$gl_cv_func_frexpl_works" >&6; }
+
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+
+$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_frexpl" = x""yes; then :
+
+else
+ HAVE_DECL_FREXPL=0
+fi
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl can be used without linking with libm" >&5
+$as_echo_n "checking whether ldexpl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_ldexpl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x;
+ int y;
+int
+main ()
+{
+return ldexpl (x, y) < 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_ldexpl_no_libm=yes
+else
+ gl_cv_func_ldexpl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5
+$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; }
+ if test $gl_cv_func_ldexpl_no_libm = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5
+$as_echo_n "checking whether ldexpl works... " >&6; }
+if test "${gl_cv_func_ldexpl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ aix*) gl_cv_func_ldexpl_works="guessing no";;
+ *) gl_cv_func_ldexpl_works="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+extern long double ldexpl (long double, int);
+int main()
+{
+ volatile long double x1 = 1.0;
+ volatile long double y1 = ldexpl (x1, -1);
+ volatile long double x2 = 1.73205L;
+ volatile long double y2 = ldexpl (x2, 0);
+ return (y1 != 0.5L) || (y2 != x2);
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_ldexpl_works=yes
+else
+ gl_cv_func_ldexpl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5
+$as_echo "$gl_cv_func_ldexpl_works" >&6; }
+
+ case "$gl_cv_func_ldexpl_works" in
+ *yes)
+
+$as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h
+
+ ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_ldexpl" = x""yes; then :
+
+else
+ HAVE_DECL_LDEXPL=0
+fi
+
+ ;;
+ esac
+ fi
+
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
+_ACEOF
+
+ ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
+"
+if test "x$ac_cv_have_decl_program_invocation_short_name" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
+_ACEOF
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'"
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quote.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS quotearg.$ac_objext"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rawmemchr
+do :
+ ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
+if test "x$ac_cv_func_rawmemchr" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RAWMEMCHR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rawmemchr = no; then
+ HAVE_RAWMEMCHR=0
+ :
+ fi
+
+
+
+ GNULIB_RAWMEMCHR=1
+
+
+
+
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+
+ :
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
+$as_echo_n "checking whether readlink signature is correct... " >&6; }
+if test "${gl_cv_decl_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+ /* Cause compilation failure if original declaration has wrong type. */
+ ssize_t readlink (const char *, char *, size_t);
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_readlink_works=yes
+else
+ gl_cv_decl_readlink_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
+$as_echo "$gl_cv_decl_readlink_works" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_readlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # We have readlink, so assume ln -s works.
+ ln -s conftest.no-such conftest.link
+ ln -s conftest.link conftest.lnk2
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_readlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+char buf[20];
+ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_readlink_works=yes
+else
+ gl_cv_func_readlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
+$as_echo "$gl_cv_func_readlink_works" >&6; }
+ if test "$gl_cv_func_readlink_works" != yes; then
+
+$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
+
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS readlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_READLINK=1
+
+
+
+
+
+# Check whether --with-included-regex was given.
+if test "${with_included_regex+set}" = set; then :
+ withval=$with_included_regex;
+fi
+
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
+$as_echo_n "checking for working re_compile_pattern... " >&6; }
+if test "${gl_cv_func_re_compile_pattern_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_re_compile_pattern_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+
+int
+main ()
+{
+static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:]:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_re_compile_pattern_working=yes
+else
+ gl_cv_func_re_compile_pattern_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
+$as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+
+$as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
+
+
+$as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
+
+
+$as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
+
+
+$as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
+
+
+$as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
+
+
+$as_echo "#define re_search rpl_re_search" >>confdefs.h
+
+
+$as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
+
+
+$as_echo "#define re_match rpl_re_match" >>confdefs.h
+
+
+$as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
+
+
+$as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
+
+
+$as_echo "#define re_comp rpl_re_comp" >>confdefs.h
+
+
+$as_echo "#define re_exec rpl_re_exec" >>confdefs.h
+
+
+$as_echo "#define regcomp rpl_regcomp" >>confdefs.h
+
+
+$as_echo "#define regexec rpl_regexec" >>confdefs.h
+
+
+$as_echo "#define regerror rpl_regerror" >>confdefs.h
+
+
+$as_echo "#define regfree rpl_regfree" >>confdefs.h
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS regex.$ac_objext"
+
+
+
+
+
+
+ for ac_header in libintl.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
+if test "x$ac_cv_header_libintl_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBINTL_H 1
+_ACEOF
+
+fi
+
+done
+
+
+ ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
+"
+if test "x$ac_cv_have_decl_isblank" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_ISBLANK $ac_have_decl
+_ACEOF
+
+
+ fi
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
+$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
+if test "${gl_cv_func_rename_slash_dst_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_dst_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
+ if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_dst_works=yes
+else
+ gl_cv_func_rename_slash_dst_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
+$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
+$as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
+if test "${gl_cv_func_rename_slash_src_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_slash_src_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
+ if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_slash_src_works=yes
+else
+ gl_cv_func_rename_slash_src_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
+$as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
+ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
+$as_echo_n "checking whether rename manages hard links correctly... " >&6; }
+if test "${gl_cv_func_rename_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "" = ""; then
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+
+int
+main ()
+{
+if (rename ("conftest.f", "conftest.f1")) return 1;
+ if (unlink ("conftest.f1")) return 2;
+ if (rename ("conftest.f", "conftest.f")) return 3;
+ if (rename ("conftest.f1", "conftest.f1") == 0) return 4;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_link_works=yes
+else
+ gl_cv_func_rename_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
+$as_echo "$gl_cv_func_rename_link_works" >&6; }
+ if test "x$gl_cv_func_rename_link_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
+$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
+if test "${gl_cv_func_rename_dest_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ rm -rf conftest.f conftest.d1 conftest.d2
+ touch conftest.f && mkdir conftest.d1 conftest.d2 ||
+ as_fn_error $? "cannot create temporary files" "$LINENO" 5
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rename_dest_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+# include <stdio.h>
+# include <stdlib.h>
+
+int
+main ()
+{
+if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
+ if (rename ("conftest.d2", "conftest.f") == 0) return 2;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rename_dest_works=yes
+else
+ gl_cv_func_rename_dest_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.f conftest.d1 conftest.d2
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
+$as_echo "$gl_cv_func_rename_dest_works" >&6; }
+ if test "x$gl_cv_func_rename_dest_works" != xyes; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rename.$ac_objext"
+
+ REPLACE_RENAME=1
+
+$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
+
+ fi
+
+
+
+ GNULIB_RENAME=1
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in rmdir
+do :
+ ac_fn_c_check_func "$LINENO" "rmdir" "ac_cv_func_rmdir"
+if test "x$ac_cv_func_rmdir" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RMDIR 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_rmdir = no; then
+ REPLACE_RMDIR=1
+ # If someone lacks rmdir, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_RMDIR_CHECK" != xyes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "Your system lacks the rmdir function.
+ Please report this, along with the output of \"uname -a\", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_RMDIR_CHECK=yes.
+ E.g., ./configure SKIP_RMDIR_CHECK=yes
+See \`config.log' for more details" "$LINENO" 5 ; }
+ fi
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
+$as_echo_n "checking whether rmdir works... " >&6; }
+if test "${gl_cv_func_rmdir_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ mkdir conftest.dir
+ touch conftest.file
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_rmdir_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+
+int
+main ()
+{
+return !rmdir ("conftest.file/") || errno != ENOTDIR
+ || !rmdir ("conftest.dir/./");
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_rmdir_works=yes
+else
+ gl_cv_func_rmdir_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -rf conftest.dir conftest.file
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
+$as_echo "$gl_cv_func_rmdir_works" >&6; }
+ if test x"$gl_cv_func_rmdir_works" != xyes; then
+ REPLACE_RMDIR=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS rmdir.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_RMDIR=1
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <sched.h>
+ struct sched_param a;
+ int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ SCHED_H=''
+else
+ SCHED_H='sched.h'
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sched_h='<'sched.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5
+$as_echo_n "checking absolute name of <sched.h>... " >&6; }
+if test "${gl_cv_next_sched_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sched_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sched.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sched.h#{
+ s#.*"\(.*/sched.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sched_h='<'sched.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5
+$as_echo "$gl_cv_next_sched_h" >&6; }
+ fi
+ NEXT_SCHED_H=$gl_cv_next_sched_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sched.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sched_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_sched_h = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+
+
+ ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h>
+"
+if test "x$ac_cv_type_struct_sched_param" = x""yes; then :
+ HAVE_STRUCT_SCHED_PARAM=1
+else
+ HAVE_STRUCT_SCHED_PARAM=0
+fi
+
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+
+
+
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS setenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_SETENV=1
+
+
+
+
+ if test $ac_cv_func_sigaction = yes; then
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigaction.$ac_objext"
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+
+ fi
+
+
+
+ GNULIB_SIGACTION=1
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_signal_h='<'signal.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
+$as_echo_n "checking absolute name of <signal.h>... " >&6; }
+if test "${gl_cv_next_signal_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_signal_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/signal.h#{
+ s#.*"\(.*/signal.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_signal_h='<'signal.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
+$as_echo "$gl_cv_next_signal_h" >&6; }
+ fi
+ NEXT_SIGNAL_H=$gl_cv_next_signal_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'signal.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_signal_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
+
+
+
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
+#include <signal.h>
+
+"
+if test "x$ac_cv_type_volatile_sig_atomic_t" = x""yes; then :
+
+else
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
+fi
+
+
+
+
+ for gl_func in sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5
+$as_echo_n "checking for signbit macro... " >&6; }
+if test "${gl_cv_func_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <math.h>
+/* If signbit is defined as a function, don't use it, since calling it for
+ 'float' or 'long double' arguments would involve conversions.
+ If signbit is not declared at all but exists as a library function, don't
+ use it, since the prototype may not match.
+ If signbit is not declared at all but exists as a compiler built-in, don't
+ use it, since it's preferable to use __builtin_signbit* (no warnings,
+ no conversions). */
+#ifndef signbit
+# error "signbit should be a macro"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit=yes
+else
+ gl_cv_func_signbit=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5
+$as_echo "$gl_cv_func_signbit" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5
+$as_echo_n "checking for signbit compiler built-ins... " >&6; }
+if test "${gl_cv_func_signbit_gcc+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_signbit_gcc="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if __GNUC__ >= 4
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+#else
+# error "signbit should be three compiler built-ins"
+#endif
+#include <string.h>
+
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_signbit_gcc=yes
+else
+ gl_cv_func_signbit_gcc=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5
+$as_echo "$gl_cv_func_signbit_gcc" >&6; }
+ if test "$gl_cv_func_signbit_gcc" = yes; then
+ REPLACE_SIGNBIT_USING_GCC=1
+ else
+ if test "$gl_cv_func_signbit" != yes; then
+ REPLACE_SIGNBIT=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitd.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS signbitl.$ac_objext"
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5
+$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_float_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0f };
+static memory_float minus = { -1.0f };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_signbit=`cat conftest.out`
+else
+ gl_cv_cc_float_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5
+$as_echo "$gl_cv_cc_float_signbit" >&6; }
+ case "$gl_cv_cc_float_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0 };
+static memory_float minus = { -1.0 };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5
+$as_echo "$gl_cv_cc_double_signbit" >&6; }
+ case "$gl_cv_cc_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5
+$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_signbit+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_signbit="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0L };
+static memory_float minus = { -1.0L };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_signbit=`cat conftest.out`
+else
+ gl_cv_cc_long_double_signbit="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5
+$as_echo "$gl_cv_cc_long_double_signbit" >&6; }
+ case "$gl_cv_cc_long_double_signbit" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_SIGNBIT_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_SIGNBIT_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignf" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_COPYSIGNF $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignf_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ float x, y;
+int
+main ()
+{
+return copysignf (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignf_no_libm=yes
+else
+ gl_cv_func_copysignf_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5
+$as_echo "$gl_cv_func_copysignf_no_libm" >&6; }
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+
+$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysign" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_COPYSIGN $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5
+$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysign_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ double x, y;
+int
+main ()
+{
+return copysign (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysign_no_libm=yes
+else
+ gl_cv_func_copysign_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5
+$as_echo "$gl_cv_func_copysign_no_libm" >&6; }
+ if test $gl_cv_func_copysign_no_libm = yes; then
+
+$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h>
+"
+if test "x$ac_cv_have_decl_copysignl" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_COPYSIGNL $ac_have_decl
+_ACEOF
+
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5
+$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; }
+if test "${gl_cv_func_copysignl_no_libm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <math.h>
+ long double x, y;
+int
+main ()
+{
+return copysignl (x, y) < 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ gl_cv_func_copysignl_no_libm=yes
+else
+ gl_cv_func_copysignl_no_libm=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5
+$as_echo "$gl_cv_func_copysignl_no_libm" >&6; }
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+
+$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h
+
+ fi
+ fi
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_SIGNBIT=1
+
+
+
+ signals_not_posix=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "sigset_t" >/dev/null 2>&1; then :
+
+else
+ signals_not_posix=1
+fi
+rm -f conftest*
+
+ if test -z "$signals_not_posix"; then
+ ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask"
+if test "x$ac_cv_func_sigprocmask" = x""yes; then :
+ gl_cv_func_sigprocmask=1
+fi
+
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sigprocmask.$ac_objext"
+
+
+
+ ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>
+"
+if test "x$ac_cv_type_sigset_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGSET_T 1
+_ACEOF
+
+gl_cv_type_sigset_t=yes
+else
+ gl_cv_type_sigset_t=no
+fi
+
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+
+
+ fi
+
+
+
+ GNULIB_SIGPROCMASK=1
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
+$as_echo_n "checking for SIZE_MAX... " >&6; }
+if test "${gl_cv_size_max+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ gl_cv_size_max=
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "Found it" >/dev/null 2>&1; then :
+ gl_cv_size_max=yes
+fi
+rm -f conftest*
+
+ if test -z "$gl_cv_size_max"; then
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
+#include <limits.h>"; then :
+
+else
+ size_t_bits_minus_1=
+fi
+
+ if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
+
+else
+ fits_in_uint=
+fi
+
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ fits_in_uint=0
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
+$as_echo "$gl_cv_size_max" >&6; }
+ if test "$gl_cv_size_max" != yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define SIZE_MAX $gl_cv_size_max
+_ACEOF
+
+ fi
+
+
+
+
+ gl_cv_func_snprintf_usable=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+
+
+
+ GNULIB_SNPRINTF=1
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_snprintf_posix=no
+ for ac_func in snprintf
+do :
+ ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
+if test "x$ac_cv_func_snprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SNPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_snprintf = yes; then
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5
+$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_truncation_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_truncation_c99=yes
+else
+ gl_cv_func_snprintf_truncation_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5
+$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
+$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
+if test "${gl_cv_func_snprintf_retval_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_retval_c99=yes
+else
+ gl_cv_func_snprintf_retval_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
+$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5
+$as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; }
+if test "${gl_cv_func_snprintf_directive_n+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_directive_n=yes
+else
+ gl_cv_func_snprintf_directive_n=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5
+$as_echo "$gl_cv_func_snprintf_directive_n" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
+$as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
+if test "${gl_cv_func_snprintf_size1+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_snprintf_size1="guessing yes"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_snprintf_size1=yes
+else
+ gl_cv_func_snprintf_size1=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
+$as_echo "$gl_cv_func_snprintf_size1" >&6; }
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5
+$as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; }
+if test "${gl_cv_func_vsnprintf_zerosize_c99+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_vsnprintf_zerosize_c99=yes
+else
+ gl_cv_func_vsnprintf_zerosize_c99=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5
+$as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; }
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ case "$gl_cv_func_snprintf_truncation_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_retval_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_directive_n" in
+ *yes)
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ case "$gl_cv_func_vsnprintf_zerosize_c99" in
+ *yes)
+ # snprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_snprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS snprintf.$ac_objext"
+
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ :
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5
+$as_echo_n "checking absolute name of <spawn.h>... " >&6; }
+if test "${gl_cv_next_spawn_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_spawn_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/spawn.h#{
+ s#.*"\(.*/spawn.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_spawn_h='<'spawn.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5
+$as_echo "$gl_cv_next_spawn_h" >&6; }
+ fi
+ NEXT_SPAWN_H=$gl_cv_next_spawn_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'spawn.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_spawn_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_spawn_h = yes; then
+ HAVE_SPAWN_H=1
+ ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawnattr_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_POSIX_SPAWNATTR_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWNATTR_T=0
+fi
+
+ ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" "
+#include <spawn.h>
+
+"
+if test "x$ac_cv_type_posix_spawn_file_actions_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1
+_ACEOF
+
+
+else
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+fi
+
+ else
+ HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+
+ :
+
+ fi
+
+
+
+
+
+ for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawwn_file_actions_adddup2; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <spawn.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_sprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # sprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_sprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_sprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS sprintf.$ac_objext"
+
+ REPLACE_SPRINTF=1
+ :
+
+ fi
+
+
+
+ GNULIB_SPRINTF_POSIX=1
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
+$as_echo_n "checking for ssize_t... " >&6; }
+if test "${gt_cv_ssize_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+int
+main ()
+{
+int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_ssize_t=yes
+else
+ gt_cv_ssize_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
+$as_echo "$gt_cv_ssize_t" >&6; }
+ if test $gt_cv_ssize_t = no; then
+
+$as_echo "#define ssize_t int" >>confdefs.h
+
+ fi
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
+$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
+if test "${gl_cv_func_stat_dir_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+ *) gl_cv_func_stat_dir_slash="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st; return stat (".", &st) != stat ("./", &st);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_dir_slash=yes
+else
+ gl_cv_func_stat_dir_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
+$as_echo "$gl_cv_func_stat_dir_slash" >&6; }
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
+$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
+if test "${gl_cv_func_stat_file_slash+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_stat_file_slash="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+struct stat st;
+ if (!stat ("conftest.tmp/", &st)) return 1;
+#if HAVE_LSTAT
+ if (!stat ("conftest.lnk/", &st)) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_stat_file_slash=yes
+else
+ gl_cv_func_stat_file_slash=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.tmp conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
+$as_echo "$gl_cv_func_stat_file_slash" >&6; }
+ case $gl_cv_func_stat_dir_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
+;;
+ esac
+ case $gl_cv_func_stat_file_slash in
+ *no) REPLACE_STAT=1
+
+$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
+;;
+ esac
+ if test $REPLACE_STAT = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS stat.$ac_objext"
+
+
+ fi
+
+
+
+ GNULIB_STAT=1
+
+
+ STDARG_H='';
+ NEXT_STDARG_H='<stdarg.h>';
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
+$as_echo_n "checking for va_copy... " >&6; }
+ if test "${gl_cv_func_va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_va_copy=yes
+else
+ gl_cv_func_va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
+$as_echo "$gl_cv_func_va_copy" >&6; }
+ if test $gl_cv_func_va_copy = no; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if defined _AIX && !defined __GNUC__
+ AIX vaccine
+ #endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "vaccine" >/dev/null 2>&1; then :
+ gl_aixcc=yes
+else
+ gl_aixcc=no
+fi
+rm -f conftest*
+
+ if test $gl_aixcc = yes; then
+ STDARG_H=stdarg.h
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
+$as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
+if test "${gl_cv_next_stdarg_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdarg_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdarg.h#{
+ s#.*"\(.*/stdarg.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdarg_h='<'stdarg.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
+$as_echo "$gl_cv_next_stdarg_h" >&6; }
+ fi
+ NEXT_STDARG_H=$gl_cv_next_stdarg_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdarg.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdarg_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
+
+
+
+ if test "$gl_cv_next_stdarg_h" = '""'; then
+ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+ NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+ fi
+ else
+
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ if test "${gl_cv_func___va_copy+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdarg.h>
+int
+main ()
+{
+
+#ifndef __va_copy
+error, bail out
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func___va_copy=yes
+else
+ gl_cv_func___va_copy=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+ as_echo_n="$saved_as_echo_n"
+
+ if test $gl_cv_func___va_copy = yes; then
+
+$as_echo "#define va_copy __va_copy" >>confdefs.h
+
+ else
+
+
+$as_echo "#define va_copy gl_va_copy" >>confdefs.h
+
+ fi
+ fi
+ fi
+
+
+
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wchar_t = no; then
+ HAVE_WCHAR_T=0
+ STDDEF_H=stddef.h
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
+$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
+if test "${gl_cv_decl_null_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ int test[2 * (sizeof NULL == sizeof (void *)) -1];
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_decl_null_works=yes
+else
+ gl_cv_decl_null_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
+$as_echo "$gl_cv_decl_null_works" >&6; }
+ if test $gl_cv_decl_null_works = no; then
+ REPLACE_NULL=1
+ STDDEF_H=stddef.h
+ fi
+ if test -n "$STDDEF_H"; then
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
+$as_echo_n "checking absolute name of <stddef.h>... " >&6; }
+if test "${gl_cv_next_stddef_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stddef_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stddef.h#{
+ s#.*"\(.*/stddef.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stddef_h='<'stddef.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
+$as_echo "$gl_cv_next_stddef_h" >&6; }
+ fi
+ NEXT_STDDEF_H=$gl_cv_next_stddef_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stddef.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stddef_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
+
+
+
+ fi
+
+
+
+
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+
+
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+
+
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
+$as_echo_n "checking absolute name of <stdint.h>... " >&6; }
+if test "${gl_cv_next_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdint_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdint.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdint.h#{
+ s#.*"\(.*/stdint.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdint_h='<'stdint.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
+$as_echo "$gl_cv_next_stdint_h" >&6; }
+ fi
+ NEXT_STDINT_H=$gl_cv_next_stdint_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdint.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdint_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+
+
+ if test $ac_cv_header_stdint_h = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
+$as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
+if test "${gl_cv_header_working_stdint_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ gl_cv_header_working_stdint_h=no
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if test "$cross_compiling" = yes; then :
+ gl_cv_header_working_stdint_h=yes
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+
+int
+main ()
+{
+
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_header_working_stdint_h=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
+$as_echo "$gl_cv_header_working_stdint_h" >&6; }
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ for ac_header in sys/inttypes.h sys/bitypes.h
+do :
+ as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
+if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+
+
+
+
+
+
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
+$as_echo_n "checking for bit size of $gltype... " >&6; }
+if eval "test \"\${gl_cv_bitsizeof_${gltype}+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+#include <limits.h>"; then :
+
+else
+ result=unknown
+fi
+
+ eval gl_cv_bitsizeof_${gltype}=\$result
+
+fi
+eval ac_res=\$gl_cv_bitsizeof_${gltype}
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ cat >>confdefs.h <<_ACEOF
+#define BITSIZEOF_${GLTYPE} $result
+_ACEOF
+
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+
+
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
+$as_echo_n "checking whether $gltype is signed... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_signed+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ result=yes
+else
+ result=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval gl_cv_type_${gltype}_signed=\$result
+
+fi
+eval ac_res=\$gl_cv_type_${gltype}_signed
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGNED_${GLTYPE} 1
+_ACEOF
+
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+
+
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+
+
+ for gltype in ptrdiff_t size_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+ fi
+
+
+ for gltype in sig_atomic_t wchar_t wint_t ; do
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
+$as_echo_n "checking for $gltype integer literal suffix... " >&6; }
+if eval "test \"\${gl_cv_type_${gltype}_suffix+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+
+ extern $gltype foo;
+ extern $gltype1 foo;
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval gl_cv_type_${gltype}_suffix=\$glsuf
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done
+fi
+eval ac_res=\$gl_cv_type_${gltype}_suffix
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ cat >>confdefs.h <<_ACEOF
+#define ${GLTYPE}_SUFFIX $result
+_ACEOF
+
+ done
+
+
+
+ STDINT_H=stdint.h
+ fi
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
+$as_echo_n "checking absolute name of <stdio.h>... " >&6; }
+if test "${gl_cv_next_stdio_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdio_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdio.h#{
+ s#.*"\(.*/stdio.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdio_h='<'stdio.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
+$as_echo "$gl_cv_next_stdio_h" >&6; }
+ fi
+ NEXT_STDIO_H=$gl_cv_next_stdio_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdio.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdio_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
+
+
+
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+
+
+
+ for gl_func in dprintf fpurge fseeko ftello getdelim getline popen renameat snprintf vdprintf vsnprintf; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdio.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
+$as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
+if test "${gl_cv_next_stdlib_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_stdlib_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/stdlib.h#{
+ s#.*"\(.*/stdlib.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_stdlib_h='<'stdlib.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
+$as_echo "$gl_cv_next_stdlib_h" >&6; }
+ fi
+ NEXT_STDLIB_H=$gl_cv_next_stdlib_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'stdlib.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_stdlib_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
+
+
+
+ for ac_header in random.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "random.h" "ac_cv_header_random_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_random_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_RANDOM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+
+ ac_fn_c_check_type "$LINENO" "struct random_data" "ac_cv_type_struct_random_data" "#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+
+"
+if test "x$ac_cv_type_struct_random_data" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_RANDOM_DATA 1
+_ACEOF
+
+
+else
+ HAVE_STRUCT_RANDOM_DATA=0
+fi
+
+
+
+ for gl_func in atoll canonicalize_file_name getloadavg getsubopt mkdtemp mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS mkstemp-safer.$ac_objext"
+
+
+
+
+$as_echo "#define GNULIB_STDLIB_SAFER 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strchrnul
+do :
+ ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
+if test "x$ac_cv_func_strchrnul" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRCHRNUL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ if test $ac_cv_func_strchrnul = no; then
+ HAVE_STRCHRNUL=0
+ :
+ fi
+
+
+
+ GNULIB_STRCHRNUL=1
+
+
+
+ if test $REPLACE_STRERROR = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strerror.$ac_objext"
+
+
+cat >>confdefs.h <<_ACEOF
+#define REPLACE_STRERROR $REPLACE_STRERROR
+_ACEOF
+
+ fi
+
+
+
+ GNULIB_STRERROR=1
+
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ if test $ac_cv_func_strndup = yes; then
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
+$as_echo_n "checking for working strndup... " >&6; }
+if test "${gl_cv_func_strndup_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ case $host_os in
+ aix*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <string.h>
+ #include <stdlib.h>
+int
+main ()
+{
+
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strndup_works=yes
+else
+ gl_cv_func_strndup_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
+$as_echo "$gl_cv_func_strndup_works" >&6; }
+ case $gl_cv_func_strndup_works in
+ *no)
+ REPLACE_STRNDUP=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ ;;
+ esac
+ else
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strndup.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_STRNDUP=1
+
+
+
+
+
+
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
+$as_echo_n "checking for working strnlen... " >&6; }
+if test "${ac_cv_func_strnlen_working+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strnlen_working=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+#define S "foobar"
+#define S_LEN (sizeof S - 1)
+
+ /* At least one implementation is buggy: that of AIX 4.3 would
+ give strnlen (S, 1) == 3. */
+
+ int i;
+ for (i = 0; i < S_LEN + 1; ++i)
+ {
+ int expected = i <= S_LEN ? i : S_LEN;
+ if (strnlen (S, i) != expected)
+ return 1;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strnlen_working=yes
+else
+ ac_cv_func_strnlen_working=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
+$as_echo "$ac_cv_func_strnlen_working" >&6; }
+test $ac_cv_func_strnlen_working = no &&
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strnlen.$ac_objext"
+
+
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doesn't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ([strnlen])
+
+$as_echo "#define strnlen rpl_strnlen" >>confdefs.h
+
+ :
+ fi
+
+
+
+ GNULIB_STRNLEN=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strtod" >&5
+$as_echo_n "checking for working strtod... " >&6; }
+if test "${ac_cv_func_strtod+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ ac_cv_func_strtod=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+$ac_includes_default
+#ifndef strtod
+double strtod ();
+#endif
+int
+main()
+{
+ {
+ /* Some versions of Linux strtod mis-parse strings with leading '+'. */
+ char *string = " +69";
+ char *term;
+ double value;
+ value = strtod (string, &term);
+ if (value != 69 || term != (string + 4))
+ return 1;
+ }
+
+ {
+ /* Under Solaris 2.4, strtod returns the wrong value for the
+ terminating character under some conditions. */
+ char *string = "NaN";
+ char *term;
+ strtod (string, &term);
+ if (term != string && *(term - 1) == 0)
+ return 1;
+ }
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_func_strtod=yes
+else
+ ac_cv_func_strtod=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strtod" >&5
+$as_echo "$ac_cv_func_strtod" >&6; }
+if test $ac_cv_func_strtod = no; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+fi
+
+ if test $ac_cv_func_strtod = no; then
+ HAVE_STRTOD=0
+ REPLACE_STRTOD=1
+ :
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtod obeys C99" >&5
+$as_echo_n "checking whether strtod obeys C99... " >&6; }
+if test "${gl_cv_func_strtod_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_strtod_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <math.h>
+#include <errno.h>
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+
+int
+main ()
+{
+
+ {
+ /* Older glibc and Cygwin mis-parse "-0x". */
+ const char *string = "-0x";
+ char *term;
+ double value = strtod (string, &term);
+ double zero = 0.0;
+ if (1.0 / value != -1.0 / zero || term != (string + 2))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
+ but mistakenly sets errno. */
+ const char *string = "inf";
+ char *term;
+ double value;
+ errno = 0;
+ value = strtod (string, &term);
+ if (value != HUGE_VAL || term != (string + 3) || errno)
+ return 1;
+ }
+ {
+ /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
+ const char *string = "nan()";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 5))
+ return 1;
+ }
+ {
+ /* darwin 10.6.1 misparses "nan(". */
+ const char *string = "nan(";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 3))
+ return 1;
+ }
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_strtod_works=yes
+else
+ gl_cv_func_strtod_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtod_works" >&5
+$as_echo "$gl_cv_func_strtod_works" >&6; }
+ if test "$gl_cv_func_strtod_works" != yes; then
+ REPLACE_STRTOD=1
+ :
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS strtod.$ac_objext"
+
+ac_fn_c_check_func "$LINENO" "pow" "ac_cv_func_pow"
+if test "x$ac_cv_func_pow" = x""yes; then :
+
+fi
+
+if test $ac_cv_func_pow = no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_m_pow=yes
+else
+ ac_cv_lib_m_pow=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then :
+ POW_LIB=-lm
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cannot find library containing definition of pow" >&5
+$as_echo "$as_me: WARNING: cannot find library containing definition of pow" >&2;}
+fi
+
+fi
+
+ fi
+ fi
+
+
+
+ GNULIB_STRTOD=1
+
+
+
+
+
+
+
+
+
+
+ for ac_func in strtol
+do :
+ ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
+if test "x$ac_cv_func_strtol" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRTOL 1
+_ACEOF
+
+else
+
+ M4_LIBOBJS="$M4_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
+$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
+if test "${gl_cv_next_sys_stat_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_stat_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/stat.h#{
+ s#.*"\(.*/sys/stat.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_stat_h='<'sys/stat.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
+$as_echo "$gl_cv_next_sys_stat_h" >&6; }
+ fi
+ NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/stat.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_stat_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
+ #include <sys/stat.h>
+"
+if test "x$ac_cv_type_nlink_t" = x""yes; then :
+
+else
+
+$as_echo "#define nlink_t int" >>confdefs.h
+
+fi
+
+
+
+ for gl_func in fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/stat.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5
+$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; }
+if test "${gl_cv_next_sys_wait_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_sys_wait_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/wait.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/sys/wait.h#{
+ s#.*"\(.*/sys/wait.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_sys_wait_h='<'sys/wait.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5
+$as_echo "$gl_cv_next_sys_wait_h" >&6; }
+ fi
+ NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'sys/wait.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_sys_wait_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS tempname.$ac_objext"
+
+
+ :
+
+
+
+
+
+
+ for ac_func in __secure_getenv
+do :
+ ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
+if test "x$ac_cv_func___secure_getenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE___SECURE_GETENV 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
+$as_echo_n "checking absolute name of <unistd.h>... " >&6; }
+if test "${gl_cv_next_unistd_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_unistd_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/unistd.h#{
+ s#.*"\(.*/unistd.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_unistd_h='<'unistd.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
+$as_echo "$gl_cv_next_unistd_h" >&6; }
+ fi
+ NEXT_UNISTD_H=$gl_cv_next_unistd_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'unistd.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_unistd_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
+
+
+
+
+
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+
+
+
+ for gl_func in chown dup2 dup3 environ euidaccess faccessat fchdir fchownat fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell lchown link linkat lseek pipe2 pread readlink readlinkat rmdir sleep symlink symlinkat unlink unlinkat usleep; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS dup-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS fd-safer.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS pipe-safer.$ac_objext"
+
+
+
+
+$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ for ac_func in unsetenv
+do :
+ ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
+if test "x$ac_cv_func_unsetenv" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_UNSETENV 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+
+
+
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
+$as_echo_n "checking for unsetenv() return type... " >&6; }
+if test "${gt_cv_func_unsetenv_ret+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_func_unsetenv_ret='int'
+else
+ gt_cv_func_unsetenv_ret='void'
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
+$as_echo "$gt_cv_func_unsetenv_ret" >&6; }
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+
+$as_echo "#define VOID_UNSETENV 1" >>confdefs.h
+
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv works on duplicates" >&5
+$as_echo_n "checking whether unsetenv works on duplicates... " >&6; }
+if test "${gl_cv_func_unsetenv_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_unsetenv_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stdlib.h>
+
+int
+main ()
+{
+
+ char entry[] = "b=2";
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry)) return 2;
+ entry[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_unsetenv_works=yes
+else
+ gl_cv_func_unsetenv_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
+$as_echo "$gl_cv_func_unsetenv_works" >&6; }
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS unsetenv.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_UNSETENV=1
+
+
+
+ if test $ac_cv_func_vasnprintf = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasnprintf_posix=no
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasnprintf = yes; then
+ # vasnprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasnprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasnprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+ fi
+
+
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_vasprintf = no; then
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ GNULIB_VASPRINTF=1
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vasprintf_posix=no
+ for ac_func in vasprintf
+do :
+ ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
+if test "x$ac_cv_func_vasprintf" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_VASPRINTF 1
+_ACEOF
+
+fi
+done
+
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asprintf.$ac_objext"
+
+
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+
+
+
+
+
+
+
+
+ fi
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror:3:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=verror_at_line:5:c-format"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ gl_cv_func_vfprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # vfprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vfprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h
+
+ for ac_func in nl_langinfo
+do :
+ ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo"
+if test "x$ac_cv_func_nl_langinfo" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_NL_LANGINFO 1
+_ACEOF
+
+fi
+done
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+
+$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h
+
+
+$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h
+
+ ;;
+ esac
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vasnprintf.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-args.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS printf-parse.$ac_objext"
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS asnprintf.$ac_objext"
+
+ if test $ac_cv_func_vasnprintf = yes; then
+
+$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
+
+ fi
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
+if test "x$ac_cv_type_ptrdiff_t" = x""yes; then :
+
+else
+
+$as_echo "#define ptrdiff_t long" >>confdefs.h
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vfprintf.$ac_objext"
+
+ REPLACE_VFPRINTF=1
+
+$as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VFPRINTF_POSIX=1
+
+
+
+ if test $gl_cv_func_vfprintf_posix = no; then
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS vprintf.$ac_objext"
+
+ REPLACE_VPRINTF=1
+
+$as_echo "#define REPLACE_VPRINTF_POSIX 1" >>confdefs.h
+
+ :
+
+ fi
+
+
+
+ GNULIB_VPRINTF_POSIX=1
+
+
+
+
+ for ac_func in waitid
+do :
+ ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid"
+if test "x$ac_cv_func_waitid" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_WAITID 1
+_ACEOF
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
+$as_echo_n "checking absolute name of <wchar.h>... " >&6; }
+if test "${gl_cv_next_wchar_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wchar_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wchar.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wchar.h#{
+ s#.*"\(.*/wchar.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wchar_h='<'wchar.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
+$as_echo "$gl_cv_next_wchar_h" >&6; }
+ fi
+ NEXT_WCHAR_H=$gl_cv_next_wchar_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wchar.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wchar_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
+
+
+
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+
+ for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth; do
+ as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
+$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
+if eval "test \"\${$as_gl_Symbol+set}\"" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+
+int
+main ()
+{
+#undef $gl_func
+ (void) $gl_func;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ eval "$as_gl_Symbol=yes"
+else
+ eval "$as_gl_Symbol=no"
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+eval ac_res=\$$as_gl_Symbol
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
+_ACEOF
+
+ eval ac_cv_have_decl_$gl_func=yes
+fi
+ done
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
+$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
+if test "${gl_cv_func_mbrtowc_incomplete_state+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+ if test $LOCALE_JA != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_incomplete_state=yes
+else
+ gl_cv_func_mbrtowc_incomplete_state=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
+$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
+$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
+if test "${gl_cv_func_mbrtowc_sanitycheck+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+ if test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_mbrtowc_sanitycheck=yes
+else
+ gl_cv_func_mbrtowc_sanitycheck=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
+$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
+
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+
+ :
+
+ fi
+
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_WCRTOMB=1
+ fi
+
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ fi
+ if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
+$as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
+if test "${gl_cv_func_wcrtomb_retval+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcrtomb_retval=yes
+else
+ gl_cv_func_wcrtomb_retval=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
+$as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcrtomb.$ac_objext"
+
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCRTOMB=1
+
+
+
+
+
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+
+
+
+
+
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
+$as_echo_n "checking whether iswcntrl works... " >&6; }
+if test "${gl_cv_func_iswcntrl_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_iswcntrl_works=yes
+else
+ gl_cv_func_iswcntrl_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
+$as_echo "$gl_cv_func_iswcntrl_works" >&6; }
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ case "$host_os" in
+ mingw*)
+ ;;
+ *)
+ WCTYPE_H=
+ ;;
+ esac
+ fi
+ fi
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
+$as_echo_n "checking absolute name of <wctype.h>... " >&6; }
+if test "${gl_cv_next_wctype_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_wctype_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <wctype.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/wctype.h#{
+ s#.*"\(.*/wctype.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_wctype_h='<'wctype.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
+$as_echo "$gl_cv_next_wctype_h" >&6; }
+ fi
+ NEXT_WCTYPE_H=$gl_cv_next_wctype_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'wctype.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_wctype_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
+
+
+
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+
+
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wcwidth" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCWIDTH $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
+$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
+if test "${gl_cv_func_wcwidth_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="guessing no";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
+ return 1;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wcwidth_works=yes
+else
+ gl_cv_func_wcwidth_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
+$as_echo "$gl_cv_func_wcwidth_works" >&6; }
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS wcwidth.$ac_objext"
+
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+
+ :
+
+ fi
+
+
+
+ GNULIB_WCWIDTH=1
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmalloc.$ac_objext"
+
+
+
+
+ :
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+ M4_LIBOBJS="$M4_LIBOBJS xmemdup0.$ac_objext"
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvprintf:1:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xfprintf:2:c-format"
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xvfprintf:2:c-format"
+
+
+
+
+ for ac_header in stdint.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
+if test "x$ac_cv_header_stdint_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STDINT_H 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+ :
+
+
+
+
+
+
+
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
+
+
+
+
+
+
+
+
+
+
+ gltests_libdeps=
+ gltests_ltlibdeps=
+
+
+
+
+
+
+
+
+
+ gl_source_base='tests/gnu'
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a turkish Unicode locale" >&5
+$as_echo_n "checking for a turkish Unicode locale... " >&6; }
+if test "${gt_cv_locale_tr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_tr_utf8" >&5
+$as_echo "$gt_cv_locale_tr_utf8" >&6; }
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+
+
+
+
+
+
+
+ for ac_func in getpagesize
+do :
+ ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
+if test "x$ac_cv_func_getpagesize" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETPAGESIZE 1
+_ACEOF
+
+fi
+done
+
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ for ac_header in OS.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
+if test "x$ac_cv_header_OS_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OS_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ for ac_header in sys/param.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
+if test "x$ac_cv_header_sys_param_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_SYS_PARAM_H 1
+_ACEOF
+
+fi
+
+done
+
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS getpagesize.$ac_objext"
+
+ ;;
+ esac
+
+
+
+ GNULIB_GETPAGESIZE=1
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
+$as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
+if test "${gl_cv_cc_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "mixed_endianness" >/dev/null 2>&1; then :
+ gl_cv_cc_double_expbit0="unknown"
+else
+
+ :
+if test "${ac_cv_c_bigendian+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_bigendian=unknown
+ # See if we're dealing with a universal compiler.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+ # Check for potential -arch flags. It is not universal unless
+ # there are at least two -arch flags with different values.
+ ac_arch=
+ ac_prev=
+ for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
+ if test -n "$ac_prev"; then
+ case $ac_word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
+ ac_arch=$ac_word
+ else
+ ac_cv_c_bigendian=universal
+ break
+ fi
+ ;;
+ esac
+ ac_prev=
+ elif test "x$ac_word" = "x-arch"; then
+ ac_prev=arch
+ fi
+ done
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if sys/param.h defines the BYTE_ORDER macro.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
+ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
+ && LITTLE_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+ #include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
+ bogus endian macros
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ # It does; now see whether it defined to _BIG_ENDIAN or not.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <limits.h>
+
+int
+main ()
+{
+#ifndef _BIG_ENDIAN
+ not big endian
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_c_bigendian=yes
+else
+ ac_cv_c_bigendian=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+ if test $ac_cv_c_bigendian = unknown; then
+ # Compile a test program.
+ if test "$cross_compiling" = yes; then :
+ # Try to guess by grepping values from an object file.
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+short int ascii_mm[] =
+ { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+ short int ascii_ii[] =
+ { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+ int use_ascii (int i) {
+ return ascii_mm[i] + ascii_ii[i];
+ }
+ short int ebcdic_ii[] =
+ { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+ short int ebcdic_mm[] =
+ { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+ int use_ebcdic (int i) {
+ return ebcdic_mm[i] + ebcdic_ii[i];
+ }
+ extern int foo;
+
+int
+main ()
+{
+return use_ascii (foo) == use_ebcdic (foo);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
+ ac_cv_c_bigendian=yes
+ fi
+ if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+ if test "$ac_cv_c_bigendian" = unknown; then
+ ac_cv_c_bigendian=no
+ else
+ # finding both strings is unlikely to happen, but who knows?
+ ac_cv_c_bigendian=unknown
+ fi
+ fi
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Are we little or big endian? From Harbison&Steele. */
+ union
+ {
+ long int l;
+ char c[sizeof (long int)];
+ } u;
+ u.l = 1;
+ return u.c[sizeof (long int) - 1] == 1;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ ac_cv_c_bigendian=no
+else
+ ac_cv_c_bigendian=yes
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+fi
+:
+ case $ac_cv_c_bigendian in #(
+ yes)
+ gl_cv_cc_double_expbit0="word 0 bit 20";; #(
+ no)
+ gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
+ universal)
+
+$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
+
+ ;; #(
+ *)
+ gl_cv_cc_double_expbit0="unknown" ;;
+ esac
+
+
+fi
+rm -f conftest*
+
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
+$as_echo "$gl_cv_cc_double_expbit0" >&6; }
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define DBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5
+$as_echo_n "checking where to find the exponent in a 'float'... " >&6; }
+if test "${gl_cv_cc_float_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ gl_cv_cc_float_expbit0="word 0 bit 23"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_float_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_float_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5
+$as_echo "$gl_cv_cc_float_expbit0" >&6; }
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define FLT_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
+$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
+if test "${gl_cv_cc_long_double_expbit0+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+
+ gl_cv_cc_long_double_expbit0="unknown"
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_cc_long_double_expbit0=`cat conftest.out`
+else
+ gl_cv_cc_long_double_expbit0="unknown"
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.out
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
+$as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_EXPBIT0_WORD $word
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define LDBL_EXPBIT0_BIT $bit
+_ACEOF
+
+ ;;
+ esac
+
+
+
+
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link handles trailing slash correctly" >&5
+$as_echo_n "checking whether link handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_link_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_link_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!link ("conftest.a", "conftest.b/")) return 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b")) return 2;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_link_works=yes
+else
+ gl_cv_func_link_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.a conftest.b conftest.lnk
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
+$as_echo "$gl_cv_func_link_works" >&6; }
+ if test "$gl_cv_func_link_works" != yes; then
+ REPLACE_LINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS link.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_LINK=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
+if test "x$ac_cv_func_mmap" = x""yes; then :
+ gl_have_mmap=yes
+else
+ gl_have_mmap=no
+fi
+
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
+$as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ if test $gl_have_mmap_anonymous != yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "I cant identify this map." >/dev/null 2>&1; then :
+
+$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
+
+ gl_have_mmap_anonymous=yes
+fi
+rm -f conftest*
+
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
+$as_echo "$gl_have_mmap_anonymous" >&6; }
+ if test $gl_have_mmap_anonymous = yes; then
+
+$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
+
+ fi
+ fi
+
+
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+
+ if test $ac_cv_func_obstack_printf = no ; then
+
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS obstack_printf.$ac_objext"
+
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+
+ fi
+
+
+
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+
+
+
+
+ GNULIB_OBSTACK_PRINTF=1
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+[
+ #if defined _MSC_VER || defined __MINGW32__
+ notposix
+ #endif
+ ]
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "notposix" >/dev/null 2>&1; then :
+ posix_spawn_ported=no
+else
+ posix_spawn_ported=yes
+fi
+rm -f conftest*
+
+ if test $posix_spawn_ported = yes; then
+ POSIX_SPAWN_PORTED_TRUE=
+ POSIX_SPAWN_PORTED_FALSE='#'
+else
+ POSIX_SPAWN_PORTED_TRUE='#'
+ POSIX_SPAWN_PORTED_FALSE=
+fi
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for putenv compatible with GNU and SVID" >&5
+$as_echo_n "checking for putenv compatible with GNU and SVID... " >&6; }
+if test "${gl_cv_func_svid_putenv+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_svid_putenv=no
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_svid_putenv=yes
+else
+ gl_cv_func_svid_putenv=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_svid_putenv" >&5
+$as_echo "$gl_cv_func_svid_putenv" >&6; }
+ if test $gl_cv_func_svid_putenv = no; then
+ REPLACE_PUTENV=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS putenv.$ac_objext"
+
+ fi
+
+
+
+ GNULIB_PUTENV=1
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+
+$as_echo "#define CHECK_SNPRINTF_POSIX 1" >>confdefs.h
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
+$as_echo_n "checking for wchar_t... " >&6; }
+if test "${gt_cv_c_wchar_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wchar_t=yes
+else
+ gt_cv_c_wchar_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
+$as_echo "$gt_cv_c_wchar_t" >&6; }
+ if test $gt_cv_c_wchar_t = yes; then
+
+$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
+
+ fi
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
+$as_echo_n "checking for wint_t... " >&6; }
+if test "${gt_cv_c_wint_t+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ gt_cv_c_wint_t=yes
+else
+ gt_cv_c_wint_t=no
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
+$as_echo "$gt_cv_c_wint_t" >&6; }
+ if test $gt_cv_c_wint_t = yes; then
+
+$as_echo "#define HAVE_WINT_T 1" >>confdefs.h
+
+ fi
+
+
+
+
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS strdup.$ac_objext"
+
+ else
+
+
+
+
+
+
+
+
+ for ac_func in strdup
+do :
+ ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup"
+if test "x$ac_cv_func_strdup" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRDUP 1
+_ACEOF
+
+else
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS $ac_func.$ac_objext"
+
+fi
+done
+
+
+ fi
+
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ :
+
+
+
+ GNULIB_STRDUP=1
+
+
+
+
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
+$as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
+if test "${gl_cv_func_symlink_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ gl_cv_func_symlink_works="guessing no"
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <unistd.h>
+
+int
+main ()
+{
+if (!symlink ("a", "conftest.link/")) return 1;
+ if (symlink ("conftest.f", "conftest.lnk2")) return 2;
+ if (!symlink ("a", "conftest.lnk2/")) return 3;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_symlink_works=yes
+else
+ gl_cv_func_symlink_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ rm -f conftest.f conftest.link conftest.lnk2
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
+$as_echo "$gl_cv_func_symlink_works" >&6; }
+ if test "$gl_cv_func_symlink_works" != yes; then
+ REPLACE_SYMLINK=1
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS symlink.$ac_objext"
+
+ fi
+ fi
+
+
+
+ GNULIB_SYMLINK=1
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
+$as_echo_n "checking for a traditional french locale... " >&6; }
+if test "${gt_cv_locale_fr+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
+$as_echo "$gt_cv_locale_fr" >&6; }
+ LOCALE_FR=$gt_cv_locale_fr
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
+$as_echo_n "checking for a french Unicode locale... " >&6; }
+if test "${gt_cv_locale_fr_utf8+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
+$as_echo "$gt_cv_locale_fr_utf8" >&6; }
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
+$as_echo_n "checking for a traditional japanese locale... " >&6; }
+if test "${gt_cv_locale_ja+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
+$as_echo "$gt_cv_locale_ja" >&6; }
+ LOCALE_JA=$gt_cv_locale_ja
+
+
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
+$as_echo_n "checking for a transitional chinese locale... " >&6; }
+if test "${gt_cv_locale_zh_CN+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+
+_ACEOF
+ if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
+ test $ac_status = 0; } && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
+$as_echo "$gt_cv_locale_zh_CN" >&6; }
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+
+
+
+
+
+
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wctob works" >&5
+$as_echo_n "checking whether wctob works... " >&6; }
+if test "${gl_cv_func_wctob_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+ if test $LOCALE_FR != none; then
+ if test "$cross_compiling" = yes; then :
+ :
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_wctob_works=yes
+else
+ gl_cv_func_wctob_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wctob_works" >&5
+$as_echo "$gl_cv_func_wctob_works" >&6; }
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+
+ :
+
+
+
+
+
+
+
+
+
+ M4tests_LIBOBJS="$M4tests_LIBOBJS wctob.$ac_objext"
+
+
+ :
+
+ else
+
+ ac_fn_c_check_decl "$LINENO" "wctob" "ac_cv_have_decl_wctob" "
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+"
+if test "x$ac_cv_have_decl_wctob" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_WCTOB $ac_have_decl
+_ACEOF
+
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+
+ :
+
+ fi
+ fi
+ fi
+
+
+
+ GNULIB_WCTOB=1
+
+
+
+
+
+
+
+
+
+
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+
+
+
+
+# Check whether --with-packager was given.
+if test "${with_packager+set}" = set; then :
+ withval=$with_packager; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+# Check whether --with-packager-version was given.
+if test "${with_packager_version+set}" = set; then :
+ withval=$with_packager_version; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER_VERSION "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+
+# Check whether --with-packager-bug-reports was given.
+if test "${with_packager_bug_reports+set}" = set; then :
+ withval=$with_packager_bug_reports; case $withval in
+ yes|no) ;;
+ *)
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
+_ACEOF
+ ;;
+ esac
+
+fi
+
+
+ if test "X$with_packager" = "X" && \
+ test "X$with_packager_version$with_packager_bug_reports" != "X"
+ then
+ as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
+ fi
+
+
+# Gnulib doesn't always do things quite the way M4 would like...
+
+
+for ac_header in error.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "error.h" "ac_cv_header_error_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_error_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_ERROR_H 1
+_ACEOF
+ ERROR_H=""
+else
+ ERROR_H="error.h"
+fi
+
+done
+
+
+
+if test $ac_cv_header_error_h = yes; then
+ INCLUDE_ERROR_H='#include <error.h>'
+else
+ INCLUDE_ERROR_H='#include <gnu/error.h>'
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ if test $gl_cv_have_include_next = yes; then
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
+$as_echo_n "checking absolute name of <getopt.h>... " >&6; }
+if test "${gl_cv_next_getopt_h+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test $ac_cv_header_getopt_h = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+
+_ACEOF
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
+ sed -n '\#/getopt.h#{
+ s#.*"\(.*/getopt.h\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'
+ else
+ gl_cv_next_getopt_h='<'getopt.h'>'
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
+$as_echo "$gl_cv_next_getopt_h" >&6; }
+ fi
+ NEXT_GETOPT_H=$gl_cv_next_getopt_h
+
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'getopt.h'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=$gl_cv_next_getopt_h
+ fi
+ NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
+
+
+
+
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+
+
+ gl_replace_getopt=
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_header in getopt.h
+do :
+ ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
+if test "x$ac_cv_header_getopt_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETOPT_H 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ for ac_func in getopt_long_only
+do :
+ ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
+if test "x$ac_cv_func_getopt_long_only" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GETOPT_LONG_ONLY 1
+_ACEOF
+
+else
+ gl_replace_getopt=yes
+fi
+done
+
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ ac_fn_c_check_decl "$LINENO" "optreset" "ac_cv_have_decl_optreset" "#include <getopt.h>
+"
+if test "x$ac_cv_have_decl_optreset" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_OPTRESET $ac_have_decl
+_ACEOF
+
+ fi
+
+ if test -z "$gl_replace_getopt"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
+$as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
+if test "${gl_cv_func_getopt_posix+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+
+ if test "$cross_compiling" = yes; then :
+ case "$host_os" in
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !HAVE_DECL_OPTRESET
+# define OPTIND_MIN 0
+#else
+# define OPTIND_MIN 1
+#endif
+
+int
+main ()
+{
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (argc, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ }
+ /* Some internal state exists at this point. */
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ }
+
+ return 0;
+}
+
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_posix=yes
+else
+ gl_cv_func_getopt_posix=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
+$as_echo "$gl_cv_func_getopt_posix" >&6; }
+ case "$gl_cv_func_getopt_posix" in
+ *no) gl_replace_getopt=yes ;;
+ esac
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
+$as_echo_n "checking for working GNU getopt function... " >&6; }
+if test "${gl_cv_func_getopt_gnu+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+ # optstring is necessary for programs like m4 that have POSIX-mandated
+ # semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
+ gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+ if test "$cross_compiling" = yes; then :
+ case $host_os:$ac_cv_have_decl_optreset in
+ *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+ *:yes) gl_cv_func_getopt_gnu=no;;
+ *) gl_cv_func_getopt_gnu=yes;;
+ esac
+
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+
+int
+main ()
+{
+
+ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+ and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ OSF/1 5.1, Solaris 10. */
+ {
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ opterr = 0;
+ if (getopt (2, myargv, "+a") != '?')
+ return 1;
+ }
+ /* This code succeeds on glibc 2.8, mingw,
+ and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ {
+ char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+ optind = 1;
+ if (getopt (4, argv, "p::") != 'p')
+ return 2;
+ if (optarg != NULL)
+ return 3;
+ if (getopt (4, argv, "p::") != -1)
+ return 4;
+ if (optind != 2)
+ return 5;
+ }
+ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
+ {
+ char *argv[] = { "program", "foo", "-p", NULL };
+ optind = 0;
+ if (getopt (3, argv, "-p") != 1)
+ return 6;
+ if (getopt (3, argv, "-p") != 'p')
+ return 7;
+ }
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ gl_cv_func_getopt_gnu=yes
+else
+ gl_cv_func_getopt_gnu=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+ if test "$gl_had_POSIXLY_CORRECT" != yes; then
+ { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}
+ fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
+$as_echo "$gl_cv_func_getopt_gnu" >&6; }
+ if test "$gl_cv_func_getopt_gnu" = "no"; then
+ gl_replace_getopt=yes
+ fi
+ fi
+
+ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
+if test "x$ac_cv_have_decl_getenv" = x""yes; then :
+ ac_have_decl=1
+else
+ ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_GETENV $ac_have_decl
+_ACEOF
+
+
+
+
+
+
+ if test -n "$gl_replace_getopt"; then :
+
+
+
+ GETOPT_H=getopt.h
+
+$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
+
+
+
+ GNULIB_UNISTD_H_GETOPT=1
+ M4_replace_getopt=:
+ M4_replace_getopt=:
+
+
+
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+ if test -n "$M4_replace_getopt"; then
+ GETOPT_TRUE=
+ GETOPT_FALSE='#'
+else
+ GETOPT_TRUE='#'
+ GETOPT_FALSE=
+fi
+
+
+
+
+# Check whether --with-included-obstack was given.
+if test "${with_included_obstack+set}" = set; then :
+ withval=$with_included_obstack;
+fi
+
+
+for ac_header in obstack.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "obstack.h" "ac_cv_header_obstack_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_obstack_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_OBSTACK_H 1
+_ACEOF
+
+fi
+
+done
+
+
+if test "x${with_included_obstack-no}" != xno; then
+ ac_cv_func_obstack=no
+fi
+
+OBSTACK_H=
+if test $ac_cv_func_obstack = yes; then
+ INCLUDE_OBSTACK_H='#include <obstack.h>'
+else
+ INCLUDE_OBSTACK_H='#include <gnu/obstack.h>'
+ OBSTACK_H=obstack.h
+fi
+
+
+
+
+if test $ac_use_included_regex = no; then
+ INCLUDE_REGEX_H='#include <regex.h>'
+ REGEX_H=
+else
+ INCLUDE_REGEX_H='#include <gnu/regex.h>'
+ REGEX_H=regex.h
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether an open file can be renamed" >&5
+$as_echo_n "checking whether an open file can be renamed... " >&6; }
+if test "${M4_cv_func_rename_open_file_works+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then :
+ M4_cv_func_rename_open_file_works='guessing no'
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+FILE *f = fopen ("conftest.1", "w+");
+ int result = rename ("conftest.1", "conftest.2");
+ fclose (f); remove ("conftest.1"); remove ("conftest.2");
+ return result;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_run "$LINENO"; then :
+ M4_cv_func_rename_open_file_works=yes
+else
+ M4_cv_func_rename_open_file_works=no
+fi
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
+ conftest.$ac_objext conftest.beam conftest.$ac_ext
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_func_rename_open_file_works" >&5
+$as_echo "$M4_cv_func_rename_open_file_works" >&6; }
+if test "$M4_cv_func_rename_open_file_works" = yes ; then
+ M4_rename_open_works=1
+else
+ M4_rename_open_works=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define RENAME_OPEN_FILE_WORKS $M4_rename_open_works
+_ACEOF
+
+
+
+
+## ------------------------ ##
+## Other external programs. ##
+## ------------------------ ##
+# Extract the first word of "perl", so it can be a program name with args.
+set dummy perl; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PERL+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ case $PERL in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PERL="$PERL" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PERL=$ac_cv_path_PERL
+if test -n "$PERL"; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5
+$as_echo "$PERL" >&6; }
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+
+
+## --------------------------- ##
+## C compiler characteristics. ##
+## --------------------------- ##
+ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
+if test "x$ac_cv_type_size_t" = x""yes; then :
+
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5
+$as_echo_n "checking size of long long int... " >&6; }
+if test "${ac_cv_sizeof_long_long_int+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then :
+
+else
+ if test "$ac_cv_type_long_long_int" = yes; then
+ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error 77 "cannot compute sizeof (long long int)
+See \`config.log' for more details" "$LINENO" 5 ; }
+ else
+ ac_cv_sizeof_long_long_int=0
+ fi
+fi
+
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5
+$as_echo "$ac_cv_sizeof_long_long_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int
+_ACEOF
+
+
+
+
+
+## ------------------------- ##
+## C headers required by M4. ##
+## ------------------------- ##
+
+
+
+
+if test $ac_cv_header_stdbool_h = yes; then
+ INCLUDE_STDBOOL_H='#include <stdbool.h>'
+else
+ INCLUDE_STDBOOL_H='#include <gnu/stdbool.h>'
+fi
+
+
+
+
+## --------------------------------- ##
+## Library functions required by M4. ##
+## --------------------------------- ##
+
+
+
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5
+$as_echo_n "checking if malloc debugging is wanted... " >&6; }
+
+# Check whether --with-dmalloc was given.
+if test "${with_dmalloc+set}" = set; then :
+ withval=$with_dmalloc; if test "$withval" = yes; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
+$as_echo "yes" >&6; }
+
+$as_echo "#define WITH_DMALLOC 1" >>confdefs.h
+
+ LIBS="$LIBS -ldmalloc"
+ LDFLAGS="$LDFLAGS -g"
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
+$as_echo_n "checking return type of signal handlers... " >&6; }
+if test "${ac_cv_type_signal+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <signal.h>
+
+int
+main ()
+{
+return *(signal (0, 0)) (0) == 1;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_type_signal=int
+else
+ ac_cv_type_signal=void
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
+$as_echo "$ac_cv_type_signal" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define RETSIGTYPE $ac_cv_type_signal
+_ACEOF
+
+
+
+
+
+
+
+
+
+
+
+ac_fn_c_check_member "$LINENO" "stack_t" "ss_sp" "ac_cv_member_stack_t_ss_sp" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_member_stack_t_ss_sp" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STACK_T_SS_SP 1
+_ACEOF
+
+
+fi
+
+
+# Code from Jim Avera <jima@netcom.com>.
+# stackovf.c requires:
+# 1. Either sigaction with SA_ONSTACK, or sigvec with SV_ONSTACK
+# 2. Either sigaltstack or sigstack
+# 3. getrlimit, including support for RLIMIT_STACK
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if stack overflow is detectable" >&5
+$as_echo_n "checking if stack overflow is detectable... " >&6; }
+if test "${M4_cv_use_stackovf+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ M4_cv_use_stackovf=no
+if test "$ac_cv_func_sigaction" = yes || test "$ac_cv_func_sigvec" = yes; then
+ if test "$ac_cv_func_sigaltstack" = yes || test "$ac_cv_func_sigstack" = yes; then
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <signal.h>
+
+int
+main ()
+{
+struct rlimit r; getrlimit (RLIMIT_STACK, &r);
+#if (!defined HAVE_SIGACTION || !defined SA_ONSTACK) \
+ && (!defined HAVE_SIGVEC || !defined SV_ONSTACK)
+choke me /* SA_ONSTACK and/or SV_ONSTACK are not defined */
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ M4_cv_use_stackovf=yes
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $M4_cv_use_stackovf" >&5
+$as_echo "$M4_cv_use_stackovf" >&6; }
+
+ if test "$M4_cv_use_stackovf" = yes; then
+ STACKOVF_TRUE=
+ STACKOVF_FALSE='#'
+else
+ STACKOVF_TRUE='#'
+ STACKOVF_FALSE=
+fi
+
+if test "$M4_cv_use_stackovf" = yes; then
+
+$as_echo "#define USE_STACKOVF 1" >>confdefs.h
+
+ ac_fn_c_check_type "$LINENO" "rlim_t" "ac_cv_type_rlim_t" "#include <sys/resource.h>
+
+"
+if test "x$ac_cv_type_rlim_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_RLIM_T 1
+_ACEOF
+
+
+else
+
+$as_echo "#define rlim_t int" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "stack_t" "ac_cv_type_stack_t" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_stack_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STACK_T 1
+_ACEOF
+
+
+else
+
+$as_echo "#define stack_t struct sigaltstack" >>confdefs.h
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "sigcontext" "ac_cv_type_sigcontext" "#include <signal.h>
+
+"
+if test "x$ac_cv_type_sigcontext" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGCONTEXT 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" "#include <signal.h>
+#if HAVE_SIGINFO_H
+# include <siginfo.h>
+#endif
+
+"
+if test "x$ac_cv_type_siginfo_t" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_SIGINFO_T 1
+_ACEOF
+
+
+fi
+
+ ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h>
+
+"
+if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = x""yes; then :
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1
+_ACEOF
+
+
+fi
+
+
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <signal.h>
+
+int
+main ()
+{
+struct sigaltstack x; x.ss_base = 0;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+
+$as_echo "#define ss_sp ss_base" >>confdefs.h
+
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+# This is for the modules
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_compile "$LINENO"; then :
+ ac_cv_struct_tm=time.h
+else
+ ac_cv_struct_tm=sys/time.h
+fi
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+$as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
+
+fi
+
+for ac_func in strftime
+do :
+ ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime"
+if test "x$ac_cv_func_strftime" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_STRFTIME 1
+_ACEOF
+
+else
+ # strftime is in -lintl on SCO UNIX.
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for strftime in -lintl" >&5
+$as_echo_n "checking for strftime in -lintl... " >&6; }
+if test "${ac_cv_lib_intl_strftime+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lintl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char strftime ();
+int
+main ()
+{
+return strftime ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_intl_strftime=yes
+else
+ ac_cv_lib_intl_strftime=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_intl_strftime" >&5
+$as_echo "$ac_cv_lib_intl_strftime" >&6; }
+if test "x$ac_cv_lib_intl_strftime" = x""yes; then :
+ $as_echo "#define HAVE_STRFTIME 1" >>confdefs.h
+
+LIBS="-lintl $LIBS"
+fi
+
+fi
+done
+
+
+
+
+
+
+
+
+
+
+## ------------------ ##
+## Configure options. ##
+## ------------------ ##
+
+for ac_header in gmp.h
+do :
+ ac_fn_c_check_header_compile "$LINENO" "gmp.h" "ac_cv_header_gmp_h" "$ac_includes_default
+"
+if test "x$ac_cv_header_gmp_h" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_GMP_H 1
+_ACEOF
+
+fi
+
+done
+
+
+# Some versions of gmp provide mpq_init as a macro, so we need to
+# include the header file, otherwise the detection will fail.
+M4_gmp_save_LIBS="$LIBS"
+LIBS="$LIBS -lgmp"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#if HAVE_GMP_H
+# include <gmp.h>
+#endif
+int
+main ()
+{
+mpq_t n; mpq_init (n);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ LIBADD_GMP=-lgmp
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$M4_gmp_save_LIBS
+
+
+
+# Check whether --with-gmp was given.
+if test "${with_gmp+set}" = set; then :
+ withval=$with_gmp; use_gmp=$withval
+else
+ use_gmp=yes
+fi
+
+
+case $use_gmp:$LIBADD_GMP:$ac_cv_header_gmp_h in
+ no:*)
+ M4_cv_using_lib_gmp=no
+ ;;
+ *::yes)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&5
+$as_echo "$as_me: WARNING: gmp library not found or does not appear to work
+ but \`gmp.h' is present" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ *:-lgmp:no)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gmp works but \`gmp.h' is missing" >&5
+$as_echo "$as_me: WARNING: gmp works but \`gmp.h' is missing" >&2;}
+ M4_cv_using_lib_gmp=no
+ ;;
+ yes:*:yes)
+ M4_cv_using_lib_gmp=yes
+ ;;
+ *)
+ M4_cv_using_lib_gmp=no
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not detect gmp library" >&5
+$as_echo "$as_me: WARNING: could not detect gmp library" >&2;}
+ ;;
+esac
+
+
+# Don't try to link in libgmp if we are not using it after the last call
+if test "$M4_cv_using_lib_gmp" = yes; then
+
+$as_echo "#define USE_GMP 1" >>confdefs.h
+
+fi
+
+USE_GMP=$M4_cv_using_lib_gmp
+
+
+ if test "x$USE_GMP" = xyes; then
+ USE_GMP_TRUE=
+ USE_GMP_FALSE='#'
+else
+ USE_GMP_TRUE='#'
+ USE_GMP_FALSE=
+fi
+
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking which shell to use for syscmd" >&5
+$as_echo_n "checking which shell to use for syscmd... " >&6; }
+
+# Check whether --with-syscmd-shell was given.
+if test "${with_syscmd_shell+set}" = set; then :
+ withval=$with_syscmd_shell; case $withval in
+ yes) with_syscmd_shell=no;;
+ esac
+else
+ with_syscmd_shell=no
+fi
+
+if test "$with_syscmd_shell" = no ; then
+ with_syscmd_shell=/bin/sh
+ if test "$cross_compiling" != yes ; then
+ if { test -f /bin/sh && $as_test_x /bin/sh; }; then :
+
+else
+ if (cmd /c) 2>/dev/null; then with_syscmd_shell=cmd; fi
+fi
+ M4_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+ for M4_dir in `if (command -p getconf PATH) 2>/dev/null ; then
+ command -p getconf PATH
+ else
+ echo "/bin$PATH_SEPARATOR$PATH"
+ fi`
+ do
+ IFS=$M4_save_IFS
+ test -z "$M4_dir" && continue
+ { test -f "$M4_dir/sh" && $as_test_x "$M4_dir/sh"; } \
+ && { with_syscmd_shell=$M4_dir/sh; break; }
+ done
+ IFS=$M4_save_IFS
+ fi
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_syscmd_shell" >&5
+$as_echo "$with_syscmd_shell" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define M4_SYSCMD_SHELL "$with_syscmd_shell"
+_ACEOF
+
+
+
+
+## -------- ##
+## Outputs. ##
+## -------- ##
+ac_config_files="$ac_config_files Makefile gnu/Makefile doc/Makefile m4/system.h:m4/system_.h tests/atlocal tests/gnu/Makefile"
+
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) { eval $ac_var=; unset $ac_var;} ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes: double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \.
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+U=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+ if test -n "$EXEEXT"; then
+ am__EXEEXT_TRUE=
+ am__EXEEXT_FALSE='#'
+else
+ am__EXEEXT_TRUE='#'
+ am__EXEEXT_FALSE=
+fi
+
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+ as_fn_error $? "conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+ as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${INSTALL_LTDL_TRUE}" && test -z "${INSTALL_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"INSTALL_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${CONVENIENCE_LTDL_TRUE}" && test -z "${CONVENIENCE_LTDL_FALSE}"; then
+ as_fn_error $? "conditional \"CONVENIENCE_LTDL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+LT_CONFIG_H=gnu/config.h
+
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ ltdl_LIBOBJS=$_ltdl_libobjs
+
+ ltdl_LTLIBOBJS=$_ltdl_ltlibobjs
+
+
+if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
+ as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=
+
+
+CONFIG_INCLUDE=gnu/config.h
+
+
+ M4_libobjs=
+ M4_ltlibobjs=
+ if test -n "$M4_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4_libobjs="$M4_libobjs $i.$ac_objext"
+ M4_ltlibobjs="$M4_ltlibobjs $i.lo"
+ done
+ fi
+ M4_LIBOBJS=$M4_libobjs
+
+ M4_LTLIBOBJS=$M4_ltlibobjs
+
+
+
+if test -z "${POSIX_SPAWN_PORTED_TRUE}" && test -z "${POSIX_SPAWN_PORTED_FALSE}"; then
+ as_fn_error $? "conditional \"POSIX_SPAWN_PORTED\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+ M4tests_libobjs=
+ M4tests_ltlibobjs=
+ if test -n "$M4tests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
+ M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
+ done
+ fi
+ M4tests_LIBOBJS=$M4tests_libobjs
+
+ M4tests_LTLIBOBJS=$M4tests_ltlibobjs
+
+
+if test -z "${GETOPT_TRUE}" && test -z "${GETOPT_FALSE}"; then
+ as_fn_error $? "conditional \"GETOPT\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${STACKOVF_TRUE}" && test -z "${STACKOVF_FALSE}"; then
+ as_fn_error $? "conditional \"STACKOVF\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+if test -z "${USE_GMP_TRUE}" && test -z "${USE_GMP_FALSE}"; then
+ as_fn_error $? "conditional \"USE_GMP\" was never defined.
+Usually this means the macro was only invoked conditionally." "$LINENO" 5
+fi
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+as_write_fail=0
+cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+
+SHELL=\${CONFIG_SHELL-$SHELL}
+export SHELL
+_ASEOF
+cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
+## -------------------- ##
+## M4sh Initialization. ##
+## -------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in #(
+ *posix*) :
+ set -o posix ;; #(
+ *) :
+ ;;
+esac
+fi
+
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+# Prefer a ksh shell builtin over an external printf program on Solaris,
+# but without wasting forks for bash or zsh.
+if test -z "$BASH_VERSION$ZSH_VERSION" \
+ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='print -r --'
+ as_echo_n='print -rn --'
+elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in #(
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in #((
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+ done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ exit 1
+fi
+
+# Unset variables that we do not need and which cause bugs (e.g. in
+# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
+# suppresses any "Segmentation fault" message there. '((' could
+# trigger a bug in pdksh 5.2.14.
+for as_var in BASH_ENV ENV MAIL MAILPATH
+do eval test x\${$as_var+set} = xset \
+ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# CDPATH.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
+# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
+# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
+# script with STATUS, using 1 if that was 0.
+as_fn_error ()
+{
+ as_status=$1; test $as_status -eq 0 && as_status=1
+ if test "$4"; then
+ as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+ $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
+ fi
+ $as_echo "$as_me: error: $2" >&2
+ as_fn_exit $as_status
+} # as_fn_error
+
+
+# as_fn_set_status STATUS
+# -----------------------
+# Set $? to STATUS, without forking.
+as_fn_set_status ()
+{
+ return $1
+} # as_fn_set_status
+
+# as_fn_exit STATUS
+# -----------------
+# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
+as_fn_exit ()
+{
+ set +e
+ as_fn_set_status $1
+ exit $1
+} # as_fn_exit
+
+# as_fn_unset VAR
+# ---------------
+# Portably unset VAR.
+as_fn_unset ()
+{
+ { eval $1=; unset $1;}
+}
+as_unset=as_fn_unset
+# as_fn_append VAR VALUE
+# ----------------------
+# Append the text in VALUE to the end of the definition contained in VAR. Take
+# advantage of any shell optimizations that allow amortized linear growth over
+# repeated appends, instead of the typical quadratic growth present in naive
+# implementations.
+if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
+ eval 'as_fn_append ()
+ {
+ eval $1+=\$2
+ }'
+else
+ as_fn_append ()
+ {
+ eval $1=\$$1\$2
+ }
+fi # as_fn_append
+
+# as_fn_arith ARG...
+# ------------------
+# Perform arithmetic evaluation on the ARGs, and store the result in the
+# global $as_val. Take advantage of shells that can avoid forks. The arguments
+# must be portable across $(()) and expr.
+if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
+ eval 'as_fn_arith ()
+ {
+ as_val=$(( $* ))
+ }'
+else
+ as_fn_arith ()
+ {
+ as_val=`expr "$@" || test $? -eq 1`
+ }
+fi # as_fn_arith
+
+
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in #(((((
+-n*)
+ case `echo 'xy\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ xy) ECHO_C='\c';;
+ *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
+ ECHO_T=' ';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+
+# as_fn_mkdir_p
+# -------------
+# Create "$as_dir" as a directory, including parents if necessary.
+as_fn_mkdir_p ()
+{
+
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || eval $as_mkdir_p || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
+
+
+} # as_fn_mkdir_p
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p='mkdir -p "$as_dir"'
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in #(
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+## ----------------------------------- ##
+## Main body of $CONFIG_STATUS script. ##
+## ----------------------------------- ##
+_ASEOF
+test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# Save the log message, to keep $0 and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by GNU M4 $as_me 1.9a.577-b3131-dirty, which was
+generated by GNU Autoconf 2.67. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_links="$ac_config_links"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files and other configuration actions
+from templates according to the current configuration. Unless the files
+and actions are specified as TAGs, all are instantiated by default.
+
+Usage: $0 [OPTION]... [TAG]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ --config print configuration, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration links:
+$config_links
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-m4@gnu.org>.
+GNU M4 home page: <http://www.gnu.org/software/m4/>.
+General help using GNU software: <http://www.gnu.org/gethelp/>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
+ac_cs_version="\\
+GNU M4 config.status 1.9a.577-b3131-dirty
+configured by $0, generated by GNU Autoconf 2.67,
+ with options \\"\$ac_cs_config\\"
+
+Copyright (C) 2010 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+AWK='$AWK'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=?*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ --*=)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --config | --confi | --conf | --con | --co | --c )
+ $as_echo "$ac_cs_config"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ '') as_fn_error $? "missing file argument" ;;
+ esac
+ as_fn_append CONFIG_FILES " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append CONFIG_HEADERS " '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ as_fn_error $? "ambiguous option: \`$1'
+Try \`$0 --help' for more information.";;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) as_fn_error $? "unrecognized option: \`$1'
+Try \`$0 --help' for more information." ;;
+
+ *) as_fn_append ac_config_targets " $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+enable_shared='`$ECHO "X$enable_shared" | $Xsed -e "$delay_single_quote_subst"`'
+SED='`$ECHO "X$SED" | $Xsed -e "$delay_single_quote_subst"`'
+Xsed='`$ECHO "X$Xsed" | $Xsed -e "$delay_single_quote_subst"`'
+macro_version='`$ECHO "X$macro_version" | $Xsed -e "$delay_single_quote_subst"`'
+macro_revision='`$ECHO "X$macro_revision" | $Xsed -e "$delay_single_quote_subst"`'
+AS='`$ECHO "X$AS" | $Xsed -e "$delay_single_quote_subst"`'
+DLLTOOL='`$ECHO "X$DLLTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OBJDUMP='`$ECHO "X$OBJDUMP" | $Xsed -e "$delay_single_quote_subst"`'
+enable_static='`$ECHO "X$enable_static" | $Xsed -e "$delay_single_quote_subst"`'
+pic_mode='`$ECHO "X$pic_mode" | $Xsed -e "$delay_single_quote_subst"`'
+enable_fast_install='`$ECHO "X$enable_fast_install" | $Xsed -e "$delay_single_quote_subst"`'
+host_alias='`$ECHO "X$host_alias" | $Xsed -e "$delay_single_quote_subst"`'
+host='`$ECHO "X$host" | $Xsed -e "$delay_single_quote_subst"`'
+host_os='`$ECHO "X$host_os" | $Xsed -e "$delay_single_quote_subst"`'
+build_alias='`$ECHO "X$build_alias" | $Xsed -e "$delay_single_quote_subst"`'
+build='`$ECHO "X$build" | $Xsed -e "$delay_single_quote_subst"`'
+build_os='`$ECHO "X$build_os" | $Xsed -e "$delay_single_quote_subst"`'
+GREP='`$ECHO "X$GREP" | $Xsed -e "$delay_single_quote_subst"`'
+EGREP='`$ECHO "X$EGREP" | $Xsed -e "$delay_single_quote_subst"`'
+FGREP='`$ECHO "X$FGREP" | $Xsed -e "$delay_single_quote_subst"`'
+LD='`$ECHO "X$LD" | $Xsed -e "$delay_single_quote_subst"`'
+NM='`$ECHO "X$NM" | $Xsed -e "$delay_single_quote_subst"`'
+LN_S='`$ECHO "X$LN_S" | $Xsed -e "$delay_single_quote_subst"`'
+max_cmd_len='`$ECHO "X$max_cmd_len" | $Xsed -e "$delay_single_quote_subst"`'
+ac_objext='`$ECHO "X$ac_objext" | $Xsed -e "$delay_single_quote_subst"`'
+exeext='`$ECHO "X$exeext" | $Xsed -e "$delay_single_quote_subst"`'
+lt_unset='`$ECHO "X$lt_unset" | $Xsed -e "$delay_single_quote_subst"`'
+lt_SP2NL='`$ECHO "X$lt_SP2NL" | $Xsed -e "$delay_single_quote_subst"`'
+lt_NL2SP='`$ECHO "X$lt_NL2SP" | $Xsed -e "$delay_single_quote_subst"`'
+reload_flag='`$ECHO "X$reload_flag" | $Xsed -e "$delay_single_quote_subst"`'
+reload_cmds='`$ECHO "X$reload_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+deplibs_check_method='`$ECHO "X$deplibs_check_method" | $Xsed -e "$delay_single_quote_subst"`'
+file_magic_cmd='`$ECHO "X$file_magic_cmd" | $Xsed -e "$delay_single_quote_subst"`'
+AR='`$ECHO "X$AR" | $Xsed -e "$delay_single_quote_subst"`'
+AR_FLAGS='`$ECHO "X$AR_FLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+STRIP='`$ECHO "X$STRIP" | $Xsed -e "$delay_single_quote_subst"`'
+RANLIB='`$ECHO "X$RANLIB" | $Xsed -e "$delay_single_quote_subst"`'
+old_postinstall_cmds='`$ECHO "X$old_postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_postuninstall_cmds='`$ECHO "X$old_postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_cmds='`$ECHO "X$old_archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+CC='`$ECHO "X$CC" | $Xsed -e "$delay_single_quote_subst"`'
+CFLAGS='`$ECHO "X$CFLAGS" | $Xsed -e "$delay_single_quote_subst"`'
+compiler='`$ECHO "X$compiler" | $Xsed -e "$delay_single_quote_subst"`'
+GCC='`$ECHO "X$GCC" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_pipe='`$ECHO "X$lt_cv_sys_global_symbol_pipe" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_cdecl='`$ECHO "X$lt_cv_sys_global_symbol_to_cdecl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "X$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+objdir='`$ECHO "X$objdir" | $Xsed -e "$delay_single_quote_subst"`'
+SHELL='`$ECHO "X$SHELL" | $Xsed -e "$delay_single_quote_subst"`'
+ECHO='`$ECHO "X$ECHO" | $Xsed -e "$delay_single_quote_subst"`'
+MAGIC_CMD='`$ECHO "X$MAGIC_CMD" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_no_builtin_flag='`$ECHO "X$lt_prog_compiler_no_builtin_flag" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_wl='`$ECHO "X$lt_prog_compiler_wl" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_pic='`$ECHO "X$lt_prog_compiler_pic" | $Xsed -e "$delay_single_quote_subst"`'
+lt_prog_compiler_static='`$ECHO "X$lt_prog_compiler_static" | $Xsed -e "$delay_single_quote_subst"`'
+lt_cv_prog_compiler_c_o='`$ECHO "X$lt_cv_prog_compiler_c_o" | $Xsed -e "$delay_single_quote_subst"`'
+need_locks='`$ECHO "X$need_locks" | $Xsed -e "$delay_single_quote_subst"`'
+DSYMUTIL='`$ECHO "X$DSYMUTIL" | $Xsed -e "$delay_single_quote_subst"`'
+NMEDIT='`$ECHO "X$NMEDIT" | $Xsed -e "$delay_single_quote_subst"`'
+LIPO='`$ECHO "X$LIPO" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL='`$ECHO "X$OTOOL" | $Xsed -e "$delay_single_quote_subst"`'
+OTOOL64='`$ECHO "X$OTOOL64" | $Xsed -e "$delay_single_quote_subst"`'
+libext='`$ECHO "X$libext" | $Xsed -e "$delay_single_quote_subst"`'
+shrext_cmds='`$ECHO "X$shrext_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+extract_expsyms_cmds='`$ECHO "X$extract_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds_need_lc='`$ECHO "X$archive_cmds_need_lc" | $Xsed -e "$delay_single_quote_subst"`'
+enable_shared_with_static_runtimes='`$ECHO "X$enable_shared_with_static_runtimes" | $Xsed -e "$delay_single_quote_subst"`'
+export_dynamic_flag_spec='`$ECHO "X$export_dynamic_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+whole_archive_flag_spec='`$ECHO "X$whole_archive_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+compiler_needs_object='`$ECHO "X$compiler_needs_object" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_new_cmds='`$ECHO "X$old_archive_from_new_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+old_archive_from_expsyms_cmds='`$ECHO "X$old_archive_from_expsyms_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_cmds='`$ECHO "X$archive_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+archive_expsym_cmds='`$ECHO "X$archive_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_cmds='`$ECHO "X$module_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+module_expsym_cmds='`$ECHO "X$module_expsym_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+with_gnu_ld='`$ECHO "X$with_gnu_ld" | $Xsed -e "$delay_single_quote_subst"`'
+allow_undefined_flag='`$ECHO "X$allow_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+no_undefined_flag='`$ECHO "X$no_undefined_flag" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec='`$ECHO "X$hardcode_libdir_flag_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_flag_spec_ld='`$ECHO "X$hardcode_libdir_flag_spec_ld" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_libdir_separator='`$ECHO "X$hardcode_libdir_separator" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct='`$ECHO "X$hardcode_direct" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_direct_absolute='`$ECHO "X$hardcode_direct_absolute" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_minus_L='`$ECHO "X$hardcode_minus_L" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_shlibpath_var='`$ECHO "X$hardcode_shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_automatic='`$ECHO "X$hardcode_automatic" | $Xsed -e "$delay_single_quote_subst"`'
+inherit_rpath='`$ECHO "X$inherit_rpath" | $Xsed -e "$delay_single_quote_subst"`'
+link_all_deplibs='`$ECHO "X$link_all_deplibs" | $Xsed -e "$delay_single_quote_subst"`'
+fix_srcfile_path='`$ECHO "X$fix_srcfile_path" | $Xsed -e "$delay_single_quote_subst"`'
+always_export_symbols='`$ECHO "X$always_export_symbols" | $Xsed -e "$delay_single_quote_subst"`'
+export_symbols_cmds='`$ECHO "X$export_symbols_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+exclude_expsyms='`$ECHO "X$exclude_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+include_expsyms='`$ECHO "X$include_expsyms" | $Xsed -e "$delay_single_quote_subst"`'
+prelink_cmds='`$ECHO "X$prelink_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+file_list_spec='`$ECHO "X$file_list_spec" | $Xsed -e "$delay_single_quote_subst"`'
+variables_saved_for_relink='`$ECHO "X$variables_saved_for_relink" | $Xsed -e "$delay_single_quote_subst"`'
+need_lib_prefix='`$ECHO "X$need_lib_prefix" | $Xsed -e "$delay_single_quote_subst"`'
+need_version='`$ECHO "X$need_version" | $Xsed -e "$delay_single_quote_subst"`'
+version_type='`$ECHO "X$version_type" | $Xsed -e "$delay_single_quote_subst"`'
+runpath_var='`$ECHO "X$runpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_var='`$ECHO "X$shlibpath_var" | $Xsed -e "$delay_single_quote_subst"`'
+shlibpath_overrides_runpath='`$ECHO "X$shlibpath_overrides_runpath" | $Xsed -e "$delay_single_quote_subst"`'
+libname_spec='`$ECHO "X$libname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+library_names_spec='`$ECHO "X$library_names_spec" | $Xsed -e "$delay_single_quote_subst"`'
+soname_spec='`$ECHO "X$soname_spec" | $Xsed -e "$delay_single_quote_subst"`'
+postinstall_cmds='`$ECHO "X$postinstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+postuninstall_cmds='`$ECHO "X$postuninstall_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_cmds='`$ECHO "X$finish_cmds" | $Xsed -e "$delay_single_quote_subst"`'
+finish_eval='`$ECHO "X$finish_eval" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_into_libs='`$ECHO "X$hardcode_into_libs" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_search_path_spec='`$ECHO "X$sys_lib_search_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+sys_lib_dlsearch_path_spec='`$ECHO "X$sys_lib_dlsearch_path_spec" | $Xsed -e "$delay_single_quote_subst"`'
+hardcode_action='`$ECHO "X$hardcode_action" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen='`$ECHO "X$enable_dlopen" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self='`$ECHO "X$enable_dlopen_self" | $Xsed -e "$delay_single_quote_subst"`'
+enable_dlopen_self_static='`$ECHO "X$enable_dlopen_self_static" | $Xsed -e "$delay_single_quote_subst"`'
+old_striplib='`$ECHO "X$old_striplib" | $Xsed -e "$delay_single_quote_subst"`'
+striplib='`$ECHO "X$striplib" | $Xsed -e "$delay_single_quote_subst"`'
+
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in SED \
+GREP \
+EGREP \
+FGREP \
+LD \
+NM \
+LN_S \
+lt_SP2NL \
+lt_NL2SP \
+reload_flag \
+deplibs_check_method \
+file_magic_cmd \
+AR \
+AR_FLAGS \
+STRIP \
+RANLIB \
+CC \
+CFLAGS \
+compiler \
+lt_cv_sys_global_symbol_pipe \
+lt_cv_sys_global_symbol_to_cdecl \
+lt_cv_sys_global_symbol_to_c_name_address \
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \
+SHELL \
+ECHO \
+lt_prog_compiler_no_builtin_flag \
+lt_prog_compiler_wl \
+lt_prog_compiler_pic \
+lt_prog_compiler_static \
+lt_cv_prog_compiler_c_o \
+need_locks \
+DSYMUTIL \
+NMEDIT \
+LIPO \
+OTOOL \
+OTOOL64 \
+shrext_cmds \
+export_dynamic_flag_spec \
+whole_archive_flag_spec \
+compiler_needs_object \
+with_gnu_ld \
+allow_undefined_flag \
+no_undefined_flag \
+hardcode_libdir_flag_spec \
+hardcode_libdir_flag_spec_ld \
+hardcode_libdir_separator \
+fix_srcfile_path \
+exclude_expsyms \
+include_expsyms \
+file_list_spec \
+variables_saved_for_relink \
+libname_spec \
+library_names_spec \
+soname_spec \
+finish_eval \
+old_striplib \
+striplib; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in reload_cmds \
+old_postinstall_cmds \
+old_postuninstall_cmds \
+old_archive_cmds \
+extract_expsyms_cmds \
+old_archive_from_new_cmds \
+old_archive_from_expsyms_cmds \
+archive_cmds \
+archive_expsym_cmds \
+module_cmds \
+module_expsym_cmds \
+export_symbols_cmds \
+prelink_cmds \
+postinstall_cmds \
+postuninstall_cmds \
+finish_cmds \
+sys_lib_search_path_spec \
+sys_lib_dlsearch_path_spec; do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[\\\\\\\`\\"\\\$]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\$0 --fallback-echo"') lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\$0 --fallback-echo"\$/\$0 --fallback-echo"/'\`
+ ;;
+esac
+
+ac_aux_dir='$ac_aux_dir'
+xsi_shell='$xsi_shell'
+lt_shell_append='$lt_shell_append'
+
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'
+
+
+
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+GNUmakefile=$GNUmakefile
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
+ "gnu/config.h") CONFIG_HEADERS="$CONFIG_HEADERS gnu/config.h:gnu/config.hin" ;;
+ "tests/m4") CONFIG_FILES="$CONFIG_FILES tests/m4" ;;
+ "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+ "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
+ "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "m4/system.h") CONFIG_FILES="$CONFIG_FILES m4/system.h:m4/system_.h" ;;
+ "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
+ "tests/gnu/Makefile") CONFIG_FILES="$CONFIG_FILES tests/gnu/Makefile" ;;
+
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap 'as_fn_exit 1' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=`echo X | tr X '\015'`
+# On cygwin, bash can eat \r inside `` if the user requested igncr.
+# But we know of no other shell where ac_cr would be empty at this
+# point, so we can use a bashism as a fallback.
+if test "x$ac_cr" = x; then
+ eval ac_cr=\$\'\\r\'
+fi
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\)..*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\)..*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
+h
+s///
+s/^/:/
+s/[ ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
+s/:*$//
+x
+s/\(=[ ]*\).*/\1/
+G
+s/\n//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ as_fn_append ac_file_inputs " '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir="$ac_dir"; as_fn_mkdir_p
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined" >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || as_fn_error $? "could not create -" "$LINENO" 5
+ fi
+# Compute "$ac_file"'s index in $config_headers.
+_am_arg="$ac_file"
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+ case $_am_header in
+ $_am_arg | $_am_arg:* )
+ break ;;
+ * )
+ _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+ esac
+done
+echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
+$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$_am_arg" : 'X\(//\)[^/]' \| \
+ X"$_am_arg" : 'X\(//\)$' \| \
+ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$_am_arg" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`/stamp-h$_am_stamp_count
+ ;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
+ :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "tests/atconfig":C) cat >tests/atconfig <<ATEOF
+# Configurable variable values for building test suites.
+# Generated by $0.
+# Copyright (C) 2010 Free Software Foundation, Inc.
+
+# The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
+at_testdir='tests'
+abs_builddir='$ac_abs_builddir'
+at_srcdir='$ac_srcdir'
+abs_srcdir='$ac_abs_srcdir'
+at_top_srcdir='$ac_top_srcdir'
+abs_top_srcdir='$ac_abs_top_srcdir'
+at_top_build_prefix='$ac_top_build_prefix'
+abs_top_builddir='$ac_abs_top_builddir'
+
+# Backward compatibility with Autotest <= 2.59b:
+at_top_builddir=\$at_top_build_prefix
+
+AUTOTEST_PATH='tests'
+
+SHELL=\${CONFIG_SHELL-'$SHELL'}
+ATEOF
+ ;;
+ "tests/m4":F) chmod +x tests/m4 ;;
+ "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
+ # Autoconf 2.62 quotes --file arguments for eval, but not when files
+ # are listed without --file. Let's play safe and only enable the eval
+ # if we detect the quoting.
+ case $CONFIG_FILES in
+ *\'*) eval set x "$CONFIG_FILES" ;;
+ *) set x $CONFIG_FILES ;;
+ esac
+ shift
+ for mf
+ do
+ # Strip MF so we end up with the name of the file.
+ mf=`echo "$mf" | sed -e 's/:.*$//'`
+ # Check whether this is an Automake generated Makefile or not.
+ # We used to match only the files named `Makefile.in', but
+ # some people rename them; so instead we look at the file content.
+ # Grep'ing the first line is not enough: some people post-process
+ # each Makefile.in and add a new line on top of each file to say so.
+ # Grep'ing the whole file is not good either: AIX grep has a line
+ # limit of 2048, but all sed's we know have understand at least 4000.
+ if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
+ dirpart=`$as_dirname -- "$mf" ||
+$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$mf" : 'X\(//\)[^/]' \| \
+ X"$mf" : 'X\(//\)$' \| \
+ X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$mf" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ else
+ continue
+ fi
+ # Extract the definition of DEPDIR, am__include, and am__quote
+ # from the Makefile without running `make'.
+ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+ test -z "$DEPDIR" && continue
+ am__include=`sed -n 's/^am__include = //p' < "$mf"`
+ test -z "am__include" && continue
+ am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+ # When using ansi2knr, U may be empty or an underscore; expand it
+ U=`sed -n 's/^U = //p' < "$mf"`
+ # Find all dependency output files, they are included files with
+ # $(DEPDIR) in their names. We invoke sed twice because it is the
+ # simplest approach to changing $(DEPDIR) to its actual value in the
+ # expansion.
+ for file in `sed -n "
+ s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+ # Make sure the directory exists.
+ test -f "$dirpart/$file" && continue
+ fdir=`$as_dirname -- "$file" ||
+$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$file" : 'X\(//\)[^/]' \| \
+ X"$file" : 'X\(//\)$' \| \
+ X"$file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ as_dir=$dirpart/$fdir; as_fn_mkdir_p
+ # echo "creating $dirpart/$file"
+ echo '# dummy' > "$dirpart/$file"
+ done
+ done
+}
+ ;;
+ "libtool":C)
+
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+
+# The names of the tagged configurations supported by this script.
+available_tags=""
+
+# ### BEGIN LIBTOOL CONFIG
+
+# Whether or not to build shared libraries.
+build_libtool_libs=$enable_shared
+
+# A sed program that does not truncate output.
+SED=$lt_SED
+
+# Sed that helps us avoid accidentally triggering echo(1) options like -n.
+Xsed="\$SED -e 1s/^X//"
+
+# Which release of libtool.m4 was used?
+macro_version=$macro_version
+macro_revision=$macro_revision
+
+# Assembler program.
+AS=$AS
+
+# DLL creation program.
+DLLTOOL=$DLLTOOL
+
+# Object dumper program.
+OBJDUMP=$OBJDUMP
+
+# Whether or not to build static libraries.
+build_old_libs=$enable_static
+
+# What type of objects to build.
+pic_mode=$pic_mode
+
+# Whether or not to optimize for fast installation.
+fast_install=$enable_fast_install
+
+# The host system.
+host_alias=$host_alias
+host=$host
+host_os=$host_os
+
+# The build system.
+build_alias=$build_alias
+build=$build
+build_os=$build_os
+
+# A grep program that handles long lines.
+GREP=$lt_GREP
+
+# An ERE matcher.
+EGREP=$lt_EGREP
+
+# A literal string matcher.
+FGREP=$lt_FGREP
+
+# A BSD- or MS-compatible name lister.
+NM=$lt_NM
+
+# Whether we need soft or hard links.
+LN_S=$lt_LN_S
+
+# What is the maximum length of a command?
+max_cmd_len=$max_cmd_len
+
+# Object file suffix (normally "o").
+objext=$ac_objext
+
+# Executable file suffix (normally "").
+exeext=$exeext
+
+# whether the shell understands "unset".
+lt_unset=$lt_unset
+
+# turn spaces into newlines.
+SP2NL=$lt_lt_SP2NL
+
+# turn newlines into spaces.
+NL2SP=$lt_lt_NL2SP
+
+# How to create reloadable object files.
+reload_flag=$lt_reload_flag
+reload_cmds=$lt_reload_cmds
+
+# Method to check whether dependent libraries are shared objects.
+deplibs_check_method=$lt_deplibs_check_method
+
+# Command to use when deplibs_check_method == "file_magic".
+file_magic_cmd=$lt_file_magic_cmd
+
+# The archiver.
+AR=$lt_AR
+AR_FLAGS=$lt_AR_FLAGS
+
+# A symbol stripping program.
+STRIP=$lt_STRIP
+
+# Commands used to install an old-style archive.
+RANLIB=$lt_RANLIB
+old_postinstall_cmds=$lt_old_postinstall_cmds
+old_postuninstall_cmds=$lt_old_postuninstall_cmds
+
+# A C compiler.
+LTCC=$lt_CC
+
+# LTCC compiler flags.
+LTCFLAGS=$lt_CFLAGS
+
+# Take the output of nm and produce a listing of raw symbols and C names.
+global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe
+
+# Transform the output of nm in a proper C declaration.
+global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl
+
+# Transform the output of nm in a C name address pair.
+global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address
+
+# Transform the output of nm in a C name address pair when lib prefix is needed.
+global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix
+
+# The name of the directory that contains temporary libtool files.
+objdir=$objdir
+
+# Shell to use when invoking shell scripts.
+SHELL=$lt_SHELL
+
+# An echo program that does not interpret backslashes.
+ECHO=$lt_ECHO
+
+# Used to examine libraries when file_magic_cmd begins with "file".
+MAGIC_CMD=$MAGIC_CMD
+
+# Must we lock files when doing compilation?
+need_locks=$lt_need_locks
+
+# Tool to manipulate archived DWARF debug symbol files on Mac OS X.
+DSYMUTIL=$lt_DSYMUTIL
+
+# Tool to change global to local symbols on Mac OS X.
+NMEDIT=$lt_NMEDIT
+
+# Tool to manipulate fat objects and archives on Mac OS X.
+LIPO=$lt_LIPO
+
+# ldd/readelf like tool for Mach-O binaries on Mac OS X.
+OTOOL=$lt_OTOOL
+
+# ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4.
+OTOOL64=$lt_OTOOL64
+
+# Old archive suffix (normally "a").
+libext=$libext
+
+# Shared library suffix (normally ".so").
+shrext_cmds=$lt_shrext_cmds
+
+# The commands to extract the exported symbol list from a shared archive.
+extract_expsyms_cmds=$lt_extract_expsyms_cmds
+
+# Variables whose values should be saved in libtool wrapper scripts and
+# restored at link time.
+variables_saved_for_relink=$lt_variables_saved_for_relink
+
+# Do we need the "lib" prefix for modules?
+need_lib_prefix=$need_lib_prefix
+
+# Do we need a version for libraries?
+need_version=$need_version
+
+# Library versioning type.
+version_type=$version_type
+
+# Shared library runtime path variable.
+runpath_var=$runpath_var
+
+# Shared library path variable.
+shlibpath_var=$shlibpath_var
+
+# Is shlibpath searched before the hard-coded library search path?
+shlibpath_overrides_runpath=$shlibpath_overrides_runpath
+
+# Format of library name prefix.
+libname_spec=$lt_libname_spec
+
+# List of archive names. First name is the real one, the rest are links.
+# The last name is the one that the linker finds with -lNAME
+library_names_spec=$lt_library_names_spec
+
+# The coded name of the library, if different from the real name.
+soname_spec=$lt_soname_spec
+
+# Command to use after installation of a shared archive.
+postinstall_cmds=$lt_postinstall_cmds
+
+# Command to use after uninstallation of a shared archive.
+postuninstall_cmds=$lt_postuninstall_cmds
+
+# Commands used to finish a libtool library installation in a directory.
+finish_cmds=$lt_finish_cmds
+
+# As "finish_cmds", except a single script fragment to be evaled but
+# not shown.
+finish_eval=$lt_finish_eval
+
+# Whether we should hardcode library paths into libraries.
+hardcode_into_libs=$hardcode_into_libs
+
+# Compile-time system search path for libraries.
+sys_lib_search_path_spec=$lt_sys_lib_search_path_spec
+
+# Run-time system search path for libraries.
+sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec
+
+# Whether dlopen is supported.
+dlopen_support=$enable_dlopen
+
+# Whether dlopen of programs is supported.
+dlopen_self=$enable_dlopen_self
+
+# Whether dlopen of statically linked programs is supported.
+dlopen_self_static=$enable_dlopen_self_static
+
+# Commands to strip libraries.
+old_striplib=$lt_old_striplib
+striplib=$lt_striplib
+
+
+# The linker used to build libraries.
+LD=$lt_LD
+
+# Commands used to build an old-style archive.
+old_archive_cmds=$lt_old_archive_cmds
+
+# A language specific compiler.
+CC=$lt_compiler
+
+# Is the compiler the GNU compiler?
+with_gcc=$GCC
+
+# Compiler flag to turn off builtin functions.
+no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag
+
+# How to pass a linker flag through the compiler.
+wl=$lt_lt_prog_compiler_wl
+
+# Additional compiler flags for building library objects.
+pic_flag=$lt_lt_prog_compiler_pic
+
+# Compiler flag to prevent dynamic linking.
+link_static_flag=$lt_lt_prog_compiler_static
+
+# Does compiler simultaneously support -c and -o options?
+compiler_c_o=$lt_lt_cv_prog_compiler_c_o
+
+# Whether or not to add -lc for building shared libraries.
+build_libtool_need_lc=$archive_cmds_need_lc
+
+# Whether or not to disallow shared libs when runtime libs are static.
+allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes
+
+# Compiler flag to allow reflexive dlopens.
+export_dynamic_flag_spec=$lt_export_dynamic_flag_spec
+
+# Compiler flag to generate shared objects directly from archives.
+whole_archive_flag_spec=$lt_whole_archive_flag_spec
+
+# Whether the compiler copes with passing no objects directly.
+compiler_needs_object=$lt_compiler_needs_object
+
+# Create an old-style archive from a shared archive.
+old_archive_from_new_cmds=$lt_old_archive_from_new_cmds
+
+# Create a temporary old-style archive to link instead of a shared archive.
+old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds
+
+# Commands used to build a shared archive.
+archive_cmds=$lt_archive_cmds
+archive_expsym_cmds=$lt_archive_expsym_cmds
+
+# Commands used to build a loadable module if different from building
+# a shared archive.
+module_cmds=$lt_module_cmds
+module_expsym_cmds=$lt_module_expsym_cmds
+
+# Whether we are building with GNU ld or not.
+with_gnu_ld=$lt_with_gnu_ld
+
+# Flag that allows shared libraries with undefined symbols to be built.
+allow_undefined_flag=$lt_allow_undefined_flag
+
+# Flag that enforces no undefined symbols.
+no_undefined_flag=$lt_no_undefined_flag
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist
+hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec
+
+# If ld is used when linking, flag to hardcode \$libdir into a binary
+# during linking. This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld
+
+# Whether we need a single "-rpath" flag with a separated argument.
+hardcode_libdir_separator=$lt_hardcode_libdir_separator
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary.
+hardcode_direct=$hardcode_direct
+
+# Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes
+# DIR into the resulting binary and the resulting library dependency is
+# "absolute",i.e impossible to change by setting \${shlibpath_var} if the
+# library is relocated.
+hardcode_direct_absolute=$hardcode_direct_absolute
+
+# Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+# into the resulting binary.
+hardcode_minus_L=$hardcode_minus_L
+
+# Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+# into the resulting binary.
+hardcode_shlibpath_var=$hardcode_shlibpath_var
+
+# Set to "yes" if building a shared library automatically hardcodes DIR
+# into the library and all subsequent libraries and executables linked
+# against it.
+hardcode_automatic=$hardcode_automatic
+
+# Set to yes if linker adds runtime paths of dependent libraries
+# to runtime path list.
+inherit_rpath=$inherit_rpath
+
+# Whether libtool must link a program against all its dependency libraries.
+link_all_deplibs=$link_all_deplibs
+
+# Fix the shell variable \$srcfile for the compiler.
+fix_srcfile_path=$lt_fix_srcfile_path
+
+# Set to "yes" if exported symbols are required.
+always_export_symbols=$always_export_symbols
+
+# The commands to list exported symbols.
+export_symbols_cmds=$lt_export_symbols_cmds
+
+# Symbols that should not be listed in the preloaded symbols.
+exclude_expsyms=$lt_exclude_expsyms
+
+# Symbols that must always be exported.
+include_expsyms=$lt_include_expsyms
+
+# Commands necessary for linking programs (against libraries) with templates.
+prelink_cmds=$lt_prelink_cmds
+
+# Specify filename containing input files.
+file_list_spec=$lt_file_list_spec
+
+# How to hardcode a shared library path into an executable.
+hardcode_action=$hardcode_action
+
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+
+ltmain="$ac_aux_dir/ltmain.sh"
+
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $* ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[^=]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[^=]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[^.]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$@"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1+=\$2"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$1=\$$1\$2"
+}
+
+_LT_EOF
+ ;;
+ esac
+
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+
+ ;;
+ "po-directories":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+
+ esac
+done # for ac_tag
+
+
+as_fn_exit 0
+_ACEOF
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || as_fn_exit 1
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 00000000..c21a74a6
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,1619 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+subdir = doc
+DIST_COMMON = $(dist_man_MANS) $(m4_TEXINFOS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/stamp-vti \
+ $(srcdir)/version.texi
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/ltdl/m4/00gnulib.m4 \
+ $(top_srcdir)/ltdl/m4/alloca.m4 $(top_srcdir)/ltdl/m4/argz.m4 \
+ $(top_srcdir)/ltdl/m4/assert.m4 \
+ $(top_srcdir)/ltdl/m4/autobuild.m4 \
+ $(top_srcdir)/ltdl/m4/btowc.m4 \
+ $(top_srcdir)/ltdl/m4/canonicalize.m4 \
+ $(top_srcdir)/ltdl/m4/cloexec.m4 \
+ $(top_srcdir)/ltdl/m4/close-stream.m4 \
+ $(top_srcdir)/ltdl/m4/closein.m4 \
+ $(top_srcdir)/ltdl/m4/closeout.m4 \
+ $(top_srcdir)/ltdl/m4/codeset.m4 \
+ $(top_srcdir)/ltdl/m4/config-h.m4 \
+ $(top_srcdir)/ltdl/m4/debug.m4 \
+ $(top_srcdir)/ltdl/m4/dirname.m4 $(top_srcdir)/ltdl/m4/dos.m4 \
+ $(top_srcdir)/ltdl/m4/double-slash-root.m4 \
+ $(top_srcdir)/ltdl/m4/dup2.m4 $(top_srcdir)/ltdl/m4/eealloc.m4 \
+ $(top_srcdir)/ltdl/m4/environ.m4 \
+ $(top_srcdir)/ltdl/m4/errno_h.m4 \
+ $(top_srcdir)/ltdl/m4/error.m4 \
+ $(top_srcdir)/ltdl/m4/execute.m4 \
+ $(top_srcdir)/ltdl/m4/exitfail.m4 \
+ $(top_srcdir)/ltdl/m4/exponentd.m4 \
+ $(top_srcdir)/ltdl/m4/exponentf.m4 \
+ $(top_srcdir)/ltdl/m4/exponentl.m4 \
+ $(top_srcdir)/ltdl/m4/extensions.m4 \
+ $(top_srcdir)/ltdl/m4/fatal-signal.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl-o.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl_h.m4 \
+ $(top_srcdir)/ltdl/m4/fflush.m4 \
+ $(top_srcdir)/ltdl/m4/filenamecat.m4 \
+ $(top_srcdir)/ltdl/m4/flexmember.m4 \
+ $(top_srcdir)/ltdl/m4/float_h.m4 \
+ $(top_srcdir)/ltdl/m4/fopen.m4 \
+ $(top_srcdir)/ltdl/m4/fpending.m4 \
+ $(top_srcdir)/ltdl/m4/fpieee.m4 \
+ $(top_srcdir)/ltdl/m4/fpurge.m4 \
+ $(top_srcdir)/ltdl/m4/freading.m4 \
+ $(top_srcdir)/ltdl/m4/frexp.m4 $(top_srcdir)/ltdl/m4/frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/fseeko.m4 \
+ $(top_srcdir)/ltdl/m4/ftello.m4 \
+ $(top_srcdir)/ltdl/m4/getdtablesize.m4 \
+ $(top_srcdir)/ltdl/m4/getopt.m4 \
+ $(top_srcdir)/ltdl/m4/getpagesize.m4 \
+ $(top_srcdir)/ltdl/m4/gettext.m4 \
+ $(top_srcdir)/ltdl/m4/gettimeofday.m4 \
+ $(top_srcdir)/ltdl/m4/gl_list.m4 \
+ $(top_srcdir)/ltdl/m4/glibc21.m4 $(top_srcdir)/ltdl/m4/gmp.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-common.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/ltdl/m4/iconv.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_h.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_open.m4 \
+ $(top_srcdir)/ltdl/m4/include_next.m4 \
+ $(top_srcdir)/ltdl/m4/inline.m4 \
+ $(top_srcdir)/ltdl/m4/intlmacosx.m4 \
+ $(top_srcdir)/ltdl/m4/intmax_t.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes-pri.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes_h.m4 \
+ $(top_srcdir)/ltdl/m4/isnand.m4 \
+ $(top_srcdir)/ltdl/m4/isnanf.m4 \
+ $(top_srcdir)/ltdl/m4/isnanl.m4 \
+ $(top_srcdir)/ltdl/m4/langinfo_h.m4 \
+ $(top_srcdir)/ltdl/m4/ldexpl.m4 \
+ $(top_srcdir)/ltdl/m4/lib-ld.m4 \
+ $(top_srcdir)/ltdl/m4/lib-link.m4 \
+ $(top_srcdir)/ltdl/m4/lib-prefix.m4 \
+ $(top_srcdir)/ltdl/m4/libtool.m4 $(top_srcdir)/ltdl/m4/link.m4 \
+ $(top_srcdir)/ltdl/m4/localcharset.m4 \
+ $(top_srcdir)/ltdl/m4/locale-fr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-ja.m4 \
+ $(top_srcdir)/ltdl/m4/locale-tr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-zh.m4 \
+ $(top_srcdir)/ltdl/m4/longlong.m4 \
+ $(top_srcdir)/ltdl/m4/lseek.m4 $(top_srcdir)/ltdl/m4/lstat.m4 \
+ $(top_srcdir)/ltdl/m4/ltdl.m4 \
+ $(top_srcdir)/ltdl/m4/ltoptions.m4 \
+ $(top_srcdir)/ltdl/m4/ltsugar.m4 \
+ $(top_srcdir)/ltdl/m4/ltversion.m4 \
+ $(top_srcdir)/ltdl/m4/lt~obsolete.m4 \
+ $(top_srcdir)/ltdl/m4/m4-error.m4 \
+ $(top_srcdir)/ltdl/m4/m4-getopt.m4 \
+ $(top_srcdir)/ltdl/m4/m4-gettext.m4 \
+ $(top_srcdir)/ltdl/m4/m4-obstack.m4 \
+ $(top_srcdir)/ltdl/m4/m4-regex.m4 \
+ $(top_srcdir)/ltdl/m4/m4-rename.m4 \
+ $(top_srcdir)/ltdl/m4/m4-syscmd.m4 \
+ $(top_srcdir)/ltdl/m4/malloc.m4 \
+ $(top_srcdir)/ltdl/m4/malloca.m4 \
+ $(top_srcdir)/ltdl/m4/math_h.m4 \
+ $(top_srcdir)/ltdl/m4/mbchar.m4 \
+ $(top_srcdir)/ltdl/m4/mbiter.m4 \
+ $(top_srcdir)/ltdl/m4/mbrtowc.m4 \
+ $(top_srcdir)/ltdl/m4/mbsinit.m4 \
+ $(top_srcdir)/ltdl/m4/mbslen.m4 \
+ $(top_srcdir)/ltdl/m4/mbstate_t.m4 \
+ $(top_srcdir)/ltdl/m4/memchr.m4 \
+ $(top_srcdir)/ltdl/m4/memmem.m4 \
+ $(top_srcdir)/ltdl/m4/mkdtemp.m4 \
+ $(top_srcdir)/ltdl/m4/mkstemp.m4 \
+ $(top_srcdir)/ltdl/m4/mmap-anon.m4 \
+ $(top_srcdir)/ltdl/m4/mode_t.m4 \
+ $(top_srcdir)/ltdl/m4/multiarch.m4 \
+ $(top_srcdir)/ltdl/m4/nl_langinfo.m4 \
+ $(top_srcdir)/ltdl/m4/nls.m4 $(top_srcdir)/ltdl/m4/nocrash.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf.m4 \
+ $(top_srcdir)/ltdl/m4/open.m4 $(top_srcdir)/ltdl/m4/pathmax.m4 \
+ $(top_srcdir)/ltdl/m4/pipe.m4 $(top_srcdir)/ltdl/m4/pipe2.m4 \
+ $(top_srcdir)/ltdl/m4/po.m4 \
+ $(top_srcdir)/ltdl/m4/posix_spawn.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexp.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/printf.m4 \
+ $(top_srcdir)/ltdl/m4/progtest.m4 \
+ $(top_srcdir)/ltdl/m4/putenv.m4 $(top_srcdir)/ltdl/m4/quote.m4 \
+ $(top_srcdir)/ltdl/m4/quotearg.m4 \
+ $(top_srcdir)/ltdl/m4/rawmemchr.m4 \
+ $(top_srcdir)/ltdl/m4/readlink.m4 \
+ $(top_srcdir)/ltdl/m4/regex.m4 $(top_srcdir)/ltdl/m4/rename.m4 \
+ $(top_srcdir)/ltdl/m4/rmdir.m4 \
+ $(top_srcdir)/ltdl/m4/sched_h.m4 \
+ $(top_srcdir)/ltdl/m4/setenv.m4 \
+ $(top_srcdir)/ltdl/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/ltdl/m4/sigaction.m4 \
+ $(top_srcdir)/ltdl/m4/signal_h.m4 \
+ $(top_srcdir)/ltdl/m4/signalblocking.m4 \
+ $(top_srcdir)/ltdl/m4/signbit.m4 \
+ $(top_srcdir)/ltdl/m4/size_max.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf.m4 \
+ $(top_srcdir)/ltdl/m4/spawn_h.m4 \
+ $(top_srcdir)/ltdl/m4/sprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/ssize_t.m4 \
+ $(top_srcdir)/ltdl/m4/stackovf.m4 \
+ $(top_srcdir)/ltdl/m4/stat.m4 $(top_srcdir)/ltdl/m4/stdarg.m4 \
+ $(top_srcdir)/ltdl/m4/stdbool.m4 \
+ $(top_srcdir)/ltdl/m4/stddef_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdint.m4 \
+ $(top_srcdir)/ltdl/m4/stdint_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdio-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdio_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib_h.m4 \
+ $(top_srcdir)/ltdl/m4/strchrnul.m4 \
+ $(top_srcdir)/ltdl/m4/strdup.m4 \
+ $(top_srcdir)/ltdl/m4/strerror.m4 \
+ $(top_srcdir)/ltdl/m4/string_h.m4 \
+ $(top_srcdir)/ltdl/m4/strndup.m4 \
+ $(top_srcdir)/ltdl/m4/strnlen.m4 \
+ $(top_srcdir)/ltdl/m4/strtod.m4 \
+ $(top_srcdir)/ltdl/m4/strtol.m4 \
+ $(top_srcdir)/ltdl/m4/symlink.m4 \
+ $(top_srcdir)/ltdl/m4/sys_stat_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_time_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_wait_h.m4 \
+ $(top_srcdir)/ltdl/m4/tempname.m4 \
+ $(top_srcdir)/ltdl/m4/time_h.m4 \
+ $(top_srcdir)/ltdl/m4/tmpdir.m4 \
+ $(top_srcdir)/ltdl/m4/ulonglong.m4 \
+ $(top_srcdir)/ltdl/m4/ungetc.m4 \
+ $(top_srcdir)/ltdl/m4/unistd-safer.m4 \
+ $(top_srcdir)/ltdl/m4/unistd_h.m4 \
+ $(top_srcdir)/ltdl/m4/unlocked-io.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf.m4 \
+ $(top_srcdir)/ltdl/m4/version-etc.m4 \
+ $(top_srcdir)/ltdl/m4/vfprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/wait-process.m4 \
+ $(top_srcdir)/ltdl/m4/warn-on-use.m4 \
+ $(top_srcdir)/ltdl/m4/wchar.m4 \
+ $(top_srcdir)/ltdl/m4/wchar_t.m4 \
+ $(top_srcdir)/ltdl/m4/wcrtomb.m4 \
+ $(top_srcdir)/ltdl/m4/wctob.m4 $(top_srcdir)/ltdl/m4/wctype.m4 \
+ $(top_srcdir)/ltdl/m4/wcwidth.m4 \
+ $(top_srcdir)/ltdl/m4/wint_t.m4 \
+ $(top_srcdir)/ltdl/m4/xalloc.m4 $(top_srcdir)/ltdl/m4/xsize.m4 \
+ $(top_srcdir)/ltdl/m4/xstrndup.m4 \
+ $(top_srcdir)/ltdl/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/gnu/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+SOURCES =
+DIST_SOURCES =
+INFO_DEPS = $(srcdir)/m4.info
+TEXINFO_TEX = $(top_srcdir)/build-aux/texinfo.tex
+am__TEXINFO_TEX_DIR = $(top_srcdir)/build-aux
+DVIS = m4.dvi
+PDFS = m4.pdf
+PSS = m4.ps
+HTMLS = m4.html
+TEXINFOS = m4.texinfo
+TEXI2DVI = texi2dvi
+TEXI2PDF = $(TEXI2DVI) --pdf --batch
+MAKEINFOHTML = $(MAKEINFO) --html
+AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS)
+DVIPS = dvips
+am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+man1dir = $(mandir)/man1
+NROFF = nroff
+MANS = $(dist_man_MANS)
+ETAGS = etags
+CTAGS = ctags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARGZ_H = @ARGZ_H@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DLPREOPEN = @DLPREOPEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DYNAMIC_MODULES = @DYNAMIC_MODULES@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLOAT_H = @FLOAT_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_H = @GETTEXT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGL = @GNULIB_LOGL@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
+GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
+GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
+GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
+HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTL = @HAVE_SQRTL@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+ICONV_H = @ICONV_H@
+INCLTDL = @INCLTDL@
+INCLUDE_ERROR_H = @INCLUDE_ERROR_H@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INCLUDE_OBSTACK_H = @INCLUDE_OBSTACK_H@
+INCLUDE_REGEX_H = @INCLUDE_REGEX_H@
+INCLUDE_STDBOOL_H = @INCLUDE_STDBOOL_H@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBADD_DL = @LIBADD_DL@
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
+LIBADD_GMP = @LIBADD_GMP@
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_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@
+LTALLOCA = @LTALLOCA@
+LTDLDEPS = @LTDLDEPS@
+LTDLINCL = @LTDLINCL@
+LTDLOPEN = @LTDLOPEN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_CONFIG_H = @LT_CONFIG_H@
+LT_DLLOADERS = @LT_DLLOADERS@
+LT_DLPREOPEN = @LT_DLPREOPEN@
+M4_LIBOBJS = @M4_LIBOBJS@
+M4_LTLIBOBJS = @M4_LTLIBOBJS@
+M4tests_LIBOBJS = @M4tests_LIBOBJS@
+M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_ICONV_H = @NEXT_ICONV_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_SPAWN_H = @NEXT_SPAWN_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBSTACK_H = @OBSTACK_H@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PREOPEN_DEPENDENCIES = @PREOPEN_DEPENDENCIES@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REGEX_H = @REGEX_H@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ICONV = @REPLACE_ICONV@
+REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
+REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SCHED_H = @SCHED_H@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_GMP = @USE_GMP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_symbol_underscore = @sys_symbol_underscore@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+MAINTAINERCLEANFILES = gendocs_template $(dist_man_MANS)
+EXTRA_DIST = gendocs_template
+config_aux_dir = build-aux
+info_TEXINFOS = m4.texinfo
+m4_TEXINFOS = regexprops-generic.texi fdl-1.3.texi gpl-3.0.texi
+dist_man_MANS = $(srcdir)/m4.1
+HELP2MAN = $(SHELL) $(top_srcdir)/$(config_aux_dir)/missing --run help2man
+TAGS_FILES = $(infos_TEXINFOS)
+TAGS_DEPENDENCIES = $(TAGS_FILES)
+ETAGS_ARGS = --language=none --regex='/@node \([^,]*\)/\1/' $(TAGS_FILES)
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .dvi .html .info .pdf .ps .texinfo
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnu doc/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+.texinfo.info:
+ restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+ am__cwd=`pwd` && $(am__cd) $(srcdir) && \
+ rm -rf $$backupdir && mkdir $$backupdir && \
+ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
+ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \
+ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \
+ done; \
+ else :; fi && \
+ cd "$$am__cwd"; \
+ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $@ $<; \
+ then \
+ rc=0; \
+ $(am__cd) $(srcdir); \
+ else \
+ rc=$$?; \
+ $(am__cd) $(srcdir) && \
+ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \
+ fi; \
+ rm -rf $$backupdir; exit $$rc
+
+.texinfo.dvi:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2DVI) $<
+
+.texinfo.pdf:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
+ $(TEXI2PDF) $<
+
+.texinfo.html:
+ rm -rf $(@:.html=.htp)
+ if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+ -o $(@:.html=.htp) $<; \
+ then \
+ rm -rf $@; \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \
+ else \
+ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \
+ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \
+ exit 1; \
+ fi
+$(srcdir)/m4.info: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.dvi: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.pdf: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
+m4.html: m4.texinfo $(srcdir)/version.texi $(m4_TEXINFOS)
+$(srcdir)/version.texi: $(srcdir)/stamp-vti
+$(srcdir)/stamp-vti: m4.texinfo $(top_srcdir)/configure
+ @(dir=.; test -f ./m4.texinfo || dir=$(srcdir); \
+ set `$(SHELL) $(top_srcdir)/build-aux/mdate-sh $$dir/m4.texinfo`; \
+ echo "@set UPDATED $$1 $$2 $$3"; \
+ echo "@set UPDATED-MONTH $$2 $$3"; \
+ echo "@set EDITION $(VERSION)"; \
+ echo "@set VERSION $(VERSION)") > vti.tmp
+ @cmp -s vti.tmp $(srcdir)/version.texi \
+ || (echo "Updating $(srcdir)/version.texi"; \
+ cp vti.tmp $(srcdir)/version.texi)
+ -@rm -f vti.tmp
+ @cp $(srcdir)/version.texi $@
+
+mostlyclean-vti:
+ -rm -f vti.tmp
+
+maintainer-clean-vti:
+ -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
+.dvi.ps:
+ TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+ $(DVIPS) -o $@ $<
+
+uninstall-dvi-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
+ rm -f "$(DESTDIR)$(dvidir)/$$f"; \
+ done
+
+uninstall-html-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
+ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
+ done
+
+uninstall-info-am:
+ @$(PRE_UNINSTALL)
+ @if test -d '$(DESTDIR)$(infodir)' && \
+ (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \
+ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \
+ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \
+ done; \
+ else :; fi
+ @$(NORMAL_UNINSTALL)
+ @list='$(INFO_DEPS)'; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \
+ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \
+ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \
+ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \
+ else :; fi); \
+ done
+
+uninstall-pdf-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
+ done
+
+uninstall-ps-am:
+ @$(NORMAL_UNINSTALL)
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
+ $(am__strip_dir) \
+ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
+ rm -f "$(DESTDIR)$(psdir)/$$f"; \
+ done
+
+dist-info: $(INFO_DEPS)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; \
+ for base in $$list; do \
+ case $$base in \
+ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$base; then d=.; else d=$(srcdir); fi; \
+ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \
+ if test -f $$file; then \
+ relfile=`expr "$$file" : "$$d/\(.*\)"`; \
+ test -f "$(distdir)/$$relfile" || \
+ cp -p $$file "$(distdir)/$$relfile"; \
+ else :; fi; \
+ done; \
+ done
+
+mostlyclean-aminfo:
+ -rm -rf m4.aux m4.cp m4.cps m4.fn m4.fns m4.ky m4.kys m4.log m4.pg m4.pgs \
+ m4.tmp m4.toc m4.tp m4.tps m4.vr m4.vrs
+
+clean-aminfo:
+ -test -z "m4.dvi m4.pdf m4.ps m4.html" \
+ || rm -rf m4.dvi m4.pdf m4.ps m4.html
+
+maintainer-clean-aminfo:
+ @list='$(INFO_DEPS)'; for i in $$list; do \
+ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \
+ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \
+ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \
+ done
+install-man1: $(dist_man_MANS)
+ @$(NORMAL_INSTALL)
+ test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ { for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | while read p; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; echo "$$p"; \
+ done | \
+ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \
+ sed 'N;N;s,\n, ,g' | { \
+ list=; while read file base inst; do \
+ if test "$$base" = "$$inst"; then list="$$list $$file"; else \
+ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \
+ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \
+ fi; \
+ done; \
+ for i in $$list; do echo "$$i"; done | $(am__base_list) | \
+ while read files; do \
+ test -z "$$files" || { \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \
+ done; }
+
+uninstall-man1:
+ @$(NORMAL_UNINSTALL)
+ @list=''; test -n "$(man1dir)" || exit 0; \
+ files=`{ for i in $$list; do echo "$$i"; done; \
+ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \
+ sed -n '/\.1[a-z]*$$/p'; \
+ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
+ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
+ test -z "$$files" || { \
+ echo " ( cd '$(DESTDIR)$(man1dir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(man1dir)" && rm -f $$files; }
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @list='$(MANS)'; if test -n "$$list"; then \
+ list=`for p in $$list; do \
+ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+ if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+ if test -n "$$list" && \
+ grep 'ab help2man is required to generate this page' $$list >/dev/null; then \
+ echo "error: found man pages containing the \`missing help2man' replacement text:" >&2; \
+ grep -l 'ab help2man is required to generate this page' $$list | sed 's/^/ /' >&2; \
+ echo " to fix them, install help2man, remove and regenerate the man pages;" >&2; \
+ echo " typically \`make maintainer-clean' will remove them" >&2; \
+ exit 1; \
+ else :; fi; \
+ else :; fi
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$(top_distdir)" distdir="$(distdir)" \
+ dist-info
+check-am: all-am
+check: check-am
+all-am: Makefile $(INFO_DEPS) $(MANS)
+installdirs:
+ for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(man1dir)"; do \
+ test -z "$$dir" || $(MKDIR_P) "$$dir"; \
+ done
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-am
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-am
+
+clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am
+
+distclean: distclean-am
+ -rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
+
+dvi: dvi-am
+
+dvi-am: $(DVIS)
+
+html: html-am
+
+html-am: $(HTMLS)
+
+info: info-am
+
+info-am: $(INFO_DEPS)
+
+install-data-am: install-info-am install-man
+
+install-dvi: install-dvi-am
+
+install-dvi-am: $(DVIS)
+ @$(NORMAL_INSTALL)
+ test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
+ @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \
+ done
+install-exec-am:
+
+install-html: install-html-am
+
+install-html-am: $(HTMLS)
+ @$(NORMAL_INSTALL)
+ test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
+ @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ $(am__strip_dir) \
+ if test -d "$$d$$p"; then \
+ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \
+ echo " $(INSTALL_DATA) '$$d$$p'/* '$(DESTDIR)$(htmldir)/$$f'"; \
+ $(INSTALL_DATA) "$$d$$p"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \
+ else \
+ list2="$$list2 $$d$$p"; \
+ fi; \
+ done; \
+ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \
+ done; }
+install-info: install-info-am
+
+install-info-am: $(INFO_DEPS)
+ @$(NORMAL_INSTALL)
+ test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
+ @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ for file in $$list; do \
+ case $$file in \
+ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+ esac; \
+ if test -f $$file; then d=.; else d=$(srcdir); fi; \
+ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \
+ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \
+ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \
+ if test -f $$ifile; then \
+ echo "$$ifile"; \
+ else : ; fi; \
+ done; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done
+ @$(POST_INSTALL)
+ @if (install-info --version && \
+ install-info --version 2>&1 | sed 1q | grep -i -v debian) >/dev/null 2>&1; then \
+ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
+ for file in $$list; do \
+ relfile=`echo "$$file" | sed 's|^.*/||'`; \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\
+ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\
+ done; \
+ else : ; fi
+install-man: install-man1
+
+install-pdf: install-pdf-am
+
+install-pdf-am: $(PDFS)
+ @$(NORMAL_INSTALL)
+ test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
+ @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done
+install-ps: install-ps-am
+
+install-ps-am: $(PSS)
+ @$(NORMAL_INSTALL)
+ test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
+ @list='$(PSS)'; test -n "$(psdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \
+ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done
+installcheck-am:
+
+maintainer-clean: maintainer-clean-am
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-vti
+
+mostlyclean: mostlyclean-am
+
+mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-vti
+
+pdf: pdf-am
+
+pdf-am: $(PDFS)
+
+ps: ps-am
+
+ps-am: $(PSS)
+
+uninstall-am: uninstall-dvi-am uninstall-html-am uninstall-info-am \
+ uninstall-man uninstall-pdf-am uninstall-ps-am
+
+uninstall-man: uninstall-man1
+
+.MAKE: install-am install-strip
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-aminfo \
+ clean-generic clean-libtool ctags dist-info distclean \
+ distclean-generic distclean-libtool distclean-tags distdir dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-man1 \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-aminfo \
+ maintainer-clean-generic maintainer-clean-vti mostlyclean \
+ mostlyclean-aminfo mostlyclean-generic mostlyclean-libtool \
+ mostlyclean-vti pdf pdf-am ps ps-am tags uninstall \
+ uninstall-am uninstall-dvi-am uninstall-html-am \
+ uninstall-info-am uninstall-man uninstall-man1 \
+ uninstall-pdf-am uninstall-ps-am
+
+
+# Build the man page once in the srcdir, rather than in every VPATH build
+# dir, to match how automake builds info pages. This is safe for 'make
+# distcheck' since it is distributed pre-built.
+$(srcdir)/m4.1: ../.version $(srcdir)/../src/main.c
+ @echo "Updating the \`man' page \`$@'"; \
+ $(HELP2MAN) --name="macro processor" --source=FSF \
+ --info-page=m4 --output=$@ ../src/m4$(EXEEXT)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/doc/fdl-1.3.texi b/doc/fdl-1.3.texi
new file mode 100755
index 00000000..8805f1a4
--- /dev/null
+++ b/doc/fdl-1.3.texi
@@ -0,0 +1,506 @@
+@c The GNU Free Documentation License.
+@center Version 1.3, 3 November 2008
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
+@uref{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies
+of this license document, but changing it is not allowed.
+@end display
+
+@enumerate 0
+@item
+PREAMBLE
+
+The purpose of this License is to make a manual, textbook, or other
+functional and useful document @dfn{free} in the sense of freedom: to
+assure everyone the effective freedom to copy and redistribute it,
+with or without modifying it, either commercially or noncommercially.
+Secondarily, this License preserves for the author and publisher a way
+to get credit for their work, while not being considered responsible
+for modifications made by others.
+
+This License is a kind of ``copyleft'', which means that derivative
+works of the document must themselves be free in the same sense. It
+complements the GNU General Public License, which is a copyleft
+license designed for free software.
+
+We have designed this License in order to use it for manuals for free
+software, because free software needs free documentation: a free
+program should come with manuals providing the same freedoms that the
+software does. But this License is not limited to software manuals;
+it can be used for any textual work, regardless of subject matter or
+whether it is published as a printed book. We recommend this License
+principally for works whose purpose is instruction or reference.
+
+@item
+APPLICABILITY AND DEFINITIONS
+
+This License applies to any manual or other work, in any medium, that
+contains a notice placed by the copyright holder saying it can be
+distributed under the terms of this License. Such a notice grants a
+world-wide, royalty-free license, unlimited in duration, to use that
+work under the conditions stated herein. The ``Document'', below,
+refers to any such manual or work. Any member of the public is a
+licensee, and is addressed as ``you''. You accept the license if you
+copy, modify or distribute the work in a way requiring permission
+under copyright law.
+
+A ``Modified Version'' of the Document means any work containing the
+Document or a portion of it, either copied verbatim, or with
+modifications and/or translated into another language.
+
+A ``Secondary Section'' is a named appendix or a front-matter section
+of the Document that deals exclusively with the relationship of the
+publishers or authors of the Document to the Document's overall
+subject (or to related matters) and contains nothing that could fall
+directly within that overall subject. (Thus, if the Document is in
+part a textbook of mathematics, a Secondary Section may not explain
+any mathematics.) The relationship could be a matter of historical
+connection with the subject or with related matters, or of legal,
+commercial, philosophical, ethical or political position regarding
+them.
+
+The ``Invariant Sections'' are certain Secondary Sections whose titles
+are designated, as being those of Invariant Sections, in the notice
+that says that the Document is released under this License. If a
+section does not fit the above definition of Secondary then it is not
+allowed to be designated as Invariant. The Document may contain zero
+Invariant Sections. If the Document does not identify any Invariant
+Sections then there are none.
+
+The ``Cover Texts'' are certain short passages of text that are listed,
+as Front-Cover Texts or Back-Cover Texts, in the notice that says that
+the Document is released under this License. A Front-Cover Text may
+be at most 5 words, and a Back-Cover Text may be at most 25 words.
+
+A ``Transparent'' copy of the Document means a machine-readable copy,
+represented in a format whose specification is available to the
+general public, that is suitable for revising the document
+straightforwardly with generic text editors or (for images composed of
+pixels) generic paint programs or (for drawings) some widely available
+drawing editor, and that is suitable for input to text formatters or
+for automatic translation to a variety of formats suitable for input
+to text formatters. A copy made in an otherwise Transparent file
+format whose markup, or absence of markup, has been arranged to thwart
+or discourage subsequent modification by readers is not Transparent.
+An image format is not Transparent if used for any substantial amount
+of text. A copy that is not ``Transparent'' is called ``Opaque''.
+
+Examples of suitable formats for Transparent copies include plain
+@sc{ascii} without markup, Texinfo input format, La@TeX{} input
+format, @acronym{SGML} or @acronym{XML} using a publicly available
+@acronym{DTD}, and standard-conforming simple @acronym{HTML},
+PostScript or @acronym{PDF} designed for human modification. Examples
+of transparent image formats include @acronym{PNG}, @acronym{XCF} and
+@acronym{JPG}. Opaque formats include proprietary formats that can be
+read and edited only by proprietary word processors, @acronym{SGML} or
+@acronym{XML} for which the @acronym{DTD} and/or processing tools are
+not generally available, and the machine-generated @acronym{HTML},
+PostScript or @acronym{PDF} produced by some word processors for
+output purposes only.
+
+The ``Title Page'' means, for a printed book, the title page itself,
+plus such following pages as are needed to hold, legibly, the material
+this License requires to appear in the title page. For works in
+formats which do not have any title page as such, ``Title Page'' means
+the text near the most prominent appearance of the work's title,
+preceding the beginning of the body of the text.
+
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
+A section ``Entitled XYZ'' means a named subunit of the Document whose
+title either is precisely XYZ or contains XYZ in parentheses following
+text that translates XYZ in another language. (Here XYZ stands for a
+specific section name mentioned below, such as ``Acknowledgements'',
+``Dedications'', ``Endorsements'', or ``History''.) To ``Preserve the Title''
+of such a section when you modify the Document means that it remains a
+section ``Entitled XYZ'' according to this definition.
+
+The Document may include Warranty Disclaimers next to the notice which
+states that this License applies to the Document. These Warranty
+Disclaimers are considered to be included by reference in this
+License, but only as regards disclaiming warranties: any other
+implication that these Warranty Disclaimers may have is void and has
+no effect on the meaning of this License.
+
+@item
+VERBATIM COPYING
+
+You may copy and distribute the Document in any medium, either
+commercially or noncommercially, provided that this License, the
+copyright notices, and the license notice saying this License applies
+to the Document are reproduced in all copies, and that you add no other
+conditions whatsoever to those of this License. You may not use
+technical measures to obstruct or control the reading or further
+copying of the copies you make or distribute. However, you may accept
+compensation in exchange for copies. If you distribute a large enough
+number of copies you must also follow the conditions in section 3.
+
+You may also lend copies, under the same conditions stated above, and
+you may publicly display copies.
+
+@item
+COPYING IN QUANTITY
+
+If you publish printed copies (or copies in media that commonly have
+printed covers) of the Document, numbering more than 100, and the
+Document's license notice requires Cover Texts, you must enclose the
+copies in covers that carry, clearly and legibly, all these Cover
+Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on
+the back cover. Both covers must also clearly and legibly identify
+you as the publisher of these copies. The front cover must present
+the full title with all words of the title equally prominent and
+visible. You may add other material on the covers in addition.
+Copying with changes limited to the covers, as long as they preserve
+the title of the Document and satisfy these conditions, can be treated
+as verbatim copying in other respects.
+
+If the required texts for either cover are too voluminous to fit
+legibly, you should put the first ones listed (as many as fit
+reasonably) on the actual cover, and continue the rest onto adjacent
+pages.
+
+If you publish or distribute Opaque copies of the Document numbering
+more than 100, you must either include a machine-readable Transparent
+copy along with each Opaque copy, or state in or with each Opaque copy
+a computer-network location from which the general network-using
+public has access to download using public-standard network protocols
+a complete Transparent copy of the Document, free of added material.
+If you use the latter option, you must take reasonably prudent steps,
+when you begin distribution of Opaque copies in quantity, to ensure
+that this Transparent copy will remain thus accessible at the stated
+location until at least one year after the last time you distribute an
+Opaque copy (directly or through your agents or retailers) of that
+edition to the public.
+
+It is requested, but not required, that you contact the authors of the
+Document well before redistributing any large number of copies, to give
+them a chance to provide you with an updated version of the Document.
+
+@item
+MODIFICATIONS
+
+You may copy and distribute a Modified Version of the Document under
+the conditions of sections 2 and 3 above, provided that you release
+the Modified Version under precisely this License, with the Modified
+Version filling the role of the Document, thus licensing distribution
+and modification of the Modified Version to whoever possesses a copy
+of it. In addition, you must do these things in the Modified Version:
+
+@enumerate A
+@item
+Use in the Title Page (and on the covers, if any) a title distinct
+from that of the Document, and from those of previous versions
+(which should, if there were any, be listed in the History section
+of the Document). You may use the same title as a previous version
+if the original publisher of that version gives permission.
+
+@item
+List on the Title Page, as authors, one or more persons or entities
+responsible for authorship of the modifications in the Modified
+Version, together with at least five of the principal authors of the
+Document (all of its principal authors, if it has fewer than five),
+unless they release you from this requirement.
+
+@item
+State on the Title page the name of the publisher of the
+Modified Version, as the publisher.
+
+@item
+Preserve all the copyright notices of the Document.
+
+@item
+Add an appropriate copyright notice for your modifications
+adjacent to the other copyright notices.
+
+@item
+Include, immediately after the copyright notices, a license notice
+giving the public permission to use the Modified Version under the
+terms of this License, in the form shown in the Addendum below.
+
+@item
+Preserve in that license notice the full lists of Invariant Sections
+and required Cover Texts given in the Document's license notice.
+
+@item
+Include an unaltered copy of this License.
+
+@item
+Preserve the section Entitled ``History'', Preserve its Title, and add
+to it an item stating at least the title, year, new authors, and
+publisher of the Modified Version as given on the Title Page. If
+there is no section Entitled ``History'' in the Document, create one
+stating the title, year, authors, and publisher of the Document as
+given on its Title Page, then add an item describing the Modified
+Version as stated in the previous sentence.
+
+@item
+Preserve the network location, if any, given in the Document for
+public access to a Transparent copy of the Document, and likewise
+the network locations given in the Document for previous versions
+it was based on. These may be placed in the ``History'' section.
+You may omit a network location for a work that was published at
+least four years before the Document itself, or if the original
+publisher of the version it refers to gives permission.
+
+@item
+For any section Entitled ``Acknowledgements'' or ``Dedications'', Preserve
+the Title of the section, and preserve in the section all the
+substance and tone of each of the contributor acknowledgements and/or
+dedications given therein.
+
+@item
+Preserve all the Invariant Sections of the Document,
+unaltered in their text and in their titles. Section numbers
+or the equivalent are not considered part of the section titles.
+
+@item
+Delete any section Entitled ``Endorsements''. Such a section
+may not be included in the Modified Version.
+
+@item
+Do not retitle any existing section to be Entitled ``Endorsements'' or
+to conflict in title with any Invariant Section.
+
+@item
+Preserve any Warranty Disclaimers.
+@end enumerate
+
+If the Modified Version includes new front-matter sections or
+appendices that qualify as Secondary Sections and contain no material
+copied from the Document, you may at your option designate some or all
+of these sections as invariant. To do this, add their titles to the
+list of Invariant Sections in the Modified Version's license notice.
+These titles must be distinct from any other section titles.
+
+You may add a section Entitled ``Endorsements'', provided it contains
+nothing but endorsements of your Modified Version by various
+parties---for example, statements of peer review or that the text has
+been approved by an organization as the authoritative definition of a
+standard.
+
+You may add a passage of up to five words as a Front-Cover Text, and a
+passage of up to 25 words as a Back-Cover Text, to the end of the list
+of Cover Texts in the Modified Version. Only one passage of
+Front-Cover Text and one of Back-Cover Text may be added by (or
+through arrangements made by) any one entity. If the Document already
+includes a cover text for the same cover, previously added by you or
+by arrangement made by the same entity you are acting on behalf of,
+you may not add another; but you may replace the old one, on explicit
+permission from the previous publisher that added the old one.
+
+The author(s) and publisher(s) of the Document do not by this License
+give permission to use their names for publicity for or to assert or
+imply endorsement of any Modified Version.
+
+@item
+COMBINING DOCUMENTS
+
+You may combine the Document with other documents released under this
+License, under the terms defined in section 4 above for modified
+versions, provided that you include in the combination all of the
+Invariant Sections of all of the original documents, unmodified, and
+list them all as Invariant Sections of your combined work in its
+license notice, and that you preserve all their Warranty Disclaimers.
+
+The combined work need only contain one copy of this License, and
+multiple identical Invariant Sections may be replaced with a single
+copy. If there are multiple Invariant Sections with the same name but
+different contents, make the title of each such section unique by
+adding at the end of it, in parentheses, the name of the original
+author or publisher of that section if known, or else a unique number.
+Make the same adjustment to the section titles in the list of
+Invariant Sections in the license notice of the combined work.
+
+In the combination, you must combine any sections Entitled ``History''
+in the various original documents, forming one section Entitled
+``History''; likewise combine any sections Entitled ``Acknowledgements'',
+and any sections Entitled ``Dedications''. You must delete all
+sections Entitled ``Endorsements.''
+
+@item
+COLLECTIONS OF DOCUMENTS
+
+You may make a collection consisting of the Document and other documents
+released under this License, and replace the individual copies of this
+License in the various documents with a single copy that is included in
+the collection, provided that you follow the rules of this License for
+verbatim copying of each of the documents in all other respects.
+
+You may extract a single document from such a collection, and distribute
+it individually under this License, provided you insert a copy of this
+License into the extracted document, and follow this License in all
+other respects regarding verbatim copying of that document.
+
+@item
+AGGREGATION WITH INDEPENDENT WORKS
+
+A compilation of the Document or its derivatives with other separate
+and independent documents or works, in or on a volume of a storage or
+distribution medium, is called an ``aggregate'' if the copyright
+resulting from the compilation is not used to limit the legal rights
+of the compilation's users beyond what the individual works permit.
+When the Document is included in an aggregate, this License does not
+apply to the other works in the aggregate which are not themselves
+derivative works of the Document.
+
+If the Cover Text requirement of section 3 is applicable to these
+copies of the Document, then if the Document is less than one half of
+the entire aggregate, the Document's Cover Texts may be placed on
+covers that bracket the Document within the aggregate, or the
+electronic equivalent of covers if the Document is in electronic form.
+Otherwise they must appear on printed covers that bracket the whole
+aggregate.
+
+@item
+TRANSLATION
+
+Translation is considered a kind of modification, so you may
+distribute translations of the Document under the terms of section 4.
+Replacing Invariant Sections with translations requires special
+permission from their copyright holders, but you may include
+translations of some or all Invariant Sections in addition to the
+original versions of these Invariant Sections. You may include a
+translation of this License, and all the license notices in the
+Document, and any Warranty Disclaimers, provided that you also include
+the original English version of this License and the original versions
+of those notices and disclaimers. In case of a disagreement between
+the translation and the original version of this License or a notice
+or disclaimer, the original version will prevail.
+
+If a section in the Document is Entitled ``Acknowledgements'',
+``Dedications'', or ``History'', the requirement (section 4) to Preserve
+its Title (section 1) will typically require changing the actual
+title.
+
+@item
+TERMINATION
+
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
+
+@item
+FUTURE REVISIONS OF THIS LICENSE
+
+The Free Software Foundation may publish new, revised versions
+of the GNU Free Documentation License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns. See
+@uref{http://www.gnu.org/copyleft/}.
+
+Each version of the License is given a distinguishing version number.
+If the Document specifies that a particular numbered version of this
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that specified version or
+of any later version that has been published (not as a draft) by the
+Free Software Foundation. If the Document does not specify a version
+number of this License, you may choose any version ever published (not
+as a draft) by the Free Software Foundation. If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
+@item
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works. A
+public wiki that anybody can edit is an example of such a server. A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
+@end enumerate
+
+@page
+@heading ADDENDUM: How to use this License for your documents
+
+To use this License in a document you have written, include a copy of
+the License in the document and put the following copyright and
+license notices just after the title page:
+
+@smallexample
+@group
+ Copyright (C) @var{year} @var{your name}.
+ Permission is granted to copy, distribute and/or modify this document
+ under the terms of the GNU Free Documentation License, Version 1.3
+ or any later version published by the Free Software Foundation;
+ with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
+ Texts. A copy of the license is included in the section entitled ``GNU
+ Free Documentation License''.
+@end group
+@end smallexample
+
+If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
+replace the ``with@dots{}Texts.'' line with this:
+
+@smallexample
+@group
+ with the Invariant Sections being @var{list their titles}, with
+ the Front-Cover Texts being @var{list}, and with the Back-Cover Texts
+ being @var{list}.
+@end group
+@end smallexample
+
+If you have Invariant Sections without Cover Texts, or some other
+combination of the three, merge those two alternatives to suit the
+situation.
+
+If your document contains nontrivial examples of program code, we
+recommend releasing these examples in parallel under your choice of
+free software license, such as the GNU General Public License,
+to permit their use in free software.
+
+@c Local Variables:
+@c ispell-local-pdict: "ispell-dict"
+@c End:
+
diff --git a/doc/gendocs_template b/doc/gendocs_template
new file mode 100755
index 00000000..ee6a5c56
--- /dev/null
+++ b/doc/gendocs_template
@@ -0,0 +1,96 @@
+<!--#include virtual="/server/header.html" -->
+<title>%%TITLE%% - GNU Project - Free Software Foundation (FSF)</title>
+<!--#include virtual="/server/banner.html" -->
+<h2>%%TITLE%%</h2>
+
+<!-- This document is in XML, and xhtml 1.0 -->
+<!-- Please make sure to properly nest your tags -->
+<!-- and ensure that your final document validates -->
+<!-- consistent with W3C xhtml 1.0 and CSS standards -->
+<!-- See validator.w3.org -->
+
+<address>Free Software Foundation</address>
+<address>last updated %%DATE%%</address>
+
+<p>This manual (%%PACKAGE%%) is available in the following formats:</p>
+
+<ul>
+<li><a href="%%PACKAGE%%.html">HTML
+ (%%HTML_MONO_SIZE%%K bytes)</a> - entirely on one web page.</li>
+<li><a href="html_node/index.html">HTML</a> - with one web page per
+ node.</li>
+%%IF HTML_SECTION%%
+<li><a href="html_section/index.html">HTML</a> - with one web page per
+ section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="html_chapter/index.html">HTML</a> - with one web page per
+ chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html.gz">HTML compressed
+ (%%HTML_MONO_GZ_SIZE%%K gzipped characters)</a> - entirely on
+ one web page.</li>
+<li><a href="%%PACKAGE%%.html_node.tar.gz">HTML compressed
+ (%%HTML_NODE_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per node.</li>
+%%IF HTML_SECTION%%
+<li><a href="%%PACKAGE%%.html_section.tar.gz">HTML compressed
+ (%%HTML_SECTION_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per section.</li>
+%%ENDIF HTML_SECTION%%
+%%IF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.html_chapter.tar.gz">HTML compressed
+ (%%HTML_CHAPTER_TGZ_SIZE%%K gzipped tar file)</a> -
+ with one web page per chapter.</li>
+%%ENDIF HTML_CHAPTER%%
+<li><a href="%%PACKAGE%%.info.tar.gz">Info document
+ (%%INFO_TGZ_SIZE%%K bytes gzipped tar file)</a>.</li>
+<li><a href="%%PACKAGE%%.txt">ASCII text
+ (%%ASCII_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.txt.gz">ASCII text compressed
+ (%%ASCII_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.dvi.gz">TeX dvi file
+ (%%DVI_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.ps.gz">PostScript file
+ (%%PS_GZ_SIZE%%K bytes gzipped)</a>.</li>
+<li><a href="%%PACKAGE%%.pdf">PDF file
+ (%%PDF_SIZE%%K bytes)</a>.</li>
+<li><a href="%%PACKAGE%%.texi.tar.gz">Texinfo source
+ (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li>
+</ul>
+
+<p>You can <a href="http://shop.fsf.org/">buy printed copies of
+some manuals</a> (among other items) from the Free Software Foundation;
+this helps support FSF activities.</p>
+
+<p>(This page generated by the <a href="%%SCRIPTURL%%">%%SCRIPTNAME%%
+script</a>.)</p>
+
+<!-- If needed, change the copyright block at the bottom. In general, -->
+<!-- all pages on the GNU web server should have the section about -->
+<!-- verbatim copying. Please do NOT remove this without talking -->
+<!-- with the webmasters first. -->
+<!-- Please make sure the copyright date is consistent with the document -->
+<!-- and that it is like this "2001, 2002" not this "2001-2002." -->
+</div><!-- for id="content", starts in the include above -->
+<!--#include virtual="/server/footer.html" -->
+<div id="footer">
+
+<p>
+Please send FSF &amp; GNU inquiries to
+<a href="mailto:gnu@gnu.org">&lt;gnu@gnu.org&gt;</a>.
+There are also <a href="/contact/">other ways to contact</a>
+the FSF.<br />
+Please send broken links and other corrections or suggestions to
+<a href="mailto:%%EMAIL%%">&lt;%%EMAIL%%&gt;</a>.
+</p>
+
+<p>Copyright &copy; 2009 Free Software Foundation, Inc.</p>
+
+<p>Verbatim copying and distribution of this entire article is
+permitted in any medium, provided this notice is preserved.</p>
+
+</div>
+</div>
+</body>
+</html>
diff --git a/doc/gpl-3.0.texi b/doc/gpl-3.0.texi
new file mode 100755
index 00000000..97a17e19
--- /dev/null
+++ b/doc/gpl-3.0.texi
@@ -0,0 +1,717 @@
+@c The GNU General Public License.
+@center Version 3, 29 June 2007
+
+@c This file is intended to be included within another document,
+@c hence no sectioning command or @node.
+
+@display
+Copyright @copyright{} 2007 Free Software Foundation, Inc. @url{http://fsf.org/}
+
+Everyone is permitted to copy and distribute verbatim copies of this
+license document, but changing it is not allowed.
+@end display
+
+@heading Preamble
+
+The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom
+to share and change all versions of a program---to make sure it remains
+free software for all its users. We, the Free Software Foundation,
+use the GNU General Public License for most of our software; it
+applies also to any other work released this way by its authors. You
+can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you
+have certain responsibilities if you distribute copies of the
+software, or if you modify it: responsibilities to respect the freedom
+of others.
+
+For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too,
+receive or can get the source code. And you must show them these
+terms so they know their rights.
+
+Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the
+manufacturer can do so. This is fundamentally incompatible with the
+aim of protecting users' freedom to change the software. The
+systematic pattern of such abuse occurs in the area of products for
+individuals to use, which is precisely where it is most unacceptable.
+Therefore, we have designed this version of the GPL to prohibit the
+practice for those products. If such problems arise substantially in
+other domains, we stand ready to extend this provision to those
+domains in future versions of the GPL, as needed to protect the
+freedom of users.
+
+Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish
+to avoid the special danger that patents applied to a free program
+could make it effectively proprietary. To prevent this, the GPL
+assures that patents cannot be used to render the program non-free.
+
+The precise terms and conditions for copying, distribution and
+modification follow.
+
+@heading TERMS AND CONDITIONS
+
+@enumerate 0
+@item Definitions.
+
+``This License'' refers to version 3 of the GNU General Public License.
+
+``Copyright'' also means copyright-like laws that apply to other kinds
+of works, such as semiconductor masks.
+
+``The Program'' refers to any copyrightable work licensed under this
+License. Each licensee is addressed as ``you''. ``Licensees'' and
+``recipients'' may be individuals or organizations.
+
+To ``modify'' a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of
+an exact copy. The resulting work is called a ``modified version'' of
+the earlier work or a work ``based on'' the earlier work.
+
+A ``covered work'' means either the unmodified Program or a work based
+on the Program.
+
+To ``propagate'' a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+To ``convey'' a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user
+through a computer network, with no transfer of a copy, is not
+conveying.
+
+An interactive user interface displays ``Appropriate Legal Notices'' to
+the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+@item Source Code.
+
+The ``source code'' for a work means the preferred form of the work for
+making modifications to it. ``Object code'' means any non-source form
+of a work.
+
+A ``Standard Interface'' means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+The ``System Libraries'' of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+``Major Component'', in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+The ``Corresponding Source'' for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+The Corresponding Source need not include anything that users can
+regenerate automatically from other parts of the Corresponding Source.
+
+The Corresponding Source for a work in source code form is that same
+work.
+
+@item Basic Permissions.
+
+All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+You may make, run and propagate covered works that you do not convey,
+without conditions so long as your license otherwise remains in force.
+You may convey covered works to others for the sole purpose of having
+them make modifications exclusively for you, or provide you with
+facilities for running those works, provided that you comply with the
+terms of this License in conveying all material for which you do not
+control copyright. Those thus making or running the covered works for
+you must do so exclusively on your behalf, under your direction and
+control, on terms that prohibit them from making any copies of your
+copyrighted material outside their relationship with you.
+
+Conveying under any other circumstances is permitted solely under the
+conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+@item Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such
+circumvention is effected by exercising rights under this License with
+respect to the covered work, and you disclaim any intention to limit
+operation or modification of the work as a means of enforcing, against
+the work's users, your or third parties' legal rights to forbid
+circumvention of technological measures.
+
+@item Conveying Verbatim Copies.
+
+You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+@item Conveying Modified Source Versions.
+
+You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these
+conditions:
+
+@enumerate a
+@item
+The work must carry prominent notices stating that you modified it,
+and giving a relevant date.
+
+@item
+The work must carry prominent notices stating that it is released
+under this License and any conditions added under section 7. This
+requirement modifies the requirement in section 4 to ``keep intact all
+notices''.
+
+@item
+You must license the entire work, as a whole, under this License to
+anyone who comes into possession of a copy. This License will
+therefore apply, along with any applicable section 7 additional terms,
+to the whole of the work, and all its parts, regardless of how they
+are packaged. This License gives no permission to license the work in
+any other way, but it does not invalidate such permission if you have
+separately received it.
+
+@item
+If the work has interactive user interfaces, each must display
+Appropriate Legal Notices; however, if the Program has interactive
+interfaces that do not display Appropriate Legal Notices, your work
+need not make them do so.
+@end enumerate
+
+A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+``aggregate'' if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+@item Conveying Non-Source Forms.
+
+You may convey a covered work in object code form under the terms of
+sections 4 and 5, provided that you also convey the machine-readable
+Corresponding Source under the terms of this License, in one of these
+ways:
+
+@enumerate a
+@item
+Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by the
+Corresponding Source fixed on a durable physical medium customarily
+used for software interchange.
+
+@item
+Convey the object code in, or embodied in, a physical product
+(including a physical distribution medium), accompanied by a written
+offer, valid for at least three years and valid for as long as you
+offer spare parts or customer support for that product model, to give
+anyone who possesses the object code either (1) a copy of the
+Corresponding Source for all the software in the product that is
+covered by this License, on a durable physical medium customarily used
+for software interchange, for a price no more than your reasonable
+cost of physically performing this conveying of source, or (2) access
+to copy the Corresponding Source from a network server at no charge.
+
+@item
+Convey individual copies of the object code with a copy of the written
+offer to provide the Corresponding Source. This alternative is
+allowed only occasionally and noncommercially, and only if you
+received the object code with such an offer, in accord with subsection
+6b.
+
+@item
+Convey the object code by offering access from a designated place
+(gratis or for a charge), and offer equivalent access to the
+Corresponding Source in the same way through the same place at no
+further charge. You need not require recipients to copy the
+Corresponding Source along with the object code. If the place to copy
+the object code is a network server, the Corresponding Source may be
+on a different server (operated by you or a third party) that supports
+equivalent copying facilities, provided you maintain clear directions
+next to the object code saying where to find the Corresponding Source.
+Regardless of what server hosts the Corresponding Source, you remain
+obligated to ensure that it is available for as long as needed to
+satisfy these requirements.
+
+@item
+Convey the object code using peer-to-peer transmission, provided you
+inform other peers where the object code and Corresponding Source of
+the work are being offered to the general public at no charge under
+subsection 6d.
+
+@end enumerate
+
+A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+A ``User Product'' is either (1) a ``consumer product'', which means any
+tangible personal property which is normally used for personal,
+family, or household purposes, or (2) anything designed or sold for
+incorporation into a dwelling. In determining whether a product is a
+consumer product, doubtful cases shall be resolved in favor of
+coverage. For a particular product received by a particular user,
+``normally used'' refers to a typical or common use of that class of
+product, regardless of the status of the particular user or of the way
+in which the particular user actually uses, or expects or is expected
+to use, the product. A product is a consumer product regardless of
+whether the product has substantial commercial, industrial or
+non-consumer uses, unless such uses represent the only significant
+mode of use of the product.
+
+``Installation Information'' for a User Product means any methods,
+procedures, authorization keys, or other information required to
+install and execute modified versions of a covered work in that User
+Product from a modified version of its Corresponding Source. The
+information must suffice to ensure that the continued functioning of
+the modified object code is in no case prevented or interfered with
+solely because modification has been made.
+
+If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or
+updates for a work that has been modified or installed by the
+recipient, or for the User Product in which it has been modified or
+installed. Access to a network may be denied when the modification
+itself materially and adversely affects the operation of the network
+or violates the rules and protocols for communication across the
+network.
+
+Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+@item Additional Terms.
+
+``Additional permissions'' are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders
+of that material) supplement the terms of this License with terms:
+
+@enumerate a
+@item
+Disclaiming warranty or limiting liability differently from the terms
+of sections 15 and 16 of this License; or
+
+@item
+Requiring preservation of specified reasonable legal notices or author
+attributions in that material or in the Appropriate Legal Notices
+displayed by works containing it; or
+
+@item
+Prohibiting misrepresentation of the origin of that material, or
+requiring that modified versions of such material be marked in
+reasonable ways as different from the original version; or
+
+@item
+Limiting the use for publicity purposes of names of licensors or
+authors of the material; or
+
+@item
+Declining to grant rights under trademark law for use of some trade
+names, trademarks, or service marks; or
+
+@item
+Requiring indemnification of licensors and authors of that material by
+anyone who conveys the material (or modified versions of it) with
+contractual assumptions of liability to the recipient, for any
+liability that these contractual assumptions directly impose on those
+licensors and authors.
+@end enumerate
+
+All other non-permissive additional terms are considered ``further
+restrictions'' within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions; the
+above requirements apply either way.
+
+@item Termination.
+
+You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+@item Acceptance Not Required for Having Copies.
+
+You are not required to accept this License in order to receive or run
+a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+@item Automatic Licensing of Downstream Recipients.
+
+Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+An ``entity transaction'' is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+@item Patents.
+
+A ``contributor'' is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's ``contributor version''.
+
+A contributor's ``essential patent claims'' are all patent claims owned
+or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, ``control'' includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+In the following three paragraphs, a ``patent license'' is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To ``grant'' such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. ``Knowingly relying'' means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+A patent license is ``discriminatory'' if it does not include within the
+scope of its coverage, prohibits the exercise of, or is conditioned on
+the non-exercise of one or more of the rights that are specifically
+granted under this License. You may not convey a covered work if you
+are a party to an arrangement with a third party that is in the
+business of distributing software, under which you make payment to the
+third party based on the extent of your activity of conveying the
+work, and under which the third party grants, to any of the parties
+who would receive the covered work from you, a discriminatory patent
+license (a) in connection with copies of the covered work conveyed by
+you (or copies made from those copies), or (b) primarily for and in
+connection with specific products or compilations that contain the
+covered work, unless you entered into that arrangement, or that patent
+license was granted, prior to 28 March 2007.
+
+Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+@item No Surrender of Others' Freedom.
+
+If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey
+a covered work so as to satisfy simultaneously your obligations under
+this License and any other pertinent obligations, then as a
+consequence you may not convey it at all. For example, if you agree
+to terms that obligate you to collect a royalty for further conveying
+from those to whom you convey the Program, the only way you could
+satisfy both those terms and this License would be to refrain entirely
+from conveying the Program.
+
+@item Use with the GNU Affero General Public License.
+
+Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+@item Revised Versions of this License.
+
+The Free Software Foundation may publish revised and/or new versions
+of the GNU General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies that a certain numbered version of the GNU General Public
+License ``or any later version'' applies to it, you have the option of
+following the terms and conditions either of that numbered version or
+of any later version published by the Free Software Foundation. If
+the Program does not specify a version number of the GNU General
+Public License, you may choose any version ever published by the Free
+Software Foundation.
+
+If the Program specifies that a proxy can decide which future versions
+of the GNU General Public License can be used, that proxy's public
+statement of acceptance of a version permanently authorizes you to
+choose that version for the Program.
+
+Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+@item Disclaimer of Warranty.
+
+THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM ``AS IS'' WITHOUT
+WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND
+PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE
+DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR
+CORRECTION.
+
+@item Limitation of Liability.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR
+CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
+ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
+NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
+LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
+TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
+PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+@item Interpretation of Sections 15 and 16.
+
+If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+@end enumerate
+
+@heading END OF TERMS AND CONDITIONS
+
+@heading How to Apply These Terms to Your New Programs
+
+If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the ``copyright'' line and a pointer to where the full notice is found.
+
+@smallexample
+@var{one line to give the program's name and a brief idea of what it does.}
+Copyright (C) @var{year} @var{name of author}
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU 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
+General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see @url{http://www.gnu.org/licenses/}.
+@end smallexample
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+@smallexample
+@var{program} Copyright (C) @var{year} @var{name of author}
+This program comes with ABSOLUTELY NO WARRANTY; for details type @samp{show w}.
+This is free software, and you are welcome to redistribute it
+under certain conditions; type @samp{show c} for details.
+@end smallexample
+
+The hypothetical commands @samp{show w} and @samp{show c} should show
+the appropriate parts of the General Public License. Of course, your
+program's commands might be different; for a GUI interface, you would
+use an ``about box''.
+
+You should also get your employer (if you work as a programmer) or school,
+if any, to sign a ``copyright disclaimer'' for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+@url{http://www.gnu.org/licenses/}.
+
+The GNU General Public License does not permit incorporating your
+program into proprietary programs. If your program is a subroutine
+library, you may consider it more useful to permit linking proprietary
+applications with the library. If this is what you want to do, use
+the GNU Lesser General Public License instead of this License. But
+first, please read @url{http://www.gnu.org/philosophy/why-not-lgpl.html}.
diff --git a/doc/regexprops-generic.texi b/doc/regexprops-generic.texi
new file mode 100755
index 00000000..bdbf0730
--- /dev/null
+++ b/doc/regexprops-generic.texi
@@ -0,0 +1,715 @@
+@c Copyright (C) 1994, 1996, 1998, 2000, 2001, 2003, 2004, 2005, 2006, 2007,
+@c 2009, 2010 Free Software Foundation, Inc.
+@c
+@c Permission is granted to copy, distribute and/or modify this document
+@c under the terms of the GNU Free Documentation License, Version 1.3 or
+@c any later version published by the Free Software Foundation; with no
+@c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
+@c Texts. A copy of the license is included in the ``GNU Free
+@c Documentation License'' file as part of this distribution.
+
+@c this regular expression description is for: generic
+
+@menu
+* awk regular expression syntax::
+* egrep regular expression syntax::
+* ed regular expression syntax::
+* emacs regular expression syntax::
+* gnu-awk regular expression syntax::
+* grep regular expression syntax::
+* posix-awk regular expression syntax::
+* posix-basic regular expression syntax::
+* posix-egrep regular expression syntax::
+* posix-extended regular expression syntax::
+* posix-minimal-basic regular expression syntax::
+* sed regular expression syntax::
+@end menu
+
+@node awk regular expression syntax
+@subsection @samp{awk} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}.
+
+GNU extensions are not supported and so @samp{\w}, @samp{\W}, @samp{\<}, @samp{\>}, @samp{\b}, @samp{\B}, @samp{\`}, and @samp{\'} match @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively.
+
+Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit matches that digit.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node egrep regular expression syntax
+@subsection @samp{egrep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression.
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node ed regular expression syntax
+@subsection @samp{ed} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item \+
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item \?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item + and ?
+match themselves.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{\*}, @samp{\+} and @samp{\?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{\@{} and @samp{\@}}. Invalid intervals such as @samp{a\@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node emacs regular expression syntax
+@subsection @samp{emacs} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are not supported, so for example you would need to use @samp{[0-9]} instead of @samp{[[:digit:]]}.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node gnu-awk regular expression syntax
+@subsection @samp{gnu-awk} regular expression syntax
+
+
+The character @samp{.} matches any single character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node grep regular expression syntax
+@subsection @samp{grep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item \+
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item \?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item + and ?
+match themselves.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}.
+
+The alternation operator is @samp{\|}.
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@item After a newline
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@item Before a newline
+
+@item Before the alternation operator @samp{\|}
+
+@end enumerate
+
+
+@samp{\*}, @samp{\+} and @samp{\?} are special at any point in a regular expression except:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+@item After a newline
+
+@item After the alternation operator @samp{\|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{\@{} and @samp{\@}}. Invalid intervals such as @samp{a\@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-awk regular expression syntax
+@subsection @samp{posix-awk} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} can be used to quote the following character. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are not supported and so @samp{\w}, @samp{\W}, @samp{\<}, @samp{\>}, @samp{\b}, @samp{\B}, @samp{\`}, and @samp{\'} match @samp{w}, @samp{W}, @samp{<}, @samp{>}, @samp{b}, @samp{B}, @samp{`}, and @samp{'} respectively.
+
+Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals such as @samp{a@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-basic regular expression syntax
+@subsection @samp{posix-basic} regular expression syntax
+This is a synonym for ed.
+@node posix-egrep regular expression syntax
+@subsection @samp{posix-egrep} regular expression syntax
+
+
+The character @samp{.} matches any single character except newline.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are ignored. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit. Non-matching lists @samp{[^@dots{}]} do not ever match newline.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+The characters @samp{*}, @samp{+} and @samp{?} are special anywhere in a regular expression.
+
+Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals are treated as literals, for example @samp{a@{1} is treated as @samp{a\@{1}
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-extended regular expression syntax
+@subsection @samp{posix-extended} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+@table @samp
+
+@item +
+indicates that the regular expression should match one or more occurrences of the previous atom or regexp.
+@item ?
+indicates that the regular expression should match zero or one occurrence of the previous atom or regexp.
+@item \+
+matches a @samp{+}
+@item \?
+matches a @samp{?}.
+@end table
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with parentheses @samp{()}. An unmatched @samp{)} matches just itself. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{(}.
+
+The alternation operator is @samp{|}.
+
+The characters @samp{^} and @samp{$} always represent the beginning and end of a string respectively, except within square brackets. Within brackets, @samp{^} can be used to invert the membership of the character class being specified.
+
+@samp{*}, @samp{+} and @samp{?} are special at any point in a regular expression except the following places, where they are not allowed:
+@enumerate
+
+@item At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{(}
+@item After the alternation operator @samp{|}
+
+@end enumerate
+
+
+Intervals are specified by @samp{@{} and @samp{@}}. Invalid intervals such as @samp{a@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node posix-minimal-basic regular expression syntax
+@subsection @samp{posix-minimal-basic} regular expression syntax
+
+
+The character @samp{.} matches any single character except the null character.
+
+
+
+Bracket expressions are used to match ranges of characters. Bracket expressions where the range is backward, for example @samp{[z-a]}, are invalid. Within square brackets, @samp{\} is taken literally. Character classes are supported; for example @samp{[[:digit:]]} will match a single decimal digit.
+
+GNU extensions are supported:
+@enumerate
+
+@item @samp{\w} matches a character within a word
+
+@item @samp{\W} matches a character which is not within a word
+
+@item @samp{\<} matches the beginning of a word
+
+@item @samp{\>} matches the end of a word
+
+@item @samp{\b} matches a word boundary
+
+@item @samp{\B} matches characters which are not a word boundary
+
+@item @samp{\`} matches the beginning of the whole input
+
+@item @samp{\'} matches the end of the whole input
+
+@end enumerate
+
+
+Grouping is performed with backslashes followed by parentheses @samp{\(}, @samp{\)}. A backslash followed by a digit acts as a back-reference and matches the same thing as the previous grouped expression indicated by that number. For example @samp{\2} matches the second group expression. The order of group expressions is determined by the position of their opening parenthesis @samp{\(}.
+
+
+
+The character @samp{^} only represents the beginning of a string when it appears:
+@enumerate
+
+@item
+At the beginning of a regular expression
+
+@item After an open-group, signified by
+@samp{\(}
+
+@end enumerate
+
+
+The character @samp{$} only represents the end of a string when it appears:
+@enumerate
+
+@item At the end of a regular expression
+
+@item Before a close-group, signified by
+@samp{\)}
+@end enumerate
+
+
+
+
+Intervals are specified by @samp{\@{} and @samp{\@}}. Invalid intervals such as @samp{a\@{1z} are not accepted.
+
+The longest possible match is returned; this applies to the regular expression as a whole and (subject to this constraint) to subexpressions within groups.
+
+
+@node sed regular expression syntax
+@subsection @samp{sed} regular expression syntax
+This is a synonym for ed. \ No newline at end of file
diff --git a/gnu/Makefile.am b/gnu/Makefile.am
new file mode 100755
index 00000000..55695fc4
--- /dev/null
+++ b/gnu/Makefile.am
@@ -0,0 +1,2606 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes maintainer-makefile memchr2 memcmp2 memmem mkstemp obstack obstack-printf-posix pipe progname propername quote regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv update-copyright vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 xoset xprintf-posix xstrndup xvasprintf-posix
+
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
+
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES =
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS =
+AM_CFLAGS =
+
+noinst_LTLIBRARIES += libgnu.la
+
+libgnu_la_SOURCES =
+libgnu_la_LIBADD = $(M4_LTLIBOBJS)
+libgnu_la_DEPENDENCIES = $(M4_LTLIBOBJS)
+EXTRA_libgnu_la_SOURCES =
+libgnu_la_LDFLAGS = $(AM_LDFLAGS)
+
+## begin gnulib module alloca
+
+
+EXTRA_DIST += alloca.c
+
+EXTRA_libgnu_la_SOURCES += alloca.c
+
+libgnu_la_LIBADD += @LTALLOCA@
+libgnu_la_DEPENDENCIES += @LTALLOCA@
+## end gnulib module alloca
+
+## begin gnulib module alloca-opt
+
+BUILT_SOURCES += $(ALLOCA_H)
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+MOSTLYCLEANFILES += alloca.h alloca.h-t
+
+EXTRA_DIST += alloca.in.h
+
+## end gnulib module alloca-opt
+
+## begin gnulib module arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
+
+## end gnulib module arg-nonnull
+
+## begin gnulib module avltree-oset
+
+libgnu_la_SOURCES += gl_avltree_oset.h gl_avltree_oset.c gl_anytree_oset.h
+
+## end gnulib module avltree-oset
+
+## begin gnulib module binary-io
+
+libgnu_la_SOURCES += binary-io.h
+
+## end gnulib module binary-io
+
+## begin gnulib module bitrotate
+
+libgnu_la_SOURCES += bitrotate.h
+
+## end gnulib module bitrotate
+
+## begin gnulib module btowc
+
+
+EXTRA_DIST += btowc.c
+
+EXTRA_libgnu_la_SOURCES += btowc.c
+
+## end gnulib module btowc
+
+## begin gnulib module c-ctype
+
+libgnu_la_SOURCES += c-ctype.h c-ctype.c
+
+## end gnulib module c-ctype
+
+## begin gnulib module c-strcase
+
+libgnu_la_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c
+
+## end gnulib module c-strcase
+
+## begin gnulib module canonicalize-lgpl
+
+
+EXTRA_DIST += canonicalize-lgpl.c
+
+EXTRA_libgnu_la_SOURCES += canonicalize-lgpl.c
+
+## end gnulib module canonicalize-lgpl
+
+## begin gnulib module clean-temp
+
+libgnu_la_SOURCES += clean-temp.h clean-temp.c
+
+## end gnulib module clean-temp
+
+## begin gnulib module cloexec
+
+
+EXTRA_DIST += cloexec.c cloexec.h
+
+EXTRA_libgnu_la_SOURCES += cloexec.c
+
+## end gnulib module cloexec
+
+## begin gnulib module close-stream
+
+
+EXTRA_DIST += close-stream.c close-stream.h
+
+EXTRA_libgnu_la_SOURCES += close-stream.c
+
+## end gnulib module close-stream
+
+## begin gnulib module closein
+
+
+EXTRA_DIST += closein.c closein.h
+
+EXTRA_libgnu_la_SOURCES += closein.c
+
+## end gnulib module closein
+
+## begin gnulib module closeout
+
+
+EXTRA_DIST += closeout.c closeout.h
+
+EXTRA_libgnu_la_SOURCES += closeout.c
+
+## end gnulib module closeout
+
+## begin gnulib module configmake
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ $(AM_V_GEN)rm -f $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t && \
+ if test -f $@ && cmp $@-t $@ > /dev/null; then \
+ rm -f $@-t; \
+ else \
+ rm -f $@; mv $@-t $@; \
+ fi
+
+BUILT_SOURCES += configmake.h
+CLEANFILES += configmake.h configmake.h-t
+
+## end gnulib module configmake
+
+## begin gnulib module dirname
+
+
+EXTRA_DIST += basename.c dirname.c stripslash.c
+
+EXTRA_libgnu_la_SOURCES += basename.c dirname.c stripslash.c
+
+## end gnulib module dirname
+
+## begin gnulib module dirname-lgpl
+
+
+EXTRA_DIST += basename-lgpl.c dirname-lgpl.c dirname.h stripslash.c
+
+EXTRA_libgnu_la_SOURCES += basename-lgpl.c dirname-lgpl.c stripslash.c
+
+## end gnulib module dirname-lgpl
+
+## begin gnulib module dup2
+
+
+EXTRA_DIST += dup2.c
+
+EXTRA_libgnu_la_SOURCES += dup2.c
+
+## end gnulib module dup2
+
+## begin gnulib module errno
+
+BUILT_SOURCES += $(ERRNO_H)
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += errno.h errno.h-t
+
+EXTRA_DIST += errno.in.h
+
+## end gnulib module errno
+
+## begin gnulib module error
+
+
+EXTRA_DIST += error.c error.h
+
+EXTRA_libgnu_la_SOURCES += error.c
+
+## end gnulib module error
+
+## begin gnulib module execute
+
+libgnu_la_SOURCES += execute.h execute.c w32spawn.h
+
+## end gnulib module execute
+
+## begin gnulib module exitfail
+
+
+EXTRA_DIST += exitfail.c exitfail.h
+
+EXTRA_libgnu_la_SOURCES += exitfail.c
+
+## end gnulib module exitfail
+
+## begin gnulib module fatal-signal
+
+libgnu_la_SOURCES += fatal-signal.h fatal-signal.c
+
+## end gnulib module fatal-signal
+
+## begin gnulib module fcntl
+
+
+EXTRA_DIST += fcntl.c
+
+EXTRA_libgnu_la_SOURCES += fcntl.c
+
+## end gnulib module fcntl
+
+## begin gnulib module fcntl-h
+
+BUILT_SOURCES += fcntl.h
+
+# We need the following in order to create <fcntl.h> when the system
+# doesn't have one that works with the given compiler.
+fcntl.h: fcntl.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
+ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
+ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
+ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/fcntl.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += fcntl.h fcntl.h-t
+
+EXTRA_DIST += fcntl.in.h
+
+## end gnulib module fcntl-h
+
+## begin gnulib module fd-safer-flag
+
+libgnu_la_SOURCES += fd-safer-flag.c dup-safer-flag.c
+
+## end gnulib module fd-safer-flag
+
+## begin gnulib module fflush
+
+
+EXTRA_DIST += fflush.c stdio-impl.h
+
+EXTRA_libgnu_la_SOURCES += fflush.c
+
+## end gnulib module fflush
+
+## begin gnulib module filenamecat
+
+
+EXTRA_DIST += filenamecat.c
+
+EXTRA_libgnu_la_SOURCES += filenamecat.c
+
+## end gnulib module filenamecat
+
+## begin gnulib module filenamecat-lgpl
+
+
+EXTRA_DIST += filenamecat-lgpl.c filenamecat.h
+
+EXTRA_libgnu_la_SOURCES += filenamecat-lgpl.c
+
+## end gnulib module filenamecat-lgpl
+
+## begin gnulib module float
+
+BUILT_SOURCES += $(FLOAT_H)
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+ < $(srcdir)/float.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += float.h float.h-t
+
+EXTRA_DIST += float.in.h
+
+## end gnulib module float
+
+## begin gnulib module fopen
+
+
+EXTRA_DIST += fopen.c
+
+EXTRA_libgnu_la_SOURCES += fopen.c
+
+## end gnulib module fopen
+
+## begin gnulib module fopen-safer
+
+
+EXTRA_DIST += fopen-safer.c stdio--.h stdio-safer.h
+
+EXTRA_libgnu_la_SOURCES += fopen-safer.c
+
+## end gnulib module fopen-safer
+
+## begin gnulib module fpending
+
+
+EXTRA_DIST += fpending.c fpending.h
+
+EXTRA_libgnu_la_SOURCES += fpending.c
+
+## end gnulib module fpending
+
+## begin gnulib module fpucw
+
+
+EXTRA_DIST += fpucw.h
+
+## end gnulib module fpucw
+
+## begin gnulib module fpurge
+
+
+EXTRA_DIST += fpurge.c stdio-impl.h
+
+EXTRA_libgnu_la_SOURCES += fpurge.c
+
+## end gnulib module fpurge
+
+## begin gnulib module freadahead
+
+libgnu_la_SOURCES += freadahead.c
+
+EXTRA_DIST += freadahead.h stdio-impl.h
+
+## end gnulib module freadahead
+
+## begin gnulib module freading
+
+libgnu_la_SOURCES += freading.c
+
+EXTRA_DIST += freading.h stdio-impl.h
+
+## end gnulib module freading
+
+## begin gnulib module freadptr
+
+libgnu_la_SOURCES += freadptr.c
+
+EXTRA_DIST += freadptr.h stdio-impl.h
+
+## end gnulib module freadptr
+
+## begin gnulib module freadseek
+
+libgnu_la_SOURCES += freadseek.c
+
+EXTRA_DIST += freadseek.h stdio-impl.h
+
+## end gnulib module freadseek
+
+## begin gnulib module frexp-nolibm
+
+
+EXTRA_DIST += frexp.c
+
+EXTRA_libgnu_la_SOURCES += frexp.c
+
+## end gnulib module frexp-nolibm
+
+## begin gnulib module frexpl-nolibm
+
+
+EXTRA_DIST += frexp.c frexpl.c
+
+EXTRA_libgnu_la_SOURCES += frexp.c frexpl.c
+
+## end gnulib module frexpl-nolibm
+
+## begin gnulib module fseeko
+
+
+EXTRA_DIST += fseeko.c stdio-impl.h
+
+EXTRA_libgnu_la_SOURCES += fseeko.c
+
+## end gnulib module fseeko
+
+## begin gnulib module fseterr
+
+libgnu_la_SOURCES += fseterr.c
+
+EXTRA_DIST += fseterr.h stdio-impl.h
+
+## end gnulib module fseterr
+
+## begin gnulib module ftello
+
+
+EXTRA_DIST += ftello.c
+
+EXTRA_libgnu_la_SOURCES += ftello.c
+
+## end gnulib module ftello
+
+## begin gnulib module gendocs
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gendocs.sh
+
+## end gnulib module gendocs
+
+## begin gnulib module getdtablesize
+
+
+EXTRA_DIST += getdtablesize.c
+
+EXTRA_libgnu_la_SOURCES += getdtablesize.c
+
+## end gnulib module getdtablesize
+
+## begin gnulib module gettext
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS += -I$(top_builddir)/intl
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module gettext
+
+## begin gnulib module gettext-h
+
+libgnu_la_SOURCES += gettext.h
+
+## end gnulib module gettext-h
+
+## begin gnulib module gettimeofday
+
+
+EXTRA_DIST += gettimeofday.c
+
+EXTRA_libgnu_la_SOURCES += gettimeofday.c
+
+## end gnulib module gettimeofday
+
+## begin gnulib module git-version-gen
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/git-version-gen
+
+## end gnulib module git-version-gen
+
+## begin gnulib module gnumakefile
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+ test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+
+EXTRA_DIST += $(top_srcdir)/GNUmakefile
+
+## end gnulib module gnumakefile
+
+## begin gnulib module gnupload
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/gnupload
+
+## end gnulib module gnupload
+
+## begin gnulib module gperf
+
+GPERF = gperf
+
+## end gnulib module gperf
+
+## begin gnulib module havelib
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/config.rpath
+
+## end gnulib module havelib
+
+## begin gnulib module iconv_open
+
+BUILT_SOURCES += $(ICONV_H)
+
+# We need the following in order to create <iconv.h> when the system
+# doesn't have one that works with the given compiler.
+iconv.h: iconv.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \
+ -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \
+ -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
+ -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
+ -e 's|@''REPLACE_ICONV_UTF''@|$(REPLACE_ICONV_UTF)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/iconv.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += iconv.h iconv.h-t
+
+iconv_open-aix.h: iconv_open-aix.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $(srcdir)/iconv_open-aix.h-t
+ mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h
+iconv_open-hpux.h: iconv_open-hpux.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > $(srcdir)/iconv_open-hpux.h-t
+ mv $(srcdir)/iconv_open-hpux.h-t $(srcdir)/iconv_open-hpux.h
+iconv_open-irix.h: iconv_open-irix.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > $(srcdir)/iconv_open-irix.h-t
+ mv $(srcdir)/iconv_open-irix.h-t $(srcdir)/iconv_open-irix.h
+iconv_open-osf.h: iconv_open-osf.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $(srcdir)/iconv_open-osf.h-t
+ mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h
+iconv_open-solaris.h: iconv_open-solaris.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t
+ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
+BUILT_SOURCES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+MOSTLYCLEANFILES += iconv_open-aix.h-t iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t iconv_open-solaris.h-t
+MAINTAINERCLEANFILES += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+EXTRA_DIST += iconv_open-aix.h iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+
+EXTRA_DIST += iconv.in.h iconv_open-aix.gperf iconv_open-hpux.gperf iconv_open-irix.gperf iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c
+
+EXTRA_libgnu_la_SOURCES += iconv_open.c
+
+## end gnulib module iconv_open
+
+## begin gnulib module intprops
+
+
+EXTRA_DIST += intprops.h
+
+## end gnulib module intprops
+
+## begin gnulib module inttypes
+
+BUILT_SOURCES += inttypes.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/inttypes.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += inttypes.h inttypes.h-t
+
+EXTRA_DIST += inttypes.in.h
+
+## end gnulib module inttypes
+
+## begin gnulib module isnand-nolibm
+
+
+EXTRA_DIST += float+.h isnan.c isnand-nolibm.h isnand.c
+
+EXTRA_libgnu_la_SOURCES += isnan.c isnand.c
+
+## end gnulib module isnand-nolibm
+
+## begin gnulib module isnanf-nolibm
+
+
+EXTRA_DIST += float+.h isnan.c isnanf-nolibm.h isnanf.c
+
+EXTRA_libgnu_la_SOURCES += isnan.c isnanf.c
+
+## end gnulib module isnanf-nolibm
+
+## begin gnulib module isnanl-nolibm
+
+
+EXTRA_DIST += float+.h isnan.c isnanl-nolibm.h isnanl.c
+
+EXTRA_libgnu_la_SOURCES += isnan.c isnanl.c
+
+## end gnulib module isnanl-nolibm
+
+## begin gnulib module langinfo
+
+BUILT_SOURCES += langinfo.h
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += langinfo.h langinfo.h-t
+
+EXTRA_DIST += langinfo.in.h
+
+## end gnulib module langinfo
+
+## begin gnulib module linkedhash-list
+
+libgnu_la_SOURCES += gl_linkedhash_list.h gl_linkedhash_list.c gl_anyhash_list1.h gl_anyhash_list2.h gl_anylinked_list1.h gl_anylinked_list2.h
+
+## end gnulib module linkedhash-list
+
+## begin gnulib module list
+
+libgnu_la_SOURCES += gl_list.h gl_list.c
+
+## end gnulib module list
+
+## begin gnulib module localcharset
+
+libgnu_la_SOURCES += localcharset.h localcharset.c
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+ mv t-$@ $@
+
+SUFFIXES += .sed .sin
+.sin.sed:
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+ mv t-$@ $@
+
+CLEANFILES += charset.alias ref-add.sed ref-del.sed
+
+EXTRA_DIST += config.charset ref-add.sin ref-del.sin
+
+## end gnulib module localcharset
+
+## begin gnulib module lseek
+
+
+EXTRA_DIST += lseek.c
+
+EXTRA_libgnu_la_SOURCES += lseek.c
+
+## end gnulib module lseek
+
+## begin gnulib module lstat
+
+
+EXTRA_DIST += lstat.c
+
+EXTRA_libgnu_la_SOURCES += lstat.c
+
+## end gnulib module lstat
+
+## begin gnulib module maintainer-makefile
+
+EXTRA_DIST += $(top_srcdir)/maint.mk
+
+## end gnulib module maintainer-makefile
+
+## begin gnulib module malloc
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_la_SOURCES += malloc.c
+
+## end gnulib module malloc
+
+## begin gnulib module malloc-posix
+
+
+EXTRA_DIST += malloc.c
+
+EXTRA_libgnu_la_SOURCES += malloc.c
+
+## end gnulib module malloc-posix
+
+## begin gnulib module malloca
+
+libgnu_la_SOURCES += malloca.c
+
+EXTRA_DIST += malloca.h malloca.valgrind
+
+## end gnulib module malloca
+
+## begin gnulib module math
+
+BUILT_SOURCES += math.h
+
+# We need the following in order to create <math.h> when the system
+# doesn't have one that works with the given compiler.
+math.h: math.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
+ -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
+ -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
+ -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
+ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
+ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
+ -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
+ -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
+ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
+ -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
+ -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
+ -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
+ -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
+ -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
+ -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
+ -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
+ -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
+ -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
+ -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
+ -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
+ -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
+ -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
+ -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
+ -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
+ -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
+ -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
+ -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
+ -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
+ -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
+ -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
+ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
+ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
+ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
+ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
+ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
+ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
+ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
+ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
+ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
+ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
+ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
+ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
+ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
+ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
+ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
+ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
+ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
+ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
+ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
+ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
+ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
+ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/math.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += math.h math.h-t
+
+EXTRA_DIST += math.in.h
+
+## end gnulib module math
+
+## begin gnulib module mbchar
+
+libgnu_la_SOURCES += mbchar.c
+
+EXTRA_DIST += mbchar.h
+
+## end gnulib module mbchar
+
+## begin gnulib module mbiter
+
+libgnu_la_SOURCES += mbiter.h
+
+## end gnulib module mbiter
+
+## begin gnulib module mbrtowc
+
+
+EXTRA_DIST += mbrtowc.c
+
+EXTRA_libgnu_la_SOURCES += mbrtowc.c
+
+## end gnulib module mbrtowc
+
+## begin gnulib module mbsinit
+
+
+EXTRA_DIST += mbsinit.c
+
+EXTRA_libgnu_la_SOURCES += mbsinit.c
+
+## end gnulib module mbsinit
+
+## begin gnulib module mbslen
+
+libgnu_la_SOURCES += mbslen.c
+
+## end gnulib module mbslen
+
+## begin gnulib module mbsstr
+
+libgnu_la_SOURCES += mbsstr.c
+
+EXTRA_DIST += str-kmp.h
+
+## end gnulib module mbsstr
+
+## begin gnulib module mbuiter
+
+libgnu_la_SOURCES += mbuiter.h
+
+## end gnulib module mbuiter
+
+## begin gnulib module memchr
+
+
+EXTRA_DIST += memchr.c memchr.valgrind
+
+EXTRA_libgnu_la_SOURCES += memchr.c
+
+## end gnulib module memchr
+
+## begin gnulib module memchr2
+
+libgnu_la_SOURCES += memchr2.h memchr2.c
+
+EXTRA_DIST += memchr2.valgrind
+
+## end gnulib module memchr2
+
+## begin gnulib module memcmp2
+
+libgnu_la_SOURCES += memcmp2.c
+
+EXTRA_DIST += memcmp2.h
+
+## end gnulib module memcmp2
+
+## begin gnulib module memmem-simple
+
+
+EXTRA_DIST += memmem.c str-two-way.h
+
+EXTRA_libgnu_la_SOURCES += memmem.c
+
+## end gnulib module memmem-simple
+
+## begin gnulib module mkdtemp
+
+
+EXTRA_DIST += mkdtemp.c
+
+EXTRA_libgnu_la_SOURCES += mkdtemp.c
+
+## end gnulib module mkdtemp
+
+## begin gnulib module mkstemp
+
+
+EXTRA_DIST += mkstemp.c
+
+EXTRA_libgnu_la_SOURCES += mkstemp.c
+
+## end gnulib module mkstemp
+
+## begin gnulib module nl_langinfo
+
+
+EXTRA_DIST += nl_langinfo.c
+
+EXTRA_libgnu_la_SOURCES += nl_langinfo.c
+
+## end gnulib module nl_langinfo
+
+## begin gnulib module obstack
+
+
+EXTRA_DIST += obstack.c obstack.h
+
+EXTRA_libgnu_la_SOURCES += obstack.c
+
+## end gnulib module obstack
+
+## begin gnulib module obstack-printf-posix
+
+
+EXTRA_DIST += obstack_printf.c
+
+EXTRA_libgnu_la_SOURCES += obstack_printf.c
+
+## end gnulib module obstack-printf-posix
+
+## begin gnulib module open
+
+
+EXTRA_DIST += open.c
+
+EXTRA_libgnu_la_SOURCES += open.c
+
+## end gnulib module open
+
+## begin gnulib module oset
+
+libgnu_la_SOURCES += gl_oset.h gl_oset.c
+
+## end gnulib module oset
+
+## begin gnulib module pathmax
+
+
+EXTRA_DIST += pathmax.h
+
+## end gnulib module pathmax
+
+## begin gnulib module pipe
+
+libgnu_la_SOURCES += pipe.h pipe.c w32spawn.h
+
+## end gnulib module pipe
+
+## begin gnulib module pipe2
+
+libgnu_la_SOURCES += pipe2.c
+
+## end gnulib module pipe2
+
+## begin gnulib module pipe2-safer
+
+libgnu_la_SOURCES += pipe2-safer.c
+
+## end gnulib module pipe2-safer
+
+## begin gnulib module posix_spawn-internal
+
+
+EXTRA_DIST += spawn_int.h spawni.c
+
+EXTRA_libgnu_la_SOURCES += spawni.c
+
+## end gnulib module posix_spawn-internal
+
+## begin gnulib module posix_spawn_file_actions_addclose
+
+
+EXTRA_DIST += spawn_faction_addclose.c spawn_int.h
+
+EXTRA_libgnu_la_SOURCES += spawn_faction_addclose.c
+
+## end gnulib module posix_spawn_file_actions_addclose
+
+## begin gnulib module posix_spawn_file_actions_adddup2
+
+
+EXTRA_DIST += spawn_faction_adddup2.c spawn_int.h
+
+EXTRA_libgnu_la_SOURCES += spawn_faction_adddup2.c
+
+## end gnulib module posix_spawn_file_actions_adddup2
+
+## begin gnulib module posix_spawn_file_actions_addopen
+
+
+EXTRA_DIST += spawn_faction_addopen.c spawn_int.h
+
+EXTRA_libgnu_la_SOURCES += spawn_faction_addopen.c
+
+## end gnulib module posix_spawn_file_actions_addopen
+
+## begin gnulib module posix_spawn_file_actions_destroy
+
+
+EXTRA_DIST += spawn_faction_destroy.c
+
+EXTRA_libgnu_la_SOURCES += spawn_faction_destroy.c
+
+## end gnulib module posix_spawn_file_actions_destroy
+
+## begin gnulib module posix_spawn_file_actions_init
+
+
+EXTRA_DIST += spawn_faction_init.c spawn_int.h
+
+EXTRA_libgnu_la_SOURCES += spawn_faction_init.c
+
+## end gnulib module posix_spawn_file_actions_init
+
+## begin gnulib module posix_spawnattr_destroy
+
+
+EXTRA_DIST += spawnattr_destroy.c
+
+EXTRA_libgnu_la_SOURCES += spawnattr_destroy.c
+
+## end gnulib module posix_spawnattr_destroy
+
+## begin gnulib module posix_spawnattr_init
+
+
+EXTRA_DIST += spawnattr_init.c
+
+EXTRA_libgnu_la_SOURCES += spawnattr_init.c
+
+## end gnulib module posix_spawnattr_init
+
+## begin gnulib module posix_spawnattr_setflags
+
+
+EXTRA_DIST += spawnattr_setflags.c
+
+EXTRA_libgnu_la_SOURCES += spawnattr_setflags.c
+
+## end gnulib module posix_spawnattr_setflags
+
+## begin gnulib module posix_spawnattr_setsigmask
+
+
+EXTRA_DIST += spawnattr_setsigmask.c
+
+EXTRA_libgnu_la_SOURCES += spawnattr_setsigmask.c
+
+## end gnulib module posix_spawnattr_setsigmask
+
+## begin gnulib module posix_spawnp
+
+
+EXTRA_DIST += spawnp.c
+
+EXTRA_libgnu_la_SOURCES += spawnp.c
+
+## end gnulib module posix_spawnp
+
+## begin gnulib module printf-frexp
+
+libgnu_la_SOURCES += printf-frexp.c
+
+EXTRA_DIST += printf-frexp.h
+
+## end gnulib module printf-frexp
+
+## begin gnulib module printf-frexpl
+
+libgnu_la_SOURCES += printf-frexpl.c
+
+EXTRA_DIST += printf-frexp.c printf-frexpl.h
+
+EXTRA_libgnu_la_SOURCES += printf-frexp.c
+
+## end gnulib module printf-frexpl
+
+## begin gnulib module progname
+
+libgnu_la_SOURCES += progname.h progname.c
+
+## end gnulib module progname
+
+## begin gnulib module propername
+
+libgnu_la_SOURCES += propername.h propername.c
+
+## end gnulib module propername
+
+## begin gnulib module quote
+
+
+EXTRA_DIST += quote.c quote.h
+
+EXTRA_libgnu_la_SOURCES += quote.c
+
+## end gnulib module quote
+
+## begin gnulib module quotearg
+
+
+EXTRA_DIST += quotearg.c quotearg.h
+
+EXTRA_libgnu_la_SOURCES += quotearg.c
+
+## end gnulib module quotearg
+
+## begin gnulib module rawmemchr
+
+
+EXTRA_DIST += rawmemchr.c rawmemchr.valgrind
+
+EXTRA_libgnu_la_SOURCES += rawmemchr.c
+
+## end gnulib module rawmemchr
+
+## begin gnulib module readlink
+
+
+EXTRA_DIST += readlink.c
+
+EXTRA_libgnu_la_SOURCES += readlink.c
+
+## end gnulib module readlink
+
+## begin gnulib module regex
+
+
+EXTRA_DIST += regcomp.c regex.c regex.h regex_internal.c regex_internal.h regexec.c
+
+EXTRA_libgnu_la_SOURCES += regcomp.c regex.c regex_internal.c regexec.c
+
+## end gnulib module regex
+
+## begin gnulib module rename
+
+
+EXTRA_DIST += rename.c
+
+EXTRA_libgnu_la_SOURCES += rename.c
+
+## end gnulib module rename
+
+## begin gnulib module rmdir
+
+
+EXTRA_DIST += rmdir.c
+
+EXTRA_libgnu_la_SOURCES += rmdir.c
+
+## end gnulib module rmdir
+
+## begin gnulib module same-inode
+
+
+EXTRA_DIST += same-inode.h
+
+## end gnulib module same-inode
+
+## begin gnulib module sched
+
+BUILT_SOURCES += $(SCHED_H)
+
+# We need the following in order to create a replacement for <sched.h> when
+# the system doesn't have one.
+sched.h: sched.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+ -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
+ < $(srcdir)/sched.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sched.h sched.h-t
+
+EXTRA_DIST += sched.in.h
+
+## end gnulib module sched
+
+## begin gnulib module setenv
+
+
+EXTRA_DIST += setenv.c
+
+EXTRA_libgnu_la_SOURCES += setenv.c
+
+## end gnulib module setenv
+
+## begin gnulib module sigaction
+
+
+EXTRA_DIST += sig-handler.h sigaction.c
+
+EXTRA_libgnu_la_SOURCES += sigaction.c
+
+## end gnulib module sigaction
+
+## begin gnulib module signal
+
+BUILT_SOURCES += signal.h
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
+ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += signal.h signal.h-t
+
+EXTRA_DIST += signal.in.h
+
+## end gnulib module signal
+
+## begin gnulib module signbit
+
+
+EXTRA_DIST += float+.h signbitd.c signbitf.c signbitl.c
+
+EXTRA_libgnu_la_SOURCES += signbitd.c signbitf.c signbitl.c
+
+## end gnulib module signbit
+
+## begin gnulib module sigprocmask
+
+
+EXTRA_DIST += sigprocmask.c
+
+EXTRA_libgnu_la_SOURCES += sigprocmask.c
+
+## end gnulib module sigprocmask
+
+## begin gnulib module size_max
+
+libgnu_la_SOURCES += size_max.h
+
+## end gnulib module size_max
+
+## begin gnulib module snprintf
+
+
+EXTRA_DIST += snprintf.c
+
+EXTRA_libgnu_la_SOURCES += snprintf.c
+
+## end gnulib module snprintf
+
+## begin gnulib module spawn
+
+BUILT_SOURCES += spawn.h
+
+# We need the following in order to create a replacement for <spawn.h> when
+# the system doesn't have one.
+spawn.h: spawn.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SPAWN_H''@|$(NEXT_SPAWN_H)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN''@|$(GNULIB_POSIX_SPAWN)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNP''@|$(GNULIB_POSIX_SPAWNP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_INIT''@|$(GNULIB_POSIX_SPAWNATTR_INIT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_DESTROY''@|$(GNULIB_POSIX_SPAWNATTR_DESTROY)|g' \
+ -e 's|@''HAVE_POSIX_SPAWN''@|$(HAVE_POSIX_SPAWN)|g' \
+ -e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \
+ -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/spawn.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += spawn.h spawn.h-t
+
+EXTRA_DIST += spawn.in.h
+
+## end gnulib module spawn
+
+## begin gnulib module sprintf-posix
+
+
+EXTRA_DIST += sprintf.c
+
+EXTRA_libgnu_la_SOURCES += sprintf.c
+
+## end gnulib module sprintf-posix
+
+## begin gnulib module stat
+
+
+EXTRA_DIST += stat.c
+
+EXTRA_libgnu_la_SOURCES += stat.c
+
+## end gnulib module stat
+
+## begin gnulib module stdarg
+
+BUILT_SOURCES += $(STDARG_H)
+
+# We need the following in order to create <stdarg.h> when the system
+# doesn't have one that works with the given compiler.
+stdarg.h: stdarg.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+ < $(srcdir)/stdarg.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdarg.h stdarg.h-t
+
+EXTRA_DIST += stdarg.in.h
+
+## end gnulib module stdarg
+
+## begin gnulib module stdbool
+
+BUILT_SOURCES += $(STDBOOL_H)
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdbool.h stdbool.h-t
+
+EXTRA_DIST += stdbool.in.h
+
+## end gnulib module stdbool
+
+## begin gnulib module stddef
+
+BUILT_SOURCES += $(STDDEF_H)
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+ < $(srcdir)/stddef.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stddef.h stddef.h-t
+
+EXTRA_DIST += stddef.in.h
+
+## end gnulib module stddef
+
+## begin gnulib module stdint
+
+BUILT_SOURCES += $(STDINT_H)
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdint.h stdint.h-t
+
+EXTRA_DIST += stdint.in.h
+
+## end gnulib module stdint
+
+## begin gnulib module stdio
+
+BUILT_SOURCES += stdio.h
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ < $(srcdir)/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdio.h stdio.h-t
+
+EXTRA_DIST += stdio-write.c stdio.in.h
+
+EXTRA_libgnu_la_SOURCES += stdio-write.c
+
+## end gnulib module stdio
+
+## begin gnulib module stdlib
+
+BUILT_SOURCES += stdlib.h
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
+ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
+ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += stdlib.h stdlib.h-t
+
+EXTRA_DIST += stdlib.in.h
+
+## end gnulib module stdlib
+
+## begin gnulib module stdlib-safer
+
+
+EXTRA_DIST += mkstemp-safer.c stdlib--.h stdlib-safer.h
+
+EXTRA_libgnu_la_SOURCES += mkstemp-safer.c
+
+## end gnulib module stdlib-safer
+
+## begin gnulib module strchrnul
+
+
+EXTRA_DIST += strchrnul.c strchrnul.valgrind
+
+EXTRA_libgnu_la_SOURCES += strchrnul.c
+
+## end gnulib module strchrnul
+
+## begin gnulib module streq
+
+
+EXTRA_DIST += streq.h
+
+## end gnulib module streq
+
+## begin gnulib module strerror
+
+
+EXTRA_DIST += strerror.c
+
+EXTRA_libgnu_la_SOURCES += strerror.c
+
+## end gnulib module strerror
+
+## begin gnulib module striconv
+
+libgnu_la_SOURCES += striconv.h striconv.c
+if GL_COND_LIBTOOL
+libgnu_la_LDFLAGS += $(LTLIBICONV)
+endif
+
+## end gnulib module striconv
+
+## begin gnulib module string
+
+BUILT_SOURCES += string.h
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ < $(srcdir)/string.in.h | \
+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ < $(srcdir)/string.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += string.h string.h-t
+
+EXTRA_DIST += string.in.h
+
+## end gnulib module string
+
+## begin gnulib module strndup
+
+
+EXTRA_DIST += strndup.c
+
+EXTRA_libgnu_la_SOURCES += strndup.c
+
+## end gnulib module strndup
+
+## begin gnulib module strnlen
+
+
+EXTRA_DIST += strnlen.c
+
+EXTRA_libgnu_la_SOURCES += strnlen.c
+
+## end gnulib module strnlen
+
+## begin gnulib module strnlen1
+
+libgnu_la_SOURCES += strnlen1.h strnlen1.c
+
+## end gnulib module strnlen1
+
+## begin gnulib module strtod
+
+LIBS += $(POW_LIB)
+
+EXTRA_DIST += strtod.c
+
+EXTRA_libgnu_la_SOURCES += strtod.c
+
+## end gnulib module strtod
+
+## begin gnulib module strtol
+
+
+EXTRA_DIST += strtol.c
+
+EXTRA_libgnu_la_SOURCES += strtol.c
+
+## end gnulib module strtol
+
+## begin gnulib module sys_stat
+
+BUILT_SOURCES += sys/stat.h
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
+ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
+ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
+ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
+ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
+ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
+ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
+ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
+ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_stat.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_stat.in.h
+
+## end gnulib module sys_stat
+
+## begin gnulib module sys_time
+
+BUILT_SOURCES += sys/time.h
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/time.h sys/time.h-t
+
+EXTRA_DIST += sys_time.in.h
+
+## end gnulib module sys_time
+
+## begin gnulib module sys_wait
+
+BUILT_SOURCES += sys/wait.h
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+ < $(srcdir)/sys_wait.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += sys/wait.h sys/wait.h-t
+MOSTLYCLEANDIRS += sys
+
+EXTRA_DIST += sys_wait.in.h
+
+## end gnulib module sys_wait
+
+## begin gnulib module tempname
+
+
+EXTRA_DIST += tempname.c tempname.h
+
+EXTRA_libgnu_la_SOURCES += tempname.c
+
+## end gnulib module tempname
+
+## begin gnulib module time
+
+BUILT_SOURCES += time.h
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
+ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += time.h time.h-t
+
+EXTRA_DIST += time.in.h
+
+## end gnulib module time
+
+## begin gnulib module tmpdir
+
+libgnu_la_SOURCES += tmpdir.h tmpdir.c
+
+## end gnulib module tmpdir
+
+## begin gnulib module trim
+
+libgnu_la_SOURCES += trim.c
+
+EXTRA_DIST += trim.h
+
+## end gnulib module trim
+
+## begin gnulib module unistd
+
+BUILT_SOURCES += unistd.h
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ < $(srcdir)/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += unistd.h unistd.h-t
+
+EXTRA_DIST += unistd.in.h
+
+## end gnulib module unistd
+
+## begin gnulib module unistd-safer
+
+
+EXTRA_DIST += dup-safer.c fd-safer.c pipe-safer.c unistd--.h unistd-safer.h
+
+EXTRA_libgnu_la_SOURCES += dup-safer.c fd-safer.c pipe-safer.c
+
+## end gnulib module unistd-safer
+
+## begin gnulib module unitypes
+
+
+EXTRA_DIST += unitypes.h
+
+## end gnulib module unitypes
+
+## begin gnulib module uniwidth/base
+
+
+EXTRA_DIST += localcharset.h uniwidth.h
+
+## end gnulib module uniwidth/base
+
+## begin gnulib module uniwidth/width
+
+libgnu_la_SOURCES += uniwidth/width.c
+
+EXTRA_DIST += uniwidth/cjk.h
+
+## end gnulib module uniwidth/width
+
+## begin gnulib module unlocked-io
+
+
+EXTRA_DIST += unlocked-io.h
+
+## end gnulib module unlocked-io
+
+## begin gnulib module unsetenv
+
+
+EXTRA_DIST += unsetenv.c
+
+EXTRA_libgnu_la_SOURCES += unsetenv.c
+
+## end gnulib module unsetenv
+
+## begin gnulib module update-copyright
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/update-copyright
+
+## end gnulib module update-copyright
+
+## begin gnulib module useless-if-before-free
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/useless-if-before-free
+
+## end gnulib module useless-if-before-free
+
+## begin gnulib module vasnprintf
+
+
+EXTRA_DIST += asnprintf.c float+.h printf-args.c printf-args.h printf-parse.c printf-parse.h vasnprintf.c vasnprintf.h
+
+EXTRA_libgnu_la_SOURCES += asnprintf.c printf-args.c printf-parse.c vasnprintf.c
+
+## end gnulib module vasnprintf
+
+## begin gnulib module vasprintf
+
+
+EXTRA_DIST += asprintf.c vasprintf.c
+
+EXTRA_libgnu_la_SOURCES += asprintf.c vasprintf.c
+
+## end gnulib module vasprintf
+
+## begin gnulib module vc-list-files
+
+
+EXTRA_DIST += $(top_srcdir)/build-aux/vc-list-files
+
+## end gnulib module vc-list-files
+
+## begin gnulib module verify
+
+libgnu_la_SOURCES += verify.h
+
+## end gnulib module verify
+
+## begin gnulib module verror
+
+libgnu_la_SOURCES += verror.h verror.c
+
+## end gnulib module verror
+
+## begin gnulib module vfprintf-posix
+
+
+EXTRA_DIST += vfprintf.c
+
+EXTRA_libgnu_la_SOURCES += vfprintf.c
+
+## end gnulib module vfprintf-posix
+
+## begin gnulib module vprintf-posix
+
+
+EXTRA_DIST += vprintf.c
+
+EXTRA_libgnu_la_SOURCES += vprintf.c
+
+## end gnulib module vprintf-posix
+
+## begin gnulib module wait-process
+
+libgnu_la_SOURCES += wait-process.h wait-process.c
+
+## end gnulib module wait-process
+
+## begin gnulib module warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
+
+## end gnulib module warn-on-use
+
+## begin gnulib module wchar
+
+BUILT_SOURCES += wchar.h
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += wchar.h wchar.h-t
+
+EXTRA_DIST += wchar.in.h
+
+## end gnulib module wchar
+
+## begin gnulib module wcrtomb
+
+
+EXTRA_DIST += wcrtomb.c
+
+EXTRA_libgnu_la_SOURCES += wcrtomb.c
+
+## end gnulib module wcrtomb
+
+## begin gnulib module wctype
+
+BUILT_SOURCES += $(WCTYPE_H)
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += wctype.h wctype.h-t
+
+EXTRA_DIST += wctype.in.h
+
+## end gnulib module wctype
+
+## begin gnulib module wcwidth
+
+
+EXTRA_DIST += wcwidth.c
+
+EXTRA_libgnu_la_SOURCES += wcwidth.c
+
+## end gnulib module wcwidth
+
+## begin gnulib module xalloc
+
+
+EXTRA_DIST += xalloc.h xmalloc.c
+
+EXTRA_libgnu_la_SOURCES += xmalloc.c
+
+## end gnulib module xalloc
+
+## begin gnulib module xalloc-die
+
+libgnu_la_SOURCES += xalloc-die.c
+
+## end gnulib module xalloc-die
+
+## begin gnulib module xlist
+
+libgnu_la_SOURCES += gl_xlist.h gl_xlist.c
+
+## end gnulib module xlist
+
+## begin gnulib module xmalloca
+
+libgnu_la_SOURCES += xmalloca.c
+
+EXTRA_DIST += xmalloca.h
+
+## end gnulib module xmalloca
+
+## begin gnulib module xmemdup0
+
+
+EXTRA_DIST += xmemdup0.c xmemdup0.h
+
+EXTRA_libgnu_la_SOURCES += xmemdup0.c
+
+## end gnulib module xmemdup0
+
+## begin gnulib module xoset
+
+libgnu_la_SOURCES += gl_xoset.h gl_xoset.c
+
+## end gnulib module xoset
+
+## begin gnulib module xprintf
+
+libgnu_la_SOURCES += xprintf.h xprintf.c
+
+## end gnulib module xprintf
+
+## begin gnulib module xsize
+
+libgnu_la_SOURCES += xsize.h
+
+## end gnulib module xsize
+
+## begin gnulib module xstriconv
+
+libgnu_la_SOURCES += xstriconv.h xstriconv.c
+
+## end gnulib module xstriconv
+
+## begin gnulib module xstrndup
+
+libgnu_la_SOURCES += xstrndup.h xstrndup.c
+
+## end gnulib module xstrndup
+
+## begin gnulib module xvasprintf
+
+libgnu_la_SOURCES += xvasprintf.h xvasprintf.c xasprintf.c
+
+EXTRA_DIST += xalloc.h
+
+## end gnulib module xvasprintf
+
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
diff --git a/gnu/Makefile.in b/gnu/Makefile.in
new file mode 100644
index 00000000..734e3654
--- /dev/null
+++ b/gnu/Makefile.in
@@ -0,0 +1,2890 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+# Reproduce by: gnulib-tool --import --dir=. --local-dir=local --lib=libgnu --source-base=gnu --m4-base=ltdl/m4 --doc-base=doc --tests-base=tests/gnu --aux-dir=build-aux --with-tests --libtool --macro-prefix=M4 assert autobuild avltree-oset binary-io bitrotate clean-temp cloexec close-stream closein config-h configmake dirname error execute exit fdl-1.3 fflush filenamecat flexmember fopen fopen-safer freadptr freadseek fseeko gendocs gettext git-version-gen gnumakefile gnupload gpl-3.0 intprops inttypes maintainer-makefile memchr2 memcmp2 memmem mkstemp obstack obstack-printf-posix pipe progname propername quote regex regexprops-generic rename setenv snprintf-posix sprintf-posix stdbool stdlib-safer strnlen strtod strtol tempname unlocked-io unsetenv update-copyright vasnprintf-posix verify verror wait-process xalloc xalloc-die xmemdup0 xoset xprintf-posix xstrndup xvasprintf-posix
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+@GL_COND_LIBTOOL_TRUE@am__append_1 = $(LTLIBICONV)
+subdir = gnu
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in $(srcdir)/config.hin alloca.c
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/ltdl/m4/00gnulib.m4 \
+ $(top_srcdir)/ltdl/m4/alloca.m4 $(top_srcdir)/ltdl/m4/argz.m4 \
+ $(top_srcdir)/ltdl/m4/assert.m4 \
+ $(top_srcdir)/ltdl/m4/autobuild.m4 \
+ $(top_srcdir)/ltdl/m4/btowc.m4 \
+ $(top_srcdir)/ltdl/m4/canonicalize.m4 \
+ $(top_srcdir)/ltdl/m4/cloexec.m4 \
+ $(top_srcdir)/ltdl/m4/close-stream.m4 \
+ $(top_srcdir)/ltdl/m4/closein.m4 \
+ $(top_srcdir)/ltdl/m4/closeout.m4 \
+ $(top_srcdir)/ltdl/m4/codeset.m4 \
+ $(top_srcdir)/ltdl/m4/config-h.m4 \
+ $(top_srcdir)/ltdl/m4/debug.m4 \
+ $(top_srcdir)/ltdl/m4/dirname.m4 $(top_srcdir)/ltdl/m4/dos.m4 \
+ $(top_srcdir)/ltdl/m4/double-slash-root.m4 \
+ $(top_srcdir)/ltdl/m4/dup2.m4 $(top_srcdir)/ltdl/m4/eealloc.m4 \
+ $(top_srcdir)/ltdl/m4/environ.m4 \
+ $(top_srcdir)/ltdl/m4/errno_h.m4 \
+ $(top_srcdir)/ltdl/m4/error.m4 \
+ $(top_srcdir)/ltdl/m4/execute.m4 \
+ $(top_srcdir)/ltdl/m4/exitfail.m4 \
+ $(top_srcdir)/ltdl/m4/exponentd.m4 \
+ $(top_srcdir)/ltdl/m4/exponentf.m4 \
+ $(top_srcdir)/ltdl/m4/exponentl.m4 \
+ $(top_srcdir)/ltdl/m4/extensions.m4 \
+ $(top_srcdir)/ltdl/m4/fatal-signal.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl-o.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl_h.m4 \
+ $(top_srcdir)/ltdl/m4/fflush.m4 \
+ $(top_srcdir)/ltdl/m4/filenamecat.m4 \
+ $(top_srcdir)/ltdl/m4/flexmember.m4 \
+ $(top_srcdir)/ltdl/m4/float_h.m4 \
+ $(top_srcdir)/ltdl/m4/fopen.m4 \
+ $(top_srcdir)/ltdl/m4/fpending.m4 \
+ $(top_srcdir)/ltdl/m4/fpieee.m4 \
+ $(top_srcdir)/ltdl/m4/fpurge.m4 \
+ $(top_srcdir)/ltdl/m4/freading.m4 \
+ $(top_srcdir)/ltdl/m4/frexp.m4 $(top_srcdir)/ltdl/m4/frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/fseeko.m4 \
+ $(top_srcdir)/ltdl/m4/ftello.m4 \
+ $(top_srcdir)/ltdl/m4/getdtablesize.m4 \
+ $(top_srcdir)/ltdl/m4/getopt.m4 \
+ $(top_srcdir)/ltdl/m4/getpagesize.m4 \
+ $(top_srcdir)/ltdl/m4/gettext.m4 \
+ $(top_srcdir)/ltdl/m4/gettimeofday.m4 \
+ $(top_srcdir)/ltdl/m4/gl_list.m4 \
+ $(top_srcdir)/ltdl/m4/glibc21.m4 $(top_srcdir)/ltdl/m4/gmp.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-common.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/ltdl/m4/iconv.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_h.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_open.m4 \
+ $(top_srcdir)/ltdl/m4/include_next.m4 \
+ $(top_srcdir)/ltdl/m4/inline.m4 \
+ $(top_srcdir)/ltdl/m4/intlmacosx.m4 \
+ $(top_srcdir)/ltdl/m4/intmax_t.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes-pri.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes_h.m4 \
+ $(top_srcdir)/ltdl/m4/isnand.m4 \
+ $(top_srcdir)/ltdl/m4/isnanf.m4 \
+ $(top_srcdir)/ltdl/m4/isnanl.m4 \
+ $(top_srcdir)/ltdl/m4/langinfo_h.m4 \
+ $(top_srcdir)/ltdl/m4/ldexpl.m4 \
+ $(top_srcdir)/ltdl/m4/lib-ld.m4 \
+ $(top_srcdir)/ltdl/m4/lib-link.m4 \
+ $(top_srcdir)/ltdl/m4/lib-prefix.m4 \
+ $(top_srcdir)/ltdl/m4/libtool.m4 $(top_srcdir)/ltdl/m4/link.m4 \
+ $(top_srcdir)/ltdl/m4/localcharset.m4 \
+ $(top_srcdir)/ltdl/m4/locale-fr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-ja.m4 \
+ $(top_srcdir)/ltdl/m4/locale-tr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-zh.m4 \
+ $(top_srcdir)/ltdl/m4/longlong.m4 \
+ $(top_srcdir)/ltdl/m4/lseek.m4 $(top_srcdir)/ltdl/m4/lstat.m4 \
+ $(top_srcdir)/ltdl/m4/ltdl.m4 \
+ $(top_srcdir)/ltdl/m4/ltoptions.m4 \
+ $(top_srcdir)/ltdl/m4/ltsugar.m4 \
+ $(top_srcdir)/ltdl/m4/ltversion.m4 \
+ $(top_srcdir)/ltdl/m4/lt~obsolete.m4 \
+ $(top_srcdir)/ltdl/m4/m4-error.m4 \
+ $(top_srcdir)/ltdl/m4/m4-getopt.m4 \
+ $(top_srcdir)/ltdl/m4/m4-gettext.m4 \
+ $(top_srcdir)/ltdl/m4/m4-obstack.m4 \
+ $(top_srcdir)/ltdl/m4/m4-regex.m4 \
+ $(top_srcdir)/ltdl/m4/m4-rename.m4 \
+ $(top_srcdir)/ltdl/m4/m4-syscmd.m4 \
+ $(top_srcdir)/ltdl/m4/malloc.m4 \
+ $(top_srcdir)/ltdl/m4/malloca.m4 \
+ $(top_srcdir)/ltdl/m4/math_h.m4 \
+ $(top_srcdir)/ltdl/m4/mbchar.m4 \
+ $(top_srcdir)/ltdl/m4/mbiter.m4 \
+ $(top_srcdir)/ltdl/m4/mbrtowc.m4 \
+ $(top_srcdir)/ltdl/m4/mbsinit.m4 \
+ $(top_srcdir)/ltdl/m4/mbslen.m4 \
+ $(top_srcdir)/ltdl/m4/mbstate_t.m4 \
+ $(top_srcdir)/ltdl/m4/memchr.m4 \
+ $(top_srcdir)/ltdl/m4/memmem.m4 \
+ $(top_srcdir)/ltdl/m4/mkdtemp.m4 \
+ $(top_srcdir)/ltdl/m4/mkstemp.m4 \
+ $(top_srcdir)/ltdl/m4/mmap-anon.m4 \
+ $(top_srcdir)/ltdl/m4/mode_t.m4 \
+ $(top_srcdir)/ltdl/m4/multiarch.m4 \
+ $(top_srcdir)/ltdl/m4/nl_langinfo.m4 \
+ $(top_srcdir)/ltdl/m4/nls.m4 $(top_srcdir)/ltdl/m4/nocrash.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf.m4 \
+ $(top_srcdir)/ltdl/m4/open.m4 $(top_srcdir)/ltdl/m4/pathmax.m4 \
+ $(top_srcdir)/ltdl/m4/pipe.m4 $(top_srcdir)/ltdl/m4/pipe2.m4 \
+ $(top_srcdir)/ltdl/m4/po.m4 \
+ $(top_srcdir)/ltdl/m4/posix_spawn.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexp.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/printf.m4 \
+ $(top_srcdir)/ltdl/m4/progtest.m4 \
+ $(top_srcdir)/ltdl/m4/putenv.m4 $(top_srcdir)/ltdl/m4/quote.m4 \
+ $(top_srcdir)/ltdl/m4/quotearg.m4 \
+ $(top_srcdir)/ltdl/m4/rawmemchr.m4 \
+ $(top_srcdir)/ltdl/m4/readlink.m4 \
+ $(top_srcdir)/ltdl/m4/regex.m4 $(top_srcdir)/ltdl/m4/rename.m4 \
+ $(top_srcdir)/ltdl/m4/rmdir.m4 \
+ $(top_srcdir)/ltdl/m4/sched_h.m4 \
+ $(top_srcdir)/ltdl/m4/setenv.m4 \
+ $(top_srcdir)/ltdl/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/ltdl/m4/sigaction.m4 \
+ $(top_srcdir)/ltdl/m4/signal_h.m4 \
+ $(top_srcdir)/ltdl/m4/signalblocking.m4 \
+ $(top_srcdir)/ltdl/m4/signbit.m4 \
+ $(top_srcdir)/ltdl/m4/size_max.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf.m4 \
+ $(top_srcdir)/ltdl/m4/spawn_h.m4 \
+ $(top_srcdir)/ltdl/m4/sprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/ssize_t.m4 \
+ $(top_srcdir)/ltdl/m4/stackovf.m4 \
+ $(top_srcdir)/ltdl/m4/stat.m4 $(top_srcdir)/ltdl/m4/stdarg.m4 \
+ $(top_srcdir)/ltdl/m4/stdbool.m4 \
+ $(top_srcdir)/ltdl/m4/stddef_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdint.m4 \
+ $(top_srcdir)/ltdl/m4/stdint_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdio-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdio_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib_h.m4 \
+ $(top_srcdir)/ltdl/m4/strchrnul.m4 \
+ $(top_srcdir)/ltdl/m4/strdup.m4 \
+ $(top_srcdir)/ltdl/m4/strerror.m4 \
+ $(top_srcdir)/ltdl/m4/string_h.m4 \
+ $(top_srcdir)/ltdl/m4/strndup.m4 \
+ $(top_srcdir)/ltdl/m4/strnlen.m4 \
+ $(top_srcdir)/ltdl/m4/strtod.m4 \
+ $(top_srcdir)/ltdl/m4/strtol.m4 \
+ $(top_srcdir)/ltdl/m4/symlink.m4 \
+ $(top_srcdir)/ltdl/m4/sys_stat_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_time_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_wait_h.m4 \
+ $(top_srcdir)/ltdl/m4/tempname.m4 \
+ $(top_srcdir)/ltdl/m4/time_h.m4 \
+ $(top_srcdir)/ltdl/m4/tmpdir.m4 \
+ $(top_srcdir)/ltdl/m4/ulonglong.m4 \
+ $(top_srcdir)/ltdl/m4/ungetc.m4 \
+ $(top_srcdir)/ltdl/m4/unistd-safer.m4 \
+ $(top_srcdir)/ltdl/m4/unistd_h.m4 \
+ $(top_srcdir)/ltdl/m4/unlocked-io.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf.m4 \
+ $(top_srcdir)/ltdl/m4/version-etc.m4 \
+ $(top_srcdir)/ltdl/m4/vfprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/wait-process.m4 \
+ $(top_srcdir)/ltdl/m4/warn-on-use.m4 \
+ $(top_srcdir)/ltdl/m4/wchar.m4 \
+ $(top_srcdir)/ltdl/m4/wchar_t.m4 \
+ $(top_srcdir)/ltdl/m4/wcrtomb.m4 \
+ $(top_srcdir)/ltdl/m4/wctob.m4 $(top_srcdir)/ltdl/m4/wctype.m4 \
+ $(top_srcdir)/ltdl/m4/wcwidth.m4 \
+ $(top_srcdir)/ltdl/m4/wint_t.m4 \
+ $(top_srcdir)/ltdl/m4/xalloc.m4 $(top_srcdir)/ltdl/m4/xsize.m4 \
+ $(top_srcdir)/ltdl/m4/xstrndup.m4 \
+ $(top_srcdir)/ltdl/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am__dirstamp = $(am__leading_dot)dirstamp
+am_libgnu_la_OBJECTS = gl_avltree_oset.lo c-ctype.lo c-strcasecmp.lo \
+ c-strncasecmp.lo clean-temp.lo execute.lo fatal-signal.lo \
+ fd-safer-flag.lo dup-safer-flag.lo freadahead.lo freading.lo \
+ freadptr.lo freadseek.lo fseterr.lo gl_linkedhash_list.lo \
+ gl_list.lo localcharset.lo malloca.lo mbchar.lo mbslen.lo \
+ mbsstr.lo memchr2.lo memcmp2.lo gl_oset.lo pipe.lo pipe2.lo \
+ pipe2-safer.lo printf-frexp.lo printf-frexpl.lo progname.lo \
+ propername.lo striconv.lo strnlen1.lo tmpdir.lo trim.lo \
+ uniwidth/width.lo verror.lo wait-process.lo xalloc-die.lo \
+ gl_xlist.lo xmalloca.lo gl_xoset.lo xprintf.lo xstriconv.lo \
+ xstrndup.lo xvasprintf.lo xasprintf.lo
+libgnu_la_OBJECTS = $(am_libgnu_la_OBJECTS)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+libgnu_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(libgnu_la_LDFLAGS) $(LDFLAGS) -o $@
+DEFAULT_INCLUDES = -I.@am__isrc@
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
+DIST_SOURCES = $(libgnu_la_SOURCES) $(EXTRA_libgnu_la_SOURCES)
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ distdir
+ETAGS = etags
+CTAGS = ctags
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARGZ_H = @ARGZ_H@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DLPREOPEN = @DLPREOPEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DYNAMIC_MODULES = @DYNAMIC_MODULES@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLOAT_H = @FLOAT_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_H = @GETTEXT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGL = @GNULIB_LOGL@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
+GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
+GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
+GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
+HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTL = @HAVE_SQRTL@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+ICONV_H = @ICONV_H@
+INCLTDL = @INCLTDL@
+INCLUDE_ERROR_H = @INCLUDE_ERROR_H@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INCLUDE_OBSTACK_H = @INCLUDE_OBSTACK_H@
+INCLUDE_REGEX_H = @INCLUDE_REGEX_H@
+INCLUDE_STDBOOL_H = @INCLUDE_STDBOOL_H@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBADD_DL = @LIBADD_DL@
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
+LIBADD_GMP = @LIBADD_GMP@
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@ $(POW_LIB)
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_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@
+LTALLOCA = @LTALLOCA@
+LTDLDEPS = @LTDLDEPS@
+LTDLINCL = @LTDLINCL@
+LTDLOPEN = @LTDLOPEN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_CONFIG_H = @LT_CONFIG_H@
+LT_DLLOADERS = @LT_DLLOADERS@
+LT_DLPREOPEN = @LT_DLPREOPEN@
+M4_LIBOBJS = @M4_LIBOBJS@
+M4_LTLIBOBJS = @M4_LTLIBOBJS@
+M4tests_LIBOBJS = @M4tests_LIBOBJS@
+M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_ICONV_H = @NEXT_ICONV_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_SPAWN_H = @NEXT_SPAWN_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBSTACK_H = @OBSTACK_H@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PREOPEN_DEPENDENCIES = @PREOPEN_DEPENDENCIES@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REGEX_H = @REGEX_H@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ICONV = @REPLACE_ICONV@
+REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
+REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SCHED_H = @SCHED_H@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_GMP = @USE_GMP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_symbol_underscore = @sys_symbol_underscore@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.5 gnits subdir-objects
+SUBDIRS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+noinst_LTLIBRARIES = libgnu.la
+EXTRA_DIST = alloca.c alloca.in.h \
+ $(top_srcdir)/build-aux/arg-nonnull.h btowc.c \
+ canonicalize-lgpl.c cloexec.c cloexec.h close-stream.c \
+ close-stream.h closein.c closein.h closeout.c closeout.h \
+ basename.c dirname.c stripslash.c basename-lgpl.c \
+ dirname-lgpl.c dirname.h stripslash.c dup2.c errno.in.h \
+ error.c error.h exitfail.c exitfail.h fcntl.c fcntl.in.h \
+ fflush.c stdio-impl.h filenamecat.c filenamecat-lgpl.c \
+ filenamecat.h float.in.h fopen.c fopen-safer.c stdio--.h \
+ stdio-safer.h fpending.c fpending.h fpucw.h fpurge.c \
+ stdio-impl.h freadahead.h stdio-impl.h freading.h stdio-impl.h \
+ freadptr.h stdio-impl.h freadseek.h stdio-impl.h frexp.c \
+ frexp.c frexpl.c fseeko.c stdio-impl.h fseterr.h stdio-impl.h \
+ ftello.c $(top_srcdir)/build-aux/gendocs.sh getdtablesize.c \
+ $(top_srcdir)/build-aux/config.rpath gettimeofday.c \
+ $(top_srcdir)/build-aux/git-version-gen \
+ $(top_srcdir)/GNUmakefile $(top_srcdir)/build-aux/gnupload \
+ $(top_srcdir)/build-aux/config.rpath iconv_open-aix.h \
+ iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h \
+ iconv_open-solaris.h iconv.in.h iconv_open-aix.gperf \
+ iconv_open-hpux.gperf iconv_open-irix.gperf \
+ iconv_open-osf.gperf iconv_open-solaris.gperf iconv_open.c \
+ intprops.h inttypes.in.h float+.h isnan.c isnand-nolibm.h \
+ isnand.c float+.h isnan.c isnanf-nolibm.h isnanf.c float+.h \
+ isnan.c isnanl-nolibm.h isnanl.c langinfo.in.h config.charset \
+ ref-add.sin ref-del.sin lseek.c lstat.c $(top_srcdir)/maint.mk \
+ malloc.c malloc.c malloca.h malloca.valgrind math.in.h \
+ mbchar.h mbrtowc.c mbsinit.c str-kmp.h memchr.c \
+ memchr.valgrind memchr2.valgrind memcmp2.h memmem.c \
+ str-two-way.h mkdtemp.c mkstemp.c nl_langinfo.c obstack.c \
+ obstack.h obstack_printf.c open.c pathmax.h spawn_int.h \
+ spawni.c spawn_faction_addclose.c spawn_int.h \
+ spawn_faction_adddup2.c spawn_int.h spawn_faction_addopen.c \
+ spawn_int.h spawn_faction_destroy.c spawn_faction_init.c \
+ spawn_int.h spawnattr_destroy.c spawnattr_init.c \
+ spawnattr_setflags.c spawnattr_setsigmask.c spawnp.c \
+ printf-frexp.h printf-frexp.c printf-frexpl.h quote.c quote.h \
+ quotearg.c quotearg.h rawmemchr.c rawmemchr.valgrind \
+ readlink.c regcomp.c regex.c regex.h regex_internal.c \
+ regex_internal.h regexec.c rename.c rmdir.c same-inode.h \
+ sched.in.h setenv.c sig-handler.h sigaction.c signal.in.h \
+ float+.h signbitd.c signbitf.c signbitl.c sigprocmask.c \
+ snprintf.c spawn.in.h sprintf.c stat.c stdarg.in.h \
+ stdbool.in.h stddef.in.h stdint.in.h stdio-write.c stdio.in.h \
+ stdlib.in.h mkstemp-safer.c stdlib--.h stdlib-safer.h \
+ strchrnul.c strchrnul.valgrind streq.h strerror.c string.in.h \
+ strndup.c strnlen.c strtod.c strtol.c sys_stat.in.h \
+ sys_time.in.h sys_wait.in.h tempname.c tempname.h time.in.h \
+ trim.h unistd.in.h dup-safer.c fd-safer.c pipe-safer.c \
+ unistd--.h unistd-safer.h unitypes.h localcharset.h uniwidth.h \
+ uniwidth/cjk.h unlocked-io.h unsetenv.c \
+ $(top_srcdir)/build-aux/update-copyright \
+ $(top_srcdir)/build-aux/useless-if-before-free asnprintf.c \
+ float+.h printf-args.c printf-args.h printf-parse.c \
+ printf-parse.h vasnprintf.c vasnprintf.h asprintf.c \
+ vasprintf.c $(top_srcdir)/build-aux/vc-list-files vfprintf.c \
+ vprintf.c $(top_srcdir)/build-aux/warn-on-use.h wchar.in.h \
+ wcrtomb.c wctype.in.h wcwidth.c xalloc.h xmalloc.c xmalloca.h \
+ xmemdup0.c xmemdup0.h xalloc.h
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+BUILT_SOURCES = $(ALLOCA_H) arg-nonnull.h configmake.h $(ERRNO_H) \
+ fcntl.h $(FLOAT_H) $(ICONV_H) iconv_open-aix.h \
+ iconv_open-hpux.h iconv_open-irix.h iconv_open-osf.h \
+ iconv_open-solaris.h inttypes.h langinfo.h math.h $(SCHED_H) \
+ signal.h spawn.h $(STDARG_H) $(STDBOOL_H) $(STDDEF_H) \
+ $(STDINT_H) stdio.h stdlib.h string.h sys/stat.h sys/time.h \
+ sys/wait.h time.h unistd.h warn-on-use.h wchar.h $(WCTYPE_H)
+SUFFIXES = .sed .sin
+MOSTLYCLEANFILES = core *.stackdump alloca.h alloca.h-t arg-nonnull.h \
+ arg-nonnull.h-t errno.h errno.h-t fcntl.h fcntl.h-t float.h \
+ float.h-t iconv.h iconv.h-t iconv_open-aix.h-t \
+ iconv_open-hpux.h-t iconv_open-irix.h-t iconv_open-osf.h-t \
+ iconv_open-solaris.h-t inttypes.h inttypes.h-t langinfo.h \
+ langinfo.h-t math.h math.h-t sched.h sched.h-t signal.h \
+ signal.h-t spawn.h spawn.h-t stdarg.h stdarg.h-t stdbool.h \
+ stdbool.h-t stddef.h stddef.h-t stdint.h stdint.h-t stdio.h \
+ stdio.h-t stdlib.h stdlib.h-t string.h string.h-t sys/stat.h \
+ sys/stat.h-t sys/time.h sys/time.h-t sys/wait.h sys/wait.h-t \
+ time.h time.h-t unistd.h unistd.h-t warn-on-use.h \
+ warn-on-use.h-t wchar.h wchar.h-t wctype.h wctype.h-t
+MOSTLYCLEANDIRS = sys sys
+CLEANFILES = configmake.h configmake.h-t charset.alias ref-add.sed \
+ ref-del.sed
+DISTCLEANFILES =
+MAINTAINERCLEANFILES = iconv_open-aix.h iconv_open-hpux.h \
+ iconv_open-irix.h iconv_open-osf.h iconv_open-solaris.h
+
+# This is for those projects which use "gettextize --intl" to put a source-code
+# copy of libintl into their package. In such projects, every Makefile.am needs
+# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory.
+# For the Makefile.ams in other directories it is the maintainer's
+# responsibility; for the one from gnulib we do it here.
+# This option has no effect when the user disables NLS (because then the intl
+# directory contains no libintl.h file) or when the project does not use
+# "gettextize --intl".
+AM_CPPFLAGS = -I$(top_builddir)/intl
+AM_CFLAGS =
+libgnu_la_SOURCES = gl_avltree_oset.h gl_avltree_oset.c \
+ gl_anytree_oset.h binary-io.h bitrotate.h c-ctype.h c-ctype.c \
+ c-strcase.h c-strcasecmp.c c-strncasecmp.c clean-temp.h \
+ clean-temp.c execute.h execute.c w32spawn.h fatal-signal.h \
+ fatal-signal.c fd-safer-flag.c dup-safer-flag.c freadahead.c \
+ freading.c freadptr.c freadseek.c fseterr.c gettext.h \
+ gl_linkedhash_list.h gl_linkedhash_list.c gl_anyhash_list1.h \
+ gl_anyhash_list2.h gl_anylinked_list1.h gl_anylinked_list2.h \
+ gl_list.h gl_list.c localcharset.h localcharset.c malloca.c \
+ mbchar.c mbiter.h mbslen.c mbsstr.c mbuiter.h memchr2.h \
+ memchr2.c memcmp2.c gl_oset.h gl_oset.c pipe.h pipe.c \
+ w32spawn.h pipe2.c pipe2-safer.c printf-frexp.c \
+ printf-frexpl.c progname.h progname.c propername.h \
+ propername.c size_max.h striconv.h striconv.c strnlen1.h \
+ strnlen1.c tmpdir.h tmpdir.c trim.c uniwidth/width.c verify.h \
+ verror.h verror.c wait-process.h wait-process.c xalloc-die.c \
+ gl_xlist.h gl_xlist.c xmalloca.c gl_xoset.h gl_xoset.c \
+ xprintf.h xprintf.c xsize.h xstriconv.h xstriconv.c xstrndup.h \
+ xstrndup.c xvasprintf.h xvasprintf.c xasprintf.c
+libgnu_la_LIBADD = $(M4_LTLIBOBJS) @LTALLOCA@
+libgnu_la_DEPENDENCIES = $(M4_LTLIBOBJS) @LTALLOCA@
+EXTRA_libgnu_la_SOURCES = alloca.c btowc.c canonicalize-lgpl.c \
+ cloexec.c close-stream.c closein.c closeout.c basename.c \
+ dirname.c stripslash.c basename-lgpl.c dirname-lgpl.c \
+ stripslash.c dup2.c error.c exitfail.c fcntl.c fflush.c \
+ filenamecat.c filenamecat-lgpl.c fopen.c fopen-safer.c \
+ fpending.c fpurge.c frexp.c frexp.c frexpl.c fseeko.c ftello.c \
+ getdtablesize.c gettimeofday.c iconv_open.c isnan.c isnand.c \
+ isnan.c isnanf.c isnan.c isnanl.c lseek.c lstat.c malloc.c \
+ malloc.c mbrtowc.c mbsinit.c memchr.c memmem.c mkdtemp.c \
+ mkstemp.c nl_langinfo.c obstack.c obstack_printf.c open.c \
+ spawni.c spawn_faction_addclose.c spawn_faction_adddup2.c \
+ spawn_faction_addopen.c spawn_faction_destroy.c \
+ spawn_faction_init.c spawnattr_destroy.c spawnattr_init.c \
+ spawnattr_setflags.c spawnattr_setsigmask.c spawnp.c \
+ printf-frexp.c quote.c quotearg.c rawmemchr.c readlink.c \
+ regcomp.c regex.c regex_internal.c regexec.c rename.c rmdir.c \
+ setenv.c sigaction.c signbitd.c signbitf.c signbitl.c \
+ sigprocmask.c snprintf.c sprintf.c stat.c stdio-write.c \
+ mkstemp-safer.c strchrnul.c strerror.c strndup.c strnlen.c \
+ strtod.c strtol.c tempname.c dup-safer.c fd-safer.c \
+ pipe-safer.c unsetenv.c asnprintf.c printf-args.c \
+ printf-parse.c vasnprintf.c asprintf.c vasprintf.c vfprintf.c \
+ vprintf.c wcrtomb.c wcwidth.c xmalloc.c xmemdup0.c
+libgnu_la_LDFLAGS = $(AM_LDFLAGS) $(am__append_1)
+ARG_NONNULL_H = arg-nonnull.h
+GPERF = gperf
+charset_alias = $(DESTDIR)$(libdir)/charset.alias
+charset_tmp = $(DESTDIR)$(libdir)/charset.tmp
+WARN_ON_USE_H = warn-on-use.h
+all: $(BUILT_SOURCES) config.h
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .sed .sin .c .lo .o .obj
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnits gnu/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --gnits gnu/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+config.h: stamp-h1
+ @if test ! -f $@; then \
+ rm -f stamp-h1; \
+ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
+ else :; fi
+
+stamp-h1: $(srcdir)/config.hin $(top_builddir)/config.status
+ @rm -f stamp-h1
+ cd $(top_builddir) && $(SHELL) ./config.status gnu/config.h
+$(srcdir)/config.hin: $(am__configure_deps)
+ ($(am__cd) $(top_srcdir) && $(AUTOHEADER))
+ rm -f stamp-h1
+ touch $@
+
+distclean-hdr:
+ -rm -f config.h stamp-h1
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+
+clean-noinstLTLIBRARIES:
+ -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+ @list='$(noinst_LTLIBRARIES)'; for p in $$list; do \
+ dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
+ test "$$dir" != "$$p" || dir=.; \
+ echo "rm -f \"$${dir}/so_locations\""; \
+ rm -f "$${dir}/so_locations"; \
+ done
+uniwidth/$(am__dirstamp):
+ @$(MKDIR_P) uniwidth
+ @: > uniwidth/$(am__dirstamp)
+uniwidth/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) uniwidth/$(DEPDIR)
+ @: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+uniwidth/width.lo: uniwidth/$(am__dirstamp) \
+ uniwidth/$(DEPDIR)/$(am__dirstamp)
+libgnu.la: $(libgnu_la_OBJECTS) $(libgnu_la_DEPENDENCIES)
+ $(AM_V_CCLD)$(libgnu_la_LINK) $(libgnu_la_OBJECTS) $(libgnu_la_LIBADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f uniwidth/width.$(OBJEXT)
+ -rm -f uniwidth/width.lo
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@$(DEPDIR)/alloca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/alloca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asnprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/asprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename-lgpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/basename.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/btowc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-ctype.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strcasecmp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-strncasecmp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/canonicalize-lgpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/clean-temp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cloexec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/close-stream.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closein.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/closeout.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname-lgpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dirname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer-flag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dup2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/error.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/execute.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exitfail.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fatal-signal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fcntl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer-flag.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fd-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fflush.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat-lgpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filenamecat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fopen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpending.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fpurge.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadahead.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freading.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadptr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/freadseek.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/frexpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseeko.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fseterr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ftello.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getdtablesize.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gettimeofday.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_avltree_oset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_linkedhash_list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_list.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_oset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_xlist.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_xoset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/iconv_open.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnan.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnand.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/isnanl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/localcharset.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lseek.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lstat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/malloca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbchar.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbrtowc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsinit.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbslen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mbsstr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memchr2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memcmp2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/memmem.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkdtemp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mkstemp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nl_langinfo.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack_printf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/open.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2-safer.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pipe2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-args.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-frexpl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printf-parse.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/progname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/propername.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quote.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quotearg.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rawmemchr.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/readlink.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regcomp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regex_internal.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regexec.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rename.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmdir.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/setenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigaction.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitd.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/signbitl.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sigprocmask.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/snprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_faction_addclose.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_faction_adddup2.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_faction_addopen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_faction_destroy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawn_faction_init.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnattr_destroy.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnattr_init.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnattr_setflags.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnattr_setsigmask.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawni.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/spawnp.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stat.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stdio-write.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strchrnul.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strerror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/striconv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stripslash.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strndup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strnlen1.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtod.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strtol.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tempname.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tmpdir.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/trim.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/unsetenv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasnprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vasprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/verror.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vfprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wait-process.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcrtomb.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wcwidth.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xalloc-die.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xasprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloc.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmalloca.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xmemdup0.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstriconv.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xstrndup.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/xvasprintf.Plo@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/width.Plo@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+ -rm -rf uniwidth/.libs uniwidth/_libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.hin $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) config.hin $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(LTLIBRARIES) $(HEADERS) config.h \
+ all-local
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
+ -rm -f uniwidth/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-generic clean-libtool clean-noinstLIBRARIES \
+ clean-noinstLTLIBRARIES mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-hdr distclean-local distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am: install-exec-local
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf $(DEPDIR) ./$(DEPDIR) uniwidth/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am: uninstall-local
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ ctags-recursive install install-am install-strip \
+ tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am all-local check check-am clean clean-generic \
+ clean-libtool clean-noinstLIBRARIES clean-noinstLTLIBRARIES \
+ ctags ctags-recursive distclean distclean-compile \
+ distclean-generic distclean-hdr distclean-libtool \
+ distclean-local distclean-tags distdir dvi dvi-am html html-am \
+ info info-am install install-am install-data install-data-am \
+ install-dvi install-dvi-am install-exec install-exec-am \
+ install-exec-local install-html install-html-am install-info \
+ install-info-am install-man install-pdf install-pdf-am \
+ install-ps install-ps-am install-strip installcheck \
+ installcheck-am installdirs installdirs-am maintainer-clean \
+ maintainer-clean-generic mostlyclean mostlyclean-compile \
+ mostlyclean-generic mostlyclean-libtool mostlyclean-local pdf \
+ pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+ uninstall-local
+
+
+# We need the following in order to create <alloca.h> when the system
+# doesn't have one that works with the given compiler.
+alloca.h: alloca.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ cat $(srcdir)/alloca.in.h; \
+ } > $@-t && \
+ mv -f $@-t $@
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+
+# Retrieve values of the variables through 'configure' followed by
+# 'make', not directly through 'configure', so that a user who
+# sets some of these variables consistently on the 'make' command
+# line gets correct results.
+#
+# One advantage of this approach, compared to the classical
+# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
+# is that it protects against the use of undefined variables.
+# If, say, $(libdir) is not set in the Makefile, LIBDIR is not
+# defined by this module, and code using LIBDIR gives a
+# compilation error.
+#
+# Another advantage is that 'make' output is shorter.
+#
+# Listed in the same order as the GNU makefile conventions.
+# The Automake-defined pkg* macros are appended, in the order
+# listed in the Automake 1.10a+ documentation.
+configmake.h: Makefile
+ $(AM_V_GEN)rm -f $@-t && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ echo '#define PREFIX "$(prefix)"'; \
+ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
+ echo '#define BINDIR "$(bindir)"'; \
+ echo '#define SBINDIR "$(sbindir)"'; \
+ echo '#define LIBEXECDIR "$(libexecdir)"'; \
+ echo '#define DATAROOTDIR "$(datarootdir)"'; \
+ echo '#define DATADIR "$(datadir)"'; \
+ echo '#define SYSCONFDIR "$(sysconfdir)"'; \
+ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
+ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
+ echo '#define INCLUDEDIR "$(includedir)"'; \
+ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
+ echo '#define DOCDIR "$(docdir)"'; \
+ echo '#define INFODIR "$(infodir)"'; \
+ echo '#define HTMLDIR "$(htmldir)"'; \
+ echo '#define DVIDIR "$(dvidir)"'; \
+ echo '#define PDFDIR "$(pdfdir)"'; \
+ echo '#define PSDIR "$(psdir)"'; \
+ echo '#define LIBDIR "$(libdir)"'; \
+ echo '#define LISPDIR "$(lispdir)"'; \
+ echo '#define LOCALEDIR "$(localedir)"'; \
+ echo '#define MANDIR "$(mandir)"'; \
+ echo '#define MANEXT "$(manext)"'; \
+ echo '#define PKGDATADIR "$(pkgdatadir)"'; \
+ echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
+ echo '#define PKGLIBDIR "$(pkglibdir)"'; \
+ echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
+ } | sed '/""/d' > $@-t && \
+ if test -f $@ && cmp $@-t $@ > /dev/null; then \
+ rm -f $@-t; \
+ else \
+ rm -f $@; mv $@-t $@; \
+ fi
+
+# We need the following in order to create <errno.h> when the system
+# doesn't have one that is POSIX compliant.
+errno.h: errno.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ERRNO_H''@|$(NEXT_ERRNO_H)|g' \
+ -e 's|@''EMULTIHOP_HIDDEN''@|$(EMULTIHOP_HIDDEN)|g' \
+ -e 's|@''EMULTIHOP_VALUE''@|$(EMULTIHOP_VALUE)|g' \
+ -e 's|@''ENOLINK_HIDDEN''@|$(ENOLINK_HIDDEN)|g' \
+ -e 's|@''ENOLINK_VALUE''@|$(ENOLINK_VALUE)|g' \
+ -e 's|@''EOVERFLOW_HIDDEN''@|$(EOVERFLOW_HIDDEN)|g' \
+ -e 's|@''EOVERFLOW_VALUE''@|$(EOVERFLOW_VALUE)|g' \
+ < $(srcdir)/errno.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <fcntl.h> when the system
+# doesn't have one that works with the given compiler.
+fcntl.h: fcntl.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FCNTL_H''@|$(NEXT_FCNTL_H)|g' \
+ -e 's|@''GNULIB_FCNTL''@|$(GNULIB_FCNTL)|g' \
+ -e 's|@''GNULIB_OPEN''@|$(GNULIB_OPEN)|g' \
+ -e 's|@''GNULIB_OPENAT''@|$(GNULIB_OPENAT)|g' \
+ -e 's|@''HAVE_FCNTL''@|$(HAVE_FCNTL)|g' \
+ -e 's|@''HAVE_OPENAT''@|$(HAVE_OPENAT)|g' \
+ -e 's|@''REPLACE_FCNTL''@|$(REPLACE_FCNTL)|g' \
+ -e 's|@''REPLACE_OPEN''@|$(REPLACE_OPEN)|g' \
+ -e 's|@''REPLACE_OPENAT''@|$(REPLACE_OPENAT)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/fcntl.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <float.h> when the system
+# doesn't have one that works with the given compiler.
+float.h: float.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_FLOAT_H''@|$(NEXT_FLOAT_H)|g' \
+ < $(srcdir)/float.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+distclean-local: clean-GNUmakefile
+clean-GNUmakefile:
+ test x'$(VPATH)' != x && rm -f $(top_builddir)/GNUmakefile || :
+
+# We need the following in order to create <iconv.h> when the system
+# doesn't have one that works with the given compiler.
+iconv.h: iconv.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_ICONV_H''@|$(NEXT_ICONV_H)|g' \
+ -e 's|@''ICONV_CONST''@|$(ICONV_CONST)|g' \
+ -e 's|@''REPLACE_ICONV''@|$(REPLACE_ICONV)|g' \
+ -e 's|@''REPLACE_ICONV_OPEN''@|$(REPLACE_ICONV_OPEN)|g' \
+ -e 's|@''REPLACE_ICONV_UTF''@|$(REPLACE_ICONV_UTF)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/iconv.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+iconv_open-aix.h: iconv_open-aix.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-aix.gperf > $(srcdir)/iconv_open-aix.h-t
+ mv $(srcdir)/iconv_open-aix.h-t $(srcdir)/iconv_open-aix.h
+iconv_open-hpux.h: iconv_open-hpux.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-hpux.gperf > $(srcdir)/iconv_open-hpux.h-t
+ mv $(srcdir)/iconv_open-hpux.h-t $(srcdir)/iconv_open-hpux.h
+iconv_open-irix.h: iconv_open-irix.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-irix.gperf > $(srcdir)/iconv_open-irix.h-t
+ mv $(srcdir)/iconv_open-irix.h-t $(srcdir)/iconv_open-irix.h
+iconv_open-osf.h: iconv_open-osf.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-osf.gperf > $(srcdir)/iconv_open-osf.h-t
+ mv $(srcdir)/iconv_open-osf.h-t $(srcdir)/iconv_open-osf.h
+iconv_open-solaris.h: iconv_open-solaris.gperf
+ $(GPERF) -m 10 $(srcdir)/iconv_open-solaris.gperf > $(srcdir)/iconv_open-solaris.h-t
+ mv $(srcdir)/iconv_open-solaris.h-t $(srcdir)/iconv_open-solaris.h
+
+# We need the following in order to create <inttypes.h> when the system
+# doesn't have one that works with the given compiler.
+inttypes.h: inttypes.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \
+ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \
+ -e 's/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \
+ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \
+ -e 's/@''GNULIB_STRTOIMAX''@/$(GNULIB_STRTOIMAX)/g' \
+ -e 's/@''GNULIB_STRTOUMAX''@/$(GNULIB_STRTOUMAX)/g' \
+ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \
+ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \
+ -e 's/@''HAVE_DECL_STRTOIMAX''@/$(HAVE_DECL_STRTOIMAX)/g' \
+ -e 's/@''HAVE_DECL_STRTOUMAX''@/$(HAVE_DECL_STRTOUMAX)/g' \
+ -e 's/@''INT32_MAX_LT_INTMAX_MAX''@/$(INT32_MAX_LT_INTMAX_MAX)/g' \
+ -e 's/@''INT64_MAX_EQ_LONG_MAX''@/$(INT64_MAX_EQ_LONG_MAX)/g' \
+ -e 's/@''UINT32_MAX_LT_UINTMAX_MAX''@/$(UINT32_MAX_LT_UINTMAX_MAX)/g' \
+ -e 's/@''UINT64_MAX_EQ_ULONG_MAX''@/$(UINT64_MAX_EQ_ULONG_MAX)/g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/inttypes.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <langinfo.h> when the system doesn't have one.
+langinfo.h: langinfo.in.h $(WARN_ON_USE_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_LANGINFO_H''@|$(HAVE_LANGINFO_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_LANGINFO_H''@|$(NEXT_LANGINFO_H)|g' \
+ -e 's|@''GNULIB_NL_LANGINFO''@|$(GNULIB_NL_LANGINFO)|g' \
+ -e 's|@''HAVE_LANGINFO_CODESET''@|$(HAVE_LANGINFO_CODESET)|g' \
+ -e 's|@''HAVE_LANGINFO_ERA''@|$(HAVE_LANGINFO_ERA)|g' \
+ -e 's|@''HAVE_NL_LANGINFO''@|$(HAVE_NL_LANGINFO)|g' \
+ -e 's|@''REPLACE_NL_LANGINFO''@|$(REPLACE_NL_LANGINFO)|g' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/langinfo.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to install a simple file in $(libdir)
+# which is shared with other installed packages. We use a list of referencing
+# packages so that "make uninstall" will remove the file if and only if it
+# is not used by another installed package.
+# On systems with glibc-2.1 or newer, the file is redundant, therefore we
+# avoid installing it.
+
+all-local: charset.alias ref-add.sed ref-del.sed
+install-exec-local: install-exec-localcharset
+install-exec-localcharset: all-local
+ if test $(GLIBC21) = no; then \
+ case '$(host_os)' in \
+ darwin[56]*) \
+ need_charset_alias=true ;; \
+ darwin* | cygwin* | mingw* | pw32* | cegcc*) \
+ need_charset_alias=false ;; \
+ *) \
+ need_charset_alias=true ;; \
+ esac ; \
+ else \
+ need_charset_alias=false ; \
+ fi ; \
+ if $$need_charset_alias; then \
+ $(mkinstalldirs) $(DESTDIR)$(libdir) ; \
+ fi ; \
+ if test -f $(charset_alias); then \
+ sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ else \
+ if $$need_charset_alias; then \
+ sed -f ref-add.sed charset.alias > $(charset_tmp) ; \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \
+ rm -f $(charset_tmp) ; \
+ fi ; \
+ fi
+
+uninstall-local: uninstall-localcharset
+uninstall-localcharset: all-local
+ if test -f $(charset_alias); then \
+ sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \
+ if grep '^# Packages using this file: $$' $(charset_tmp) \
+ > /dev/null; then \
+ rm -f $(charset_alias); \
+ else \
+ $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \
+ fi; \
+ rm -f $(charset_tmp); \
+ fi
+
+charset.alias: config.charset
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ && \
+ mv t-$@ $@
+.sin.sed:
+ $(AM_V_GEN)rm -f t-$@ $@ && \
+ sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ && \
+ mv t-$@ $@
+
+# We need the following in order to create <math.h> when the system
+# doesn't have one that works with the given compiler.
+math.h: math.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT_AS_FIRST_DIRECTIVE''@|$(INCLUDE_NEXT_AS_FIRST_DIRECTIVE)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_AS_FIRST_DIRECTIVE_MATH_H''@|$(NEXT_AS_FIRST_DIRECTIVE_MATH_H)|g' \
+ -e 's|@''GNULIB_ACOSL''@|$(GNULIB_ACOSL)|g' \
+ -e 's|@''GNULIB_ASINL''@|$(GNULIB_ASINL)|g' \
+ -e 's|@''GNULIB_ATANL''@|$(GNULIB_ATANL)|g' \
+ -e 's|@''GNULIB_CEILF''@|$(GNULIB_CEILF)|g' \
+ -e 's|@''GNULIB_CEILL''@|$(GNULIB_CEILL)|g' \
+ -e 's|@''GNULIB_COSL''@|$(GNULIB_COSL)|g' \
+ -e 's|@''GNULIB_EXPL''@|$(GNULIB_EXPL)|g' \
+ -e 's|@''GNULIB_FLOORF''@|$(GNULIB_FLOORF)|g' \
+ -e 's|@''GNULIB_FLOORL''@|$(GNULIB_FLOORL)|g' \
+ -e 's|@''GNULIB_FREXP''@|$(GNULIB_FREXP)|g' \
+ -e 's|@''GNULIB_FREXPL''@|$(GNULIB_FREXPL)|g' \
+ -e 's|@''GNULIB_ISFINITE''@|$(GNULIB_ISFINITE)|g' \
+ -e 's|@''GNULIB_ISINF''@|$(GNULIB_ISINF)|g' \
+ -e 's|@''GNULIB_ISNAN''@|$(GNULIB_ISNAN)|g' \
+ -e 's|@''GNULIB_ISNANF''@|$(GNULIB_ISNANF)|g' \
+ -e 's|@''GNULIB_ISNAND''@|$(GNULIB_ISNAND)|g' \
+ -e 's|@''GNULIB_ISNANL''@|$(GNULIB_ISNANL)|g' \
+ -e 's|@''GNULIB_LDEXPL''@|$(GNULIB_LDEXPL)|g' \
+ -e 's|@''GNULIB_LOGL''@|$(GNULIB_LOGL)|g' \
+ -e 's|@''GNULIB_ROUND''@|$(GNULIB_ROUND)|g' \
+ -e 's|@''GNULIB_ROUNDF''@|$(GNULIB_ROUNDF)|g' \
+ -e 's|@''GNULIB_ROUNDL''@|$(GNULIB_ROUNDL)|g' \
+ -e 's|@''GNULIB_SIGNBIT''@|$(GNULIB_SIGNBIT)|g' \
+ -e 's|@''GNULIB_SINL''@|$(GNULIB_SINL)|g' \
+ -e 's|@''GNULIB_SQRTL''@|$(GNULIB_SQRTL)|g' \
+ -e 's|@''GNULIB_TANL''@|$(GNULIB_TANL)|g' \
+ -e 's|@''GNULIB_TRUNC''@|$(GNULIB_TRUNC)|g' \
+ -e 's|@''GNULIB_TRUNCF''@|$(GNULIB_TRUNCF)|g' \
+ -e 's|@''GNULIB_TRUNCL''@|$(GNULIB_TRUNCL)|g' \
+ -e 's|@''HAVE_ACOSL''@|$(HAVE_ACOSL)|g' \
+ -e 's|@''HAVE_ASINL''@|$(HAVE_ASINL)|g' \
+ -e 's|@''HAVE_ATANL''@|$(HAVE_ATANL)|g' \
+ -e 's|@''HAVE_COSL''@|$(HAVE_COSL)|g' \
+ -e 's|@''HAVE_EXPL''@|$(HAVE_EXPL)|g' \
+ -e 's|@''HAVE_ISNANF''@|$(HAVE_ISNANF)|g' \
+ -e 's|@''HAVE_ISNAND''@|$(HAVE_ISNAND)|g' \
+ -e 's|@''HAVE_ISNANL''@|$(HAVE_ISNANL)|g' \
+ -e 's|@''HAVE_LOGL''@|$(HAVE_LOGL)|g' \
+ -e 's|@''HAVE_SINL''@|$(HAVE_SINL)|g' \
+ -e 's|@''HAVE_SQRTL''@|$(HAVE_SQRTL)|g' \
+ -e 's|@''HAVE_TANL''@|$(HAVE_TANL)|g' \
+ -e 's|@''HAVE_DECL_ACOSL''@|$(HAVE_DECL_ACOSL)|g' \
+ -e 's|@''HAVE_DECL_ASINL''@|$(HAVE_DECL_ASINL)|g' \
+ -e 's|@''HAVE_DECL_ATANL''@|$(HAVE_DECL_ATANL)|g' \
+ -e 's|@''HAVE_DECL_COSL''@|$(HAVE_DECL_COSL)|g' \
+ -e 's|@''HAVE_DECL_EXPL''@|$(HAVE_DECL_EXPL)|g' \
+ -e 's|@''HAVE_DECL_FREXPL''@|$(HAVE_DECL_FREXPL)|g' \
+ -e 's|@''HAVE_DECL_LDEXPL''@|$(HAVE_DECL_LDEXPL)|g' \
+ -e 's|@''HAVE_DECL_LOGL''@|$(HAVE_DECL_LOGL)|g' \
+ -e 's|@''HAVE_DECL_SINL''@|$(HAVE_DECL_SINL)|g' \
+ -e 's|@''HAVE_DECL_SQRTL''@|$(HAVE_DECL_SQRTL)|g' \
+ -e 's|@''HAVE_DECL_TANL''@|$(HAVE_DECL_TANL)|g' \
+ -e 's|@''HAVE_DECL_TRUNC''@|$(HAVE_DECL_TRUNC)|g' \
+ -e 's|@''HAVE_DECL_TRUNCF''@|$(HAVE_DECL_TRUNCF)|g' \
+ -e 's|@''REPLACE_CEILF''@|$(REPLACE_CEILF)|g' \
+ -e 's|@''REPLACE_CEILL''@|$(REPLACE_CEILL)|g' \
+ -e 's|@''REPLACE_FLOORF''@|$(REPLACE_FLOORF)|g' \
+ -e 's|@''REPLACE_FLOORL''@|$(REPLACE_FLOORL)|g' \
+ -e 's|@''REPLACE_FREXP''@|$(REPLACE_FREXP)|g' \
+ -e 's|@''REPLACE_FREXPL''@|$(REPLACE_FREXPL)|g' \
+ -e 's|@''REPLACE_HUGE_VAL''@|$(REPLACE_HUGE_VAL)|g' \
+ -e 's|@''REPLACE_ISFINITE''@|$(REPLACE_ISFINITE)|g' \
+ -e 's|@''REPLACE_ISINF''@|$(REPLACE_ISINF)|g' \
+ -e 's|@''REPLACE_ISNAN''@|$(REPLACE_ISNAN)|g' \
+ -e 's|@''REPLACE_LDEXPL''@|$(REPLACE_LDEXPL)|g' \
+ -e 's|@''REPLACE_NAN''@|$(REPLACE_NAN)|g' \
+ -e 's|@''REPLACE_ROUND''@|$(REPLACE_ROUND)|g' \
+ -e 's|@''REPLACE_ROUNDF''@|$(REPLACE_ROUNDF)|g' \
+ -e 's|@''REPLACE_ROUNDL''@|$(REPLACE_ROUNDL)|g' \
+ -e 's|@''REPLACE_SIGNBIT''@|$(REPLACE_SIGNBIT)|g' \
+ -e 's|@''REPLACE_SIGNBIT_USING_GCC''@|$(REPLACE_SIGNBIT_USING_GCC)|g' \
+ -e 's|@''REPLACE_TRUNCL''@|$(REPLACE_TRUNCL)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/math.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create a replacement for <sched.h> when
+# the system doesn't have one.
+sched.h: sched.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SCHED_H''@|$(HAVE_SCHED_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SCHED_H''@|$(NEXT_SCHED_H)|g' \
+ -e 's|@''HAVE_STRUCT_SCHED_PARAM''@|$(HAVE_STRUCT_SCHED_PARAM)|g' \
+ < $(srcdir)/sched.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <signal.h> when the system
+# doesn't have a complete one.
+signal.h: signal.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SIGNAL_H''@|$(NEXT_SIGNAL_H)|g' \
+ -e 's|@''GNULIB_SIGNAL_H_SIGPIPE''@|$(GNULIB_SIGNAL_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_SIGPROCMASK''@|$(GNULIB_SIGPROCMASK)|g' \
+ -e 's|@''GNULIB_SIGACTION''@|$(GNULIB_SIGACTION)|g' \
+ -e 's|@''HAVE_POSIX_SIGNALBLOCKING''@|$(HAVE_POSIX_SIGNALBLOCKING)|g' \
+ -e 's|@''HAVE_SIGSET_T''@|$(HAVE_SIGSET_T)|g' \
+ -e 's|@''HAVE_SIGINFO_T''@|$(HAVE_SIGINFO_T)|g' \
+ -e 's|@''HAVE_SIGACTION''@|$(HAVE_SIGACTION)|g' \
+ -e 's|@''HAVE_STRUCT_SIGACTION_SA_SIGACTION''@|$(HAVE_STRUCT_SIGACTION_SA_SIGACTION)|g' \
+ -e 's|@''HAVE_TYPE_VOLATILE_SIG_ATOMIC_T''@|$(HAVE_TYPE_VOLATILE_SIG_ATOMIC_T)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/signal.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create a replacement for <spawn.h> when
+# the system doesn't have one.
+spawn.h: spawn.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_SPAWN_H''@|$(HAVE_SPAWN_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SPAWN_H''@|$(NEXT_SPAWN_H)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN''@|$(GNULIB_POSIX_SPAWN)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNP''@|$(GNULIB_POSIX_SPAWNP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY''@|$(GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_INIT''@|$(GNULIB_POSIX_SPAWNATTR_INIT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_GETFLAGS)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETFLAGS''@|$(GNULIB_POSIX_SPAWNATTR_SETFLAGS)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_GETPGROUP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETPGROUP''@|$(GNULIB_POSIX_SPAWNATTR_SETPGROUP)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY''@|$(GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_GETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_GETSIGMASK)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_SETSIGMASK''@|$(GNULIB_POSIX_SPAWNATTR_SETSIGMASK)|g' \
+ -e 's|@''GNULIB_POSIX_SPAWNATTR_DESTROY''@|$(GNULIB_POSIX_SPAWNATTR_DESTROY)|g' \
+ -e 's|@''HAVE_POSIX_SPAWN''@|$(HAVE_POSIX_SPAWN)|g' \
+ -e 's|@''HAVE_POSIX_SPAWNATTR_T''@|$(HAVE_POSIX_SPAWNATTR_T)|g' \
+ -e 's|@''HAVE_POSIX_SPAWN_FILE_ACTIONS_T''@|$(HAVE_POSIX_SPAWN_FILE_ACTIONS_T)|g' \
+ -e 's|@''REPLACE_POSIX_SPAWN''@|$(REPLACE_POSIX_SPAWN)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/spawn.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdarg.h> when the system
+# doesn't have one that works with the given compiler.
+stdarg.h: stdarg.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDARG_H''@|$(NEXT_STDARG_H)|g' \
+ < $(srcdir)/stdarg.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdbool.h> when the system
+# doesn't have one that works.
+stdbool.h: stdbool.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stddef.h> when the system
+# doesn't have one that works with the given compiler.
+stddef.h: stddef.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDDEF_H''@|$(NEXT_STDDEF_H)|g' \
+ -e 's|@''HAVE_WCHAR_T''@|$(HAVE_WCHAR_T)|g' \
+ -e 's|@''REPLACE_NULL''@|$(REPLACE_NULL)|g' \
+ < $(srcdir)/stddef.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdint.h> when the system
+# doesn't have one that works with the given compiler.
+stdint.h: stdint.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDINT_H''@|$(NEXT_STDINT_H)|g' \
+ -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \
+ -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \
+ -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \
+ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \
+ -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \
+ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/g' \
+ -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \
+ -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \
+ -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \
+ -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \
+ -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \
+ -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \
+ -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \
+ -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \
+ -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \
+ -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \
+ < $(srcdir)/stdint.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdio.h> when the system
+# doesn't have one that works with the given compiler.
+stdio.h: stdio.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDIO_H''@|$(NEXT_STDIO_H)|g' \
+ -e 's|@''GNULIB_DPRINTF''@|$(GNULIB_DPRINTF)|g' \
+ -e 's|@''GNULIB_FCLOSE''@|$(GNULIB_FCLOSE)|g' \
+ -e 's|@''GNULIB_FFLUSH''@|$(GNULIB_FFLUSH)|g' \
+ -e 's|@''GNULIB_FOPEN''@|$(GNULIB_FOPEN)|g' \
+ -e 's|@''GNULIB_FPRINTF''@|$(GNULIB_FPRINTF)|g' \
+ -e 's|@''GNULIB_FPRINTF_POSIX''@|$(GNULIB_FPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_FPURGE''@|$(GNULIB_FPURGE)|g' \
+ -e 's|@''GNULIB_FPUTC''@|$(GNULIB_FPUTC)|g' \
+ -e 's|@''GNULIB_FPUTS''@|$(GNULIB_FPUTS)|g' \
+ -e 's|@''GNULIB_FREOPEN''@|$(GNULIB_FREOPEN)|g' \
+ -e 's|@''GNULIB_FSEEK''@|$(GNULIB_FSEEK)|g' \
+ -e 's|@''GNULIB_FSEEKO''@|$(GNULIB_FSEEKO)|g' \
+ -e 's|@''GNULIB_FTELL''@|$(GNULIB_FTELL)|g' \
+ -e 's|@''GNULIB_FTELLO''@|$(GNULIB_FTELLO)|g' \
+ -e 's|@''GNULIB_FWRITE''@|$(GNULIB_FWRITE)|g' \
+ -e 's|@''GNULIB_GETDELIM''@|$(GNULIB_GETDELIM)|g' \
+ -e 's|@''GNULIB_GETLINE''@|$(GNULIB_GETLINE)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF''@|$(GNULIB_OBSTACK_PRINTF)|g' \
+ -e 's|@''GNULIB_OBSTACK_PRINTF_POSIX''@|$(GNULIB_OBSTACK_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PERROR''@|$(GNULIB_PERROR)|g' \
+ -e 's|@''GNULIB_POPEN''@|$(GNULIB_POPEN)|g' \
+ -e 's|@''GNULIB_PRINTF''@|$(GNULIB_PRINTF)|g' \
+ -e 's|@''GNULIB_PRINTF_POSIX''@|$(GNULIB_PRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_PUTC''@|$(GNULIB_PUTC)|g' \
+ -e 's|@''GNULIB_PUTCHAR''@|$(GNULIB_PUTCHAR)|g' \
+ -e 's|@''GNULIB_PUTS''@|$(GNULIB_PUTS)|g' \
+ -e 's|@''GNULIB_REMOVE''@|$(GNULIB_REMOVE)|g' \
+ -e 's|@''GNULIB_RENAME''@|$(GNULIB_RENAME)|g' \
+ -e 's|@''GNULIB_RENAMEAT''@|$(GNULIB_RENAMEAT)|g' \
+ -e 's|@''GNULIB_SNPRINTF''@|$(GNULIB_SNPRINTF)|g' \
+ -e 's|@''GNULIB_SPRINTF_POSIX''@|$(GNULIB_SPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_STDIO_H_SIGPIPE''@|$(GNULIB_STDIO_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_VASPRINTF''@|$(GNULIB_VASPRINTF)|g' \
+ -e 's|@''GNULIB_VDPRINTF''@|$(GNULIB_VDPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF''@|$(GNULIB_VFPRINTF)|g' \
+ -e 's|@''GNULIB_VFPRINTF_POSIX''@|$(GNULIB_VFPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VPRINTF''@|$(GNULIB_VPRINTF)|g' \
+ -e 's|@''GNULIB_VPRINTF_POSIX''@|$(GNULIB_VPRINTF_POSIX)|g' \
+ -e 's|@''GNULIB_VSNPRINTF''@|$(GNULIB_VSNPRINTF)|g' \
+ -e 's|@''GNULIB_VSPRINTF_POSIX''@|$(GNULIB_VSPRINTF_POSIX)|g' \
+ < $(srcdir)/stdio.in.h | \
+ sed -e 's|@''HAVE_DECL_FPURGE''@|$(HAVE_DECL_FPURGE)|g' \
+ -e 's|@''HAVE_DECL_GETDELIM''@|$(HAVE_DECL_GETDELIM)|g' \
+ -e 's|@''HAVE_DECL_GETLINE''@|$(HAVE_DECL_GETLINE)|g' \
+ -e 's|@''HAVE_DECL_OBSTACK_PRINTF''@|$(HAVE_DECL_OBSTACK_PRINTF)|g' \
+ -e 's|@''HAVE_DECL_SNPRINTF''@|$(HAVE_DECL_SNPRINTF)|g' \
+ -e 's|@''HAVE_DECL_VSNPRINTF''@|$(HAVE_DECL_VSNPRINTF)|g' \
+ -e 's|@''HAVE_DPRINTF''@|$(HAVE_DPRINTF)|g' \
+ -e 's|@''HAVE_RENAMEAT''@|$(HAVE_RENAMEAT)|g' \
+ -e 's|@''HAVE_VASPRINTF''@|$(HAVE_VASPRINTF)|g' \
+ -e 's|@''HAVE_VDPRINTF''@|$(HAVE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_DPRINTF''@|$(REPLACE_DPRINTF)|g' \
+ -e 's|@''REPLACE_FCLOSE''@|$(REPLACE_FCLOSE)|g' \
+ -e 's|@''REPLACE_FFLUSH''@|$(REPLACE_FFLUSH)|g' \
+ -e 's|@''REPLACE_FOPEN''@|$(REPLACE_FOPEN)|g' \
+ -e 's|@''REPLACE_FPRINTF''@|$(REPLACE_FPRINTF)|g' \
+ -e 's|@''REPLACE_FPURGE''@|$(REPLACE_FPURGE)|g' \
+ -e 's|@''REPLACE_FREOPEN''@|$(REPLACE_FREOPEN)|g' \
+ -e 's|@''REPLACE_FSEEK''@|$(REPLACE_FSEEK)|g' \
+ -e 's|@''REPLACE_FSEEKO''@|$(REPLACE_FSEEKO)|g' \
+ -e 's|@''REPLACE_FTELL''@|$(REPLACE_FTELL)|g' \
+ -e 's|@''REPLACE_FTELLO''@|$(REPLACE_FTELLO)|g' \
+ -e 's|@''REPLACE_GETDELIM''@|$(REPLACE_GETDELIM)|g' \
+ -e 's|@''REPLACE_GETLINE''@|$(REPLACE_GETLINE)|g' \
+ -e 's|@''REPLACE_OBSTACK_PRINTF''@|$(REPLACE_OBSTACK_PRINTF)|g' \
+ -e 's|@''REPLACE_PERROR''@|$(REPLACE_PERROR)|g' \
+ -e 's|@''REPLACE_POPEN''@|$(REPLACE_POPEN)|g' \
+ -e 's|@''REPLACE_PRINTF''@|$(REPLACE_PRINTF)|g' \
+ -e 's|@''REPLACE_REMOVE''@|$(REPLACE_REMOVE)|g' \
+ -e 's|@''REPLACE_RENAME''@|$(REPLACE_RENAME)|g' \
+ -e 's|@''REPLACE_RENAMEAT''@|$(REPLACE_RENAMEAT)|g' \
+ -e 's|@''REPLACE_SNPRINTF''@|$(REPLACE_SNPRINTF)|g' \
+ -e 's|@''REPLACE_SPRINTF''@|$(REPLACE_SPRINTF)|g' \
+ -e 's|@''REPLACE_STDIO_WRITE_FUNCS''@|$(REPLACE_STDIO_WRITE_FUNCS)|g' \
+ -e 's|@''REPLACE_VASPRINTF''@|$(REPLACE_VASPRINTF)|g' \
+ -e 's|@''REPLACE_VDPRINTF''@|$(REPLACE_VDPRINTF)|g' \
+ -e 's|@''REPLACE_VFPRINTF''@|$(REPLACE_VFPRINTF)|g' \
+ -e 's|@''REPLACE_VPRINTF''@|$(REPLACE_VPRINTF)|g' \
+ -e 's|@''REPLACE_VSNPRINTF''@|$(REPLACE_VSNPRINTF)|g' \
+ -e 's|@''REPLACE_VSPRINTF''@|$(REPLACE_VSPRINTF)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <stdlib.h> when the system
+# doesn't have one that works with the given compiler.
+stdlib.h: stdlib.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STDLIB_H''@|$(NEXT_STDLIB_H)|g' \
+ -e 's|@''GNULIB_ATOLL''@|$(GNULIB_ATOLL)|g' \
+ -e 's|@''GNULIB_CALLOC_POSIX''@|$(GNULIB_CALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_CANONICALIZE_FILE_NAME''@|$(GNULIB_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''GNULIB_GETLOADAVG''@|$(GNULIB_GETLOADAVG)|g' \
+ -e 's|@''GNULIB_GETSUBOPT''@|$(GNULIB_GETSUBOPT)|g' \
+ -e 's|@''GNULIB_MALLOC_POSIX''@|$(GNULIB_MALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_MKDTEMP''@|$(GNULIB_MKDTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMP''@|$(GNULIB_MKOSTEMP)|g' \
+ -e 's|@''GNULIB_MKOSTEMPS''@|$(GNULIB_MKOSTEMPS)|g' \
+ -e 's|@''GNULIB_MKSTEMP''@|$(GNULIB_MKSTEMP)|g' \
+ -e 's|@''GNULIB_MKSTEMPS''@|$(GNULIB_MKSTEMPS)|g' \
+ -e 's|@''GNULIB_PUTENV''@|$(GNULIB_PUTENV)|g' \
+ -e 's|@''GNULIB_RANDOM_R''@|$(GNULIB_RANDOM_R)|g' \
+ -e 's|@''GNULIB_REALLOC_POSIX''@|$(GNULIB_REALLOC_POSIX)|g' \
+ -e 's|@''GNULIB_REALPATH''@|$(GNULIB_REALPATH)|g' \
+ -e 's|@''GNULIB_RPMATCH''@|$(GNULIB_RPMATCH)|g' \
+ -e 's|@''GNULIB_SETENV''@|$(GNULIB_SETENV)|g' \
+ -e 's|@''GNULIB_STRTOD''@|$(GNULIB_STRTOD)|g' \
+ -e 's|@''GNULIB_STRTOLL''@|$(GNULIB_STRTOLL)|g' \
+ -e 's|@''GNULIB_STRTOULL''@|$(GNULIB_STRTOULL)|g' \
+ -e 's|@''GNULIB_UNSETENV''@|$(GNULIB_UNSETENV)|g' \
+ -e 's|@''HAVE_ATOLL''@|$(HAVE_ATOLL)|g' \
+ -e 's|@''HAVE_CALLOC_POSIX''@|$(HAVE_CALLOC_POSIX)|g' \
+ -e 's|@''HAVE_CANONICALIZE_FILE_NAME''@|$(HAVE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''HAVE_DECL_GETLOADAVG''@|$(HAVE_DECL_GETLOADAVG)|g' \
+ -e 's|@''HAVE_GETSUBOPT''@|$(HAVE_GETSUBOPT)|g' \
+ -e 's|@''HAVE_MALLOC_POSIX''@|$(HAVE_MALLOC_POSIX)|g' \
+ -e 's|@''HAVE_MKDTEMP''@|$(HAVE_MKDTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMP''@|$(HAVE_MKOSTEMP)|g' \
+ -e 's|@''HAVE_MKOSTEMPS''@|$(HAVE_MKOSTEMPS)|g' \
+ -e 's|@''HAVE_MKSTEMPS''@|$(HAVE_MKSTEMPS)|g' \
+ -e 's|@''HAVE_RANDOM_H''@|$(HAVE_RANDOM_H)|g' \
+ -e 's|@''HAVE_RANDOM_R''@|$(HAVE_RANDOM_R)|g' \
+ -e 's|@''HAVE_REALLOC_POSIX''@|$(HAVE_REALLOC_POSIX)|g' \
+ -e 's|@''HAVE_REALPATH''@|$(HAVE_REALPATH)|g' \
+ -e 's|@''HAVE_RPMATCH''@|$(HAVE_RPMATCH)|g' \
+ -e 's|@''HAVE_SETENV''@|$(HAVE_SETENV)|g' \
+ -e 's|@''HAVE_STRTOD''@|$(HAVE_STRTOD)|g' \
+ -e 's|@''HAVE_STRTOLL''@|$(HAVE_STRTOLL)|g' \
+ -e 's|@''HAVE_STRTOULL''@|$(HAVE_STRTOULL)|g' \
+ -e 's|@''HAVE_STRUCT_RANDOM_DATA''@|$(HAVE_STRUCT_RANDOM_DATA)|g' \
+ -e 's|@''HAVE_SYS_LOADAVG_H''@|$(HAVE_SYS_LOADAVG_H)|g' \
+ -e 's|@''HAVE_UNSETENV''@|$(HAVE_UNSETENV)|g' \
+ -e 's|@''REPLACE_CANONICALIZE_FILE_NAME''@|$(REPLACE_CANONICALIZE_FILE_NAME)|g' \
+ -e 's|@''REPLACE_MKSTEMP''@|$(REPLACE_MKSTEMP)|g' \
+ -e 's|@''REPLACE_PUTENV''@|$(REPLACE_PUTENV)|g' \
+ -e 's|@''REPLACE_REALPATH''@|$(REPLACE_REALPATH)|g' \
+ -e 's|@''REPLACE_SETENV''@|$(REPLACE_SETENV)|g' \
+ -e 's|@''REPLACE_STRTOD''@|$(REPLACE_STRTOD)|g' \
+ -e 's|@''REPLACE_UNSETENV''@|$(REPLACE_UNSETENV)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/stdlib.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <string.h> when the system
+# doesn't have one that works with the given compiler.
+string.h: string.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_STRING_H''@|$(NEXT_STRING_H)|g' \
+ -e 's|@''GNULIB_MBSLEN''@|$(GNULIB_MBSLEN)|g' \
+ -e 's|@''GNULIB_MBSNLEN''@|$(GNULIB_MBSNLEN)|g' \
+ -e 's|@''GNULIB_MBSCHR''@|$(GNULIB_MBSCHR)|g' \
+ -e 's|@''GNULIB_MBSRCHR''@|$(GNULIB_MBSRCHR)|g' \
+ -e 's|@''GNULIB_MBSSTR''@|$(GNULIB_MBSSTR)|g' \
+ -e 's|@''GNULIB_MBSCASECMP''@|$(GNULIB_MBSCASECMP)|g' \
+ -e 's|@''GNULIB_MBSNCASECMP''@|$(GNULIB_MBSNCASECMP)|g' \
+ -e 's|@''GNULIB_MBSPCASECMP''@|$(GNULIB_MBSPCASECMP)|g' \
+ -e 's|@''GNULIB_MBSCASESTR''@|$(GNULIB_MBSCASESTR)|g' \
+ -e 's|@''GNULIB_MBSCSPN''@|$(GNULIB_MBSCSPN)|g' \
+ -e 's|@''GNULIB_MBSPBRK''@|$(GNULIB_MBSPBRK)|g' \
+ -e 's|@''GNULIB_MBSSPN''@|$(GNULIB_MBSSPN)|g' \
+ -e 's|@''GNULIB_MBSSEP''@|$(GNULIB_MBSSEP)|g' \
+ -e 's|@''GNULIB_MBSTOK_R''@|$(GNULIB_MBSTOK_R)|g' \
+ -e 's|@''GNULIB_MEMCHR''@|$(GNULIB_MEMCHR)|g' \
+ -e 's|@''GNULIB_MEMMEM''@|$(GNULIB_MEMMEM)|g' \
+ -e 's|@''GNULIB_MEMPCPY''@|$(GNULIB_MEMPCPY)|g' \
+ -e 's|@''GNULIB_MEMRCHR''@|$(GNULIB_MEMRCHR)|g' \
+ -e 's|@''GNULIB_RAWMEMCHR''@|$(GNULIB_RAWMEMCHR)|g' \
+ -e 's|@''GNULIB_STPCPY''@|$(GNULIB_STPCPY)|g' \
+ -e 's|@''GNULIB_STPNCPY''@|$(GNULIB_STPNCPY)|g' \
+ -e 's|@''GNULIB_STRCHRNUL''@|$(GNULIB_STRCHRNUL)|g' \
+ -e 's|@''GNULIB_STRDUP''@|$(GNULIB_STRDUP)|g' \
+ -e 's|@''GNULIB_STRNDUP''@|$(GNULIB_STRNDUP)|g' \
+ -e 's|@''GNULIB_STRNLEN''@|$(GNULIB_STRNLEN)|g' \
+ -e 's|@''GNULIB_STRPBRK''@|$(GNULIB_STRPBRK)|g' \
+ -e 's|@''GNULIB_STRSEP''@|$(GNULIB_STRSEP)|g' \
+ -e 's|@''GNULIB_STRSTR''@|$(GNULIB_STRSTR)|g' \
+ -e 's|@''GNULIB_STRCASESTR''@|$(GNULIB_STRCASESTR)|g' \
+ -e 's|@''GNULIB_STRTOK_R''@|$(GNULIB_STRTOK_R)|g' \
+ -e 's|@''GNULIB_STRERROR''@|$(GNULIB_STRERROR)|g' \
+ -e 's|@''GNULIB_STRSIGNAL''@|$(GNULIB_STRSIGNAL)|g' \
+ -e 's|@''GNULIB_STRVERSCMP''@|$(GNULIB_STRVERSCMP)|g' \
+ < $(srcdir)/string.in.h | \
+ sed -e 's|@''HAVE_MBSLEN''@|$(HAVE_MBSLEN)|g' \
+ -e 's|@''HAVE_DECL_MEMMEM''@|$(HAVE_DECL_MEMMEM)|g' \
+ -e 's|@''HAVE_MEMPCPY''@|$(HAVE_MEMPCPY)|g' \
+ -e 's|@''HAVE_DECL_MEMRCHR''@|$(HAVE_DECL_MEMRCHR)|g' \
+ -e 's|@''HAVE_RAWMEMCHR''@|$(HAVE_RAWMEMCHR)|g' \
+ -e 's|@''HAVE_STPCPY''@|$(HAVE_STPCPY)|g' \
+ -e 's|@''HAVE_STPNCPY''@|$(HAVE_STPNCPY)|g' \
+ -e 's|@''HAVE_STRCHRNUL''@|$(HAVE_STRCHRNUL)|g' \
+ -e 's|@''HAVE_DECL_STRDUP''@|$(HAVE_DECL_STRDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNDUP''@|$(HAVE_DECL_STRNDUP)|g' \
+ -e 's|@''HAVE_DECL_STRNLEN''@|$(HAVE_DECL_STRNLEN)|g' \
+ -e 's|@''HAVE_STRPBRK''@|$(HAVE_STRPBRK)|g' \
+ -e 's|@''HAVE_STRSEP''@|$(HAVE_STRSEP)|g' \
+ -e 's|@''HAVE_STRCASESTR''@|$(HAVE_STRCASESTR)|g' \
+ -e 's|@''HAVE_DECL_STRTOK_R''@|$(HAVE_DECL_STRTOK_R)|g' \
+ -e 's|@''HAVE_DECL_STRERROR''@|$(HAVE_DECL_STRERROR)|g' \
+ -e 's|@''HAVE_DECL_STRSIGNAL''@|$(HAVE_DECL_STRSIGNAL)|g' \
+ -e 's|@''HAVE_STRVERSCMP''@|$(HAVE_STRVERSCMP)|g' \
+ -e 's|@''REPLACE_MEMCHR''@|$(REPLACE_MEMCHR)|g' \
+ -e 's|@''REPLACE_MEMMEM''@|$(REPLACE_MEMMEM)|g' \
+ -e 's|@''REPLACE_STRCASESTR''@|$(REPLACE_STRCASESTR)|g' \
+ -e 's|@''REPLACE_STRDUP''@|$(REPLACE_STRDUP)|g' \
+ -e 's|@''REPLACE_STRSTR''@|$(REPLACE_STRSTR)|g' \
+ -e 's|@''REPLACE_STRERROR''@|$(REPLACE_STRERROR)|g' \
+ -e 's|@''REPLACE_STRNDUP''@|$(REPLACE_STRNDUP)|g' \
+ -e 's|@''REPLACE_STRSIGNAL''@|$(REPLACE_STRSIGNAL)|g' \
+ -e 's|@''REPLACE_STRTOK_R''@|$(REPLACE_STRTOK_R)|g' \
+ -e 's|@''UNDEFINE_STRTOK_R''@|$(UNDEFINE_STRTOK_R)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ < $(srcdir)/string.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/stat.h> when the system
+# has one that is incomplete.
+sys/stat.h: sys_stat.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_STAT_H''@|$(NEXT_SYS_STAT_H)|g' \
+ -e 's|@''GNULIB_FCHMODAT''@|$(GNULIB_FCHMODAT)|g' \
+ -e 's|@''GNULIB_FSTATAT''@|$(GNULIB_FSTATAT)|g' \
+ -e 's|@''GNULIB_FUTIMENS''@|$(GNULIB_FUTIMENS)|g' \
+ -e 's|@''GNULIB_LCHMOD''@|$(GNULIB_LCHMOD)|g' \
+ -e 's|@''GNULIB_LSTAT''@|$(GNULIB_LSTAT)|g' \
+ -e 's|@''GNULIB_MKDIRAT''@|$(GNULIB_MKDIRAT)|g' \
+ -e 's|@''GNULIB_MKFIFO''@|$(GNULIB_MKFIFO)|g' \
+ -e 's|@''GNULIB_MKFIFOAT''@|$(GNULIB_MKFIFOAT)|g' \
+ -e 's|@''GNULIB_MKNOD''@|$(GNULIB_MKNOD)|g' \
+ -e 's|@''GNULIB_MKNODAT''@|$(GNULIB_MKNODAT)|g' \
+ -e 's|@''GNULIB_STAT''@|$(GNULIB_STAT)|g' \
+ -e 's|@''GNULIB_UTIMENSAT''@|$(GNULIB_UTIMENSAT)|g' \
+ -e 's|@''HAVE_FCHMODAT''@|$(HAVE_FCHMODAT)|g' \
+ -e 's|@''HAVE_FSTATAT''@|$(HAVE_FSTATAT)|g' \
+ -e 's|@''HAVE_FUTIMENS''@|$(HAVE_FUTIMENS)|g' \
+ -e 's|@''HAVE_LCHMOD''@|$(HAVE_LCHMOD)|g' \
+ -e 's|@''HAVE_LSTAT''@|$(HAVE_LSTAT)|g' \
+ -e 's|@''HAVE_MKDIRAT''@|$(HAVE_MKDIRAT)|g' \
+ -e 's|@''HAVE_MKFIFO''@|$(HAVE_MKFIFO)|g' \
+ -e 's|@''HAVE_MKFIFOAT''@|$(HAVE_MKFIFOAT)|g' \
+ -e 's|@''HAVE_MKNOD''@|$(HAVE_MKNOD)|g' \
+ -e 's|@''HAVE_MKNODAT''@|$(HAVE_MKNODAT)|g' \
+ -e 's|@''HAVE_UTIMENSAT''@|$(HAVE_UTIMENSAT)|g' \
+ -e 's|@''REPLACE_FSTAT''@|$(REPLACE_FSTAT)|g' \
+ -e 's|@''REPLACE_FSTATAT''@|$(REPLACE_FSTATAT)|g' \
+ -e 's|@''REPLACE_FUTIMENS''@|$(REPLACE_FUTIMENS)|g' \
+ -e 's|@''REPLACE_LSTAT''@|$(REPLACE_LSTAT)|g' \
+ -e 's|@''REPLACE_MKDIR''@|$(REPLACE_MKDIR)|g' \
+ -e 's|@''REPLACE_MKFIFO''@|$(REPLACE_MKFIFO)|g' \
+ -e 's|@''REPLACE_MKNOD''@|$(REPLACE_MKNOD)|g' \
+ -e 's|@''REPLACE_STAT''@|$(REPLACE_STAT)|g' \
+ -e 's|@''REPLACE_UTIMENSAT''@|$(REPLACE_UTIMENSAT)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_stat.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/time.h> when the system
+# doesn't have one that works with the given compiler.
+sys/time.h: sys_time.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_SYS_TIME_H''@/$(HAVE_SYS_TIME_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_TIME_H''@|$(NEXT_SYS_TIME_H)|g' \
+ -e 's/@''GNULIB_GETTIMEOFDAY''@/$(GNULIB_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_GETTIMEOFDAY''@/$(HAVE_GETTIMEOFDAY)/g' \
+ -e 's/@''HAVE_STRUCT_TIMEVAL''@/$(HAVE_STRUCT_TIMEVAL)/g' \
+ -e 's/@''REPLACE_GETTIMEOFDAY''@/$(REPLACE_GETTIMEOFDAY)/g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/sys_time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <sys/wait.h> when the system
+# has one that is incomplete.
+sys/wait.h: sys_wait.in.h
+ $(AM_V_at)$(MKDIR_P) sys
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_SYS_WAIT_H''@|$(NEXT_SYS_WAIT_H)|g' \
+ < $(srcdir)/sys_wait.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <time.h> when the system
+# doesn't have one that works with the given compiler.
+time.h: time.in.h $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */' && \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@NEXT_TIME_H''@|$(NEXT_TIME_H)|g' \
+ -e 's|@REPLACE_LOCALTIME_R''@|$(REPLACE_LOCALTIME_R)|g' \
+ -e 's|@REPLACE_MKTIME''@|$(REPLACE_MKTIME)|g' \
+ -e 's|@REPLACE_NANOSLEEP''@|$(REPLACE_NANOSLEEP)|g' \
+ -e 's|@REPLACE_STRPTIME''@|$(REPLACE_STRPTIME)|g' \
+ -e 's|@REPLACE_TIMEGM''@|$(REPLACE_TIMEGM)|g' \
+ -e 's|@SYS_TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(SYS_TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e 's|@TIME_H_DEFINES_STRUCT_TIMESPEC''@|$(TIME_H_DEFINES_STRUCT_TIMESPEC)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ < $(srcdir)/time.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create an empty placeholder for
+# <unistd.h> when the system doesn't have one.
+unistd.h: unistd.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''HAVE_UNISTD_H''@|$(HAVE_UNISTD_H)|g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_UNISTD_H''@|$(NEXT_UNISTD_H)|g' \
+ -e 's|@''GNULIB_CHOWN''@|$(GNULIB_CHOWN)|g' \
+ -e 's|@''GNULIB_CLOSE''@|$(GNULIB_CLOSE)|g' \
+ -e 's|@''GNULIB_DUP2''@|$(GNULIB_DUP2)|g' \
+ -e 's|@''GNULIB_DUP3''@|$(GNULIB_DUP3)|g' \
+ -e 's|@''GNULIB_ENVIRON''@|$(GNULIB_ENVIRON)|g' \
+ -e 's|@''GNULIB_EUIDACCESS''@|$(GNULIB_EUIDACCESS)|g' \
+ -e 's|@''GNULIB_FACCESSAT''@|$(GNULIB_FACCESSAT)|g' \
+ -e 's|@''GNULIB_FCHDIR''@|$(GNULIB_FCHDIR)|g' \
+ -e 's|@''GNULIB_FCHOWNAT''@|$(GNULIB_FCHOWNAT)|g' \
+ -e 's|@''GNULIB_FSYNC''@|$(GNULIB_FSYNC)|g' \
+ -e 's|@''GNULIB_FTRUNCATE''@|$(GNULIB_FTRUNCATE)|g' \
+ -e 's|@''GNULIB_GETCWD''@|$(GNULIB_GETCWD)|g' \
+ -e 's|@''GNULIB_GETDOMAINNAME''@|$(GNULIB_GETDOMAINNAME)|g' \
+ -e 's|@''GNULIB_GETDTABLESIZE''@|$(GNULIB_GETDTABLESIZE)|g' \
+ -e 's|@''GNULIB_GETGROUPS''@|$(GNULIB_GETGROUPS)|g' \
+ -e 's|@''GNULIB_GETHOSTNAME''@|$(GNULIB_GETHOSTNAME)|g' \
+ -e 's|@''GNULIB_GETLOGIN''@|$(GNULIB_GETLOGIN)|g' \
+ -e 's|@''GNULIB_GETLOGIN_R''@|$(GNULIB_GETLOGIN_R)|g' \
+ -e 's|@''GNULIB_GETPAGESIZE''@|$(GNULIB_GETPAGESIZE)|g' \
+ -e 's|@''GNULIB_GETUSERSHELL''@|$(GNULIB_GETUSERSHELL)|g' \
+ -e 's|@''GNULIB_LCHOWN''@|$(GNULIB_LCHOWN)|g' \
+ -e 's|@''GNULIB_LINK''@|$(GNULIB_LINK)|g' \
+ -e 's|@''GNULIB_LINKAT''@|$(GNULIB_LINKAT)|g' \
+ -e 's|@''GNULIB_LSEEK''@|$(GNULIB_LSEEK)|g' \
+ -e 's|@''GNULIB_PIPE2''@|$(GNULIB_PIPE2)|g' \
+ -e 's|@''GNULIB_PREAD''@|$(GNULIB_PREAD)|g' \
+ -e 's|@''GNULIB_READLINK''@|$(GNULIB_READLINK)|g' \
+ -e 's|@''GNULIB_READLINKAT''@|$(GNULIB_READLINKAT)|g' \
+ -e 's|@''GNULIB_RMDIR''@|$(GNULIB_RMDIR)|g' \
+ -e 's|@''GNULIB_SLEEP''@|$(GNULIB_SLEEP)|g' \
+ -e 's|@''GNULIB_SYMLINK''@|$(GNULIB_SYMLINK)|g' \
+ -e 's|@''GNULIB_SYMLINKAT''@|$(GNULIB_SYMLINKAT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_GETOPT''@|$(GNULIB_UNISTD_H_GETOPT)|g' \
+ -e 's|@''GNULIB_UNISTD_H_SIGPIPE''@|$(GNULIB_UNISTD_H_SIGPIPE)|g' \
+ -e 's|@''GNULIB_UNLINK''@|$(GNULIB_UNLINK)|g' \
+ -e 's|@''GNULIB_UNLINKAT''@|$(GNULIB_UNLINKAT)|g' \
+ -e 's|@''GNULIB_USLEEP''@|$(GNULIB_USLEEP)|g' \
+ -e 's|@''GNULIB_WRITE''@|$(GNULIB_WRITE)|g' \
+ < $(srcdir)/unistd.in.h | \
+ sed -e 's|@''HAVE_CHOWN''@|$(HAVE_CHOWN)|g' \
+ -e 's|@''HAVE_DUP2''@|$(HAVE_DUP2)|g' \
+ -e 's|@''HAVE_DUP3''@|$(HAVE_DUP3)|g' \
+ -e 's|@''HAVE_EUIDACCESS''@|$(HAVE_EUIDACCESS)|g' \
+ -e 's|@''HAVE_FACCESSAT''@|$(HAVE_FACCESSAT)|g' \
+ -e 's|@''HAVE_FCHOWNAT''@|$(HAVE_FCHOWNAT)|g' \
+ -e 's|@''HAVE_FSYNC''@|$(HAVE_FSYNC)|g' \
+ -e 's|@''HAVE_FTRUNCATE''@|$(HAVE_FTRUNCATE)|g' \
+ -e 's|@''HAVE_GETDOMAINNAME''@|$(HAVE_GETDOMAINNAME)|g' \
+ -e 's|@''HAVE_GETDTABLESIZE''@|$(HAVE_GETDTABLESIZE)|g' \
+ -e 's|@''HAVE_GETGROUPS''@|$(HAVE_GETGROUPS)|g' \
+ -e 's|@''HAVE_GETHOSTNAME''@|$(HAVE_GETHOSTNAME)|g' \
+ -e 's|@''HAVE_GETLOGIN''@|$(HAVE_GETLOGIN)|g' \
+ -e 's|@''HAVE_GETPAGESIZE''@|$(HAVE_GETPAGESIZE)|g' \
+ -e 's|@''HAVE_GETUSERSHELL''@|$(HAVE_GETUSERSHELL)|g' \
+ -e 's|@''HAVE_LCHOWN''@|$(HAVE_LCHOWN)|g' \
+ -e 's|@''HAVE_LINK''@|$(HAVE_LINK)|g' \
+ -e 's|@''HAVE_LINKAT''@|$(HAVE_LINKAT)|g' \
+ -e 's|@''HAVE_PIPE2''@|$(HAVE_PIPE2)|g' \
+ -e 's|@''HAVE_PREAD''@|$(HAVE_PREAD)|g' \
+ -e 's|@''HAVE_READLINK''@|$(HAVE_READLINK)|g' \
+ -e 's|@''HAVE_READLINKAT''@|$(HAVE_READLINKAT)|g' \
+ -e 's|@''HAVE_SLEEP''@|$(HAVE_SLEEP)|g' \
+ -e 's|@''HAVE_SYMLINK''@|$(HAVE_SYMLINK)|g' \
+ -e 's|@''HAVE_SYMLINKAT''@|$(HAVE_SYMLINKAT)|g' \
+ -e 's|@''HAVE_UNLINKAT''@|$(HAVE_UNLINKAT)|g' \
+ -e 's|@''HAVE_USLEEP''@|$(HAVE_USLEEP)|g' \
+ -e 's|@''HAVE_DECL_ENVIRON''@|$(HAVE_DECL_ENVIRON)|g' \
+ -e 's|@''HAVE_DECL_GETLOGIN_R''@|$(HAVE_DECL_GETLOGIN_R)|g' \
+ -e 's|@''HAVE_OS_H''@|$(HAVE_OS_H)|g' \
+ -e 's|@''HAVE_SYS_PARAM_H''@|$(HAVE_SYS_PARAM_H)|g' \
+ -e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
+ -e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
+ -e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
+ -e 's|@''REPLACE_FCHDIR''@|$(REPLACE_FCHDIR)|g' \
+ -e 's|@''REPLACE_FCHOWNAT''@|$(REPLACE_FCHOWNAT)|g' \
+ -e 's|@''REPLACE_GETCWD''@|$(REPLACE_GETCWD)|g' \
+ -e 's|@''REPLACE_GETGROUPS''@|$(REPLACE_GETGROUPS)|g' \
+ -e 's|@''REPLACE_GETPAGESIZE''@|$(REPLACE_GETPAGESIZE)|g' \
+ -e 's|@''REPLACE_LCHOWN''@|$(REPLACE_LCHOWN)|g' \
+ -e 's|@''REPLACE_LINK''@|$(REPLACE_LINK)|g' \
+ -e 's|@''REPLACE_LINKAT''@|$(REPLACE_LINKAT)|g' \
+ -e 's|@''REPLACE_LSEEK''@|$(REPLACE_LSEEK)|g' \
+ -e 's|@''REPLACE_PREAD''@|$(REPLACE_PREAD)|g' \
+ -e 's|@''REPLACE_READLINK''@|$(REPLACE_READLINK)|g' \
+ -e 's|@''REPLACE_RMDIR''@|$(REPLACE_RMDIR)|g' \
+ -e 's|@''REPLACE_SLEEP''@|$(REPLACE_SLEEP)|g' \
+ -e 's|@''REPLACE_SYMLINK''@|$(REPLACE_SYMLINK)|g' \
+ -e 's|@''REPLACE_UNLINK''@|$(REPLACE_UNLINK)|g' \
+ -e 's|@''REPLACE_UNLINKAT''@|$(REPLACE_UNLINKAT)|g' \
+ -e 's|@''REPLACE_USLEEP''@|$(REPLACE_USLEEP)|g' \
+ -e 's|@''REPLACE_WRITE''@|$(REPLACE_WRITE)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H''@|$(UNISTD_H_HAVE_WINSOCK2_H)|g' \
+ -e 's|@''UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS''@|$(UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)'; \
+ } > $@-t && \
+ mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wchar.h> when the system
+# version does not work standalone.
+wchar.h: wchar.in.h $(WARN_ON_USE_H) $(ARG_NONNULL_H)
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCHAR_H''@|$(NEXT_WCHAR_H)|g' \
+ -e 's|@''HAVE_WCHAR_H''@|$(HAVE_WCHAR_H)|g' \
+ -e 's|@''GNULIB_BTOWC''@|$(GNULIB_BTOWC)|g' \
+ -e 's|@''GNULIB_WCTOB''@|$(GNULIB_WCTOB)|g' \
+ -e 's|@''GNULIB_MBSINIT''@|$(GNULIB_MBSINIT)|g' \
+ -e 's|@''GNULIB_MBRTOWC''@|$(GNULIB_MBRTOWC)|g' \
+ -e 's|@''GNULIB_MBRLEN''@|$(GNULIB_MBRLEN)|g' \
+ -e 's|@''GNULIB_MBSRTOWCS''@|$(GNULIB_MBSRTOWCS)|g' \
+ -e 's|@''GNULIB_MBSNRTOWCS''@|$(GNULIB_MBSNRTOWCS)|g' \
+ -e 's|@''GNULIB_WCRTOMB''@|$(GNULIB_WCRTOMB)|g' \
+ -e 's|@''GNULIB_WCSRTOMBS''@|$(GNULIB_WCSRTOMBS)|g' \
+ -e 's|@''GNULIB_WCSNRTOMBS''@|$(GNULIB_WCSNRTOMBS)|g' \
+ -e 's|@''GNULIB_WCWIDTH''@|$(GNULIB_WCWIDTH)|g' \
+ -e 's|@''HAVE_WINT_T''@|$(HAVE_WINT_T)|g' \
+ -e 's|@''HAVE_BTOWC''@|$(HAVE_BTOWC)|g' \
+ -e 's|@''HAVE_MBSINIT''@|$(HAVE_MBSINIT)|g' \
+ -e 's|@''HAVE_MBRTOWC''@|$(HAVE_MBRTOWC)|g' \
+ -e 's|@''HAVE_MBRLEN''@|$(HAVE_MBRLEN)|g' \
+ -e 's|@''HAVE_MBSRTOWCS''@|$(HAVE_MBSRTOWCS)|g' \
+ -e 's|@''HAVE_MBSNRTOWCS''@|$(HAVE_MBSNRTOWCS)|g' \
+ -e 's|@''HAVE_WCRTOMB''@|$(HAVE_WCRTOMB)|g' \
+ -e 's|@''HAVE_WCSRTOMBS''@|$(HAVE_WCSRTOMBS)|g' \
+ -e 's|@''HAVE_WCSNRTOMBS''@|$(HAVE_WCSNRTOMBS)|g' \
+ -e 's|@''HAVE_DECL_WCTOB''@|$(HAVE_DECL_WCTOB)|g' \
+ -e 's|@''HAVE_DECL_WCWIDTH''@|$(HAVE_DECL_WCWIDTH)|g' \
+ -e 's|@''REPLACE_MBSTATE_T''@|$(REPLACE_MBSTATE_T)|g' \
+ -e 's|@''REPLACE_BTOWC''@|$(REPLACE_BTOWC)|g' \
+ -e 's|@''REPLACE_WCTOB''@|$(REPLACE_WCTOB)|g' \
+ -e 's|@''REPLACE_MBSINIT''@|$(REPLACE_MBSINIT)|g' \
+ -e 's|@''REPLACE_MBRTOWC''@|$(REPLACE_MBRTOWC)|g' \
+ -e 's|@''REPLACE_MBRLEN''@|$(REPLACE_MBRLEN)|g' \
+ -e 's|@''REPLACE_MBSRTOWCS''@|$(REPLACE_MBSRTOWCS)|g' \
+ -e 's|@''REPLACE_MBSNRTOWCS''@|$(REPLACE_MBSNRTOWCS)|g' \
+ -e 's|@''REPLACE_WCRTOMB''@|$(REPLACE_WCRTOMB)|g' \
+ -e 's|@''REPLACE_WCSRTOMBS''@|$(REPLACE_WCSRTOMBS)|g' \
+ -e 's|@''REPLACE_WCSNRTOMBS''@|$(REPLACE_WCSNRTOMBS)|g' \
+ -e 's|@''REPLACE_WCWIDTH''@|$(REPLACE_WCWIDTH)|g' \
+ -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+ < $(srcdir)/wchar.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+# We need the following in order to create <wctype.h> when the system
+# doesn't have one that works with the given compiler.
+wctype.h: wctype.in.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
+ sed -e 's/@''HAVE_WCTYPE_H''@/$(HAVE_WCTYPE_H)/g' \
+ -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \
+ -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \
+ -e 's|@''NEXT_WCTYPE_H''@|$(NEXT_WCTYPE_H)|g' \
+ -e 's/@''HAVE_ISWCNTRL''@/$(HAVE_ISWCNTRL)/g' \
+ -e 's/@''HAVE_WINT_T''@/$(HAVE_WINT_T)/g' \
+ -e 's/@''REPLACE_ISWCNTRL''@/$(REPLACE_ISWCNTRL)/g' \
+ < $(srcdir)/wctype.in.h; \
+ } > $@-t && \
+ mv $@-t $@
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/gnu/alloca.c b/gnu/alloca.c
new file mode 100755
index 00000000..75afdb96
--- /dev/null
+++ b/gnu/alloca.c
@@ -0,0 +1,489 @@
+/* alloca.c -- allocate automatically reclaimed memory
+ (Mostly) portable public-domain implementation -- D A Gwyn
+
+ This implementation of the PWB library alloca function,
+ which is used to allocate space off the run-time stack so
+ that it is automatically reclaimed upon procedure exit,
+ was inspired by discussions with J. Q. Johnson of Cornell.
+ J.Otto Tennant <jot@cray.com> contributed the Cray support.
+
+ There are some preprocessor constants that can
+ be defined when compiling for your specific system, for
+ improved efficiency; however, the defaults should be okay.
+
+ The general concept of this implementation is to keep
+ track of all alloca-allocated blocks, and reclaim any
+ that are found to be deeper in the stack than the current
+ invocation. This heuristic does not reclaim storage as
+ soon as it becomes invalid, but it will do so eventually.
+
+ As a special case, alloca(0) reclaims storage without
+ allocating any. It is a good idea to use alloca(0) in
+ your main control loop, etc. to force garbage collection. */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#include <string.h>
+#include <stdlib.h>
+
+#ifdef emacs
+# include "lisp.h"
+# include "blockinput.h"
+# ifdef EMACS_FREE
+# undef free
+# define free EMACS_FREE
+# endif
+#else
+# define memory_full() abort ()
+#endif
+
+/* If compiling with GCC 2, this file's not needed. */
+#if !defined (__GNUC__) || __GNUC__ < 2
+
+/* If someone has defined alloca as a macro,
+ there must be some other way alloca is supposed to work. */
+# ifndef alloca
+
+# ifdef emacs
+# ifdef static
+/* actually, only want this if static is defined as ""
+ -- this is for usg, in which emacs must undefine static
+ in order to make unexec workable
+ */
+# ifndef STACK_DIRECTION
+you
+lose
+-- must know STACK_DIRECTION at compile-time
+/* Using #error here is not wise since this file should work for
+ old and obscure compilers. */
+# endif /* STACK_DIRECTION undefined */
+# endif /* static */
+# endif /* emacs */
+
+/* If your stack is a linked list of frames, you have to
+ provide an "address metric" ADDRESS_FUNCTION macro. */
+
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
+long i00afunc ();
+# define ADDRESS_FUNCTION(arg) (char *) i00afunc (&(arg))
+# else
+# define ADDRESS_FUNCTION(arg) &(arg)
+# endif
+
+/* Define STACK_DIRECTION if you know the direction of stack
+ growth for your system; otherwise it will be automatically
+ deduced at run-time.
+
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+
+# ifndef STACK_DIRECTION
+# define STACK_DIRECTION 0 /* Direction unknown. */
+# endif
+
+# if STACK_DIRECTION != 0
+
+# define STACK_DIR STACK_DIRECTION /* Known at compile-time. */
+
+# else /* STACK_DIRECTION == 0; need run-time code. */
+
+static int stack_dir; /* 1 or -1 once known. */
+# define STACK_DIR stack_dir
+
+static void
+find_stack_direction (void)
+{
+ static char *addr = NULL; /* Address of first `dummy', once known. */
+ auto char dummy; /* To get stack address. */
+
+ if (addr == NULL)
+ { /* Initial entry. */
+ addr = ADDRESS_FUNCTION (dummy);
+
+ find_stack_direction (); /* Recurse once. */
+ }
+ else
+ {
+ /* Second entry. */
+ if (ADDRESS_FUNCTION (dummy) > addr)
+ stack_dir = 1; /* Stack grew upward. */
+ else
+ stack_dir = -1; /* Stack grew downward. */
+ }
+}
+
+# endif /* STACK_DIRECTION == 0 */
+
+/* An "alloca header" is used to:
+ (a) chain together all alloca'ed blocks;
+ (b) keep track of stack depth.
+
+ It is very important that sizeof(header) agree with malloc
+ alignment chunk size. The following default should work okay. */
+
+# ifndef ALIGN_SIZE
+# define ALIGN_SIZE sizeof(double)
+# endif
+
+typedef union hdr
+{
+ char align[ALIGN_SIZE]; /* To force sizeof(header). */
+ struct
+ {
+ union hdr *next; /* For chaining headers. */
+ char *deep; /* For stack depth measure. */
+ } h;
+} header;
+
+static header *last_alloca_header = NULL; /* -> last alloca header. */
+
+/* Return a pointer to at least SIZE bytes of storage,
+ which will be automatically reclaimed upon exit from
+ the procedure that called alloca. Originally, this space
+ was supposed to be taken from the current stack frame of the
+ caller, but that method cannot be made to work for some
+ implementations of C, for example under Gould's UTX/32. */
+
+void *
+alloca (size_t size)
+{
+ auto char probe; /* Probes stack depth: */
+ register char *depth = ADDRESS_FUNCTION (probe);
+
+# if STACK_DIRECTION == 0
+ if (STACK_DIR == 0) /* Unknown growth direction. */
+ find_stack_direction ();
+# endif
+
+ /* Reclaim garbage, defined as all alloca'd storage that
+ was allocated from deeper in the stack than currently. */
+
+ {
+ register header *hp; /* Traverses linked list. */
+
+# ifdef emacs
+ BLOCK_INPUT;
+# endif
+
+ for (hp = last_alloca_header; hp != NULL;)
+ if ((STACK_DIR > 0 && hp->h.deep > depth)
+ || (STACK_DIR < 0 && hp->h.deep < depth))
+ {
+ register header *np = hp->h.next;
+
+ free (hp); /* Collect garbage. */
+
+ hp = np; /* -> next header. */
+ }
+ else
+ break; /* Rest are not deeper. */
+
+ last_alloca_header = hp; /* -> last valid storage. */
+
+# ifdef emacs
+ UNBLOCK_INPUT;
+# endif
+ }
+
+ if (size == 0)
+ return NULL; /* No allocation required. */
+
+ /* Allocate combined header + user data storage. */
+
+ {
+ /* Address of header. */
+ register header *new;
+
+ size_t combined_size = sizeof (header) + size;
+ if (combined_size < sizeof (header))
+ memory_full ();
+
+ new = malloc (combined_size);
+
+ if (! new)
+ memory_full ();
+
+ new->h.next = last_alloca_header;
+ new->h.deep = depth;
+
+ last_alloca_header = new;
+
+ /* User storage begins just after header. */
+
+ return (void *) (new + 1);
+ }
+}
+
+# if defined (CRAY) && defined (CRAY_STACKSEG_END)
+
+# ifdef DEBUG_I00AFUNC
+# include <stdio.h>
+# endif
+
+# ifndef CRAY_STACK
+# define CRAY_STACK
+# ifndef CRAY2
+/* Stack structures for CRAY-1, CRAY X-MP, and CRAY Y-MP */
+struct stack_control_header
+ {
+ long shgrow:32; /* Number of times stack has grown. */
+ long shaseg:32; /* Size of increments to stack. */
+ long shhwm:32; /* High water mark of stack. */
+ long shsize:32; /* Current size of stack (all segments). */
+ };
+
+/* The stack segment linkage control information occurs at
+ the high-address end of a stack segment. (The stack
+ grows from low addresses to high addresses.) The initial
+ part of the stack segment linkage control information is
+ 0200 (octal) words. This provides for register storage
+ for the routine which overflows the stack. */
+
+struct stack_segment_linkage
+ {
+ long ss[0200]; /* 0200 overflow words. */
+ long sssize:32; /* Number of words in this segment. */
+ long ssbase:32; /* Offset to stack base. */
+ long:32;
+ long sspseg:32; /* Offset to linkage control of previous
+ segment of stack. */
+ long:32;
+ long sstcpt:32; /* Pointer to task common address block. */
+ long sscsnm; /* Private control structure number for
+ microtasking. */
+ long ssusr1; /* Reserved for user. */
+ long ssusr2; /* Reserved for user. */
+ long sstpid; /* Process ID for pid based multi-tasking. */
+ long ssgvup; /* Pointer to multitasking thread giveup. */
+ long sscray[7]; /* Reserved for Cray Research. */
+ long ssa0;
+ long ssa1;
+ long ssa2;
+ long ssa3;
+ long ssa4;
+ long ssa5;
+ long ssa6;
+ long ssa7;
+ long sss0;
+ long sss1;
+ long sss2;
+ long sss3;
+ long sss4;
+ long sss5;
+ long sss6;
+ long sss7;
+ };
+
+# else /* CRAY2 */
+/* The following structure defines the vector of words
+ returned by the STKSTAT library routine. */
+struct stk_stat
+ {
+ long now; /* Current total stack size. */
+ long maxc; /* Amount of contiguous space which would
+ be required to satisfy the maximum
+ stack demand to date. */
+ long high_water; /* Stack high-water mark. */
+ long overflows; /* Number of stack overflow ($STKOFEN) calls. */
+ long hits; /* Number of internal buffer hits. */
+ long extends; /* Number of block extensions. */
+ long stko_mallocs; /* Block allocations by $STKOFEN. */
+ long underflows; /* Number of stack underflow calls ($STKRETN). */
+ long stko_free; /* Number of deallocations by $STKRETN. */
+ long stkm_free; /* Number of deallocations by $STKMRET. */
+ long segments; /* Current number of stack segments. */
+ long maxs; /* Maximum number of stack segments so far. */
+ long pad_size; /* Stack pad size. */
+ long current_address; /* Current stack segment address. */
+ long current_size; /* Current stack segment size. This
+ number is actually corrupted by STKSTAT to
+ include the fifteen word trailer area. */
+ long initial_address; /* Address of initial segment. */
+ long initial_size; /* Size of initial segment. */
+ };
+
+/* The following structure describes the data structure which trails
+ any stack segment. I think that the description in 'asdef' is
+ out of date. I only describe the parts that I am sure about. */
+
+struct stk_trailer
+ {
+ long this_address; /* Address of this block. */
+ long this_size; /* Size of this block (does not include
+ this trailer). */
+ long unknown2;
+ long unknown3;
+ long link; /* Address of trailer block of previous
+ segment. */
+ long unknown5;
+ long unknown6;
+ long unknown7;
+ long unknown8;
+ long unknown9;
+ long unknown10;
+ long unknown11;
+ long unknown12;
+ long unknown13;
+ long unknown14;
+ };
+
+# endif /* CRAY2 */
+# endif /* not CRAY_STACK */
+
+# ifdef CRAY2
+/* Determine a "stack measure" for an arbitrary ADDRESS.
+ I doubt that "lint" will like this much. */
+
+static long
+i00afunc (long *address)
+{
+ struct stk_stat status;
+ struct stk_trailer *trailer;
+ long *block, size;
+ long result = 0;
+
+ /* We want to iterate through all of the segments. The first
+ step is to get the stack status structure. We could do this
+ more quickly and more directly, perhaps, by referencing the
+ $LM00 common block, but I know that this works. */
+
+ STKSTAT (&status);
+
+ /* Set up the iteration. */
+
+ trailer = (struct stk_trailer *) (status.current_address
+ + status.current_size
+ - 15);
+
+ /* There must be at least one stack segment. Therefore it is
+ a fatal error if "trailer" is null. */
+
+ if (trailer == 0)
+ abort ();
+
+ /* Discard segments that do not contain our argument address. */
+
+ while (trailer != 0)
+ {
+ block = (long *) trailer->this_address;
+ size = trailer->this_size;
+ if (block == 0 || size == 0)
+ abort ();
+ trailer = (struct stk_trailer *) trailer->link;
+ if ((block <= address) && (address < (block + size)))
+ break;
+ }
+
+ /* Set the result to the offset in this segment and add the sizes
+ of all predecessor segments. */
+
+ result = address - block;
+
+ if (trailer == 0)
+ {
+ return result;
+ }
+
+ do
+ {
+ if (trailer->this_size <= 0)
+ abort ();
+ result += trailer->this_size;
+ trailer = (struct stk_trailer *) trailer->link;
+ }
+ while (trailer != 0);
+
+ /* We are done. Note that if you present a bogus address (one
+ not in any segment), you will get a different number back, formed
+ from subtracting the address of the first block. This is probably
+ not what you want. */
+
+ return (result);
+}
+
+# else /* not CRAY2 */
+/* Stack address function for a CRAY-1, CRAY X-MP, or CRAY Y-MP.
+ Determine the number of the cell within the stack,
+ given the address of the cell. The purpose of this
+ routine is to linearize, in some sense, stack addresses
+ for alloca. */
+
+static long
+i00afunc (long address)
+{
+ long stkl = 0;
+
+ long size, pseg, this_segment, stack;
+ long result = 0;
+
+ struct stack_segment_linkage *ssptr;
+
+ /* Register B67 contains the address of the end of the
+ current stack segment. If you (as a subprogram) store
+ your registers on the stack and find that you are past
+ the contents of B67, you have overflowed the segment.
+
+ B67 also points to the stack segment linkage control
+ area, which is what we are really interested in. */
+
+ stkl = CRAY_STACKSEG_END ();
+ ssptr = (struct stack_segment_linkage *) stkl;
+
+ /* If one subtracts 'size' from the end of the segment,
+ one has the address of the first word of the segment.
+
+ If this is not the first segment, 'pseg' will be
+ nonzero. */
+
+ pseg = ssptr->sspseg;
+ size = ssptr->sssize;
+
+ this_segment = stkl - size;
+
+ /* It is possible that calling this routine itself caused
+ a stack overflow. Discard stack segments which do not
+ contain the target address. */
+
+ while (!(this_segment <= address && address <= stkl))
+ {
+# ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o %011o\n", this_segment, address, stkl);
+# endif
+ if (pseg == 0)
+ break;
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ this_segment = stkl - size;
+ }
+
+ result = address - this_segment;
+
+ /* If you subtract pseg from the current end of the stack,
+ you get the address of the previous stack segment's end.
+ This seems a little convoluted to me, but I'll bet you save
+ a cycle somewhere. */
+
+ while (pseg != 0)
+ {
+# ifdef DEBUG_I00AFUNC
+ fprintf (stderr, "%011o %011o\n", pseg, size);
+# endif
+ stkl = stkl - pseg;
+ ssptr = (struct stack_segment_linkage *) stkl;
+ size = ssptr->sssize;
+ pseg = ssptr->sspseg;
+ result += size;
+ }
+ return (result);
+}
+
+# endif /* not CRAY2 */
+# endif /* CRAY */
+
+# endif /* no alloca */
+#endif /* not GCC version 3 */
diff --git a/gnu/alloca.in.h b/gnu/alloca.in.h
new file mode 100755
index 00000000..44f20b7a
--- /dev/null
+++ b/gnu/alloca.in.h
@@ -0,0 +1,56 @@
+/* Memory allocation on the stack.
+
+ Copyright (C) 1995, 1999, 2001-2004, 2006-2010 Free Software Foundation,
+ Inc.
+
+ This program is free software; you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published
+ by the Free Software Foundation; either version 3, 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
+ General Public License for more details.
+
+ You should have received a copy of the GNU General Public
+ License along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
+ USA. */
+
+/* Avoid using the symbol _ALLOCA_H here, as Bison assumes _ALLOCA_H
+ means there is a real alloca function. */
+#ifndef _GL_ALLOCA_H
+#define _GL_ALLOCA_H
+
+/* alloca (N) returns a pointer to N bytes of memory
+ allocated on the stack, which will last until the function returns.
+ Use of alloca should be avoided:
+ - inside arguments of function calls - undefined behaviour,
+ - in inline functions - the allocation may actually last until the
+ calling function returns,
+ - for huge N (say, N >= 65536) - you never know how large (or small)
+ the stack is, and when the stack cannot fulfill the memory allocation
+ request, the program just crashes.
+ */
+
+#ifndef alloca
+# ifdef __GNUC__
+# define alloca __builtin_alloca
+# elif defined _AIX
+# define alloca __alloca
+# elif defined _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# elif defined __DECC && defined __VMS
+# define alloca __ALLOCA
+# else
+# include <stddef.h>
+# ifdef __cplusplus
+extern "C"
+# endif
+void *alloca (size_t);
+# endif
+#endif
+
+#endif /* _GL_ALLOCA_H */
diff --git a/gnu/asnprintf.c b/gnu/asnprintf.c
new file mode 100755
index 00000000..3bd2229d
--- /dev/null
+++ b/gnu/asnprintf.c
@@ -0,0 +1,35 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+
+char *
+asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+ va_list args;
+ char *result;
+
+ va_start (args, format);
+ result = vasnprintf (resultbuf, lengthp, format, args);
+ va_end (args);
+ return result;
+}
diff --git a/gnu/asprintf.c b/gnu/asprintf.c
new file mode 100755
index 00000000..8273ecf9
--- /dev/null
+++ b/gnu/asprintf.c
@@ -0,0 +1,40 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002, 2006-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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
+
+#include <stdarg.h>
+
+int
+asprintf (char **resultp, const char *format, ...)
+{
+ va_list args;
+ int result;
+
+ va_start (args, format);
+ result = vasprintf (resultp, format, args);
+ va_end (args);
+ return result;
+}
diff --git a/gnu/basename-lgpl.c b/gnu/basename-lgpl.c
new file mode 100755
index 00000000..a35ff01c
--- /dev/null
+++ b/gnu/basename-lgpl.c
@@ -0,0 +1,75 @@
+/* basename.c -- return the last element in a file name
+
+ Copyright (C) 1990, 1998-2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <string.h>
+
+/* Return the address of the last file name component of NAME. If
+ NAME has no relative file name components because it is a file
+ system root, return the empty string. */
+
+char *
+last_component (char const *name)
+{
+ char const *base = name + FILE_SYSTEM_PREFIX_LEN (name);
+ char const *p;
+ bool saw_slash = false;
+
+ while (ISSLASH (*base))
+ base++;
+
+ for (p = base; *p; p++)
+ {
+ if (ISSLASH (*p))
+ saw_slash = true;
+ else if (saw_slash)
+ {
+ base = p;
+ saw_slash = false;
+ }
+ }
+
+ return (char *) base;
+}
+
+/* Return the length of the basename NAME. Typically NAME is the
+ value returned by base_name or last_component. Act like strlen
+ (NAME), except omit all trailing slashes. */
+
+size_t
+base_len (char const *name)
+{
+ size_t len;
+ size_t prefix_len = FILE_SYSTEM_PREFIX_LEN (name);
+
+ for (len = strlen (name); 1 < len && ISSLASH (name[len - 1]); len--)
+ continue;
+
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && len == 1
+ && ISSLASH (name[0]) && ISSLASH (name[1]) && ! name[2])
+ return 2;
+
+ if (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE && prefix_len
+ && len == prefix_len && ISSLASH (name[prefix_len]))
+ return prefix_len + 1;
+
+ return len;
+}
diff --git a/gnu/basename.c b/gnu/basename.c
new file mode 100755
index 00000000..24da93ac
--- /dev/null
+++ b/gnu/basename.c
@@ -0,0 +1,58 @@
+/* basename.c -- return the last element in a file name
+
+ Copyright (C) 1990, 1998-2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <string.h>
+#include "xalloc.h"
+#include "xstrndup.h"
+
+char *
+base_name (char const *name)
+{
+ char const *base = last_component (name);
+ size_t length;
+
+ /* If there is no last component, then name is a file system root or the
+ empty string. */
+ if (! *base)
+ return xstrndup (name, base_len (name));
+
+ /* Collapse a sequence of trailing slashes into one. */
+ length = base_len (base);
+ if (ISSLASH (base[length]))
+ length++;
+
+ /* On systems with drive letters, `a/b:c' must return `./b:c' rather
+ than `b:c' to avoid confusion with a drive letter. On systems
+ with pure POSIX semantics, this is not an issue. */
+ if (FILE_SYSTEM_PREFIX_LEN (base))
+ {
+ char *p = xmalloc (length + 3);
+ p[0] = '.';
+ p[1] = '/';
+ memcpy (p + 2, base, length);
+ p[length + 2] = '\0';
+ return p;
+ }
+
+ /* Finally, copy the basename. */
+ return xstrndup (base, length);
+}
diff --git a/gnu/binary-io.h b/gnu/binary-io.h
new file mode 100755
index 00000000..5451fd48
--- /dev/null
+++ b/gnu/binary-io.h
@@ -0,0 +1,66 @@
+/* Binary mode I/O.
+ Copyright (C) 2001, 2003, 2005, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _BINARY_H
+#define _BINARY_H
+
+/* For systems that distinguish between text and binary I/O.
+ O_BINARY is usually declared in <fcntl.h>. */
+#include <fcntl.h>
+
+/* The MSVC7 <stdio.h> doesn't like to be included after '#define fileno ...',
+ so we include it here first. */
+#include <stdio.h>
+
+#if !defined O_BINARY && defined _O_BINARY
+ /* For MSC-compatible compilers. */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+#if defined __BEOS__ || defined __HAIKU__
+ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+
+/* SET_BINARY (fd);
+ changes the file descriptor fd to perform binary I/O. */
+#if O_BINARY
+# if defined __EMX__ || defined __DJGPP__ || defined __CYGWIN__
+# include <io.h> /* declares setmode() */
+# else
+# define setmode _setmode
+# undef fileno
+# define fileno _fileno
+# endif
+# ifdef __DJGPP__
+# include <unistd.h> /* declares isatty() */
+ /* Avoid putting stdin/stdout in binary mode if it is connected to
+ the console, because that would make it impossible for the user
+ to interrupt the program through Ctrl-C or Ctrl-Break. */
+# define SET_BINARY(fd) ((void) (!isatty (fd) ? (setmode (fd, O_BINARY), 0) : 0))
+# else
+# define SET_BINARY(fd) ((void) setmode (fd, O_BINARY))
+# endif
+#else
+ /* On reasonable systems, binary I/O is the default. */
+# undef O_BINARY
+# define O_BINARY 0
+# define SET_BINARY(fd) /* do nothing */ ((void) 0)
+#endif
+
+#endif /* _BINARY_H */
diff --git a/gnu/bitrotate.h b/gnu/bitrotate.h
new file mode 100755
index 00000000..80e6ef50
--- /dev/null
+++ b/gnu/bitrotate.h
@@ -0,0 +1,126 @@
+/* bitrotate.h - Rotate bits in integers
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
+
+#ifndef _GL_BITROTATE_H
+#define _GL_BITROTATE_H
+
+#include <limits.h>
+#include <stdint.h>
+#include <sys/types.h>
+
+#ifdef UINT64_MAX
+/* Given an unsigned 64-bit argument X, return the value corresponding
+ to rotating the bits N steps to the left. N must be between 1 and
+ 63 inclusive. */
+static inline uint64_t
+rotl64 (uint64_t x, int n)
+{
+ return ((x << n) | (x >> (64 - n))) & UINT64_MAX;
+}
+
+/* Given an unsigned 64-bit argument X, return the value corresponding
+ to rotating the bits N steps to the right. N must be between 1 to
+ 63 inclusive.*/
+static inline uint64_t
+rotr64 (uint64_t x, int n)
+{
+ return ((x >> n) | (x << (64 - n))) & UINT64_MAX;
+}
+#endif
+
+/* Given an unsigned 32-bit argument X, return the value corresponding
+ to rotating the bits N steps to the left. N must be between 1 and
+ 31 inclusive. */
+static inline uint32_t
+rotl32 (uint32_t x, int n)
+{
+ return ((x << n) | (x >> (32 - n))) & UINT32_MAX;
+}
+
+/* Given an unsigned 32-bit argument X, return the value corresponding
+ to rotating the bits N steps to the right. N must be between 1 to
+ 31 inclusive.*/
+static inline uint32_t
+rotr32 (uint32_t x, int n)
+{
+ return ((x >> n) | (x << (32 - n))) & UINT32_MAX;
+}
+
+/* Given a size_t argument X, return the value corresponding
+ to rotating the bits N steps to the left. N must be between 1 and
+ (CHAR_BIT * sizeof (size_t) - 1) inclusive. */
+static inline size_t
+rotl_sz (size_t x, int n)
+{
+ return ((x << n) | (x >> ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
+}
+
+/* Given a size_t argument X, return the value corresponding
+ to rotating the bits N steps to the right. N must be between 1 to
+ (CHAR_BIT * sizeof (size_t) - 1) inclusive. */
+static inline size_t
+rotr_sz (size_t x, int n)
+{
+ return ((x >> n) | (x << ((CHAR_BIT * sizeof x) - n))) & SIZE_MAX;
+}
+
+/* Given an unsigned 16-bit argument X, return the value corresponding
+ to rotating the bits N steps to the left. N must be between 1 to
+ 15 inclusive, but on most relevant targets N can also be 0 and 16
+ because 'int' is at least 32 bits and the arguments must widen
+ before shifting. */
+static inline uint16_t
+rotl16 (uint16_t x, int n)
+{
+ return ((x << n) | (x >> (16 - n))) & UINT16_MAX;
+}
+
+/* Given an unsigned 16-bit argument X, return the value corresponding
+ to rotating the bits N steps to the right. N must be in 1 to 15
+ inclusive, but on most relevant targets N can also be 0 and 16
+ because 'int' is at least 32 bits and the arguments must widen
+ before shifting. */
+static inline uint16_t
+rotr16 (uint16_t x, int n)
+{
+ return ((x >> n) | (x << (16 - n))) & UINT16_MAX;
+}
+
+/* Given an unsigned 8-bit argument X, return the value corresponding
+ to rotating the bits N steps to the left. N must be between 1 to 7
+ inclusive, but on most relevant targets N can also be 0 and 8
+ because 'int' is at least 32 bits and the arguments must widen
+ before shifting. */
+static inline uint8_t
+rotl8 (uint8_t x, int n)
+{
+ return ((x << n) | (x >> (8 - n))) & UINT8_MAX;
+}
+
+/* Given an unsigned 8-bit argument X, return the value corresponding
+ to rotating the bits N steps to the right. N must be in 1 to 7
+ inclusive, but on most relevant targets N can also be 0 and 8
+ because 'int' is at least 32 bits and the arguments must widen
+ before shifting. */
+static inline uint8_t
+rotr8 (uint8_t x, int n)
+{
+ return ((x >> n) | (x << (8 - n))) & UINT8_MAX;
+}
+
+#endif /* _GL_BITROTATE_H */
diff --git a/gnu/btowc.c b/gnu/btowc.c
new file mode 100755
index 00000000..a46f1b24
--- /dev/null
+++ b/gnu/btowc.c
@@ -0,0 +1,38 @@
+/* Convert unibyte character to wide character.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <stdio.h>
+
+wint_t
+btowc (int c)
+{
+ if (c != EOF)
+ {
+ char buf[1];
+ wchar_t wc;
+
+ buf[0] = c;
+ if (mbtowc (&wc, buf, 1) >= 0)
+ return wc;
+ }
+ return WEOF;
+}
diff --git a/gnu/c-ctype.c b/gnu/c-ctype.c
new file mode 100755
index 00000000..0d8da205
--- /dev/null
+++ b/gnu/c-ctype.c
@@ -0,0 +1,396 @@
+/* Character handling in C locale.
+
+ Copyright 2000-2003, 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 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#define NO_C_CTYPE_MACROS
+#include "c-ctype.h"
+
+/* The function isascii is not locale dependent. Its use in EBCDIC is
+ questionable. */
+bool
+c_isascii (int c)
+{
+ return (c >= 0x00 && c <= 0x7f);
+}
+
+bool
+c_isalnum (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+ return ((c >= '0' && c <= '9')
+ || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z'));
+#else
+ return ((c >= '0' && c <= '9')
+ || (c >= 'A' && c <= 'Z')
+ || (c >= 'a' && c <= 'z'));
+#endif
+#else
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isalpha (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+ return ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z');
+#else
+ return ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z'));
+#endif
+#else
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isblank (int c)
+{
+ return (c == ' ' || c == '\t');
+}
+
+bool
+c_iscntrl (int c)
+{
+#if C_CTYPE_ASCII
+ return ((c & ~0x1f) == 0 || c == 0x7f);
+#else
+ switch (c)
+ {
+ case ' ': case '!': case '"': case '#': case '$': case '%':
+ case '&': case '\'': case '(': case ')': case '*': case '+':
+ case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '[': case '\\': case ']': case '^': case '_': case '`':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '{': case '|': case '}': case '~':
+ return 0;
+ default:
+ return 1;
+ }
+#endif
+}
+
+bool
+c_isdigit (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS
+ return (c >= '0' && c <= '9');
+#else
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_islower (int c)
+{
+#if C_CTYPE_CONSECUTIVE_LOWERCASE
+ return (c >= 'a' && c <= 'z');
+#else
+ switch (c)
+ {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isgraph (int c)
+{
+#if C_CTYPE_ASCII
+ return (c >= '!' && c <= '~');
+#else
+ switch (c)
+ {
+ case '!': case '"': case '#': case '$': case '%': case '&':
+ case '\'': case '(': case ')': case '*': case '+': case ',':
+ case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '[': case '\\': case ']': case '^': case '_': case '`':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '{': case '|': case '}': case '~':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isprint (int c)
+{
+#if C_CTYPE_ASCII
+ return (c >= ' ' && c <= '~');
+#else
+ switch (c)
+ {
+ case ' ': case '!': case '"': case '#': case '$': case '%':
+ case '&': case '\'': case '(': case ')': case '*': case '+':
+ case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case '[': case '\\': case ']': case '^': case '_': case '`':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '{': case '|': case '}': case '~':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_ispunct (int c)
+{
+#if C_CTYPE_ASCII
+ return ((c >= '!' && c <= '~')
+ && !((c >= '0' && c <= '9')
+ || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'Z')));
+#else
+ switch (c)
+ {
+ case '!': case '"': case '#': case '$': case '%': case '&':
+ case '\'': case '(': case ')': case '*': case '+': case ',':
+ case '-': case '.': case '/':
+ case ':': case ';': case '<': case '=': case '>': case '?':
+ case '@':
+ case '[': case '\\': case ']': case '^': case '_': case '`':
+ case '{': case '|': case '}': case '~':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isspace (int c)
+{
+ return (c == ' ' || c == '\t'
+ || c == '\n' || c == '\v' || c == '\f' || c == '\r');
+}
+
+bool
+c_isupper (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE
+ return (c >= 'A' && c <= 'Z');
+#else
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+bool
+c_isxdigit (int c)
+{
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+ return ((c >= '0' && c <= '9')
+ || ((c & ~0x20) >= 'A' && (c & ~0x20) <= 'F'));
+#else
+ return ((c >= '0' && c <= '9')
+ || (c >= 'A' && c <= 'F')
+ || (c >= 'a' && c <= 'f'));
+#endif
+#else
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ return 1;
+ default:
+ return 0;
+ }
+#endif
+}
+
+int
+c_tolower (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+ return (c >= 'A' && c <= 'Z' ? c - 'A' + 'a' : c);
+#else
+ switch (c)
+ {
+ case 'A': return 'a';
+ case 'B': return 'b';
+ case 'C': return 'c';
+ case 'D': return 'd';
+ case 'E': return 'e';
+ case 'F': return 'f';
+ case 'G': return 'g';
+ case 'H': return 'h';
+ case 'I': return 'i';
+ case 'J': return 'j';
+ case 'K': return 'k';
+ case 'L': return 'l';
+ case 'M': return 'm';
+ case 'N': return 'n';
+ case 'O': return 'o';
+ case 'P': return 'p';
+ case 'Q': return 'q';
+ case 'R': return 'r';
+ case 'S': return 's';
+ case 'T': return 't';
+ case 'U': return 'u';
+ case 'V': return 'v';
+ case 'W': return 'w';
+ case 'X': return 'x';
+ case 'Y': return 'y';
+ case 'Z': return 'z';
+ default: return c;
+ }
+#endif
+}
+
+int
+c_toupper (int c)
+{
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+ return (c >= 'a' && c <= 'z' ? c - 'a' + 'A' : c);
+#else
+ switch (c)
+ {
+ case 'a': return 'A';
+ case 'b': return 'B';
+ case 'c': return 'C';
+ case 'd': return 'D';
+ case 'e': return 'E';
+ case 'f': return 'F';
+ case 'g': return 'G';
+ case 'h': return 'H';
+ case 'i': return 'I';
+ case 'j': return 'J';
+ case 'k': return 'K';
+ case 'l': return 'L';
+ case 'm': return 'M';
+ case 'n': return 'N';
+ case 'o': return 'O';
+ case 'p': return 'P';
+ case 'q': return 'Q';
+ case 'r': return 'R';
+ case 's': return 'S';
+ case 't': return 'T';
+ case 'u': return 'U';
+ case 'v': return 'V';
+ case 'w': return 'W';
+ case 'x': return 'X';
+ case 'y': return 'Y';
+ case 'z': return 'Z';
+ default: return c;
+ }
+#endif
+}
diff --git a/gnu/c-ctype.h b/gnu/c-ctype.h
new file mode 100755
index 00000000..0eb27e65
--- /dev/null
+++ b/gnu/c-ctype.h
@@ -0,0 +1,295 @@
+/* Character handling in C locale.
+
+ These functions work like the corresponding functions in <ctype.h>,
+ except that they have the C (POSIX) locale hardwired, whereas the
+ <ctype.h> functions' behaviour depends on the current locale set via
+ setlocale.
+
+ Copyright (C) 2000-2003, 2006, 2008-2010 Free Software Foundation, Inc.
+
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software Foundation,
+Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef C_CTYPE_H
+#define C_CTYPE_H
+
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* The functions defined in this file assume the "C" locale and a character
+ set without diacritics (ASCII-US or EBCDIC-US or something like that).
+ Even if the "C" locale on a particular system is an extension of the ASCII
+ character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
+ is ISO-8859-1), the functions in this file recognize only the ASCII
+ characters. */
+
+
+/* Check whether the ASCII optimizations apply. */
+
+/* ANSI C89 (and ISO C99 5.2.1.3 too) already guarantees that
+ '0', '1', ..., '9' have consecutive integer values. */
+#define C_CTYPE_CONSECUTIVE_DIGITS 1
+
+#if ('A' <= 'Z') \
+ && ('A' + 1 == 'B') && ('B' + 1 == 'C') && ('C' + 1 == 'D') \
+ && ('D' + 1 == 'E') && ('E' + 1 == 'F') && ('F' + 1 == 'G') \
+ && ('G' + 1 == 'H') && ('H' + 1 == 'I') && ('I' + 1 == 'J') \
+ && ('J' + 1 == 'K') && ('K' + 1 == 'L') && ('L' + 1 == 'M') \
+ && ('M' + 1 == 'N') && ('N' + 1 == 'O') && ('O' + 1 == 'P') \
+ && ('P' + 1 == 'Q') && ('Q' + 1 == 'R') && ('R' + 1 == 'S') \
+ && ('S' + 1 == 'T') && ('T' + 1 == 'U') && ('U' + 1 == 'V') \
+ && ('V' + 1 == 'W') && ('W' + 1 == 'X') && ('X' + 1 == 'Y') \
+ && ('Y' + 1 == 'Z')
+#define C_CTYPE_CONSECUTIVE_UPPERCASE 1
+#endif
+
+#if ('a' <= 'z') \
+ && ('a' + 1 == 'b') && ('b' + 1 == 'c') && ('c' + 1 == 'd') \
+ && ('d' + 1 == 'e') && ('e' + 1 == 'f') && ('f' + 1 == 'g') \
+ && ('g' + 1 == 'h') && ('h' + 1 == 'i') && ('i' + 1 == 'j') \
+ && ('j' + 1 == 'k') && ('k' + 1 == 'l') && ('l' + 1 == 'm') \
+ && ('m' + 1 == 'n') && ('n' + 1 == 'o') && ('o' + 1 == 'p') \
+ && ('p' + 1 == 'q') && ('q' + 1 == 'r') && ('r' + 1 == 's') \
+ && ('s' + 1 == 't') && ('t' + 1 == 'u') && ('u' + 1 == 'v') \
+ && ('v' + 1 == 'w') && ('w' + 1 == 'x') && ('x' + 1 == 'y') \
+ && ('y' + 1 == 'z')
+#define C_CTYPE_CONSECUTIVE_LOWERCASE 1
+#endif
+
+#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
+/* The character set is ASCII or one of its variants or extensions, not EBCDIC.
+ Testing the value of '\n' and '\r' is not relevant. */
+#define C_CTYPE_ASCII 1
+#endif
+
+
+/* Function declarations. */
+
+/* Unlike the functions in <ctype.h>, which require an argument in the range
+ of the 'unsigned char' type, the functions here operate on values that are
+ in the 'unsigned char' range or in the 'char' range. In other words,
+ when you have a 'char' value, you need to cast it before using it as
+ argument to a <ctype.h> function:
+
+ const char *s = ...;
+ if (isalpha ((unsigned char) *s)) ...
+
+ but you don't need to cast it for the functions defined in this file:
+
+ const char *s = ...;
+ if (c_isalpha (*s)) ...
+ */
+
+extern bool c_isascii (int c); /* not locale dependent */
+
+extern bool c_isalnum (int c);
+extern bool c_isalpha (int c);
+extern bool c_isblank (int c);
+extern bool c_iscntrl (int c);
+extern bool c_isdigit (int c);
+extern bool c_islower (int c);
+extern bool c_isgraph (int c);
+extern bool c_isprint (int c);
+extern bool c_ispunct (int c);
+extern bool c_isspace (int c);
+extern bool c_isupper (int c);
+extern bool c_isxdigit (int c);
+
+extern int c_tolower (int c);
+extern int c_toupper (int c);
+
+
+#if defined __GNUC__ && defined __OPTIMIZE__ && !defined __OPTIMIZE_SIZE__ && !defined NO_C_CTYPE_MACROS
+
+/* ASCII optimizations. */
+
+#undef c_isascii
+#define c_isascii(c) \
+ ({ int __c = (c); \
+ (__c >= 0x00 && __c <= 0x7f); \
+ })
+
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isalnum
+#define c_isalnum(c) \
+ ({ int __c = (c); \
+ ((__c >= '0' && __c <= '9') \
+ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z')); \
+ })
+#else
+#undef c_isalnum
+#define c_isalnum(c) \
+ ({ int __c = (c); \
+ ((__c >= '0' && __c <= '9') \
+ || (__c >= 'A' && __c <= 'Z') \
+ || (__c >= 'a' && __c <= 'z')); \
+ })
+#endif
+#endif
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isalpha
+#define c_isalpha(c) \
+ ({ int __c = (c); \
+ ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'Z'); \
+ })
+#else
+#undef c_isalpha
+#define c_isalpha(c) \
+ ({ int __c = (c); \
+ ((__c >= 'A' && __c <= 'Z') || (__c >= 'a' && __c <= 'z')); \
+ })
+#endif
+#endif
+
+#undef c_isblank
+#define c_isblank(c) \
+ ({ int __c = (c); \
+ (__c == ' ' || __c == '\t'); \
+ })
+
+#if C_CTYPE_ASCII
+#undef c_iscntrl
+#define c_iscntrl(c) \
+ ({ int __c = (c); \
+ ((__c & ~0x1f) == 0 || __c == 0x7f); \
+ })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_DIGITS
+#undef c_isdigit
+#define c_isdigit(c) \
+ ({ int __c = (c); \
+ (__c >= '0' && __c <= '9'); \
+ })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_LOWERCASE
+#undef c_islower
+#define c_islower(c) \
+ ({ int __c = (c); \
+ (__c >= 'a' && __c <= 'z'); \
+ })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_isgraph
+#define c_isgraph(c) \
+ ({ int __c = (c); \
+ (__c >= '!' && __c <= '~'); \
+ })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_isprint
+#define c_isprint(c) \
+ ({ int __c = (c); \
+ (__c >= ' ' && __c <= '~'); \
+ })
+#endif
+
+#if C_CTYPE_ASCII
+#undef c_ispunct
+#define c_ispunct(c) \
+ ({ int _c = (c); \
+ (c_isgraph (_c) && ! c_isalnum (_c)); \
+ })
+#endif
+
+#undef c_isspace
+#define c_isspace(c) \
+ ({ int __c = (c); \
+ (__c == ' ' || __c == '\t' \
+ || __c == '\n' || __c == '\v' || __c == '\f' || __c == '\r'); \
+ })
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE
+#undef c_isupper
+#define c_isupper(c) \
+ ({ int __c = (c); \
+ (__c >= 'A' && __c <= 'Z'); \
+ })
+#endif
+
+#if C_CTYPE_CONSECUTIVE_DIGITS \
+ && C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#if C_CTYPE_ASCII
+#undef c_isxdigit
+#define c_isxdigit(c) \
+ ({ int __c = (c); \
+ ((__c >= '0' && __c <= '9') \
+ || ((__c & ~0x20) >= 'A' && (__c & ~0x20) <= 'F')); \
+ })
+#else
+#undef c_isxdigit
+#define c_isxdigit(c) \
+ ({ int __c = (c); \
+ ((__c >= '0' && __c <= '9') \
+ || (__c >= 'A' && __c <= 'F') \
+ || (__c >= 'a' && __c <= 'f')); \
+ })
+#endif
+#endif
+
+#if C_CTYPE_CONSECUTIVE_UPPERCASE && C_CTYPE_CONSECUTIVE_LOWERCASE
+#undef c_tolower
+#define c_tolower(c) \
+ ({ int __c = (c); \
+ (__c >= 'A' && __c <= 'Z' ? __c - 'A' + 'a' : __c); \
+ })
+#undef c_toupper
+#define c_toupper(c) \
+ ({ int __c = (c); \
+ (__c >= 'a' && __c <= 'z' ? __c - 'a' + 'A' : __c); \
+ })
+#endif
+
+#endif /* optimizing for speed */
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* C_CTYPE_H */
diff --git a/gnu/c-strcase.h b/gnu/c-strcase.h
new file mode 100755
index 00000000..802ccfdf
--- /dev/null
+++ b/gnu/c-strcase.h
@@ -0,0 +1,56 @@
+/* Case-insensitive string comparison functions in C locale.
+ Copyright (C) 1995-1996, 2001, 2003, 2005, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef C_STRCASE_H
+#define C_STRCASE_H
+
+#include <stddef.h>
+
+
+/* The functions defined in this file assume the "C" locale and a character
+ set without diacritics (ASCII-US or EBCDIC-US or something like that).
+ Even if the "C" locale on a particular system is an extension of the ASCII
+ character set (like on BeOS, where it is UTF-8, or on AmigaOS, where it
+ is ISO-8859-1), the functions in this file recognize only the ASCII
+ characters. More precisely, one of the string arguments must be an ASCII
+ string; the other one can also contain non-ASCII characters (but then
+ the comparison result will be nonzero). */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Compare strings S1 and S2, ignoring case, returning less than, equal to or
+ greater than zero if S1 is lexicographically less than, equal to or greater
+ than S2. */
+extern int c_strcasecmp (const char *s1, const char *s2);
+
+/* Compare no more than N characters of strings S1 and S2, ignoring case,
+ returning less than, equal to or greater than zero if S1 is
+ lexicographically less than, equal to or greater than S2. */
+extern int c_strncasecmp (const char *s1, const char *s2, size_t n);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* C_STRCASE_H */
diff --git a/gnu/c-strcasecmp.c b/gnu/c-strcasecmp.c
new file mode 100755
index 00000000..55894637
--- /dev/null
+++ b/gnu/c-strcasecmp.c
@@ -0,0 +1,57 @@
+/* c-strcasecmp.c -- case insensitive string comparator in C locale
+ Copyright (C) 1998-1999, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "c-strcase.h"
+
+#include <limits.h>
+
+#include "c-ctype.h"
+
+int
+c_strcasecmp (const char *s1, const char *s2)
+{
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2)
+ return 0;
+
+ do
+ {
+ c1 = c_tolower (*p1);
+ c2 = c_tolower (*p2);
+
+ if (c1 == '\0')
+ break;
+
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ if (UCHAR_MAX <= INT_MAX)
+ return c1 - c2;
+ else
+ /* On machines where 'char' and 'int' are types of the same size, the
+ difference of two 'unsigned char' values - including the sign bit -
+ doesn't fit in an 'int'. */
+ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnu/c-strncasecmp.c b/gnu/c-strncasecmp.c
new file mode 100755
index 00000000..ef4dee65
--- /dev/null
+++ b/gnu/c-strncasecmp.c
@@ -0,0 +1,57 @@
+/* c-strncasecmp.c -- case insensitive string comparator in C locale
+ Copyright (C) 1998-1999, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "c-strcase.h"
+
+#include <limits.h>
+
+#include "c-ctype.h"
+
+int
+c_strncasecmp (const char *s1, const char *s2, size_t n)
+{
+ register const unsigned char *p1 = (const unsigned char *) s1;
+ register const unsigned char *p2 = (const unsigned char *) s2;
+ unsigned char c1, c2;
+
+ if (p1 == p2 || n == 0)
+ return 0;
+
+ do
+ {
+ c1 = c_tolower (*p1);
+ c2 = c_tolower (*p2);
+
+ if (--n == 0 || c1 == '\0')
+ break;
+
+ ++p1;
+ ++p2;
+ }
+ while (c1 == c2);
+
+ if (UCHAR_MAX <= INT_MAX)
+ return c1 - c2;
+ else
+ /* On machines where 'char' and 'int' are types of the same size, the
+ difference of two 'unsigned char' values - including the sign bit -
+ doesn't fit in an 'int'. */
+ return (c1 > c2 ? 1 : c1 < c2 ? -1 : 0);
+}
diff --git a/gnu/canonicalize-lgpl.c b/gnu/canonicalize-lgpl.c
new file mode 100755
index 00000000..480a1325
--- /dev/null
+++ b/gnu/canonicalize-lgpl.c
@@ -0,0 +1,371 @@
+/* Return the canonical absolute name of a given file.
+ Copyright (C) 1996-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#if !HAVE_CANONICALIZE_FILE_NAME || !FUNC_REALPATH_WORKS || defined _LIBC
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <alloca.h>
+#include <string.h>
+#include <unistd.h>
+#include <limits.h>
+#if HAVE_SYS_PARAM_H || defined _LIBC
+# include <sys/param.h>
+#endif
+#include <sys/stat.h>
+#include <errno.h>
+#include <stddef.h>
+
+#ifdef _LIBC
+# include <shlib-compat.h>
+#else
+# define SHLIB_COMPAT(lib, introduced, obsoleted) 0
+# define versioned_symbol(lib, local, symbol, version)
+# define compat_symbol(lib, local, symbol, version)
+# define weak_alias(local, symbol)
+# define __canonicalize_file_name canonicalize_file_name
+# define __realpath realpath
+# include "pathmax.h"
+# include "malloca.h"
+# if HAVE_GETCWD
+# ifdef VMS
+ /* We want the directory in Unix syntax, not in VMS syntax. */
+# define __getcwd(buf, max) getcwd (buf, max, 0)
+# else
+# define __getcwd getcwd
+# endif
+# else
+# define __getcwd(buf, max) getwd (buf)
+# endif
+# define __readlink readlink
+# define __set_errno(e) errno = (e)
+# ifndef MAXSYMLINKS
+# ifdef SYMLOOP_MAX
+# define MAXSYMLINKS SYMLOOP_MAX
+# else
+# define MAXSYMLINKS 20
+# endif
+# endif
+#endif
+
+#ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+#endif
+
+#if !FUNC_REALPATH_WORKS || defined _LIBC
+/* Return the canonical absolute name of file NAME. A canonical name
+ does not contain any `.', `..' components nor any repeated path
+ separators ('/') or symlinks. All path components must exist. If
+ RESOLVED is null, the result is malloc'd; otherwise, if the
+ canonical name is PATH_MAX chars or more, returns null with `errno'
+ set to ENAMETOOLONG; if the name fits in fewer than PATH_MAX chars,
+ returns the name in RESOLVED. If the name cannot be resolved and
+ RESOLVED is non-NULL, it contains the path of the first component
+ that cannot be resolved. If the path can be resolved, RESOLVED
+ holds the same value as the value returned. */
+
+char *
+__realpath (const char *name, char *resolved)
+{
+ char *rpath, *dest, *extra_buf = NULL;
+ const char *start, *end, *rpath_limit;
+ long int path_max;
+ int num_links = 0;
+
+ if (name == NULL)
+ {
+ /* As per Single Unix Specification V2 we must return an error if
+ either parameter is a null pointer. We extend this to allow
+ the RESOLVED parameter to be NULL in case the we are expected to
+ allocate the room for the return value. */
+ __set_errno (EINVAL);
+ return NULL;
+ }
+
+ if (name[0] == '\0')
+ {
+ /* As per Single Unix Specification V2 we must return an error if
+ the name argument points to an empty string. */
+ __set_errno (ENOENT);
+ return NULL;
+ }
+
+#ifdef PATH_MAX
+ path_max = PATH_MAX;
+#else
+ path_max = pathconf (name, _PC_PATH_MAX);
+ if (path_max <= 0)
+ path_max = 1024;
+#endif
+
+ if (resolved == NULL)
+ {
+ rpath = malloc (path_max);
+ if (rpath == NULL)
+ {
+ /* It's easier to set errno to ENOMEM than to rely on the
+ 'malloc-posix' gnulib module. */
+ errno = ENOMEM;
+ return NULL;
+ }
+ }
+ else
+ rpath = resolved;
+ rpath_limit = rpath + path_max;
+
+ if (name[0] != '/')
+ {
+ if (!__getcwd (rpath, path_max))
+ {
+ rpath[0] = '\0';
+ goto error;
+ }
+ dest = strchr (rpath, '\0');
+ }
+ else
+ {
+ rpath[0] = '/';
+ dest = rpath + 1;
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && name[1] == '/')
+ *dest++ = '/';
+ }
+
+ for (start = end = name; *start; start = end)
+ {
+#ifdef _LIBC
+ struct stat64 st;
+#else
+ struct stat st;
+#endif
+ int n;
+
+ /* Skip sequence of multiple path-separators. */
+ while (*start == '/')
+ ++start;
+
+ /* Find end of path component. */
+ for (end = start; *end && *end != '/'; ++end)
+ /* Nothing. */;
+
+ if (end - start == 0)
+ break;
+ else if (end - start == 1 && start[0] == '.')
+ /* nothing */;
+ else if (end - start == 2 && start[0] == '.' && start[1] == '.')
+ {
+ /* Back up to previous component, ignore if at root already. */
+ if (dest > rpath + 1)
+ while ((--dest)[-1] != '/');
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
+ && *dest == '/')
+ dest++;
+ }
+ else
+ {
+ size_t new_size;
+
+ if (dest[-1] != '/')
+ *dest++ = '/';
+
+ if (dest + (end - start) >= rpath_limit)
+ {
+ ptrdiff_t dest_offset = dest - rpath;
+ char *new_rpath;
+
+ if (resolved)
+ {
+ __set_errno (ENAMETOOLONG);
+ if (dest > rpath + 1)
+ dest--;
+ *dest = '\0';
+ goto error;
+ }
+ new_size = rpath_limit - rpath;
+ if (end - start + 1 > path_max)
+ new_size += end - start + 1;
+ else
+ new_size += path_max;
+ new_rpath = (char *) realloc (rpath, new_size);
+ if (new_rpath == NULL)
+ {
+ /* It's easier to set errno to ENOMEM than to rely on the
+ 'realloc-posix' gnulib module. */
+ errno = ENOMEM;
+ goto error;
+ }
+ rpath = new_rpath;
+ rpath_limit = rpath + new_size;
+
+ dest = rpath + dest_offset;
+ }
+
+#ifdef _LIBC
+ dest = __mempcpy (dest, start, end - start);
+#else
+ memcpy (dest, start, end - start);
+ dest += end - start;
+#endif
+ *dest = '\0';
+
+#ifdef _LIBC
+ if (__lxstat64 (_STAT_VER, rpath, &st) < 0)
+#else
+ if (lstat (rpath, &st) < 0)
+#endif
+ goto error;
+
+ if (S_ISLNK (st.st_mode))
+ {
+ char *buf;
+ size_t len;
+
+ if (++num_links > MAXSYMLINKS)
+ {
+ __set_errno (ELOOP);
+ goto error;
+ }
+
+ buf = malloca (path_max);
+ if (!buf)
+ {
+ errno = ENOMEM;
+ goto error;
+ }
+
+ n = __readlink (rpath, buf, path_max - 1);
+ if (n < 0)
+ {
+ int saved_errno = errno;
+ freea (buf);
+ errno = saved_errno;
+ goto error;
+ }
+ buf[n] = '\0';
+
+ if (!extra_buf)
+ {
+ extra_buf = malloca (path_max);
+ if (!extra_buf)
+ {
+ freea (buf);
+ errno = ENOMEM;
+ goto error;
+ }
+ }
+
+ len = strlen (end);
+ if ((long int) (n + len) >= path_max)
+ {
+ freea (buf);
+ __set_errno (ENAMETOOLONG);
+ goto error;
+ }
+
+ /* Careful here, end may be a pointer into extra_buf... */
+ memmove (&extra_buf[n], end, len + 1);
+ name = end = memcpy (extra_buf, buf, n);
+
+ if (buf[0] == '/')
+ {
+ dest = rpath + 1; /* It's an absolute symlink */
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && buf[1] == '/')
+ *dest++ = '/';
+ }
+ else
+ {
+ /* Back up to previous component, ignore if at root
+ already: */
+ if (dest > rpath + 1)
+ while ((--dest)[-1] != '/');
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1
+ && *dest == '/')
+ dest++;
+ }
+ }
+ else if (!S_ISDIR (st.st_mode) && *end != '\0')
+ {
+ __set_errno (ENOTDIR);
+ goto error;
+ }
+ }
+ }
+ if (dest > rpath + 1 && dest[-1] == '/')
+ --dest;
+ if (DOUBLE_SLASH_IS_DISTINCT_ROOT && dest == rpath + 1 && *dest == '/')
+ dest++;
+ *dest = '\0';
+
+ if (extra_buf)
+ freea (extra_buf);
+
+ return rpath;
+
+error:
+ {
+ int saved_errno = errno;
+ if (extra_buf)
+ freea (extra_buf);
+ if (resolved == NULL)
+ free (rpath);
+ errno = saved_errno;
+ }
+ return NULL;
+}
+versioned_symbol (libc, __realpath, realpath, GLIBC_2_3);
+#endif /* !FUNC_REALPATH_WORKS || defined _LIBC */
+
+
+#if SHLIB_COMPAT(libc, GLIBC_2_0, GLIBC_2_3)
+char *
+attribute_compat_text_section
+__old_realpath (const char *name, char *resolved)
+{
+ if (resolved == NULL)
+ {
+ __set_errno (EINVAL);
+ return NULL;
+ }
+
+ return __realpath (name, resolved);
+}
+compat_symbol (libc, __old_realpath, realpath, GLIBC_2_0);
+#endif
+
+
+char *
+__canonicalize_file_name (const char *name)
+{
+ return __realpath (name, NULL);
+}
+weak_alias (__canonicalize_file_name, canonicalize_file_name)
+
+#else
+
+/* This declaration is solely to ensure that after preprocessing
+ this file is never empty. */
+typedef int dummy;
+
+#endif
diff --git a/gnu/clean-temp.c b/gnu/clean-temp.c
new file mode 100755
index 00000000..93008151
--- /dev/null
+++ b/gnu/clean-temp.c
@@ -0,0 +1,785 @@
+/* Temporary directories and temporary files with automatic cleanup.
+ Copyright (C) 2001, 2003, 2006-2007, 2009-2010 Free Software Foundation,
+ Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#include "clean-temp.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+#endif
+
+#include "error.h"
+#include "fatal-signal.h"
+#include "pathmax.h"
+#include "tmpdir.h"
+#include "xalloc.h"
+#include "xmalloca.h"
+#include "gl_xlist.h"
+#include "gl_linkedhash_list.h"
+#include "gettext.h"
+#if GNULIB_FWRITEERROR
+# include "fwriteerror.h"
+#endif
+#if GNULIB_CLOSE_STREAM
+# include "close-stream.h"
+#endif
+#if GNULIB_FCNTL_SAFER
+# include "fcntl--.h"
+#endif
+#if GNULIB_FOPEN_SAFER
+# include "stdio--.h"
+#endif
+
+#define _(str) gettext (str)
+
+/* GNU Hurd doesn't have PATH_MAX. */
+#ifndef PATH_MAX
+# ifdef MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+# else
+# define PATH_MAX 1024
+# endif
+#endif
+
+#ifndef uintptr_t
+# define uintptr_t unsigned long
+#endif
+
+#if !GNULIB_FCNTL_SAFER
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+# undef open
+# undef close
+#endif
+
+
+/* The use of 'volatile' in the types below (and ISO C 99 section 5.1.2.3.(5))
+ ensure that while constructing or modifying the data structures, the field
+ values are written to memory in the order of the C statements. So the
+ signal handler can rely on these field values to be up to date. */
+
+
+/* Registry for a single temporary directory.
+ 'struct temp_dir' from the public header file overlaps with this. */
+struct tempdir
+{
+ /* The absolute pathname of the directory. */
+ char * volatile dirname;
+ /* Whether errors during explicit cleanup are reported to standard error. */
+ bool cleanup_verbose;
+ /* Absolute pathnames of subdirectories. */
+ gl_list_t /* <char *> */ volatile subdirs;
+ /* Absolute pathnames of files. */
+ gl_list_t /* <char *> */ volatile files;
+};
+
+/* List of all temporary directories. */
+static struct
+{
+ struct tempdir * volatile * volatile tempdir_list;
+ size_t volatile tempdir_count;
+ size_t tempdir_allocated;
+} cleanup_list /* = { NULL, 0, 0 } */;
+
+/* List of all open file descriptors to temporary files. */
+static gl_list_t /* <int> */ volatile descriptors;
+
+
+/* For the subdirs and for the files, we use a gl_list_t of type LINKEDHASH.
+ Why? We need a data structure that
+
+ 1) Can contain an arbitrary number of 'char *' values. The strings
+ are compared via strcmp, not pointer comparison.
+ 2) Has insertion and deletion operations that are fast: ideally O(1),
+ or possibly O(log n). This is important for GNU sort, which may
+ create a large number of temporary files.
+ 3) Allows iteration through all elements from within a signal handler.
+ 4) May or may not allow duplicates. It doesn't matter here, since
+ any file or subdir can only be removed once.
+
+ Criterion 1) would allow any gl_list_t or gl_oset_t implementation.
+
+ Criterion 2) leaves only GL_LINKEDHASH_LIST, GL_TREEHASH_LIST, or
+ GL_TREE_OSET.
+
+ Criterion 3) puts at disadvantage GL_TREEHASH_LIST and GL_TREE_OSET.
+ Namely, iteration through the elements of a binary tree requires access
+ to many ->left, ->right, ->parent pointers. However, the rebalancing
+ code for insertion and deletion in an AVL or red-black tree is so
+ complicated that we cannot assume that >left, ->right, ->parent pointers
+ are in a consistent state throughout these operations. Therefore, to
+ avoid a crash in the signal handler, all destructive operations to the
+ lists would have to be protected by a
+ block_fatal_signals ();
+ ...
+ unblock_fatal_signals ();
+ pair. Which causes extra system calls.
+
+ Criterion 3) would also discourage GL_ARRAY_LIST and GL_CARRAY_LIST,
+ if they were not already excluded. Namely, these implementations use
+ xrealloc(), leaving a time window in which in the list->elements pointer
+ points to already deallocated memory. To avoid a crash in the signal
+ handler at such a moment, all destructive operations would have to
+ protected by block/unblock_fatal_signals (), in this case too.
+
+ A list of type GL_LINKEDHASH_LIST without duplicates fulfills all
+ requirements:
+ 2) Insertion and deletion are O(1) on average.
+ 3) The gl_list_iterator, gl_list_iterator_next implementations do
+ not trigger memory allocations, nor other system calls, and are
+ therefore safe to be called from a signal handler.
+ Furthermore, since SIGNAL_SAFE_LIST is defined, the implementation
+ of the destructive functions ensures that the list structure is
+ safe to be traversed at any moment, even when interrupted by an
+ asynchronous signal.
+ */
+
+/* String equality and hash code functions used by the lists. */
+
+static bool
+string_equals (const void *x1, const void *x2)
+{
+ const char *s1 = (const char *) x1;
+ const char *s2 = (const char *) x2;
+ return strcmp (s1, s2) == 0;
+}
+
+#define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+/* A hash function for NUL-terminated char* strings using
+ the method described by Bruno Haible.
+ See http://www.haible.de/bruno/hashfunc.html. */
+static size_t
+string_hash (const void *x)
+{
+ const char *s = (const char *) x;
+ size_t h = 0;
+
+ for (; *s; s++)
+ h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+ return h;
+}
+
+
+/* The signal handler. It gets called asynchronously. */
+static void
+cleanup ()
+{
+ size_t i;
+
+ /* First close all file descriptors to temporary files. */
+ {
+ gl_list_t fds = descriptors;
+
+ if (fds != NULL)
+ {
+ gl_list_iterator_t iter;
+ const void *element;
+
+ iter = gl_list_iterator (fds);
+ while (gl_list_iterator_next (&iter, &element, NULL))
+ {
+ int fd = (int) (uintptr_t) element;
+ close (fd);
+ }
+ gl_list_iterator_free (&iter);
+ }
+ }
+
+ for (i = 0; i < cleanup_list.tempdir_count; i++)
+ {
+ struct tempdir *dir = cleanup_list.tempdir_list[i];
+
+ if (dir != NULL)
+ {
+ gl_list_iterator_t iter;
+ const void *element;
+
+ /* First cleanup the files in the subdirectories. */
+ iter = gl_list_iterator (dir->files);
+ while (gl_list_iterator_next (&iter, &element, NULL))
+ {
+ const char *file = (const char *) element;
+ unlink (file);
+ }
+ gl_list_iterator_free (&iter);
+
+ /* Then cleanup the subdirectories. */
+ iter = gl_list_iterator (dir->subdirs);
+ while (gl_list_iterator_next (&iter, &element, NULL))
+ {
+ const char *subdir = (const char *) element;
+ rmdir (subdir);
+ }
+ gl_list_iterator_free (&iter);
+
+ /* Then cleanup the temporary directory itself. */
+ rmdir (dir->dirname);
+ }
+ }
+}
+
+/* Create a temporary directory.
+ PREFIX is used as a prefix for the name of the temporary directory. It
+ should be short and still give an indication about the program.
+ PARENTDIR can be used to specify the parent directory; if NULL, a default
+ parent directory is used (either $TMPDIR or /tmp or similar).
+ CLEANUP_VERBOSE determines whether errors during explicit cleanup are
+ reported to standard error.
+ Return a fresh 'struct temp_dir' on success. Upon error, an error message
+ is shown and NULL is returned. */
+struct temp_dir *
+create_temp_dir (const char *prefix, const char *parentdir,
+ bool cleanup_verbose)
+{
+ struct tempdir * volatile *tmpdirp = NULL;
+ struct tempdir *tmpdir;
+ size_t i;
+ char *xtemplate;
+ char *tmpdirname;
+
+ /* See whether it can take the slot of an earlier temporary directory
+ already cleaned up. */
+ for (i = 0; i < cleanup_list.tempdir_count; i++)
+ if (cleanup_list.tempdir_list[i] == NULL)
+ {
+ tmpdirp = &cleanup_list.tempdir_list[i];
+ break;
+ }
+ if (tmpdirp == NULL)
+ {
+ /* See whether the array needs to be extended. */
+ if (cleanup_list.tempdir_count == cleanup_list.tempdir_allocated)
+ {
+ /* Note that we cannot use xrealloc(), because then the cleanup()
+ function could access an already deallocated array. */
+ struct tempdir * volatile *old_array = cleanup_list.tempdir_list;
+ size_t old_allocated = cleanup_list.tempdir_allocated;
+ size_t new_allocated = 2 * cleanup_list.tempdir_allocated + 1;
+ struct tempdir * volatile *new_array =
+ XNMALLOC (new_allocated, struct tempdir * volatile);
+
+ if (old_allocated == 0)
+ /* First use of this facility. Register the cleanup handler. */
+ at_fatal_signal (&cleanup);
+ else
+ {
+ /* Don't use memcpy() here, because memcpy takes non-volatile
+ arguments and is therefore not guaranteed to complete all
+ memory stores before the next statement. */
+ size_t k;
+
+ for (k = 0; k < old_allocated; k++)
+ new_array[k] = old_array[k];
+ }
+
+ cleanup_list.tempdir_list = new_array;
+ cleanup_list.tempdir_allocated = new_allocated;
+
+ /* Now we can free the old array. */
+ if (old_array != NULL)
+ free ((struct tempdir **) old_array);
+ }
+
+ tmpdirp = &cleanup_list.tempdir_list[cleanup_list.tempdir_count];
+ /* Initialize *tmpdirp before incrementing tempdir_count, so that
+ cleanup() will skip this entry before it is fully initialized. */
+ *tmpdirp = NULL;
+ cleanup_list.tempdir_count++;
+ }
+
+ /* Initialize a 'struct tempdir'. */
+ tmpdir = XMALLOC (struct tempdir);
+ tmpdir->dirname = NULL;
+ tmpdir->cleanup_verbose = cleanup_verbose;
+ tmpdir->subdirs = gl_list_create_empty (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL,
+ false);
+ tmpdir->files = gl_list_create_empty (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL,
+ false);
+
+ /* Create the temporary directory. */
+ xtemplate = (char *) xmalloca (PATH_MAX);
+ if (path_search (xtemplate, PATH_MAX, parentdir, prefix, parentdir == NULL))
+ {
+ error (0, errno,
+ _("cannot find a temporary directory, try setting $TMPDIR"));
+ goto quit;
+ }
+ block_fatal_signals ();
+ tmpdirname = mkdtemp (xtemplate);
+ if (tmpdirname != NULL)
+ {
+ tmpdir->dirname = tmpdirname;
+ *tmpdirp = tmpdir;
+ }
+ unblock_fatal_signals ();
+ if (tmpdirname == NULL)
+ {
+ error (0, errno,
+ _("cannot create a temporary directory using template \"%s\""),
+ xtemplate);
+ goto quit;
+ }
+ /* Replace tmpdir->dirname with a copy that has indefinite extent.
+ We cannot do this inside the block_fatal_signals/unblock_fatal_signals
+ block because then the cleanup handler would not remove the directory
+ if xstrdup fails. */
+ tmpdir->dirname = xstrdup (tmpdirname);
+ freea (xtemplate);
+ return (struct temp_dir *) tmpdir;
+
+ quit:
+ freea (xtemplate);
+ return NULL;
+}
+
+/* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
+ needs to be removed before DIR can be removed.
+ Should be called before the file ABSOLUTE_FILE_NAME is created. */
+void
+register_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+
+ /* Add absolute_file_name to tmpdir->files, without duplicates. */
+ if (gl_list_search (tmpdir->files, absolute_file_name) == NULL)
+ gl_list_add_first (tmpdir->files, xstrdup (absolute_file_name));
+}
+
+/* Unregister the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
+ needs to be removed before DIR can be removed.
+ Should be called when the file ABSOLUTE_FILE_NAME could not be created. */
+void
+unregister_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+ gl_list_t list = tmpdir->files;
+ gl_list_node_t node;
+
+ node = gl_list_search (list, absolute_file_name);
+ if (node != NULL)
+ {
+ char *old_string = (char *) gl_list_node_value (list, node);
+
+ gl_list_remove_node (list, node);
+ free (old_string);
+ }
+}
+
+/* Register the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
+ that needs to be removed before DIR can be removed.
+ Should be called before the subdirectory ABSOLUTE_DIR_NAME is created. */
+void
+register_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+
+ /* Add absolute_dir_name to tmpdir->subdirs, without duplicates. */
+ if (gl_list_search (tmpdir->subdirs, absolute_dir_name) == NULL)
+ gl_list_add_first (tmpdir->subdirs, xstrdup (absolute_dir_name));
+}
+
+/* Unregister the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
+ that needs to be removed before DIR can be removed.
+ Should be called when the subdirectory ABSOLUTE_DIR_NAME could not be
+ created. */
+void
+unregister_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+ gl_list_t list = tmpdir->subdirs;
+ gl_list_node_t node;
+
+ node = gl_list_search (list, absolute_dir_name);
+ if (node != NULL)
+ {
+ char *old_string = (char *) gl_list_node_value (list, node);
+
+ gl_list_remove_node (list, node);
+ free (old_string);
+ }
+}
+
+/* Remove a file, with optional error message.
+ Return 0 upon success, or -1 if there was some problem. */
+static int
+do_unlink (struct temp_dir *dir, const char *absolute_file_name)
+{
+ if (unlink (absolute_file_name) < 0 && dir->cleanup_verbose
+ && errno != ENOENT)
+ {
+ error (0, errno, _("cannot remove temporary file %s"), absolute_file_name);
+ return -1;
+ }
+ return 0;
+}
+
+/* Remove a directory, with optional error message.
+ Return 0 upon success, or -1 if there was some problem. */
+static int
+do_rmdir (struct temp_dir *dir, const char *absolute_dir_name)
+{
+ if (rmdir (absolute_dir_name) < 0 && dir->cleanup_verbose
+ && errno != ENOENT)
+ {
+ error (0, errno,
+ _("cannot remove temporary directory %s"), absolute_dir_name);
+ return -1;
+ }
+ return 0;
+}
+
+/* Remove the given ABSOLUTE_FILE_NAME and unregister it.
+ Return 0 upon success, or -1 if there was some problem. */
+int
+cleanup_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name)
+{
+ int err;
+
+ err = do_unlink (dir, absolute_file_name);
+ unregister_temp_file (dir, absolute_file_name);
+
+ return err;
+}
+
+/* Remove the given ABSOLUTE_DIR_NAME and unregister it.
+ Return 0 upon success, or -1 if there was some problem. */
+int
+cleanup_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name)
+{
+ int err;
+
+ err = do_rmdir (dir, absolute_dir_name);
+ unregister_temp_subdir (dir, absolute_dir_name);
+
+ return err;
+}
+
+/* Remove all registered files and subdirectories inside DIR.
+ Return 0 upon success, or -1 if there was some problem. */
+int
+cleanup_temp_dir_contents (struct temp_dir *dir)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+ int err = 0;
+ gl_list_t list;
+ gl_list_iterator_t iter;
+ const void *element;
+ gl_list_node_t node;
+
+ /* First cleanup the files in the subdirectories. */
+ list = tmpdir->files;
+ iter = gl_list_iterator (list);
+ while (gl_list_iterator_next (&iter, &element, &node))
+ {
+ char *file = (char *) element;
+
+ err |= do_unlink (dir, file);
+ gl_list_remove_node (list, node);
+ /* Now only we can free file. */
+ free (file);
+ }
+ gl_list_iterator_free (&iter);
+
+ /* Then cleanup the subdirectories. */
+ list = tmpdir->subdirs;
+ iter = gl_list_iterator (list);
+ while (gl_list_iterator_next (&iter, &element, &node))
+ {
+ char *subdir = (char *) element;
+
+ err |= do_rmdir (dir, subdir);
+ gl_list_remove_node (list, node);
+ /* Now only we can free subdir. */
+ free (subdir);
+ }
+ gl_list_iterator_free (&iter);
+
+ return err;
+}
+
+/* Remove all registered files and subdirectories inside DIR and DIR itself.
+ DIR cannot be used any more after this call.
+ Return 0 upon success, or -1 if there was some problem. */
+int
+cleanup_temp_dir (struct temp_dir *dir)
+{
+ struct tempdir *tmpdir = (struct tempdir *)dir;
+ int err = 0;
+ size_t i;
+
+ err |= cleanup_temp_dir_contents (dir);
+ err |= do_rmdir (dir, tmpdir->dirname);
+
+ for (i = 0; i < cleanup_list.tempdir_count; i++)
+ if (cleanup_list.tempdir_list[i] == tmpdir)
+ {
+ /* Remove cleanup_list.tempdir_list[i]. */
+ if (i + 1 == cleanup_list.tempdir_count)
+ {
+ while (i > 0 && cleanup_list.tempdir_list[i - 1] == NULL)
+ i--;
+ cleanup_list.tempdir_count = i;
+ }
+ else
+ cleanup_list.tempdir_list[i] = NULL;
+ /* Now only we can free the tmpdir->dirname and tmpdir itself. */
+ free (tmpdir->dirname);
+ free (tmpdir);
+ return err;
+ }
+
+ /* The user passed an invalid DIR argument. */
+ abort ();
+}
+
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* On Windows, opening a file with _O_TEMPORARY has the effect of passing
+ the FILE_FLAG_DELETE_ON_CLOSE flag to CreateFile(), which has the effect
+ of deleting the file when it is closed - even when the program crashes.
+ But (according to the Cygwin sources) it works only on Windows NT or newer.
+ So we cache the info whether we are running on Windows NT or newer. */
+
+static bool
+supports_delete_on_close ()
+{
+ static int known; /* 1 = yes, -1 = no, 0 = unknown */
+ if (!known)
+ {
+ OSVERSIONINFO v;
+
+ if (GetVersionEx (&v))
+ known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1);
+ else
+ known = -1;
+ }
+ return (known > 0);
+}
+
+#endif
+
+
+/* Register a file descriptor to be closed. */
+static void
+register_fd (int fd)
+{
+ if (descriptors == NULL)
+ descriptors = gl_list_create_empty (GL_LINKEDHASH_LIST, NULL, NULL, NULL,
+ false);
+ gl_list_add_first (descriptors, (void *) (uintptr_t) fd);
+}
+
+/* Unregister a file descriptor to be closed. */
+static void
+unregister_fd (int fd)
+{
+ gl_list_t fds = descriptors;
+ gl_list_node_t node;
+
+ if (fds == NULL)
+ /* descriptors should already contain fd. */
+ abort ();
+ node = gl_list_search (fds, (void *) (uintptr_t) fd);
+ if (node == NULL)
+ /* descriptors should already contain fd. */
+ abort ();
+ gl_list_remove_node (fds, node);
+}
+
+/* Open a temporary file in a temporary directory.
+ Registers the resulting file descriptor to be closed. */
+int
+open_temp (const char *file_name, int flags, mode_t mode)
+{
+ int fd;
+ int saved_errno;
+
+ block_fatal_signals ();
+ /* Note: 'open' here is actually open() or open_safer(). */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* Use _O_TEMPORARY when possible, to increase the chances that the
+ temporary file is removed when the process crashes. */
+ if (supports_delete_on_close ())
+ fd = open (file_name, flags | _O_TEMPORARY, mode);
+ else
+#endif
+ fd = open (file_name, flags, mode);
+ saved_errno = errno;
+ if (fd >= 0)
+ register_fd (fd);
+ unblock_fatal_signals ();
+ errno = saved_errno;
+ return fd;
+}
+
+/* Open a temporary file in a temporary directory.
+ Registers the resulting file descriptor to be closed. */
+FILE *
+fopen_temp (const char *file_name, const char *mode)
+{
+ FILE *fp;
+ int saved_errno;
+
+ block_fatal_signals ();
+ /* Note: 'fopen' here is actually fopen() or fopen_safer(). */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* Use _O_TEMPORARY when possible, to increase the chances that the
+ temporary file is removed when the process crashes. */
+ if (supports_delete_on_close ())
+ {
+ size_t mode_len = strlen (mode);
+ char *augmented_mode = (char *) xmalloca (mode_len + 2);
+ memcpy (augmented_mode, mode, mode_len);
+ memcpy (augmented_mode + mode_len, "D", 2);
+
+ fp = fopen (file_name, augmented_mode);
+ saved_errno = errno;
+
+ freea (augmented_mode);
+ }
+ else
+#endif
+ {
+ fp = fopen (file_name, mode);
+ saved_errno = errno;
+ }
+ if (fp != NULL)
+ {
+ /* It is sufficient to register fileno (fp) instead of the entire fp,
+ because at cleanup time there is no need to do an fflush (fp); a
+ close (fileno (fp)) will be enough. */
+ int fd = fileno (fp);
+ if (!(fd >= 0))
+ abort ();
+ register_fd (fd);
+ }
+ unblock_fatal_signals ();
+ errno = saved_errno;
+ return fp;
+}
+
+/* Close a temporary file in a temporary directory.
+ Unregisters the previously registered file descriptor. */
+int
+close_temp (int fd)
+{
+ if (fd >= 0)
+ {
+ /* No blocking of signals is needed here, since a double close of a
+ file descriptor is harmless. */
+ int result = close (fd);
+ int saved_errno = errno;
+
+ /* No race condition here: we assume a single-threaded program, hence
+ fd cannot be re-opened here. */
+
+ unregister_fd (fd);
+
+ errno = saved_errno;
+ return result;
+ }
+ else
+ return close (fd);
+}
+
+/* Close a temporary file in a temporary directory.
+ Unregisters the previously registered file descriptor. */
+int
+fclose_temp (FILE *fp)
+{
+ int fd = fileno (fp);
+ /* No blocking of signals is needed here, since a double close of a
+ file descriptor is harmless. */
+ int result = fclose (fp);
+ int saved_errno = errno;
+
+ /* No race condition here: we assume a single-threaded program, hence
+ fd cannot be re-opened here. */
+
+ unregister_fd (fd);
+
+ errno = saved_errno;
+ return result;
+}
+
+#if GNULIB_FWRITEERROR
+/* Like fwriteerror.
+ Unregisters the previously registered file descriptor. */
+int
+fwriteerror_temp (FILE *fp)
+{
+ int fd = fileno (fp);
+ /* No blocking of signals is needed here, since a double close of a
+ file descriptor is harmless. */
+ int result = fwriteerror (fp);
+ int saved_errno = errno;
+
+ /* No race condition here: we assume a single-threaded program, hence
+ fd cannot be re-opened here. */
+
+ unregister_fd (fd);
+
+ errno = saved_errno;
+ return result;
+}
+#endif
+
+#if GNULIB_CLOSE_STREAM
+/* Like close_stream.
+ Unregisters the previously registered file descriptor. */
+int
+close_stream_temp (FILE *fp)
+{
+ int fd = fileno (fp);
+ /* No blocking of signals is needed here, since a double close of a
+ file descriptor is harmless. */
+ int result = close_stream (fp);
+ int saved_errno = errno;
+
+ /* No race condition here: we assume a single-threaded program, hence
+ fd cannot be re-opened here. */
+
+ unregister_fd (fd);
+
+ errno = saved_errno;
+ return result;
+}
+#endif
diff --git a/gnu/clean-temp.h b/gnu/clean-temp.h
new file mode 100755
index 00000000..03a52493
--- /dev/null
+++ b/gnu/clean-temp.h
@@ -0,0 +1,133 @@
+/* Temporary directories and temporary files with automatic cleanup.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _CLEAN_TEMP_H
+#define _CLEAN_TEMP_H
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <sys/types.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Temporary directories and temporary files should be automatically removed
+ when the program exits either normally or through a fatal signal. We can't
+ rely on the "unlink before close" idiom, because it works only on Unix and
+ also - if no signal blocking is used - leaves a time window where a fatal
+ signal would not clean up the temporary file.
+
+ Also, open file descriptors need to be closed before the temporary files
+ and the temporary directories can be removed, because only on Unix
+ (excluding Cygwin) can one remove directories containing open files.
+
+ This module provides support for temporary directories and temporary files
+ inside these temporary directories. Temporary files without temporary
+ directories are not supported here. */
+
+struct temp_dir
+{
+ /* The absolute pathname of the directory. */
+ const char * const dir_name;
+ /* Whether errors during explicit cleanup are reported to standard error. */
+ bool cleanup_verbose;
+ /* More fields are present here, but not public. */
+};
+
+/* Create a temporary directory.
+ PREFIX is used as a prefix for the name of the temporary directory. It
+ should be short and still give an indication about the program.
+ PARENTDIR can be used to specify the parent directory; if NULL, a default
+ parent directory is used (either $TMPDIR or /tmp or similar).
+ CLEANUP_VERBOSE determines whether errors during explicit cleanup are
+ reported to standard error.
+ Return a fresh 'struct temp_dir' on success. Upon error, an error message
+ is shown and NULL is returned. */
+extern struct temp_dir * create_temp_dir (const char *prefix,
+ const char *parentdir,
+ bool cleanup_verbose);
+
+/* Register the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
+ needs to be removed before DIR can be removed.
+ Should be called before the file ABSOLUTE_FILE_NAME is created. */
+extern void register_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name);
+
+/* Unregister the given ABSOLUTE_FILE_NAME as being a file inside DIR, that
+ needs to be removed before DIR can be removed.
+ Should be called when the file ABSOLUTE_FILE_NAME could not be created. */
+extern void unregister_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name);
+
+/* Register the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
+ that needs to be removed before DIR can be removed.
+ Should be called before the subdirectory ABSOLUTE_DIR_NAME is created. */
+extern void register_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name);
+
+/* Unregister the given ABSOLUTE_DIR_NAME as being a subdirectory inside DIR,
+ that needs to be removed before DIR can be removed.
+ Should be called when the subdirectory ABSOLUTE_DIR_NAME could not be
+ created. */
+extern void unregister_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name);
+
+/* Remove the given ABSOLUTE_FILE_NAME and unregister it.
+ Return 0 upon success, or -1 if there was some problem. */
+extern int cleanup_temp_file (struct temp_dir *dir,
+ const char *absolute_file_name);
+
+/* Remove the given ABSOLUTE_DIR_NAME and unregister it.
+ Return 0 upon success, or -1 if there was some problem. */
+extern int cleanup_temp_subdir (struct temp_dir *dir,
+ const char *absolute_dir_name);
+
+/* Remove all registered files and subdirectories inside DIR.
+ Return 0 upon success, or -1 if there was some problem. */
+extern int cleanup_temp_dir_contents (struct temp_dir *dir);
+
+/* Remove all registered files and subdirectories inside DIR and DIR itself.
+ DIR cannot be used any more after this call.
+ Return 0 upon success, or -1 if there was some problem. */
+extern int cleanup_temp_dir (struct temp_dir *dir);
+
+/* Open a temporary file in a temporary directory.
+ Registers the resulting file descriptor to be closed. */
+extern int open_temp (const char *file_name, int flags, mode_t mode);
+extern FILE * fopen_temp (const char *file_name, const char *mode);
+
+/* Close a temporary file in a temporary directory.
+ Unregisters the previously registered file descriptor. */
+extern int close_temp (int fd);
+extern int fclose_temp (FILE *fp);
+
+/* Like fwriteerror.
+ Unregisters the previously registered file descriptor. */
+extern int fwriteerror_temp (FILE *fp);
+
+/* Like close_stream.
+ Unregisters the previously registered file descriptor. */
+extern int close_stream_temp (FILE *fp);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _CLEAN_TEMP_H */
diff --git a/gnu/cloexec.c b/gnu/cloexec.c
new file mode 100755
index 00000000..2d12efef
--- /dev/null
+++ b/gnu/cloexec.c
@@ -0,0 +1,83 @@
+/* closexec.c - set or clear the close-on-exec descriptor flag
+
+ Copyright (C) 1991, 2004-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ The code is taken from glibc/manual/llio.texi */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+ or clear the flag if VALUE is false.
+ Return 0 on success, or -1 on error with `errno' set.
+
+ Note that on MingW, this function does NOT protect DESC from being
+ inherited into spawned children. Instead, either use dup_cloexec
+ followed by closing the original DESC, or use interfaces such as
+ open or pipe2 that accept flags like O_CLOEXEC to create DESC
+ non-inheritable in the first place. */
+
+int
+set_cloexec_flag (int desc, bool value)
+{
+#ifdef F_SETFD
+
+ int flags = fcntl (desc, F_GETFD, 0);
+
+ if (0 <= flags)
+ {
+ int newflags = (value ? flags | FD_CLOEXEC : flags & ~FD_CLOEXEC);
+
+ if (flags == newflags
+ || fcntl (desc, F_SETFD, newflags) != -1)
+ return 0;
+ }
+
+ return -1;
+
+#else /* !F_SETFD */
+
+ /* Use dup2 to reject invalid file descriptors; the cloexec flag
+ will be unaffected. */
+ if (desc < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (dup2 (desc, desc) < 0)
+ /* errno is EBADF here. */
+ return -1;
+
+ /* There is nothing we can do on this kind of platform. Punt. */
+ return 0;
+#endif /* !F_SETFD */
+}
+
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+ prior to exec or spawn. Returns -1 and sets errno if FD could not
+ be duplicated. */
+
+int
+dup_cloexec (int fd)
+{
+ return fcntl (fd, F_DUPFD_CLOEXEC, 0);
+}
diff --git a/gnu/cloexec.h b/gnu/cloexec.h
new file mode 100755
index 00000000..e3a2cb85
--- /dev/null
+++ b/gnu/cloexec.h
@@ -0,0 +1,38 @@
+/* closexec.c - set or clear the close-on-exec descriptor flag
+
+ Copyright (C) 2004, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+*/
+
+#include <stdbool.h>
+
+/* Set the `FD_CLOEXEC' flag of DESC if VALUE is true,
+ or clear the flag if VALUE is false.
+ Return 0 on success, or -1 on error with `errno' set.
+
+ Note that on MingW, this function does NOT protect DESC from being
+ inherited into spawned children. Instead, either use dup_cloexec
+ followed by closing the original DESC, or use interfaces such as
+ open or pipe2 that accept flags like O_CLOEXEC to create DESC
+ non-inheritable in the first place. */
+
+int set_cloexec_flag (int desc, bool value);
+
+/* Duplicates a file handle FD, while marking the copy to be closed
+ prior to exec or spawn. Returns -1 and sets errno if FD could not
+ be duplicated. */
+
+int dup_cloexec (int fd);
diff --git a/gnu/close-stream.c b/gnu/close-stream.c
new file mode 100755
index 00000000..cf0422f3
--- /dev/null
+++ b/gnu/close-stream.c
@@ -0,0 +1,78 @@
+/* Close a stream, with nicer error checking than fclose's.
+
+ Copyright (C) 1998-2002, 2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "close-stream.h"
+
+#include <errno.h>
+#include <stdbool.h>
+
+#include "fpending.h"
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+/* Close STREAM. Return 0 if successful, EOF (setting errno)
+ otherwise. A failure might set errno to 0 if the error number
+ cannot be determined.
+
+ A failure with errno set to EPIPE may or may not indicate an error
+ situation worth signaling to the user. See the documentation of the
+ close_stdout_set_ignore_EPIPE function for details.
+
+ If a program writes *anything* to STREAM, that program should close
+ STREAM and make sure that it succeeds before exiting. Otherwise,
+ suppose that you go to the extreme of checking the return status
+ of every function that does an explicit write to STREAM. The last
+ printf can succeed in writing to the internal stream buffer, and yet
+ the fclose(STREAM) could still fail (due e.g., to a disk full error)
+ when it tries to write out that buffered data. Thus, you would be
+ left with an incomplete output file and the offending program would
+ exit successfully. Even calling fflush is not always sufficient,
+ since some file systems (NFS and CODA) buffer written/flushed data
+ until an actual close call.
+
+ Besides, it's wasteful to check the return value from every call
+ that writes to STREAM -- just let the internal stream state record
+ the failure. That's what the ferror test is checking below. */
+
+int
+close_stream (FILE *stream)
+{
+ bool some_pending = (__fpending (stream) != 0);
+ bool prev_fail = (ferror (stream) != 0);
+ bool fclose_fail = (fclose (stream) != 0);
+
+ /* Return an error indication if there was a previous failure or if
+ fclose failed, with one exception: ignore an fclose failure if
+ there was no previous error, no data remains to be flushed, and
+ fclose failed with EBADF. That can happen when a program like cp
+ is invoked like this `cp a b >&-' (i.e., with standard output
+ closed) and doesn't generate any output (hence no previous error
+ and nothing to be flushed). */
+
+ if (prev_fail || (fclose_fail && (some_pending || errno != EBADF)))
+ {
+ if (! fclose_fail)
+ errno = 0;
+ return EOF;
+ }
+
+ return 0;
+}
diff --git a/gnu/close-stream.h b/gnu/close-stream.h
new file mode 100755
index 00000000..be3d4196
--- /dev/null
+++ b/gnu/close-stream.h
@@ -0,0 +1,2 @@
+#include <stdio.h>
+int close_stream (FILE *stream);
diff --git a/gnu/closein.c b/gnu/closein.c
new file mode 100755
index 00000000..077a3247
--- /dev/null
+++ b/gnu/closein.c
@@ -0,0 +1,111 @@
+/* Close standard input, rewinding seekable stdin if necessary.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "closein.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "close-stream.h"
+#include "closeout.h"
+#include "error.h"
+#include "exitfail.h"
+#include "freadahead.h"
+#include "quotearg.h"
+
+static const char *file_name;
+
+/* Set the file name to be reported in the event an error is detected
+ on stdin by close_stdin. See also close_stdout_set_file_name, if
+ an error is detected when closing stdout. */
+void
+close_stdin_set_file_name (const char *file)
+{
+ file_name = file;
+}
+
+/* Close standard input, rewinding any unused input if stdin is
+ seekable. On error, issue a diagnostic and _exit with status
+ 'exit_failure'. Then call close_stdout.
+
+ Most programs can get by with close_stdout. close_stdin is only
+ needed when a program wants to guarantee that partially read input
+ from seekable stdin is not consumed, for any subsequent clients.
+ For example, POSIX requires that these two commands behave alike:
+
+ (sed -ne 1q; cat) < file
+ tail -n 1 file
+
+ Since close_stdin is commonly registered via 'atexit', POSIX
+ and the C standard both say that it should not call 'exit',
+ because the behavior is undefined if 'exit' is called more than
+ once. So it calls '_exit' instead of 'exit'. If close_stdin
+ is registered via atexit before other functions are registered,
+ the other functions can act before this _exit is invoked.
+
+ Applications that use close_stdout should flush any streams other
+ than stdin, stdout, and stderr before exiting, since the call to
+ _exit will bypass other buffer flushing. Applications should be
+ flushing and closing other streams anyway, to check for I/O errors.
+ Also, applications should not use tmpfile, since _exit can bypass
+ the removal of these files.
+
+ It's important to detect such failures and exit nonzero because many
+ tools (most notably `make' and other build-management systems) depend
+ on being able to detect failure in other tools via their exit status. */
+
+void
+close_stdin (void)
+{
+ bool fail = false;
+
+ /* There is no need to flush stdin if we can determine quickly that stdin's
+ input buffer is empty; in this case we know that if stdin is seekable,
+ fseeko (stdin, 0, SEEK_CUR) == lseek (0, 0, SEEK_CUR). */
+ if (freadahead (stdin) > 0)
+ {
+ /* Only attempt flush if stdin is seekable, as fflush is entitled to
+ fail on non-seekable streams. */
+ if (fseeko (stdin, 0, SEEK_CUR) == 0 && fflush (stdin) != 0)
+ fail = true;
+ }
+ if (close_stream (stdin) != 0)
+ fail = true;
+ if (fail)
+ {
+ /* Report failure, but defer exit until after closing stdout,
+ since the failure report should still be flushed. */
+ char const *close_error = _("error closing file");
+ if (file_name)
+ error (0, errno, "%s: %s", quotearg_colon (file_name),
+ close_error);
+ else
+ error (0, errno, "%s", close_error);
+ }
+
+ close_stdout ();
+
+ if (fail)
+ _exit (exit_failure);
+}
diff --git a/gnu/closein.h b/gnu/closein.h
new file mode 100755
index 00000000..20e97521
--- /dev/null
+++ b/gnu/closein.h
@@ -0,0 +1,32 @@
+/* Close standard input, rewinding seekable stdin if necessary.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_CLOSEIN_H
+# define _GL_CLOSEIN_H 1
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+void close_stdin_set_file_name (const char *file);
+void close_stdin (void);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnu/closeout.c b/gnu/closeout.c
new file mode 100755
index 00000000..18a8912d
--- /dev/null
+++ b/gnu/closeout.c
@@ -0,0 +1,124 @@
+/* Close standard output and standard error, exiting with a diagnostic on error.
+
+ Copyright (C) 1998-2002, 2004, 2006, 2008-2010 Free Software Foundation,
+ Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "closeout.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+#include "close-stream.h"
+#include "error.h"
+#include "exitfail.h"
+#include "quotearg.h"
+
+static const char *file_name;
+
+/* Set the file name to be reported in the event an error is detected
+ by close_stdout. */
+void
+close_stdout_set_file_name (const char *file)
+{
+ file_name = file;
+}
+
+static bool ignore_EPIPE /* = false */;
+
+/* Specify the reaction to an EPIPE error during the closing of stdout:
+ - If ignore = true, it shall be ignored.
+ - If ignore = false, it shall evoke a diagnostic, along with a nonzero
+ exit status.
+ The default is ignore = false.
+
+ This setting matters only if the SIGPIPE signal is ignored (i.e. its
+ handler set to SIG_IGN) or blocked. Only particular programs need to
+ temporarily ignore SIGPIPE. If SIGPIPE is ignored or blocked because
+ it was ignored or blocked in the parent process when it created the
+ child process, it usually is a bug in the parent process: It is bad
+ practice to have SIGPIPE ignored or blocked while creating a child
+ process.
+
+ EPIPE occurs when writing to a pipe or socket that has no readers now,
+ when SIGPIPE is ignored or blocked.
+
+ The ignore = false setting is suitable for a scenario where it is normally
+ guaranteed that the pipe writer terminates before the pipe reader. In
+ this case, an EPIPE is an indication of a premature termination of the
+ pipe reader and should lead to a diagnostic and a nonzero exit status.
+
+ The ignore = true setting is suitable for a scenario where you don't know
+ ahead of time whether the pipe writer or the pipe reader will terminate
+ first. In this case, an EPIPE is an indication that the pipe writer can
+ stop doing useless write() calls; this is what close_stdout does anyway.
+ EPIPE is part of the normal pipe/socket shutdown protocol in this case,
+ and should not lead to a diagnostic message. */
+
+void
+close_stdout_set_ignore_EPIPE (bool ignore)
+{
+ ignore_EPIPE = ignore;
+}
+
+/* Close standard output. On error, issue a diagnostic and _exit
+ with status 'exit_failure'.
+
+ Also close standard error. On error, _exit with status 'exit_failure'.
+
+ Since close_stdout is commonly registered via 'atexit', POSIX
+ and the C standard both say that it should not call 'exit',
+ because the behavior is undefined if 'exit' is called more than
+ once. So it calls '_exit' instead of 'exit'. If close_stdout
+ is registered via atexit before other functions are registered,
+ the other functions can act before this _exit is invoked.
+
+ Applications that use close_stdout should flush any streams
+ other than stdout and stderr before exiting, since the call to
+ _exit will bypass other buffer flushing. Applications should
+ be flushing and closing other streams anyway, to check for I/O
+ errors. Also, applications should not use tmpfile, since _exit
+ can bypass the removal of these files.
+
+ It's important to detect such failures and exit nonzero because many
+ tools (most notably `make' and other build-management systems) depend
+ on being able to detect failure in other tools via their exit status. */
+
+void
+close_stdout (void)
+{
+ if (close_stream (stdout) != 0
+ && !(ignore_EPIPE && errno == EPIPE))
+ {
+ char const *write_error = _("write error");
+ if (file_name)
+ error (0, errno, "%s: %s", quotearg_colon (file_name),
+ write_error);
+ else
+ error (0, errno, "%s", write_error);
+
+ _exit (exit_failure);
+ }
+
+ if (close_stream (stderr) != 0)
+ _exit (exit_failure);
+}
diff --git a/gnu/closeout.h b/gnu/closeout.h
new file mode 100755
index 00000000..475f95e6
--- /dev/null
+++ b/gnu/closeout.h
@@ -0,0 +1,36 @@
+/* Close standard output and standard error.
+
+ Copyright (C) 1998, 2000, 2003-2004, 2006, 2008-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef CLOSEOUT_H
+# define CLOSEOUT_H 1
+
+# include <stdbool.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+void close_stdout_set_file_name (const char *file);
+void close_stdout_set_ignore_EPIPE (bool ignore);
+void close_stdout (void);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnu/config.charset b/gnu/config.charset
new file mode 100755
index 00000000..2959df89
--- /dev/null
+++ b/gnu/config.charset
@@ -0,0 +1,683 @@
+#! /bin/sh
+# Output a system dependent table of character encoding aliases.
+#
+# Copyright (C) 2000-2004, 2006-2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The table consists of lines of the form
+# ALIAS CANONICAL
+#
+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
+# ALIAS is compared in a case sensitive way.
+#
+# CANONICAL is the GNU canonical name for this character encoding.
+# It must be an encoding supported by libiconv. Support by GNU libc is
+# also desirable. CANONICAL is case insensitive. Usually an upper case
+# MIME charset name is preferred.
+# The current list of GNU canonical charset names is as follows.
+#
+# name MIME? used by which systems
+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd netbsd darwin
+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-3 Y glibc solaris
+# ISO-8859-4 Y osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd netbsd openbsd darwin
+# ISO-8859-6 Y glibc aix hpux solaris
+# ISO-8859-7 Y glibc aix hpux irix osf solaris netbsd openbsd darwin
+# ISO-8859-8 Y glibc aix hpux osf solaris
+# ISO-8859-9 Y glibc aix hpux irix osf solaris darwin
+# ISO-8859-13 glibc netbsd openbsd darwin
+# ISO-8859-14 glibc
+# ISO-8859-15 glibc aix osf solaris freebsd netbsd openbsd darwin
+# KOI8-R Y glibc solaris freebsd netbsd openbsd darwin
+# KOI8-U Y glibc freebsd netbsd openbsd darwin
+# KOI8-T glibc
+# CP437 dos
+# CP775 dos
+# CP850 aix osf dos
+# CP852 dos
+# CP855 dos
+# CP856 aix
+# CP857 dos
+# CP861 dos
+# CP862 dos
+# CP864 dos
+# CP865 dos
+# CP866 freebsd netbsd openbsd darwin dos
+# CP869 dos
+# CP874 woe32 dos
+# CP922 aix
+# CP932 aix woe32 dos
+# CP943 aix
+# CP949 osf darwin woe32 dos
+# CP950 woe32 dos
+# CP1046 aix
+# CP1124 aix
+# CP1125 dos
+# CP1129 aix
+# CP1131 darwin
+# CP1250 woe32
+# CP1251 glibc solaris netbsd openbsd darwin woe32
+# CP1252 aix woe32
+# CP1253 woe32
+# CP1254 woe32
+# CP1255 glibc woe32
+# CP1256 woe32
+# CP1257 woe32
+# GB2312 Y glibc aix hpux irix solaris freebsd netbsd darwin
+# EUC-JP Y glibc aix hpux irix osf solaris freebsd netbsd darwin
+# EUC-KR Y glibc aix hpux irix osf solaris freebsd netbsd darwin
+# EUC-TW glibc aix hpux irix osf solaris netbsd
+# BIG5 Y glibc aix hpux osf solaris freebsd netbsd darwin
+# BIG5-HKSCS glibc solaris darwin
+# GBK glibc aix osf solaris darwin woe32 dos
+# GB18030 glibc solaris netbsd darwin
+# SHIFT_JIS Y hpux osf solaris freebsd netbsd darwin
+# JOHAB glibc solaris woe32
+# TIS-620 glibc aix hpux osf solaris
+# VISCII Y glibc
+# TCVN5712-1 glibc
+# ARMSCII-8 glibc darwin
+# GEORGIAN-PS glibc
+# PT154 glibc
+# HP-ROMAN8 hpux
+# HP-ARABIC8 hpux
+# HP-GREEK8 hpux
+# HP-HEBREW8 hpux
+# HP-TURKISH8 hpux
+# HP-KANA8 hpux
+# DEC-KANJI osf
+# DEC-HANYU osf
+# UTF-8 Y glibc aix hpux osf solaris netbsd darwin
+#
+# Note: Names which are not marked as being a MIME name should not be used in
+# Internet protocols for information interchange (mail, news, etc.).
+#
+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
+# must understand both names and treat them as equivalent.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+
+host="$1"
+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
+echo "# This file contains a table of character encoding aliases,"
+echo "# suitable for operating system '${os}'."
+echo "# It was automatically generated from config.charset."
+# List of references, updated during installation:
+echo "# Packages using this file: "
+case "$os" in
+ linux-gnulibc1*)
+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ echo "POSIX ASCII"
+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
+ sv_FI sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.iso-8859-1 ISO-8859-1"
+ echo "$l.iso-8859-15 ISO-8859-15"
+ echo "$l.iso-8859-15@euro ISO-8859-15"
+ echo "$l@euro ISO-8859-15"
+ echo "$l.cp-437 CP437"
+ echo "$l.cp-850 CP850"
+ echo "$l.cp-1252 CP1252"
+ echo "$l.cp-1252@euro CP1252"
+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
+ sl_SI sr sr_CS sr_YU; do
+ echo "$l ISO-8859-2"
+ echo "$l.iso-8859-2 ISO-8859-2"
+ echo "$l.cp-852 CP852"
+ echo "$l.cp-1250 CP1250"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in mk mk_MK ru ru_RU; do
+ echo "$l ISO-8859-5"
+ echo "$l.iso-8859-5 ISO-8859-5"
+ echo "$l.koi8-r KOI8-R"
+ echo "$l.cp-866 CP866"
+ echo "$l.cp-1251 CP1251"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in ar ar_SA; do
+ echo "$l ISO-8859-6"
+ echo "$l.iso-8859-6 ISO-8859-6"
+ echo "$l.cp-864 CP864"
+ #echo "$l.cp-868 CP868" # not a commonly used encoding
+ echo "$l.cp-1256 CP1256"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in el el_GR gr gr_GR; do
+ echo "$l ISO-8859-7"
+ echo "$l.iso-8859-7 ISO-8859-7"
+ echo "$l.cp-869 CP869"
+ echo "$l.cp-1253 CP1253"
+ echo "$l.cp-1253@euro CP1253"
+ echo "$l.utf-8 UTF-8"
+ echo "$l.utf-8@euro UTF-8"
+ done
+ for l in he he_IL iw iw_IL; do
+ echo "$l ISO-8859-8"
+ echo "$l.iso-8859-8 ISO-8859-8"
+ echo "$l.cp-862 CP862"
+ echo "$l.cp-1255 CP1255"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in tr tr_TR; do
+ echo "$l ISO-8859-9"
+ echo "$l.iso-8859-9 ISO-8859-9"
+ echo "$l.cp-857 CP857"
+ echo "$l.cp-1254 CP1254"
+ echo "$l.utf-8 UTF-8"
+ done
+ for l in lt lt_LT lv lv_LV; do
+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
+ echo "$l ISO-8859-13"
+ done
+ for l in ru_UA uk uk_UA; do
+ echo "$l KOI8-U"
+ done
+ for l in zh zh_CN; do
+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
+ echo "$l GB2312"
+ done
+ for l in ja ja_JP ja_JP.EUC; do
+ echo "$l EUC-JP"
+ done
+ for l in ko ko_KR; do
+ echo "$l EUC-KR"
+ done
+ for l in th th_TH; do
+ echo "$l TIS-620"
+ done
+ for l in fa fa_IR; do
+ #echo "$l ISIRI-3342" # a broken encoding
+ echo "$l.utf-8 UTF-8"
+ done
+ ;;
+ linux* | *-gnu*)
+ # With glibc-2.1 or newer, we don't need any canonicalization,
+ # because glibc has iconv and both glibc and libiconv support all
+ # GNU canonical names directly. Therefore, the Makefile does not
+ # need to install the alias file at all.
+ # The following applies only to glibc-2.0.x and older libcs.
+ echo "ISO_646.IRV:1983 ASCII"
+ ;;
+ aix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "IBM-850 CP850"
+ echo "IBM-856 CP856"
+ echo "IBM-921 ISO-8859-13"
+ echo "IBM-922 CP922"
+ echo "IBM-932 CP932"
+ echo "IBM-943 CP943"
+ echo "IBM-1046 CP1046"
+ echo "IBM-1124 CP1124"
+ echo "IBM-1129 CP1129"
+ echo "IBM-1252 CP1252"
+ echo "IBM-eucCN GB2312"
+ echo "IBM-eucJP EUC-JP"
+ echo "IBM-eucKR EUC-KR"
+ echo "IBM-eucTW EUC-TW"
+ echo "big5 BIG5"
+ echo "GBK GBK"
+ echo "TIS-620 TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ hpux*)
+ echo "iso88591 ISO-8859-1"
+ echo "iso88592 ISO-8859-2"
+ echo "iso88595 ISO-8859-5"
+ echo "iso88596 ISO-8859-6"
+ echo "iso88597 ISO-8859-7"
+ echo "iso88598 ISO-8859-8"
+ echo "iso88599 ISO-8859-9"
+ echo "iso885915 ISO-8859-15"
+ echo "roman8 HP-ROMAN8"
+ echo "arabic8 HP-ARABIC8"
+ echo "greek8 HP-GREEK8"
+ echo "hebrew8 HP-HEBREW8"
+ echo "turkish8 HP-TURKISH8"
+ echo "kana8 HP-KANA8"
+ echo "tis620 TIS-620"
+ echo "big5 BIG5"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "hp15CN GB2312"
+ #echo "ccdc ?" # what is this?
+ echo "SJIS SHIFT_JIS"
+ echo "utf8 UTF-8"
+ ;;
+ irix*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ ;;
+ osf*)
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "cp850 CP850"
+ echo "big5 BIG5"
+ echo "dechanyu DEC-HANYU"
+ echo "dechanzi GB2312"
+ echo "deckanji DEC-KANJI"
+ echo "deckorean EUC-KR"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "GBK GBK"
+ echo "KSC5601 CP949"
+ echo "sdeckanji EUC-JP"
+ echo "SJIS SHIFT_JIS"
+ echo "TACTIS TIS-620"
+ echo "UTF-8 UTF-8"
+ ;;
+ solaris*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-3 ISO-8859-3"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-6 ISO-8859-6"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-8 ISO-8859-8"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "koi8-r KOI8-R"
+ echo "ansi-1251 CP1251"
+ echo "BIG5 BIG5"
+ echo "Big5-HKSCS BIG5-HKSCS"
+ echo "gb2312 GB2312"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "cns11643 EUC-TW"
+ echo "5601 EUC-KR"
+ echo "ko_KR.johap92 JOHAB"
+ echo "eucJP EUC-JP"
+ echo "PCK SHIFT_JIS"
+ echo "TIS620.2533 TIS-620"
+ #echo "sun_eu_greek ?" # what is this?
+ echo "UTF-8 UTF-8"
+ ;;
+ freebsd* | os2*)
+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
+ # reuse FreeBSD's locale data for OS/2.
+ echo "C ASCII"
+ echo "US-ASCII ASCII"
+ for l in la_LN lt_LN; do
+ echo "$l.ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
+ echo "$l.ISO_8859-1 ISO-8859-1"
+ echo "$l.DIS_8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
+ echo "$l.ISO_8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO_8859-4 ISO-8859-4"
+ done
+ for l in ru_RU ru_SU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO_8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ja_JP.Shift_JIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ netbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "eucCN GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "eucTW EUC-TW"
+ echo "BIG5 BIG5"
+ echo "SJIS SHIFT_JIS"
+ ;;
+ openbsd*)
+ echo "646 ASCII"
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ ;;
+ darwin[56]*)
+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "C ASCII"
+ for l in en_AU en_CA en_GB en_US la_LN; do
+ echo "$l.US-ASCII ASCII"
+ done
+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
+ nl_NL no_NO pt_PT sv_SE; do
+ echo "$l ISO-8859-1"
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in la_LN; do
+ echo "$l.ISO8859-1 ISO-8859-1"
+ echo "$l.ISO8859-15 ISO-8859-15"
+ done
+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
+ echo "$l.ISO8859-2 ISO-8859-2"
+ done
+ for l in la_LN lt_LT; do
+ echo "$l.ISO8859-4 ISO-8859-4"
+ done
+ for l in ru_RU; do
+ echo "$l.KOI8-R KOI8-R"
+ echo "$l.ISO8859-5 ISO-8859-5"
+ echo "$l.CP866 CP866"
+ done
+ for l in bg_BG; do
+ echo "$l.CP1251 CP1251"
+ done
+ echo "uk_UA.KOI8-U KOI8-U"
+ echo "zh_TW.BIG5 BIG5"
+ echo "zh_TW.Big5 BIG5"
+ echo "zh_CN.EUC GB2312"
+ echo "ja_JP.EUC EUC-JP"
+ echo "ja_JP.SJIS SHIFT_JIS"
+ echo "ko_KR.EUC EUC-KR"
+ ;;
+ darwin*)
+ # Darwin 7.5 has nl_langinfo(CODESET), but sometimes its value is
+ # useless:
+ # - It returns the empty string when LANG is set to a locale of the
+ # form ll_CC, although ll_CC/LC_CTYPE is a symlink to an UTF-8
+ # LC_CTYPE file.
+ # - The environment variables LANG, LC_CTYPE, LC_ALL are not set by
+ # the system; nl_langinfo(CODESET) returns "US-ASCII" in this case.
+ # - The documentation says:
+ # "... all code that calls BSD system routines should ensure
+ # that the const *char parameters of these routines are in UTF-8
+ # encoding. All BSD system functions expect their string
+ # parameters to be in UTF-8 encoding and nothing else."
+ # It also says
+ # "An additional caveat is that string parameters for files,
+ # paths, and other file-system entities must be in canonical
+ # UTF-8. In a canonical UTF-8 Unicode string, all decomposable
+ # characters are decomposed ..."
+ # but this is not true: You can pass non-decomposed UTF-8 strings
+ # to file system functions, and it is the OS which will convert
+ # them to decomposed UTF-8 before accessing the file system.
+ # - The Apple Terminal application displays UTF-8 by default.
+ # - However, other applications are free to use different encodings:
+ # - xterm uses ISO-8859-1 by default.
+ # - TextEdit uses MacRoman by default.
+ # We prefer UTF-8 over decomposed UTF-8-MAC because one should
+ # minimize the use of decomposed Unicode. Unfortunately, through the
+ # Darwin file system, decomposed UTF-8 strings are leaked into user
+ # space nevertheless.
+ # Then there are also the locales with encodings other than US-ASCII
+ # and UTF-8. These locales can be occasionally useful to users (e.g.
+ # when grepping through ISO-8859-1 encoded text files), when all their
+ # file names are in US-ASCII.
+ echo "ISO8859-1 ISO-8859-1"
+ echo "ISO8859-2 ISO-8859-2"
+ echo "ISO8859-4 ISO-8859-4"
+ echo "ISO8859-5 ISO-8859-5"
+ echo "ISO8859-7 ISO-8859-7"
+ echo "ISO8859-9 ISO-8859-9"
+ echo "ISO8859-13 ISO-8859-13"
+ echo "ISO8859-15 ISO-8859-15"
+ echo "KOI8-R KOI8-R"
+ echo "KOI8-U KOI8-U"
+ echo "CP866 CP866"
+ echo "CP949 CP949"
+ echo "CP1131 CP1131"
+ echo "CP1251 CP1251"
+ echo "eucCN GB2312"
+ echo "GB2312 GB2312"
+ echo "eucJP EUC-JP"
+ echo "eucKR EUC-KR"
+ echo "Big5 BIG5"
+ echo "Big5HKSCS BIG5-HKSCS"
+ echo "GBK GBK"
+ echo "GB18030 GB18030"
+ echo "SJIS SHIFT_JIS"
+ echo "ARMSCII-8 ARMSCII-8"
+ echo "PT154 PT154"
+ #echo "ISCII-DEV ?"
+ echo "* UTF-8"
+ ;;
+ beos* | haiku*)
+ # BeOS and Haiku have a single locale, and it has UTF-8 encoding.
+ echo "* UTF-8"
+ ;;
+ msdosdjgpp*)
+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
+ # localcharset.c falls back to using the full locale name
+ # from the environment variables.
+ echo "#"
+ echo "# The encodings given here may not all be correct."
+ echo "# If you find that the encoding given for your language and"
+ echo "# country is not the one your DOS machine actually uses, just"
+ echo "# correct it in this file, and send a mail to"
+ echo "# Juan Manuel Guerrero <juan.guerrero@gmx.de>"
+ echo "# and Bruno Haible <bruno@clisp.org>."
+ echo "#"
+ echo "C ASCII"
+ # ISO-8859-1 languages
+ echo "ca CP850"
+ echo "ca_ES CP850"
+ echo "da CP865" # not CP850 ??
+ echo "da_DK CP865" # not CP850 ??
+ echo "de CP850"
+ echo "de_AT CP850"
+ echo "de_CH CP850"
+ echo "de_DE CP850"
+ echo "en CP850"
+ echo "en_AU CP850" # not CP437 ??
+ echo "en_CA CP850"
+ echo "en_GB CP850"
+ echo "en_NZ CP437"
+ echo "en_US CP437"
+ echo "en_ZA CP850" # not CP437 ??
+ echo "es CP850"
+ echo "es_AR CP850"
+ echo "es_BO CP850"
+ echo "es_CL CP850"
+ echo "es_CO CP850"
+ echo "es_CR CP850"
+ echo "es_CU CP850"
+ echo "es_DO CP850"
+ echo "es_EC CP850"
+ echo "es_ES CP850"
+ echo "es_GT CP850"
+ echo "es_HN CP850"
+ echo "es_MX CP850"
+ echo "es_NI CP850"
+ echo "es_PA CP850"
+ echo "es_PY CP850"
+ echo "es_PE CP850"
+ echo "es_SV CP850"
+ echo "es_UY CP850"
+ echo "es_VE CP850"
+ echo "et CP850"
+ echo "et_EE CP850"
+ echo "eu CP850"
+ echo "eu_ES CP850"
+ echo "fi CP850"
+ echo "fi_FI CP850"
+ echo "fr CP850"
+ echo "fr_BE CP850"
+ echo "fr_CA CP850"
+ echo "fr_CH CP850"
+ echo "fr_FR CP850"
+ echo "ga CP850"
+ echo "ga_IE CP850"
+ echo "gd CP850"
+ echo "gd_GB CP850"
+ echo "gl CP850"
+ echo "gl_ES CP850"
+ echo "id CP850" # not CP437 ??
+ echo "id_ID CP850" # not CP437 ??
+ echo "is CP861" # not CP850 ??
+ echo "is_IS CP861" # not CP850 ??
+ echo "it CP850"
+ echo "it_CH CP850"
+ echo "it_IT CP850"
+ echo "lt CP775"
+ echo "lt_LT CP775"
+ echo "lv CP775"
+ echo "lv_LV CP775"
+ echo "nb CP865" # not CP850 ??
+ echo "nb_NO CP865" # not CP850 ??
+ echo "nl CP850"
+ echo "nl_BE CP850"
+ echo "nl_NL CP850"
+ echo "nn CP865" # not CP850 ??
+ echo "nn_NO CP865" # not CP850 ??
+ echo "no CP865" # not CP850 ??
+ echo "no_NO CP865" # not CP850 ??
+ echo "pt CP850"
+ echo "pt_BR CP850"
+ echo "pt_PT CP850"
+ echo "sv CP850"
+ echo "sv_SE CP850"
+ # ISO-8859-2 languages
+ echo "cs CP852"
+ echo "cs_CZ CP852"
+ echo "hr CP852"
+ echo "hr_HR CP852"
+ echo "hu CP852"
+ echo "hu_HU CP852"
+ echo "pl CP852"
+ echo "pl_PL CP852"
+ echo "ro CP852"
+ echo "ro_RO CP852"
+ echo "sk CP852"
+ echo "sk_SK CP852"
+ echo "sl CP852"
+ echo "sl_SI CP852"
+ echo "sq CP852"
+ echo "sq_AL CP852"
+ echo "sr CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
+ # ISO-8859-3 languages
+ echo "mt CP850"
+ echo "mt_MT CP850"
+ # ISO-8859-5 languages
+ echo "be CP866"
+ echo "be_BE CP866"
+ echo "bg CP866" # not CP855 ??
+ echo "bg_BG CP866" # not CP855 ??
+ echo "mk CP866" # not CP855 ??
+ echo "mk_MK CP866" # not CP855 ??
+ echo "ru CP866"
+ echo "ru_RU CP866"
+ echo "uk CP1125"
+ echo "uk_UA CP1125"
+ # ISO-8859-6 languages
+ echo "ar CP864"
+ echo "ar_AE CP864"
+ echo "ar_DZ CP864"
+ echo "ar_EG CP864"
+ echo "ar_IQ CP864"
+ echo "ar_IR CP864"
+ echo "ar_JO CP864"
+ echo "ar_KW CP864"
+ echo "ar_MA CP864"
+ echo "ar_OM CP864"
+ echo "ar_QA CP864"
+ echo "ar_SA CP864"
+ echo "ar_SY CP864"
+ # ISO-8859-7 languages
+ echo "el CP869"
+ echo "el_GR CP869"
+ # ISO-8859-8 languages
+ echo "he CP862"
+ echo "he_IL CP862"
+ # ISO-8859-9 languages
+ echo "tr CP857"
+ echo "tr_TR CP857"
+ # Japanese
+ echo "ja CP932"
+ echo "ja_JP CP932"
+ # Chinese
+ echo "zh_CN GBK"
+ echo "zh_TW CP950" # not CP938 ??
+ # Korean
+ echo "kr CP949" # not CP934 ??
+ echo "kr_KR CP949" # not CP934 ??
+ # Thai
+ echo "th CP874"
+ echo "th_TH CP874"
+ # Other
+ echo "eo CP850"
+ echo "eo_EO CP850"
+ ;;
+esac
diff --git a/gnu/config.hin b/gnu/config.hin
new file mode 100644
index 00000000..6210e85a
--- /dev/null
+++ b/gnu/config.hin
@@ -0,0 +1,1966 @@
+/* gnu/config.hin. Generated from configure.ac by autoheader. */
+
+/* Define if the compiler is building for multiple architectures of Apple
+ platforms at once. */
+#undef AA_APPLE_UNIVERSAL_BUILD
+
+/* Define if building universal (internal helper macro) */
+#undef AC_APPLE_UNIVERSAL_BUILD
+
+/* Define to the number of bits in type 'ptrdiff_t'. */
+#undef BITSIZEOF_PTRDIFF_T
+
+/* Define to the number of bits in type 'sig_atomic_t'. */
+#undef BITSIZEOF_SIG_ATOMIC_T
+
+/* Define to the number of bits in type 'size_t'. */
+#undef BITSIZEOF_SIZE_T
+
+/* Define to the number of bits in type 'wchar_t'. */
+#undef BITSIZEOF_WCHAR_T
+
+/* Define to the number of bits in type 'wint_t'. */
+#undef BITSIZEOF_WINT_T
+
+/* Define if you wish *printf() functions that have a safe handling of
+ non-IEEE-754 'long double' values. */
+#undef CHECK_PRINTF_SAFE
+
+/* Define to 1 for strict checking in test-snprintf.c. */
+#undef CHECK_SNPRINTF_POSIX
+
+/* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP
+ systems. This function is required for `alloca.c' support on those systems.
+ */
+#undef CRAY_STACKSEG_END
+
+/* Define to 1 if using `alloca.c'. */
+#undef C_ALLOCA
+
+/* Define as the bit index in the word where to find bit 0 of the exponent of
+ 'double'. */
+#undef DBL_EXPBIT0_BIT
+
+/* Define as the word index where to find the exponent of 'double'. */
+#undef DBL_EXPBIT0_WORD
+
+/* Define as the bit index in the word where to find the sign of 'double'. */
+#undef DBL_SIGNBIT_BIT
+
+/* Define as the word index where to find the sign of 'double'. */
+#undef DBL_SIGNBIT_WORD
+
+/* Define this to enable additional runtime debugging */
+#undef DEBUG
+
+/* Define to 1 if // is a file system root distinct from /. */
+#undef DOUBLE_SLASH_IS_DISTINCT_ROOT
+
+/* Define to 1 if translation of program messages to the user's native
+ language is requested. */
+#undef ENABLE_NLS
+
+/* Define this to 1 if F_DUPFD behavior does not match POSIX */
+#undef FCNTL_DUPFD_BUGGY
+
+/* Define on systems for which file names may have a so-called `drive letter'
+ prefix, define this to compute the length of that prefix, including the
+ colon. */
+#undef FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+
+/* Define if the backslash character may also serve as a file name component
+ separator. */
+#undef FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+
+/* Define if a drive letter prefix denotes a relative path if it is not
+ followed by a file name component separator. */
+#undef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+
+/* Define to nothing if C supports flexible array members, and to 1 if it does
+ not. That way, with a declaration like `struct s { int n; double
+ d[FLEXIBLE_ARRAY_MEMBER]; };', the struct hack can be used with pre-C99
+ compilers. When computing the size of such an object, don't use 'sizeof
+ (struct s)' as it overestimates the size. Use 'offsetof (struct s, d)'
+ instead. Don't use 'offsetof (struct s, d[0])', as this doesn't work with
+ MSVC and with C++ compilers. */
+#undef FLEXIBLE_ARRAY_MEMBER
+
+/* Define as the bit index in the word where to find bit 0 of the exponent of
+ 'float'. */
+#undef FLT_EXPBIT0_BIT
+
+/* Define as the word index where to find the exponent of 'float'. */
+#undef FLT_EXPBIT0_WORD
+
+/* Define as the bit index in the word where to find the sign of 'float'. */
+#undef FLT_SIGNBIT_BIT
+
+/* Define as the word index where to find the sign of 'float'. */
+#undef FLT_SIGNBIT_WORD
+
+/* Define to 1 if fopen() fails to recognize a trailing slash. */
+#undef FOPEN_TRAILING_SLASH_BUG
+
+/* Define to 1 if realpath() can malloc memory, always gives an absolute path,
+ and handles trailing slash correctly. */
+#undef FUNC_REALPATH_WORKS
+
+/* Define to 1 if ungetc is broken when used on arbitrary bytes. */
+#undef FUNC_UNGETC_BROKEN
+
+/* Define if gettimeofday clobbers the localtime buffer. */
+#undef GETTIMEOFDAY_CLOBBERS_LOCALTIME
+
+/* Define this to 'void' or 'struct timezone' to match the system's
+ declaration of the second argument to gettimeofday. */
+#undef GETTIMEOFDAY_TIMEZONE
+
+/* Define to make the limit macros in <stdint.h> visible. */
+#undef GL_TRIGGER_STDC_LIMIT_MACROS
+
+/* Define to 1 when using the gnulib module canonicalize-lgpl. */
+#undef GNULIB_CANONICALIZE_LGPL
+
+/* Define to 1 when using the gnulib module cloexec. */
+#undef GNULIB_CLOEXEC
+
+/* Define to 1 when using the gnulib module close-stream. */
+#undef GNULIB_CLOSE_STREAM
+
+/* Define to 1 when using the gnulib module dirname. */
+#undef GNULIB_DIRNAME
+
+/* Define to 1 when using the gnulib module fd-safer-flag. */
+#undef GNULIB_FD_SAFER_FLAG
+
+/* Define to 1 when using the gnulib module filenamecat. */
+#undef GNULIB_FILENAMECAT
+
+/* Define to 1 when using the gnulib module fopen-safer. */
+#undef GNULIB_FOPEN_SAFER
+
+/* Define to indicate the 'malloc' module. */
+#undef GNULIB_MALLOC_GNU
+
+/* Define to 1 when using the gnulib module open. */
+#undef GNULIB_OPEN
+
+/* Define to 1 when using the gnulib module pipe2-safer. */
+#undef GNULIB_PIPE2_SAFER
+
+/* Define to 1 when using the gnulib module stdlib-safer. */
+#undef GNULIB_STDLIB_SAFER
+
+/* Define to 1 if you have 'alloca' after including <alloca.h>, a header that
+ may be supplied by this distribution. */
+#undef HAVE_ALLOCA
+
+/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
+ */
+#undef HAVE_ALLOCA_H
+
+/* Define to 1 if you have the `argz_add' function. */
+#undef HAVE_ARGZ_ADD
+
+/* Define to 1 if you have the `argz_append' function. */
+#undef HAVE_ARGZ_APPEND
+
+/* Define to 1 if you have the `argz_count' function. */
+#undef HAVE_ARGZ_COUNT
+
+/* Define to 1 if you have the `argz_create_sep' function. */
+#undef HAVE_ARGZ_CREATE_SEP
+
+/* Define to 1 if you have the <argz.h> header file. */
+#undef HAVE_ARGZ_H
+
+/* Define to 1 if you have the `argz_insert' function. */
+#undef HAVE_ARGZ_INSERT
+
+/* Define to 1 if you have the `argz_next' function. */
+#undef HAVE_ARGZ_NEXT
+
+/* Define to 1 if you have the `argz_stringify' function. */
+#undef HAVE_ARGZ_STRINGIFY
+
+/* Define to 1 if you have the <bp-sym.h> header file. */
+#undef HAVE_BP_SYM_H
+
+/* Define to 1 if you have the `btowc' function. */
+#undef HAVE_BTOWC
+
+/* Define to 1 if you have the `calloc' function. */
+#undef HAVE_CALLOC
+
+/* Define to 1 if you have the `canonicalize_file_name' function. */
+#undef HAVE_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the
+ CoreFoundation framework. */
+#undef HAVE_CFLOCALECOPYCURRENT
+
+/* Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in
+ the CoreFoundation framework. */
+#undef HAVE_CFPREFERENCESCOPYAPPVALUE
+
+/* Define to 1 if you have the `closedir' function. */
+#undef HAVE_CLOSEDIR
+
+/* Define to 1 if you have the `confstr' function. */
+#undef HAVE_CONFSTR
+
+/* Define if the copysignf function is declared in <math.h> and available in
+ libc. */
+#undef HAVE_COPYSIGNF_IN_LIBC
+
+/* Define if the copysignl function is declared in <math.h> and available in
+ libc. */
+#undef HAVE_COPYSIGNL_IN_LIBC
+
+/* Define if the copysign function is declared in <math.h> and available in
+ libc. */
+#undef HAVE_COPYSIGN_IN_LIBC
+
+/* Define if the GNU dcgettext() function is already present or preinstalled.
+ */
+#undef HAVE_DCGETTEXT
+
+/* Define to 1 if you have the declaration of `alarm', and to 0 if you don't.
+ */
+#undef HAVE_DECL_ALARM
+
+/* Define to 1 if you have the declaration of `clearerr_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_CLEARERR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `copysign', and to 0 if you
+ don't. */
+#undef HAVE_DECL_COPYSIGN
+
+/* Define to 1 if you have the declaration of `copysignf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_COPYSIGNF
+
+/* Define to 1 if you have the declaration of `copysignl', and to 0 if you
+ don't. */
+#undef HAVE_DECL_COPYSIGNL
+
+/* Define to 1 if you have the declaration of `cygwin_conv_path', and to 0 if
+ you don't. */
+#undef HAVE_DECL_CYGWIN_CONV_PATH
+
+/* Define to 1 if you have the declaration of `feof_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_FEOF_UNLOCKED
+
+/* Define to 1 if you have the declaration of `ferror_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FERROR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fflush_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FFLUSH_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fgets_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FGETS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fpurge', and to 0 if you don't.
+ */
+#undef HAVE_DECL_FPURGE
+
+/* Define to 1 if you have the declaration of `fputc_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fputs_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FPUTS_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fread_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FREAD_UNLOCKED
+
+/* Define to 1 if you have the declaration of `fwrite_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_FWRITE_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getchar_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_GETCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_GETC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `getenv', and to 0 if you don't.
+ */
+#undef HAVE_DECL_GETENV
+
+/* Define to 1 if you have the declaration of `imaxabs', and to 0 if you
+ don't. */
+#undef HAVE_DECL_IMAXABS
+
+/* Define to 1 if you have the declaration of `imaxdiv', and to 0 if you
+ don't. */
+#undef HAVE_DECL_IMAXDIV
+
+/* Define to 1 if you have the declaration of `isblank', and to 0 if you
+ don't. */
+#undef HAVE_DECL_ISBLANK
+
+/* Define to 1 if you have the declaration of `memmem', and to 0 if you don't.
+ */
+#undef HAVE_DECL_MEMMEM
+
+/* Define to 1 if you have the declaration of `obstack_printf', and to 0 if
+ you don't. */
+#undef HAVE_DECL_OBSTACK_PRINTF
+
+/* Define to 1 if you have the declaration of `optreset', and to 0 if you
+ don't. */
+#undef HAVE_DECL_OPTRESET
+
+/* Define to 1 if you have the declaration of `program_invocation_name', and
+ to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_NAME
+
+/* Define to 1 if you have the declaration of `program_invocation_short_name',
+ and to 0 if you don't. */
+#undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+
+/* Define to 1 if you have the declaration of `putchar_unlocked', and to 0 if
+ you don't. */
+#undef HAVE_DECL_PUTCHAR_UNLOCKED
+
+/* Define to 1 if you have the declaration of `putc_unlocked', and to 0 if you
+ don't. */
+#undef HAVE_DECL_PUTC_UNLOCKED
+
+/* Define to 1 if you have the declaration of `snprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL_SNPRINTF
+
+/* Define to 1 if you have the declaration of `strdup', and to 0 if you don't.
+ */
+#undef HAVE_DECL_STRDUP
+
+/* Define to 1 if you have the declaration of `strerror', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR
+
+/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRERROR_R
+
+/* Define to 1 if you have the declaration of `strndup', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRNDUP
+
+/* Define to 1 if you have the declaration of `strnlen', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRNLEN
+
+/* Define to 1 if you have the declaration of `strtoimax', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRTOIMAX
+
+/* Define to 1 if you have the declaration of `strtoumax', and to 0 if you
+ don't. */
+#undef HAVE_DECL_STRTOUMAX
+
+/* Define to 1 if you have the declaration of `wctob', and to 0 if you don't.
+ */
+#undef HAVE_DECL_WCTOB
+
+/* Define to 1 if you have the declaration of `wcwidth', and to 0 if you
+ don't. */
+#undef HAVE_DECL_WCWIDTH
+
+/* Define to 1 if you have the declaration of `_snprintf', and to 0 if you
+ don't. */
+#undef HAVE_DECL__SNPRINTF
+
+/* Define to 1 if you have the declaration of `__fpending', and to 0 if you
+ don't. */
+#undef HAVE_DECL___FPENDING
+
+/* Define to 1 if you have the <dirent.h> header file. */
+#undef HAVE_DIRENT_H
+
+/* Define if you have the GNU dld library. */
+#undef HAVE_DLD
+
+/* Define to 1 if you have the <dld.h> header file. */
+#undef HAVE_DLD_H
+
+/* Define to 1 if you have the `dlerror' function. */
+#undef HAVE_DLERROR
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+#undef HAVE_DLFCN_H
+
+/* Define to 1 if you have the <dl.h> header file. */
+#undef HAVE_DL_H
+
+/* Define to 1 if you have the `dup2' function. */
+#undef HAVE_DUP2
+
+/* Define if you have the _dyld_func_lookup function. */
+#undef HAVE_DYLD
+
+/* Define if you have the declaration of environ. */
+#undef HAVE_ENVIRON_DECL
+
+/* Define to 1 if you have the <errno.h> header file. */
+#undef HAVE_ERRNO_H
+
+/* Define to 1 if you have the <error.h> header file. */
+#undef HAVE_ERROR_H
+
+/* Define to 1 if the system has the type `error_t'. */
+#undef HAVE_ERROR_T
+
+/* Define to 1 if you have the `fcntl' function. */
+#undef HAVE_FCNTL
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#undef HAVE_FCNTL_H
+
+/* Define to 1 if you have the <float.h> header file. */
+#undef HAVE_FLOAT_H
+
+/* Define to 1 if you have the `fpurge' function. */
+#undef HAVE_FPURGE
+
+/* Define if the frexpl function is available in libc. */
+#undef HAVE_FREXPL_IN_LIBC
+
+/* Define if the frexp function is available in libc. */
+#undef HAVE_FREXP_IN_LIBC
+
+/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
+#undef HAVE_FSEEKO
+
+/* Define to 1 if you have the `getcwd' function. */
+#undef HAVE_GETCWD
+
+/* Define to 1 if you have the `getdtablesize' function. */
+#undef HAVE_GETDTABLESIZE
+
+/* Define to 1 if you have the `gethostname' function. */
+#undef HAVE_GETHOSTNAME
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#undef HAVE_GETOPT_H
+
+/* Define to 1 if you have the `getopt_long_only' function. */
+#undef HAVE_GETOPT_LONG_ONLY
+
+/* Define to 1 if you have the `getpagesize' function. */
+#undef HAVE_GETPAGESIZE
+
+/* Define if the GNU gettext() function is already present or preinstalled. */
+#undef HAVE_GETTEXT
+
+/* Define to 1 if you have the <gettext.h> header file. */
+#undef HAVE_GETTEXT_H
+
+/* Define to 1 if you have the `gettimeofday' function. */
+#undef HAVE_GETTIMEOFDAY
+
+/* Define to 1 if you have the <gmp.h> header file. */
+#undef HAVE_GMP_H
+
+/* Define if you have the iconv() function and it works. */
+#undef HAVE_ICONV
+
+/* Define to 1 if you have the <iconv.h> header file. */
+#undef HAVE_ICONV_H
+
+/* Define to 1 if the compiler supports one of the keywords 'inline',
+ '__inline__', '__inline' and effectively inlines functions marked as such.
+ */
+#undef HAVE_INLINE
+
+/* Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>. */
+#undef HAVE_INTMAX_T
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define if <inttypes.h> exists, doesn't clash with <sys/types.h>, and
+ declares uintmax_t. */
+#undef HAVE_INTTYPES_H_WITH_UINTMAX
+
+/* Define to 1 if you have the `isblank' function. */
+#undef HAVE_ISBLANK
+
+/* Define if the isnan(double) function is available in libc. */
+#undef HAVE_ISNAND_IN_LIBC
+
+/* Define if the isnan(float) function is available in libc. */
+#undef HAVE_ISNANF_IN_LIBC
+
+/* Define if the isnan(long double) function is available in libc. */
+#undef HAVE_ISNANL_IN_LIBC
+
+/* Define to 1 if you have the `iswcntrl' function. */
+#undef HAVE_ISWCNTRL
+
+/* Define to 1 if you have the `iswctype' function. */
+#undef HAVE_ISWCTYPE
+
+/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
+#undef HAVE_LANGINFO_CODESET
+
+/* Define to 1 if you have the <langinfo.h> header file. */
+#undef HAVE_LANGINFO_H
+
+/* Define if the ldexpl function is available in libc. */
+#undef HAVE_LDEXPL_IN_LIBC
+
+/* Define if the ldexp function is available in libc. */
+#undef HAVE_LDEXP_IN_LIBC
+
+/* Define if you have the libdl library or equivalent. */
+#undef HAVE_LIBDL
+
+/* Define if libdlloader will be built on this platform */
+#undef HAVE_LIBDLLOADER
+
+/* Define to 1 if you have the <libintl.h> header file. */
+#undef HAVE_LIBINTL_H
+
+/* Define to 1 if you have the `ltdl' library (-lltdl). */
+#undef HAVE_LIBLTDL
+
+/* Define to 1 if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+
+/* Define to 1 if you have the `link' function. */
+#undef HAVE_LINK
+
+/* Define to 1 if you have the <locale.h> header file. */
+#undef HAVE_LOCALE_H
+
+/* Define to 1 if the system has the type `long long int'. */
+#undef HAVE_LONG_LONG_INT
+
+/* Define to 1 if you have the `lstat' function. */
+#undef HAVE_LSTAT
+
+/* Define this if a modern libltdl is already installed */
+#undef HAVE_LTDL
+
+/* Define to 1 if you have the <mach-o/dyld.h> header file. */
+#undef HAVE_MACH_O_DYLD_H
+
+/* Define to 1 if your system has a GNU libc compatible `malloc' function, and
+ to 0 otherwise. */
+#undef HAVE_MALLOC
+
+/* Define if the 'malloc' function is POSIX compliant. */
+#undef HAVE_MALLOC_POSIX
+
+/* Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>. */
+#undef HAVE_MAP_ANONYMOUS
+
+/* Define to 1 if you have the <math.h> header file. */
+#undef HAVE_MATH_H
+
+/* Define to 1 if you have the `mbrtowc' function. */
+#undef HAVE_MBRTOWC
+
+/* Define to 1 if you have the `mbsinit' function. */
+#undef HAVE_MBSINIT
+
+/* Define to 1 if you have the `mbslen' function. */
+#undef HAVE_MBSLEN
+
+/* Define to 1 if <wchar.h> declares mbstate_t. */
+#undef HAVE_MBSTATE_T
+
+/* Define to 1 if you have the `memchr' function. */
+#undef HAVE_MEMCHR
+
+/* Define to 1 if you have the `memmem' function. */
+#undef HAVE_MEMMEM
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the `mempcpy' function. */
+#undef HAVE_MEMPCPY
+
+/* Define to 1 if you have the `mkdtemp' function. */
+#undef HAVE_MKDTEMP
+
+/* Define to 1 if you have the `mktime' function. */
+#undef HAVE_MKTIME
+
+/* Define to 1 if you have the `mprotect' function. */
+#undef HAVE_MPROTECT
+
+/* Define to 1 if you have the `nl_langinfo' function. */
+#undef HAVE_NL_LANGINFO
+
+/* Define to 1 if libc includes obstacks. */
+#undef HAVE_OBSTACK
+
+/* Define to 1 if you have the <obstack.h> header file. */
+#undef HAVE_OBSTACK_H
+
+/* Define to 1 if you have the `obstack_printf' function. */
+#undef HAVE_OBSTACK_PRINTF
+
+/* Define to 1 if you have the `opendir' function. */
+#undef HAVE_OPENDIR
+
+/* Define to 1 if you have the <OS.h> header file. */
+#undef HAVE_OS_H
+
+/* Define to 1 if you have the `pathconf' function. */
+#undef HAVE_PATHCONF
+
+/* Define to 1 if you have the <paths.h> header file. */
+#undef HAVE_PATHS_H
+
+/* Define to 1 if you have the `pipe' function. */
+#undef HAVE_PIPE
+
+/* Define to 1 if you have the `pipe2' function. */
+#undef HAVE_PIPE2
+
+/* Define to 1 if you have the `posix_spawn' function. */
+#undef HAVE_POSIX_SPAWN
+
+/* Define to 1 if the system has the type `posix_spawnattr_t'. */
+#undef HAVE_POSIX_SPAWNATTR_T
+
+/* Define to 1 if the system has the type `posix_spawn_file_actions_t'. */
+#undef HAVE_POSIX_SPAWN_FILE_ACTIONS_T
+
+/* Define if libtool can extract symbol lists from object files. */
+#undef HAVE_PRELOADED_SYMBOLS
+
+/* Define to 1 if you have the <random.h> header file. */
+#undef HAVE_RANDOM_H
+
+/* Define to 1 if you have the `rawmemchr' function. */
+#undef HAVE_RAWMEMCHR
+
+/* Define to 1 if acosl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ACOSL
+
+/* Define to 1 if asinl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ASINL
+
+/* Define to 1 if atanl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ATANL
+
+/* Define to 1 if atoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ATOLL
+
+/* Define to 1 if btowc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_BTOWC
+
+/* Define to 1 if canonicalize_file_name is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
+
+/* Define to 1 if ceilf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CEILF
+
+/* Define to 1 if ceill is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CEILL
+
+/* Define to 1 if chown is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_CHOWN
+
+/* Define to 1 if cosl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_COSL
+
+/* Define to 1 if dprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DPRINTF
+
+/* Define to 1 if dup2 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUP2
+
+/* Define to 1 if dup3 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_DUP3
+
+/* Define to 1 if endusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ENDUSERSHELL
+
+/* Define to 1 if environ is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ENVIRON
+
+/* Define to 1 if euidaccess is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_EUIDACCESS
+
+/* Define to 1 if expl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_EXPL
+
+/* Define to 1 if faccessat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FACCESSAT
+
+/* Define to 1 if fchdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHDIR
+
+/* Define to 1 if fchmodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHMODAT
+
+/* Define to 1 if fchownat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCHOWNAT
+
+/* Define to 1 if fcntl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FCNTL
+
+/* Define to 1 if floorf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FLOORF
+
+/* Define to 1 if floorl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FLOORL
+
+/* Define to 1 if fpurge is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FPURGE
+
+/* Define to 1 if frexpl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FREXPL
+
+/* Define to 1 if fseeko is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSEEKO
+
+/* Define to 1 if fstatat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSTATAT
+
+/* Define to 1 if fsync is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FSYNC
+
+/* Define to 1 if ftello is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FTELLO
+
+/* Define to 1 if ftruncate is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FTRUNCATE
+
+/* Define to 1 if futimens is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_FUTIMENS
+
+/* Define to 1 if getcwd is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETCWD
+
+/* Define to 1 if getdelim is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDELIM
+
+/* Define to 1 if getdomainname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDOMAINNAME
+
+/* Define to 1 if getdtablesize is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETDTABLESIZE
+
+/* Define to 1 if getgroups is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETGROUPS
+
+/* Define to 1 if gethostname is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETHOSTNAME
+
+/* Define to 1 if getline is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLINE
+
+/* Define to 1 if getloadavg is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOADAVG
+
+/* Define to 1 if getlogin is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOGIN
+
+/* Define to 1 if getlogin_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETLOGIN_R
+
+/* Define to 1 if getpagesize is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETPAGESIZE
+
+/* Define to 1 if getsubopt is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETSUBOPT
+
+/* Define to 1 if gettimeofday is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETTIMEOFDAY
+
+/* Define to 1 if getusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_GETUSERSHELL
+
+/* Define to 1 if imaxabs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXABS
+
+/* Define to 1 if imaxdiv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_IMAXDIV
+
+/* Define to 1 if initstat_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_INITSTAT_R
+
+/* Define to 1 if lchmod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LCHMOD
+
+/* Define to 1 if lchown is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LCHOWN
+
+/* Define to 1 if ldexpl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LDEXPL
+
+/* Define to 1 if link is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LINK
+
+/* Define to 1 if linkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LINKAT
+
+/* Define to 1 if logl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LOGL
+
+/* Define to 1 if lseek is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LSEEK
+
+/* Define to 1 if lstat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_LSTAT
+
+/* Define to 1 if mbrlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBRLEN
+
+/* Define to 1 if mbrtowc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBRTOWC
+
+/* Define to 1 if mbsinit is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSINIT
+
+/* Define to 1 if mbsnrtowcs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSNRTOWCS
+
+/* Define to 1 if mbsrtowcs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MBSRTOWCS
+
+/* Define to 1 if memmem is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMMEM
+
+/* Define to 1 if mempcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMPCPY
+
+/* Define to 1 if memrchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MEMRCHR
+
+/* Define to 1 if mkdirat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKDIRAT
+
+/* Define to 1 if mkdtemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKDTEMP
+
+/* Define to 1 if mkfifo is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFO
+
+/* Define to 1 if mkfifoat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKFIFOAT
+
+/* Define to 1 if mknod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNOD
+
+/* Define to 1 if mknodat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKNODAT
+
+/* Define to 1 if mkostemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKOSTEMP
+
+/* Define to 1 if mkostemps is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKOSTEMPS
+
+/* Define to 1 if mkstemp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKSTEMP
+
+/* Define to 1 if mkstemps is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_MKSTEMPS
+
+/* Define to 1 if nl_langinfo is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_NL_LANGINFO
+
+/* Define to 1 if openat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_OPENAT
+
+/* Define to 1 if pipe2 is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PIPE2
+
+/* Define to 1 if popen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_POPEN
+
+/* Define to 1 if posix_spawn is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWN
+
+/* Define to 1 if posix_spawnattr_destroy is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
+
+/* Define to 1 if posix_spawnattr_getflags is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
+
+/* Define to 1 if posix_spawnattr_getpgroup is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
+
+/* Define to 1 if posix_spawnattr_getschedparam is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
+
+/* Define to 1 if posix_spawnattr_getschedpolicy is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
+
+/* Define to 1 if posix_spawnattr_getsigdefault is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
+
+/* Define to 1 if posix_spawnattr_getsigmask is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
+
+/* Define to 1 if posix_spawnattr_init is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
+
+/* Define to 1 if posix_spawnattr_setflags is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
+
+/* Define to 1 if posix_spawnattr_setpgroup is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
+
+/* Define to 1 if posix_spawnattr_setschedparam is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
+
+/* Define to 1 if posix_spawnattr_setschedpolicy is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
+
+/* Define to 1 if posix_spawnattr_setsigdefault is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
+
+/* Define to 1 if posix_spawnattr_setsigmask is declared even after undefining
+ macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
+
+/* Define to 1 if posix_spawnp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWNP
+
+/* Define to 1 if posix_spawn_file_actions_addclose is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+
+/* Define to 1 if posix_spawn_file_actions_addopen is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+
+/* Define to 1 if posix_spawn_file_actions_destroy is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
+
+/* Define to 1 if posix_spawn_file_actions_init is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
+
+/* Define to 1 if posix_spawwn_file_actions_adddup2 is declared even after
+ undefining macros. */
+#undef HAVE_RAW_DECL_POSIX_SPAWWN_FILE_ACTIONS_ADDDUP2
+
+/* Define to 1 if pread is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_PREAD
+
+/* Define to 1 if random_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RANDOM_R
+
+/* Define to 1 if rawmemchr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RAWMEMCHR
+
+/* Define to 1 if readlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READLINK
+
+/* Define to 1 if readlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_READLINKAT
+
+/* Define to 1 if realpath is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_REALPATH
+
+/* Define to 1 if renameat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RENAMEAT
+
+/* Define to 1 if rmdir is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RMDIR
+
+/* Define to 1 if round is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUND
+
+/* Define to 1 if roundf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUNDF
+
+/* Define to 1 if roundl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_ROUNDL
+
+/* Define to 1 if rpmatch is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_RPMATCH
+
+/* Define to 1 if setenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETENV
+
+/* Define to 1 if setstate_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETSTATE_R
+
+/* Define to 1 if setusershell is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SETUSERSHELL
+
+/* Define to 1 if sigaction is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGACTION
+
+/* Define to 1 if sigaddset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGADDSET
+
+/* Define to 1 if sigdelset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGDELSET
+
+/* Define to 1 if sigemptyset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGEMPTYSET
+
+/* Define to 1 if sigfillset is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGFILLSET
+
+/* Define to 1 if sigismember is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGISMEMBER
+
+/* Define to 1 if sigpending is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPENDING
+
+/* Define to 1 if sigprocmask is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SIGPROCMASK
+
+/* Define to 1 if sinl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SINL
+
+/* Define to 1 if sleep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SLEEP
+
+/* Define to 1 if snprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SNPRINTF
+
+/* Define to 1 if sqrtl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SQRTL
+
+/* Define to 1 if srandom_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SRANDOM_R
+
+/* Define to 1 if stat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STAT
+
+/* Define to 1 if stpcpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STPCPY
+
+/* Define to 1 if stpncpy is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STPNCPY
+
+/* Define to 1 if strcasestr is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCASESTR
+
+/* Define to 1 if strchrnul is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRCHRNUL
+
+/* Define to 1 if strdup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRDUP
+
+/* Define to 1 if strndup is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNDUP
+
+/* Define to 1 if strnlen is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRNLEN
+
+/* Define to 1 if strpbrk is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRPBRK
+
+/* Define to 1 if strsep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRSEP
+
+/* Define to 1 if strsignal is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRSIGNAL
+
+/* Define to 1 if strtod is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOD
+
+/* Define to 1 if strtoimax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOIMAX
+
+/* Define to 1 if strtok_r is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOK_R
+
+/* Define to 1 if strtoll is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOLL
+
+/* Define to 1 if strtoull is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOULL
+
+/* Define to 1 if strtoumax is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRTOUMAX
+
+/* Define to 1 if strverscmp is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_STRVERSCMP
+
+/* Define to 1 if symlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SYMLINK
+
+/* Define to 1 if symlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_SYMLINKAT
+
+/* Define to 1 if tanl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TANL
+
+/* Define to 1 if trunc is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNC
+
+/* Define to 1 if truncf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNCF
+
+/* Define to 1 if truncl is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_TRUNCL
+
+/* Define to 1 if unlink is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNLINK
+
+/* Define to 1 if unlinkat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNLINKAT
+
+/* Define to 1 if unsetenv is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UNSETENV
+
+/* Define to 1 if usleep is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_USLEEP
+
+/* Define to 1 if utimensat is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_UTIMENSAT
+
+/* Define to 1 if vdprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_VDPRINTF
+
+/* Define to 1 if vsnprintf is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_VSNPRINTF
+
+/* Define to 1 if wcrtomb is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCRTOMB
+
+/* Define to 1 if wcsnrtombs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSNRTOMBS
+
+/* Define to 1 if wcsrtombs is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCSRTOMBS
+
+/* Define to 1 if wctob is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCTOB
+
+/* Define to 1 if wcwidth is declared even after undefining macros. */
+#undef HAVE_RAW_DECL_WCWIDTH
+
+/* Define to 1 if you have the `readdir' function. */
+#undef HAVE_READDIR
+
+/* Define to 1 if you have the `readlink' function. */
+#undef HAVE_READLINK
+
+/* Define to 1 if you have the `realpath' function. */
+#undef HAVE_REALPATH
+
+/* Define to 1 if the system has the type `rlim_t'. */
+#undef HAVE_RLIM_T
+
+/* Define to 1 if you have the `rmdir' function. */
+#undef HAVE_RMDIR
+
+/* Define to 1 if you have the <sched.h> header file. */
+#undef HAVE_SCHED_H
+
+/* Define to 1 if you have the `sched_setparam' function. */
+#undef HAVE_SCHED_SETPARAM
+
+/* Define to 1 if you have the `sched_setscheduler' function. */
+#undef HAVE_SCHED_SETSCHEDULER
+
+/* Define to 1 if you have the <search.h> header file. */
+#undef HAVE_SEARCH_H
+
+/* Define to 1 if you have the `setegid' function. */
+#undef HAVE_SETEGID
+
+/* Define to 1 if you have the `setenv' function. */
+#undef HAVE_SETENV
+
+/* Define to 1 if you have the `seteuid' function. */
+#undef HAVE_SETEUID
+
+/* Define if you have the shl_load function. */
+#undef HAVE_SHL_LOAD
+
+/* Define to 1 if you have the `sigaction' function. */
+#undef HAVE_SIGACTION
+
+/* Define to 1 if you have the `sigaltstack' function. */
+#undef HAVE_SIGALTSTACK
+
+/* Define to 1 if the system has the type `sigcontext'. */
+#undef HAVE_SIGCONTEXT
+
+/* Define to 1 if you have the <siginfo.h> header file. */
+#undef HAVE_SIGINFO_H
+
+/* Define to 1 if the system has the type `siginfo_t'. */
+#undef HAVE_SIGINFO_T
+
+/* Define to 1 if you have the `siginterrupt' function. */
+#undef HAVE_SIGINTERRUPT
+
+/* Define to 1 if you have the <signal.h> header file. */
+#undef HAVE_SIGNAL_H
+
+/* Define to 1 if 'sig_atomic_t' is a signed integer type. */
+#undef HAVE_SIGNED_SIG_ATOMIC_T
+
+/* Define to 1 if 'wchar_t' is a signed integer type. */
+#undef HAVE_SIGNED_WCHAR_T
+
+/* Define to 1 if 'wint_t' is a signed integer type. */
+#undef HAVE_SIGNED_WINT_T
+
+/* Define to 1 if the system has the type `sigset_t'. */
+#undef HAVE_SIGSET_T
+
+/* Define to 1 if you have the `sigstack' function. */
+#undef HAVE_SIGSTACK
+
+/* Define to 1 if you have the `sigvec' function. */
+#undef HAVE_SIGVEC
+
+/* Define to 1 if the system has the type `sig_atomic_t'. */
+#undef HAVE_SIG_ATOMIC_T
+
+/* Define to 1 if you have the `snprintf' function. */
+#undef HAVE_SNPRINTF
+
+/* Define to 1 if you have the <spawn.h> header file. */
+#undef HAVE_SPAWN_H
+
+/* Define to 1 if the system has the type `stack_t'. */
+#undef HAVE_STACK_T
+
+/* Define to 1 if `ss_sp' is a member of `stack_t'. */
+#undef HAVE_STACK_T_SS_SP
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#undef HAVE_STDARG_H
+
+/* Define to 1 if stdbool.h conforms to C99. */
+#undef HAVE_STDBOOL_H
+
+/* Define to 1 if you have the <stddef.h> header file. */
+#undef HAVE_STDDEF_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define if <stdint.h> exists, doesn't clash with <sys/types.h>, and declares
+ uintmax_t. */
+#undef HAVE_STDINT_H_WITH_UINTMAX
+
+/* Define to 1 if you have the <stdio_ext.h> header file. */
+#undef HAVE_STDIO_EXT_H
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#undef HAVE_STDIO_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the `strchrnul' function. */
+#undef HAVE_STRCHRNUL
+
+/* Define to 1 if you have the `strdup' function. */
+#undef HAVE_STRDUP
+
+/* Define to 1 if you have the `strerror' function. */
+#undef HAVE_STRERROR
+
+/* Define to 1 if you have the `strerror_r' function. */
+#undef HAVE_STRERROR_R
+
+/* Define to 1 if you have the `strftime' function. */
+#undef HAVE_STRFTIME
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the `strlcat' function. */
+#undef HAVE_STRLCAT
+
+/* Define to 1 if you have the `strlcpy' function. */
+#undef HAVE_STRLCPY
+
+/* Define to 1 if you have the `strndup' function. */
+#undef HAVE_STRNDUP
+
+/* Define to 1 if you have the `strnlen' function. */
+#undef HAVE_STRNLEN
+
+/* Define to 1 if you have the `strtol' function. */
+#undef HAVE_STRTOL
+
+/* Define to 1 if the system has the type `struct random_data'. */
+#undef HAVE_STRUCT_RANDOM_DATA
+
+/* Define to 1 if `sa_sigaction' is a member of `struct sigaction'. */
+#undef HAVE_STRUCT_SIGACTION_SA_SIGACTION
+
+/* Define to 1 if you have the `symlink' function. */
+#undef HAVE_SYMLINK
+
+/* Define to 1 if you have the <sys/bitypes.h> header file. */
+#undef HAVE_SYS_BITYPES_H
+
+/* Define to 1 if you have the <sys/dl.h> header file. */
+#undef HAVE_SYS_DL_H
+
+/* Define to 1 if you have the <sys/inttypes.h> header file. */
+#undef HAVE_SYS_INTTYPES_H
+
+/* Define to 1 if you have the <sys/mman.h> header file. */
+#undef HAVE_SYS_MMAN_H
+
+/* Define to 1 if you have the <sys/param.h> header file. */
+#undef HAVE_SYS_PARAM_H
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+#undef HAVE_SYS_SOCKET_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/timeb.h> header file. */
+#undef HAVE_SYS_TIMEB_H
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <sys/wait.h> header file. */
+#undef HAVE_SYS_WAIT_H
+
+/* Define to 1 if you have the <time.h> header file. */
+#undef HAVE_TIME_H
+
+/* Define to 1 if you have the `tsearch' function. */
+#undef HAVE_TSEARCH
+
+/* Define to 1 if you have the `uname' function. */
+#undef HAVE_UNAME
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the `unsetenv' function. */
+#undef HAVE_UNSETENV
+
+/* Define to 1 if the system has the type `unsigned long long int'. */
+#undef HAVE_UNSIGNED_LONG_LONG_INT
+
+/* Define to 1 if you have the `vasnprintf' function. */
+#undef HAVE_VASNPRINTF
+
+/* Define to 1 if you have the `vasprintf' function. */
+#undef HAVE_VASPRINTF
+
+/* Define to 1 if you have the `vfork' function. */
+#undef HAVE_VFORK
+
+/* Define to 1 if you have the `waitid' function. */
+#undef HAVE_WAITID
+
+/* Define to 1 if you have the <wchar.h> header file. */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the 'wchar_t' type. */
+#undef HAVE_WCHAR_T
+
+/* Define to 1 if you have the `wcrtomb' function. */
+#undef HAVE_WCRTOMB
+
+/* Define to 1 if you have the `wcscoll' function. */
+#undef HAVE_WCSCOLL
+
+/* Define to 1 if you have the `wcslen' function. */
+#undef HAVE_WCSLEN
+
+/* Define to 1 if you have the `wcsnlen' function. */
+#undef HAVE_WCSNLEN
+
+/* Define to 1 if you have the `wctob' function. */
+#undef HAVE_WCTOB
+
+/* Define to 1 if you have the <wctype.h> header file. */
+#undef HAVE_WCTYPE_H
+
+/* Define to 1 if you have the `wcwidth' function. */
+#undef HAVE_WCWIDTH
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#undef HAVE_WINSOCK2_H
+
+/* Define if you have the 'wint_t' type. */
+#undef HAVE_WINT_T
+
+/* This value is set to 1 to indicate that the system argz facility works */
+#undef HAVE_WORKING_ARGZ
+
+/* Define to 1 if O_NOATIME works. */
+#undef HAVE_WORKING_O_NOATIME
+
+/* Define to 1 if O_NOFOLLOW works. */
+#undef HAVE_WORKING_O_NOFOLLOW
+
+/* Define to 1 if the system has the type `_Bool'. */
+#undef HAVE__BOOL
+
+/* Define to 1 if you have the `_ftime' function. */
+#undef HAVE__FTIME
+
+/* Define to 1 if you have the `__fpending' function. */
+#undef HAVE___FPENDING
+
+/* Define to 1 if you have the `__fpurge' function. */
+#undef HAVE___FPURGE
+
+/* Define to 1 if you have the `__freading' function. */
+#undef HAVE___FREADING
+
+/* Define to 1 if you have the `__secure_getenv' function. */
+#undef HAVE___SECURE_GETENV
+
+/* Define as const if the declaration of iconv() needs const. */
+#undef ICONV_CONST
+
+/* Define to a symbolic name denoting the flavor of iconv_open()
+ implementation. */
+#undef ICONV_FLAVOR
+
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+/* Define as the bit index in the word where to find bit 0 of the exponent of
+ 'long double'. */
+#undef LDBL_EXPBIT0_BIT
+
+/* Define as the word index where to find the exponent of 'long double'. */
+#undef LDBL_EXPBIT0_WORD
+
+/* Define as the bit index in the word where to find the sign of 'long
+ double'. */
+#undef LDBL_SIGNBIT_BIT
+
+/* Define as the word index where to find the sign of 'long double'. */
+#undef LDBL_SIGNBIT_WORD
+
+/* Define to 1 if lseek does not detect pipes. */
+#undef LSEEK_PIPE_BROKEN
+
+/* Define to 1 if `lstat' dereferences a symlink specified with a trailing
+ slash. */
+#undef LSTAT_FOLLOWS_SLASHED_SYMLINK
+
+/* Define if the OS needs help to load dependent libraries for dlopen(). */
+#undef LTDL_DLOPEN_DEPLIBS
+
+/* Define to the system default library search path. */
+#undef LT_DLSEARCH_PATH
+
+/* The archive extension */
+#undef LT_LIBEXT
+
+/* Define to the extension used for runtime loadable modules, say, ".so". */
+#undef LT_MODULE_EXT
+
+/* Define to the name of the environment variable that determines the run-time
+ module search path. */
+#undef LT_MODULE_PATH_VAR
+
+/* Define to the sub-directory in which libtool stores uninstalled libraries.
+ */
+#undef LT_OBJDIR
+
+/* Shell used by syscmd and esyscmd, must accept -c argument. */
+#undef M4_SYSCMD_SHELL
+
+/* If malloc(0) is != NULL, define this to 1. Otherwise define this to 0. */
+#undef MALLOC_0_IS_NONNULL
+
+/* Define to a substitute value for mmap()'s MAP_ANONYMOUS flag. */
+#undef MAP_ANONYMOUS
+
+/* Define if the mbrtowc function has the NULL string argument bug. */
+#undef MBRTOWC_NULL_ARG_BUG
+
+/* Define if the mbrtowc function does not return 0 for a NUL character. */
+#undef MBRTOWC_NUL_RETVAL_BUG
+
+/* Define if the mbrtowc function returns a wrong return value. */
+#undef MBRTOWC_RETVAL_BUG
+
+/* Define to 1 if assertions should be disabled. */
+#undef NDEBUG
+
+/* Define if the vasnprintf implementation needs special code for the 'a' and
+ 'A' directives. */
+#undef NEED_PRINTF_DIRECTIVE_A
+
+/* Define if the vasnprintf implementation needs special code for the 'F'
+ directive. */
+#undef NEED_PRINTF_DIRECTIVE_F
+
+/* Define if the vasnprintf implementation needs special code for the 'ls'
+ directive. */
+#undef NEED_PRINTF_DIRECTIVE_LS
+
+/* Define if the vasnprintf implementation needs special code for 'double'
+ arguments. */
+#undef NEED_PRINTF_DOUBLE
+
+/* Define if the vasnprintf implementation needs special code for surviving
+ out-of-memory conditions. */
+#undef NEED_PRINTF_ENOMEM
+
+/* Define if the vasnprintf implementation needs special code for the ' flag.
+ */
+#undef NEED_PRINTF_FLAG_GROUPING
+
+/* Define if the vasnprintf implementation needs special code for the '-'
+ flag. */
+#undef NEED_PRINTF_FLAG_LEFTADJUST
+
+/* Define if the vasnprintf implementation needs special code for the 0 flag.
+ */
+#undef NEED_PRINTF_FLAG_ZERO
+
+/* Define if the vasnprintf implementation needs special code for infinite
+ 'double' arguments. */
+#undef NEED_PRINTF_INFINITE_DOUBLE
+
+/* Define if the vasnprintf implementation needs special code for infinite
+ 'long double' arguments. */
+#undef NEED_PRINTF_INFINITE_LONG_DOUBLE
+
+/* Define if the vasnprintf implementation needs special code for 'long
+ double' arguments. */
+#undef NEED_PRINTF_LONG_DOUBLE
+
+/* Define if the vasnprintf implementation needs special code for supporting
+ large precisions without arbitrary bounds. */
+#undef NEED_PRINTF_UNBOUNDED_PRECISION
+
+/* Define if dlsym() requires a leading underscore in symbol names. */
+#undef NEED_USCORE
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Define to 1 if open() fails to recognize a trailing slash. */
+#undef OPEN_TRAILING_SLASH_BUG
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* String identifying the packager of this software */
+#undef PACKAGE_PACKAGER
+
+/* Packager info for bug reports (URL/e-mail/...) */
+#undef PACKAGE_PACKAGER_BUG_REPORTS
+
+/* Packager-specific version information */
+#undef PACKAGE_PACKAGER_VERSION
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the home page for this package. */
+#undef PACKAGE_URL
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* the number of pending output bytes on stream `fp' */
+#undef PENDING_OUTPUT_N_BYTES
+
+/* Define if <inttypes.h> exists and defines unusable PRI* macros. */
+#undef PRI_MACROS_BROKEN
+
+/* Define to the type that is the result of default argument promotions of
+ type mode_t. */
+#undef PROMOTED_MODE_T
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'ptrdiff_t'. */
+#undef PTRDIFF_T_SUFFIX
+
+/* Define to 1 if readlink fails to recognize a trailing slash. */
+#undef READLINK_TRAILING_SLASH_BUG
+
+/* Define if rename does not work when the destination file exists, as on
+ Cygwin 1.5 or Windows. */
+#undef RENAME_DEST_EXISTS_BUG
+
+/* Define if rename fails to leave hard links alone, as on NetBSD 1.6 or
+ Cygwin 1.5. */
+#undef RENAME_HARD_LINK_BUG
+
+/* Define to 1 if a file can be renamed while open, or to 0 if not. */
+#undef RENAME_OPEN_FILE_WORKS
+
+/* Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6. */
+#undef RENAME_TRAILING_SLASH_DEST_BUG
+
+/* Define if rename does not correctly handle slashes on the source argument,
+ such as on Solaris 9 or cygwin 1.5. */
+#undef RENAME_TRAILING_SLASH_SOURCE_BUG
+
+/* Define to 1 if stat needs help when passed a directory name with a trailing
+ slash */
+#undef REPLACE_FUNC_STAT_DIR
+
+/* Define to 1 if stat needs help when passed a file name with a trailing
+ slash */
+#undef REPLACE_FUNC_STAT_FILE
+
+/* Define if nl_langinfo exists but is overridden by gnulib. */
+#undef REPLACE_NL_LANGINFO
+
+/* Define this to 1 if strerror is broken. */
+#undef REPLACE_STRERROR
+
+/* Define if vasnprintf exists but is overridden by gnulib. */
+#undef REPLACE_VASNPRINTF
+
+/* Define if vfprintf is overridden by a POSIX compliant gnulib
+ implementation. */
+#undef REPLACE_VFPRINTF_POSIX
+
+/* Define if vprintf is overridden by a POSIX compliant gnulib implementation.
+ */
+#undef REPLACE_VPRINTF_POSIX
+
+/* Define as the return type of signal handlers (`int' or `void'). */
+#undef RETSIGTYPE
+
+/* Define if lists must be signal-safe. */
+#undef SIGNAL_SAFE_LIST
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'sig_atomic_t'. */
+#undef SIG_ATOMIC_T_SUFFIX
+
+/* The size of `long long int', as computed by sizeof. */
+#undef SIZEOF_LONG_LONG_INT
+
+/* Define as the maximum value of type 'size_t', if the system doesn't define
+ it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'size_t'. */
+#undef SIZE_T_SUFFIX
+
+/* If using the C implementation of alloca, define if you know the
+ direction of stack growth for your system; otherwise it will be
+ automatically deduced at runtime.
+ STACK_DIRECTION > 0 => grows toward higher addresses
+ STACK_DIRECTION < 0 => grows toward lower addresses
+ STACK_DIRECTION = 0 => direction of growth unknown */
+#undef STACK_DIRECTION
+
+/* Define to 1 if the `S_IS*' macros in <sys/stat.h> do not work properly. */
+#undef STAT_MACROS_BROKEN
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Define to 1 if strerror_r returns char *. */
+#undef STRERROR_R_CHAR_P
+
+/* Define to 1 if your <sys/time.h> declares `struct tm'. */
+#undef TM_IN_SYS_TIME
+
+/* Define to 1 if using the GNU multiple precision library. */
+#undef USE_GMP
+
+/* Define to 1 if using stack overflow detection. */
+#undef USE_STACKOVF
+
+/* Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps, but it is not
+ safe for multithreaded apps. */
+#undef USE_UNLOCKED_IO
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if unsetenv returns void instead of int. */
+#undef VOID_UNSETENV
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wchar_t'. */
+#undef WCHAR_T_SUFFIX
+
+/* Define to l, ll, u, ul, ull, etc., as suitable for constants of type
+ 'wint_t'. */
+#undef WINT_T_SUFFIX
+
+/* Define if using the dmalloc debugging malloc package */
+#undef WITH_DMALLOC
+
+/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most
+ significant byte first (like Motorola and SPARC, unlike Intel). */
+#if defined AC_APPLE_UNIVERSAL_BUILD
+# if defined __BIG_ENDIAN__
+# define WORDS_BIGENDIAN 1
+# endif
+#else
+# ifndef WORDS_BIGENDIAN
+# undef WORDS_BIGENDIAN
+# endif
+#endif
+
+/* Number of bits in a file offset, on hosts where this is settable. */
+#undef _FILE_OFFSET_BITS
+
+/* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */
+#undef _LARGEFILE_SOURCE
+
+/* Define for large files, on AIX-style hosts. */
+#undef _LARGE_FILES
+
+/* Define to 1 if on MINIX. */
+#undef _MINIX
+
+/* Define to 2 if the system does not provide POSIX.1 features except with
+ this defined. */
+#undef _POSIX_1_SOURCE
+
+/* Define to 1 if you need to in order for `stat' and other things to work. */
+#undef _POSIX_SOURCE
+
+/* Define if you want regoff_t to be at least as wide POSIX requires. */
+#undef _REGEX_LARGE_OFFSETS
+
+/* Define to 500 only on HP-UX. */
+#undef _XOPEN_SOURCE
+
+/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+
+
+/* Define to rpl_ if the getopt replacement functions and variables should be
+ used. */
+#undef __GETOPT_PREFIX
+
+/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+ <inttypes.h> relies on them. */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+
+
+/* Define so that glibc/gnulib argp.h does not typedef error_t. */
+#undef __error_t_defined
+
+/* Define to a type to use for `error_t' if it is not otherwise available. */
+#undef error_t
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef gid_t
+
+/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))
+
+/* Define to rpl_gmtime if the replacement function should be used. */
+#undef gmtime
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+#undef inline
+#endif
+
+/* Define to long or long long if <stdint.h> and <inttypes.h> don't define. */
+#undef intmax_t
+
+/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif
+
+/* Define to rpl_localtime if the replacement function should be used. */
+#undef localtime
+
+/* Define to rpl_malloc if the replacement function should be used. */
+#undef malloc
+
+/* Define to a type if <wchar.h> does not define. */
+#undef mbstate_t
+
+/* Define to `int' if <sys/types.h> does not define. */
+#undef mode_t
+
+/* Define to the type of st_nlink in struct stat, or a supertype. */
+#undef nlink_t
+
+/* Define as the type of the result of subtracting two pointers, if the system
+ doesn't define it. */
+#undef ptrdiff_t
+
+/* Define to rpl_re_comp if the replacement should be used. */
+#undef re_comp
+
+/* Define to rpl_re_compile_fastmap if the replacement should be used. */
+#undef re_compile_fastmap
+
+/* Define to rpl_re_compile_pattern if the replacement should be used. */
+#undef re_compile_pattern
+
+/* Define to rpl_re_exec if the replacement should be used. */
+#undef re_exec
+
+/* Define to rpl_re_match if the replacement should be used. */
+#undef re_match
+
+/* Define to rpl_re_match_2 if the replacement should be used. */
+#undef re_match_2
+
+/* Define to rpl_re_search if the replacement should be used. */
+#undef re_search
+
+/* Define to rpl_re_search_2 if the replacement should be used. */
+#undef re_search_2
+
+/* Define to rpl_re_set_registers if the replacement should be used. */
+#undef re_set_registers
+
+/* Define to rpl_re_set_syntax if the replacement should be used. */
+#undef re_set_syntax
+
+/* Define to rpl_re_syntax_options if the replacement should be used. */
+#undef re_syntax_options
+
+/* Define to rpl_regcomp if the replacement should be used. */
+#undef regcomp
+
+/* Define to rpl_regerror if the replacement should be used. */
+#undef regerror
+
+/* Define to rpl_regexec if the replacement should be used. */
+#undef regexec
+
+/* Define to rpl_regfree if the replacement should be used. */
+#undef regfree
+
+/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif
+
+/* Define to int if rlim_t is not defined in sys/resource.h */
+#undef rlim_t
+
+/* Define as an integer type suitable for memory locations that can be
+ accessed atomically even in the presence of asynchnonous signals. */
+#undef sig_atomic_t
+
+/* Define to `unsigned int' if <sys/types.h> does not define. */
+#undef size_t
+
+/* Define to ss_base if stack_t has ss_base instead of ss_sp. */
+#undef ss_sp
+
+/* Define as a signed type of the same size as size_t. */
+#undef ssize_t
+
+/* Define to struct sigaltstack if stack_t is not in signal.h */
+#undef stack_t
+
+/* Define to rpl_strnlen if the replacement function should be used. */
+#undef strnlen
+
+/* Define to `int' if <sys/types.h> doesn't define. */
+#undef uid_t
+
+/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+
+
+/* Define as a macro for copying va_list variables. */
+#undef va_copy
diff --git a/gnu/dirname-lgpl.c b/gnu/dirname-lgpl.c
new file mode 100755
index 00000000..d4506e06
--- /dev/null
+++ b/gnu/dirname-lgpl.c
@@ -0,0 +1,86 @@
+/* dirname.c -- return all but the last element in a file name
+
+ Copyright (C) 1990, 1998, 2000-2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+/* Return the length of the prefix of FILE that will be used by
+ dir_name. If FILE is in the working directory, this returns zero
+ even though `dir_name (FILE)' will return ".". Works properly even
+ if there are trailing slashes (by effectively ignoring them). */
+
+size_t
+dir_len (char const *file)
+{
+ size_t prefix_length = FILE_SYSTEM_PREFIX_LEN (file);
+ size_t length;
+
+ /* Advance prefix_length beyond important leading slashes. */
+ prefix_length += (prefix_length != 0
+ ? (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+ && ISSLASH (file[prefix_length]))
+ : (ISSLASH (file[0])
+ ? ((DOUBLE_SLASH_IS_DISTINCT_ROOT
+ && ISSLASH (file[1]) && ! ISSLASH (file[2])
+ ? 2 : 1))
+ : 0));
+
+ /* Strip the basename and any redundant slashes before it. */
+ for (length = last_component (file) - file;
+ prefix_length < length; length--)
+ if (! ISSLASH (file[length - 1]))
+ break;
+ return length;
+}
+
+
+/* In general, we can't use the builtin `dirname' function if available,
+ since it has different meanings in different environments.
+ In some environments the builtin `dirname' modifies its argument.
+
+ Return the leading directories part of FILE, allocated with malloc.
+ Works properly even if there are trailing slashes (by effectively
+ ignoring them). Return NULL on failure.
+
+ If lstat (FILE) would succeed, then { chdir (dir_name (FILE));
+ lstat (base_name (FILE)); } will access the same file. Likewise,
+ if the sequence { chdir (dir_name (FILE));
+ rename (base_name (FILE), "foo"); } succeeds, you have renamed FILE
+ to "foo" in the same directory FILE was in. */
+
+char *
+mdir_name (char const *file)
+{
+ size_t length = dir_len (file);
+ bool append_dot = (length == 0
+ || (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+ && length == FILE_SYSTEM_PREFIX_LEN (file)
+ && file[2] != '\0' && ! ISSLASH (file[2])));
+ char *dir = malloc (length + append_dot + 1);
+ if (!dir)
+ return NULL;
+ memcpy (dir, file, length);
+ if (append_dot)
+ dir[length++] = '.';
+ dir[length] = '\0';
+ return dir;
+}
diff --git a/gnu/dirname.c b/gnu/dirname.c
new file mode 100755
index 00000000..953a9acc
--- /dev/null
+++ b/gnu/dirname.c
@@ -0,0 +1,38 @@
+/* dirname.c -- return all but the last element in a file name
+
+ Copyright (C) 1990, 1998, 2000-2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include "xalloc.h"
+
+/* Just like mdir_name (dirname-lgpl.c), except, rather than
+ returning NULL upon malloc failure, here, we report the
+ "memory exhausted" condition and exit. */
+
+char *
+dir_name (char const *file)
+{
+ char *result = mdir_name (file);
+ if (!result)
+ xalloc_die ();
+ return result;
+}
diff --git a/gnu/dirname.h b/gnu/dirname.h
new file mode 100755
index 00000000..fb19508f
--- /dev/null
+++ b/gnu/dirname.h
@@ -0,0 +1,74 @@
+/* Take file names apart into directory and base names.
+
+ Copyright (C) 1998, 2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef DIRNAME_H_
+# define DIRNAME_H_ 1
+
+# include <stdbool.h>
+# include <stddef.h>
+
+# ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+# endif
+
+# ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+# endif
+
+# ifndef FILE_SYSTEM_PREFIX_LEN
+# if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+ /* This internal macro assumes ASCII, but all hosts that support drive
+ letters use ASCII. */
+# define _IS_DRIVE_LETTER(c) (((unsigned int) (c) | ('a' - 'A')) - 'a' \
+ <= 'z' - 'a')
+# define FILE_SYSTEM_PREFIX_LEN(Filename) \
+ (_IS_DRIVE_LETTER ((Filename)[0]) && (Filename)[1] == ':' ? 2 : 0)
+# else
+# define FILE_SYSTEM_PREFIX_LEN(Filename) 0
+# endif
+# endif
+
+# ifndef FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE 0
+# endif
+
+# ifndef DOUBLE_SLASH_IS_DISTINCT_ROOT
+# define DOUBLE_SLASH_IS_DISTINCT_ROOT 0
+# endif
+
+# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+# define IS_ABSOLUTE_FILE_NAME(F) ISSLASH ((F)[FILE_SYSTEM_PREFIX_LEN (F)])
+# else
+# define IS_ABSOLUTE_FILE_NAME(F) \
+ (ISSLASH ((F)[0]) || 0 < FILE_SYSTEM_PREFIX_LEN (F))
+# endif
+# define IS_RELATIVE_FILE_NAME(F) (! IS_ABSOLUTE_FILE_NAME (F))
+
+# if GNULIB_DIRNAME
+char *base_name (char const *file);
+char *dir_name (char const *file);
+# endif
+
+char *mdir_name (char const *file);
+size_t base_len (char const *file);
+size_t dir_len (char const *file);
+char *last_component (char const *file);
+
+bool strip_trailing_slashes (char *file);
+
+#endif /* not DIRNAME_H_ */
diff --git a/gnu/dup-safer-flag.c b/gnu/dup-safer-flag.c
new file mode 100755
index 00000000..10d6a1bb
--- /dev/null
+++ b/gnu/dup-safer-flag.c
@@ -0,0 +1,44 @@
+/* Duplicate a file descriptor result, avoiding clobbering
+ STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+ Copyright (C) 2001, 2004-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+#include "cloexec.h"
+
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. If FLAG contains O_CLOEXEC, behave like
+ fcntl(F_DUPFD_CLOEXEC) rather than fcntl(F_DUPFD). */
+
+int
+dup_safer_flag (int fd, int flag)
+{
+ return fcntl (fd, (flag & O_CLOEXEC) ? F_DUPFD_CLOEXEC : F_DUPFD,
+ STDERR_FILENO + 1);
+}
diff --git a/gnu/dup-safer.c b/gnu/dup-safer.c
new file mode 100755
index 00000000..33f599be
--- /dev/null
+++ b/gnu/dup-safer.c
@@ -0,0 +1,34 @@
+/* Invoke dup, but avoid some glitches.
+
+ Copyright (C) 2001, 2004-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <fcntl.h>
+#include <unistd.h>
+
+/* Like dup, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+
+int
+dup_safer (int fd)
+{
+ return fcntl (fd, F_DUPFD, STDERR_FILENO + 1);
+}
diff --git a/gnu/dup2.c b/gnu/dup2.c
new file mode 100755
index 00000000..a4422bf3
--- /dev/null
+++ b/gnu/dup2.c
@@ -0,0 +1,128 @@
+/* Duplicate an open file descriptor to a specified file descriptor.
+
+ Copyright (C) 1999, 2004-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Paul Eggert */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if HAVE_DUP2
+
+# undef dup2
+
+int
+rpl_dup2 (int fd, int desired_fd)
+{
+ int result;
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* If fd is closed, mingw hangs on dup2 (fd, fd). If fd is open,
+ dup2 (fd, fd) returns 0, but all further attempts to use fd in
+ future dup2 calls will hang. */
+ if (fd == desired_fd)
+ {
+ if ((HANDLE) _get_osfhandle (fd) == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ return fd;
+ }
+ /* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
+ http://bugs.winehq.org/show_bug.cgi?id=21289 */
+ if (desired_fd < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
+# endif
+ result = dup2 (fd, desired_fd);
+# ifdef __linux__
+ /* Correct a Linux return value.
+ <http://git.kernel.org/?p=linux/kernel/git/stable/linux-2.6.30.y.git;a=commitdiff;h=2b79bc4f7ebbd5af3c8b867968f9f15602d5f802>
+ */
+ if (fd == desired_fd && result == (unsigned int) -EBADF)
+ {
+ errno = EBADF;
+ result = -1;
+ }
+# endif
+ if (result == 0)
+ result = desired_fd;
+ /* Correct a cygwin 1.5.x errno value. */
+ else if (result == -1 && errno == EMFILE)
+ errno = EBADF;
+# if REPLACE_FCHDIR
+ if (fd != desired_fd && result != -1)
+ result = _gl_register_dup (fd, result);
+# endif
+ return result;
+}
+
+#else /* !HAVE_DUP2 */
+
+/* On older platforms, dup2 did not exist. */
+
+# ifndef F_DUPFD
+static int
+dupfd (int fd, int desired_fd)
+{
+ int duplicated_fd = dup (fd);
+ if (duplicated_fd < 0 || duplicated_fd == desired_fd)
+ return duplicated_fd;
+ else
+ {
+ int r = dupfd (fd, desired_fd);
+ int e = errno;
+ close (duplicated_fd);
+ errno = e;
+ return r;
+ }
+}
+# endif
+
+int
+dup2 (int fd, int desired_fd)
+{
+ int result = fcntl (fd, F_GETFL) < 0 ? -1 : fd;
+ if (result == -1 || fd == desired_fd)
+ return result;
+ close (desired_fd);
+# ifdef F_DUPFD
+ result = fcntl (fd, F_DUPFD, desired_fd);
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+# else
+ result = dupfd (fd, desired_fd);
+# endif
+ if (result == -1 && (errno == EMFILE || errno == EINVAL))
+ errno = EBADF;
+ return result;
+}
+#endif /* !HAVE_DUP2 */
diff --git a/gnu/errno.in.h b/gnu/errno.in.h
new file mode 100755
index 00000000..140e5d13
--- /dev/null
+++ b/gnu/errno.in.h
@@ -0,0 +1,160 @@
+/* A POSIX-like <errno.h>.
+
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_ERRNO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_ERRNO_H@
+
+#ifndef _GL_ERRNO_H
+#define _GL_ERRNO_H
+
+
+/* On native Windows platforms, many macros are not defined. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* POSIX says that EAGAIN and EWOULDBLOCK may have the same value. */
+# define EWOULDBLOCK EAGAIN
+
+/* Values >= 100 seem safe to use. */
+# define ETXTBSY 100
+# define GNULIB_defined_ETXTBSY 1
+
+/* These are intentionally the same values as the WSA* error numbers, defined
+ in <winsock2.h>. */
+# define EINPROGRESS 10036
+# define EALREADY 10037
+# define ENOTSOCK 10038
+# define EDESTADDRREQ 10039
+# define EMSGSIZE 10040
+# define EPROTOTYPE 10041
+# define ENOPROTOOPT 10042
+# define EPROTONOSUPPORT 10043
+# define ESOCKTNOSUPPORT 10044 /* not required by POSIX */
+# define EOPNOTSUPP 10045
+# define EPFNOSUPPORT 10046 /* not required by POSIX */
+# define EAFNOSUPPORT 10047
+# define EADDRINUSE 10048
+# define EADDRNOTAVAIL 10049
+# define ENETDOWN 10050
+# define ENETUNREACH 10051
+# define ENETRESET 10052
+# define ECONNABORTED 10053
+# define ECONNRESET 10054
+# define ENOBUFS 10055
+# define EISCONN 10056
+# define ENOTCONN 10057
+# define ESHUTDOWN 10058 /* not required by POSIX */
+# define ETOOMANYREFS 10059 /* not required by POSIX */
+# define ETIMEDOUT 10060
+# define ECONNREFUSED 10061
+# define ELOOP 10062
+# define EHOSTDOWN 10064 /* not required by POSIX */
+# define EHOSTUNREACH 10065
+# define EPROCLIM 10067 /* not required by POSIX */
+# define EUSERS 10068 /* not required by POSIX */
+# define EDQUOT 10069
+# define ESTALE 10070
+# define EREMOTE 10071 /* not required by POSIX */
+# define GNULIB_defined_ESOCK 1
+
+# endif
+
+
+/* On OSF/1 5.1, when _XOPEN_SOURCE_EXTENDED is not defined, the macros
+ EMULTIHOP, ENOLINK, EOVERFLOW are not defined. */
+# if @EMULTIHOP_HIDDEN@
+# define EMULTIHOP @EMULTIHOP_VALUE@
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+# if @ENOLINK_HIDDEN@
+# define ENOLINK @ENOLINK_VALUE@
+# define GNULIB_defined_ENOLINK 1
+# endif
+# if @EOVERFLOW_HIDDEN@
+# define EOVERFLOW @EOVERFLOW_VALUE@
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+
+/* On OpenBSD 4.0 and on native Windows, the macros ENOMSG, EIDRM, ENOLINK,
+ EPROTO, EMULTIHOP, EBADMSG, EOVERFLOW, ENOTSUP, ECANCELED are not defined.
+ Define them here. Values >= 2000 seem safe to use: Solaris ESTALE = 151,
+ HP-UX EWOULDBLOCK = 246, IRIX EDQUOT = 1133.
+
+ Note: When one of these systems defines some of these macros some day,
+ binaries will have to be recompiled so that they recognizes the new
+ errno values from the system. */
+
+# ifndef ENOMSG
+# define ENOMSG 2000
+# define GNULIB_defined_ENOMSG 1
+# endif
+
+# ifndef EIDRM
+# define EIDRM 2001
+# define GNULIB_defined_EIDRM 1
+# endif
+
+# ifndef ENOLINK
+# define ENOLINK 2002
+# define GNULIB_defined_ENOLINK 1
+# endif
+
+# ifndef EPROTO
+# define EPROTO 2003
+# define GNULIB_defined_EPROTO 1
+# endif
+
+# ifndef EMULTIHOP
+# define EMULTIHOP 2004
+# define GNULIB_defined_EMULTIHOP 1
+# endif
+
+# ifndef EBADMSG
+# define EBADMSG 2005
+# define GNULIB_defined_EBADMSG 1
+# endif
+
+# ifndef EOVERFLOW
+# define EOVERFLOW 2006
+# define GNULIB_defined_EOVERFLOW 1
+# endif
+
+# ifndef ENOTSUP
+# define ENOTSUP 2007
+# define GNULIB_defined_ENOTSUP 1
+# endif
+
+# ifndef ESTALE
+# define ESTALE 2009
+# define GNULIB_defined_ESTALE 1
+# endif
+
+# ifndef ECANCELED
+# define ECANCELED 2008
+# define GNULIB_defined_ECANCELED 1
+# endif
+
+
+#endif /* _GL_ERRNO_H */
+#endif /* _GL_ERRNO_H */
diff --git a/gnu/error.c b/gnu/error.c
new file mode 100755
index 00000000..c79e8d42
--- /dev/null
+++ b/gnu/error.c
@@ -0,0 +1,366 @@
+/* Error handler for noninteractive utilities
+ Copyright (C) 1990-1998, 2000-2007, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by David MacKenzie <djm@gnu.ai.mit.edu>. */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include "error.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !_LIBC && ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifdef _LIBC
+# include <libintl.h>
+# include <stdbool.h>
+# include <stdint.h>
+# include <wchar.h>
+# define mbsrtowcs __mbsrtowcs
+#endif
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+unsigned int error_message_count;
+
+#ifdef _LIBC
+/* In the GNU C library, there is a predefined variable for this. */
+
+# define program_name program_invocation_name
+# include <errno.h>
+# include <limits.h>
+# include <libio/libioP.h>
+
+/* In GNU libc we want do not want to use the common name `error' directly.
+ Instead make it a weak alias. */
+extern void __error (int status, int errnum, const char *message, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+extern void __error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message,
+ ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));;
+# define error __error
+# define error_at_line __error_at_line
+
+# include <libio/iolibio.h>
+# define fflush(s) INTUSE(_IO_fflush) (s)
+# undef putc
+# define putc(c, fp) INTUSE(_IO_putc) (c, fp)
+
+# include <bits/libc-lock.h>
+
+#else /* not _LIBC */
+
+# include <fcntl.h>
+# include <unistd.h>
+
+# if !HAVE_DECL_STRERROR_R && STRERROR_R_CHAR_P
+# ifndef HAVE_DECL_STRERROR_R
+"this configure-time declaration test was not run"
+# endif
+char *strerror_r ();
+# endif
+
+/* The calling program should define program_name and set it to the
+ name of the executing program. */
+extern char *program_name;
+
+# if HAVE_STRERROR_R || defined strerror_r
+# define __strerror_r strerror_r
+# endif /* HAVE_STRERROR_R || defined strerror_r */
+#endif /* not _LIBC */
+
+static inline void
+flush_stdout (void)
+{
+#if !_LIBC && defined F_GETFL
+ int stdout_fd;
+
+# if GNULIB_FREOPEN_SAFER
+ /* Use of gnulib's freopen-safer module normally ensures that
+ fileno (stdout) == 1
+ whenever stdout is open. */
+ stdout_fd = STDOUT_FILENO;
+# else
+ /* POSIX states that fileno (stdout) after fclose is unspecified. But in
+ practice it is not a problem, because stdout is statically allocated and
+ the fd of a FILE stream is stored as a field in its allocated memory. */
+ stdout_fd = fileno (stdout);
+# endif
+ /* POSIX states that fflush (stdout) after fclose is unspecified; it
+ is safe in glibc, but not on all other platforms. fflush (NULL)
+ is always defined, but too draconian. */
+ if (0 <= stdout_fd && 0 <= fcntl (stdout_fd, F_GETFL))
+#endif
+ fflush (stdout);
+}
+
+static void
+print_errno_message (int errnum)
+{
+ char const *s;
+
+#if defined HAVE_STRERROR_R || _LIBC
+ char errbuf[1024];
+# if STRERROR_R_CHAR_P || _LIBC
+ s = __strerror_r (errnum, errbuf, sizeof errbuf);
+# else
+ if (__strerror_r (errnum, errbuf, sizeof errbuf) == 0)
+ s = errbuf;
+ else
+ s = 0;
+# endif
+#else
+ s = strerror (errnum);
+#endif
+
+#if !_LIBC
+ if (! s)
+ s = _("Unknown system error");
+#endif
+
+#if _LIBC
+ __fxprintf (NULL, ": %s", s);
+#else
+ fprintf (stderr, ": %s", s);
+#endif
+}
+
+static void
+error_tail (int status, int errnum, const char *message, va_list args)
+{
+#if _LIBC
+ if (_IO_fwide (stderr, 0) > 0)
+ {
+# define ALLOCA_LIMIT 2000
+ size_t len = strlen (message) + 1;
+ wchar_t *wmessage = NULL;
+ mbstate_t st;
+ size_t res;
+ const char *tmp;
+ bool use_malloc = false;
+
+ while (1)
+ {
+ if (__libc_use_alloca (len * sizeof (wchar_t)))
+ wmessage = (wchar_t *) alloca (len * sizeof (wchar_t));
+ else
+ {
+ if (!use_malloc)
+ wmessage = NULL;
+
+ wchar_t *p = (wchar_t *) realloc (wmessage,
+ len * sizeof (wchar_t));
+ if (p == NULL)
+ {
+ free (wmessage);
+ fputws_unlocked (L"out of memory\n", stderr);
+ return;
+ }
+ wmessage = p;
+ use_malloc = true;
+ }
+
+ memset (&st, '\0', sizeof (st));
+ tmp = message;
+
+ res = mbsrtowcs (wmessage, &tmp, len, &st);
+ if (res != len)
+ break;
+
+ if (__builtin_expect (len >= SIZE_MAX / 2, 0))
+ {
+ /* This really should not happen if everything is fine. */
+ res = (size_t) -1;
+ break;
+ }
+
+ len *= 2;
+ }
+
+ if (res == (size_t) -1)
+ {
+ /* The string cannot be converted. */
+ if (use_malloc)
+ {
+ free (wmessage);
+ use_malloc = false;
+ }
+ wmessage = (wchar_t *) L"???";
+ }
+
+ __vfwprintf (stderr, wmessage, args);
+
+ if (use_malloc)
+ free (wmessage);
+ }
+ else
+#endif
+ vfprintf (stderr, message, args);
+ va_end (args);
+
+ ++error_message_count;
+ if (errnum)
+ print_errno_message (errnum);
+#if _LIBC
+ __fxprintf (NULL, "\n");
+#else
+ putc ('\n', stderr);
+#endif
+ fflush (stderr);
+ if (status)
+ exit (status);
+}
+
+
+/* Print the program name and error message MESSAGE, which is a printf-style
+ format string with optional args.
+ If ERRNUM is nonzero, print its corresponding system error message.
+ Exit with status STATUS if it is nonzero. */
+void
+error (int status, int errnum, const char *message, ...)
+{
+ va_list args;
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ flush_stdout ();
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s: ", program_name);
+#else
+ fprintf (stderr, "%s: ", program_name);
+#endif
+ }
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+int error_one_per_line;
+
+void
+error_at_line (int status, int errnum, const char *file_name,
+ unsigned int line_number, const char *message, ...)
+{
+ va_list args;
+
+ if (error_one_per_line)
+ {
+ static const char *old_file_name;
+ static unsigned int old_line_number;
+
+ if (old_line_number == line_number
+ && (file_name == old_file_name
+ || strcmp (old_file_name, file_name) == 0))
+ /* Simply return and print nothing. */
+ return;
+
+ old_file_name = file_name;
+ old_line_number = line_number;
+ }
+
+#if defined _LIBC && defined __libc_ptf_call
+ /* We do not want this call to be cut short by a thread
+ cancellation. Therefore disable cancellation for now. */
+ int state = PTHREAD_CANCEL_ENABLE;
+ __libc_ptf_call (pthread_setcancelstate, (PTHREAD_CANCEL_DISABLE, &state),
+ 0);
+#endif
+
+ flush_stdout ();
+#ifdef _LIBC
+ _IO_flockfile (stderr);
+#endif
+ if (error_print_progname)
+ (*error_print_progname) ();
+ else
+ {
+#if _LIBC
+ __fxprintf (NULL, "%s:", program_name);
+#else
+ fprintf (stderr, "%s:", program_name);
+#endif
+ }
+
+#if _LIBC
+ __fxprintf (NULL, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#else
+ fprintf (stderr, file_name != NULL ? "%s:%d: " : " ",
+ file_name, line_number);
+#endif
+
+ va_start (args, message);
+ error_tail (status, errnum, message, args);
+
+#ifdef _LIBC
+ _IO_funlockfile (stderr);
+# ifdef __libc_ptf_call
+ __libc_ptf_call (pthread_setcancelstate, (state, NULL), 0);
+# endif
+#endif
+}
+
+#ifdef _LIBC
+/* Make the weak alias. */
+# undef error
+# undef error_at_line
+weak_alias (__error, error)
+weak_alias (__error_at_line, error_at_line)
+#endif
diff --git a/gnu/error.h b/gnu/error.h
new file mode 100755
index 00000000..9deef02d
--- /dev/null
+++ b/gnu/error.h
@@ -0,0 +1,65 @@
+/* Declaration for error-reporting function
+ Copyright (C) 1995, 1996, 1997, 2003, 2006, 2008, 2009, 2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _ERROR_H
+#define _ERROR_H 1
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with `fprintf (stderr, FORMAT, ...)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'. */
+
+extern void error (int __status, int __errnum, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+
+extern void error_at_line (int __status, int __errnum, const char *__fname,
+ unsigned int __lineno, const char *__format, ...)
+ __attribute__ ((__format__ (__printf__, 5, 6)));
+
+/* If NULL, error will flush stdout, then print on stderr the program
+ name, a colon and a space. Otherwise, error will call this
+ function without parameters instead. */
+extern void (*error_print_progname) (void);
+
+/* This variable is incremented each time `error' is called. */
+extern unsigned int error_message_count;
+
+/* Sometimes we want to have at most one error per line. This
+ variable controls whether this mode is selected or not. */
+extern int error_one_per_line;
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* error.h */
diff --git a/gnu/execute.c b/gnu/execute.c
new file mode 100755
index 00000000..79193289
--- /dev/null
+++ b/gnu/execute.c
@@ -0,0 +1,278 @@
+/* Creation of autonomous subprocesses.
+ Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#include "execute.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "error.h"
+#include "fatal-signal.h"
+#include "wait-process.h"
+#include "gettext.h"
+
+#define _(str) gettext (str)
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Woe32 API. */
+# include <process.h>
+# include "w32spawn.h"
+
+#else
+
+/* Unix API. */
+# include <spawn.h>
+
+#endif
+
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+#undef open
+#undef close
+
+
+#ifdef EINTR
+
+/* EINTR handling for close(), open().
+ These functions can return -1/EINTR even though we don't have any
+ signal handlers set up, namely when we get interrupted via SIGSTOP. */
+
+static inline int
+nonintr_close (int fd)
+{
+ int retval;
+
+ do
+ retval = close (fd);
+ while (retval < 0 && errno == EINTR);
+
+ return retval;
+}
+#define close nonintr_close
+
+static inline int
+nonintr_open (const char *pathname, int oflag, mode_t mode)
+{
+ int retval;
+
+ do
+ retval = open (pathname, oflag, mode);
+ while (retval < 0 && errno == EINTR);
+
+ return retval;
+}
+#undef open /* avoid warning on VMS */
+#define open nonintr_open
+
+#endif
+
+
+/* Execute a command, optionally redirecting any of the three standard file
+ descriptors to /dev/null. Return its exit code.
+ If it didn't terminate correctly, exit if exit_on_error is true, otherwise
+ return 127.
+ If slave_process is true, the child process will be terminated when its
+ creator receives a catchable fatal signal. */
+int
+execute (const char *progname,
+ const char *prog_path, char **prog_argv,
+ bool ignore_sigpipe,
+ bool null_stdin, bool null_stdout, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int *termsigp)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+ /* Native Woe32 API. */
+ int orig_stdin;
+ int orig_stdout;
+ int orig_stderr;
+ int exitcode;
+ int nullinfd;
+ int nulloutfd;
+
+ /* FIXME: Need to free memory allocated by prepare_spawn. */
+ prog_argv = prepare_spawn (prog_argv);
+
+ /* Save standard file handles of parent process. */
+ if (null_stdin)
+ orig_stdin = dup_safer_noinherit (STDIN_FILENO);
+ if (null_stdout)
+ orig_stdout = dup_safer_noinherit (STDOUT_FILENO);
+ if (null_stderr)
+ orig_stderr = dup_safer_noinherit (STDERR_FILENO);
+ exitcode = -1;
+
+ /* Create standard file handles of child process. */
+ nullinfd = -1;
+ nulloutfd = -1;
+ if ((!null_stdin
+ || ((nullinfd = open ("NUL", O_RDONLY, 0)) >= 0
+ && (nullinfd == STDIN_FILENO
+ || (dup2 (nullinfd, STDIN_FILENO) >= 0
+ && close (nullinfd) >= 0))))
+ && (!(null_stdout || null_stderr)
+ || ((nulloutfd = open ("NUL", O_RDWR, 0)) >= 0
+ && (!null_stdout
+ || nulloutfd == STDOUT_FILENO
+ || dup2 (nulloutfd, STDOUT_FILENO) >= 0)
+ && (!null_stderr
+ || nulloutfd == STDERR_FILENO
+ || dup2 (nulloutfd, STDERR_FILENO) >= 0)
+ && ((null_stdout && nulloutfd == STDOUT_FILENO)
+ || (null_stderr && nulloutfd == STDERR_FILENO)
+ || close (nulloutfd) >= 0))))
+ /* Use spawnvpe and pass the environment explicitly. This is needed if
+ the program has modified the environment using putenv() or [un]setenv().
+ On Windows, programs have two environments, one in the "environment
+ block" of the process and managed through SetEnvironmentVariable(), and
+ one inside the process, in the location retrieved by the 'environ'
+ macro. When using spawnvp() without 'e', the child process inherits a
+ copy of the environment block - ignoring the effects of putenv() and
+ [un]setenv(). */
+ {
+ exitcode = spawnvpe (P_WAIT, prog_path, (const char **) prog_argv,
+ (const char **) environ);
+ if (exitcode < 0 && errno == ENOEXEC)
+ {
+ /* prog is not an native executable. Try to execute it as a
+ shell script. Note that prepare_spawn() has already prepended
+ a hidden element "sh.exe" to prog_argv. */
+ --prog_argv;
+ exitcode = spawnvpe (P_WAIT, prog_argv[0], (const char **) prog_argv,
+ (const char **) environ);
+ }
+ }
+ if (nulloutfd >= 0)
+ close (nulloutfd);
+ if (nullinfd >= 0)
+ close (nullinfd);
+
+ /* Restore standard file handles of parent process. */
+ if (null_stderr)
+ undup_safer_noinherit (orig_stderr, STDERR_FILENO);
+ if (null_stdout)
+ undup_safer_noinherit (orig_stdout, STDOUT_FILENO);
+ if (null_stdin)
+ undup_safer_noinherit (orig_stdin, STDIN_FILENO);
+
+ if (termsigp != NULL)
+ *termsigp = 0;
+
+ if (exitcode == -1)
+ {
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, errno,
+ _("%s subprocess failed"), progname);
+ return 127;
+ }
+
+ return exitcode;
+
+#else
+
+ /* Unix API. */
+ /* Note about 127: Some errors during posix_spawnp() cause the function
+ posix_spawnp() to return an error code; some other errors cause the
+ subprocess to exit with return code 127. It is implementation
+ dependent which error is reported which way. We treat both cases as
+ equivalent. */
+ sigset_t blocked_signals;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+
+ if (slave_process)
+ {
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ block_fatal_signals ();
+ }
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (null_stdin
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDIN_FILENO,
+ "/dev/null", O_RDONLY,
+ 0))
+ != 0)
+ || (null_stdout
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDOUT_FILENO,
+ "/dev/null", O_RDWR,
+ 0))
+ != 0)
+ || (null_stderr
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDERR_FILENO,
+ "/dev/null", O_RDWR,
+ 0))
+ != 0)
+ || (slave_process
+ && ((err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs,
+ &blocked_signals))
+ != 0
+ || (err = posix_spawnattr_setflags (&attrs,
+ POSIX_SPAWN_SETSIGMASK))
+ != 0)))
+ || (err = posix_spawnp (&child, prog_path, &actions,
+ attrs_allocated ? &attrs : NULL, prog_argv,
+ environ))
+ != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ if (slave_process)
+ unblock_fatal_signals ();
+ if (termsigp != NULL)
+ *termsigp = 0;
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, err,
+ _("%s subprocess failed"), progname);
+ return 127;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ if (slave_process)
+ {
+ register_slave_subprocess (child);
+ unblock_fatal_signals ();
+ }
+
+ return wait_subprocess (child, progname, ignore_sigpipe, null_stderr,
+ slave_process, exit_on_error, termsigp);
+
+#endif
+}
diff --git a/gnu/execute.h b/gnu/execute.h
new file mode 100755
index 00000000..b99f0cee
--- /dev/null
+++ b/gnu/execute.h
@@ -0,0 +1,44 @@
+/* Creation of autonomous subprocesses.
+ Copyright (C) 2001-2003, 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _EXECUTE_H
+#define _EXECUTE_H
+
+#include <stdbool.h>
+
+/* Execute a command, optionally redirecting any of the three standard file
+ descriptors to /dev/null. Return its exit code.
+ If it didn't terminate correctly, exit if exit_on_error is true, otherwise
+ return 127.
+ If ignore_sigpipe is true, consider a subprocess termination due to SIGPIPE
+ as equivalent to a success. This is suitable for processes whose only
+ purpose is to write to standard output.
+ If slave_process is true, the child process will be terminated when its
+ creator receives a catchable fatal signal.
+ If termsigp is not NULL, *termsig will be set to the signal that terminated
+ the subprocess (if supported by the platform: not on native Windows
+ platforms), otherwise 0.
+ It is recommended that no signal is blocked or ignored while execute()
+ is called. See pipe.h for the reason. */
+extern int execute (const char *progname,
+ const char *prog_path, char **prog_argv,
+ bool ignore_sigpipe,
+ bool null_stdin, bool null_stdout, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int *termsigp);
+
+#endif /* _EXECUTE_H */
diff --git a/gnu/exitfail.c b/gnu/exitfail.c
new file mode 100755
index 00000000..3b63f8a1
--- /dev/null
+++ b/gnu/exitfail.c
@@ -0,0 +1,25 @@
+/* Failure exit status
+
+ Copyright (C) 2002, 2003, 2005, 2006, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "exitfail.h"
+
+#include <stdlib.h>
+
+int volatile exit_failure = EXIT_FAILURE;
diff --git a/gnu/exitfail.h b/gnu/exitfail.h
new file mode 100755
index 00000000..7ffffe5c
--- /dev/null
+++ b/gnu/exitfail.h
@@ -0,0 +1,18 @@
+/* Failure exit status
+
+ 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+extern int volatile exit_failure;
diff --git a/gnu/fatal-signal.c b/gnu/fatal-signal.c
new file mode 100755
index 00000000..4c612635
--- /dev/null
+++ b/gnu/fatal-signal.c
@@ -0,0 +1,286 @@
+/* Emergency actions in case of a fatal signal.
+ Copyright (C) 2003-2004, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#include "fatal-signal.h"
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "sig-handler.h"
+#include "xalloc.h"
+
+#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+
+/* ========================================================================= */
+
+
+/* The list of fatal signals.
+ These are those signals whose default action is to terminate the process
+ without a core dump, except
+ SIGKILL - because it cannot be caught,
+ SIGALRM SIGUSR1 SIGUSR2 SIGPOLL SIGIO SIGLOST - because applications
+ often use them for their own purpose,
+ SIGPROF SIGVTALRM - because they are used for profiling,
+ SIGSTKFLT - because it is more similar to SIGFPE, SIGSEGV, SIGBUS,
+ SIGSYS - because it is more similar to SIGABRT, SIGSEGV,
+ SIGPWR - because it of too special use,
+ SIGRTMIN...SIGRTMAX - because they are reserved for application use.
+ plus
+ SIGXCPU, SIGXFSZ - because they are quite similar to SIGTERM. */
+
+static int fatal_signals[] =
+ {
+ /* ISO C 99 signals. */
+#ifdef SIGINT
+ SIGINT,
+#endif
+#ifdef SIGTERM
+ SIGTERM,
+#endif
+ /* POSIX:2001 signals. */
+#ifdef SIGHUP
+ SIGHUP,
+#endif
+#ifdef SIGPIPE
+ SIGPIPE,
+#endif
+ /* BSD signals. */
+#ifdef SIGXCPU
+ SIGXCPU,
+#endif
+#ifdef SIGXFSZ
+ SIGXFSZ,
+#endif
+ /* Woe32 signals. */
+#ifdef SIGBREAK
+ SIGBREAK,
+#endif
+ 0
+ };
+
+#define num_fatal_signals (SIZEOF (fatal_signals) - 1)
+
+/* Eliminate signals whose signal handler is SIG_IGN. */
+
+static void
+init_fatal_signals (void)
+{
+ static bool fatal_signals_initialized = false;
+ if (!fatal_signals_initialized)
+ {
+ size_t i;
+
+ for (i = 0; i < num_fatal_signals; i++)
+ {
+ struct sigaction action;
+
+ if (sigaction (fatal_signals[i], NULL, &action) >= 0
+ && get_handler (&action) == SIG_IGN)
+ fatal_signals[i] = -1;
+ }
+
+ fatal_signals_initialized = true;
+ }
+}
+
+
+/* ========================================================================= */
+
+
+typedef void (*action_t) (void);
+
+/* Type of an entry in the actions array.
+ The 'action' field is accessed from within the fatal_signal_handler(),
+ therefore we mark it as 'volatile'. */
+typedef struct
+{
+ volatile action_t action;
+}
+actions_entry_t;
+
+/* The registered cleanup actions. */
+static actions_entry_t static_actions[32];
+static actions_entry_t * volatile actions = static_actions;
+static sig_atomic_t volatile actions_count = 0;
+static size_t actions_allocated = SIZEOF (static_actions);
+
+
+/* The saved signal handlers.
+ Size 32 would not be sufficient: On HP-UX, SIGXCPU = 33, SIGXFSZ = 34. */
+static struct sigaction saved_sigactions[64];
+
+
+/* Uninstall the handlers. */
+static inline void
+uninstall_handlers ()
+{
+ size_t i;
+
+ for (i = 0; i < num_fatal_signals; i++)
+ if (fatal_signals[i] >= 0)
+ {
+ int sig = fatal_signals[i];
+ if (saved_sigactions[sig].sa_handler == SIG_IGN)
+ saved_sigactions[sig].sa_handler = SIG_DFL;
+ sigaction (sig, &saved_sigactions[sig], NULL);
+ }
+}
+
+
+/* The signal handler. It gets called asynchronously. */
+static void
+fatal_signal_handler (int sig)
+{
+ for (;;)
+ {
+ /* Get the last registered cleanup action, in a reentrant way. */
+ action_t action;
+ size_t n = actions_count;
+ if (n == 0)
+ break;
+ n--;
+ actions_count = n;
+ action = actions[n].action;
+ /* Execute the action. */
+ action ();
+ }
+
+ /* Now execute the signal's default action.
+ If the signal being delivered was blocked, the re-raised signal would be
+ delivered when this handler returns. But the way we install this handler,
+ no signal is blocked, and the re-raised signal is delivered already
+ during raise(). */
+ uninstall_handlers ();
+ raise (sig);
+}
+
+
+/* Install the handlers. */
+static inline void
+install_handlers ()
+{
+ size_t i;
+ struct sigaction action;
+
+ action.sa_handler = &fatal_signal_handler;
+ /* If we get a fatal signal while executing fatal_signal_handler, enter
+ fatal_signal_handler recursively, since it is reentrant. Hence no
+ SA_RESETHAND. */
+ action.sa_flags = SA_NODEFER;
+ sigemptyset (&action.sa_mask);
+ for (i = 0; i < num_fatal_signals; i++)
+ if (fatal_signals[i] >= 0)
+ {
+ int sig = fatal_signals[i];
+
+ if (!(sig < sizeof (saved_sigactions) / sizeof (saved_sigactions[0])))
+ abort ();
+ sigaction (sig, &action, &saved_sigactions[sig]);
+ }
+}
+
+
+/* Register a cleanup function to be executed when a catchable fatal signal
+ occurs. */
+void
+at_fatal_signal (action_t action)
+{
+ static bool cleanup_initialized = false;
+ if (!cleanup_initialized)
+ {
+ init_fatal_signals ();
+ install_handlers ();
+ cleanup_initialized = true;
+ }
+
+ if (actions_count == actions_allocated)
+ {
+ /* Extend the actions array. Note that we cannot use xrealloc(),
+ because then the cleanup() function could access an already
+ deallocated array. */
+ actions_entry_t *old_actions = actions;
+ size_t old_actions_allocated = actions_allocated;
+ size_t new_actions_allocated = 2 * actions_allocated;
+ actions_entry_t *new_actions =
+ XNMALLOC (new_actions_allocated, actions_entry_t);
+ size_t k;
+
+ /* Don't use memcpy() here, because memcpy takes non-volatile arguments
+ and is therefore not guaranteed to complete all memory stores before
+ the next statement. */
+ for (k = 0; k < old_actions_allocated; k++)
+ new_actions[k] = old_actions[k];
+ actions = new_actions;
+ actions_allocated = new_actions_allocated;
+ /* Now we can free the old actions array. */
+ if (old_actions != static_actions)
+ free (old_actions);
+ }
+ /* The two uses of 'volatile' in the types above (and ISO C 99 section
+ 5.1.2.3.(5)) ensure that we increment the actions_count only after
+ the new action has been written to the memory location
+ actions[actions_count]. */
+ actions[actions_count].action = action;
+ actions_count++;
+}
+
+
+/* ========================================================================= */
+
+
+static sigset_t fatal_signal_set;
+
+static void
+init_fatal_signal_set ()
+{
+ static bool fatal_signal_set_initialized = false;
+ if (!fatal_signal_set_initialized)
+ {
+ size_t i;
+
+ init_fatal_signals ();
+
+ sigemptyset (&fatal_signal_set);
+ for (i = 0; i < num_fatal_signals; i++)
+ if (fatal_signals[i] >= 0)
+ sigaddset (&fatal_signal_set, fatal_signals[i]);
+
+ fatal_signal_set_initialized = true;
+ }
+}
+
+/* Temporarily delay the catchable fatal signals. */
+void
+block_fatal_signals ()
+{
+ init_fatal_signal_set ();
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+}
+
+/* Stop delaying the catchable fatal signals. */
+void
+unblock_fatal_signals ()
+{
+ init_fatal_signal_set ();
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+}
diff --git a/gnu/fatal-signal.h b/gnu/fatal-signal.h
new file mode 100755
index 00000000..133eced5
--- /dev/null
+++ b/gnu/fatal-signal.h
@@ -0,0 +1,76 @@
+/* Emergency actions in case of a fatal signal.
+ Copyright (C) 2003-2004, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* It is often useful to do some cleanup action when a usually fatal signal
+ terminates the process, like removing a temporary file or killing a
+ subprocess that may be stuck waiting for a device, pipe or network input.
+ Such signals are SIGHUP, SIGINT, SIGPIPE, SIGTERM, and possibly others.
+ The limitation of this facility is that it cannot work for SIGKILL.
+
+ Signals with a SIG_IGN handler are considered to be non-fatal. The
+ functions in this file assume that when a SIG_IGN handler is installed
+ for a signal, it was installed before any functions in this file were
+ called and it stays so for the whole lifetime of the process. */
+
+/* Register a cleanup function to be executed when a catchable fatal signal
+ occurs.
+
+ Restrictions for the cleanup function:
+ - The cleanup function can do all kinds of system calls.
+ - It can also access application dependent memory locations and data
+ structures provided they are in a consistent state. One way to ensure
+ this is through block_fatal_signals()/unblock_fatal_signals(), see
+ below. Another - more tricky - way to ensure this is the careful use
+ of 'volatile'.
+ However,
+ - malloc() and similarly complex facilities are not safe to be called
+ because they are not guaranteed to be in a consistent state.
+ - Also, the cleanup function must not block the catchable fatal signals
+ and leave them blocked upon return.
+
+ The cleanup function is executed asynchronously. It is unspecified
+ whether during its execution the catchable fatal signals are blocked
+ or not. */
+extern void at_fatal_signal (void (*function) (void));
+
+
+/* Sometimes it is necessary to block the usually fatal signals while the
+ data structures being accessed by the cleanup action are being built or
+ reorganized. This is the case, for example, when a temporary file or
+ directory is created through mkstemp() or mkdtemp(), because these
+ functions create the temporary file or directory _before_ returning its
+ name to the application. */
+
+/* Temporarily delay the catchable fatal signals.
+ The signals will be blocked (= delayed) until the next call to
+ unblock_fatal_signals(). If the signals are already blocked, a further
+ call to block_fatal_signals() has no effect. */
+extern void block_fatal_signals (void);
+
+/* Stop delaying the catchable fatal signals. */
+extern void unblock_fatal_signals (void);
+
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnu/fcntl.c b/gnu/fcntl.c
new file mode 100755
index 00000000..c51e8ded
--- /dev/null
+++ b/gnu/fcntl.c
@@ -0,0 +1,294 @@
+/* Provide file descriptor control.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <unistd.h>
+
+#if !HAVE_FCNTL
+# define rpl_fcntl fcntl
+#endif
+#undef fcntl
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* Upper bound on getdtablesize(). See lib/getdtablesize.c. */
+# define OPEN_MAX_MAX 0x10000
+
+/* Duplicate OLDFD into the first available slot of at least NEWFD,
+ which must be positive, with FLAGS determining whether the duplicate
+ will be inheritable. */
+static int
+dupfd (int oldfd, int newfd, int flags)
+{
+ /* Mingw has no way to create an arbitrary fd. Iterate until all
+ file descriptors less than newfd are filled up. */
+ HANDLE curr_process = GetCurrentProcess ();
+ HANDLE old_handle = (HANDLE) _get_osfhandle (oldfd);
+ unsigned char fds_to_close[OPEN_MAX_MAX / CHAR_BIT];
+ unsigned int fds_to_close_bound = 0;
+ int result;
+ BOOL inherit = flags & O_CLOEXEC ? FALSE : TRUE;
+ int mode;
+
+ if (newfd < 0 || getdtablesize () <= newfd)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ if (old_handle == INVALID_HANDLE_VALUE
+ || (mode = setmode (oldfd, O_BINARY)) == -1)
+ {
+ /* oldfd is not open, or is an unassigned standard file
+ descriptor. */
+ errno = EBADF;
+ return -1;
+ }
+ setmode (oldfd, mode);
+ flags |= mode;
+
+ for (;;)
+ {
+ HANDLE new_handle;
+ int duplicated_fd;
+ unsigned int index;
+
+ if (!DuplicateHandle (curr_process, /* SourceProcessHandle */
+ old_handle, /* SourceHandle */
+ curr_process, /* TargetProcessHandle */
+ (PHANDLE) &new_handle, /* TargetHandle */
+ (DWORD) 0, /* DesiredAccess */
+ inherit, /* InheritHandle */
+ DUPLICATE_SAME_ACCESS)) /* Options */
+ {
+ /* TODO: Translate GetLastError () into errno. */
+ errno = EMFILE;
+ result = -1;
+ break;
+ }
+ duplicated_fd = _open_osfhandle ((long) new_handle, flags);
+ if (duplicated_fd < 0)
+ {
+ CloseHandle (new_handle);
+ errno = EMFILE;
+ result = -1;
+ break;
+ }
+ if (newfd <= duplicated_fd)
+ {
+ result = duplicated_fd;
+ break;
+ }
+
+ /* Set the bit duplicated_fd in fds_to_close[]. */
+ index = (unsigned int) duplicated_fd / CHAR_BIT;
+ if (fds_to_close_bound <= index)
+ {
+ if (sizeof fds_to_close <= index)
+ /* Need to increase OPEN_MAX_MAX. */
+ abort ();
+ memset (fds_to_close + fds_to_close_bound, '\0',
+ index + 1 - fds_to_close_bound);
+ fds_to_close_bound = index + 1;
+ }
+ fds_to_close[index] |= 1 << ((unsigned int) duplicated_fd % CHAR_BIT);
+ }
+
+ /* Close the previous fds that turned out to be too small. */
+ {
+ int saved_errno = errno;
+ unsigned int duplicated_fd;
+
+ for (duplicated_fd = 0;
+ duplicated_fd < fds_to_close_bound * CHAR_BIT;
+ duplicated_fd++)
+ if ((fds_to_close[duplicated_fd / CHAR_BIT]
+ >> (duplicated_fd % CHAR_BIT))
+ & 1)
+ close (duplicated_fd);
+
+ errno = saved_errno;
+ }
+
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (oldfd, result);
+# endif
+ return result;
+}
+#endif /* W32 */
+
+/* Perform the specified ACTION on the file descriptor FD, possibly
+ using the argument ARG further described below. This replacement
+ handles the following actions, and forwards all others on to the
+ native fcntl. An unrecognized ACTION returns -1 with errno set to
+ EINVAL.
+
+ F_DUPFD - duplicate FD, with int ARG being the minimum target fd.
+ If successful, return the duplicate, which will be inheritable;
+ otherwise return -1 and set errno.
+
+ F_DUPFD_CLOEXEC - duplicate FD, with int ARG being the minimum
+ target fd. If successful, return the duplicate, which will not be
+ inheritable; otherwise return -1 and set errno.
+
+ F_GETFD - ARG need not be present. If successful, return a
+ non-negative value containing the descriptor flags of FD (only
+ FD_CLOEXEC is portable, but other flags may be present); otherwise
+ return -1 and set errno. */
+
+int
+rpl_fcntl (int fd, int action, /* arg */...)
+{
+ va_list arg;
+ int result = -1;
+ va_start (arg, action);
+ switch (action)
+ {
+
+#if !HAVE_FCNTL
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ result = dupfd (fd, target, 0);
+ break;
+ }
+#elif FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR
+ case F_DUPFD:
+ {
+ int target = va_arg (arg, int);
+ /* Detect invalid target; needed for cygwin 1.5.x. */
+ if (target < 0 || getdtablesize () <= target)
+ errno = EINVAL;
+ else
+ {
+ result = fcntl (fd, action, target);
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ break;
+ } /* F_DUPFD */
+#endif /* FCNTL_DUPFD_BUGGY || REPLACE_FCHDIR */
+
+ case F_DUPFD_CLOEXEC:
+ {
+ int target = va_arg (arg, int);
+
+#if !HAVE_FCNTL
+ result = dupfd (fd, target, O_CLOEXEC);
+ break;
+#else /* HAVE_FCNTL */
+ /* Try the system call first, if the headers claim it exists
+ (that is, if GNULIB_defined_F_DUPFD_CLOEXEC is 0), since we
+ may be running with a glibc that has the macro but with an
+ older kernel that does not support it. Cache the
+ information on whether the system call really works, but
+ avoid caching failure if the corresponding F_DUPFD fails
+ for any reason. 0 = unknown, 1 = yes, -1 = no. */
+ static int have_dupfd_cloexec = GNULIB_defined_F_DUPFD_CLOEXEC ? -1 : 0;
+ if (0 <= have_dupfd_cloexec)
+ {
+ result = fcntl (fd, action, target);
+ if (0 <= result || errno != EINVAL)
+ {
+ have_dupfd_cloexec = 1;
+# if REPLACE_FCHDIR
+ if (0 <= result)
+ result = _gl_register_dup (fd, result);
+# endif
+ }
+ else
+ {
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (result < 0)
+ break;
+ have_dupfd_cloexec = -1;
+ }
+ }
+ else
+ result = rpl_fcntl (fd, F_DUPFD, target);
+ if (0 <= result && have_dupfd_cloexec == -1)
+ {
+ int flags = fcntl (result, F_GETFD);
+ if (flags < 0 || fcntl (result, F_SETFD, flags | FD_CLOEXEC) == -1)
+ {
+ int saved_errno = errno;
+ close (result);
+ errno = saved_errno;
+ result = -1;
+ }
+ }
+ break;
+#endif /* HAVE_FCNTL */
+ } /* F_DUPFD_CLOEXEC */
+
+#if !HAVE_FCNTL
+ case F_GETFD:
+ {
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ HANDLE handle = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (handle == INVALID_HANDLE_VALUE
+ || GetHandleInformation (handle, &flags) == 0)
+ errno = EBADF;
+ else
+ result = (flags & HANDLE_FLAG_INHERIT) ? 0 : FD_CLOEXEC;
+# else /* !W32 */
+ /* Use dup2 to reject invalid file descriptors. No way to
+ access this information, so punt. */
+ if (0 <= dup2 (fd, fd))
+ result = 0;
+# endif /* !W32 */
+ break;
+ } /* F_GETFD */
+#endif /* !HAVE_FCNTL */
+
+ /* Implementing F_SETFD on mingw is not trivial - there is no
+ API for changing the O_NOINHERIT bit on an fd, and merely
+ changing the HANDLE_FLAG_INHERIT bit on the underlying handle
+ can lead to odd state. It may be possible by duplicating the
+ handle, using _open_osfhandle with the right flags, then
+ using dup2 to move the duplicate onto the original, but that
+ is not supported for now. */
+
+ default:
+ {
+#if HAVE_FCNTL
+ void *p = va_arg (arg, void *);
+ result = fcntl (fd, action, p);
+#else
+ errno = EINVAL;
+#endif
+ break;
+ }
+ }
+ va_end (arg);
+ return result;
+}
diff --git a/gnu/fcntl.in.h b/gnu/fcntl.in.h
new file mode 100755
index 00000000..a1d9e230
--- /dev/null
+++ b/gnu/fcntl.in.h
@@ -0,0 +1,258 @@
+/* Like <fcntl.h>, but with non-working flags defined to 0.
+
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Paul Eggert */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_system_fcntl_h
+/* Special invocation convention. */
+
+#include <sys/types.h>
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+# include <sys/stat.h>
+#endif
+#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_FCNTL_H
+
+#include <sys/types.h>
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+# include <sys/stat.h>
+#endif
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_FCNTL_H@
+
+#ifndef _GL_FCNTL_H
+#define _GL_FCNTL_H
+
+#ifndef __GLIBC__ /* Avoid namespace pollution on glibc systems. */
+# include <unistd.h>
+#endif
+
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Declare overridden functions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_FCNTL@
+# if @REPLACE_FCNTL@
+# undef fcntl
+# define fcntl rpl_fcntl
+# endif
+# if !@HAVE_FCNTL@ || @REPLACE_FCNTL@
+extern int fcntl (int fd, int action, ...);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fcntl
+# if HAVE_RAW_DECL_FCNTL
+_GL_WARN_ON_USE (fcntl, "fcntl is not always POSIX compliant - "
+ "use gnulib module fcntl for portability");
+# endif
+#endif
+
+#if @GNULIB_OPEN@
+# if @REPLACE_OPEN@
+# undef open
+# define open rpl_open
+extern int open (const char *filename, int flags, ...) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef open
+/* Assume open is always declared. */
+_GL_WARN_ON_USE (open, "open is not always POSIX compliant - "
+ "use gnulib module open for portability");
+#endif
+
+#if @GNULIB_OPENAT@
+# if @REPLACE_OPENAT@
+# undef openat
+# define openat rpl_openat
+# endif
+# if !@HAVE_OPENAT@ || @REPLACE_OPENAT@
+extern int openat (int fd, char const *file, int flags, /* mode_t mode */ ...)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef openat
+# if HAVE_RAW_DECL_OPENAT
+_GL_WARN_ON_USE (openat, "openat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Fix up the FD_* macros, only known to be missing on mingw. */
+
+#ifndef FD_CLOEXEC
+# define FD_CLOEXEC 1
+#endif
+
+/* Fix up the supported F_* macros. Intentionally leave other F_*
+ macros undefined. Only known to be missing on mingw. */
+
+#ifndef F_DUPFD_CLOEXEC
+# define F_DUPFD_CLOEXEC 0x40000000
+/* Witness variable: 1 if gnulib defined F_DUPFD_CLOEXEC, 0 otherwise. */
+# define GNULIB_defined_F_DUPFD_CLOEXEC 1
+#else
+# define GNULIB_defined_F_DUPFD_CLOEXEC 0
+#endif
+
+#ifndef F_DUPFD
+# define F_DUPFD 1
+#endif
+
+#ifndef F_GETFD
+# define F_GETFD 2
+#endif
+
+/* Fix up the O_* macros. */
+
+#if !defined O_DIRECT && defined O_DIRECTIO
+/* Tru64 spells it `O_DIRECTIO'. */
+# define O_DIRECT O_DIRECTIO
+#endif
+
+#if !defined O_CLOEXEC && defined O_NOINHERIT
+/* Mingw spells it `O_NOINHERIT'. Intentionally leave it
+ undefined if not available. */
+# define O_CLOEXEC O_NOINHERIT
+#endif
+
+#ifndef O_DIRECT
+# define O_DIRECT 0
+#endif
+
+#ifndef O_DIRECTORY
+# define O_DIRECTORY 0
+#endif
+
+#ifndef O_DSYNC
+# define O_DSYNC 0
+#endif
+
+#ifndef O_NDELAY
+# define O_NDELAY 0
+#endif
+
+#ifndef O_NOATIME
+# define O_NOATIME 0
+#endif
+
+#ifndef O_NONBLOCK
+# define O_NONBLOCK O_NDELAY
+#endif
+
+#ifndef O_NOCTTY
+# define O_NOCTTY 0
+#endif
+
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
+#ifndef O_NOLINKS
+# define O_NOLINKS 0
+#endif
+
+#ifndef O_RSYNC
+# define O_RSYNC 0
+#endif
+
+#ifndef O_SYNC
+# define O_SYNC 0
+#endif
+
+#ifndef O_TTY_INIT
+# define O_TTY_INIT 0
+#endif
+
+/* For systems that distinguish between text and binary I/O.
+ O_BINARY is usually declared in fcntl.h */
+#if !defined O_BINARY && defined _O_BINARY
+ /* For MSC-compatible compilers. */
+# define O_BINARY _O_BINARY
+# define O_TEXT _O_TEXT
+#endif
+
+#if defined __BEOS__ || defined __HAIKU__
+ /* BeOS 5 and Haiku have O_BINARY and O_TEXT, but they have no effect. */
+# undef O_BINARY
+# undef O_TEXT
+#endif
+
+#ifndef O_BINARY
+# define O_BINARY 0
+# define O_TEXT 0
+#endif
+
+/* Fix up the AT_* macros. */
+
+/* Work around a bug in Solaris 9 and 10: AT_FDCWD is positive. Its
+ value exceeds INT_MAX, so its use as an int doesn't conform to the
+ C standard, and GCC and Sun C complain in some cases. If the bug
+ is present, undef AT_FDCWD here, so it can be redefined below. */
+#if 0 < AT_FDCWD && AT_FDCWD == 0xffd19553
+# undef AT_FDCWD
+#endif
+
+/* Use the same bit pattern as Solaris 9, but with the proper
+ signedness. The bit pattern is important, in case this actually is
+ Solaris with the above workaround. */
+#ifndef AT_FDCWD
+# define AT_FDCWD (-3041965)
+#endif
+
+/* Use the same values as Solaris 9. This shouldn't matter, but
+ there's no real reason to differ. */
+#ifndef AT_SYMLINK_NOFOLLOW
+# define AT_SYMLINK_NOFOLLOW 4096
+#endif
+
+#ifndef AT_REMOVEDIR
+# define AT_REMOVEDIR 1
+#endif
+
+/* Solaris 9 lacks these two, so just pick unique values. */
+#ifndef AT_SYMLINK_FOLLOW
+# define AT_SYMLINK_FOLLOW 2
+#endif
+
+#ifndef AT_EACCESS
+# define AT_EACCESS 4
+#endif
+
+
+#endif /* _GL_FCNTL_H */
+#endif /* _GL_FCNTL_H */
+#endif
diff --git a/gnu/fd-safer-flag.c b/gnu/fd-safer-flag.c
new file mode 100755
index 00000000..0e3019b8
--- /dev/null
+++ b/gnu/fd-safer-flag.c
@@ -0,0 +1,52 @@
+/* Adjust a file descriptor result so that it avoids clobbering
+ STD{IN,OUT,ERR}_FILENO, with specific flags.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Return FD, unless FD would be a copy of standard input, output, or
+ error; in that case, return a duplicate of FD, closing FD. If FLAG
+ contains O_CLOEXEC, the returned FD will have close-on-exec
+ semantics. On failure to duplicate, close FD, set errno, and
+ return -1. Preserve errno if FD is negative, so that the caller
+ can always inspect errno when the returned value is negative.
+
+ This function is usefully wrapped around functions that return file
+ descriptors, e.g., fd_safer_flag (open ("file", O_RDONLY | flag), flag). */
+
+int
+fd_safer_flag (int fd, int flag)
+{
+ if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+ {
+ int f = dup_safer_flag (fd, flag);
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
diff --git a/gnu/fd-safer.c b/gnu/fd-safer.c
new file mode 100755
index 00000000..c1c60005
--- /dev/null
+++ b/gnu/fd-safer.c
@@ -0,0 +1,49 @@
+/* Return a safer copy of a file descriptor.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+
+/* Return FD, unless FD would be a copy of standard input, output, or
+ error; in that case, return a duplicate of FD, closing FD. On
+ failure to duplicate, close FD, set errno, and return -1. Preserve
+ errno if FD is negative, so that the caller can always inspect
+ errno when the returned value is negative.
+
+ This function is usefully wrapped around functions that return file
+ descriptors, e.g., fd_safer (open ("file", O_RDONLY)). */
+
+int
+fd_safer (int fd)
+{
+ if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+ {
+ int f = dup_safer (fd);
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
diff --git a/gnu/fflush.c b/gnu/fflush.c
new file mode 100755
index 00000000..ead48754
--- /dev/null
+++ b/gnu/fflush.c
@@ -0,0 +1,218 @@
+/* fflush.c -- allow flushing input streams
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "freading.h"
+
+#include "stdio-impl.h"
+
+#undef fflush
+
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+/* Clear the stream's ungetc buffer, preserving the value of ftello (fp). */
+static inline void
+clear_ungetc_buffer_preserving_position (FILE *fp)
+{
+ if (fp->_flags & _IO_IN_BACKUP)
+ /* _IO_free_backup_area is a bit complicated. Simply call fseek. */
+ fseeko (fp, 0, SEEK_CUR);
+}
+
+#else
+
+/* Clear the stream's ungetc buffer. May modify the value of ftello (fp). */
+static inline void
+clear_ungetc_buffer (FILE *fp)
+{
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ if (HASUB (fp))
+ {
+ fp_->_p += fp_->_r;
+ fp_->_r = 0;
+ }
+# elif defined __EMX__ /* emx+gcc */
+ if (fp->_ungetc_count > 0)
+ {
+ fp->_ungetc_count = 0;
+ fp->_rcount = - fp->_rcount;
+ }
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ /* Nothing to do. */
+# else /* other implementations */
+ fseeko (fp, 0, SEEK_CUR);
+# endif
+}
+
+#endif
+
+#if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+static inline int
+disable_seek_optimization (FILE *fp)
+{
+ int saved_flags = fp_->_flags & (__SOPT | __SNPT);
+ fp_->_flags = (fp_->_flags & ~__SOPT) | __SNPT;
+ return saved_flags;
+}
+
+static inline void
+restore_seek_optimization (FILE *fp, int saved_flags)
+{
+ fp_->_flags = (fp_->_flags & ~(__SOPT | __SNPT)) | saved_flags;
+}
+
+#endif
+
+static inline void
+update_fpos_cache (FILE *fp, off_t pos)
+{
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
+ fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ /* Use a union, since on NetBSD, the compilation flags determine
+ whether fpos_t is typedef'd to off_t or a struct containing a
+ single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+# endif
+ fp_->_flags |= __SOFF;
+#endif
+}
+
+/* Flush all pending data on STREAM according to POSIX rules. Both
+ output and seekable input streams are supported. */
+int
+rpl_fflush (FILE *stream)
+{
+ /* When stream is NULL, POSIX and C99 only require flushing of "output
+ streams and update streams in which the most recent operation was not
+ input", and all implementations do this.
+
+ When stream is "an output stream or an update stream in which the most
+ recent operation was not input", POSIX and C99 requires that fflush
+ writes out any buffered data, and all implementations do this.
+
+ When stream is, however, an input stream or an update stream in
+ which the most recent operation was input, C99 specifies nothing,
+ and POSIX only specifies behavior if the stream is seekable.
+ mingw, in particular, drops the input buffer, leaving the file
+ descriptor positioned at the end of the input buffer. I.e. ftell
+ (stream) is lost. We don't want to call the implementation's
+ fflush in this case.
+
+ We test ! freading (stream) here, rather than fwriting (stream), because
+ what we need to know is whether the stream holds a "read buffer", and on
+ mingw this is indicated by _IOREAD, regardless of _IOWRT. */
+ if (stream == NULL || ! freading (stream))
+ return fflush (stream);
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+
+ clear_ungetc_buffer_preserving_position (stream);
+
+ return fflush (stream);
+
+#else
+ {
+ /* Notes about the file-position indicator:
+ 1) The file position indicator is incremented by fgetc() and decremented
+ by ungetc():
+ <http://www.opengroup.org/susv3/functions/fgetc.html>
+ "... the fgetc() function shall ... advance the associated file
+ position indicator for the stream ..."
+ <http://www.opengroup.org/susv3/functions/ungetc.html>
+ "The file-position indicator is decremented by each successful
+ call to ungetc()..."
+ 2) <http://www.opengroup.org/susv3/functions/ungetc.html> says:
+ "The value of the file-position indicator for the stream after
+ reading or discarding all pushed-back bytes shall be the same
+ as it was before the bytes were pushed back."
+ Here we are discarding all pushed-back bytes. But more specifically,
+ 3) <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> says:
+ "[After fflush(),] the file offset of the underlying open file
+ description shall be set to the file position of the stream, and
+ any characters pushed back onto the stream by ungetc() ... shall
+ be discarded." */
+
+ /* POSIX does not specify fflush behavior for non-seekable input
+ streams. Some implementations purge unread data, some return
+ EBADF, some do nothing. */
+ off_t pos = ftello (stream);
+ if (pos == -1)
+ {
+ errno = EBADF;
+ return EOF;
+ }
+
+ /* Clear the ungetc buffer. */
+ clear_ungetc_buffer (stream);
+
+ /* To get here, we must be flushing a seekable input stream, so the
+ semantics of fpurge are now appropriate to clear the buffer. To
+ avoid losing data, the lseek is also necessary. */
+ {
+ int result = fpurge (stream);
+ if (result != 0)
+ return result;
+ }
+
+# if (defined __sferror || defined __DragonFly__) && defined __SNPT /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+ {
+ /* Disable seek optimization for the next fseeko call. This tells the
+ following fseeko call to seek to the desired position directly, rather
+ than to seek to a block-aligned boundary. */
+ int saved_flags = disable_seek_optimization (stream);
+ int result = fseeko (stream, pos, SEEK_SET);
+
+ restore_seek_optimization (stream, saved_flags);
+ return result;
+ }
+
+# else
+
+ pos = lseek (fileno (stream), pos, SEEK_SET);
+ if (pos == -1)
+ return EOF;
+ /* After a successful lseek, update the file descriptor's position cache
+ in the stream. */
+ update_fpos_cache (stream, pos);
+
+ return 0;
+
+# endif
+ }
+#endif
+}
diff --git a/gnu/filenamecat-lgpl.c b/gnu/filenamecat-lgpl.c
new file mode 100755
index 00000000..7653c5ed
--- /dev/null
+++ b/gnu/filenamecat-lgpl.c
@@ -0,0 +1,88 @@
+/* Concatenate two arbitrary file names.
+
+ Copyright (C) 1996-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+/* Specification. */
+#include "filenamecat.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "dirname.h"
+
+#if ! HAVE_MEMPCPY && ! defined mempcpy
+# define mempcpy(D, S, N) ((void *) ((char *) memcpy (D, S, N) + (N)))
+#endif
+
+/* Return the longest suffix of F that is a relative file name.
+ If it has no such suffix, return the empty string. */
+
+static char const *
+longest_relative_suffix (char const *f)
+{
+ for (f += FILE_SYSTEM_PREFIX_LEN (f); ISSLASH (*f); f++)
+ continue;
+ return f;
+}
+
+/* Concatenate two file name components, DIR and ABASE, in
+ newly-allocated storage and return the result.
+ The resulting file name F is such that the commands "ls F" and "(cd
+ DIR; ls BASE)" refer to the same file, where BASE is ABASE with any
+ file system prefixes and leading separators removed.
+ Arrange for a directory separator if necessary between DIR and BASE
+ in the result, removing any redundant separators.
+ In any case, if BASE_IN_RESULT is non-NULL, set
+ *BASE_IN_RESULT to point to the copy of ABASE in the returned
+ concatenation. However, if ABASE begins with more than one slash,
+ set *BASE_IN_RESULT to point to the sole corresponding slash that
+ is copied into the result buffer.
+
+ Return NULL if malloc fails. */
+
+char *
+mfile_name_concat (char const *dir, char const *abase, char **base_in_result)
+{
+ char const *dirbase = last_component (dir);
+ size_t dirbaselen = base_len (dirbase);
+ size_t dirlen = dirbase - dir + dirbaselen;
+ size_t needs_separator = (dirbaselen && ! ISSLASH (dirbase[dirbaselen - 1]));
+
+ char const *base = longest_relative_suffix (abase);
+ size_t baselen = strlen (base);
+
+ char *p_concat = malloc (dirlen + needs_separator + baselen + 1);
+ char *p;
+
+ if (p_concat == NULL)
+ return NULL;
+
+ p = mempcpy (p_concat, dir, dirlen);
+ *p = DIRECTORY_SEPARATOR;
+ p += needs_separator;
+
+ if (base_in_result)
+ *base_in_result = p - IS_ABSOLUTE_FILE_NAME (abase);
+
+ p = mempcpy (p, base, baselen);
+ *p = '\0';
+
+ return p_concat;
+}
diff --git a/gnu/filenamecat.c b/gnu/filenamecat.c
new file mode 100755
index 00000000..64a7ebb1
--- /dev/null
+++ b/gnu/filenamecat.c
@@ -0,0 +1,41 @@
+/* Concatenate two arbitrary file names.
+
+ Copyright (C) 1996-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+/* Specification. */
+#include "filenamecat.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "xalloc.h"
+
+/* Just like mfile_name_concat (filenamecat-lgpl.c), except, rather than
+ returning NULL upon malloc failure, here, we report the
+ "memory exhausted" condition and exit. */
+
+char *
+file_name_concat (char const *dir, char const *abase, char **base_in_result)
+{
+ char *p = mfile_name_concat (dir, abase, base_in_result);
+ if (p == NULL)
+ xalloc_die ();
+ return p;
+}
diff --git a/gnu/filenamecat.h b/gnu/filenamecat.h
new file mode 100755
index 00000000..950f456b
--- /dev/null
+++ b/gnu/filenamecat.h
@@ -0,0 +1,27 @@
+/* Concatenate two arbitrary file names.
+
+ Copyright (C) 1996-1997, 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#if GNULIB_FILENAMECAT
+char *file_name_concat (char const *dir, char const *base,
+ char **base_in_result);
+#endif
+
+char *mfile_name_concat (char const *dir, char const *base,
+ char **base_in_result);
diff --git a/gnu/float+.h b/gnu/float+.h
new file mode 100755
index 00000000..b55e5e6d
--- /dev/null
+++ b/gnu/float+.h
@@ -0,0 +1,148 @@
+/* Supplemental information about the floating-point formats.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _FLOATPLUS_H
+#define _FLOATPLUS_H
+
+#include <float.h>
+#include <limits.h>
+
+/* Number of bits in the mantissa of a floating-point number, including the
+ "hidden bit". */
+#if FLT_RADIX == 2
+# define FLT_MANT_BIT FLT_MANT_DIG
+# define DBL_MANT_BIT DBL_MANT_DIG
+# define LDBL_MANT_BIT LDBL_MANT_DIG
+#elif FLT_RADIX == 4
+# define FLT_MANT_BIT (FLT_MANT_DIG * 2)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 2)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 2)
+#elif FLT_RADIX == 16
+# define FLT_MANT_BIT (FLT_MANT_DIG * 4)
+# define DBL_MANT_BIT (DBL_MANT_DIG * 4)
+# define LDBL_MANT_BIT (LDBL_MANT_DIG * 4)
+#endif
+
+/* Bit mask that can be used to mask the exponent, as an unsigned number. */
+#define FLT_EXP_MASK ((FLT_MAX_EXP - FLT_MIN_EXP) | 7)
+#define DBL_EXP_MASK ((DBL_MAX_EXP - DBL_MIN_EXP) | 7)
+#define LDBL_EXP_MASK ((LDBL_MAX_EXP - LDBL_MIN_EXP) | 7)
+
+/* Number of bits used for the exponent of a floating-point number, including
+ the exponent's sign. */
+#define FLT_EXP_BIT \
+ (FLT_EXP_MASK < 0x100 ? 8 : \
+ FLT_EXP_MASK < 0x200 ? 9 : \
+ FLT_EXP_MASK < 0x400 ? 10 : \
+ FLT_EXP_MASK < 0x800 ? 11 : \
+ FLT_EXP_MASK < 0x1000 ? 12 : \
+ FLT_EXP_MASK < 0x2000 ? 13 : \
+ FLT_EXP_MASK < 0x4000 ? 14 : \
+ FLT_EXP_MASK < 0x8000 ? 15 : \
+ FLT_EXP_MASK < 0x10000 ? 16 : \
+ FLT_EXP_MASK < 0x20000 ? 17 : \
+ FLT_EXP_MASK < 0x40000 ? 18 : \
+ FLT_EXP_MASK < 0x80000 ? 19 : \
+ FLT_EXP_MASK < 0x100000 ? 20 : \
+ FLT_EXP_MASK < 0x200000 ? 21 : \
+ FLT_EXP_MASK < 0x400000 ? 22 : \
+ FLT_EXP_MASK < 0x800000 ? 23 : \
+ FLT_EXP_MASK < 0x1000000 ? 24 : \
+ FLT_EXP_MASK < 0x2000000 ? 25 : \
+ FLT_EXP_MASK < 0x4000000 ? 26 : \
+ FLT_EXP_MASK < 0x8000000 ? 27 : \
+ FLT_EXP_MASK < 0x10000000 ? 28 : \
+ FLT_EXP_MASK < 0x20000000 ? 29 : \
+ FLT_EXP_MASK < 0x40000000 ? 30 : \
+ FLT_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define DBL_EXP_BIT \
+ (DBL_EXP_MASK < 0x100 ? 8 : \
+ DBL_EXP_MASK < 0x200 ? 9 : \
+ DBL_EXP_MASK < 0x400 ? 10 : \
+ DBL_EXP_MASK < 0x800 ? 11 : \
+ DBL_EXP_MASK < 0x1000 ? 12 : \
+ DBL_EXP_MASK < 0x2000 ? 13 : \
+ DBL_EXP_MASK < 0x4000 ? 14 : \
+ DBL_EXP_MASK < 0x8000 ? 15 : \
+ DBL_EXP_MASK < 0x10000 ? 16 : \
+ DBL_EXP_MASK < 0x20000 ? 17 : \
+ DBL_EXP_MASK < 0x40000 ? 18 : \
+ DBL_EXP_MASK < 0x80000 ? 19 : \
+ DBL_EXP_MASK < 0x100000 ? 20 : \
+ DBL_EXP_MASK < 0x200000 ? 21 : \
+ DBL_EXP_MASK < 0x400000 ? 22 : \
+ DBL_EXP_MASK < 0x800000 ? 23 : \
+ DBL_EXP_MASK < 0x1000000 ? 24 : \
+ DBL_EXP_MASK < 0x2000000 ? 25 : \
+ DBL_EXP_MASK < 0x4000000 ? 26 : \
+ DBL_EXP_MASK < 0x8000000 ? 27 : \
+ DBL_EXP_MASK < 0x10000000 ? 28 : \
+ DBL_EXP_MASK < 0x20000000 ? 29 : \
+ DBL_EXP_MASK < 0x40000000 ? 30 : \
+ DBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+#define LDBL_EXP_BIT \
+ (LDBL_EXP_MASK < 0x100 ? 8 : \
+ LDBL_EXP_MASK < 0x200 ? 9 : \
+ LDBL_EXP_MASK < 0x400 ? 10 : \
+ LDBL_EXP_MASK < 0x800 ? 11 : \
+ LDBL_EXP_MASK < 0x1000 ? 12 : \
+ LDBL_EXP_MASK < 0x2000 ? 13 : \
+ LDBL_EXP_MASK < 0x4000 ? 14 : \
+ LDBL_EXP_MASK < 0x8000 ? 15 : \
+ LDBL_EXP_MASK < 0x10000 ? 16 : \
+ LDBL_EXP_MASK < 0x20000 ? 17 : \
+ LDBL_EXP_MASK < 0x40000 ? 18 : \
+ LDBL_EXP_MASK < 0x80000 ? 19 : \
+ LDBL_EXP_MASK < 0x100000 ? 20 : \
+ LDBL_EXP_MASK < 0x200000 ? 21 : \
+ LDBL_EXP_MASK < 0x400000 ? 22 : \
+ LDBL_EXP_MASK < 0x800000 ? 23 : \
+ LDBL_EXP_MASK < 0x1000000 ? 24 : \
+ LDBL_EXP_MASK < 0x2000000 ? 25 : \
+ LDBL_EXP_MASK < 0x4000000 ? 26 : \
+ LDBL_EXP_MASK < 0x8000000 ? 27 : \
+ LDBL_EXP_MASK < 0x10000000 ? 28 : \
+ LDBL_EXP_MASK < 0x20000000 ? 29 : \
+ LDBL_EXP_MASK < 0x40000000 ? 30 : \
+ LDBL_EXP_MASK <= 0x7fffffff ? 31 : \
+ 32)
+
+/* Number of bits used for a floating-point number: the mantissa (not
+ counting the "hidden bit", since it may or may not be explicit), the
+ exponent, and the sign. */
+#define FLT_TOTAL_BIT ((FLT_MANT_BIT - 1) + FLT_EXP_BIT + 1)
+#define DBL_TOTAL_BIT ((DBL_MANT_BIT - 1) + DBL_EXP_BIT + 1)
+#define LDBL_TOTAL_BIT ((LDBL_MANT_BIT - 1) + LDBL_EXP_BIT + 1)
+
+/* Number of bytes used for a floating-point number.
+ This can be smaller than the 'sizeof'. For example, on i386 systems,
+ 'long double' most often have LDBL_MANT_BIT = 64, LDBL_EXP_BIT = 16, hence
+ LDBL_TOTAL_BIT = 80 bits, i.e. 10 bytes of consecutive memory, but
+ sizeof (long double) = 12 or = 16. */
+#define SIZEOF_FLT ((FLT_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_DBL ((DBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+#define SIZEOF_LDBL ((LDBL_TOTAL_BIT + CHAR_BIT - 1) / CHAR_BIT)
+
+/* Verify that SIZEOF_FLT <= sizeof (float) etc. */
+typedef int verify_sizeof_flt[2 * (SIZEOF_FLT <= sizeof (float)) - 1];
+typedef int verify_sizeof_dbl[2 * (SIZEOF_DBL <= sizeof (double)) - 1];
+typedef int verify_sizeof_ldbl[2 * (SIZEOF_LDBL <= sizeof (long double)) - 1];
+
+#endif /* _FLOATPLUS_H */
diff --git a/gnu/float.in.h b/gnu/float.in.h
new file mode 100755
index 00000000..caf822f1
--- /dev/null
+++ b/gnu/float.in.h
@@ -0,0 +1,62 @@
+/* A correct <float.h>.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_FLOAT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_FLOAT_H@
+
+#ifndef _GL_FLOAT_H
+#define _GL_FLOAT_H
+
+/* 'long double' properties. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+/* Number of mantissa units, in base FLT_RADIX. */
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG 64
+/* Number of decimal digits that is sufficient for representing a number. */
+# undef LDBL_DIG
+# define LDBL_DIG 18
+/* x-1 where x is the smallest representable number > 1. */
+# undef LDBL_EPSILON
+# define LDBL_EPSILON 1.0842021724855044340E-19L
+/* Minimum e such that FLT_RADIX^(e-1) is a normalized number. */
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+/* Maximum e such that FLT_RADIX^(e-1) is a representable finite number. */
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP 16384
+/* Minimum positive normalized number. */
+# undef LDBL_MIN
+# define LDBL_MIN 3.3621031431120935063E-4932L
+/* Maximum representable finite number. */
+# undef LDBL_MAX
+# define LDBL_MAX 1.1897314953572317650E+4932L
+/* Minimum e such that 10^e is in the range of normalized numbers. */
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP (-4931)
+/* Maximum e such that 10^e is in the range of representable finite numbers. */
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP 4932
+#endif
+
+#endif /* _GL_FLOAT_H */
+#endif /* _GL_FLOAT_H */
diff --git a/gnu/fopen-safer.c b/gnu/fopen-safer.c
new file mode 100755
index 00000000..0151182d
--- /dev/null
+++ b/gnu/fopen-safer.c
@@ -0,0 +1,63 @@
+/* Invoke fopen, but avoid some glitches.
+
+ Copyright (C) 2001, 2004-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include "stdio-safer.h"
+
+#include <errno.h>
+#include <unistd.h>
+#include "unistd-safer.h"
+
+/* Like fopen, but do not return stdin, stdout, or stderr. */
+
+FILE *
+fopen_safer (char const *file, char const *mode)
+{
+ FILE *fp = fopen (file, mode);
+
+ if (fp)
+ {
+ int fd = fileno (fp);
+
+ if (0 <= fd && fd <= STDERR_FILENO)
+ {
+ int f = dup_safer (fd);
+
+ if (f < 0)
+ {
+ int e = errno;
+ fclose (fp);
+ errno = e;
+ return NULL;
+ }
+
+ if (fclose (fp) != 0
+ || ! (fp = fdopen (f, mode)))
+ {
+ int e = errno;
+ close (f);
+ errno = e;
+ return NULL;
+ }
+ }
+ }
+
+ return fp;
+}
diff --git a/gnu/fopen.c b/gnu/fopen.c
new file mode 100755
index 00000000..377b14f7
--- /dev/null
+++ b/gnu/fopen.c
@@ -0,0 +1,105 @@
+/* Open a stream to a file.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* Get the original definition of fopen. It might be defined as a macro. */
+#define __need_FILE
+#include <stdio.h>
+#undef __need_FILE
+
+static inline FILE *
+orig_fopen (const char *filename, const char *mode)
+{
+ return fopen (filename, mode);
+}
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+
+FILE *
+rpl_fopen (const char *filename, const char *mode)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (strcmp (filename, "/dev/null") == 0)
+ filename = "NUL";
+#endif
+
+#if FOPEN_TRAILING_SLASH_BUG
+ /* If the filename ends in a slash and a mode that requires write access is
+ specified, then fail.
+ Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+ says that
+ "A pathname that contains at least one non-slash character and that
+ ends with one or more trailing slashes shall be resolved as if a
+ single dot character ( '.' ) were appended to the pathname."
+ and
+ "The special filename dot shall refer to the directory specified by
+ its predecessor."
+ If the named file already exists as a directory, then if a mode that
+ requires write access is specified, fopen() must fail because POSIX
+ <http://www.opengroup.org/susv3/functions/fopen.html> says that it
+ fails with errno = EISDIR in this case.
+ If the named file does not exist or does not name a directory, then
+ fopen() must fail since the file does not contain a '.' directory. */
+ {
+ size_t len = strlen (filename);
+ if (len > 0 && filename[len - 1] == '/')
+ {
+ int fd;
+ struct stat statbuf;
+ FILE *fp;
+
+ if (mode[0] == 'w' || mode[0] == 'a')
+ {
+ errno = EISDIR;
+ return NULL;
+ }
+
+ fd = open (filename, O_RDONLY);
+ if (fd < 0)
+ return NULL;
+
+ if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+ {
+ close (fd);
+ errno = ENOTDIR;
+ return NULL;
+ }
+
+ fp = fdopen (fd, mode);
+ if (fp == NULL)
+ {
+ int saved_errno = errno;
+ close (fd);
+ errno = saved_errno;
+ }
+ return fp;
+ }
+ }
+# endif
+
+ return orig_fopen (filename, mode);
+}
diff --git a/gnu/fpending.c b/gnu/fpending.c
new file mode 100755
index 00000000..774b396e
--- /dev/null
+++ b/gnu/fpending.c
@@ -0,0 +1,30 @@
+/* fpending.c -- return the number of pending output bytes on a stream
+ Copyright (C) 2000, 2004, 2006-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+#include "fpending.h"
+
+/* Return the number of pending (aka buffered, unflushed)
+ bytes on the stream, FP, that is open for writing. */
+size_t
+__fpending (FILE *fp)
+{
+ return PENDING_OUTPUT_N_BYTES;
+}
diff --git a/gnu/fpending.h b/gnu/fpending.h
new file mode 100755
index 00000000..fff34f1e
--- /dev/null
+++ b/gnu/fpending.h
@@ -0,0 +1,34 @@
+/* Declare __fpending.
+
+ Copyright (C) 2000, 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Jim Meyering. */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifndef HAVE_DECL___FPENDING
+"this configure-time declaration test was not run"
+#endif
+
+#if HAVE_DECL___FPENDING
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+#else
+size_t __fpending (FILE *);
+#endif
diff --git a/gnu/fpucw.h b/gnu/fpucw.h
new file mode 100755
index 00000000..c855faea
--- /dev/null
+++ b/gnu/fpucw.h
@@ -0,0 +1,107 @@
+/* Manipulating the FPU control word.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _FPUCW_H
+#define _FPUCW_H
+
+/* The i386 floating point hardware (the 387 compatible FPU, not the modern
+ SSE/SSE2 hardware) has a controllable rounding precision. It is specified
+ through the 'PC' bits in the FPU control word ('fctrl' register). (See
+ the GNU libc i386 <fpu_control.h> header for details.)
+
+ On some platforms, such as Linux or Solaris, the default precision setting
+ is set to "extended precision". This means that 'long double' instructions
+ operate correctly, but 'double' computations often produce slightly
+ different results as on strictly IEEE 754 conforming systems.
+
+ On some platforms, such as NetBSD, the default precision is set to
+ "double precision". This means that 'long double' instructions will operate
+ only as 'double', i.e. lead wrong results.
+
+ The FPU control word is under control of the application, i.e. it is
+ not required to be set either way by the ABI. (In fact, the i386 ABI
+ http://refspecs.freestandards.org/elf/abi386-4.pdf page 3-12 = page 38
+ is not clear about it. But in any case, gcc treats the control word
+ like a "preserved" register: it emits code that assumes that the control
+ word is preserved across calls, and it restores the control word at the
+ end of functions that modify it.)
+
+ See Vincent Lefèvre's page http://www.vinc17.org/research/extended.en.html
+ for a good explanation.
+ See http://www.uwsg.iu.edu/hypermail/linux/kernel/0103.0/0453.html for
+ some argumentation which setting should be the default. */
+
+/* This header file provides the following facilities:
+ fpucw_t integral type holding the value of 'fctrl'
+ FPU_PC_MASK bit mask denoting the precision control
+ FPU_PC_DOUBLE precision control for 53 bits mantissa
+ FPU_PC_EXTENDED precision control for 64 bits mantissa
+ GET_FPUCW () yields the current FPU control word
+ SET_FPUCW (word) sets the FPU control word
+ DECL_LONG_DOUBLE_ROUNDING variable declaration for
+ BEGIN/END_LONG_DOUBLE_ROUNDING
+ BEGIN_LONG_DOUBLE_ROUNDING () starts a sequence of instructions with
+ 'long double' safe operation precision
+ END_LONG_DOUBLE_ROUNDING () ends a sequence of instructions with
+ 'long double' safe operation precision
+ */
+
+/* Inline assembler like this works only with GNU C. */
+#if (defined __i386__ || defined __x86_64__) && defined __GNUC__
+
+typedef unsigned short fpucw_t; /* glibc calls this fpu_control_t */
+
+# define FPU_PC_MASK 0x0300
+# define FPU_PC_DOUBLE 0x200 /* glibc calls this _FPU_DOUBLE */
+# define FPU_PC_EXTENDED 0x300 /* glibc calls this _FPU_EXTENDED */
+
+# define GET_FPUCW() \
+ ({ fpucw_t _cw; \
+ __asm__ __volatile__ ("fnstcw %0" : "=m" (*&_cw)); \
+ _cw; \
+ })
+# define SET_FPUCW(word) \
+ (void)({ fpucw_t _ncw = (word); \
+ __asm__ __volatile__ ("fldcw %0" : : "m" (*&_ncw)); \
+ })
+
+# define DECL_LONG_DOUBLE_ROUNDING \
+ fpucw_t oldcw;
+# define BEGIN_LONG_DOUBLE_ROUNDING() \
+ (void)(oldcw = GET_FPUCW (), \
+ SET_FPUCW ((oldcw & ~FPU_PC_MASK) | FPU_PC_EXTENDED))
+# define END_LONG_DOUBLE_ROUNDING() \
+ SET_FPUCW (oldcw)
+
+#else
+
+typedef unsigned int fpucw_t;
+
+# define FPU_PC_MASK 0
+# define FPU_PC_DOUBLE 0
+# define FPU_PC_EXTENDED 0
+
+# define GET_FPUCW() 0
+# define SET_FPUCW(word) (void)(word)
+
+# define DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_LONG_DOUBLE_ROUNDING()
+# define END_LONG_DOUBLE_ROUNDING()
+
+#endif
+
+#endif /* _FPUCW_H */
diff --git a/gnu/fpurge.c b/gnu/fpurge.c
new file mode 100755
index 00000000..079a2995
--- /dev/null
+++ b/gnu/fpurge.c
@@ -0,0 +1,137 @@
+/* Flushing buffers of a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+# include <stdio_ext.h>
+#endif
+#include <stdlib.h>
+
+#include "stdio-impl.h"
+
+int
+fpurge (FILE *fp)
+{
+#if HAVE___FPURGE /* glibc >= 2.2, Haiku, Solaris >= 7 */
+
+ __fpurge (fp);
+ /* The __fpurge function does not have a return value. */
+ return 0;
+
+#elif HAVE_FPURGE /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin 1.7 */
+
+ /* Call the system's fpurge function. */
+# undef fpurge
+# if !HAVE_DECL_FPURGE
+ extern int fpurge (FILE *);
+# endif
+ int result = fpurge (fp);
+# if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ if (result == 0)
+ /* Correct the invariants that fpurge broke.
+ <stdio.h> on BSD systems says:
+ "The following always hold: if _flags & __SRD, _w is 0."
+ If this invariant is not fulfilled and the stream is read-write but
+ currently reading, subsequent putc or fputc calls will write directly
+ into the buffer, although they shouldn't be allowed to. */
+ if ((fp_->_flags & __SRD) != 0)
+ fp_->_w = 0;
+# endif
+ return result;
+
+#else
+
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+# if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_end = fp->_IO_read_ptr;
+ fp->_IO_write_ptr = fp->_IO_write_base;
+ /* Avoid memory leak when there is an active ungetc buffer. */
+ if (fp->_IO_save_base != NULL)
+ {
+ free (fp->_IO_save_base);
+ fp->_IO_save_base = NULL;
+ }
+ return 0;
+# elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp_->_p = fp_->_bf._base;
+ fp_->_r = 0;
+ fp_->_w = ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+ ? fp_->_bf._size
+ : 0);
+ /* Avoid memory leak when there is an active ungetc buffer. */
+ if (fp_ub._base != NULL)
+ {
+ if (fp_ub._base != fp_->_ubuf)
+ free (fp_ub._base);
+ fp_ub._base = NULL;
+ }
+ return 0;
+# elif defined __EMX__ /* emx+gcc */
+ fp->_ptr = fp->_buffer;
+ fp->_rcount = 0;
+ fp->_wcount = 0;
+ fp->_ungetc_count = 0;
+ return 0;
+# elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ fp->_ptr = fp->_base;
+ if (fp->_ptr != NULL)
+ fp->_cnt = 0;
+ return 0;
+# elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ if (fp->__modeflags & __FLAG_WRITING)
+ fp->__bufpos = fp->__bufstart;
+ else if (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING))
+ fp->__bufpos = fp->__bufread;
+# endif
+ return 0;
+# elif defined __QNX__ /* QNX */
+ fp->_Rback = fp->_Back + sizeof (fp->_Back);
+ fp->_Rsave = NULL;
+ if (fp->_Mode & 0x2000 /* _MWRITE */)
+ /* fp->_Buf <= fp->_Next <= fp->_Wend */
+ fp->_Next = fp->_Buf;
+ else
+ /* fp->_Buf <= fp->_Next <= fp->_Rend */
+ fp->_Rend = fp->_Next;
+ return 0;
+# elif defined __MINT__ /* Atari FreeMiNT */
+ if (fp->__pushed_back)
+ {
+ fp->__bufp = fp->__pushback_bufp;
+ fp->__pushed_back = 0;
+ }
+ /* Preserve the current file position. */
+ if (fp->__target != -1)
+ fp->__target += fp->__bufp - fp->__buffer;
+ fp->__bufp = fp->__buffer;
+ /* Nothing in the buffer, next getc is nontrivial. */
+ fp->__get_limit = fp->__bufp;
+ /* Nothing in the buffer, next putc is nontrivial. */
+ fp->__put_limit = fp->__buffer;
+ return 0;
+# else
+ #error "Please port gnulib fpurge.c to your platform! Look at the definitions of fflush, setvbuf and ungetc on your system, then report this to bug-gnulib."
+# endif
+
+#endif
+}
diff --git a/gnu/freadahead.c b/gnu/freadahead.c
new file mode 100755
index 00000000..50ff27ee
--- /dev/null
+++ b/gnu/freadahead.c
@@ -0,0 +1,85 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "freadahead.h"
+
+#include <stdlib.h>
+#include "stdio-impl.h"
+
+size_t
+freadahead (FILE *fp)
+{
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_write_ptr > fp->_IO_write_base)
+ return 0;
+ return (fp->_IO_read_end - fp->_IO_read_ptr)
+ + (fp->_flags & _IO_IN_BACKUP ? fp->_IO_save_end - fp->_IO_save_base :
+ 0);
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
+ return 0;
+# if defined __DragonFly__
+ return __sreadahead (fp);
+# else
+ return fp_->_r
+ + (HASUB (fp) ? fp_->_ur : 0);
+# endif
+#elif defined __EMX__ /* emx+gcc */
+ if ((fp->_flags & _IOWRT) != 0)
+ return 0;
+ /* Note: fp->_ungetc_count > 0 implies fp->_rcount <= 0,
+ fp->_ungetc_count = 0 implies fp->_rcount >= 0. */
+ /* equivalent to
+ (fp->_ungetc_count == 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount) */
+ return (fp->_rcount > 0 ? fp->_rcount : fp->_ungetc_count - fp->_rcount);
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ if ((fp_->_flag & _IOWRT) != 0)
+ return 0;
+ return fp_->_cnt;
+#elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ if (fp->__modeflags & __FLAG_WRITING)
+ return 0;
+ return (fp->__bufread - fp->__bufpos)
+ + (fp->__modeflags & __FLAG_UNGOT ? 1 : 0);
+# else
+ return 0;
+# endif
+#elif defined __QNX__ /* QNX */
+ if ((fp->_Mode & 0x2000 /* _MWRITE */) != 0)
+ return 0;
+ /* fp->_Buf <= fp->_Next <= fp->_Rend,
+ and fp->_Rend may be overridden by fp->_Rsave. */
+ return ((fp->_Rsave ? fp->_Rsave : fp->_Rend) - fp->_Next)
+ + (fp->_Mode & 0x4000 /* _MBYTE */
+ ? (fp->_Back + sizeof (fp->_Back)) - fp->_Rback
+ : 0);
+#elif defined __MINT__ /* Atari FreeMiNT */
+ if (!fp->__mode.__read)
+ return 0;
+ return (fp->__pushed_back
+ ? fp->__get_limit - fp->__pushback_bufp + 1
+ : fp->__get_limit - fp->__bufp);
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
+ abort ();
+ return 0;
+#else
+ #error "Please port gnulib freadahead.c to your platform! Look at the definition of fflush, fread, ungetc on your system, then report this to bug-gnulib."
+#endif
+}
diff --git a/gnu/freadahead.h b/gnu/freadahead.h
new file mode 100755
index 00000000..54466b40
--- /dev/null
+++ b/gnu/freadahead.h
@@ -0,0 +1,38 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Assuming the stream STREAM is open for reading:
+ Return the number of bytes waiting in the input buffer of STREAM.
+ This includes both the bytes that have been read from the underlying input
+ source and the bytes that have been pushed back through 'ungetc'.
+
+ If this number is 0 and the stream is not currently writing,
+ fflush (STREAM) is known to be a no-op.
+
+ STREAM must not be wide-character oriented. */
+
+extern size_t freadahead (FILE *stream);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnu/freading.c b/gnu/freading.c
new file mode 100755
index 00000000..faca60e1
--- /dev/null
+++ b/gnu/freading.c
@@ -0,0 +1,64 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "freading.h"
+
+#include "stdio-impl.h"
+
+/* Don't use glibc's __freading function in glibc < 2.7, see
+ <http://sourceware.org/bugzilla/show_bug.cgi?id=4359> */
+#if !(HAVE___FREADING && (!defined __GLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7)))
+
+bool
+freading (FILE *fp)
+{
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ return ((fp->_flags & _IO_NO_WRITES) != 0
+ || ((fp->_flags & (_IO_NO_READS | _IO_CURRENTLY_PUTTING)) == 0
+ && fp->_IO_read_base != NULL));
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ return (fp_->_flags & __SRD) != 0;
+#elif defined __EMX__ /* emx+gcc */
+ return (fp->_flags & _IOREAD) != 0;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ return (fp->_flag & _IOREAD) != 0;
+#elif defined __UCLIBC__ /* uClibc */
+ return (fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) != 0;
+#elif defined __QNX__ /* QNX */
+ return ((fp->_Mode & 0x2 /* _MOPENW */) == 0
+ || (fp->_Mode & 0x1000 /* _MREAD */) != 0);
+#elif defined __MINT__ /* Atari FreeMiNT */
+ if (!fp->__mode.__write)
+ return 1;
+ if (!fp->__mode.__read)
+ return 0;
+# ifdef _IO_CURRENTLY_GETTING /* Flag added on 2009-02-28 */
+ return (fp->__flags & _IO_CURRENTLY_GETTING) != 0;
+# else
+ return (fp->__buffer < fp->__get_limit /*|| fp->__bufp == fp->__put_limit ??*/);
+# endif
+#else
+ #error "Please port gnulib freading.c to your platform!"
+#endif
+}
+
+#endif
diff --git a/gnu/freading.h b/gnu/freading.h
new file mode 100755
index 00000000..9b3b6c6a
--- /dev/null
+++ b/gnu/freading.h
@@ -0,0 +1,53 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdbool.h>
+#include <stdio.h>
+
+/* Return true if the stream STREAM is opened read-only, or if the
+ last operation on the stream was a read operation. Return false if
+ the stream is opened write-only or append-only, or if it supports
+ writing and there is no current read operation (such as fgetc).
+
+ freading and fwriting will never both be true. If STREAM supports
+ both reads and writes, then:
+ - both freading and fwriting might be false when the stream is first
+ opened, after read encounters EOF, or after fflush,
+ - freading might be false or true and fwriting might be false
+ after repositioning (such as fseek, fsetpos, or rewind),
+ depending on the underlying implementation.
+
+ STREAM must not be wide-character oriented. */
+
+#if HAVE___FREADING && (!defined __GLIBC__ || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 7))
+/* Solaris >= 7, not glibc >= 2.2, but glibc >= 2.7 */
+
+# include <stdio_ext.h>
+# define freading(stream) (__freading (stream) != 0)
+
+#else
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+extern bool freading (FILE *stream);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnu/freadptr.c b/gnu/freadptr.c
new file mode 100755
index 00000000..05f501bf
--- /dev/null
+++ b/gnu/freadptr.c
@@ -0,0 +1,103 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "freadptr.h"
+
+#include <stdlib.h>
+
+#include "stdio-impl.h"
+
+const char *
+freadptr (FILE *fp, size_t *sizep)
+{
+ size_t size;
+
+ /* Keep this code in sync with freadahead! */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_write_ptr > fp->_IO_write_base)
+ return NULL;
+ size = fp->_IO_read_end - fp->_IO_read_ptr;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return (const char *) fp->_IO_read_ptr;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ if ((fp_->_flags & __SWR) != 0 || fp_->_r < 0)
+ return NULL;
+ size = fp_->_r;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return (const char *) fp_->_p;
+#elif defined __EMX__ /* emx+gcc */
+ if ((fp->_flags & _IOWRT) != 0)
+ return NULL;
+ /* Note: fp->_ungetc_count > 0 implies fp->_rcount <= 0,
+ fp->_ungetc_count = 0 implies fp->_rcount >= 0. */
+ if (fp->_rcount <= 0)
+ return NULL;
+ if (!(fp->_ungetc_count == 0))
+ abort ();
+ *sizep = fp->_rcount;
+ return fp->_ptr;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ if ((fp_->_flag & _IOWRT) != 0)
+ return NULL;
+ size = fp_->_cnt;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return (const char *) fp_->_ptr;
+#elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ if (fp->__modeflags & __FLAG_WRITING)
+ return NULL;
+ size = fp->__bufread - fp->__bufpos;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return (const char *) fp->__bufpos;
+# else
+ return NULL;
+# endif
+#elif defined __QNX__ /* QNX */
+ if ((fp->_Mode & 0x2000 /* _MWRITE */) != 0)
+ return NULL;
+ /* fp->_Buf <= fp->_Next <= fp->_Rend */
+ size = fp->_Rend - fp->_Next;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return (const char *) fp->_Next;
+#elif defined __MINT__ /* Atari FreeMiNT */
+ if (!fp->__mode.__read)
+ return NULL;
+ size = fp->__get_limit - fp->__bufp;
+ if (size == 0)
+ return NULL;
+ *sizep = size;
+ return fp->__bufp;
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
+ /* This implementation is correct on any ANSI C platform. It is just
+ awfully slow. */
+ return NULL;
+#else
+ #error "Please port gnulib freadptr.c to your platform! Look at the definition of fflush, fread, getc, getc_unlocked on your system, then report this to bug-gnulib."
+#endif
+}
diff --git a/gnu/freadptr.h b/gnu/freadptr.h
new file mode 100755
index 00000000..855cbd66
--- /dev/null
+++ b/gnu/freadptr.h
@@ -0,0 +1,39 @@
+/* Retrieve information about a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Assuming the stream STREAM is open for reading:
+ Return a pointer to the input buffer of STREAM, or NULL.
+ If the returned pointer is non-NULL, *SIZEP is set to the (positive) size
+ of the input buffer.
+ If the returned pointer is NULL, you should use getc (STREAM),
+ fgetc (STREAM), or fread (..., STREAM) to access the input from STREAM.
+
+ The resulting pointer becomes invalid upon any operation on STREAM.
+
+ STREAM must not be wide-character oriented. */
+
+extern const char * freadptr (FILE *stream, size_t *sizep);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnu/freadseek.c b/gnu/freadseek.c
new file mode 100755
index 00000000..99af4370
--- /dev/null
+++ b/gnu/freadseek.c
@@ -0,0 +1,136 @@
+/* Skipping input from a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "freadseek.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "freadahead.h"
+#include "freadptr.h"
+
+#include "stdio-impl.h"
+
+/* Increment the in-memory pointer. INCREMENT must be at most the buffer size
+ returned by freadptr().
+ This is very cheap (no system calls). */
+static inline void
+freadptrinc (FILE *fp, size_t increment)
+{
+ /* Keep this code in sync with freadptr! */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_IO_read_ptr += increment;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp_->_p += increment;
+ fp_->_r -= increment;
+#elif defined __EMX__ /* emx+gcc */
+ fp->_ptr += increment;
+ fp->_rcount -= increment;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ fp_->_ptr += increment;
+ fp_->_cnt -= increment;
+#elif defined __UCLIBC__ /* uClibc */
+# ifdef __STDIO_BUFFERS
+ fp->__bufpos += increment;
+# else
+ abort ();
+# endif
+#elif defined __QNX__ /* QNX */
+ fp->_Next += increment;
+#elif defined __MINT__ /* Atari FreeMiNT */
+ fp->__bufp += increment;
+#elif defined SLOW_BUT_NO_HACKS /* users can define this */
+#else
+ #error "Please port gnulib freadseek.c to your platform! Look at the definition of getc, getc_unlocked on your system, then report this to bug-gnulib."
+#endif
+}
+
+int
+freadseek (FILE *fp, size_t offset)
+{
+ size_t total_buffered;
+ int fd;
+
+ if (offset == 0)
+ return 0;
+
+ /* Seek over the already read and buffered input as quickly as possible,
+ without doing any system calls. */
+ total_buffered = freadahead (fp);
+ /* This loop is usually executed at most twice: once for ungetc buffer (if
+ present) and once for the main buffer. */
+ while (total_buffered > 0)
+ {
+ size_t buffered;
+
+ if (freadptr (fp, &buffered) != NULL && buffered > 0)
+ {
+ size_t increment = (buffered < offset ? buffered : offset);
+
+ freadptrinc (fp, increment);
+ offset -= increment;
+ if (offset == 0)
+ return 0;
+ total_buffered -= increment;
+ if (total_buffered == 0)
+ break;
+ }
+ /* Read one byte. If we were reading from the ungetc buffer, this
+ switches the stream back to the main buffer. */
+ if (fgetc (fp) == EOF)
+ goto eof;
+ offset--;
+ if (offset == 0)
+ return 0;
+ total_buffered--;
+ }
+
+ /* Test whether the stream is seekable or not. */
+ fd = fileno (fp);
+ if (fd >= 0 && lseek (fd, 0, SEEK_CUR) >= 0)
+ {
+ /* FP refers to a regular file. fseek is most efficient in this case. */
+ return fseeko (fp, offset, SEEK_CUR);
+ }
+ else
+ {
+ /* FP is a non-seekable stream, possibly not even referring to a file
+ descriptor. Read OFFSET bytes explicitly and discard them. */
+ char buf[4096];
+
+ do
+ {
+ size_t count = (sizeof (buf) < offset ? sizeof (buf) : offset);
+ if (fread (buf, 1, count, fp) < count)
+ goto eof;
+ offset -= count;
+ }
+ while (offset > 0);
+
+ return 0;
+ }
+
+ eof:
+ /* EOF, or error before or while reading. */
+ if (ferror (fp))
+ return EOF;
+ else
+ /* Encountered EOF. */
+ return 0;
+}
diff --git a/gnu/freadseek.h b/gnu/freadseek.h
new file mode 100755
index 00000000..572d4870
--- /dev/null
+++ b/gnu/freadseek.h
@@ -0,0 +1,42 @@
+/* Skipping input from a FILE stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Assuming the stream STREAM is open for reading:
+
+ Read and discard OFFSET bytes from STREAM.
+
+ freadseek (STREAM, OFFSET) is the same as
+ fseek (STREAM, OFFSET, SEEK_CUR), except that the latter does not work
+ on non-seekable input streams (such as pipes).
+
+ Upon success, return 0.
+ Upon premature end of stream, return 0 (like fseek does).
+ Upon error, set the error indicator in the stream and return EOF.
+
+ STREAM must not be wide-character oriented. */
+
+extern int freadseek (FILE *stream, size_t offset);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnu/frexp.c b/gnu/frexp.c
new file mode 100755
index 00000000..e139885c
--- /dev/null
+++ b/gnu/frexp.c
@@ -0,0 +1,166 @@
+/* Split a double into fraction and mantissa.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paolo Bonzini <bonzini@gnu.org>, 2003, and
+ Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* Specification. */
+#include <math.h>
+
+#include <float.h>
+#ifdef USE_LONG_DOUBLE
+# include "isnanl-nolibm.h"
+# include "fpucw.h"
+#else
+# include "isnand-nolibm.h"
+#endif
+
+/* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater
+ than 2, or not even a power of 2, some rounding errors can occur, so that
+ then the returned mantissa is only guaranteed to be <= 1.0, not < 1.0. */
+
+#ifdef USE_LONG_DOUBLE
+# define FUNC frexpl
+# define DOUBLE long double
+# define ISNAN isnanl
+# define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING ()
+# define END_ROUNDING() END_LONG_DOUBLE_ROUNDING ()
+# define L_(literal) literal##L
+#else
+# define FUNC frexp
+# define DOUBLE double
+# define ISNAN isnand
+# define DECL_ROUNDING
+# define BEGIN_ROUNDING()
+# define END_ROUNDING()
+# define L_(literal) literal
+#endif
+
+DOUBLE
+FUNC (DOUBLE x, int *expptr)
+{
+ int sign;
+ int exponent;
+ DECL_ROUNDING
+
+ /* Test for NaN, infinity, and zero. */
+ if (ISNAN (x) || x + x == x)
+ {
+ *expptr = 0;
+ return x;
+ }
+
+ sign = 0;
+ if (x < 0)
+ {
+ x = - x;
+ sign = -1;
+ }
+
+ BEGIN_ROUNDING ();
+
+ {
+ /* Since the exponent is an 'int', it fits in 64 bits. Therefore the
+ loops are executed no more than 64 times. */
+ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */
+ DOUBLE powh[64]; /* powh[i] = 2^-2^i */
+ int i;
+
+ exponent = 0;
+ if (x >= L_(1.0))
+ {
+ /* A positive exponent. */
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x >= 1.0. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (x >= pow2_i)
+ {
+ exponent += (1 << i);
+ x *= powh_i;
+ }
+ else
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ /* Avoid making x too small, as it could become a denormalized
+ number and thus lose precision. */
+ while (i > 0 && x < pow2[i - 1])
+ {
+ i--;
+ powh_i = powh[i];
+ }
+ exponent += (1 << i);
+ x *= powh_i;
+ /* Here 2^-2^i <= x < 1.0. */
+ }
+ else
+ {
+ /* A negative or zero exponent. */
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x < 1.0. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (x < powh_i)
+ {
+ exponent -= (1 << i);
+ x *= pow2_i;
+ }
+ else
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ /* Here 2^-2^i <= x < 1.0. */
+ }
+
+ /* Invariants: x * 2^exponent = argument, and 2^-2^i <= x < 1.0. */
+ while (i > 0)
+ {
+ i--;
+ if (x < powh[i])
+ {
+ exponent -= (1 << i);
+ x *= pow2[i];
+ }
+ }
+ /* Here 0.5 <= x < 1.0. */
+ }
+
+ if (sign < 0)
+ x = - x;
+
+ END_ROUNDING ();
+
+ *expptr = exponent;
+ return x;
+}
diff --git a/gnu/frexpl.c b/gnu/frexpl.c
new file mode 100755
index 00000000..c8059995
--- /dev/null
+++ b/gnu/frexpl.c
@@ -0,0 +1,18 @@
+/* Split a 'long double' into fraction and mantissa.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#define USE_LONG_DOUBLE
+#include "frexp.c"
diff --git a/gnu/fseeko.c b/gnu/fseeko.c
new file mode 100755
index 00000000..1a41b16f
--- /dev/null
+++ b/gnu/fseeko.c
@@ -0,0 +1,147 @@
+/* An fseeko() function that, together with fflush(), is POSIX compliant.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get off_t and lseek. */
+#include <unistd.h>
+
+#include "stdio-impl.h"
+
+#undef fseeko
+#if !HAVE_FSEEKO
+# undef fseek
+# define fseeko fseek
+#endif
+
+int
+rpl_fseeko (FILE *fp, off_t offset, int whence)
+{
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return EOF;
+#endif
+
+ /* These tests are based on fpurge.c. */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ if (fp->_IO_read_end == fp->_IO_read_ptr
+ && fp->_IO_write_ptr == fp->_IO_write_base
+ && fp->_IO_save_base == NULL)
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an fseeko that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
+ return -1;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+# endif
+ if (fp_->_p == fp_->_bf._base
+ && fp_->_r == 0
+ && fp_->_w == ((fp_->_flags & (__SLBF | __SNBF | __SRD)) == 0 /* fully buffered and not currently reading? */
+ ? fp_->_bf._size
+ : 0)
+ && fp_ub._base == NULL)
+#elif defined __EMX__ /* emx+gcc */
+ if (fp->_ptr == fp->_buffer
+ && fp->_rcount == 0
+ && fp->_wcount == 0
+ && fp->_ungetc_count == 0)
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ if (fp_->_ptr == fp_->_base
+ && (fp_->_ptr == NULL || fp_->_cnt == 0))
+#elif defined __UCLIBC__ /* uClibc */
+ if (((fp->__modeflags & __FLAG_WRITING) == 0
+ || fp->__bufpos == fp->__bufstart)
+ && ((fp->__modeflags & (__FLAG_READONLY | __FLAG_READING)) == 0
+ || fp->__bufpos == fp->__bufread))
+#elif defined __QNX__ /* QNX */
+ if ((fp->_Mode & 0x2000 /* _MWRITE */ ? fp->_Next == fp->_Buf : fp->_Next == fp->_Rend)
+ && fp->_Rback == fp->_Back + sizeof (fp->_Back)
+ && fp->_Rsave == NULL)
+#elif defined __MINT__ /* Atari FreeMiNT */
+ if (fp->__bufp == fp->__buffer
+ && fp->__get_limit == fp->__bufp
+ && fp->__put_limit == fp->__bufp
+ && !fp->__pushed_back)
+#else
+ #error "Please port gnulib fseeko.c to your platform! Look at the code in fpurge.c, then report this to bug-gnulib."
+#endif
+ {
+ /* We get here when an fflush() call immediately preceded this one. We
+ know there are no buffers.
+ POSIX requires us to modify the file descriptor's position.
+ But we cannot position beyond end of file here. */
+ off_t pos =
+ lseek (fileno (fp),
+ whence == SEEK_END && offset > 0 ? 0 : offset,
+ whence);
+ if (pos == -1)
+ {
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp_->_flags &= ~__SOFF;
+#endif
+ return -1;
+ }
+
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_flags &= ~_IO_EOF_SEEN;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+# if defined __CYGWIN__
+ /* fp_->_offset is typed as an integer. */
+ fp_->_offset = pos;
+# else
+ /* fp_->_offset is an fpos_t. */
+ {
+ /* Use a union, since on NetBSD, the compilation flags
+ determine whether fpos_t is typedef'd to off_t or a struct
+ containing a single off_t member. */
+ union
+ {
+ fpos_t f;
+ off_t o;
+ } u;
+ u.o = pos;
+ fp_->_offset = u.f;
+ }
+# endif
+ fp_->_flags |= __SOFF;
+ fp_->_flags &= ~__SEOF;
+#elif defined __EMX__ /* emx+gcc */
+ fp->_flags &= ~_IOEOF;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ fp->_flag &= ~_IOEOF;
+#elif defined __MINT__ /* Atari FreeMiNT */
+ fp->__offset = pos;
+ fp->__eof = 0;
+#endif
+ /* If we were not requested to position beyond end of file, we're
+ done. */
+ if (!(whence == SEEK_END && offset > 0))
+ return 0;
+ }
+ return fseeko (fp, offset, whence);
+}
diff --git a/gnu/fseterr.c b/gnu/fseterr.c
new file mode 100755
index 00000000..b1a379eb
--- /dev/null
+++ b/gnu/fseterr.c
@@ -0,0 +1,74 @@
+/* Set the error indicator of a stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "fseterr.h"
+
+#include <errno.h>
+
+#include "stdio-impl.h"
+
+void
+fseterr (FILE *fp)
+{
+ /* Most systems provide FILE as a struct and the necessary bitmask in
+ <stdio.h>, because they need it for implementing getc() and putc() as
+ fast macros. */
+#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */
+ fp->_flags |= _IO_ERR_SEEN;
+#elif defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+ fp_->_flags |= __SERR;
+#elif defined __EMX__ /* emx+gcc */
+ fp->_flags |= _IOERR;
+#elif defined _IOERR /* AIX, HP-UX, IRIX, OSF/1, Solaris, OpenServer, mingw */
+ fp_->_flag |= _IOERR;
+#elif defined __UCLIBC__ /* uClibc */
+ fp->__modeflags |= __FLAG_ERROR;
+#elif defined __QNX__ /* QNX */
+ fp->_Mode |= 0x200 /* _MERR */;
+#elif defined __MINT__ /* Atari FreeMiNT */
+ fp->__error = 1;
+#elif 0 /* unknown */
+ /* Portable fallback, based on an idea by Rich Felker.
+ Wow! 6 system calls for something that is just a bit operation!
+ Not activated on any system, because there is no way to repair FP when
+ the sequence of system calls fails, and library code should not call
+ abort(). */
+ int saved_errno;
+ int fd;
+ int fd2;
+
+ saved_errno = errno;
+ fflush (fp);
+ fd = fileno (fp);
+ fd2 = dup (fd);
+ if (fd2 >= 0)
+ {
+ close (fd);
+ fputc ('\0', fp); /* This should set the error indicator. */
+ fflush (fp); /* Or this. */
+ if (dup2 (fd2, fd) < 0)
+ /* Whee... we botched the stream and now cannot restore it! */
+ abort ();
+ close (fd2);
+ }
+ errno = saved_errno;
+#else
+ #error "Please port gnulib fseterr.c to your platform! Look at the definitions of ferror and clearerr on your system, then report this to bug-gnulib."
+#endif
+}
diff --git a/gnu/fseterr.h b/gnu/fseterr.h
new file mode 100755
index 00000000..178f0bc7
--- /dev/null
+++ b/gnu/fseterr.h
@@ -0,0 +1,37 @@
+/* Set the error indicator of a stream.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _FSETERR_H
+#define _FSETERR_H
+
+#include <stdio.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Set the error indicator of the stream FP.
+ The "error indicator" is set when an I/O operation on the stream fails, and
+ is cleared (together with the "end-of-file" indicator) by clearerr (FP). */
+extern void fseterr (FILE *fp);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _FSETERR_H */
diff --git a/gnu/ftello.c b/gnu/ftello.c
new file mode 100755
index 00000000..70cd3592
--- /dev/null
+++ b/gnu/ftello.c
@@ -0,0 +1,54 @@
+/* An ftello() function that works around platform bugs.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Get lseek. */
+#include <unistd.h>
+
+#undef ftello
+#if !HAVE_FTELLO
+# undef ftell
+# define ftello ftell
+#endif
+
+off_t
+rpl_ftello (FILE *fp)
+{
+#if LSEEK_PIPE_BROKEN
+ /* mingw gives bogus answers rather than failure on non-seekable files. */
+ if (lseek (fileno (fp), 0, SEEK_CUR) == -1)
+ return -1;
+#endif
+
+#if defined __SL64 && defined __SCLE /* Cygwin */
+ if ((fp->_flags & __SL64) == 0)
+ {
+ /* Cygwin 1.5.0 through 1.5.24 failed to open stdin in 64-bit
+ mode; but has an ftello that requires 64-bit mode. */
+ FILE *tmp = fopen ("/dev/null", "r");
+ if (!tmp)
+ return -1;
+ fp->_flags |= __SL64;
+ fp->_seek64 = tmp->_seek64;
+ fclose (tmp);
+ }
+#endif
+ return ftello (fp);
+}
diff --git a/gnu/getdtablesize.c b/gnu/getdtablesize.c
new file mode 100755
index 00000000..a565a2de
--- /dev/null
+++ b/gnu/getdtablesize.c
@@ -0,0 +1,63 @@
+/* getdtablesize() function for platforms that don't have it.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+#include <stdio.h>
+
+/* Cache for the previous getdtablesize () result. */
+static int dtablesize;
+
+int
+getdtablesize (void)
+{
+ if (dtablesize == 0)
+ {
+ /* We are looking for the number N such that the valid file descriptors
+ are 0..N-1. It can be obtained through a loop as follows:
+ {
+ int fd;
+ for (fd = 3; fd < 65536; fd++)
+ if (dup2 (0, fd) == -1)
+ break;
+ return fd;
+ }
+ On Windows XP, the result is 2048.
+ The drawback of this loop is that it allocates memory for a libc
+ internal array that is never freed.
+
+ The number N can also be obtained as the upper bound for
+ _getmaxstdio (). _getmaxstdio () returns the maximum number of open
+ FILE objects. The sanity check in _setmaxstdio reveals the maximum
+ number of file descriptors. This too allocates memory, but it is
+ freed when we call _setmaxstdio with the original value. */
+ int orig_max_stdio = _getmaxstdio ();
+ unsigned int bound;
+ for (bound = 0x10000; _setmaxstdio (bound) < 0; bound = bound / 2)
+ ;
+ _setmaxstdio (orig_max_stdio);
+ dtablesize = bound;
+ }
+ return dtablesize;
+}
+
+#endif
diff --git a/gnu/gettext.h b/gnu/gettext.h
new file mode 100755
index 00000000..1310b066
--- /dev/null
+++ b/gnu/gettext.h
@@ -0,0 +1,280 @@
+/* Convenience header for conditional use of GNU <libintl.h>.
+ Copyright (C) 1995-1998, 2000-2002, 2004-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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBGETTEXT_H
+#define _LIBGETTEXT_H 1
+
+/* NLS can be disabled through the configure --disable-nls option. */
+#if ENABLE_NLS
+
+/* Get declarations of GNU message catalog functions. */
+# include <libintl.h>
+
+/* You can set the DEFAULT_TEXT_DOMAIN macro to specify the domain used by
+ the gettext() and ngettext() macros. This is an alternative to calling
+ textdomain(), and is useful for libraries. */
+# ifdef DEFAULT_TEXT_DOMAIN
+# undef gettext
+# define gettext(Msgid) \
+ dgettext (DEFAULT_TEXT_DOMAIN, Msgid)
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ dngettext (DEFAULT_TEXT_DOMAIN, Msgid1, Msgid2, N)
+# endif
+
+#else
+
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
+/* Many header files from the libstdc++ coming with g++ 3.3 or newer include
+ <libintl.h>, which chokes if dcgettext is defined as a macro. So include
+ it now, to make later inclusions of <libintl.h> a NOP. */
+#if defined(__cplusplus) && defined(__GNUG__) && (__GNUC__ >= 3)
+# include <cstdlib>
+# if (__GLIBC__ >= 2) || _GLIBCXX_HAVE_LIBINTL_H
+# include <libintl.h>
+# endif
+#endif
+
+/* Disabled NLS.
+ The casts to 'const char *' serve the purpose of producing warnings
+ for invalid uses of the value returned from these functions.
+ On pre-ANSI systems without 'const', the config.h file is supposed to
+ contain "#define const". */
+# undef gettext
+# define gettext(Msgid) ((const char *) (Msgid))
+# undef dgettext
+# define dgettext(Domainname, Msgid) ((void) (Domainname), gettext (Msgid))
+# undef dcgettext
+# define dcgettext(Domainname, Msgid, Category) \
+ ((void) (Category), dgettext (Domainname, Msgid))
+# undef ngettext
+# define ngettext(Msgid1, Msgid2, N) \
+ ((N) == 1 \
+ ? ((void) (Msgid2), (const char *) (Msgid1)) \
+ : ((void) (Msgid1), (const char *) (Msgid2)))
+# undef dngettext
+# define dngettext(Domainname, Msgid1, Msgid2, N) \
+ ((void) (Domainname), ngettext (Msgid1, Msgid2, N))
+# undef dcngettext
+# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
+ ((void) (Category), dngettext(Domainname, Msgid1, Msgid2, N))
+# undef textdomain
+# define textdomain(Domainname) ((const char *) (Domainname))
+# undef bindtextdomain
+# define bindtextdomain(Domainname, Dirname) \
+ ((void) (Domainname), (const char *) (Dirname))
+# undef bind_textdomain_codeset
+# define bind_textdomain_codeset(Domainname, Codeset) \
+ ((void) (Domainname), (const char *) (Codeset))
+
+#endif
+
+/* A pseudo function call that serves as a marker for the automated
+ extraction of messages, but does not call gettext(). The run-time
+ translation is done at a different place in the code.
+ The argument, String, should be a literal string. Concatenated strings
+ and other string expressions won't work.
+ The macro's expansion is not parenthesized, so that it is suitable as
+ initializer for static 'char[]' or 'const char[]' variables. */
+#define gettext_noop(String) String
+
+/* The separator between msgctxt and msgid in a .mo file. */
+#define GETTEXT_CONTEXT_GLUE "\004"
+
+/* Pseudo function calls, taking a MSGCTXT and a MSGID instead of just a
+ MSGID. MSGCTXT and MSGID must be string literals. MSGCTXT should be
+ short and rarely need to change.
+ The letter 'p' stands for 'particular' or 'special'. */
+#ifdef DEFAULT_TEXT_DOMAIN
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#else
+# define pgettext(Msgctxt, Msgid) \
+ pgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#endif
+#define dpgettext(Domainname, Msgctxt, Msgid) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, LC_MESSAGES)
+#define dcpgettext(Domainname, Msgctxt, Msgid, Category) \
+ pgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, Category)
+#ifdef DEFAULT_TEXT_DOMAIN
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (DEFAULT_TEXT_DOMAIN, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#else
+# define npgettext(Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (NULL, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#endif
+#define dnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dcnpgettext(Domainname, Msgctxt, Msgid, MsgidPlural, N, Category) \
+ npgettext_aux (Domainname, Msgctxt GETTEXT_CONTEXT_GLUE Msgid, Msgid, MsgidPlural, N, Category)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+pgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ int category)
+{
+ const char *translation = dcgettext (domain, msg_ctxt_id, category);
+ if (translation == msg_ctxt_id)
+ return msgid;
+ else
+ return translation;
+}
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+npgettext_aux (const char *domain,
+ const char *msg_ctxt_id, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ const char *translation =
+ dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+ if (translation == msg_ctxt_id || translation == msgid_plural)
+ return (n == 1 ? msgid : msgid_plural);
+ else
+ return translation;
+}
+
+/* The same thing extended for non-constant arguments. Here MSGCTXT and MSGID
+ can be arbitrary expressions. But for string literals these macros are
+ less efficient than those above. */
+
+#include <string.h>
+
+#define _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS \
+ (((__GNUC__ >= 3 || __GNUG__ >= 2) && !__STRICT_ANSI__) \
+ /* || __STDC_VERSION__ >= 199901L */ )
+
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+#include <stdlib.h>
+#endif
+
+#define pgettext_expr(Msgctxt, Msgid) \
+ dcpgettext_expr (NULL, Msgctxt, Msgid, LC_MESSAGES)
+#define dpgettext_expr(Domainname, Msgctxt, Msgid) \
+ dcpgettext_expr (Domainname, Msgctxt, Msgid, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcgettext (domain, msg_ctxt_id, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (translation != msg_ctxt_id)
+ return translation;
+ }
+ return msgid;
+}
+
+#define npgettext_expr(Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (NULL, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+#define dnpgettext_expr(Domainname, Msgctxt, Msgid, MsgidPlural, N) \
+ dcnpgettext_expr (Domainname, Msgctxt, Msgid, MsgidPlural, N, LC_MESSAGES)
+
+#ifdef __GNUC__
+__inline
+#else
+#ifdef __cplusplus
+inline
+#endif
+#endif
+static const char *
+dcnpgettext_expr (const char *domain,
+ const char *msgctxt, const char *msgid,
+ const char *msgid_plural, unsigned long int n,
+ int category)
+{
+ size_t msgctxt_len = strlen (msgctxt) + 1;
+ size_t msgid_len = strlen (msgid) + 1;
+ const char *translation;
+#if _LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ char msg_ctxt_id[msgctxt_len + msgid_len];
+#else
+ char buf[1024];
+ char *msg_ctxt_id =
+ (msgctxt_len + msgid_len <= sizeof (buf)
+ ? buf
+ : (char *) malloc (msgctxt_len + msgid_len));
+ if (msg_ctxt_id != NULL)
+#endif
+ {
+ memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1);
+ msg_ctxt_id[msgctxt_len - 1] = '\004';
+ memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len);
+ translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category);
+#if !_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS
+ if (msg_ctxt_id != buf)
+ free (msg_ctxt_id);
+#endif
+ if (!(translation == msg_ctxt_id || translation == msgid_plural))
+ return translation;
+ }
+ return (n == 1 ? msgid : msgid_plural);
+}
+
+#endif /* _LIBGETTEXT_H */
diff --git a/gnu/gettimeofday.c b/gnu/gettimeofday.c
new file mode 100755
index 00000000..74fc5581
--- /dev/null
+++ b/gnu/gettimeofday.c
@@ -0,0 +1,144 @@
+/* Provide gettimeofday for systems that don't have it or for which it's broken.
+
+ Copyright (C) 2001-2003, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+/* Specification. */
+#include <sys/time.h>
+
+#include <time.h>
+
+#if HAVE_SYS_TIMEB_H
+# include <sys/timeb.h>
+#endif
+
+#if GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME
+
+/* Work around the bug in some systems whereby gettimeofday clobbers
+ the static buffer that localtime uses for its return value. The
+ gettimeofday function from Mac OS X 10.0.4 (i.e., Darwin 1.3.7) has
+ this problem. The tzset replacement is necessary for at least
+ Solaris 2.5, 2.5.1, and 2.6. */
+
+static struct tm tm_zero_buffer;
+static struct tm *localtime_buffer_addr = &tm_zero_buffer;
+
+#undef localtime
+extern struct tm *localtime (time_t const *);
+
+#undef gmtime
+extern struct tm *gmtime (time_t const *);
+
+/* This is a wrapper for localtime. It is used only on systems for which
+ gettimeofday clobbers the static buffer used for localtime's result.
+
+ On the first call, record the address of the static buffer that
+ localtime uses for its result. */
+
+struct tm *
+rpl_localtime (time_t const *timep)
+{
+ struct tm *tm = localtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+/* Same as above, since gmtime and localtime use the same buffer. */
+struct tm *
+rpl_gmtime (time_t const *timep)
+{
+ struct tm *tm = gmtime (timep);
+
+ if (localtime_buffer_addr == &tm_zero_buffer)
+ localtime_buffer_addr = tm;
+
+ return tm;
+}
+
+#endif /* GETTIMEOFDAY_CLOBBERS_LOCALTIME || TZSET_CLOBBERS_LOCALTIME */
+
+#if TZSET_CLOBBERS_LOCALTIME
+
+#undef tzset
+extern void tzset (void);
+
+/* This is a wrapper for tzset, for systems on which tzset may clobber
+ the static buffer used for localtime's result. */
+void
+rpl_tzset (void)
+{
+ /* Save and restore the contents of the buffer used for localtime's
+ result around the call to tzset. */
+ struct tm save = *localtime_buffer_addr;
+ tzset ();
+ *localtime_buffer_addr = save;
+}
+#endif
+
+/* This is a wrapper for gettimeofday. It is used only on systems
+ that lack this function, or whose implementation of this function
+ causes problems. */
+
+int
+gettimeofday (struct timeval *restrict tv, void *restrict tz)
+{
+#undef gettimeofday
+#if HAVE_GETTIMEOFDAY
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+ /* Save and restore the contents of the buffer used for localtime's
+ result around the call to gettimeofday. */
+ struct tm save = *localtime_buffer_addr;
+# endif
+
+ int result = gettimeofday (tv, (struct timezone *) tz);
+
+# if GETTIMEOFDAY_CLOBBERS_LOCALTIME
+ *localtime_buffer_addr = save;
+# endif
+
+ return result;
+
+#else
+
+# if HAVE__FTIME
+
+ struct _timeb timebuf;
+ _ftime (&timebuf);
+ tv->tv_sec = timebuf.time;
+ tv->tv_usec = timebuf.millitm * 1000;
+
+# else
+
+# if !defined OK_TO_USE_1S_CLOCK
+# error "Only 1-second nominal clock resolution found. Is that intended?" \
+ "If so, compile with the -DOK_TO_USE_1S_CLOCK option."
+# endif
+ tv->tv_sec = time (NULL);
+ tv->tv_usec = 0;
+
+# endif
+
+ return 0;
+
+#endif
+}
diff --git a/gnu/gl_anyhash_list1.h b/gnu/gl_anyhash_list1.h
new file mode 100755
index 00000000..4e4c91bd
--- /dev/null
+++ b/gnu/gl_anyhash_list1.h
@@ -0,0 +1,27 @@
+/* Sequential list data type implemented by a hash table with another list.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Common code of
+ gl_linkedhash_list.c, gl_avltreehash_list.c, gl_rbtreehash_list.c. */
+
+/* Hash table entry. */
+struct gl_hash_entry
+{
+ struct gl_hash_entry *hash_next; /* chain of entries in same bucket */
+ size_t hashcode; /* cache of values' common hash code */
+};
+typedef struct gl_hash_entry * gl_hash_entry_t;
diff --git a/gnu/gl_anyhash_list2.h b/gnu/gl_anyhash_list2.h
new file mode 100755
index 00000000..43135815
--- /dev/null
+++ b/gnu/gl_anyhash_list2.h
@@ -0,0 +1,138 @@
+/* Sequential list data type implemented by a hash table with another list.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Common code of
+ gl_linkedhash_list.c, gl_avltreehash_list.c, gl_rbtreehash_list.c. */
+
+/* Array of primes, approximately in steps of factor 1.2.
+ This table was computed by executing the Common Lisp expression
+ (dotimes (i 244) (format t "nextprime(~D)~%" (ceiling (expt 1.2d0 i))))
+ and feeding the result to PARI/gp. */
+static const size_t primes[] =
+ {
+ 11, 13, 17, 19, 23, 29, 37, 41, 47, 59, 67, 83, 97, 127, 139, 167, 199,
+ 239, 293, 347, 419, 499, 593, 709, 853, 1021, 1229, 1471, 1777, 2129, 2543,
+ 3049, 3659, 4391, 5273, 6323, 7589, 9103, 10937, 13109, 15727, 18899,
+ 22651, 27179, 32609, 39133, 46957, 56359, 67619, 81157, 97369, 116849,
+ 140221, 168253, 201907, 242309, 290761, 348889, 418667, 502409, 602887,
+ 723467, 868151, 1041779, 1250141, 1500181, 1800191, 2160233, 2592277,
+ 3110741, 3732887, 4479463, 5375371, 6450413, 7740517, 9288589, 11146307,
+ 13375573, 16050689, 19260817, 23112977, 27735583, 33282701, 39939233,
+ 47927081, 57512503, 69014987, 82818011, 99381577, 119257891, 143109469,
+ 171731387, 206077643, 247293161, 296751781, 356102141, 427322587,
+ 512787097, 615344489, 738413383, 886096061, 1063315271, 1275978331,
+ 1531174013, 1837408799, 2204890543UL, 2645868653UL, 3175042391UL,
+ 3810050851UL,
+#if SIZE_MAX > 4294967295UL
+ 4572061027UL, 5486473229UL, 6583767889UL, 7900521449UL, 9480625733UL,
+ 11376750877UL, 13652101063UL, 16382521261UL, 19659025513UL, 23590830631UL,
+ 28308996763UL, 33970796089UL, 40764955463UL, 48917946377UL, 58701535657UL,
+ 70441842749UL, 84530211301UL, 101436253561UL, 121723504277UL,
+ 146068205131UL, 175281846149UL, 210338215379UL, 252405858521UL,
+ 302887030151UL, 363464436191UL, 436157323417UL, 523388788231UL,
+ 628066545713UL, 753679854847UL, 904415825857UL, 1085298991109UL,
+ 1302358789181UL, 1562830547009UL, 1875396656429UL, 2250475987709UL,
+ 2700571185239UL, 3240685422287UL, 3888822506759UL, 4666587008147UL,
+ 5599904409713UL, 6719885291641UL, 8063862349969UL, 9676634819959UL,
+ 11611961783951UL, 13934354140769UL, 16721224968907UL, 20065469962669UL,
+ 24078563955191UL, 28894276746229UL, 34673132095507UL, 41607758514593UL,
+ 49929310217531UL, 59915172260971UL, 71898206713183UL, 86277848055823UL,
+ 103533417666967UL, 124240101200359UL, 149088121440451UL, 178905745728529UL,
+ 214686894874223UL, 257624273849081UL, 309149128618903UL, 370978954342639UL,
+ 445174745211143UL, 534209694253381UL, 641051633104063UL, 769261959724877UL,
+ 923114351670013UL, 1107737222003791UL, 1329284666404567UL,
+ 1595141599685509UL, 1914169919622551UL, 2297003903547091UL,
+ 2756404684256459UL, 3307685621107757UL, 3969222745329323UL,
+ 4763067294395177UL, 5715680753274209UL, 6858816903929113UL,
+ 8230580284714831UL, 9876696341657791UL, 11852035609989371UL,
+ 14222442731987227UL, 17066931278384657UL, 20480317534061597UL,
+ 24576381040873903UL, 29491657249048679UL, 35389988698858471UL,
+ 42467986438630267UL, 50961583726356109UL, 61153900471627387UL,
+ 73384680565952851UL, 88061616679143347UL, 105673940014972061UL,
+ 126808728017966413UL, 152170473621559703UL, 182604568345871671UL,
+ 219125482015045997UL, 262950578418055169UL, 315540694101666193UL,
+ 378648832921999397UL, 454378599506399233UL, 545254319407679131UL,
+ 654305183289214771UL, 785166219947057701UL, 942199463936469157UL,
+ 1130639356723763129UL, 1356767228068515623UL, 1628120673682218619UL,
+ 1953744808418662409UL, 2344493770102394881UL, 2813392524122873857UL,
+ 3376071028947448339UL, 4051285234736937517UL, 4861542281684325481UL,
+ 5833850738021191727UL, 7000620885625427969UL, 8400745062750513217UL,
+ 10080894075300616261UL, 12097072890360739951UL, 14516487468432885797UL,
+ 17419784962119465179UL,
+#endif
+ SIZE_MAX /* sentinel, to ensure the search terminates */
+ };
+
+/* Return a suitable prime >= ESTIMATE. */
+static size_t
+next_prime (size_t estimate)
+{
+ size_t i;
+
+ for (i = 0; i < sizeof (primes) / sizeof (primes[0]); i++)
+ if (primes[i] >= estimate)
+ return primes[i];
+ return SIZE_MAX; /* not a prime, but better than nothing */
+}
+
+/* Resize the hash table with a new estimated size. */
+static void
+hash_resize (gl_list_t list, size_t estimate)
+{
+ size_t new_size = next_prime (estimate);
+
+ if (new_size > list->table_size)
+ {
+ gl_hash_entry_t *old_table = list->table;
+ /* Allocate the new table. */
+ gl_hash_entry_t *new_table;
+ size_t i;
+
+ if (size_overflow_p (xtimes (new_size, sizeof (gl_hash_entry_t))))
+ goto fail;
+ new_table =
+ (gl_hash_entry_t *) calloc (new_size, sizeof (gl_hash_entry_t));
+ if (new_table == NULL)
+ goto fail;
+
+ /* Iterate through the entries of the old table. */
+ for (i = list->table_size; i > 0; )
+ {
+ gl_hash_entry_t node = old_table[--i];
+
+ while (node != NULL)
+ {
+ gl_hash_entry_t next = node->hash_next;
+ /* Add the entry to the new table. */
+ size_t bucket = node->hashcode % new_size;
+ node->hash_next = new_table[bucket];
+ new_table[bucket] = node;
+
+ node = next;
+ }
+ }
+
+ list->table = new_table;
+ list->table_size = new_size;
+ free (old_table);
+ }
+ return;
+
+ fail:
+ /* Just continue without resizing the table. */
+ return;
+}
diff --git a/gnu/gl_anylinked_list1.h b/gnu/gl_anylinked_list1.h
new file mode 100755
index 00000000..121fc826
--- /dev/null
+++ b/gnu/gl_anylinked_list1.h
@@ -0,0 +1,48 @@
+/* Sequential list data type implemented by a linked list.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Common code of gl_linked_list.c and gl_linkedhash_list.c. */
+
+/* -------------------------- gl_list_t Data Type -------------------------- */
+
+/* Concrete list node implementation, valid for this file only. */
+struct gl_list_node_impl
+{
+#if WITH_HASHTABLE
+ struct gl_hash_entry h; /* hash table entry fields; must be first */
+#endif
+ struct gl_list_node_impl *next;
+ struct gl_list_node_impl *prev;
+ const void *value;
+};
+
+/* Concrete gl_list_impl type, valid for this file only. */
+struct gl_list_impl
+{
+ struct gl_list_impl_base base;
+#if WITH_HASHTABLE
+ /* A hash table: managed as an array of collision lists. */
+ struct gl_hash_entry **table;
+ size_t table_size;
+#endif
+ /* A circular list anchored at root.
+ The first node is = root.next, the last node is = root.prev.
+ The root's value is unused. */
+ struct gl_list_node_impl root;
+ /* Number of list nodes, excluding the root. */
+ size_t count;
+};
diff --git a/gnu/gl_anylinked_list2.h b/gnu/gl_anylinked_list2.h
new file mode 100755
index 00000000..770ce8cb
--- /dev/null
+++ b/gnu/gl_anylinked_list2.h
@@ -0,0 +1,1195 @@
+/* Sequential list data type implemented by a linked list.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Common code of gl_linked_list.c and gl_linkedhash_list.c. */
+
+/* If the symbol SIGNAL_SAFE_LIST is defined, the code is compiled in such
+ a way that a gl_list_t data structure may be used from within a signal
+ handler. The operations allowed in the signal handler are:
+ gl_list_iterator, gl_list_iterator_next, gl_list_iterator_free.
+ The list and node fields that are therefore accessed from the signal handler
+ are:
+ list->root, node->next, node->value.
+ We are careful to make modifications to these fields only in an order
+ that maintains the consistency of the list data structure at any moment,
+ and we use 'volatile' assignments to prevent the compiler from reordering
+ such assignments. */
+#ifdef SIGNAL_SAFE_LIST
+# define ASYNCSAFE(type) *(volatile type *)&
+#else
+# define ASYNCSAFE(type)
+#endif
+
+/* -------------------------- gl_list_t Data Type -------------------------- */
+
+static gl_list_t
+gl_linked_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
+
+ list->base.vtable = implementation;
+ list->base.equals_fn = equals_fn;
+ list->base.hashcode_fn = hashcode_fn;
+ list->base.dispose_fn = dispose_fn;
+ list->base.allow_duplicates = allow_duplicates;
+#if WITH_HASHTABLE
+ list->table_size = 11;
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail;
+#endif
+ list->root.next = &list->root;
+ list->root.prev = &list->root;
+ list->count = 0;
+
+ return list;
+
+#if WITH_HASHTABLE
+ fail:
+ free (list);
+ return NULL;
+#endif
+}
+
+static gl_list_t
+gl_linked_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+ gl_list_node_t tail;
+
+ if (list == NULL)
+ return NULL;
+
+ list->base.vtable = implementation;
+ list->base.equals_fn = equals_fn;
+ list->base.hashcode_fn = hashcode_fn;
+ list->base.dispose_fn = dispose_fn;
+ list->base.allow_duplicates = allow_duplicates;
+#if WITH_HASHTABLE
+ {
+ size_t estimate = xsum (count, count / 2); /* 1.5 * count */
+ if (estimate < 10)
+ estimate = 10;
+ list->table_size = next_prime (estimate);
+ if (size_overflow_p (xtimes (list->table_size, sizeof (gl_hash_entry_t))))
+ goto fail1;
+ list->table =
+ (gl_hash_entry_t *) calloc (list->table_size, sizeof (gl_hash_entry_t));
+ if (list->table == NULL)
+ goto fail1;
+ }
+#endif
+ list->count = count;
+ tail = &list->root;
+ for (; count > 0; contents++, count--)
+ {
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ goto fail2;
+
+ node->value = *contents;
+#if WITH_HASHTABLE
+ node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (node->value)
+ : (size_t)(uintptr_t) node->value);
+
+ /* Add node to the hash table. */
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ goto fail2;
+ }
+#endif
+
+ /* Add node to the list. */
+ node->prev = tail;
+ tail->next = node;
+ tail = node;
+ }
+ tail->next = &list->root;
+ list->root.prev = tail;
+
+ return list;
+
+ fail2:
+ {
+ gl_list_node_t node;
+
+ for (node = tail; node != &list->root; )
+ {
+ gl_list_node_t prev = node->prev;
+
+ free (node);
+ node = prev;
+ }
+ }
+#if WITH_HASHTABLE
+ free (list->table);
+ fail1:
+#endif
+ free (list);
+ return NULL;
+}
+
+static size_t
+gl_linked_size (gl_list_t list)
+{
+ return list->count;
+}
+
+static const void *
+gl_linked_node_value (gl_list_t list, gl_list_node_t node)
+{
+ return node->value;
+}
+
+static int
+gl_linked_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+{
+#if WITH_HASHTABLE
+ if (elt != node->value)
+ {
+ size_t new_hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (elt)
+ : (size_t)(uintptr_t) elt);
+
+ if (new_hashcode != node->h.hashcode)
+ {
+ remove_from_bucket (list, node);
+ node->value = elt;
+ node->h.hashcode = new_hashcode;
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_list_node_t before_removed = node->prev;
+ gl_list_node_t after_removed = node->next;
+ ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed;
+ after_removed->prev = before_removed;
+ list->count--;
+ free (node);
+ return -1;
+ }
+ }
+ else
+ node->value = elt;
+ }
+#else
+ node->value = elt;
+#endif
+ return 0;
+}
+
+static gl_list_node_t
+gl_linked_next_node (gl_list_t list, gl_list_node_t node)
+{
+ return (node->next != &list->root ? node->next : NULL);
+}
+
+static gl_list_node_t
+gl_linked_previous_node (gl_list_t list, gl_list_node_t node)
+{
+ return (node->prev != &list->root ? node->prev : NULL);
+}
+
+static const void *
+gl_linked_get_at (gl_list_t list, size_t position)
+{
+ size_t count = list->count;
+ gl_list_node_t node;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ /* Here we know count > 0. */
+ if (position <= ((count - 1) / 2))
+ {
+ node = list->root.next;
+ for (; position > 0; position--)
+ node = node->next;
+ }
+ else
+ {
+ position = count - 1 - position;
+ node = list->root.prev;
+ for (; position > 0; position--)
+ node = node->prev;
+ }
+ return node->value;
+}
+
+static gl_list_node_t
+gl_linked_nx_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ size_t count = list->count;
+ gl_list_node_t node;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ /* Here we know count > 0. */
+ if (position <= ((count - 1) / 2))
+ {
+ node = list->root.next;
+ for (; position > 0; position--)
+ node = node->next;
+ }
+ else
+ {
+ position = count - 1 - position;
+ node = list->root.prev;
+ for (; position > 0; position--)
+ node = node->prev;
+ }
+#if WITH_HASHTABLE
+ if (elt != node->value)
+ {
+ size_t new_hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (elt)
+ : (size_t)(uintptr_t) elt);
+
+ if (new_hashcode != node->h.hashcode)
+ {
+ remove_from_bucket (list, node);
+ node->value = elt;
+ node->h.hashcode = new_hashcode;
+ if (add_to_bucket (list, node) < 0)
+ {
+ /* Out of memory. We removed node from a bucket but cannot add
+ it to another bucket. In order to avoid inconsistencies, we
+ must remove node entirely from the list. */
+ gl_list_node_t before_removed = node->prev;
+ gl_list_node_t after_removed = node->next;
+ ASYNCSAFE(gl_list_node_t) before_removed->next = after_removed;
+ after_removed->prev = before_removed;
+ list->count--;
+ free (node);
+ return NULL;
+ }
+ }
+ else
+ node->value = elt;
+ }
+#else
+ node->value = elt;
+#endif
+ return node;
+}
+
+static gl_list_node_t
+gl_linked_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(start_index <= end_index && end_index <= count))
+ /* Invalid arguments. */
+ abort ();
+ {
+#if WITH_HASHTABLE
+ size_t hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (elt)
+ : (size_t)(uintptr_t) elt);
+ size_t bucket = hashcode % list->table_size;
+ gl_listelement_equals_fn equals = list->base.equals_fn;
+
+ if (!list->base.allow_duplicates)
+ {
+ /* Look for the first match in the hash bucket. */
+ gl_list_node_t found = NULL;
+ gl_list_node_t node;
+
+ for (node = (gl_list_node_t) list->table[bucket];
+ node != NULL;
+ node = (gl_list_node_t) node->h.hash_next)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ {
+ found = node;
+ break;
+ }
+ if (start_index > 0)
+ /* Look whether found's index is < start_index. */
+ for (node = list->root.next; ; node = node->next)
+ {
+ if (node == found)
+ return NULL;
+ if (--start_index == 0)
+ break;
+ }
+ if (end_index < count)
+ /* Look whether found's index is >= end_index. */
+ {
+ end_index = count - end_index;
+ for (node = list->root.prev; ; node = node->prev)
+ {
+ if (node == found)
+ return NULL;
+ if (--end_index == 0)
+ break;
+ }
+ }
+ return found;
+ }
+ else
+ {
+ /* Look whether there is more than one match in the hash bucket. */
+ bool multiple_matches = false;
+ gl_list_node_t first_match = NULL;
+ gl_list_node_t node;
+
+ for (node = (gl_list_node_t) list->table[bucket];
+ node != NULL;
+ node = (gl_list_node_t) node->h.hash_next)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ {
+ if (first_match == NULL)
+ first_match = node;
+ else
+ {
+ multiple_matches = true;
+ break;
+ }
+ }
+ if (multiple_matches)
+ {
+ /* We need the match with the smallest index. But we don't have
+ a fast mapping node -> index. So we have to walk the list. */
+ end_index -= start_index;
+ node = list->root.next;
+ for (; start_index > 0; start_index--)
+ node = node->next;
+
+ for (;
+ end_index > 0;
+ node = node->next, end_index--)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ return node;
+ /* The matches must have all been at indices < start_index or
+ >= end_index. */
+ return NULL;
+ }
+ else
+ {
+ if (start_index > 0)
+ /* Look whether first_match's index is < start_index. */
+ for (node = list->root.next; node != &list->root; node = node->next)
+ {
+ if (node == first_match)
+ return NULL;
+ if (--start_index == 0)
+ break;
+ }
+ if (end_index < list->count)
+ /* Look whether first_match's index is >= end_index. */
+ {
+ end_index = list->count - end_index;
+ for (node = list->root.prev; ; node = node->prev)
+ {
+ if (node == first_match)
+ return NULL;
+ if (--end_index == 0)
+ break;
+ }
+ }
+ return first_match;
+ }
+ }
+#else
+ gl_listelement_equals_fn equals = list->base.equals_fn;
+ gl_list_node_t node = list->root.next;
+
+ end_index -= start_index;
+ for (; start_index > 0; start_index--)
+ node = node->next;
+
+ if (equals != NULL)
+ {
+ for (; end_index > 0; node = node->next, end_index--)
+ if (equals (elt, node->value))
+ return node;
+ }
+ else
+ {
+ for (; end_index > 0; node = node->next, end_index--)
+ if (elt == node->value)
+ return node;
+ }
+ return NULL;
+#endif
+ }
+}
+
+static size_t
+gl_linked_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(start_index <= end_index && end_index <= count))
+ /* Invalid arguments. */
+ abort ();
+ {
+#if WITH_HASHTABLE
+ /* Here the hash table doesn't help much. It only allows us to minimize
+ the number of equals() calls, by looking up first the node and then
+ its index. */
+ size_t hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (elt)
+ : (size_t)(uintptr_t) elt);
+ size_t bucket = hashcode % list->table_size;
+ gl_listelement_equals_fn equals = list->base.equals_fn;
+ gl_list_node_t node;
+
+ /* First step: Look up the node. */
+ if (!list->base.allow_duplicates)
+ {
+ /* Look for the first match in the hash bucket. */
+ for (node = (gl_list_node_t) list->table[bucket];
+ node != NULL;
+ node = (gl_list_node_t) node->h.hash_next)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ break;
+ }
+ else
+ {
+ /* Look whether there is more than one match in the hash bucket. */
+ bool multiple_matches = false;
+ gl_list_node_t first_match = NULL;
+
+ for (node = (gl_list_node_t) list->table[bucket];
+ node != NULL;
+ node = (gl_list_node_t) node->h.hash_next)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ {
+ if (first_match == NULL)
+ first_match = node;
+ else
+ {
+ multiple_matches = true;
+ break;
+ }
+ }
+ if (multiple_matches)
+ {
+ /* We need the match with the smallest index. But we don't have
+ a fast mapping node -> index. So we have to walk the list. */
+ size_t index;
+
+ index = start_index;
+ node = list->root.next;
+ for (; start_index > 0; start_index--)
+ node = node->next;
+
+ for (;
+ index < end_index;
+ node = node->next, index++)
+ if (node->h.hashcode == hashcode
+ && (equals != NULL
+ ? equals (elt, node->value)
+ : elt == node->value))
+ return index;
+ /* The matches must have all been at indices < start_index or
+ >= end_index. */
+ return (size_t)(-1);
+ }
+ node = first_match;
+ }
+
+ /* Second step: Look up the index of the node. */
+ if (node == NULL)
+ return (size_t)(-1);
+ else
+ {
+ size_t index = 0;
+
+ for (; node->prev != &list->root; node = node->prev)
+ index++;
+
+ if (index >= start_index && index < end_index)
+ return index;
+ else
+ return (size_t)(-1);
+ }
+#else
+ gl_listelement_equals_fn equals = list->base.equals_fn;
+ size_t index = start_index;
+ gl_list_node_t node = list->root.next;
+
+ for (; start_index > 0; start_index--)
+ node = node->next;
+
+ if (equals != NULL)
+ {
+ for (;
+ index < end_index;
+ node = node->next, index++)
+ if (equals (elt, node->value))
+ return index;
+ }
+ else
+ {
+ for (;
+ index < end_index;
+ node = node->next, index++)
+ if (elt == node->value)
+ return index;
+ }
+ return (size_t)(-1);
+#endif
+ }
+}
+
+static gl_list_node_t
+gl_linked_nx_add_first (gl_list_t list, const void *elt)
+{
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ return NULL;
+
+ ASYNCSAFE(const void *) node->value = elt;
+#if WITH_HASHTABLE
+ node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (node->value)
+ : (size_t)(uintptr_t) node->value);
+
+ /* Add node to the hash table. */
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ return NULL;
+ }
+#endif
+
+ /* Add node to the list. */
+ node->prev = &list->root;
+ ASYNCSAFE(gl_list_node_t) node->next = list->root.next;
+ node->next->prev = node;
+ ASYNCSAFE(gl_list_node_t) list->root.next = node;
+ list->count++;
+
+#if WITH_HASHTABLE
+ hash_resize_after_add (list);
+#endif
+
+ return node;
+}
+
+static gl_list_node_t
+gl_linked_nx_add_last (gl_list_t list, const void *elt)
+{
+ gl_list_node_t node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (node == NULL)
+ return NULL;
+
+ ASYNCSAFE(const void *) node->value = elt;
+#if WITH_HASHTABLE
+ node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (node->value)
+ : (size_t)(uintptr_t) node->value);
+
+ /* Add node to the hash table. */
+ if (add_to_bucket (list, node) < 0)
+ {
+ free (node);
+ return NULL;
+ }
+#endif
+
+ /* Add node to the list. */
+ ASYNCSAFE(gl_list_node_t) node->next = &list->root;
+ node->prev = list->root.prev;
+ ASYNCSAFE(gl_list_node_t) node->prev->next = node;
+ list->root.prev = node;
+ list->count++;
+
+#if WITH_HASHTABLE
+ hash_resize_after_add (list);
+#endif
+
+ return node;
+}
+
+static gl_list_node_t
+gl_linked_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
+
+ ASYNCSAFE(const void *) new_node->value = elt;
+#if WITH_HASHTABLE
+ new_node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (new_node->value)
+ : (size_t)(uintptr_t) new_node->value);
+
+ /* Add new_node to the hash table. */
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
+#endif
+
+ /* Add new_node to the list. */
+ ASYNCSAFE(gl_list_node_t) new_node->next = node;
+ new_node->prev = node->prev;
+ ASYNCSAFE(gl_list_node_t) new_node->prev->next = new_node;
+ node->prev = new_node;
+ list->count++;
+
+#if WITH_HASHTABLE
+ hash_resize_after_add (list);
+#endif
+
+ return new_node;
+}
+
+static gl_list_node_t
+gl_linked_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t new_node =
+ (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
+
+ ASYNCSAFE(const void *) new_node->value = elt;
+#if WITH_HASHTABLE
+ new_node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (new_node->value)
+ : (size_t)(uintptr_t) new_node->value);
+
+ /* Add new_node to the hash table. */
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
+#endif
+
+ /* Add new_node to the list. */
+ new_node->prev = node;
+ ASYNCSAFE(gl_list_node_t) new_node->next = node->next;
+ new_node->next->prev = new_node;
+ ASYNCSAFE(gl_list_node_t) node->next = new_node;
+ list->count++;
+
+#if WITH_HASHTABLE
+ hash_resize_after_add (list);
+#endif
+
+ return new_node;
+}
+
+static gl_list_node_t
+gl_linked_nx_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ size_t count = list->count;
+ gl_list_node_t new_node;
+
+ if (!(position <= count))
+ /* Invalid argument. */
+ abort ();
+
+ new_node = (struct gl_list_node_impl *) malloc (sizeof (struct gl_list_node_impl));
+ if (new_node == NULL)
+ return NULL;
+
+ ASYNCSAFE(const void *) new_node->value = elt;
+#if WITH_HASHTABLE
+ new_node->h.hashcode =
+ (list->base.hashcode_fn != NULL
+ ? list->base.hashcode_fn (new_node->value)
+ : (size_t)(uintptr_t) new_node->value);
+
+ /* Add new_node to the hash table. */
+ if (add_to_bucket (list, new_node) < 0)
+ {
+ free (new_node);
+ return NULL;
+ }
+#endif
+
+ /* Add new_node to the list. */
+ if (position <= (count / 2))
+ {
+ gl_list_node_t node;
+
+ node = &list->root;
+ for (; position > 0; position--)
+ node = node->next;
+ new_node->prev = node;
+ ASYNCSAFE(gl_list_node_t) new_node->next = node->next;
+ new_node->next->prev = new_node;
+ ASYNCSAFE(gl_list_node_t) node->next = new_node;
+ }
+ else
+ {
+ gl_list_node_t node;
+
+ position = count - position;
+ node = &list->root;
+ for (; position > 0; position--)
+ node = node->prev;
+ ASYNCSAFE(gl_list_node_t) new_node->next = node;
+ new_node->prev = node->prev;
+ ASYNCSAFE(gl_list_node_t) new_node->prev->next = new_node;
+ node->prev = new_node;
+ }
+ list->count++;
+
+#if WITH_HASHTABLE
+ hash_resize_after_add (list);
+#endif
+
+ return new_node;
+}
+
+static bool
+gl_linked_remove_node (gl_list_t list, gl_list_node_t node)
+{
+ gl_list_node_t prev;
+ gl_list_node_t next;
+
+#if WITH_HASHTABLE
+ /* Remove node from the hash table. */
+ remove_from_bucket (list, node);
+#endif
+
+ /* Remove node from the list. */
+ prev = node->prev;
+ next = node->next;
+
+ ASYNCSAFE(gl_list_node_t) prev->next = next;
+ next->prev = prev;
+ list->count--;
+
+ if (list->base.dispose_fn != NULL)
+ list->base.dispose_fn (node->value);
+ free (node);
+ return true;
+}
+
+static bool
+gl_linked_remove_at (gl_list_t list, size_t position)
+{
+ size_t count = list->count;
+ gl_list_node_t removed_node;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ /* Here we know count > 0. */
+ if (position <= ((count - 1) / 2))
+ {
+ gl_list_node_t node;
+ gl_list_node_t after_removed;
+
+ node = &list->root;
+ for (; position > 0; position--)
+ node = node->next;
+ removed_node = node->next;
+ after_removed = node->next->next;
+ ASYNCSAFE(gl_list_node_t) node->next = after_removed;
+ after_removed->prev = node;
+ }
+ else
+ {
+ gl_list_node_t node;
+ gl_list_node_t before_removed;
+
+ position = count - 1 - position;
+ node = &list->root;
+ for (; position > 0; position--)
+ node = node->prev;
+ removed_node = node->prev;
+ before_removed = node->prev->prev;
+ node->prev = before_removed;
+ ASYNCSAFE(gl_list_node_t) before_removed->next = node;
+ }
+#if WITH_HASHTABLE
+ remove_from_bucket (list, removed_node);
+#endif
+ list->count--;
+
+ if (list->base.dispose_fn != NULL)
+ list->base.dispose_fn (removed_node->value);
+ free (removed_node);
+ return true;
+}
+
+static bool
+gl_linked_remove (gl_list_t list, const void *elt)
+{
+ gl_list_node_t node = gl_linked_search_from_to (list, 0, list->count, elt);
+
+ if (node != NULL)
+ return gl_linked_remove_node (list, node);
+ else
+ return false;
+}
+
+static void
+gl_linked_list_free (gl_list_t list)
+{
+ gl_listelement_dispose_fn dispose = list->base.dispose_fn;
+ gl_list_node_t node;
+
+ for (node = list->root.next; node != &list->root; )
+ {
+ gl_list_node_t next = node->next;
+ if (dispose != NULL)
+ dispose (node->value);
+ free (node);
+ node = next;
+ }
+#if WITH_HASHTABLE
+ free (list->table);
+#endif
+ free (list);
+}
+
+/* --------------------- gl_list_iterator_t Data Type --------------------- */
+
+static gl_list_iterator_t
+gl_linked_iterator (gl_list_t list)
+{
+ gl_list_iterator_t result;
+
+ result.vtable = list->base.vtable;
+ result.list = list;
+ result.p = list->root.next;
+ result.q = &list->root;
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+ result.count = 0;
+#endif
+
+ return result;
+}
+
+static gl_list_iterator_t
+gl_linked_iterator_from_to (gl_list_t list,
+ size_t start_index, size_t end_index)
+{
+ gl_list_iterator_t result;
+ size_t n1, n2, n3;
+
+ if (!(start_index <= end_index && end_index <= list->count))
+ /* Invalid arguments. */
+ abort ();
+ result.vtable = list->base.vtable;
+ result.list = list;
+ n1 = start_index;
+ n2 = end_index - start_index;
+ n3 = list->count - end_index;
+ /* Find the maximum among n1, n2, n3, so as to reduce the number of
+ loop iterations to n1 + n2 + n3 - max(n1,n2,n3). */
+ if (n1 > n2 && n1 > n3)
+ {
+ /* n1 is the maximum, use n2 and n3. */
+ gl_list_node_t node;
+ size_t i;
+
+ node = &list->root;
+ for (i = n3; i > 0; i--)
+ node = node->prev;
+ result.q = node;
+ for (i = n2; i > 0; i--)
+ node = node->prev;
+ result.p = node;
+ }
+ else if (n2 > n3)
+ {
+ /* n2 is the maximum, use n1 and n3. */
+ gl_list_node_t node;
+ size_t i;
+
+ node = list->root.next;
+ for (i = n1; i > 0; i--)
+ node = node->next;
+ result.p = node;
+
+ node = &list->root;
+ for (i = n3; i > 0; i--)
+ node = node->prev;
+ result.q = node;
+ }
+ else
+ {
+ /* n3 is the maximum, use n1 and n2. */
+ gl_list_node_t node;
+ size_t i;
+
+ node = list->root.next;
+ for (i = n1; i > 0; i--)
+ node = node->next;
+ result.p = node;
+ for (i = n2; i > 0; i--)
+ node = node->next;
+ result.q = node;
+ }
+
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+ result.count = 0;
+#endif
+
+ return result;
+}
+
+static bool
+gl_linked_iterator_next (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep)
+{
+ if (iterator->p != iterator->q)
+ {
+ gl_list_node_t node = (gl_list_node_t) iterator->p;
+ *eltp = node->value;
+ if (nodep != NULL)
+ *nodep = node;
+ iterator->p = node->next;
+ return true;
+ }
+ else
+ return false;
+}
+
+static void
+gl_linked_iterator_free (gl_list_iterator_t *iterator)
+{
+}
+
+/* ---------------------- Sorted gl_list_t Data Type ---------------------- */
+
+static gl_list_node_t
+gl_linked_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t node;
+
+ for (node = list->root.next; node != &list->root; node = node->next)
+ {
+ int cmp = compar (node->value, elt);
+
+ if (cmp > 0)
+ break;
+ if (cmp == 0)
+ return node;
+ }
+ return NULL;
+}
+
+static gl_list_node_t
+gl_linked_sortedlist_search_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t low, size_t high,
+ const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(low <= high && high <= list->count))
+ /* Invalid arguments. */
+ abort ();
+
+ high -= low;
+ if (high > 0)
+ {
+ /* Here we know low < count. */
+ size_t position = low;
+ gl_list_node_t node;
+
+ if (position <= ((count - 1) / 2))
+ {
+ node = list->root.next;
+ for (; position > 0; position--)
+ node = node->next;
+ }
+ else
+ {
+ position = count - 1 - position;
+ node = list->root.prev;
+ for (; position > 0; position--)
+ node = node->prev;
+ }
+
+ do
+ {
+ int cmp = compar (node->value, elt);
+
+ if (cmp > 0)
+ break;
+ if (cmp == 0)
+ return node;
+ node = node->next;
+ }
+ while (--high > 0);
+ }
+ return NULL;
+}
+
+static size_t
+gl_linked_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t node;
+ size_t index;
+
+ for (node = list->root.next, index = 0;
+ node != &list->root;
+ node = node->next, index++)
+ {
+ int cmp = compar (node->value, elt);
+
+ if (cmp > 0)
+ break;
+ if (cmp == 0)
+ return index;
+ }
+ return (size_t)(-1);
+}
+
+static size_t
+gl_linked_sortedlist_indexof_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t low, size_t high,
+ const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(low <= high && high <= list->count))
+ /* Invalid arguments. */
+ abort ();
+
+ high -= low;
+ if (high > 0)
+ {
+ /* Here we know low < count. */
+ size_t index = low;
+ size_t position = low;
+ gl_list_node_t node;
+
+ if (position <= ((count - 1) / 2))
+ {
+ node = list->root.next;
+ for (; position > 0; position--)
+ node = node->next;
+ }
+ else
+ {
+ position = count - 1 - position;
+ node = list->root.prev;
+ for (; position > 0; position--)
+ node = node->prev;
+ }
+
+ do
+ {
+ int cmp = compar (node->value, elt);
+
+ if (cmp > 0)
+ break;
+ if (cmp == 0)
+ return index;
+ node = node->next;
+ index++;
+ }
+ while (--high > 0);
+ }
+ return (size_t)(-1);
+}
+
+static gl_list_node_t
+gl_linked_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t node;
+
+ for (node = list->root.next; node != &list->root; node = node->next)
+ if (compar (node->value, elt) >= 0)
+ return gl_linked_nx_add_before (list, node, elt);
+ return gl_linked_nx_add_last (list, elt);
+}
+
+static bool
+gl_linked_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t node;
+
+ for (node = list->root.next; node != &list->root; node = node->next)
+ {
+ int cmp = compar (node->value, elt);
+
+ if (cmp > 0)
+ break;
+ if (cmp == 0)
+ return gl_linked_remove_node (list, node);
+ }
+ return false;
+}
diff --git a/gnu/gl_anytree_oset.h b/gnu/gl_anytree_oset.h
new file mode 100755
index 00000000..0ecef1ac
--- /dev/null
+++ b/gnu/gl_anytree_oset.h
@@ -0,0 +1,297 @@
+/* Ordered set data type implemented by a binary tree.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Common code of gl_avltree_oset.c and gl_rbtree_oset.c. */
+
+/* An item on the stack used for iterating across the elements. */
+typedef struct
+{
+ gl_oset_node_t node;
+ bool rightp;
+} iterstack_item_t;
+
+/* A stack used for iterating across the elements. */
+typedef iterstack_item_t iterstack_t[MAXHEIGHT];
+
+static gl_oset_t
+gl_tree_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ struct gl_oset_impl *set =
+ (struct gl_oset_impl *) malloc (sizeof (struct gl_oset_impl));
+
+ if (set == NULL)
+ return NULL;
+
+ set->base.vtable = implementation;
+ set->base.compar_fn = compar_fn;
+ set->base.dispose_fn = dispose_fn;
+ set->root = NULL;
+ set->count = 0;
+
+ return set;
+}
+
+static size_t
+gl_tree_size (gl_oset_t set)
+{
+ return set->count;
+}
+
+static bool
+gl_tree_search (gl_oset_t set, const void *elt)
+{
+ gl_setelement_compar_fn compar = set->base.compar_fn;
+ gl_oset_node_t node;
+
+ for (node = set->root; node != NULL; )
+ {
+ int cmp = (compar != NULL
+ ? compar (node->value, elt)
+ : (node->value > elt ? 1 :
+ node->value < elt ? -1 : 0));
+
+ if (cmp < 0)
+ node = node->right;
+ else if (cmp > 0)
+ node = node->left;
+ else /* cmp == 0 */
+ /* We have an element equal to ELT. */
+ return true;
+ }
+ return false;
+}
+
+static bool
+gl_tree_search_atleast (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold,
+ const void **eltp)
+{
+ gl_oset_node_t node;
+
+ for (node = set->root; node != NULL; )
+ {
+ if (! threshold_fn (node->value, threshold))
+ node = node->right;
+ else
+ {
+ /* We have an element >= VALUE. But we need the leftmost such
+ element. */
+ gl_oset_node_t found = node;
+ node = node->left;
+ for (; node != NULL; )
+ {
+ if (! threshold_fn (node->value, threshold))
+ node = node->right;
+ else
+ {
+ found = node;
+ node = node->left;
+ }
+ }
+ *eltp = found->value;
+ return true;
+ }
+ }
+ return false;
+}
+
+static gl_oset_node_t
+gl_tree_search_node (gl_oset_t set, const void *elt)
+{
+ gl_setelement_compar_fn compar = set->base.compar_fn;
+ gl_oset_node_t node;
+
+ for (node = set->root; node != NULL; )
+ {
+ int cmp = (compar != NULL
+ ? compar (node->value, elt)
+ : (node->value > elt ? 1 :
+ node->value < elt ? -1 : 0));
+
+ if (cmp < 0)
+ node = node->right;
+ else if (cmp > 0)
+ node = node->left;
+ else /* cmp == 0 */
+ /* We have an element equal to ELT. */
+ return node;
+ }
+ return NULL;
+}
+
+static int
+gl_tree_nx_add (gl_oset_t set, const void *elt)
+{
+ gl_setelement_compar_fn compar;
+ gl_oset_node_t node = set->root;
+
+ if (node == NULL)
+ {
+ if (gl_tree_nx_add_first (set, elt) == NULL)
+ return -1;
+ return true;
+ }
+
+ compar = set->base.compar_fn;
+
+ for (;;)
+ {
+ int cmp = (compar != NULL
+ ? compar (node->value, elt)
+ : (node->value > elt ? 1 :
+ node->value < elt ? -1 : 0));
+
+ if (cmp < 0)
+ {
+ if (node->right == NULL)
+ {
+ if (gl_tree_nx_add_after (set, node, elt) == NULL)
+ return -1;
+ return true;
+ }
+ node = node->right;
+ }
+ else if (cmp > 0)
+ {
+ if (node->left == NULL)
+ {
+ if (gl_tree_nx_add_before (set, node, elt) == NULL)
+ return -1;
+ return true;
+ }
+ node = node->left;
+ }
+ else /* cmp == 0 */
+ return false;
+ }
+}
+
+static bool
+gl_tree_remove (gl_oset_t set, const void *elt)
+{
+ gl_oset_node_t node = gl_tree_search_node (set, elt);
+
+ if (node != NULL)
+ return gl_tree_remove_node (set, node);
+ else
+ return false;
+}
+
+static void
+gl_tree_oset_free (gl_oset_t set)
+{
+ /* Iterate across all elements in post-order. */
+ gl_oset_node_t node = set->root;
+ iterstack_t stack;
+ iterstack_item_t *stack_ptr = &stack[0];
+
+ for (;;)
+ {
+ /* Descend on left branch. */
+ for (;;)
+ {
+ if (node == NULL)
+ break;
+ stack_ptr->node = node;
+ stack_ptr->rightp = false;
+ node = node->left;
+ stack_ptr++;
+ }
+ /* Climb up again. */
+ for (;;)
+ {
+ if (stack_ptr == &stack[0])
+ goto done_iterate;
+ stack_ptr--;
+ node = stack_ptr->node;
+ if (!stack_ptr->rightp)
+ break;
+ /* Free the current node. */
+ if (set->base.dispose_fn != NULL)
+ set->base.dispose_fn (node->value);
+ free (node);
+ }
+ /* Descend on right branch. */
+ stack_ptr->rightp = true;
+ node = node->right;
+ stack_ptr++;
+ }
+ done_iterate:
+ free (set);
+}
+
+/* --------------------- gl_oset_iterator_t Data Type --------------------- */
+
+static gl_oset_iterator_t
+gl_tree_iterator (gl_oset_t set)
+{
+ gl_oset_iterator_t result;
+ gl_oset_node_t node;
+
+ result.vtable = set->base.vtable;
+ result.set = set;
+ /* Start node is the leftmost node. */
+ node = set->root;
+ if (node != NULL)
+ while (node->left != NULL)
+ node = node->left;
+ result.p = node;
+ /* End point is past the rightmost node. */
+ result.q = NULL;
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+ result.count = 0;
+#endif
+
+ return result;
+}
+
+static bool
+gl_tree_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
+{
+ if (iterator->p != iterator->q)
+ {
+ gl_oset_node_t node = (gl_oset_node_t) iterator->p;
+ *eltp = node->value;
+ /* Advance to the next node. */
+ if (node->right != NULL)
+ {
+ node = node->right;
+ while (node->left != NULL)
+ node = node->left;
+ }
+ else
+ {
+ while (node->parent != NULL && node->parent->right == node)
+ node = node->parent;
+ node = node->parent;
+ }
+ iterator->p = node;
+ return true;
+ }
+ else
+ return false;
+}
+
+static void
+gl_tree_iterator_free (gl_oset_iterator_t *iterator)
+{
+}
diff --git a/gnu/gl_avltree_oset.c b/gnu/gl_avltree_oset.c
new file mode 100755
index 00000000..f566d557
--- /dev/null
+++ b/gnu/gl_avltree_oset.c
@@ -0,0 +1,583 @@
+/* Ordered set data type implemented by a binary tree.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_avltree_oset.h"
+
+#include <stdlib.h>
+
+/* An AVL tree is a binary tree where
+ 1. The height of each node is calculated as
+ heightof(node) = 1 + max (heightof(node.left), heightof(node.right)).
+ 2. The heights of the subtrees of each node differ by at most 1:
+ | heightof(right) - heightof(left) | <= 1.
+ 3. The index of the elements in the node.left subtree are smaller than
+ the index of node.
+ The index of the elements in the node.right subtree are larger than
+ the index of node.
+ */
+
+/* -------------------------- gl_oset_t Data Type -------------------------- */
+
+/* Tree node implementation, valid for this file only. */
+struct gl_oset_node_impl
+{
+ struct gl_oset_node_impl *left; /* left branch, or NULL */
+ struct gl_oset_node_impl *right; /* right branch, or NULL */
+ /* Parent pointer, or NULL. The parent pointer is not needed for most
+ operations. It is needed so that a gl_oset_node_t can be returned
+ without memory allocation, on which the functions gl_oset_remove_node,
+ gl_oset_add_before, gl_oset_add_after can be implemented. */
+ struct gl_oset_node_impl *parent;
+ int balance; /* heightof(right) - heightof(left),
+ always = -1 or 0 or 1 */
+ const void *value;
+};
+typedef struct gl_oset_node_impl * gl_oset_node_t;
+
+/* Concrete gl_oset_impl type, valid for this file only. */
+struct gl_oset_impl
+{
+ struct gl_oset_impl_base base;
+ struct gl_oset_node_impl *root; /* root node or NULL */
+ size_t count; /* number of nodes */
+};
+
+/* An AVL tree of height h has at least F_(h+2) [Fibonacci number] and at most
+ 2^h - 1 elements. So, h <= 84 (because a tree of height h >= 85 would have
+ at least F_87 elements, and because even on 64-bit machines,
+ sizeof (gl_oset_node_impl) * F_87 > 2^64
+ this would exceed the address space of the machine. */
+#define MAXHEIGHT 83
+
+/* Ensure the tree is balanced, after an insertion or deletion operation.
+ The height of NODE is incremented by HEIGHT_DIFF (1 or -1).
+ PARENT = NODE->parent. (NODE can also be NULL. But PARENT is non-NULL.)
+ Rotation operations are performed starting at PARENT (not NODE itself!). */
+static void
+rebalance (gl_oset_t set,
+ gl_oset_node_t node, int height_diff, gl_oset_node_t parent)
+{
+ for (;;)
+ {
+ gl_oset_node_t child;
+ int previous_balance;
+ int balance_diff;
+ gl_oset_node_t nodeleft;
+ gl_oset_node_t noderight;
+
+ child = node;
+ node = parent;
+
+ previous_balance = node->balance;
+
+ /* The balance of NODE is incremented by BALANCE_DIFF: +1 if the right
+ branch's height has increased by 1 or the left branch's height has
+ decreased by 1, -1 if the right branch's height has decreased by 1 or
+ the left branch's height has increased by 1, 0 if no height change. */
+ if (node->left != NULL || node->right != NULL)
+ balance_diff = (child == node->right ? height_diff : -height_diff);
+ else
+ /* Special case where above formula doesn't work, because the caller
+ didn't tell whether node's left or right branch shrunk from height 1
+ to NULL. */
+ balance_diff = - previous_balance;
+
+ node->balance += balance_diff;
+ if (balance_diff == previous_balance)
+ {
+ /* node->balance is outside the range [-1,1]. Must rotate. */
+ gl_oset_node_t *nodep;
+
+ if (node->parent == NULL)
+ /* node == set->root */
+ nodep = &set->root;
+ else if (node->parent->left == node)
+ nodep = &node->parent->left;
+ else if (node->parent->right == node)
+ nodep = &node->parent->right;
+ else
+ abort ();
+
+ nodeleft = node->left;
+ noderight = node->right;
+
+ if (balance_diff < 0)
+ {
+ /* node->balance = -2. The subtree is heavier on the left side.
+ Rotate from left to right:
+
+ *
+ / \
+ h+2 h
+ */
+ gl_oset_node_t nodeleftright = nodeleft->right;
+ if (nodeleft->balance <= 0)
+ {
+ /*
+ * h+2|h+3
+ / \ / \
+ h+2 h --> / h+1|h+2
+ / \ | / \
+ h+1 h|h+1 h+1 h|h+1 h
+ */
+ node->left = nodeleftright;
+ nodeleft->right = node;
+
+ nodeleft->parent = node->parent;
+ node->parent = nodeleft;
+ if (nodeleftright != NULL)
+ nodeleftright->parent = node;
+
+ nodeleft->balance += 1;
+ node->balance = - nodeleft->balance;
+
+ *nodep = nodeleft;
+ height_diff = (height_diff < 0
+ ? /* noderight's height had been decremented from
+ h+1 to h. The subtree's height changes from
+ h+3 to h+2|h+3. */
+ nodeleft->balance - 1
+ : /* nodeleft's height had been incremented from
+ h+1 to h+2. The subtree's height changes from
+ h+2 to h+2|h+3. */
+ nodeleft->balance);
+ }
+ else
+ {
+ /*
+ * h+2
+ / \ / \
+ h+2 h --> h+1 h+1
+ / \ / \ / \
+ h h+1 h L R h
+ / \
+ L R
+
+ */
+ gl_oset_node_t L = nodeleft->right = nodeleftright->left;
+ gl_oset_node_t R = node->left = nodeleftright->right;
+ nodeleftright->left = nodeleft;
+ nodeleftright->right = node;
+
+ nodeleftright->parent = node->parent;
+ if (L != NULL)
+ L->parent = nodeleft;
+ if (R != NULL)
+ R->parent = node;
+ nodeleft->parent = nodeleftright;
+ node->parent = nodeleftright;
+
+ nodeleft->balance = (nodeleftright->balance > 0 ? -1 : 0);
+ node->balance = (nodeleftright->balance < 0 ? 1 : 0);
+ nodeleftright->balance = 0;
+
+ *nodep = nodeleftright;
+ height_diff = (height_diff < 0
+ ? /* noderight's height had been decremented from
+ h+1 to h. The subtree's height changes from
+ h+3 to h+2. */
+ -1
+ : /* nodeleft's height had been incremented from
+ h+1 to h+2. The subtree's height changes from
+ h+2 to h+2. */
+ 0);
+ }
+ }
+ else
+ {
+ /* node->balance = 2. The subtree is heavier on the right side.
+ Rotate from right to left:
+
+ *
+ / \
+ h h+2
+ */
+ gl_oset_node_t noderightleft = noderight->left;
+ if (noderight->balance >= 0)
+ {
+ /*
+ * h+2|h+3
+ / \ / \
+ h h+2 --> h+1|h+2 \
+ / \ / \ |
+ h|h+1 h+1 h h|h+1 h+1
+ */
+ node->right = noderightleft;
+ noderight->left = node;
+
+ noderight->parent = node->parent;
+ node->parent = noderight;
+ if (noderightleft != NULL)
+ noderightleft->parent = node;
+
+ noderight->balance -= 1;
+ node->balance = - noderight->balance;
+
+ *nodep = noderight;
+ height_diff = (height_diff < 0
+ ? /* nodeleft's height had been decremented from
+ h+1 to h. The subtree's height changes from
+ h+3 to h+2|h+3. */
+ - noderight->balance - 1
+ : /* noderight's height had been incremented from
+ h+1 to h+2. The subtree's height changes from
+ h+2 to h+2|h+3. */
+ - noderight->balance);
+ }
+ else
+ {
+ /*
+ * h+2
+ / \ / \
+ h h+2 --> h+1 h+1
+ / \ / \ / \
+ h+1 h h L R h
+ / \
+ L R
+
+ */
+ gl_oset_node_t L = node->right = noderightleft->left;
+ gl_oset_node_t R = noderight->left = noderightleft->right;
+ noderightleft->left = node;
+ noderightleft->right = noderight;
+
+ noderightleft->parent = node->parent;
+ if (L != NULL)
+ L->parent = node;
+ if (R != NULL)
+ R->parent = noderight;
+ node->parent = noderightleft;
+ noderight->parent = noderightleft;
+
+ node->balance = (noderightleft->balance > 0 ? -1 : 0);
+ noderight->balance = (noderightleft->balance < 0 ? 1 : 0);
+ noderightleft->balance = 0;
+
+ *nodep = noderightleft;
+ height_diff = (height_diff < 0
+ ? /* nodeleft's height had been decremented from
+ h+1 to h. The subtree's height changes from
+ h+3 to h+2. */
+ -1
+ : /* noderight's height had been incremented from
+ h+1 to h+2. The subtree's height changes from
+ h+2 to h+2. */
+ 0);
+ }
+ }
+ node = *nodep;
+ }
+ else
+ {
+ /* No rotation needed. Only propagation of the height change to the
+ next higher level. */
+ if (height_diff < 0)
+ height_diff = (previous_balance == 0 ? 0 : -1);
+ else
+ height_diff = (node->balance == 0 ? 0 : 1);
+ }
+
+ if (height_diff == 0)
+ break;
+
+ parent = node->parent;
+ if (parent == NULL)
+ break;
+ }
+}
+
+static gl_oset_node_t
+gl_tree_nx_add_first (gl_oset_t set, const void *elt)
+{
+ /* Create new node. */
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+
+ if (new_node == NULL)
+ return NULL;
+
+ new_node->left = NULL;
+ new_node->right = NULL;
+ new_node->balance = 0;
+ new_node->value = elt;
+
+ /* Add it to the tree. */
+ if (set->root == NULL)
+ {
+ set->root = new_node;
+ new_node->parent = NULL;
+ }
+ else
+ {
+ gl_oset_node_t node;
+
+ for (node = set->root; node->left != NULL; )
+ node = node->left;
+
+ node->left = new_node;
+ new_node->parent = node;
+ node->balance--;
+
+ /* Rebalance. */
+ if (node->right == NULL && node->parent != NULL)
+ rebalance (set, node, 1, node->parent);
+ }
+
+ set->count++;
+ return new_node;
+}
+
+static gl_oset_node_t
+gl_tree_nx_add_before (gl_oset_t set, gl_oset_node_t node, const void *elt)
+{
+ /* Create new node. */
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+ bool height_inc;
+
+ if (new_node == NULL)
+ return NULL;
+
+ new_node->left = NULL;
+ new_node->right = NULL;
+ new_node->balance = 0;
+ new_node->value = elt;
+
+ /* Add it to the tree. */
+ if (node->left == NULL)
+ {
+ node->left = new_node;
+ node->balance--;
+ height_inc = (node->right == NULL);
+ }
+ else
+ {
+ for (node = node->left; node->right != NULL; )
+ node = node->right;
+ node->right = new_node;
+ node->balance++;
+ height_inc = (node->left == NULL);
+ }
+ new_node->parent = node;
+
+ /* Rebalance. */
+ if (height_inc && node->parent != NULL)
+ rebalance (set, node, 1, node->parent);
+
+ set->count++;
+ return new_node;
+}
+
+static gl_oset_node_t
+gl_tree_nx_add_after (gl_oset_t set, gl_oset_node_t node, const void *elt)
+{
+ /* Create new node. */
+ gl_oset_node_t new_node =
+ (struct gl_oset_node_impl *) malloc (sizeof (struct gl_oset_node_impl));
+ bool height_inc;
+
+ if (new_node == NULL)
+ return NULL;
+
+ new_node->left = NULL;
+ new_node->right = NULL;
+ new_node->balance = 0;
+ new_node->value = elt;
+
+ /* Add it to the tree. */
+ if (node->right == NULL)
+ {
+ node->right = new_node;
+ node->balance++;
+ height_inc = (node->left == NULL);
+ }
+ else
+ {
+ for (node = node->right; node->left != NULL; )
+ node = node->left;
+ node->left = new_node;
+ node->balance--;
+ height_inc = (node->right == NULL);
+ }
+ new_node->parent = node;
+
+ /* Rebalance. */
+ if (height_inc && node->parent != NULL)
+ rebalance (set, node, 1, node->parent);
+
+ set->count++;
+ return new_node;
+}
+
+static bool
+gl_tree_remove_node (gl_oset_t set, gl_oset_node_t node)
+{
+ gl_oset_node_t parent = node->parent;
+
+ if (node->left == NULL)
+ {
+ /* Replace node with node->right. */
+ gl_oset_node_t child = node->right;
+
+ if (child != NULL)
+ child->parent = parent;
+ if (parent == NULL)
+ set->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ rebalance (set, child, -1, parent);
+ }
+ }
+ else if (node->right == NULL)
+ {
+ /* It is not absolutely necessary to treat this case. But the more
+ general case below is more complicated, hence slower. */
+ /* Replace node with node->left. */
+ gl_oset_node_t child = node->left;
+
+ child->parent = parent;
+ if (parent == NULL)
+ set->root = child;
+ else
+ {
+ if (parent->left == node)
+ parent->left = child;
+ else /* parent->right == node */
+ parent->right = child;
+
+ rebalance (set, child, -1, parent);
+ }
+ }
+ else
+ {
+ /* Replace node with the rightmost element of the node->left subtree. */
+ gl_oset_node_t subst;
+ gl_oset_node_t subst_parent;
+ gl_oset_node_t child;
+
+ for (subst = node->left; subst->right != NULL; )
+ subst = subst->right;
+
+ subst_parent = subst->parent;
+
+ child = subst->left;
+
+ /* The case subst_parent == node is special: If we do nothing special,
+ we get confusion about node->left, subst->left and child->parent.
+ subst_parent == node
+ <==> The 'for' loop above terminated immediately.
+ <==> subst == subst_parent->left
+ [otherwise subst == subst_parent->right]
+ In this case, we would need to first set
+ child->parent = node; node->left = child;
+ and later - when we copy subst into node's position - again
+ child->parent = subst; subst->left = child;
+ Altogether a no-op. */
+ if (subst_parent != node)
+ {
+ if (child != NULL)
+ child->parent = subst_parent;
+ subst_parent->right = child;
+ }
+
+ /* Copy subst into node's position.
+ (This is safer than to copy subst's value into node, keep node in
+ place, and free subst.) */
+ if (subst_parent != node)
+ {
+ subst->left = node->left;
+ subst->left->parent = subst;
+ }
+ subst->right = node->right;
+ subst->right->parent = subst;
+ subst->balance = node->balance;
+ subst->parent = parent;
+ if (parent == NULL)
+ set->root = subst;
+ else if (parent->left == node)
+ parent->left = subst;
+ else /* parent->right == node */
+ parent->right = subst;
+
+ /* Rebalancing starts at child's parent, that is subst_parent -
+ except when subst_parent == node. In this case, we need to use
+ its replacement, subst. */
+ rebalance (set, child, -1, subst_parent != node ? subst_parent : subst);
+ }
+
+ set->count--;
+ if (set->base.dispose_fn != NULL)
+ set->base.dispose_fn (node->value);
+ free (node);
+ return true;
+}
+
+/* Generic binary tree code. */
+#include "gl_anytree_oset.h"
+
+/* For debugging. */
+static unsigned int
+check_invariants (gl_oset_node_t node, gl_oset_node_t parent, size_t *counterp)
+{
+ unsigned int left_height =
+ (node->left != NULL ? check_invariants (node->left, node, counterp) : 0);
+ unsigned int right_height =
+ (node->right != NULL ? check_invariants (node->right, node, counterp) : 0);
+ int balance = (int)right_height - (int)left_height;
+
+ if (!(node->parent == parent))
+ abort ();
+ if (!(balance >= -1 && balance <= 1))
+ abort ();
+ if (!(node->balance == balance))
+ abort ();
+
+ (*counterp)++;
+
+ return 1 + (left_height > right_height ? left_height : right_height);
+}
+void
+gl_avltree_oset_check_invariants (gl_oset_t set)
+{
+ size_t counter = 0;
+ if (set->root != NULL)
+ check_invariants (set->root, NULL, &counter);
+ if (!(set->count == counter))
+ abort ();
+}
+
+const struct gl_oset_implementation gl_avltree_oset_implementation =
+ {
+ gl_tree_nx_create_empty,
+ gl_tree_size,
+ gl_tree_search,
+ gl_tree_search_atleast,
+ gl_tree_nx_add,
+ gl_tree_remove,
+ gl_tree_oset_free,
+ gl_tree_iterator,
+ gl_tree_iterator_next,
+ gl_tree_iterator_free
+ };
diff --git a/gnu/gl_avltree_oset.h b/gnu/gl_avltree_oset.h
new file mode 100755
index 00000000..4f5ea78e
--- /dev/null
+++ b/gnu/gl_avltree_oset.h
@@ -0,0 +1,34 @@
+/* Ordered set data type implemented by a binary tree.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_AVLTREE_OSET_H
+#define _GL_AVLTREE_OSET_H
+
+#include "gl_oset.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const struct gl_oset_implementation gl_avltree_oset_implementation;
+#define GL_AVLTREE_OSET &gl_avltree_oset_implementation
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_AVLTREE_OSET_H */
diff --git a/gnu/gl_linkedhash_list.c b/gnu/gl_linkedhash_list.c
new file mode 100755
index 00000000..467e4110
--- /dev/null
+++ b/gnu/gl_linkedhash_list.c
@@ -0,0 +1,124 @@
+/* Sequential list data type implemented by a hash table with a linked list.
+ Copyright (C) 2006, 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_linkedhash_list.h"
+
+#include <stdint.h> /* for SIZE_MAX */
+#include <stdlib.h>
+
+#include "xsize.h"
+
+#ifndef uintptr_t
+# define uintptr_t unsigned long
+#endif
+
+#define WITH_HASHTABLE 1
+
+/* -------------------------- gl_list_t Data Type -------------------------- */
+
+/* Generic hash-table code. */
+#include "gl_anyhash_list1.h"
+
+/* Generic linked list code. */
+#include "gl_anylinked_list1.h"
+
+/* Generic hash-table code. */
+#include "gl_anyhash_list2.h"
+
+/* Resize the hash table if needed, after list->count was incremented. */
+static inline void
+hash_resize_after_add (gl_list_t list)
+{
+ size_t count = list->count;
+ size_t estimate = xsum (count, count / 2); /* 1.5 * count */
+ if (estimate > list->table_size)
+ hash_resize (list, estimate);
+}
+
+/* Add a node to the hash table structure. */
+static inline void
+add_to_bucket (gl_list_t list, gl_list_node_t node)
+{
+ size_t bucket = node->h.hashcode % list->table_size;
+
+ node->h.hash_next = list->table[bucket];
+ list->table[bucket] = &node->h;
+}
+/* Tell all compilers that the return value is 0. */
+#define add_to_bucket(list,node) ((add_to_bucket) (list, node), 0)
+
+/* Remove a node from the hash table structure. */
+static inline void
+remove_from_bucket (gl_list_t list, gl_list_node_t node)
+{
+ size_t bucket = node->h.hashcode % list->table_size;
+ gl_hash_entry_t *p;
+
+ for (p = &list->table[bucket]; ; p = &(*p)->hash_next)
+ {
+ if (*p == &node->h)
+ {
+ *p = node->h.hash_next;
+ break;
+ }
+ if (*p == NULL)
+ /* node is not in the right bucket. Did the hash codes
+ change inadvertently? */
+ abort ();
+ }
+}
+
+/* Generic linked list code. */
+#include "gl_anylinked_list2.h"
+
+
+const struct gl_list_implementation gl_linkedhash_list_implementation =
+ {
+ gl_linked_nx_create_empty,
+ gl_linked_nx_create,
+ gl_linked_size,
+ gl_linked_node_value,
+ gl_linked_node_nx_set_value,
+ gl_linked_next_node,
+ gl_linked_previous_node,
+ gl_linked_get_at,
+ gl_linked_nx_set_at,
+ gl_linked_search_from_to,
+ gl_linked_indexof_from_to,
+ gl_linked_nx_add_first,
+ gl_linked_nx_add_last,
+ gl_linked_nx_add_before,
+ gl_linked_nx_add_after,
+ gl_linked_nx_add_at,
+ gl_linked_remove_node,
+ gl_linked_remove_at,
+ gl_linked_remove,
+ gl_linked_list_free,
+ gl_linked_iterator,
+ gl_linked_iterator_from_to,
+ gl_linked_iterator_next,
+ gl_linked_iterator_free,
+ gl_linked_sortedlist_search,
+ gl_linked_sortedlist_search_from_to,
+ gl_linked_sortedlist_indexof,
+ gl_linked_sortedlist_indexof_from_to,
+ gl_linked_sortedlist_nx_add,
+ gl_linked_sortedlist_remove
+ };
diff --git a/gnu/gl_linkedhash_list.h b/gnu/gl_linkedhash_list.h
new file mode 100755
index 00000000..20bc62d6
--- /dev/null
+++ b/gnu/gl_linkedhash_list.h
@@ -0,0 +1,34 @@
+/* Sequential list data type implemented by a hash table with a linked list.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_LINKEDHASH_LIST_H
+#define _GL_LINKEDHASH_LIST_H
+
+#include "gl_list.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const struct gl_list_implementation gl_linkedhash_list_implementation;
+#define GL_LINKEDHASH_LIST &gl_linkedhash_list_implementation
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_LINKEDHASH_LIST_H */
diff --git a/gnu/gl_list.c b/gnu/gl_list.c
new file mode 100755
index 00000000..4a2c0356
--- /dev/null
+++ b/gnu/gl_list.c
@@ -0,0 +1,283 @@
+/* Abstract sequential list data type.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_list.h"
+
+#if !HAVE_INLINE
+
+/* Define all functions of this file as inline accesses to the
+ struct gl_list_implementation.
+ Use #define to avoid a warning because of extern vs. static. */
+
+gl_list_t
+gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ return implementation->nx_create_empty (implementation, equals_fn,
+ hashcode_fn, dispose_fn,
+ allow_duplicates);
+}
+
+gl_list_t
+gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ return implementation->nx_create (implementation, equals_fn, hashcode_fn,
+ dispose_fn, allow_duplicates, count,
+ contents);
+}
+
+size_t
+gl_list_size (gl_list_t list)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->size (list);
+}
+
+const void *
+gl_list_node_value (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_value (list, node);
+}
+
+int
+gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_nx_set_value (list, node, elt);
+}
+
+gl_list_node_t
+gl_list_next_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->next_node (list, node);
+}
+
+gl_list_node_t
+gl_list_previous_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->previous_node (list, node);
+}
+
+const void *
+gl_list_get_at (gl_list_t list, size_t position)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->get_at (list, position);
+}
+
+gl_list_node_t
+gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_set_at (list, position, elt);
+}
+
+gl_list_node_t
+gl_list_search (gl_list_t list, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, 0, size, elt);
+}
+
+gl_list_node_t
+gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, start_index, size, elt);
+}
+
+gl_list_node_t
+gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, start_index, end_index, elt);
+}
+
+size_t
+gl_list_indexof (gl_list_t list, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, 0, size, elt);
+}
+
+size_t
+gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, start_index, size, elt);
+}
+
+size_t
+gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, start_index, end_index, elt);
+}
+
+gl_list_node_t
+gl_list_nx_add_first (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_first (list, elt);
+}
+
+gl_list_node_t
+gl_list_nx_add_last (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_last (list, elt);
+}
+
+gl_list_node_t
+gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_before (list, node, elt);
+}
+
+gl_list_node_t
+gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_after (list, node, elt);
+}
+
+gl_list_node_t
+gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_at (list, position, elt);
+}
+
+bool
+gl_list_remove_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_node (list, node);
+}
+
+bool
+gl_list_remove_at (gl_list_t list, size_t position)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_at (list, position);
+}
+
+bool
+gl_list_remove (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_elt (list, elt);
+}
+
+void
+gl_list_free (gl_list_t list)
+{
+ ((const struct gl_list_impl_base *) list)->vtable->list_free (list);
+}
+
+gl_list_iterator_t
+gl_list_iterator (gl_list_t list)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->iterator (list);
+}
+
+gl_list_iterator_t
+gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->iterator_from_to (list, start_index, end_index);
+}
+
+bool
+gl_list_iterator_next (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep)
+{
+ return iterator->vtable->iterator_next (iterator, eltp, nodep);
+}
+
+void
+gl_list_iterator_free (gl_list_iterator_t *iterator)
+{
+ iterator->vtable->iterator_free (iterator);
+}
+
+gl_list_node_t
+gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_search (list, compar, elt);
+}
+
+gl_list_node_t
+gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_search_from_to (list, compar, start_index, end_index,
+ elt);
+}
+
+size_t
+gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_indexof (list, compar, elt);
+}
+
+size_t
+gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_indexof_from_to (list, compar, start_index, end_index,
+ elt);
+}
+
+gl_list_node_t
+gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_nx_add (list, compar, elt);
+}
+
+bool
+gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_remove (list, compar, elt);
+}
+
+#endif
diff --git a/gnu/gl_list.h b/gnu/gl_list.h
new file mode 100755
index 00000000..2b3aa58f
--- /dev/null
+++ b/gnu/gl_list.h
@@ -0,0 +1,844 @@
+/* Abstract sequential list data type.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_LIST_H
+#define _GL_LIST_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* gl_list is an abstract list data type. It can contain any number of
+ objects ('void *' or 'const void *' pointers) in any given order.
+ Duplicates are allowed, but can optionally be forbidden.
+
+ There are several implementations of this list datatype, optimized for
+ different operations or for memory. You can start using the simplest list
+ implementation, GL_ARRAY_LIST, and switch to a different implementation
+ later, when you realize which operations are performed the most frequently.
+ The API of the different implementations is exactly the same; when
+ switching to a different implementation, you only have to change the
+ gl_list_create call.
+
+ The implementations are:
+ GL_ARRAY_LIST a growable array
+ GL_CARRAY_LIST a growable circular array
+ GL_LINKED_LIST a linked list
+ GL_AVLTREE_LIST a binary tree (AVL tree)
+ GL_RBTREE_LIST a binary tree (red-black tree)
+ GL_LINKEDHASH_LIST a hash table with a linked list
+ GL_AVLTREEHASH_LIST a hash table with a binary tree (AVL tree)
+ GL_RBTREEHASH_LIST a hash table with a binary tree (red-black tree)
+
+ The memory consumption is asymptotically the same: O(1) for every object
+ in the list. When looking more closely at the average memory consumed
+ for an object, GL_ARRAY_LIST is the most compact representation, and
+ GL_LINKEDHASH_LIST and GL_TREEHASH_LIST need more memory.
+
+ The guaranteed average performance of the operations is, for a list of
+ n elements:
+
+ Operation ARRAY LINKED TREE LINKEDHASH TREEHASH
+ CARRAY with|without with|without
+ duplicates duplicates
+
+ gl_list_size O(1) O(1) O(1) O(1) O(1)
+ gl_list_node_value O(1) O(1) O(1) O(1) O(1)
+ gl_list_node_set_value O(1) O(1) O(1) O(1) O((log n)²)/O(1)
+ gl_list_next_node O(1) O(1) O(log n) O(1) O(log n)
+ gl_list_previous_node O(1) O(1) O(log n) O(1) O(log n)
+ gl_list_get_at O(1) O(n) O(log n) O(n) O(log n)
+ gl_list_set_at O(1) O(n) O(log n) O(n) O((log n)²)/O(log n)
+ gl_list_search O(n) O(n) O(n) O(n)/O(1) O(log n)/O(1)
+ gl_list_search_from O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n)
+ gl_list_search_from_to O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n)
+ gl_list_indexof O(n) O(n) O(n) O(n) O(log n)
+ gl_list_indexof_from O(n) O(n) O(n) O(n) O((log n)²)/O(log n)
+ gl_list_indexof_from_to O(n) O(n) O(n) O(n) O((log n)²)/O(log n)
+ gl_list_add_first O(n)/O(1) O(1) O(log n) O(1) O((log n)²)/O(log n)
+ gl_list_add_last O(1) O(1) O(log n) O(1) O((log n)²)/O(log n)
+ gl_list_add_before O(n) O(1) O(log n) O(1) O((log n)²)/O(log n)
+ gl_list_add_after O(n) O(1) O(log n) O(1) O((log n)²)/O(log n)
+ gl_list_add_at O(n) O(n) O(log n) O(n) O((log n)²)/O(log n)
+ gl_list_remove_node O(n) O(1) O(log n) O(n)/O(1) O((log n)²)/O(log n)
+ gl_list_remove_at O(n) O(n) O(log n) O(n) O((log n)²)/O(log n)
+ gl_list_remove O(n) O(n) O(n) O(n)/O(1) O((log n)²)/O(log n)
+ gl_list_iterator O(1) O(1) O(log n) O(1) O(log n)
+ gl_list_iterator_from_to O(1) O(n) O(log n) O(n) O(log n)
+ gl_list_iterator_next O(1) O(1) O(log n) O(1) O(log n)
+ gl_sortedlist_search O(log n) O(n) O(log n) O(n) O(log n)
+ gl_sortedlist_search_from O(log n) O(n) O(log n) O(n) O(log n)
+ gl_sortedlist_indexof O(log n) O(n) O(log n) O(n) O(log n)
+ gl_sortedlist_indexof_fro O(log n) O(n) O(log n) O(n) O(log n)
+ gl_sortedlist_add O(n) O(n) O(log n) O(n) O((log n)²)/O(log n)
+ gl_sortedlist_remove O(n) O(n) O(log n) O(n) O((log n)²)/O(log n)
+ */
+
+/* -------------------------- gl_list_t Data Type -------------------------- */
+
+/* Type of function used to compare two elements.
+ NULL denotes pointer comparison. */
+typedef bool (*gl_listelement_equals_fn) (const void *elt1, const void *elt2);
+
+/* Type of function used to compute a hash code.
+ NULL denotes a function that depends only on the pointer itself. */
+typedef size_t (*gl_listelement_hashcode_fn) (const void *elt);
+
+/* Type of function used to dispose an element once it's removed from a list.
+ NULL denotes a no-op. */
+typedef void (*gl_listelement_dispose_fn) (const void *elt);
+
+struct gl_list_impl;
+/* Type representing an entire list. */
+typedef struct gl_list_impl * gl_list_t;
+
+struct gl_list_node_impl;
+/* Type representing the position of an element in the list, in a way that
+ is more adapted to the list implementation than a plain index.
+ Note: It is invalidated by insertions and removals! */
+typedef struct gl_list_node_impl * gl_list_node_t;
+
+struct gl_list_implementation;
+/* Type representing a list datatype implementation. */
+typedef const struct gl_list_implementation * gl_list_implementation_t;
+
+/* Create an empty list.
+ IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST,
+ GL_AVLTREE_LIST, GL_RBTREE_LIST, GL_LINKEDHASH_LIST, GL_AVLTREEHASH_LIST,
+ GL_RBTREEHASH_LIST.
+ EQUALS_FN is an element comparison function or NULL.
+ HASHCODE_FN is an element hash code function or NULL.
+ DISPOSE_FN is an element disposal function or NULL.
+ ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in
+ the list. The implementation may verify this at runtime. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_t gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+
+/* Create a list with given contents.
+ IMPLEMENTATION is one of GL_ARRAY_LIST, GL_CARRAY_LIST, GL_LINKED_LIST,
+ GL_AVLTREE_LIST, GL_RBTREE_LIST, GL_LINKEDHASH_LIST, GL_AVLTREEHASH_LIST,
+ GL_RBTREEHASH_LIST.
+ EQUALS_FN is an element comparison function or NULL.
+ HASHCODE_FN is an element hash code function or NULL.
+ DISPOSE_FN is an element disposal function or NULL.
+ ALLOW_DUPLICATES is false if duplicate elements shall not be allowed in
+ the list. The implementation may verify this at runtime.
+ COUNT is the number of initial elements.
+ CONTENTS[0..COUNT-1] is the initial contents. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_t gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_t gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
+
+/* Return the current number of elements in a list. */
+extern size_t gl_list_size (gl_list_t list);
+
+/* Return the element value represented by a list node. */
+extern const void * gl_list_node_value (gl_list_t list, gl_list_node_t node);
+
+/* Replace the element value represented by a list node. */
+#if 0 /* declared in gl_xlist.h */
+extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+#endif
+/* Likewise. Return 0 upon success, -1 upon out-of-memory. */
+extern int gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Return the node immediately after the given node in the list, or NULL
+ if the given node is the last (rightmost) one in the list. */
+extern gl_list_node_t gl_list_next_node (gl_list_t list, gl_list_node_t node);
+
+/* Return the node immediately before the given node in the list, or NULL
+ if the given node is the first (leftmost) one in the list. */
+extern gl_list_node_t gl_list_previous_node (gl_list_t list, gl_list_node_t node);
+
+/* Return the element at a given position in the list.
+ POSITION must be >= 0 and < gl_list_size (list). */
+extern const void * gl_list_get_at (gl_list_t list, size_t position);
+
+/* Replace the element at a given position in the list.
+ POSITION must be >= 0 and < gl_list_size (list).
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position,
+ const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_set_at (gl_list_t list, size_t position,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Search whether an element is already in the list.
+ Return its node if found, or NULL if not present in the list. */
+extern gl_list_node_t gl_list_search (gl_list_t list, const void *elt);
+
+/* Search whether an element is already in the list,
+ at a position >= START_INDEX.
+ Return its node if found, or NULL if not present in the list. */
+extern gl_list_node_t gl_list_search_from (gl_list_t list, size_t start_index,
+ const void *elt);
+
+/* Search whether an element is already in the list,
+ at a position >= START_INDEX and < END_INDEX.
+ Return its node if found, or NULL if not present in the list. */
+extern gl_list_node_t gl_list_search_from_to (gl_list_t list,
+ size_t start_index,
+ size_t end_index,
+ const void *elt);
+
+/* Search whether an element is already in the list.
+ Return its position if found, or (size_t)(-1) if not present in the list. */
+extern size_t gl_list_indexof (gl_list_t list, const void *elt);
+
+/* Search whether an element is already in the list,
+ at a position >= START_INDEX.
+ Return its position if found, or (size_t)(-1) if not present in the list. */
+extern size_t gl_list_indexof_from (gl_list_t list, size_t start_index,
+ const void *elt);
+
+/* Search whether an element is already in the list,
+ at a position >= START_INDEX and < END_INDEX.
+ Return its position if found, or (size_t)(-1) if not present in the list. */
+extern size_t gl_list_indexof_from_to (gl_list_t list,
+ size_t start_index, size_t end_index,
+ const void *elt);
+
+/* Add an element as the first element of the list.
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_first (gl_list_t list, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Add an element as the last element of the list.
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_last (gl_list_t list, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Add an element before a given element node of the list.
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_before (gl_list_t list,
+ gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Add an element after a given element node of the list.
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_after (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Add an element at a given position in the list.
+ POSITION must be >= 0 and <= gl_list_size (list). */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
+ const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_list_nx_add_at (gl_list_t list, size_t position,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Remove an element from the list.
+ Return true. */
+extern bool gl_list_remove_node (gl_list_t list, gl_list_node_t node);
+
+/* Remove an element at a given position from the list.
+ POSITION must be >= 0 and < gl_list_size (list).
+ Return true. */
+extern bool gl_list_remove_at (gl_list_t list, size_t position);
+
+/* Search and remove an element from the list.
+ Return true if it was found and removed. */
+extern bool gl_list_remove (gl_list_t list, const void *elt);
+
+/* Free an entire list.
+ (But this call does not free the elements of the list.) */
+extern void gl_list_free (gl_list_t list);
+
+/* --------------------- gl_list_iterator_t Data Type --------------------- */
+
+/* Functions for iterating through a list. */
+
+/* Type of an iterator that traverses a list.
+ This is a fixed-size struct, so that creation of an iterator doesn't need
+ memory allocation on the heap. */
+typedef struct
+{
+ /* For fast dispatch of gl_list_iterator_next. */
+ const struct gl_list_implementation *vtable;
+ /* For detecting whether the last returned element was removed. */
+ gl_list_t list;
+ size_t count;
+ /* Other, implementation-private fields. */
+ void *p; void *q;
+ size_t i; size_t j;
+} gl_list_iterator_t;
+
+/* Create an iterator traversing a list.
+ The list contents must not be modified while the iterator is in use,
+ except for replacing or removing the last returned element. */
+extern gl_list_iterator_t gl_list_iterator (gl_list_t list);
+
+/* Create an iterator traversing the element with indices i,
+ start_index <= i < end_index, of a list.
+ The list contents must not be modified while the iterator is in use,
+ except for replacing or removing the last returned element. */
+extern gl_list_iterator_t gl_list_iterator_from_to (gl_list_t list,
+ size_t start_index,
+ size_t end_index);
+
+/* If there is a next element, store the next element in *ELTP, store its
+ node in *NODEP if NODEP is non-NULL, advance the iterator and return true.
+ Otherwise, return false. */
+extern bool gl_list_iterator_next (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep);
+
+/* Free an iterator. */
+extern void gl_list_iterator_free (gl_list_iterator_t *iterator);
+
+/* ---------------------- Sorted gl_list_t Data Type ---------------------- */
+
+/* The following functions are for lists without duplicates where the
+ order is given by a sort criterion. */
+
+/* Type of function used to compare two elements. Same as for qsort().
+ NULL denotes pointer comparison. */
+typedef int (*gl_listelement_compar_fn) (const void *elt1, const void *elt2);
+
+/* Search whether an element is already in the list.
+ The list is assumed to be sorted with COMPAR.
+ Return its node if found, or NULL if not present in the list.
+ If the list contains several copies of ELT, the node of the leftmost one is
+ returned. */
+extern gl_list_node_t gl_sortedlist_search (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+
+/* Search whether an element is already in the list.
+ The list is assumed to be sorted with COMPAR.
+ Only list elements with indices >= START_INDEX and < END_INDEX are
+ considered; the implementation uses these bounds to minimize the number
+ of COMPAR invocations.
+ Return its node if found, or NULL if not present in the list.
+ If the list contains several copies of ELT, the node of the leftmost one is
+ returned. */
+extern gl_list_node_t gl_sortedlist_search_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t start_index,
+ size_t end_index,
+ const void *elt);
+
+/* Search whether an element is already in the list.
+ The list is assumed to be sorted with COMPAR.
+ Return its position if found, or (size_t)(-1) if not present in the list.
+ If the list contains several copies of ELT, the position of the leftmost one
+ is returned. */
+extern size_t gl_sortedlist_indexof (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+
+/* Search whether an element is already in the list.
+ The list is assumed to be sorted with COMPAR.
+ Only list elements with indices >= START_INDEX and < END_INDEX are
+ considered; the implementation uses these bounds to minimize the number
+ of COMPAR invocations.
+ Return its position if found, or (size_t)(-1) if not present in the list.
+ If the list contains several copies of ELT, the position of the leftmost one
+ is returned. */
+extern size_t gl_sortedlist_indexof_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t start_index,
+ size_t end_index,
+ const void *elt);
+
+/* Add an element at the appropriate position in the list.
+ The list is assumed to be sorted with COMPAR.
+ Return its node. */
+#if 0 /* declared in gl_xlist.h */
+extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_list_node_t gl_sortedlist_nx_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Search and remove an element from the list.
+ The list is assumed to be sorted with COMPAR.
+ Return true if it was found and removed.
+ If the list contains several copies of ELT, only the leftmost one is
+ removed. */
+extern bool gl_sortedlist_remove (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+
+/* ------------------------ Implementation Details ------------------------ */
+
+struct gl_list_implementation
+{
+ /* gl_list_t functions. */
+ gl_list_t (*nx_create_empty) (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+ gl_list_t (*nx_create) (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
+ size_t (*size) (gl_list_t list);
+ const void * (*node_value) (gl_list_t list, gl_list_node_t node);
+ int (*node_nx_set_value) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+ gl_list_node_t (*next_node) (gl_list_t list, gl_list_node_t node);
+ gl_list_node_t (*previous_node) (gl_list_t list, gl_list_node_t node);
+ const void * (*get_at) (gl_list_t list, size_t position);
+ gl_list_node_t (*nx_set_at) (gl_list_t list, size_t position,
+ const void *elt);
+ gl_list_node_t (*search_from_to) (gl_list_t list, size_t start_index,
+ size_t end_index, const void *elt);
+ size_t (*indexof_from_to) (gl_list_t list, size_t start_index,
+ size_t end_index, const void *elt);
+ gl_list_node_t (*nx_add_first) (gl_list_t list, const void *elt);
+ gl_list_node_t (*nx_add_last) (gl_list_t list, const void *elt);
+ gl_list_node_t (*nx_add_before) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+ gl_list_node_t (*nx_add_after) (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+ gl_list_node_t (*nx_add_at) (gl_list_t list, size_t position,
+ const void *elt);
+ bool (*remove_node) (gl_list_t list, gl_list_node_t node);
+ bool (*remove_at) (gl_list_t list, size_t position);
+ bool (*remove_elt) (gl_list_t list, const void *elt);
+ void (*list_free) (gl_list_t list);
+ /* gl_list_iterator_t functions. */
+ gl_list_iterator_t (*iterator) (gl_list_t list);
+ gl_list_iterator_t (*iterator_from_to) (gl_list_t list,
+ size_t start_index,
+ size_t end_index);
+ bool (*iterator_next) (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep);
+ void (*iterator_free) (gl_list_iterator_t *iterator);
+ /* Sorted gl_list_t functions. */
+ gl_list_node_t (*sortedlist_search) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+ gl_list_node_t (*sortedlist_search_from_to) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t start_index,
+ size_t end_index,
+ const void *elt);
+ size_t (*sortedlist_indexof) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+ size_t (*sortedlist_indexof_from_to) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t start_index, size_t end_index,
+ const void *elt);
+ gl_list_node_t (*sortedlist_nx_add) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+ bool (*sortedlist_remove) (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+};
+
+struct gl_list_impl_base
+{
+ const struct gl_list_implementation *vtable;
+ gl_listelement_equals_fn equals_fn;
+ gl_listelement_hashcode_fn hashcode_fn;
+ gl_listelement_dispose_fn dispose_fn;
+ bool allow_duplicates;
+};
+
+#if HAVE_INLINE
+
+/* Define all functions of this file as inline accesses to the
+ struct gl_list_implementation.
+ Use #define to avoid a warning because of extern vs. static. */
+
+# define gl_list_nx_create_empty gl_list_nx_create_empty_inline
+static inline gl_list_t
+gl_list_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ return implementation->nx_create_empty (implementation, equals_fn,
+ hashcode_fn, dispose_fn,
+ allow_duplicates);
+}
+
+# define gl_list_nx_create gl_list_nx_create_inline
+static inline gl_list_t
+gl_list_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ return implementation->nx_create (implementation, equals_fn, hashcode_fn,
+ dispose_fn, allow_duplicates, count,
+ contents);
+}
+
+# define gl_list_size gl_list_size_inline
+static inline size_t
+gl_list_size (gl_list_t list)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->size (list);
+}
+
+# define gl_list_node_value gl_list_node_value_inline
+static inline const void *
+gl_list_node_value (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_value (list, node);
+}
+
+# define gl_list_node_nx_set_value gl_list_node_nx_set_value_inline
+static inline int
+gl_list_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->node_nx_set_value (list, node, elt);
+}
+
+# define gl_list_next_node gl_list_next_node_inline
+static inline gl_list_node_t
+gl_list_next_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->next_node (list, node);
+}
+
+# define gl_list_previous_node gl_list_previous_node_inline
+static inline gl_list_node_t
+gl_list_previous_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->previous_node (list, node);
+}
+
+# define gl_list_get_at gl_list_get_at_inline
+static inline const void *
+gl_list_get_at (gl_list_t list, size_t position)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->get_at (list, position);
+}
+
+# define gl_list_nx_set_at gl_list_nx_set_at_inline
+static inline gl_list_node_t
+gl_list_nx_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_set_at (list, position, elt);
+}
+
+# define gl_list_search gl_list_search_inline
+static inline gl_list_node_t
+gl_list_search (gl_list_t list, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, 0, size, elt);
+}
+
+# define gl_list_search_from gl_list_search_from_inline
+static inline gl_list_node_t
+gl_list_search_from (gl_list_t list, size_t start_index, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, start_index, size, elt);
+}
+
+# define gl_list_search_from_to gl_list_search_from_to_inline
+static inline gl_list_node_t
+gl_list_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->search_from_to (list, start_index, end_index, elt);
+}
+
+# define gl_list_indexof gl_list_indexof_inline
+static inline size_t
+gl_list_indexof (gl_list_t list, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, 0, size, elt);
+}
+
+# define gl_list_indexof_from gl_list_indexof_from_inline
+static inline size_t
+gl_list_indexof_from (gl_list_t list, size_t start_index, const void *elt)
+{
+ size_t size = ((const struct gl_list_impl_base *) list)->vtable->size (list);
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, start_index, size, elt);
+}
+
+# define gl_list_indexof_from_to gl_list_indexof_from_to_inline
+static inline size_t
+gl_list_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->indexof_from_to (list, start_index, end_index, elt);
+}
+
+# define gl_list_nx_add_first gl_list_nx_add_first_inline
+static inline gl_list_node_t
+gl_list_nx_add_first (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_first (list, elt);
+}
+
+# define gl_list_nx_add_last gl_list_nx_add_last_inline
+static inline gl_list_node_t
+gl_list_nx_add_last (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_last (list, elt);
+}
+
+# define gl_list_nx_add_before gl_list_nx_add_before_inline
+static inline gl_list_node_t
+gl_list_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_before (list, node, elt);
+}
+
+# define gl_list_nx_add_after gl_list_nx_add_after_inline
+static inline gl_list_node_t
+gl_list_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_after (list, node, elt);
+}
+
+# define gl_list_nx_add_at gl_list_nx_add_at_inline
+static inline gl_list_node_t
+gl_list_nx_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->nx_add_at (list, position, elt);
+}
+
+# define gl_list_remove_node gl_list_remove_node_inline
+static inline bool
+gl_list_remove_node (gl_list_t list, gl_list_node_t node)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_node (list, node);
+}
+
+# define gl_list_remove_at gl_list_remove_at_inline
+static inline bool
+gl_list_remove_at (gl_list_t list, size_t position)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_at (list, position);
+}
+
+# define gl_list_remove gl_list_remove_inline
+static inline bool
+gl_list_remove (gl_list_t list, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->remove_elt (list, elt);
+}
+
+# define gl_list_free gl_list_free_inline
+static inline void
+gl_list_free (gl_list_t list)
+{
+ ((const struct gl_list_impl_base *) list)->vtable->list_free (list);
+}
+
+# define gl_list_iterator gl_list_iterator_inline
+static inline gl_list_iterator_t
+gl_list_iterator (gl_list_t list)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->iterator (list);
+}
+
+# define gl_list_iterator_from_to gl_list_iterator_from_to_inline
+static inline gl_list_iterator_t
+gl_list_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->iterator_from_to (list, start_index, end_index);
+}
+
+# define gl_list_iterator_next gl_list_iterator_next_inline
+static inline bool
+gl_list_iterator_next (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep)
+{
+ return iterator->vtable->iterator_next (iterator, eltp, nodep);
+}
+
+# define gl_list_iterator_free gl_list_iterator_free_inline
+static inline void
+gl_list_iterator_free (gl_list_iterator_t *iterator)
+{
+ iterator->vtable->iterator_free (iterator);
+}
+
+# define gl_sortedlist_search gl_sortedlist_search_inline
+static inline gl_list_node_t
+gl_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_search (list, compar, elt);
+}
+
+# define gl_sortedlist_search_from_to gl_sortedlist_search_from_to_inline
+static inline gl_list_node_t
+gl_sortedlist_search_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_search_from_to (list, compar, start_index, end_index,
+ elt);
+}
+
+# define gl_sortedlist_indexof gl_sortedlist_indexof_inline
+static inline size_t
+gl_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_indexof (list, compar, elt);
+}
+
+# define gl_sortedlist_indexof_from_to gl_sortedlist_indexof_from_to_inline
+static inline size_t
+gl_sortedlist_indexof_from_to (gl_list_t list, gl_listelement_compar_fn compar, size_t start_index, size_t end_index, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_indexof_from_to (list, compar, start_index, end_index,
+ elt);
+}
+
+# define gl_sortedlist_nx_add gl_sortedlist_nx_add_inline
+static inline gl_list_node_t
+gl_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_nx_add (list, compar, elt);
+}
+
+# define gl_sortedlist_remove gl_sortedlist_remove_inline
+static inline bool
+gl_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar, const void *elt)
+{
+ return ((const struct gl_list_impl_base *) list)->vtable
+ ->sortedlist_remove (list, compar, elt);
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_LIST_H */
diff --git a/gnu/gl_oset.c b/gnu/gl_oset.c
new file mode 100755
index 00000000..e067035d
--- /dev/null
+++ b/gnu/gl_oset.c
@@ -0,0 +1,96 @@
+/* Abstract ordered set data type.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_oset.h"
+
+#if !HAVE_INLINE
+
+/* Define all functions of this file as inline accesses to the
+ struct gl_list_implementation.
+ Use #define to avoid a warning because of extern vs. static. */
+
+gl_oset_t
+gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ return implementation->nx_create_empty (implementation, compar_fn,
+ dispose_fn);
+}
+
+size_t
+gl_oset_size (gl_oset_t set)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
+}
+
+bool
+gl_oset_search (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
+}
+
+bool
+gl_oset_search_atleast (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold, const void **eltp)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable
+ ->search_atleast (set, threshold_fn, threshold, eltp);
+}
+
+int
+gl_oset_nx_add (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
+}
+
+bool
+gl_oset_remove (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable
+ ->remove_elt (set, elt);
+}
+
+void
+gl_oset_free (gl_oset_t set)
+{
+ ((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
+}
+
+gl_oset_iterator_t
+gl_oset_iterator (gl_oset_t set)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
+}
+
+bool
+gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
+{
+ return iterator->vtable->iterator_next (iterator, eltp);
+}
+
+void
+gl_oset_iterator_free (gl_oset_iterator_t *iterator)
+{
+ iterator->vtable->iterator_free (iterator);
+}
+
+#endif
diff --git a/gnu/gl_oset.h b/gnu/gl_oset.h
new file mode 100755
index 00000000..b4bb8f38
--- /dev/null
+++ b/gnu/gl_oset.h
@@ -0,0 +1,289 @@
+/* Abstract ordered set data type.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_OSET_H
+#define _GL_OSET_H
+
+#include <stdbool.h>
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* gl_oset is an abstract ordered set data type. It can contain any number
+ of objects ('void *' or 'const void *' pointers) in the order of a given
+ comparator function. Duplicates (in the sense of the comparator) are
+ forbidden.
+
+ There are several implementations of this ordered set datatype, optimized
+ for different operations or for memory. You can start using the simplest
+ ordered set implementation, GL_ARRAY_OSET, and switch to a different
+ implementation later, when you realize which operations are performed
+ the most frequently. The API of the different implementations is exactly
+ the same; when switching to a different implementation, you only have to
+ change the gl_oset_create call.
+
+ The implementations are:
+ GL_ARRAY_OSET a growable array
+ GL_AVLTREE_OSET a binary tree (AVL tree)
+ GL_RBTREE_OSET a binary tree (red-black tree)
+
+ The memory consumption is asymptotically the same: O(1) for every object
+ in the set. When looking more closely at the average memory consumed
+ for an object, GL_ARRAY_OSET is the most compact representation, and
+ GL_AVLTREE_OSET, GL_RBTREE_OSET need more memory.
+
+ The guaranteed average performance of the operations is, for a set of
+ n elements:
+
+ Operation ARRAY TREE
+
+ gl_oset_size O(1) O(1)
+ gl_oset_add O(n) O(log n)
+ gl_oset_remove O(n) O(log n)
+ gl_oset_search O(log n) O(log n)
+ gl_oset_search_atleast O(log n) O(log n)
+ gl_oset_iterator O(1) O(log n)
+ gl_oset_iterator_next O(1) O(log n)
+ */
+
+/* -------------------------- gl_oset_t Data Type -------------------------- */
+
+/* Type of function used to compare two elements. Same as for qsort().
+ NULL denotes pointer comparison. */
+typedef int (*gl_setelement_compar_fn) (const void *elt1, const void *elt2);
+
+/* Type of function used to dispose an element once it's removed from a set.
+ NULL denotes a no-op. */
+typedef void (*gl_setelement_dispose_fn) (const void *elt);
+
+/* Type of function used to compare an element with a threshold.
+ Return true if the element is greater or equal than the threshold. */
+typedef bool (*gl_setelement_threshold_fn) (const void *elt, const void *threshold);
+
+struct gl_oset_impl;
+/* Type representing an entire ordered set. */
+typedef struct gl_oset_impl * gl_oset_t;
+
+struct gl_oset_implementation;
+/* Type representing a ordered set datatype implementation. */
+typedef const struct gl_oset_implementation * gl_oset_implementation_t;
+
+/* Create an empty set.
+ IMPLEMENTATION is one of GL_ARRAY_OSET, GL_AVLTREE_OSET, GL_RBTREE_OSET.
+ COMPAR_FN is an element comparison function or NULL.
+ DISPOSE_FN is an element disposal function or NULL. */
+#if 0 /* declared in gl_xoset.h */
+extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
+#endif
+/* Likewise. Return NULL upon out-of-memory. */
+extern gl_oset_t gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
+
+/* Return the current number of elements in an ordered set. */
+extern size_t gl_oset_size (gl_oset_t set);
+
+/* Search whether an element is already in the ordered set.
+ Return true if found, or false if not present in the set. */
+extern bool gl_oset_search (gl_oset_t set, const void *elt);
+
+/* Search the least element in the ordered set that compares greater or equal
+ to the given THRESHOLD. The representation of the THRESHOLD is defined
+ by the THRESHOLD_FN.
+ Return true and store the found element in *ELTP if found, otherwise return
+ false. */
+extern bool gl_oset_search_atleast (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold,
+ const void **eltp);
+
+/* Add an element to an ordered set.
+ Return true if it was not already in the set and added, false otherwise. */
+#if 0 /* declared in gl_xoset.h */
+extern bool gl_oset_add (gl_oset_t set, const void *elt);
+#endif
+/* Likewise. Return -1 upon out-of-memory. */
+extern int gl_oset_nx_add (gl_oset_t set, const void *elt)
+#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
+ __attribute__ ((__warn_unused_result__))
+#endif
+ ;
+
+/* Remove an element from an ordered set.
+ Return true if it was found and removed. */
+extern bool gl_oset_remove (gl_oset_t set, const void *elt);
+
+/* Free an entire ordered set.
+ (But this call does not free the elements of the set.) */
+extern void gl_oset_free (gl_oset_t set);
+
+/* --------------------- gl_oset_iterator_t Data Type --------------------- */
+
+/* Functions for iterating through an ordered set. */
+
+/* Type of an iterator that traverses an ordered set.
+ This is a fixed-size struct, so that creation of an iterator doesn't need
+ memory allocation on the heap. */
+typedef struct
+{
+ /* For fast dispatch of gl_oset_iterator_next. */
+ const struct gl_oset_implementation *vtable;
+ /* For detecting whether the last returned element was removed. */
+ gl_oset_t set;
+ size_t count;
+ /* Other, implementation-private fields. */
+ void *p; void *q;
+ size_t i; size_t j;
+} gl_oset_iterator_t;
+
+/* Create an iterator traversing an ordered set.
+ The set's contents must not be modified while the iterator is in use,
+ except for removing the last returned element. */
+extern gl_oset_iterator_t gl_oset_iterator (gl_oset_t set);
+
+/* If there is a next element, store the next element in *ELTP, advance the
+ iterator and return true. Otherwise, return false. */
+extern bool gl_oset_iterator_next (gl_oset_iterator_t *iterator,
+ const void **eltp);
+
+/* Free an iterator. */
+extern void gl_oset_iterator_free (gl_oset_iterator_t *iterator);
+
+/* ------------------------ Implementation Details ------------------------ */
+
+struct gl_oset_implementation
+{
+ /* gl_oset_t functions. */
+ gl_oset_t (*nx_create_empty) (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
+ size_t (*size) (gl_oset_t set);
+ bool (*search) (gl_oset_t set, const void *elt);
+ bool (*search_atleast) (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold, const void **eltp);
+ int (*nx_add) (gl_oset_t set, const void *elt);
+ bool (*remove_elt) (gl_oset_t set, const void *elt);
+ void (*oset_free) (gl_oset_t set);
+ /* gl_oset_iterator_t functions. */
+ gl_oset_iterator_t (*iterator) (gl_oset_t set);
+ bool (*iterator_next) (gl_oset_iterator_t *iterator, const void **eltp);
+ void (*iterator_free) (gl_oset_iterator_t *iterator);
+};
+
+struct gl_oset_impl_base
+{
+ const struct gl_oset_implementation *vtable;
+ gl_setelement_compar_fn compar_fn;
+ gl_setelement_dispose_fn dispose_fn;
+};
+
+#if HAVE_INLINE
+
+/* Define all functions of this file as inline accesses to the
+ struct gl_oset_implementation.
+ Use #define to avoid a warning because of extern vs. static. */
+
+# define gl_oset_nx_create_empty gl_oset_nx_create_empty_inline
+static inline gl_oset_t
+gl_oset_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ return implementation->nx_create_empty (implementation, compar_fn,
+ dispose_fn);
+}
+
+# define gl_oset_size gl_oset_size_inline
+static inline size_t
+gl_oset_size (gl_oset_t set)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->size (set);
+}
+
+# define gl_oset_search gl_oset_search_inline
+static inline bool
+gl_oset_search (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->search (set, elt);
+}
+
+# define gl_oset_search_atleast gl_oset_search_atleast_inline
+static inline bool
+gl_oset_search_atleast (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold, const void **eltp)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable
+ ->search_atleast (set, threshold_fn, threshold, eltp);
+}
+
+# define gl_oset_nx_add gl_oset_nx_add_inline
+static inline int
+gl_oset_nx_add (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->nx_add (set, elt);
+}
+
+# define gl_oset_remove gl_oset_remove_inline
+static inline bool
+gl_oset_remove (gl_oset_t set, const void *elt)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable
+ ->remove_elt (set, elt);
+}
+
+# define gl_oset_free gl_oset_free_inline
+static inline void
+gl_oset_free (gl_oset_t set)
+{
+ ((const struct gl_oset_impl_base *) set)->vtable->oset_free (set);
+}
+
+# define gl_oset_iterator gl_oset_iterator_inline
+static inline gl_oset_iterator_t
+gl_oset_iterator (gl_oset_t set)
+{
+ return ((const struct gl_oset_impl_base *) set)->vtable->iterator (set);
+}
+
+# define gl_oset_iterator_next gl_oset_iterator_next_inline
+static inline bool
+gl_oset_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
+{
+ return iterator->vtable->iterator_next (iterator, eltp);
+}
+
+# define gl_oset_iterator_free gl_oset_iterator_free_inline
+static inline void
+gl_oset_iterator_free (gl_oset_iterator_t *iterator)
+{
+ iterator->vtable->iterator_free (iterator);
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_OSET_H */
diff --git a/gnu/gl_xlist.c b/gnu/gl_xlist.c
new file mode 100755
index 00000000..2bffc6f3
--- /dev/null
+++ b/gnu/gl_xlist.c
@@ -0,0 +1,128 @@
+/* Abstract sequential list data type, with out-of-memory checking.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_xlist.h"
+
+#if !HAVE_INLINE
+
+gl_list_t
+gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ gl_list_t result =
+ gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_t
+gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ gl_list_t result =
+ gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates, count, contents);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+void
+gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ int result = gl_list_node_nx_set_value (list, node, elt);
+ if (result < 0)
+ xalloc_die ();
+}
+
+gl_list_node_t
+gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_first (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_first (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_last (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_last (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+gl_list_node_t
+gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
diff --git a/gnu/gl_xlist.h b/gnu/gl_xlist.h
new file mode 100755
index 00000000..2f352bee
--- /dev/null
+++ b/gnu/gl_xlist.h
@@ -0,0 +1,179 @@
+/* Abstract sequential list data type, with out-of-memory checking.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_XLIST_H
+#define _GL_XLIST_H
+
+#include "gl_list.h"
+#include "xalloc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These functions are thin wrappers around the corresponding functions with
+ _nx_ infix from gl_list.h. Upon out-of-memory, they invoke xalloc_die (),
+ instead of returning an error indicator. */
+extern gl_list_t gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates);
+extern gl_list_t gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents);
+extern void gl_list_node_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_set_at (gl_list_t list, size_t position,
+ const void *elt);
+extern gl_list_node_t gl_list_add_first (gl_list_t list, const void *elt);
+extern gl_list_node_t gl_list_add_last (gl_list_t list, const void *elt);
+extern gl_list_node_t gl_list_add_before (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_add_after (gl_list_t list, gl_list_node_t node,
+ const void *elt);
+extern gl_list_node_t gl_list_add_at (gl_list_t list, size_t position,
+ const void *elt);
+extern gl_list_node_t gl_sortedlist_add (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ const void *elt);
+
+#if HAVE_INLINE
+
+# define gl_list_create_empty gl_list_create_empty_inline
+static inline gl_list_t
+gl_list_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ gl_list_t result =
+ gl_list_nx_create_empty (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_create gl_list_create_inline
+static inline gl_list_t
+gl_list_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ gl_list_t result =
+ gl_list_nx_create (implementation, equals_fn, hashcode_fn, dispose_fn,
+ allow_duplicates, count, contents);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_node_set_value gl_list_node_set_value_inline
+static inline void
+gl_list_node_set_value (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ int result = gl_list_node_nx_set_value (list, node, elt);
+ if (result < 0)
+ xalloc_die ();
+}
+
+# define gl_list_set_at gl_list_set_at_inline
+static inline gl_list_node_t
+gl_list_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_set_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_first gl_list_add_first_inline
+static inline gl_list_node_t
+gl_list_add_first (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_first (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_last gl_list_add_last_inline
+static inline gl_list_node_t
+gl_list_add_last (gl_list_t list, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_last (list, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_before gl_list_add_before_inline
+static inline gl_list_node_t
+gl_list_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_before (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_after gl_list_add_after_inline
+static inline gl_list_node_t
+gl_list_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_after (list, node, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_list_add_at gl_list_add_at_inline
+static inline gl_list_node_t
+gl_list_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ gl_list_node_t result = gl_list_nx_add_at (list, position, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_sortedlist_add gl_sortedlist_add_inline
+static inline gl_list_node_t
+gl_sortedlist_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ gl_list_node_t result = gl_sortedlist_nx_add (list, compar, elt);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_XLIST_H */
diff --git a/gnu/gl_xoset.c b/gnu/gl_xoset.c
new file mode 100755
index 00000000..21dbf716
--- /dev/null
+++ b/gnu/gl_xoset.c
@@ -0,0 +1,46 @@
+/* Abstract ordered set data type, with out-of-memory checking.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_xoset.h"
+
+#if !HAVE_INLINE
+
+gl_oset_t
+gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ gl_oset_t result =
+ gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+bool
+gl_oset_add (gl_oset_t set, const void *elt)
+{
+ int result = gl_oset_nx_add (set, elt);
+ if (result < 0)
+ xalloc_die ();
+ return result;
+}
+
+#endif
diff --git a/gnu/gl_xoset.h b/gnu/gl_xoset.h
new file mode 100755
index 00000000..905865d9
--- /dev/null
+++ b/gnu/gl_xoset.h
@@ -0,0 +1,67 @@
+/* Abstract ordered set data type, with out-of-memory checking.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_XOSET_H
+#define _GL_XOSET_H
+
+#include "gl_oset.h"
+#include "xalloc.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* These functions are thin wrappers around the corresponding functions with
+ _nx_ infix from gl_oset.h. Upon out-of-memory, they invoke xalloc_die (),
+ instead of returning an error indicator. */
+extern gl_oset_t gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn);
+extern bool gl_oset_add (gl_oset_t set, const void *elt);
+
+#if HAVE_INLINE
+
+# define gl_oset_create_empty gl_oset_create_empty_inline
+static inline gl_oset_t
+gl_oset_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ gl_oset_t result =
+ gl_oset_nx_create_empty (implementation, compar_fn, dispose_fn);
+ if (result == NULL)
+ xalloc_die ();
+ return result;
+}
+
+# define gl_oset_add gl_oset_add_inline
+static inline bool
+gl_oset_add (gl_oset_t set, const void *elt)
+{
+ int result = gl_oset_nx_add (set, elt);
+ if (result < 0)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_XOSET_H */
diff --git a/gnu/iconv.in.h b/gnu/iconv.in.h
new file mode 100755
index 00000000..54fb8cf9
--- /dev/null
+++ b/gnu/iconv.in.h
@@ -0,0 +1,74 @@
+/* A GNU-like <iconv.h>.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_ICONV_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_ICONV_H@
+
+#ifndef _GL_ICONV_H
+#define _GL_ICONV_H
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @REPLACE_ICONV_OPEN@
+/* An iconv_open wrapper that supports the IANA standardized encoding names
+ ("ISO-8859-1" etc.) as far as possible. */
+# define iconv_open rpl_iconv_open
+extern iconv_t iconv_open (const char *tocode, const char *fromcode)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @REPLACE_ICONV_UTF@
+/* Special constants for supporting UTF-{16,32}{BE,LE} encodings.
+ Not public. */
+# define _ICONV_UTF8_UTF16BE (iconv_t)(-161)
+# define _ICONV_UTF8_UTF16LE (iconv_t)(-162)
+# define _ICONV_UTF8_UTF32BE (iconv_t)(-163)
+# define _ICONV_UTF8_UTF32LE (iconv_t)(-164)
+# define _ICONV_UTF16BE_UTF8 (iconv_t)(-165)
+# define _ICONV_UTF16LE_UTF8 (iconv_t)(-166)
+# define _ICONV_UTF32BE_UTF8 (iconv_t)(-167)
+# define _ICONV_UTF32LE_UTF8 (iconv_t)(-168)
+#endif
+
+#if @REPLACE_ICONV@
+# define iconv rpl_iconv
+extern size_t iconv (iconv_t cd,
+ @ICONV_CONST@ char **inbuf, size_t *inbytesleft,
+ char **outbuf, size_t *outbytesleft);
+# define iconv_close rpl_iconv_close
+extern int iconv_close (iconv_t cd);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_ICONV_H */
+#endif /* _GL_ICONV_H */
diff --git a/gnu/iconv_open-aix.gperf b/gnu/iconv_open-aix.gperf
new file mode 100755
index 00000000..6782b995
--- /dev/null
+++ b/gnu/iconv_open-aix.gperf
@@ -0,0 +1,44 @@
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+# On AIX 5.1, look in /usr/lib/nls/loc/uconvTable.
+ISO-8859-1, "ISO8859-1"
+ISO-8859-2, "ISO8859-2"
+ISO-8859-3, "ISO8859-3"
+ISO-8859-4, "ISO8859-4"
+ISO-8859-5, "ISO8859-5"
+ISO-8859-6, "ISO8859-6"
+ISO-8859-7, "ISO8859-7"
+ISO-8859-8, "ISO8859-8"
+ISO-8859-9, "ISO8859-9"
+ISO-8859-15, "ISO8859-15"
+CP437, "IBM-437"
+CP850, "IBM-850"
+CP852, "IBM-852"
+CP856, "IBM-856"
+CP857, "IBM-857"
+CP861, "IBM-861"
+CP865, "IBM-865"
+CP869, "IBM-869"
+ISO-8859-13, "IBM-921"
+CP922, "IBM-922"
+CP932, "IBM-932"
+CP943, "IBM-943"
+CP1046, "IBM-1046"
+CP1124, "IBM-1124"
+CP1125, "IBM-1125"
+CP1129, "IBM-1129"
+CP1252, "IBM-1252"
+GB2312, "IBM-eucCN"
+EUC-JP, "IBM-eucJP"
+EUC-KR, "IBM-eucKR"
+EUC-TW, "IBM-eucTW"
+BIG5, "big5"
diff --git a/gnu/iconv_open-hpux.gperf b/gnu/iconv_open-hpux.gperf
new file mode 100755
index 00000000..5a35c83e
--- /dev/null
+++ b/gnu/iconv_open-hpux.gperf
@@ -0,0 +1,56 @@
+struct mapping { int standard_name; const char vendor_name[9 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+# On HP-UX 11.11, look in /usr/lib/nls/iconv.
+ISO-8859-1, "iso88591"
+ISO-8859-2, "iso88592"
+ISO-8859-5, "iso88595"
+ISO-8859-6, "iso88596"
+ISO-8859-7, "iso88597"
+ISO-8859-8, "iso88598"
+ISO-8859-9, "iso88599"
+ISO-8859-15, "iso885915"
+CP437, "cp437"
+CP775, "cp775"
+CP850, "cp850"
+CP852, "cp852"
+CP855, "cp855"
+CP857, "cp857"
+CP861, "cp861"
+CP862, "cp862"
+CP864, "cp864"
+CP865, "cp865"
+CP866, "cp866"
+CP869, "cp869"
+CP874, "cp874"
+CP1250, "cp1250"
+CP1251, "cp1251"
+CP1252, "cp1252"
+CP1253, "cp1253"
+CP1254, "cp1254"
+CP1255, "cp1255"
+CP1256, "cp1256"
+CP1257, "cp1257"
+CP1258, "cp1258"
+HP-ROMAN8, "roman8"
+HP-ARABIC8, "arabic8"
+HP-GREEK8, "greek8"
+HP-HEBREW8, "hebrew8"
+HP-TURKISH8, "turkish8"
+HP-KANA8, "kana8"
+TIS-620, "tis620"
+GB2312, "hp15CN"
+EUC-JP, "eucJP"
+EUC-KR, "eucKR"
+EUC-TW, "eucTW"
+BIG5, "big5"
+SHIFT_JIS, "sjis"
+UTF-8, "utf8"
diff --git a/gnu/iconv_open-irix.gperf b/gnu/iconv_open-irix.gperf
new file mode 100755
index 00000000..3672a801
--- /dev/null
+++ b/gnu/iconv_open-irix.gperf
@@ -0,0 +1,31 @@
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+# On IRIX 6.5, look in /usr/lib/iconv and /usr/lib/international/encodings.
+ISO-8859-1, "ISO8859-1"
+ISO-8859-2, "ISO8859-2"
+ISO-8859-3, "ISO8859-3"
+ISO-8859-4, "ISO8859-4"
+ISO-8859-5, "ISO8859-5"
+ISO-8859-6, "ISO8859-6"
+ISO-8859-7, "ISO8859-7"
+ISO-8859-8, "ISO8859-8"
+ISO-8859-9, "ISO8859-9"
+ISO-8859-15, "ISO8859-15"
+KOI8-R, "KOI8"
+CP855, "DOS855"
+CP1251, "WIN1251"
+GB2312, "eucCN"
+EUC-JP, "eucJP"
+EUC-KR, "eucKR"
+EUC-TW, "eucTW"
+SHIFT_JIS, "sjis"
+TIS-620, "TIS620"
diff --git a/gnu/iconv_open-osf.gperf b/gnu/iconv_open-osf.gperf
new file mode 100755
index 00000000..f468ff60
--- /dev/null
+++ b/gnu/iconv_open-osf.gperf
@@ -0,0 +1,50 @@
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+# On OSF/1 5.1, look in /usr/lib/nls/loc/iconv.
+ISO-8859-1, "ISO8859-1"
+ISO-8859-2, "ISO8859-2"
+ISO-8859-3, "ISO8859-3"
+ISO-8859-4, "ISO8859-4"
+ISO-8859-5, "ISO8859-5"
+ISO-8859-6, "ISO8859-6"
+ISO-8859-7, "ISO8859-7"
+ISO-8859-8, "ISO8859-8"
+ISO-8859-9, "ISO8859-9"
+ISO-8859-15, "ISO8859-15"
+CP437, "cp437"
+CP775, "cp775"
+CP850, "cp850"
+CP852, "cp852"
+CP855, "cp855"
+CP857, "cp857"
+CP861, "cp861"
+CP862, "cp862"
+CP865, "cp865"
+CP866, "cp866"
+CP869, "cp869"
+CP874, "cp874"
+CP949, "KSC5601"
+CP1250, "cp1250"
+CP1251, "cp1251"
+CP1252, "cp1252"
+CP1253, "cp1253"
+CP1254, "cp1254"
+CP1255, "cp1255"
+CP1256, "cp1256"
+CP1257, "cp1257"
+CP1258, "cp1258"
+EUC-JP, "eucJP"
+EUC-KR, "eucKR"
+EUC-TW, "eucTW"
+BIG5, "big5"
+SHIFT_JIS, "SJIS"
+TIS-620, "TACTIS"
diff --git a/gnu/iconv_open-solaris.gperf b/gnu/iconv_open-solaris.gperf
new file mode 100755
index 00000000..7d7da38e
--- /dev/null
+++ b/gnu/iconv_open-solaris.gperf
@@ -0,0 +1,30 @@
+struct mapping { int standard_name; const char vendor_name[10 + 1]; };
+%struct-type
+%language=ANSI-C
+%define slot-name standard_name
+%define hash-function-name mapping_hash
+%define lookup-function-name mapping_lookup
+%readonly-tables
+%global-table
+%define word-array-name mappings
+%pic
+%%
+# On Solaris 10, look in the "iconv -l" output. Some aliases are advertised but
+# not actually supported by the iconv() function and by the 'iconv' program.
+# For example:
+# $ echo abc | iconv -f 646 -t ISO-8859-1
+# Not supported 646 to ISO-8859-1
+# $ echo abc | iconv -f 646 -t ISO8859-1
+$ abc
+ASCII, "646"
+ISO-8859-1, "ISO8859-1"
+ISO-8859-2, "ISO8859-2"
+ISO-8859-3, "ISO8859-3"
+ISO-8859-4, "ISO8859-4"
+ISO-8859-5, "ISO8859-5"
+ISO-8859-6, "ISO8859-6"
+ISO-8859-7, "ISO8859-7"
+ISO-8859-8, "ISO8859-8"
+ISO-8859-9, "ISO8859-9"
+ISO-8859-15, "ISO8859-15"
+CP1251, "ansi-1251"
diff --git a/gnu/iconv_open.c b/gnu/iconv_open.c
new file mode 100755
index 00000000..b437d523
--- /dev/null
+++ b/gnu/iconv_open.c
@@ -0,0 +1,173 @@
+/* Character set conversion.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <iconv.h>
+
+#include <errno.h>
+#include <string.h>
+#include "c-ctype.h"
+#include "c-strcase.h"
+
+#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+
+/* Namespace cleanliness. */
+#define mapping_lookup rpl_iconv_open_mapping_lookup
+
+/* The macro ICONV_FLAVOR is defined to one of these or undefined. */
+
+#define ICONV_FLAVOR_AIX "iconv_open-aix.h"
+#define ICONV_FLAVOR_HPUX "iconv_open-hpux.h"
+#define ICONV_FLAVOR_IRIX "iconv_open-irix.h"
+#define ICONV_FLAVOR_OSF "iconv_open-osf.h"
+#define ICONV_FLAVOR_SOLARIS "iconv_open-solaris.h"
+
+#ifdef ICONV_FLAVOR
+# include ICONV_FLAVOR
+#endif
+
+iconv_t
+rpl_iconv_open (const char *tocode, const char *fromcode)
+#undef iconv_open
+{
+ char fromcode_upper[32];
+ char tocode_upper[32];
+ char *fromcode_upper_end;
+ char *tocode_upper_end;
+
+#if REPLACE_ICONV_UTF
+ /* Special handling of conversion between UTF-8 and UTF-{16,32}{BE,LE}.
+ Do this here, before calling the real iconv_open(), because OSF/1 5.1
+ iconv() to these encoding inserts a BOM, which is wrong.
+ We do not need to handle conversion between arbitrary encodings and
+ UTF-{16,32}{BE,LE}, because the 'striconveh' module implements two-step
+ conversion throough UTF-8.
+ The _ICONV_* constants are chosen to be disjoint from any iconv_t
+ returned by the system's iconv_open() functions. Recall that iconv_t
+ is a scalar type. */
+ if (c_toupper (fromcode[0]) == 'U'
+ && c_toupper (fromcode[1]) == 'T'
+ && c_toupper (fromcode[2]) == 'F'
+ && fromcode[3] == '-')
+ {
+ if (c_toupper (tocode[0]) == 'U'
+ && c_toupper (tocode[1]) == 'T'
+ && c_toupper (tocode[2]) == 'F'
+ && tocode[3] == '-')
+ {
+ if (strcmp (fromcode + 4, "8") == 0)
+ {
+ if (c_strcasecmp (tocode + 4, "16BE") == 0)
+ return _ICONV_UTF8_UTF16BE;
+ if (c_strcasecmp (tocode + 4, "16LE") == 0)
+ return _ICONV_UTF8_UTF16LE;
+ if (c_strcasecmp (tocode + 4, "32BE") == 0)
+ return _ICONV_UTF8_UTF32BE;
+ if (c_strcasecmp (tocode + 4, "32LE") == 0)
+ return _ICONV_UTF8_UTF32LE;
+ }
+ else if (strcmp (tocode + 4, "8") == 0)
+ {
+ if (c_strcasecmp (fromcode + 4, "16BE") == 0)
+ return _ICONV_UTF16BE_UTF8;
+ if (c_strcasecmp (fromcode + 4, "16LE") == 0)
+ return _ICONV_UTF16LE_UTF8;
+ if (c_strcasecmp (fromcode + 4, "32BE") == 0)
+ return _ICONV_UTF32BE_UTF8;
+ if (c_strcasecmp (fromcode + 4, "32LE") == 0)
+ return _ICONV_UTF32LE_UTF8;
+ }
+ }
+ }
+#endif
+
+ /* Do *not* add special support for 8-bit encodings like ASCII or ISO-8859-1
+ here. This would lead to programs that work in some locales (such as the
+ "C" or "en_US" locales) but do not work in East Asian locales. It is
+ better if programmers make their programs depend on GNU libiconv (except
+ on glibc systems), e.g. by using the AM_ICONV macro and documenting the
+ dependency in an INSTALL or DEPENDENCIES file. */
+
+ /* Try with the original names first.
+ This covers the case when fromcode or tocode is a lowercase encoding name
+ that is understood by the system's iconv_open but not listed in our
+ mappings table. */
+ {
+ iconv_t cd = iconv_open (tocode, fromcode);
+ if (cd != (iconv_t)(-1))
+ return cd;
+ }
+
+ /* Convert the encodings to upper case, because
+ 1. in the arguments of iconv_open() on AIX, HP-UX, and OSF/1 the case
+ matters,
+ 2. it makes searching in the table faster. */
+ {
+ const char *p = fromcode;
+ char *q = fromcode_upper;
+ while ((*q = c_toupper (*p)) != '\0')
+ {
+ p++;
+ q++;
+ if (q == &fromcode_upper[SIZEOF (fromcode_upper)])
+ {
+ errno = EINVAL;
+ return (iconv_t)(-1);
+ }
+ }
+ fromcode_upper_end = q;
+ }
+
+ {
+ const char *p = tocode;
+ char *q = tocode_upper;
+ while ((*q = c_toupper (*p)) != '\0')
+ {
+ p++;
+ q++;
+ if (q == &tocode_upper[SIZEOF (tocode_upper)])
+ {
+ errno = EINVAL;
+ return (iconv_t)(-1);
+ }
+ }
+ tocode_upper_end = q;
+ }
+
+#ifdef ICONV_FLAVOR
+ /* Apply the mappings. */
+ {
+ const struct mapping *m =
+ mapping_lookup (fromcode_upper, fromcode_upper_end - fromcode_upper);
+
+ fromcode = (m != NULL ? m->vendor_name : fromcode_upper);
+ }
+ {
+ const struct mapping *m =
+ mapping_lookup (tocode_upper, tocode_upper_end - tocode_upper);
+
+ tocode = (m != NULL ? m->vendor_name : tocode_upper);
+ }
+#else
+ fromcode = fromcode_upper;
+ tocode = tocode_upper;
+#endif
+
+ return iconv_open (tocode, fromcode);
+}
diff --git a/gnu/intprops.h b/gnu/intprops.h
new file mode 100755
index 00000000..46f4d47d
--- /dev/null
+++ b/gnu/intprops.h
@@ -0,0 +1,83 @@
+/* intprops.h -- properties of integer types
+
+ Copyright (C) 2001, 2002, 2003, 2004, 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#ifndef GL_INTPROPS_H
+# define GL_INTPROPS_H
+
+# include <limits.h>
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if the arithmetic type T is an integer type. bool counts as
+ an integer. */
+# define TYPE_IS_INTEGER(t) ((t) 1.5 == 1)
+
+/* True if negative values of the signed integer type T use two's
+ complement, ones' complement, or signed magnitude representation,
+ respectively. Much GNU code assumes two's complement, but some
+ people like to be portable to all possible C hosts. */
+# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed. */
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T. These
+ macros have undefined behavior if T is signed and has padding bits.
+ If this is a problem for you, please let us know how to fix it for
+ your host. */
+# define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
+ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+# define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+
+/* Return zero if T can be determined to be an unsigned type.
+ Otherwise, return 1.
+ When compiling with GCC, INT_STRLEN_BOUND uses this macro to obtain a
+ tighter bound. Otherwise, it overestimates the true bound by one byte
+ when applied to unsigned types of size 2, 4, 16, ... bytes.
+ The symbol signed_type_or_expr__ is private to this header file. */
+# if __GNUC__ >= 2
+# define signed_type_or_expr__(t) TYPE_SIGNED (__typeof__ (t))
+# else
+# define signed_type_or_expr__(t) 1
+# endif
+
+/* Bound on length of the string representing an integer type or expression T.
+ Subtract 1 for the sign bit if T is signed; log10 (2.0) < 146/485;
+ add 1 for integer division truncation; add 1 more for a minus sign
+ if needed. */
+# define INT_STRLEN_BOUND(t) \
+ ((sizeof (t) * CHAR_BIT - signed_type_or_expr__ (t)) * 146 / 485 \
+ + signed_type_or_expr__ (t) + 1)
+
+/* Bound on buffer size needed to represent an integer type or expression T,
+ including the terminating null. */
+# define INT_BUFSIZE_BOUND(t) (INT_STRLEN_BOUND (t) + 1)
+
+#endif /* GL_INTPROPS_H */
diff --git a/gnu/inttypes.in.h b/gnu/inttypes.in.h
new file mode 100755
index 00000000..a732c697
--- /dev/null
+++ b/gnu/inttypes.in.h
@@ -0,0 +1,1103 @@
+/* Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Paul Eggert, Bruno Haible, Derek Price.
+ This file is part of gnulib.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/*
+ * ISO C 99 <inttypes.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/inttypes.h.html>
+ */
+
+/* Include the original <inttypes.h> if it exists, and if this file
+ has not been included yet or if this file includes gnulib stdint.h
+ which in turn includes this file.
+ The include_next requires a split double-inclusion guard. */
+#if ! defined INTTYPES_H || defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+# if @HAVE_INTTYPES_H@
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+# @INCLUDE_NEXT@ @NEXT_INTTYPES_H@
+# endif
+#endif
+
+#if ! defined INTTYPES_H && ! defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+#define INTTYPES_H
+
+/* Include <stdint.h> or the gnulib replacement.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdint.h>
+#endif
+/* Get CHAR_BIT. */
+#include <limits.h>
+
+#if !(INT_MIN == INT32_MIN && INT_MAX == INT32_MAX)
+# error "This file assumes that 'int' has exactly 32 bits. Please report your platform and compiler to <bug-gnulib@gnu.org>."
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* 7.8.1 Macros for format specifiers */
+
+#if ! defined __cplusplus || defined __STDC_FORMAT_MACROS
+
+# if defined _TNS_R_TARGET
+ /* Tandem NonStop R series and compatible platforms released before
+ July 2005 support %Ld but not %lld. */
+# define _LONG_LONG_FORMAT_PREFIX "L"
+# else
+# define _LONG_LONG_FORMAT_PREFIX "ll"
+# endif
+
+# if !defined PRId8 || @PRI_MACROS_BROKEN@
+# undef PRId8
+# ifdef INT8_MAX
+# define PRId8 "d"
+# endif
+# endif
+# if !defined PRIi8 || @PRI_MACROS_BROKEN@
+# undef PRIi8
+# ifdef INT8_MAX
+# define PRIi8 "i"
+# endif
+# endif
+# if !defined PRIo8 || @PRI_MACROS_BROKEN@
+# undef PRIo8
+# ifdef UINT8_MAX
+# define PRIo8 "o"
+# endif
+# endif
+# if !defined PRIu8 || @PRI_MACROS_BROKEN@
+# undef PRIu8
+# ifdef UINT8_MAX
+# define PRIu8 "u"
+# endif
+# endif
+# if !defined PRIx8 || @PRI_MACROS_BROKEN@
+# undef PRIx8
+# ifdef UINT8_MAX
+# define PRIx8 "x"
+# endif
+# endif
+# if !defined PRIX8 || @PRI_MACROS_BROKEN@
+# undef PRIX8
+# ifdef UINT8_MAX
+# define PRIX8 "X"
+# endif
+# endif
+# if !defined PRId16 || @PRI_MACROS_BROKEN@
+# undef PRId16
+# ifdef INT16_MAX
+# define PRId16 "d"
+# endif
+# endif
+# if !defined PRIi16 || @PRI_MACROS_BROKEN@
+# undef PRIi16
+# ifdef INT16_MAX
+# define PRIi16 "i"
+# endif
+# endif
+# if !defined PRIo16 || @PRI_MACROS_BROKEN@
+# undef PRIo16
+# ifdef UINT16_MAX
+# define PRIo16 "o"
+# endif
+# endif
+# if !defined PRIu16 || @PRI_MACROS_BROKEN@
+# undef PRIu16
+# ifdef UINT16_MAX
+# define PRIu16 "u"
+# endif
+# endif
+# if !defined PRIx16 || @PRI_MACROS_BROKEN@
+# undef PRIx16
+# ifdef UINT16_MAX
+# define PRIx16 "x"
+# endif
+# endif
+# if !defined PRIX16 || @PRI_MACROS_BROKEN@
+# undef PRIX16
+# ifdef UINT16_MAX
+# define PRIX16 "X"
+# endif
+# endif
+# if !defined PRId32 || @PRI_MACROS_BROKEN@
+# undef PRId32
+# ifdef INT32_MAX
+# define PRId32 "d"
+# endif
+# endif
+# if !defined PRIi32 || @PRI_MACROS_BROKEN@
+# undef PRIi32
+# ifdef INT32_MAX
+# define PRIi32 "i"
+# endif
+# endif
+# if !defined PRIo32 || @PRI_MACROS_BROKEN@
+# undef PRIo32
+# ifdef UINT32_MAX
+# define PRIo32 "o"
+# endif
+# endif
+# if !defined PRIu32 || @PRI_MACROS_BROKEN@
+# undef PRIu32
+# ifdef UINT32_MAX
+# define PRIu32 "u"
+# endif
+# endif
+# if !defined PRIx32 || @PRI_MACROS_BROKEN@
+# undef PRIx32
+# ifdef UINT32_MAX
+# define PRIx32 "x"
+# endif
+# endif
+# if !defined PRIX32 || @PRI_MACROS_BROKEN@
+# undef PRIX32
+# ifdef UINT32_MAX
+# define PRIX32 "X"
+# endif
+# endif
+# ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+# define _PRI64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _PRI64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRId64 || @PRI_MACROS_BROKEN@
+# undef PRId64
+# define PRId64 _PRI64_PREFIX "d"
+# endif
+# if !defined PRIi64 || @PRI_MACROS_BROKEN@
+# undef PRIi64
+# define PRIi64 _PRI64_PREFIX "i"
+# endif
+# endif
+# ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+# define _PRIu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _PRIu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined PRIo64 || @PRI_MACROS_BROKEN@
+# undef PRIo64
+# define PRIo64 _PRIu64_PREFIX "o"
+# endif
+# if !defined PRIu64 || @PRI_MACROS_BROKEN@
+# undef PRIu64
+# define PRIu64 _PRIu64_PREFIX "u"
+# endif
+# if !defined PRIx64 || @PRI_MACROS_BROKEN@
+# undef PRIx64
+# define PRIx64 _PRIu64_PREFIX "x"
+# endif
+# if !defined PRIX64 || @PRI_MACROS_BROKEN@
+# undef PRIX64
+# define PRIX64 _PRIu64_PREFIX "X"
+# endif
+# endif
+
+# if !defined PRIdLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST8
+# define PRIdLEAST8 "d"
+# endif
+# if !defined PRIiLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST8
+# define PRIiLEAST8 "i"
+# endif
+# if !defined PRIoLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST8
+# define PRIoLEAST8 "o"
+# endif
+# if !defined PRIuLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST8
+# define PRIuLEAST8 "u"
+# endif
+# if !defined PRIxLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST8
+# define PRIxLEAST8 "x"
+# endif
+# if !defined PRIXLEAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST8
+# define PRIXLEAST8 "X"
+# endif
+# if !defined PRIdLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST16
+# define PRIdLEAST16 "d"
+# endif
+# if !defined PRIiLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST16
+# define PRIiLEAST16 "i"
+# endif
+# if !defined PRIoLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST16
+# define PRIoLEAST16 "o"
+# endif
+# if !defined PRIuLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST16
+# define PRIuLEAST16 "u"
+# endif
+# if !defined PRIxLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST16
+# define PRIxLEAST16 "x"
+# endif
+# if !defined PRIXLEAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST16
+# define PRIXLEAST16 "X"
+# endif
+# if !defined PRIdLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST32
+# define PRIdLEAST32 "d"
+# endif
+# if !defined PRIiLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST32
+# define PRIiLEAST32 "i"
+# endif
+# if !defined PRIoLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST32
+# define PRIoLEAST32 "o"
+# endif
+# if !defined PRIuLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST32
+# define PRIuLEAST32 "u"
+# endif
+# if !defined PRIxLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST32
+# define PRIxLEAST32 "x"
+# endif
+# if !defined PRIXLEAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST32
+# define PRIXLEAST32 "X"
+# endif
+# ifdef INT64_MAX
+# if !defined PRIdLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIdLEAST64
+# define PRIdLEAST64 PRId64
+# endif
+# if !defined PRIiLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIiLEAST64
+# define PRIiLEAST64 PRIi64
+# endif
+# endif
+# ifdef UINT64_MAX
+# if !defined PRIoLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIoLEAST64
+# define PRIoLEAST64 PRIo64
+# endif
+# if !defined PRIuLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIuLEAST64
+# define PRIuLEAST64 PRIu64
+# endif
+# if !defined PRIxLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIxLEAST64
+# define PRIxLEAST64 PRIx64
+# endif
+# if !defined PRIXLEAST64 || @PRI_MACROS_BROKEN@
+# undef PRIXLEAST64
+# define PRIXLEAST64 PRIX64
+# endif
+# endif
+
+# if !defined PRIdFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define PRIdFAST8 PRId64
+# else
+# define PRIdFAST8 "d"
+# endif
+# endif
+# if !defined PRIiFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define PRIiFAST8 PRIi64
+# else
+# define PRIiFAST8 "i"
+# endif
+# endif
+# if !defined PRIoFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIoFAST8 PRIo64
+# else
+# define PRIoFAST8 "o"
+# endif
+# endif
+# if !defined PRIuFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIuFAST8 PRIu64
+# else
+# define PRIuFAST8 "u"
+# endif
+# endif
+# if !defined PRIxFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIxFAST8 PRIx64
+# else
+# define PRIxFAST8 "x"
+# endif
+# endif
+# if !defined PRIXFAST8 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define PRIXFAST8 PRIX64
+# else
+# define PRIXFAST8 "X"
+# endif
+# endif
+# if !defined PRIdFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define PRIdFAST16 PRId64
+# else
+# define PRIdFAST16 "d"
+# endif
+# endif
+# if !defined PRIiFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define PRIiFAST16 PRIi64
+# else
+# define PRIiFAST16 "i"
+# endif
+# endif
+# if !defined PRIoFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIoFAST16 PRIo64
+# else
+# define PRIoFAST16 "o"
+# endif
+# endif
+# if !defined PRIuFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIuFAST16 PRIu64
+# else
+# define PRIuFAST16 "u"
+# endif
+# endif
+# if !defined PRIxFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIxFAST16 PRIx64
+# else
+# define PRIxFAST16 "x"
+# endif
+# endif
+# if !defined PRIXFAST16 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define PRIXFAST16 PRIX64
+# else
+# define PRIXFAST16 "X"
+# endif
+# endif
+# if !defined PRIdFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define PRIdFAST32 PRId64
+# else
+# define PRIdFAST32 "d"
+# endif
+# endif
+# if !defined PRIiFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define PRIiFAST32 PRIi64
+# else
+# define PRIiFAST32 "i"
+# endif
+# endif
+# if !defined PRIoFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIoFAST32 PRIo64
+# else
+# define PRIoFAST32 "o"
+# endif
+# endif
+# if !defined PRIuFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIuFAST32 PRIu64
+# else
+# define PRIuFAST32 "u"
+# endif
+# endif
+# if !defined PRIxFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIxFAST32 PRIx64
+# else
+# define PRIxFAST32 "x"
+# endif
+# endif
+# if !defined PRIXFAST32 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define PRIXFAST32 PRIX64
+# else
+# define PRIXFAST32 "X"
+# endif
+# endif
+# ifdef INT64_MAX
+# if !defined PRIdFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIdFAST64
+# define PRIdFAST64 PRId64
+# endif
+# if !defined PRIiFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIiFAST64
+# define PRIiFAST64 PRIi64
+# endif
+# endif
+# ifdef UINT64_MAX
+# if !defined PRIoFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIoFAST64
+# define PRIoFAST64 PRIo64
+# endif
+# if !defined PRIuFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIuFAST64
+# define PRIuFAST64 PRIu64
+# endif
+# if !defined PRIxFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIxFAST64
+# define PRIxFAST64 PRIx64
+# endif
+# if !defined PRIXFAST64 || @PRI_MACROS_BROKEN@
+# undef PRIXFAST64
+# define PRIXFAST64 PRIX64
+# endif
+# endif
+
+# if !defined PRIdMAX || @PRI_MACROS_BROKEN@
+# undef PRIdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define PRIdMAX PRId64
+# else
+# define PRIdMAX "ld"
+# endif
+# endif
+# if !defined PRIiMAX || @PRI_MACROS_BROKEN@
+# undef PRIiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define PRIiMAX PRIi64
+# else
+# define PRIiMAX "li"
+# endif
+# endif
+# if !defined PRIoMAX || @PRI_MACROS_BROKEN@
+# undef PRIoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIoMAX PRIo64
+# else
+# define PRIoMAX "lo"
+# endif
+# endif
+# if !defined PRIuMAX || @PRI_MACROS_BROKEN@
+# undef PRIuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIuMAX PRIu64
+# else
+# define PRIuMAX "lu"
+# endif
+# endif
+# if !defined PRIxMAX || @PRI_MACROS_BROKEN@
+# undef PRIxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIxMAX PRIx64
+# else
+# define PRIxMAX "lx"
+# endif
+# endif
+# if !defined PRIXMAX || @PRI_MACROS_BROKEN@
+# undef PRIXMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define PRIXMAX PRIX64
+# else
+# define PRIXMAX "lX"
+# endif
+# endif
+
+# if !defined PRIdPTR || @PRI_MACROS_BROKEN@
+# undef PRIdPTR
+# ifdef INTPTR_MAX
+# define PRIdPTR @PRIPTR_PREFIX@ "d"
+# endif
+# endif
+# if !defined PRIiPTR || @PRI_MACROS_BROKEN@
+# undef PRIiPTR
+# ifdef INTPTR_MAX
+# define PRIiPTR @PRIPTR_PREFIX@ "i"
+# endif
+# endif
+# if !defined PRIoPTR || @PRI_MACROS_BROKEN@
+# undef PRIoPTR
+# ifdef UINTPTR_MAX
+# define PRIoPTR @PRIPTR_PREFIX@ "o"
+# endif
+# endif
+# if !defined PRIuPTR || @PRI_MACROS_BROKEN@
+# undef PRIuPTR
+# ifdef UINTPTR_MAX
+# define PRIuPTR @PRIPTR_PREFIX@ "u"
+# endif
+# endif
+# if !defined PRIxPTR || @PRI_MACROS_BROKEN@
+# undef PRIxPTR
+# ifdef UINTPTR_MAX
+# define PRIxPTR @PRIPTR_PREFIX@ "x"
+# endif
+# endif
+# if !defined PRIXPTR || @PRI_MACROS_BROKEN@
+# undef PRIXPTR
+# ifdef UINTPTR_MAX
+# define PRIXPTR @PRIPTR_PREFIX@ "X"
+# endif
+# endif
+
+# if !defined SCNd8 || @PRI_MACROS_BROKEN@
+# undef SCNd8
+# ifdef INT8_MAX
+# define SCNd8 "hhd"
+# endif
+# endif
+# if !defined SCNi8 || @PRI_MACROS_BROKEN@
+# undef SCNi8
+# ifdef INT8_MAX
+# define SCNi8 "hhi"
+# endif
+# endif
+# if !defined SCNo8 || @PRI_MACROS_BROKEN@
+# undef SCNo8
+# ifdef UINT8_MAX
+# define SCNo8 "hho"
+# endif
+# endif
+# if !defined SCNu8 || @PRI_MACROS_BROKEN@
+# undef SCNu8
+# ifdef UINT8_MAX
+# define SCNu8 "hhu"
+# endif
+# endif
+# if !defined SCNx8 || @PRI_MACROS_BROKEN@
+# undef SCNx8
+# ifdef UINT8_MAX
+# define SCNx8 "hhx"
+# endif
+# endif
+# if !defined SCNd16 || @PRI_MACROS_BROKEN@
+# undef SCNd16
+# ifdef INT16_MAX
+# define SCNd16 "hd"
+# endif
+# endif
+# if !defined SCNi16 || @PRI_MACROS_BROKEN@
+# undef SCNi16
+# ifdef INT16_MAX
+# define SCNi16 "hi"
+# endif
+# endif
+# if !defined SCNo16 || @PRI_MACROS_BROKEN@
+# undef SCNo16
+# ifdef UINT16_MAX
+# define SCNo16 "ho"
+# endif
+# endif
+# if !defined SCNu16 || @PRI_MACROS_BROKEN@
+# undef SCNu16
+# ifdef UINT16_MAX
+# define SCNu16 "hu"
+# endif
+# endif
+# if !defined SCNx16 || @PRI_MACROS_BROKEN@
+# undef SCNx16
+# ifdef UINT16_MAX
+# define SCNx16 "hx"
+# endif
+# endif
+# if !defined SCNd32 || @PRI_MACROS_BROKEN@
+# undef SCNd32
+# ifdef INT32_MAX
+# define SCNd32 "d"
+# endif
+# endif
+# if !defined SCNi32 || @PRI_MACROS_BROKEN@
+# undef SCNi32
+# ifdef INT32_MAX
+# define SCNi32 "i"
+# endif
+# endif
+# if !defined SCNo32 || @PRI_MACROS_BROKEN@
+# undef SCNo32
+# ifdef UINT32_MAX
+# define SCNo32 "o"
+# endif
+# endif
+# if !defined SCNu32 || @PRI_MACROS_BROKEN@
+# undef SCNu32
+# ifdef UINT32_MAX
+# define SCNu32 "u"
+# endif
+# endif
+# if !defined SCNx32 || @PRI_MACROS_BROKEN@
+# undef SCNx32
+# ifdef UINT32_MAX
+# define SCNx32 "x"
+# endif
+# endif
+# ifdef INT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @INT64_MAX_EQ_LONG_MAX@)
+# define _SCN64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _SCN64_PREFIX "I64"
+# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNd64 || @PRI_MACROS_BROKEN@
+# undef SCNd64
+# define SCNd64 _SCN64_PREFIX "d"
+# endif
+# if !defined SCNi64 || @PRI_MACROS_BROKEN@
+# undef SCNi64
+# define SCNi64 _SCN64_PREFIX "i"
+# endif
+# endif
+# ifdef UINT64_MAX
+# if (@APPLE_UNIVERSAL_BUILD@ ? defined _LP64 : @UINT64_MAX_EQ_ULONG_MAX@)
+# define _SCNu64_PREFIX "l"
+# elif defined _MSC_VER || defined __MINGW32__
+# define _SCNu64_PREFIX "I64"
+# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX
+# endif
+# if !defined SCNo64 || @PRI_MACROS_BROKEN@
+# undef SCNo64
+# define SCNo64 _SCNu64_PREFIX "o"
+# endif
+# if !defined SCNu64 || @PRI_MACROS_BROKEN@
+# undef SCNu64
+# define SCNu64 _SCNu64_PREFIX "u"
+# endif
+# if !defined SCNx64 || @PRI_MACROS_BROKEN@
+# undef SCNx64
+# define SCNx64 _SCNu64_PREFIX "x"
+# endif
+# endif
+
+# if !defined SCNdLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST8
+# define SCNdLEAST8 "hhd"
+# endif
+# if !defined SCNiLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST8
+# define SCNiLEAST8 "hhi"
+# endif
+# if !defined SCNoLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST8
+# define SCNoLEAST8 "hho"
+# endif
+# if !defined SCNuLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST8
+# define SCNuLEAST8 "hhu"
+# endif
+# if !defined SCNxLEAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST8
+# define SCNxLEAST8 "hhx"
+# endif
+# if !defined SCNdLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST16
+# define SCNdLEAST16 "hd"
+# endif
+# if !defined SCNiLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST16
+# define SCNiLEAST16 "hi"
+# endif
+# if !defined SCNoLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST16
+# define SCNoLEAST16 "ho"
+# endif
+# if !defined SCNuLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST16
+# define SCNuLEAST16 "hu"
+# endif
+# if !defined SCNxLEAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST16
+# define SCNxLEAST16 "hx"
+# endif
+# if !defined SCNdLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST32
+# define SCNdLEAST32 "d"
+# endif
+# if !defined SCNiLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST32
+# define SCNiLEAST32 "i"
+# endif
+# if !defined SCNoLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST32
+# define SCNoLEAST32 "o"
+# endif
+# if !defined SCNuLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST32
+# define SCNuLEAST32 "u"
+# endif
+# if !defined SCNxLEAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST32
+# define SCNxLEAST32 "x"
+# endif
+# ifdef INT64_MAX
+# if !defined SCNdLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNdLEAST64
+# define SCNdLEAST64 SCNd64
+# endif
+# if !defined SCNiLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNiLEAST64
+# define SCNiLEAST64 SCNi64
+# endif
+# endif
+# ifdef UINT64_MAX
+# if !defined SCNoLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNoLEAST64
+# define SCNoLEAST64 SCNo64
+# endif
+# if !defined SCNuLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNuLEAST64
+# define SCNuLEAST64 SCNu64
+# endif
+# if !defined SCNxLEAST64 || @PRI_MACROS_BROKEN@
+# undef SCNxLEAST64
+# define SCNxLEAST64 SCNx64
+# endif
+# endif
+
+# if !defined SCNdFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define SCNdFAST8 SCNd64
+# elif INT_FAST8_MAX == 0x7fff
+# define SCNdFAST8 "hd"
+# elif INT_FAST8_MAX == 0x7f
+# define SCNdFAST8 "hhd"
+# else
+# define SCNdFAST8 "d"
+# endif
+# endif
+# if !defined SCNiFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST8
+# if INT_FAST8_MAX > INT32_MAX
+# define SCNiFAST8 SCNi64
+# elif INT_FAST8_MAX == 0x7fff
+# define SCNiFAST8 "hi"
+# elif INT_FAST8_MAX == 0x7f
+# define SCNiFAST8 "hhi"
+# else
+# define SCNiFAST8 "i"
+# endif
+# endif
+# if !defined SCNoFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNoFAST8 SCNo64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNoFAST8 "ho"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNoFAST8 "hho"
+# else
+# define SCNoFAST8 "o"
+# endif
+# endif
+# if !defined SCNuFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNuFAST8 SCNu64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNuFAST8 "hu"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNuFAST8 "hhu"
+# else
+# define SCNuFAST8 "u"
+# endif
+# endif
+# if !defined SCNxFAST8 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST8
+# if UINT_FAST8_MAX > UINT32_MAX
+# define SCNxFAST8 SCNx64
+# elif UINT_FAST8_MAX == 0xffff
+# define SCNxFAST8 "hx"
+# elif UINT_FAST8_MAX == 0xff
+# define SCNxFAST8 "hhx"
+# else
+# define SCNxFAST8 "x"
+# endif
+# endif
+# if !defined SCNdFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define SCNdFAST16 SCNd64
+# elif INT_FAST16_MAX == 0x7fff
+# define SCNdFAST16 "hd"
+# else
+# define SCNdFAST16 "d"
+# endif
+# endif
+# if !defined SCNiFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST16
+# if INT_FAST16_MAX > INT32_MAX
+# define SCNiFAST16 SCNi64
+# elif INT_FAST16_MAX == 0x7fff
+# define SCNiFAST16 "hi"
+# else
+# define SCNiFAST16 "i"
+# endif
+# endif
+# if !defined SCNoFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNoFAST16 SCNo64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNoFAST16 "ho"
+# else
+# define SCNoFAST16 "o"
+# endif
+# endif
+# if !defined SCNuFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNuFAST16 SCNu64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNuFAST16 "hu"
+# else
+# define SCNuFAST16 "u"
+# endif
+# endif
+# if !defined SCNxFAST16 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST16
+# if UINT_FAST16_MAX > UINT32_MAX
+# define SCNxFAST16 SCNx64
+# elif UINT_FAST16_MAX == 0xffff
+# define SCNxFAST16 "hx"
+# else
+# define SCNxFAST16 "x"
+# endif
+# endif
+# if !defined SCNdFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define SCNdFAST32 SCNd64
+# else
+# define SCNdFAST32 "d"
+# endif
+# endif
+# if !defined SCNiFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST32
+# if INT_FAST32_MAX > INT32_MAX
+# define SCNiFAST32 SCNi64
+# else
+# define SCNiFAST32 "i"
+# endif
+# endif
+# if !defined SCNoFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNoFAST32 SCNo64
+# else
+# define SCNoFAST32 "o"
+# endif
+# endif
+# if !defined SCNuFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNuFAST32 SCNu64
+# else
+# define SCNuFAST32 "u"
+# endif
+# endif
+# if !defined SCNxFAST32 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST32
+# if UINT_FAST32_MAX > UINT32_MAX
+# define SCNxFAST32 SCNx64
+# else
+# define SCNxFAST32 "x"
+# endif
+# endif
+# ifdef INT64_MAX
+# if !defined SCNdFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNdFAST64
+# define SCNdFAST64 SCNd64
+# endif
+# if !defined SCNiFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNiFAST64
+# define SCNiFAST64 SCNi64
+# endif
+# endif
+# ifdef UINT64_MAX
+# if !defined SCNoFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNoFAST64
+# define SCNoFAST64 SCNo64
+# endif
+# if !defined SCNuFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNuFAST64
+# define SCNuFAST64 SCNu64
+# endif
+# if !defined SCNxFAST64 || @PRI_MACROS_BROKEN@
+# undef SCNxFAST64
+# define SCNxFAST64 SCNx64
+# endif
+# endif
+
+# if !defined SCNdMAX || @PRI_MACROS_BROKEN@
+# undef SCNdMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define SCNdMAX SCNd64
+# else
+# define SCNdMAX "ld"
+# endif
+# endif
+# if !defined SCNiMAX || @PRI_MACROS_BROKEN@
+# undef SCNiMAX
+# if @INT32_MAX_LT_INTMAX_MAX@
+# define SCNiMAX SCNi64
+# else
+# define SCNiMAX "li"
+# endif
+# endif
+# if !defined SCNoMAX || @PRI_MACROS_BROKEN@
+# undef SCNoMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNoMAX SCNo64
+# else
+# define SCNoMAX "lo"
+# endif
+# endif
+# if !defined SCNuMAX || @PRI_MACROS_BROKEN@
+# undef SCNuMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNuMAX SCNu64
+# else
+# define SCNuMAX "lu"
+# endif
+# endif
+# if !defined SCNxMAX || @PRI_MACROS_BROKEN@
+# undef SCNxMAX
+# if @UINT32_MAX_LT_UINTMAX_MAX@
+# define SCNxMAX SCNx64
+# else
+# define SCNxMAX "lx"
+# endif
+# endif
+
+# if !defined SCNdPTR || @PRI_MACROS_BROKEN@
+# undef SCNdPTR
+# ifdef INTPTR_MAX
+# define SCNdPTR @PRIPTR_PREFIX@ "d"
+# endif
+# endif
+# if !defined SCNiPTR || @PRI_MACROS_BROKEN@
+# undef SCNiPTR
+# ifdef INTPTR_MAX
+# define SCNiPTR @PRIPTR_PREFIX@ "i"
+# endif
+# endif
+# if !defined SCNoPTR || @PRI_MACROS_BROKEN@
+# undef SCNoPTR
+# ifdef UINTPTR_MAX
+# define SCNoPTR @PRIPTR_PREFIX@ "o"
+# endif
+# endif
+# if !defined SCNuPTR || @PRI_MACROS_BROKEN@
+# undef SCNuPTR
+# ifdef UINTPTR_MAX
+# define SCNuPTR @PRIPTR_PREFIX@ "u"
+# endif
+# endif
+# if !defined SCNxPTR || @PRI_MACROS_BROKEN@
+# undef SCNxPTR
+# ifdef UINTPTR_MAX
+# define SCNxPTR @PRIPTR_PREFIX@ "x"
+# endif
+# endif
+
+#endif
+
+/* 7.8.2 Functions for greatest-width integer types */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_IMAXABS@
+# if !@HAVE_DECL_IMAXABS@
+extern intmax_t imaxabs (intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxabs
+# if HAVE_RAW_DECL_IMAXABS
+_GL_WARN_ON_USE (imaxabs, "imaxabs is unportable - "
+ "use gnulib module imaxabs for portability");
+# endif
+#endif
+
+#if @GNULIB_IMAXDIV@
+# if !@HAVE_DECL_IMAXDIV@
+typedef struct { intmax_t quot; intmax_t rem; } imaxdiv_t;
+extern imaxdiv_t imaxdiv (intmax_t, intmax_t);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef imaxdiv
+# if HAVE_RAW_DECL_IMAXDIV
+_GL_WARN_ON_USE (imaxdiv, "imaxdiv is unportable - "
+ "use gnulib module imaxdiv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOIMAX@
+# if !@HAVE_DECL_STRTOIMAX@
+extern intmax_t strtoimax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoimax
+# if HAVE_RAW_DECL_STRTOIMAX
+_GL_WARN_ON_USE (strtoimax, "strtoimax is unportable - "
+ "use gnulib module strtoimax for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOUMAX@
+# if !@HAVE_DECL_STRTOUMAX@
+extern uintmax_t strtoumax (const char *, char **, int) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoumax
+# if HAVE_RAW_DECL_STRTOUMAX
+_GL_WARN_ON_USE (strtoumax, "strtoumax is unportable - "
+ "use gnulib module strtoumax for portability");
+# endif
+#endif
+
+/* Don't bother defining or declaring wcstoimax and wcstoumax, since
+ wide-character functions like this are hardly ever useful. */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* !defined INTTYPES_H && !defined _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H */
diff --git a/gnu/isnan.c b/gnu/isnan.c
new file mode 100755
index 00000000..ee9fa8b6
--- /dev/null
+++ b/gnu/isnan.c
@@ -0,0 +1,173 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef USE_LONG_DOUBLE
+/* Specification found in math.h or isnanl-nolibm.h. */
+extern int rpl_isnanl (long double x);
+#elif ! defined USE_FLOAT
+/* Specification found in math.h or isnand-nolibm.h. */
+extern int rpl_isnand (double x);
+#else /* defined USE_FLOAT */
+/* Specification found in math.h or isnanf-nolibm.h. */
+extern int rpl_isnanf (float x);
+#endif
+
+#include <float.h>
+#include <string.h>
+
+#include "float+.h"
+
+#ifdef USE_LONG_DOUBLE
+# define FUNC rpl_isnanl
+# define DOUBLE long double
+# define MAX_EXP LDBL_MAX_EXP
+# define MIN_EXP LDBL_MIN_EXP
+# if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD LDBL_EXPBIT0_WORD
+# define EXPBIT0_BIT LDBL_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_LDBL
+# define L_(literal) literal##L
+#elif ! defined USE_FLOAT
+# define FUNC rpl_isnand
+# define DOUBLE double
+# define MAX_EXP DBL_MAX_EXP
+# define MIN_EXP DBL_MIN_EXP
+# if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD DBL_EXPBIT0_WORD
+# define EXPBIT0_BIT DBL_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_DBL
+# define L_(literal) literal
+#else /* defined USE_FLOAT */
+# define FUNC rpl_isnanf
+# define DOUBLE float
+# define MAX_EXP FLT_MAX_EXP
+# define MIN_EXP FLT_MIN_EXP
+# if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+# define KNOWN_EXPBIT0_LOCATION
+# define EXPBIT0_WORD FLT_EXPBIT0_WORD
+# define EXPBIT0_BIT FLT_EXPBIT0_BIT
+# endif
+# define SIZE SIZEOF_FLT
+# define L_(literal) literal##f
+#endif
+
+#define EXP_MASK ((MAX_EXP - MIN_EXP) | 7)
+
+#define NWORDS \
+ ((sizeof (DOUBLE) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { DOUBLE value; unsigned int word[NWORDS]; } memory_double;
+
+int
+FUNC (DOUBLE x)
+{
+#ifdef KNOWN_EXPBIT0_LOCATION
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ /* Special CPU dependent code is needed to treat bit patterns outside the
+ IEEE 754 specification (such as Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals) as NaNs.
+ These bit patterns are:
+ - exponent = 0x0001..0x7FFF, mantissa bit 63 = 0,
+ - exponent = 0x0000, mantissa bit 63 = 1.
+ The NaN bit pattern is:
+ - exponent = 0x7FFF, mantissa >= 0x8000000000000001. */
+ memory_double m;
+ unsigned int exponent;
+
+ m.value = x;
+ exponent = (m.word[EXPBIT0_WORD] >> EXPBIT0_BIT) & EXP_MASK;
+# ifdef WORDS_BIGENDIAN
+ /* Big endian: EXPBIT0_WORD = 0, EXPBIT0_BIT = 16. */
+ if (exponent == 0)
+ return 1 & (m.word[0] >> 15);
+ else if (exponent == EXP_MASK)
+ return (((m.word[0] ^ 0x8000U) << 16) | m.word[1] | (m.word[2] >> 16)) != 0;
+ else
+ return 1 & ~(m.word[0] >> 15);
+# else
+ /* Little endian: EXPBIT0_WORD = 2, EXPBIT0_BIT = 0. */
+ if (exponent == 0)
+ return (m.word[1] >> 31);
+ else if (exponent == EXP_MASK)
+ return ((m.word[1] ^ 0x80000000U) | m.word[0]) != 0;
+ else
+ return (m.word[1] >> 31) ^ 1;
+# endif
+# else
+ /* Be careful to not do any floating-point operation on x, such as x == x,
+ because x may be a signaling NaN. */
+# if defined __SUNPRO_C || defined __DECC || (defined __sgi && !defined __GNUC__)
+ /* The Sun C 5.0 compilers and the Compaq (ex-DEC) 6.4 compilers don't
+ recognize the initializers as constant expressions. The latter compiler
+ also fails when constant-folding 0.0 / 0.0 even when constant-folding is
+ not required. The SGI MIPSpro C compiler complains about "floating-point
+ operation result is out of range". */
+ static DOUBLE zero = L_(0.0);
+ memory_double nan;
+ DOUBLE plus_inf = L_(1.0) / L_(0.0);
+ DOUBLE minus_inf = -L_(1.0) / L_(0.0);
+ nan.value = zero / zero;
+# else
+ static memory_double nan = { L_(0.0) / L_(0.0) };
+ static DOUBLE plus_inf = L_(1.0) / L_(0.0);
+ static DOUBLE minus_inf = -L_(1.0) / L_(0.0);
+# endif
+ {
+ memory_double m;
+
+ /* A NaN can be recognized through its exponent. But exclude +Infinity and
+ -Infinity, which have the same exponent. */
+ m.value = x;
+ if (((m.word[EXPBIT0_WORD] ^ nan.word[EXPBIT0_WORD])
+ & (EXP_MASK << EXPBIT0_BIT))
+ == 0)
+ return (memcmp (&m.value, &plus_inf, SIZE) != 0
+ && memcmp (&m.value, &minus_inf, SIZE) != 0);
+ else
+ return 0;
+ }
+# endif
+#else
+ /* The configuration did not find sufficient information. Give up about
+ the signaling NaNs, handle only the quiet NaNs. */
+ if (x == x)
+ {
+# if defined USE_LONG_DOUBLE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ /* Detect any special bit patterns that pass ==; see comment above. */
+ memory_double m1;
+ memory_double m2;
+
+ memset (&m1.value, 0, SIZE);
+ memset (&m2.value, 0, SIZE);
+ m1.value = x;
+ m2.value = x + (x ? 0.0L : -0.0L);
+ if (memcmp (&m1.value, &m2.value, SIZE) != 0)
+ return 1;
+# endif
+ return 0;
+ }
+ else
+ return 1;
+#endif
+}
diff --git a/gnu/isnand-nolibm.h b/gnu/isnand-nolibm.h
new file mode 100755
index 00000000..bcf6b85a
--- /dev/null
+++ b/gnu/isnand-nolibm.h
@@ -0,0 +1,33 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNAND_IN_LIBC
+/* Get declaration of isnan macro. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnand
+# define isnand(x) __builtin_isnan ((double)(x))
+# else
+# undef isnand
+# define isnand(x) isnan ((double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnand
+# define isnand rpl_isnand
+extern int isnand (double x);
+#endif
diff --git a/gnu/isnand.c b/gnu/isnand.c
new file mode 100755
index 00000000..de026def
--- /dev/null
+++ b/gnu/isnand.c
@@ -0,0 +1,19 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include "isnan.c"
diff --git a/gnu/isnanf-nolibm.h b/gnu/isnanf-nolibm.h
new file mode 100755
index 00000000..4f90031f
--- /dev/null
+++ b/gnu/isnanf-nolibm.h
@@ -0,0 +1,33 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNANF_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanf function. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+# elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanf
+# define isnanf rpl_isnanf
+extern int isnanf (float x);
+#endif
diff --git a/gnu/isnanf.c b/gnu/isnanf.c
new file mode 100755
index 00000000..4f2e5abc
--- /dev/null
+++ b/gnu/isnanf.c
@@ -0,0 +1,20 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#define USE_FLOAT
+#include "isnan.c"
diff --git a/gnu/isnanl-nolibm.h b/gnu/isnanl-nolibm.h
new file mode 100755
index 00000000..3dbba8bc
--- /dev/null
+++ b/gnu/isnanl-nolibm.h
@@ -0,0 +1,33 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if HAVE_ISNANL_IN_LIBC
+/* Get declaration of isnan macro or (older) isnanl function. */
+# include <math.h>
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+# endif
+#else
+/* Test whether X is a NaN. */
+# undef isnanl
+# define isnanl rpl_isnanl
+extern int isnanl (long double x);
+#endif
diff --git a/gnu/isnanl.c b/gnu/isnanl.c
new file mode 100755
index 00000000..9594801f
--- /dev/null
+++ b/gnu/isnanl.c
@@ -0,0 +1,20 @@
+/* Test for NaN that does not need libm.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#define USE_LONG_DOUBLE
+#include "isnan.c"
diff --git a/gnu/langinfo.in.h b/gnu/langinfo.in.h
new file mode 100755
index 00000000..ff80d4bf
--- /dev/null
+++ b/gnu/langinfo.in.h
@@ -0,0 +1,162 @@
+/* Substitute for and wrapper around <langinfo.h>.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * POSIX <langinfo.h> for platforms that lack it or have an incomplete one.
+ * <http://www.opengroup.org/onlinepubs/9699919799/basedefs/langinfo.h.html>
+ */
+
+#ifndef _GL_LANGINFO_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_LANGINFO_H@
+# @INCLUDE_NEXT@ @NEXT_LANGINFO_H@
+#endif
+
+#ifndef _GL_LANGINFO_H
+#define _GL_LANGINFO_H
+
+
+#if !@HAVE_LANGINFO_H@
+
+/* A platform that lacks <langinfo.h>. */
+
+/* Assume that it also lacks <nl_types.h> and the nl_item type. */
+typedef int nl_item;
+
+/* nl_langinfo items of the LC_CTYPE category */
+# define CODESET 10000
+/* nl_langinfo items of the LC_NUMERIC category */
+# define RADIXCHAR 10001
+# define THOUSEP 10002
+/* nl_langinfo items of the LC_TIME category */
+# define D_T_FMT 10003
+# define D_FMT 10004
+# define T_FMT 10005
+# define T_FMT_AMPM 10006
+# define AM_STR 10007
+# define PM_STR 10008
+# define DAY_1 10009
+# define DAY_2 (DAY_1 + 1)
+# define DAY_3 (DAY_1 + 2)
+# define DAY_4 (DAY_1 + 3)
+# define DAY_5 (DAY_1 + 4)
+# define DAY_6 (DAY_1 + 5)
+# define DAY_7 (DAY_1 + 6)
+# define ABDAY_1 10016
+# define ABDAY_2 (ABDAY_1 + 1)
+# define ABDAY_3 (ABDAY_1 + 2)
+# define ABDAY_4 (ABDAY_1 + 3)
+# define ABDAY_5 (ABDAY_1 + 4)
+# define ABDAY_6 (ABDAY_1 + 5)
+# define ABDAY_7 (ABDAY_1 + 6)
+# define MON_1 10023
+# define MON_2 (MON_1 + 1)
+# define MON_3 (MON_1 + 2)
+# define MON_4 (MON_1 + 3)
+# define MON_5 (MON_1 + 4)
+# define MON_6 (MON_1 + 5)
+# define MON_7 (MON_1 + 6)
+# define MON_8 (MON_1 + 7)
+# define MON_9 (MON_1 + 8)
+# define MON_10 (MON_1 + 9)
+# define MON_11 (MON_1 + 10)
+# define MON_12 (MON_1 + 11)
+# define ABMON_1 10035
+# define ABMON_2 (ABMON_1 + 1)
+# define ABMON_3 (ABMON_1 + 2)
+# define ABMON_4 (ABMON_1 + 3)
+# define ABMON_5 (ABMON_1 + 4)
+# define ABMON_6 (ABMON_1 + 5)
+# define ABMON_7 (ABMON_1 + 6)
+# define ABMON_8 (ABMON_1 + 7)
+# define ABMON_9 (ABMON_1 + 8)
+# define ABMON_10 (ABMON_1 + 9)
+# define ABMON_11 (ABMON_1 + 10)
+# define ABMON_12 (ABMON_1 + 11)
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+/* nl_langinfo items of the LC_MONETARY category */
+# define CRNCYSTR 10052
+/* nl_langinfo items of the LC_MESSAGES category */
+# define YESEXPR 10053
+# define NOEXPR 10054
+
+#else
+
+/* A platform that has <langinfo.h>. */
+
+# if !@HAVE_LANGINFO_CODESET@
+# define CODESET 10000
+# define GNULIB_defined_CODESET 1
+# endif
+
+# if !@HAVE_LANGINFO_ERA@
+# define ERA 10047
+# define ERA_D_FMT 10048
+# define ERA_D_T_FMT 10049
+# define ERA_T_FMT 10050
+# define ALT_DIGITS 10051
+# define GNULIB_defined_ERA 1
+# endif
+
+#endif
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Declare overridden functions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return a piece of locale dependent information.
+ Note: The difference between nl_langinfo (CODESET) and locale_charset ()
+ is that the latter normalizes the encoding names to GNU conventions. */
+
+#if @GNULIB_NL_LANGINFO@
+# if @REPLACE_NL_LANGINFO@
+# undef nl_langinfo
+# define nl_langinfo rpl_nl_langinfo
+# endif
+# if !@HAVE_NL_LANGINFO@ || @REPLACE_NL_LANGINFO@
+extern char *nl_langinfo (nl_item item);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef nl_langinfo
+# if HAVE_RAW_DECL_NL_LANGINFO
+_GL_WARN_ON_USE (nl_langinfo, "nl_langinfo is not portable - "
+ "use gnulib module nl_langinfo for portability");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_LANGINFO_H */
+#endif /* _GL_LANGINFO_H */
diff --git a/gnu/localcharset.c b/gnu/localcharset.c
new file mode 100755
index 00000000..a04dc446
--- /dev/null
+++ b/gnu/localcharset.c
@@ -0,0 +1,549 @@
+/* Determine a canonical name for the current locale's character encoding.
+
+ Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "localcharset.h"
+
+#include <fcntl.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+
+#if defined __APPLE__ && defined __MACH__ && HAVE_LANGINFO_CODESET
+# define DARWIN7 /* Darwin 7 or newer, i.e. MacOS X 10.3 or newer */
+#endif
+
+#if defined _WIN32 || defined __WIN32__
+# define WIN32_NATIVE
+#endif
+
+#if defined __EMX__
+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
+# ifndef OS2
+# define OS2
+# endif
+#endif
+
+#if !defined WIN32_NATIVE
+# include <unistd.h>
+# if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+# else
+# if 0 /* see comment below */
+# include <locale.h>
+# endif
+# endif
+# ifdef __CYGWIN__
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+# endif
+#elif defined WIN32_NATIVE
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+#if defined OS2
+# define INCL_DOS
+# include <os2.h>
+#endif
+
+#if ENABLE_RELOCATABLE
+# include "relocatable.h"
+#else
+# define relocate(pathname) (pathname)
+#endif
+
+/* Get LIBDIR. */
+#ifndef LIBDIR
+# include "configmake.h"
+#endif
+
+/* Define O_NOFOLLOW to 0 on platforms where it does not exist. */
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#endif
+
+#ifndef DIRECTORY_SEPARATOR
+# define DIRECTORY_SEPARATOR '/'
+#endif
+
+#ifndef ISSLASH
+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
+#endif
+
+#if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc getc_unlocked
+#endif
+
+/* The following static variable is declared 'volatile' to avoid a
+ possible multithread problem in the function get_charset_aliases. If we
+ are running in a threaded environment, and if two threads initialize
+ 'charset_aliases' simultaneously, both will produce the same value,
+ and everything will be ok if the two assignments to 'charset_aliases'
+ are atomic. But I don't know what will happen if the two assignments mix. */
+#if __STDC__ != 1
+# define volatile /* empty */
+#endif
+/* Pointer to the contents of the charset.alias file, if it has already been
+ read, else NULL. Its format is:
+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
+static const char * volatile charset_aliases;
+
+/* Return a pointer to the contents of the charset.alias file. */
+static const char *
+get_charset_aliases (void)
+{
+ const char *cp;
+
+ cp = charset_aliases;
+ if (cp == NULL)
+ {
+#if !(defined DARWIN7 || defined VMS || defined WIN32_NATIVE || defined __CYGWIN__)
+ const char *dir;
+ const char *base = "charset.alias";
+ char *file_name;
+
+ /* Make it possible to override the charset.alias location. This is
+ necessary for running the testsuite before "make install". */
+ dir = getenv ("CHARSETALIASDIR");
+ if (dir == NULL || dir[0] == '\0')
+ dir = relocate (LIBDIR);
+
+ /* Concatenate dir and base into freshly allocated file_name. */
+ {
+ size_t dir_len = strlen (dir);
+ size_t base_len = strlen (base);
+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
+ if (file_name != NULL)
+ {
+ memcpy (file_name, dir, dir_len);
+ if (add_slash)
+ file_name[dir_len] = DIRECTORY_SEPARATOR;
+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
+ }
+ }
+
+ if (file_name == NULL)
+ /* Out of memory. Treat the file as empty. */
+ cp = "";
+ else
+ {
+ int fd;
+
+ /* Open the file. Reject symbolic links on platforms that support
+ O_NOFOLLOW. This is a security feature. Without it, an attacker
+ could retrieve parts of the contents (namely, the tail of the
+ first line that starts with "* ") of an arbitrary file by placing
+ a symbolic link to that file under the name "charset.alias" in
+ some writable directory and defining the environment variable
+ CHARSETALIASDIR to point to that directory. */
+ fd = open (file_name,
+ O_RDONLY | (HAVE_WORKING_O_NOFOLLOW ? O_NOFOLLOW : 0));
+ if (fd < 0)
+ /* File not found. Treat it as empty. */
+ cp = "";
+ else
+ {
+ FILE *fp;
+
+ fp = fdopen (fd, "r");
+ if (fp == NULL)
+ {
+ /* Out of memory. Treat the file as empty. */
+ close (fd);
+ cp = "";
+ }
+ else
+ {
+ /* Parse the file's contents. */
+ char *res_ptr = NULL;
+ size_t res_size = 0;
+
+ for (;;)
+ {
+ int c;
+ char buf1[50+1];
+ char buf2[50+1];
+ size_t l1, l2;
+ char *old_res_ptr;
+
+ c = getc (fp);
+ if (c == EOF)
+ break;
+ if (c == '\n' || c == ' ' || c == '\t')
+ continue;
+ if (c == '#')
+ {
+ /* Skip comment, to end of line. */
+ do
+ c = getc (fp);
+ while (!(c == EOF || c == '\n'));
+ if (c == EOF)
+ break;
+ continue;
+ }
+ ungetc (c, fp);
+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
+ break;
+ l1 = strlen (buf1);
+ l2 = strlen (buf2);
+ old_res_ptr = res_ptr;
+ if (res_size == 0)
+ {
+ res_size = l1 + 1 + l2 + 1;
+ res_ptr = (char *) malloc (res_size + 1);
+ }
+ else
+ {
+ res_size += l1 + 1 + l2 + 1;
+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
+ }
+ if (res_ptr == NULL)
+ {
+ /* Out of memory. */
+ res_size = 0;
+ if (old_res_ptr != NULL)
+ free (old_res_ptr);
+ break;
+ }
+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
+ }
+ fclose (fp);
+ if (res_size == 0)
+ cp = "";
+ else
+ {
+ *(res_ptr + res_size) = '\0';
+ cp = res_ptr;
+ }
+ }
+ }
+
+ free (file_name);
+ }
+
+#else
+
+# if defined DARWIN7
+ /* To avoid the trouble of installing a file that is shared by many
+ GNU packages -- many packaging systems have problems with this --,
+ simply inline the aliases here. */
+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
+ "ISO8859-4" "\0" "ISO-8859-4" "\0"
+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
+ "ISO8859-13" "\0" "ISO-8859-13" "\0"
+ "ISO8859-15" "\0" "ISO-8859-15" "\0"
+ "KOI8-R" "\0" "KOI8-R" "\0"
+ "KOI8-U" "\0" "KOI8-U" "\0"
+ "CP866" "\0" "CP866" "\0"
+ "CP949" "\0" "CP949" "\0"
+ "CP1131" "\0" "CP1131" "\0"
+ "CP1251" "\0" "CP1251" "\0"
+ "eucCN" "\0" "GB2312" "\0"
+ "GB2312" "\0" "GB2312" "\0"
+ "eucJP" "\0" "EUC-JP" "\0"
+ "eucKR" "\0" "EUC-KR" "\0"
+ "Big5" "\0" "BIG5" "\0"
+ "Big5HKSCS" "\0" "BIG5-HKSCS" "\0"
+ "GBK" "\0" "GBK" "\0"
+ "GB18030" "\0" "GB18030" "\0"
+ "SJIS" "\0" "SHIFT_JIS" "\0"
+ "ARMSCII-8" "\0" "ARMSCII-8" "\0"
+ "PT154" "\0" "PT154" "\0"
+ /*"ISCII-DEV" "\0" "?" "\0"*/
+ "*" "\0" "UTF-8" "\0";
+# endif
+
+# if defined VMS
+ /* To avoid the troubles of an extra file charset.alias_vms in the
+ sources of many GNU packages, simply inline the aliases here. */
+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
+ section 10.7 "Handling Different Character Sets". */
+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
+ /* Japanese */
+ "eucJP" "\0" "EUC-JP" "\0"
+ "SJIS" "\0" "SHIFT_JIS" "\0"
+ "DECKANJI" "\0" "DEC-KANJI" "\0"
+ "SDECKANJI" "\0" "EUC-JP" "\0"
+ /* Chinese */
+ "eucTW" "\0" "EUC-TW" "\0"
+ "DECHANYU" "\0" "DEC-HANYU" "\0"
+ "DECHANZI" "\0" "GB2312" "\0"
+ /* Korean */
+ "DECKOREAN" "\0" "EUC-KR" "\0";
+# endif
+
+# if defined WIN32_NATIVE || defined __CYGWIN__
+ /* To avoid the troubles of installing a separate file in the same
+ directory as the DLL and of retrieving the DLL's directory at
+ runtime, simply inline the aliases here. */
+
+ cp = "CP936" "\0" "GBK" "\0"
+ "CP1361" "\0" "JOHAB" "\0"
+ "CP20127" "\0" "ASCII" "\0"
+ "CP20866" "\0" "KOI8-R" "\0"
+ "CP20936" "\0" "GB2312" "\0"
+ "CP21866" "\0" "KOI8-RU" "\0"
+ "CP28591" "\0" "ISO-8859-1" "\0"
+ "CP28592" "\0" "ISO-8859-2" "\0"
+ "CP28593" "\0" "ISO-8859-3" "\0"
+ "CP28594" "\0" "ISO-8859-4" "\0"
+ "CP28595" "\0" "ISO-8859-5" "\0"
+ "CP28596" "\0" "ISO-8859-6" "\0"
+ "CP28597" "\0" "ISO-8859-7" "\0"
+ "CP28598" "\0" "ISO-8859-8" "\0"
+ "CP28599" "\0" "ISO-8859-9" "\0"
+ "CP28605" "\0" "ISO-8859-15" "\0"
+ "CP38598" "\0" "ISO-8859-8" "\0"
+ "CP51932" "\0" "EUC-JP" "\0"
+ "CP51936" "\0" "GB2312" "\0"
+ "CP51949" "\0" "EUC-KR" "\0"
+ "CP51950" "\0" "EUC-TW" "\0"
+ "CP54936" "\0" "GB18030" "\0"
+ "CP65001" "\0" "UTF-8" "\0";
+# endif
+#endif
+
+ charset_aliases = cp;
+ }
+
+ return cp;
+}
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+
+#ifdef STATIC
+STATIC
+#endif
+const char *
+locale_charset (void)
+{
+ const char *codeset;
+ const char *aliases;
+
+#if !(defined WIN32_NATIVE || defined OS2)
+
+# if HAVE_LANGINFO_CODESET
+
+ /* Most systems support nl_langinfo (CODESET) nowadays. */
+ codeset = nl_langinfo (CODESET);
+
+# ifdef __CYGWIN__
+ /* Cygwin 1.5.x does not have locales. nl_langinfo (CODESET) always
+ returns "US-ASCII". As long as this is not fixed, return the suffix
+ of the locale name from the environment variables (if present) or
+ the codepage as a number. */
+ if (codeset != NULL && strcmp (codeset, "US-ASCII") == 0)
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP(). This encoding is used by Cygwin, unless the user has set
+ the environment variable CYGWIN=codepage:oem (which very few people
+ do).
+ Output directed to console windows needs to be converted (to
+ GetOEMCP() if the console is using a raster font, or to
+ GetConsoleOutputCP() if it is using a TrueType font). Cygwin does
+ this conversion transparently (see winsup/cygwin/fhandler_console.cc),
+ converting to GetConsoleOutputCP(). This leads to correct results,
+ except when SetConsoleOutputCP has been called and a raster font is
+ in use. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+ }
+# endif
+
+# else
+
+ /* On old systems which lack it, use setlocale or getenv. */
+ const char *locale = NULL;
+
+ /* But most old systems don't have a complete set of locales. Some
+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
+ use setlocale here; it would return "C" when it doesn't support the
+ locale name the user has set. */
+# if 0
+ locale = setlocale (LC_CTYPE, NULL);
+# endif
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ }
+
+ /* On some old systems, one used to set locale = "iso8859_1". On others,
+ you set it to "language_COUNTRY.charset". In any case, we resolve it
+ through the charset.alias file. */
+ codeset = locale;
+
+# endif
+
+#elif defined WIN32_NATIVE
+
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number:
+ GetACP().
+ When the output goes to a console window, it needs to be provided in
+ GetOEMCP() encoding if the console is using a raster font, or in
+ GetConsoleOutputCP() encoding if it is using a TrueType font.
+ But in GUI programs and for output sent to files and pipes, GetACP()
+ encoding is the best bet. */
+ sprintf (buf, "CP%u", GetACP ());
+ codeset = buf;
+
+#elif defined OS2
+
+ const char *locale;
+ static char buf[2 + 10 + 1];
+ ULONG cp[3];
+ ULONG cplen;
+
+ /* Allow user to override the codeset, as set in the operating system,
+ with standard language environment variables. */
+ locale = getenv ("LC_ALL");
+ if (locale == NULL || locale[0] == '\0')
+ {
+ locale = getenv ("LC_CTYPE");
+ if (locale == NULL || locale[0] == '\0')
+ locale = getenv ("LANG");
+ }
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+
+ /* Resolve through the charset.alias file. */
+ codeset = locale;
+ }
+ else
+ {
+ /* OS/2 has a function returning the locale's codepage as a number. */
+ if (DosQueryCp (sizeof (cp), cp, &cplen))
+ codeset = "";
+ else
+ {
+ sprintf (buf, "CP%u", cp[0]);
+ codeset = buf;
+ }
+ }
+
+#endif
+
+ if (codeset == NULL)
+ /* The canonical name cannot be determined. */
+ codeset = "";
+
+ /* Resolve alias. */
+ for (aliases = get_charset_aliases ();
+ *aliases != '\0';
+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
+ if (strcmp (codeset, aliases) == 0
+ || (aliases[0] == '*' && aliases[1] == '\0'))
+ {
+ codeset = aliases + strlen (aliases) + 1;
+ break;
+ }
+
+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
+ the empty string as denoting "the locale's character encoding",
+ thus GNU libiconv would call this function a second time. */
+ if (codeset[0] == '\0')
+ codeset = "ASCII";
+
+ return codeset;
+}
diff --git a/gnu/localcharset.h b/gnu/localcharset.h
new file mode 100755
index 00000000..899b3bae
--- /dev/null
+++ b/gnu/localcharset.h
@@ -0,0 +1,41 @@
+/* Determine a canonical name for the current locale's character encoding.
+ Copyright (C) 2000-2003, 2009-2010 Free Software Foundation, Inc.
+ This file is part of the GNU CHARSET Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LOCALCHARSET_H
+#define _LOCALCHARSET_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Determine the current locale's character encoding, and canonicalize it
+ into one of the canonical names listed in config.charset.
+ The result must not be freed; it is statically allocated.
+ If the canonical name cannot be determined, the result is a non-canonical
+ name. */
+extern const char * locale_charset (void);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _LOCALCHARSET_H */
diff --git a/gnu/lseek.c b/gnu/lseek.c
new file mode 100755
index 00000000..0d5376ab
--- /dev/null
+++ b/gnu/lseek.c
@@ -0,0 +1,62 @@
+/* An lseek() function that detects pipes.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Windows platforms. */
+/* Get GetFileType. */
+# include <windows.h>
+#else
+# include <sys/stat.h>
+#endif
+#include <errno.h>
+
+#undef lseek
+
+off_t
+rpl_lseek (int fd, off_t offset, int whence)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* mingw lseek mistakenly succeeds on pipes, sockets, and terminals. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ if (h == INVALID_HANDLE_VALUE)
+ {
+ errno = EBADF;
+ return -1;
+ }
+ if (GetFileType (h) != FILE_TYPE_DISK)
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#else
+ /* BeOS lseek mistakenly succeeds on pipes... */
+ struct stat statbuf;
+ if (fstat (fd, &statbuf) < 0)
+ return -1;
+ if (!S_ISREG (statbuf.st_mode))
+ {
+ errno = ESPIPE;
+ return -1;
+ }
+#endif
+ return lseek (fd, offset, whence);
+}
diff --git a/gnu/lstat.c b/gnu/lstat.c
new file mode 100755
index 00000000..586ab16b
--- /dev/null
+++ b/gnu/lstat.c
@@ -0,0 +1,91 @@
+/* Work around a bug of lstat on some systems
+
+ Copyright (C) 1997-2006, 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Jim Meyering */
+
+#include <config.h>
+
+#if !HAVE_LSTAT
+/* On systems that lack symlinks, our replacement <sys/stat.h> already
+ defined lstat as stat, so there is nothing further to do other than
+ avoid an empty file. */
+typedef int dummy;
+#else /* HAVE_LSTAT */
+
+/* Get the original definition of lstat. It might be defined as a macro. */
+# define __need_system_sys_stat_h
+# include <sys/types.h>
+# include <sys/stat.h>
+# undef __need_system_sys_stat_h
+
+static inline int
+orig_lstat (const char *filename, struct stat *buf)
+{
+ return lstat (filename, buf);
+}
+
+/* Specification. */
+# include <sys/stat.h>
+
+# include <string.h>
+# include <errno.h>
+
+/* lstat works differently on Linux and Solaris systems. POSIX (see
+ `pathname resolution' in the glossary) requires that programs like
+ `ls' take into consideration the fact that FILE has a trailing slash
+ when FILE is a symbolic link. On Linux and Solaris 10 systems, the
+ lstat function already has the desired semantics (in treating
+ `lstat ("symlink/", sbuf)' just like `lstat ("symlink/.", sbuf)',
+ but on Solaris 9 and earlier it does not.
+
+ If FILE has a trailing slash and specifies a symbolic link,
+ then use stat() to get more info on the referent of FILE.
+ If the referent is a non-directory, then set errno to ENOTDIR
+ and return -1. Otherwise, return stat's result. */
+
+int
+rpl_lstat (const char *file, struct stat *sbuf)
+{
+ size_t len;
+ int lstat_result = orig_lstat (file, sbuf);
+
+ if (lstat_result != 0)
+ return lstat_result;
+
+ /* This replacement file can blindly check against '/' rather than
+ using the ISSLASH macro, because all platforms with '\\' either
+ lack symlinks (mingw) or have working lstat (cygwin) and thus do
+ not compile this file. 0 len should have already been filtered
+ out above, with a failure return of ENOENT. */
+ len = strlen (file);
+ if (file[len - 1] != '/' || S_ISDIR (sbuf->st_mode))
+ return 0;
+
+ /* At this point, a trailing slash is only permitted on
+ symlink-to-dir; but it should have found information on the
+ directory, not the symlink. Call stat() to get info about the
+ link's referent. Our replacement stat guarantees valid results,
+ even if the symlink is not pointing to a directory. */
+ if (!S_ISLNK (sbuf->st_mode))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+ return stat (file, sbuf);
+}
+
+#endif /* HAVE_LSTAT */
diff --git a/gnu/malloc.c b/gnu/malloc.c
new file mode 100755
index 00000000..a3095c17
--- /dev/null
+++ b/gnu/malloc.c
@@ -0,0 +1,57 @@
+/* malloc() function that is glibc compatible.
+
+ Copyright (C) 1997-1998, 2006-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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* written by Jim Meyering and Bruno Haible */
+
+#include <config.h>
+/* Only the AC_FUNC_MALLOC macro defines 'malloc' already in config.h. */
+#ifdef malloc
+# define NEED_MALLOC_GNU
+# undef malloc
+#endif
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+
+/* Call the system's malloc below. */
+#undef malloc
+
+/* Allocate an N-byte block of memory from the heap.
+ If N is zero, allocate a 1-byte block. */
+
+void *
+rpl_malloc (size_t n)
+{
+ void *result;
+
+#ifdef NEED_MALLOC_GNU
+ if (n == 0)
+ n = 1;
+#endif
+
+ result = malloc (n);
+
+#if !HAVE_MALLOC_POSIX
+ if (result == NULL)
+ errno = ENOMEM;
+#endif
+
+ return result;
+}
diff --git a/gnu/malloca.c b/gnu/malloca.c
new file mode 100755
index 00000000..623131bf
--- /dev/null
+++ b/gnu/malloca.c
@@ -0,0 +1,137 @@
+/* Safe automatic memory allocation.
+ Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "malloca.h"
+
+/* The speed critical point in this file is freea() applied to an alloca()
+ result: it must be fast, to match the speed of alloca(). The speed of
+ mmalloca() and freea() in the other case are not critical, because they
+ are only invoked for big memory sizes. */
+
+#if HAVE_ALLOCA
+
+/* Store the mmalloca() results in a hash table. This is needed to reliably
+ distinguish a mmalloca() result and an alloca() result.
+
+ Although it is possible that the same pointer is returned by alloca() and
+ by mmalloca() at different times in the same application, it does not lead
+ to a bug in freea(), because:
+ - Before a pointer returned by alloca() can point into malloc()ed memory,
+ the function must return, and once this has happened the programmer must
+ not call freea() on it anyway.
+ - Before a pointer returned by mmalloca() can point into the stack, it
+ must be freed. The only function that can free it is freea(), and
+ when freea() frees it, it also removes it from the hash table. */
+
+#define MAGIC_NUMBER 0x1415fb4a
+#define MAGIC_SIZE sizeof (int)
+/* This is how the header info would look like without any alignment
+ considerations. */
+struct preliminary_header { void *next; char room[MAGIC_SIZE]; };
+/* But the header's size must be a multiple of sa_alignment_max. */
+#define HEADER_SIZE \
+ (((sizeof (struct preliminary_header) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max)
+struct header { void *next; char room[HEADER_SIZE - sizeof (struct preliminary_header) + MAGIC_SIZE]; };
+/* Verify that HEADER_SIZE == sizeof (struct header). */
+typedef int verify1[2 * (HEADER_SIZE == sizeof (struct header)) - 1];
+/* We make the hash table quite big, so that during lookups the probability
+ of empty hash buckets is quite high. There is no need to make the hash
+ table resizable, because when the hash table gets filled so much that the
+ lookup becomes slow, it means that the application has memory leaks. */
+#define HASH_TABLE_SIZE 257
+static void * mmalloca_results[HASH_TABLE_SIZE];
+
+#endif
+
+void *
+mmalloca (size_t n)
+{
+#if HAVE_ALLOCA
+ /* Allocate one more word, that serves as an indicator for malloc()ed
+ memory, so that freea() of an alloca() result is fast. */
+ size_t nplus = n + HEADER_SIZE;
+
+ if (nplus >= n)
+ {
+ char *p = (char *) malloc (nplus);
+
+ if (p != NULL)
+ {
+ size_t slot;
+
+ p += HEADER_SIZE;
+
+ /* Put a magic number into the indicator word. */
+ ((int *) p)[-1] = MAGIC_NUMBER;
+
+ /* Enter p into the hash table. */
+ slot = (unsigned long) p % HASH_TABLE_SIZE;
+ ((struct header *) (p - HEADER_SIZE))->next = mmalloca_results[slot];
+ mmalloca_results[slot] = p;
+
+ return p;
+ }
+ }
+ /* Out of memory. */
+ return NULL;
+#else
+# if !MALLOC_0_IS_NONNULL
+ if (n == 0)
+ n = 1;
+# endif
+ return malloc (n);
+#endif
+}
+
+#if HAVE_ALLOCA
+void
+freea (void *p)
+{
+ /* mmalloca() may have returned NULL. */
+ if (p != NULL)
+ {
+ /* Attempt to quickly distinguish the mmalloca() result - which has
+ a magic indicator word - and the alloca() result - which has an
+ uninitialized indicator word. It is for this test that sa_increment
+ additional bytes are allocated in the alloca() case. */
+ if (((int *) p)[-1] == MAGIC_NUMBER)
+ {
+ /* Looks like a mmalloca() result. To see whether it really is one,
+ perform a lookup in the hash table. */
+ size_t slot = (unsigned long) p % HASH_TABLE_SIZE;
+ void **chain = &mmalloca_results[slot];
+ for (; *chain != NULL;)
+ {
+ if (*chain == p)
+ {
+ /* Found it. Remove it from the hash table and free it. */
+ char *p_begin = (char *) p - HEADER_SIZE;
+ *chain = ((struct header *) p_begin)->next;
+ free (p_begin);
+ return;
+ }
+ chain = &((struct header *) ((char *) *chain - HEADER_SIZE))->next;
+ }
+ }
+ /* At this point, we know it was not a mmalloca() result. */
+ }
+}
+#endif
diff --git a/gnu/malloca.h b/gnu/malloca.h
new file mode 100755
index 00000000..0d5ded3c
--- /dev/null
+++ b/gnu/malloca.h
@@ -0,0 +1,134 @@
+/* Safe automatic memory allocation.
+ Copyright (C) 2003-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _MALLOCA_H
+#define _MALLOCA_H
+
+#include <alloca.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* safe_alloca(N) is equivalent to alloca(N) when it is safe to call
+ alloca(N); otherwise it returns NULL. It either returns N bytes of
+ memory allocated on the stack, that lasts until the function returns,
+ or NULL.
+ Use of safe_alloca should be avoided:
+ - inside arguments of function calls - undefined behaviour,
+ - in inline functions - the allocation may actually last until the
+ calling function returns.
+*/
+#if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ allocate anything larger than 4096 bytes. Also care for the possibility
+ of a few compiler-allocated temporary stack slots.
+ This must be a macro, not an inline function. */
+# define safe_alloca(N) ((N) < 4032 ? alloca (N) : NULL)
+#else
+# define safe_alloca(N) ((void) (N), NULL)
+#endif
+
+/* malloca(N) is a safe variant of alloca(N). It allocates N bytes of
+ memory allocated on the stack, that must be freed using freea() before
+ the function returns. Upon failure, it returns NULL. */
+#if HAVE_ALLOCA
+# define malloca(N) \
+ ((N) < 4032 - sa_increment \
+ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
+ : mmalloca (N))
+#else
+# define malloca(N) \
+ mmalloca (N)
+#endif
+extern void * mmalloca (size_t n);
+
+/* Free a block of memory allocated through malloca(). */
+#if HAVE_ALLOCA
+extern void freea (void *p);
+#else
+# define freea free
+#endif
+
+/* nmalloca(N,S) is an overflow-safe variant of malloca (N * S).
+ It allocates an array of N objects, each with S bytes of memory,
+ on the stack. S must be positive and N must be nonnegative.
+ The array must be freed using freea() before the function returns. */
+#if 1
+/* Cf. the definition of xalloc_oversized. */
+# define nmalloca(n, s) \
+ ((n) > (size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) \
+ ? NULL \
+ : malloca ((n) * (s)))
+#else
+extern void * nmalloca (size_t n, size_t s);
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/* ------------------- Auxiliary, non-public definitions ------------------- */
+
+/* Determine the alignment of a type at compile time. */
+#if defined __GNUC__
+# define sa_alignof __alignof__
+#elif defined __cplusplus
+ template <class type> struct sa_alignof_helper { char __slot1; type __slot2; };
+# define sa_alignof(type) offsetof (sa_alignof_helper<type>, __slot2)
+#elif defined __hpux
+ /* Work around a HP-UX 10.20 cc bug with enums constants defined as offsetof
+ values. */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+#elif defined _AIX
+ /* Work around an AIX 3.2.5 xlc bug with enums constants defined as offsetof
+ values. */
+# define sa_alignof(type) (sizeof (type) <= 4 ? 4 : 8)
+#else
+# define sa_alignof(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
+#endif
+
+enum
+{
+/* The desired alignment of memory allocations is the maximum alignment
+ among all elementary types. */
+ sa_alignment_long = sa_alignof (long),
+ sa_alignment_double = sa_alignof (double),
+#if HAVE_LONG_LONG_INT
+ sa_alignment_longlong = sa_alignof (long long),
+#endif
+ sa_alignment_longdouble = sa_alignof (long double),
+ sa_alignment_max = ((sa_alignment_long - 1) | (sa_alignment_double - 1)
+#if HAVE_LONG_LONG_INT
+ | (sa_alignment_longlong - 1)
+#endif
+ | (sa_alignment_longdouble - 1)
+ ) + 1,
+/* The increment that guarantees room for a magic word must be >= sizeof (int)
+ and a multiple of sa_alignment_max. */
+ sa_increment = ((sizeof (int) + sa_alignment_max - 1) / sa_alignment_max) * sa_alignment_max
+};
+
+#endif /* _MALLOCA_H */
diff --git a/gnu/malloca.valgrind b/gnu/malloca.valgrind
new file mode 100755
index 00000000..52f0a50f
--- /dev/null
+++ b/gnu/malloca.valgrind
@@ -0,0 +1,7 @@
+# Suppress a valgrind message about use of uninitialized memory in freea().
+# This use is OK because it provides only a speedup.
+{
+ freea
+ Memcheck:Cond
+ fun:freea
+}
diff --git a/gnu/math.in.h b/gnu/math.in.h
new file mode 100755
index 00000000..70e7988b
--- /dev/null
+++ b/gnu/math.in.h
@@ -0,0 +1,633 @@
+/* A GNU-like <math.h>.
+
+ Copyright (C) 2002-2003, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_MATH_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+
+#ifndef _GL_MATH_H
+#define _GL_MATH_H
+
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Helper macros to define a portability warning for the
+ classification macro FUNC called with VALUE. POSIX declares the
+ classification macros with an argument of real-floating (that is,
+ one of float, double, or long double). */
+#define _GL_WARN_REAL_FLOATING_DECL(func) \
+static inline int \
+rpl_ ## func ## f (float f) \
+{ \
+ return func (f); \
+} \
+static inline int \
+rpl_ ## func ## d (double d) \
+{ \
+ return func (d); \
+} \
+static inline int \
+rpl_ ## func ## l (long double l) \
+{ \
+ return func (l); \
+} \
+_GL_WARN_ON_USE (rpl_ ## func ## f, #func " is unportable - " \
+ "use gnulib module " #func " for portability"); \
+_GL_WARN_ON_USE (rpl_ ## func ## d, #func " is unportable - " \
+ "use gnulib module " #func " for portability"); \
+_GL_WARN_ON_USE (rpl_ ## func ## l, #func " is unportable - " \
+ "use gnulib module " #func " for portability")
+#define _GL_WARN_REAL_FLOATING_IMPL(func, value) \
+ (sizeof (value) == sizeof (float) ? rpl_ ## func ## f (value) \
+ : sizeof (value) == sizeof (double) ? rpl_ ## func ## d (value) \
+ : rpl_ ## func ## l (value))
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* POSIX allows platforms that don't support NAN. But all major
+ machines in the past 15 years have supported something close to
+ IEEE NaN, so we define this unconditionally. We also must define
+ it on platforms like Solaris 10, where NAN is present but defined
+ as a function pointer rather than a floating point constant. */
+#if !defined NAN || @REPLACE_NAN@
+# undef NAN
+ /* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+# ifdef __DECC
+static float
+_NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+# define NAN (_NaN())
+# else
+# define NAN (0.0f / 0.0f)
+# endif
+#endif
+
+/* Solaris 10 defines HUGE_VAL, but as a function pointer rather
+ than a floating point constant. */
+#if @REPLACE_HUGE_VAL@
+# undef HUGE_VAL
+# define HUGE_VAL (1.0 / 0.0)
+#endif
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXP@
+# if @REPLACE_FREXP@
+# define frexp rpl_frexp
+extern double frexp (double x, int *expptr) _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef frexp
+/* Assume frexp is always declared. */
+_GL_WARN_ON_USE (frexp, "frexp is unportable - "
+ "use gnulib module frexp for portability");
+#endif
+
+
+#if @GNULIB_ACOSL@
+# if !@HAVE_ACOSL@ || !@HAVE_DECL_ACOSL@
+extern long double acosl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef acosl
+# if HAVE_RAW_DECL_ACOSL
+_GL_WARN_ON_USE (acosl, "acosl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ASINL@
+# if !@HAVE_ASINL@ || !@HAVE_DECL_ASINL@
+extern long double asinl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef asinl
+# if HAVE_RAW_DECL_ASINL
+_GL_WARN_ON_USE (asinl, "asinl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ATANL@
+# if !@HAVE_ATANL@ || !@HAVE_DECL_ATANL@
+extern long double atanl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef atanl
+# if HAVE_RAW_DECL_ATANL
+_GL_WARN_ON_USE (atanl, "atanl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CEILF@
+# if @REPLACE_CEILF@
+# define ceilf rpl_ceilf
+extern float ceilf (float x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ceilf
+# if HAVE_RAW_DECL_CEILF
+_GL_WARN_ON_USE (ceilf, "ceilf is unportable - "
+ "use gnulib module ceilf for portability");
+# endif
+#endif
+
+#if @GNULIB_CEILL@
+# if @REPLACE_CEILL@
+# define ceill rpl_ceill
+extern long double ceill (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ceill
+# if HAVE_RAW_DECL_CEILL
+_GL_WARN_ON_USE (ceill, "ceill is unportable - "
+ "use gnulib module ceill for portability");
+# endif
+#endif
+
+
+#if @GNULIB_COSL@
+# if !@HAVE_COSL@
+# undef cosl
+# define cosl rpl_cosl
+# endif
+# if !@HAVE_COSL@ || !@HAVE_DECL_COSL@
+extern long double cosl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef cosl
+# if HAVE_RAW_DECL_COSL
+_GL_WARN_ON_USE (cosl, "cosl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_EXPL@
+# if !@HAVE_EXPL@ || !@HAVE_DECL_EXPL@
+extern long double expl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef expl
+# if HAVE_RAW_DECL_EXPL
+_GL_WARN_ON_USE (expl, "expl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FLOORF@
+# if @REPLACE_FLOORF@
+# define floorf rpl_floorf
+extern float floorf (float x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef floorf
+# if HAVE_RAW_DECL_FLOORF
+_GL_WARN_ON_USE (floorf, "floorf is unportable - "
+ "use gnulib module floorf for portability");
+# endif
+#endif
+
+#if @GNULIB_FLOORL@
+# if @REPLACE_FLOORL@
+# define floorl rpl_floorl
+extern long double floorl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef floorl
+# if HAVE_RAW_DECL_FLOORL
+_GL_WARN_ON_USE (floorl, "floorl is unportable - "
+ "use gnulib module floorl for portability");
+# endif
+#endif
+
+
+/* Write x as
+ x = mantissa * 2^exp
+ where
+ If x finite and nonzero: 0.5 <= |mantissa| < 1.0.
+ If x is zero: mantissa = x, exp = 0.
+ If x is infinite or NaN: mantissa = x, exp unspecified.
+ Store exp in *EXPPTR and return mantissa. */
+#if @GNULIB_FREXPL@ && @REPLACE_FREXPL@
+# define frexpl rpl_frexpl
+#endif
+#if (@GNULIB_FREXPL@ && @REPLACE_FREXPL@) || !@HAVE_DECL_FREXPL@
+extern long double frexpl (long double x, int *expptr) _GL_ARG_NONNULL ((2));
+#endif
+#if !@GNULIB_FREXPL@ && defined GNULIB_POSIXCHECK
+# undef frexpl
+# if HAVE_RAW_DECL_FREXPL
+_GL_WARN_ON_USE (frexpl, "frexpl is unportable - "
+ "use gnulib module frexpl for portability");
+# endif
+#endif
+
+
+/* Return x * 2^exp. */
+#if @GNULIB_LDEXPL@ && @REPLACE_LDEXPL@
+# define ldexpl rpl_ldexpl
+#endif
+#if (@GNULIB_LDEXPL@ && @REPLACE_LDEXPL@) || !@HAVE_DECL_LDEXPL@
+extern long double ldexpl (long double x, int exp);
+#endif
+#if !@GNULIB_LDEXPL@ && defined GNULIB_POSIXCHECK
+# undef ldexpl
+# if HAVE_RAW_DECL_LDEXPL
+_GL_WARN_ON_USE (ldexpl, "ldexpl is unportable - "
+ "use gnulib module ldexpl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LOGL@
+# if !@HAVE_LOGL@
+# undef logl
+# define logl rpl_logl
+# endif
+# if !@HAVE_LOGL@ || !@HAVE_DECL_LOGL@
+extern long double logl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef logl
+# if HAVE_RAW_DECL_LOGL
+_GL_WARN_ON_USE (logl, "logl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ROUNDF@
+# if @REPLACE_ROUNDF@
+# undef roundf
+# define roundf rpl_roundf
+extern float roundf (float x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef roundf
+# if HAVE_RAW_DECL_ROUNDF
+_GL_WARN_ON_USE (roundf, "roundf is unportable - "
+ "use gnulib module roundf for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUND@
+# if @REPLACE_ROUND@
+# undef round
+# define round rpl_round
+extern double round (double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef round
+# if HAVE_RAW_DECL_ROUND
+_GL_WARN_ON_USE (round, "round is unportable - "
+ "use gnulib module round for portability");
+# endif
+#endif
+
+#if @GNULIB_ROUNDL@
+# if @REPLACE_ROUNDL@
+# undef roundl
+# define roundl rpl_roundl
+extern long double roundl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef roundl
+# if HAVE_RAW_DECL_ROUNDL
+_GL_WARN_ON_USE (roundl, "roundl is unportable - "
+ "use gnulib module roundl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SINL@
+# if !@HAVE_SINL@
+# undef sinl
+# define sinl rpl_sinl
+# endif
+# if !@HAVE_SINL@ || !@HAVE_DECL_SINL@
+extern long double sinl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sinl
+# if HAVE_RAW_DECL_SINL
+_GL_WARN_ON_USE (sinl, "sinl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SQRTL@
+# if !@HAVE_SQRTL@ || !@HAVE_DECL_SQRTL@
+extern long double sqrtl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sqrtl
+# if HAVE_RAW_DECL_SQRTL
+_GL_WARN_ON_USE (sqrtl, "sqrtl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TANL@
+# if !@HAVE_TANL@ || !@HAVE_DECL_TANL@
+extern long double tanl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef tanl
+# if HAVE_RAW_DECL_TANL
+_GL_WARN_ON_USE (tanl, "tanl is unportable - "
+ "use gnulib module mathl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_TRUNCF@
+# if !@HAVE_DECL_TRUNCF@
+# define truncf rpl_truncf
+extern float truncf (float x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef truncf
+# if HAVE_RAW_DECL_TRUNCF
+_GL_WARN_ON_USE (truncf, "truncf is unportable - "
+ "use gnulib module truncf for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNC@
+# if !@HAVE_DECL_TRUNC@
+# define trunc rpl_trunc
+extern double trunc (double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef trunc
+# if HAVE_RAW_DECL_TRUNC
+_GL_WARN_ON_USE (trunc, "trunc is unportable - "
+ "use gnulib module trunc for portability");
+# endif
+#endif
+
+#if @GNULIB_TRUNCL@
+# if @REPLACE_TRUNCL@
+# undef truncl
+# define truncl rpl_truncl
+extern long double truncl (long double x);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef truncl
+# if HAVE_RAW_DECL_TRUNCL
+_GL_WARN_ON_USE (truncl, "truncl is unportable - "
+ "use gnulib module truncl for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ISFINITE@
+# if @REPLACE_ISFINITE@
+extern int gl_isfinitef (float x);
+extern int gl_isfinited (double x);
+extern int gl_isfinitel (long double x);
+# undef isfinite
+# define isfinite(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isfinitel (x) : \
+ sizeof (x) == sizeof (double) ? gl_isfinited (x) : \
+ gl_isfinitef (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isfinite
+_GL_WARN_REAL_FLOATING_DECL (isfinite);
+# undef isfinite
+# define isfinite(x) _GL_WARN_REAL_FLOATING_IMPL (isfinite, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISINF@
+# if @REPLACE_ISINF@
+extern int gl_isinff (float x);
+extern int gl_isinfd (double x);
+extern int gl_isinfl (long double x);
+# undef isinf
+# define isinf(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isinfl (x) : \
+ sizeof (x) == sizeof (double) ? gl_isinfd (x) : \
+ gl_isinff (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isinf
+_GL_WARN_REAL_FLOATING_DECL (isinf);
+# undef isinf
+# define isinf(x) _GL_WARN_REAL_FLOATING_IMPL (isinf, x)
+# endif
+#endif
+
+
+#if @GNULIB_ISNANF@
+/* Test for NaN for 'float' numbers. */
+# if @HAVE_ISNANF@
+/* The original <math.h> included above provides a declaration of isnan macro
+ or (older) isnanf function. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+# elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnanf
+# define isnanf rpl_isnanf
+extern int isnanf (float x);
+# endif
+#endif
+
+#if @GNULIB_ISNAND@
+/* Test for NaN for 'double' numbers.
+ This function is a gnulib extension, unlike isnan() which applied only
+ to 'double' numbers earlier but now is a type-generic macro. */
+# if @HAVE_ISNAND@
+/* The original <math.h> included above provides a declaration of isnan macro. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnand
+# define isnand(x) __builtin_isnan ((double)(x))
+# else
+# undef isnand
+# define isnand(x) isnan ((double)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnand
+# define isnand rpl_isnand
+extern int isnand (double x);
+# endif
+#endif
+
+#if @GNULIB_ISNANL@
+/* Test for NaN for 'long double' numbers. */
+# if @HAVE_ISNANL@
+/* The original <math.h> included above provides a declaration of isnan macro or (older) isnanl function. */
+# if __GNUC__ >= 4
+ /* GCC 4.0 and newer provides three built-ins for isnan. */
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+# elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+# endif
+# else
+/* Test whether X is a NaN. */
+# undef isnanl
+# define isnanl rpl_isnanl
+extern int isnanl (long double x);
+# endif
+#endif
+
+/* This must come *after* the snippets for GNULIB_ISNANF and GNULIB_ISNANL! */
+#if @GNULIB_ISNAN@
+# if @REPLACE_ISNAN@
+/* We can't just use the isnanf macro (e.g.) as exposed by
+ isnanf.h (e.g.) here, because those may end up being macros
+ that recursively expand back to isnan. So use the gnulib
+ replacements for them directly. */
+# if @HAVE_ISNANF@ && __GNUC__ >= 4
+# define gl_isnan_f(x) __builtin_isnan ((float)(x))
+# else
+extern int rpl_isnanf (float x);
+# define gl_isnan_f(x) rpl_isnanf (x)
+# endif
+# if @HAVE_ISNAND@ && __GNUC__ >= 4
+# define gl_isnan_d(x) __builtin_isnan ((double)(x))
+# else
+extern int rpl_isnand (double x);
+# define gl_isnan_d(x) rpl_isnand (x)
+# endif
+# if @HAVE_ISNANL@ && __GNUC__ >= 4
+# define gl_isnan_l(x) __builtin_isnan ((long double)(x))
+# else
+extern int rpl_isnanl (long double x);
+# define gl_isnan_l(x) rpl_isnanl (x)
+# endif
+# undef isnan
+# define isnan(x) \
+ (sizeof (x) == sizeof (long double) ? gl_isnan_l (x) : \
+ sizeof (x) == sizeof (double) ? gl_isnan_d (x) : \
+ gl_isnan_f (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined isnan
+_GL_WARN_REAL_FLOATING_DECL (isnan);
+# undef isnan
+# define isnan(x) _GL_WARN_REAL_FLOATING_IMPL (isnan, x)
+# endif
+#endif
+
+
+#if @GNULIB_SIGNBIT@
+# if @REPLACE_SIGNBIT_USING_GCC@
+# undef signbit
+ /* GCC 4.0 and newer provides three built-ins for signbit. */
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+# endif
+# if @REPLACE_SIGNBIT@
+# undef signbit
+extern int gl_signbitf (float arg);
+extern int gl_signbitd (double arg);
+extern int gl_signbitl (long double arg);
+# if __GNUC__ >= 2 && !__STRICT_ANSI__
+# if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT && !defined gl_signbitf
+# define gl_signbitf_OPTIMIZED_MACRO
+# define gl_signbitf(arg) \
+ ({ union { float _value; \
+ unsigned int _word[(sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT && !defined gl_signbitd
+# define gl_signbitd_OPTIMIZED_MACRO
+# define gl_signbitd(arg) \
+ ({ union { double _value; \
+ unsigned int _word[(sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT && !defined gl_signbitl
+# define gl_signbitl_OPTIMIZED_MACRO
+# define gl_signbitl(arg) \
+ ({ union { long double _value; \
+ unsigned int _word[(sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)]; \
+ } _m; \
+ _m._value = (arg); \
+ (_m._word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1; \
+ })
+# endif
+# endif
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? gl_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? gl_signbitd (x) : \
+ gl_signbitf (x))
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if defined signbit
+_GL_WARN_REAL_FLOATING_DECL (signbit);
+# undef signbit
+# define signbit(x) _GL_WARN_REAL_FLOATING_IMPL (signbit, x)
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_MATH_H */
+#endif /* _GL_MATH_H */
diff --git a/gnu/mbchar.c b/gnu/mbchar.c
new file mode 100755
index 00000000..6ec01950
--- /dev/null
+++ b/gnu/mbchar.c
@@ -0,0 +1,35 @@
+/* Copyright (C) 2001, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+#include <limits.h>
+
+#include "mbchar.h"
+
+#if IS_BASIC_ASCII
+
+/* Bit table of characters in the ISO C "basic character set". */
+const unsigned int is_basic_table [UCHAR_MAX / 32 + 1] =
+{
+ 0x00001a00, /* '\t' '\v' '\f' */
+ 0xffffffef, /* ' '...'#' '%'...'?' */
+ 0xfffffffe, /* 'A'...'Z' '[' '\\' ']' '^' '_' */
+ 0x7ffffffe /* 'a'...'z' '{' '|' '}' '~' */
+ /* The remaining bits are 0. */
+};
+
+#endif /* IS_BASIC_ASCII */
diff --git a/gnu/mbchar.h b/gnu/mbchar.h
new file mode 100755
index 00000000..012bfcb1
--- /dev/null
+++ b/gnu/mbchar.h
@@ -0,0 +1,350 @@
+/* Multibyte character data type.
+ Copyright (C) 2001, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+/* A multibyte character is a short subsequence of a char* string,
+ representing a single wide character.
+
+ We use multibyte characters instead of wide characters because of
+ the following goals:
+ 1) correct multibyte handling, i.e. operate according to the LC_CTYPE
+ locale,
+ 2) ease of maintenance, i.e. the maintainer needs not know all details
+ of the ISO C 99 standard,
+ 3) don't fail grossly if the input is not in the encoding set by the
+ locale, because often different encodings are in use in the same
+ countries (ISO-8859-1/UTF-8, EUC-JP/Shift_JIS, ...),
+ 4) fast in the case of ASCII characters,
+ 5) portability, i.e. don't make unportable assumptions about wchar_t.
+
+ Multibyte characters are only accessed through the mb* macros.
+
+ mb_ptr (mbc)
+ return a pointer to the beginning of the multibyte sequence.
+
+ mb_len (mbc)
+ returns the number of bytes occupied by the multibyte sequence.
+ Always > 0.
+
+ mb_iseq (mbc, sc)
+ returns true if mbc is the standard ASCII character sc.
+
+ mb_isnul (mbc)
+ returns true if mbc is the nul character.
+
+ mb_cmp (mbc1, mbc2)
+ returns a positive, zero, or negative value depending on whether mbc1
+ sorts after, same or before mbc2.
+
+ mb_casecmp (mbc1, mbc2)
+ returns a positive, zero, or negative value depending on whether mbc1
+ sorts after, same or before mbc2, modulo upper/lowercase conversion.
+
+ mb_equal (mbc1, mbc2)
+ returns true if mbc1 and mbc2 are equal.
+
+ mb_caseequal (mbc1, mbc2)
+ returns true if mbc1 and mbc2 are equal modulo upper/lowercase conversion.
+
+ mb_isalnum (mbc)
+ returns true if mbc is alphanumeric.
+
+ mb_isalpha (mbc)
+ returns true if mbc is alphabetic.
+
+ mb_isascii(mbc)
+ returns true if mbc is plain ASCII.
+
+ mb_isblank (mbc)
+ returns true if mbc is a blank.
+
+ mb_iscntrl (mbc)
+ returns true if mbc is a control character.
+
+ mb_isdigit (mbc)
+ returns true if mbc is a decimal digit.
+
+ mb_isgraph (mbc)
+ returns true if mbc is a graphic character.
+
+ mb_islower (mbc)
+ returns true if mbc is lowercase.
+
+ mb_isprint (mbc)
+ returns true if mbc is a printable character.
+
+ mb_ispunct (mbc)
+ returns true if mbc is a punctuation character.
+
+ mb_isspace (mbc)
+ returns true if mbc is a space character.
+
+ mb_isupper (mbc)
+ returns true if mbc is uppercase.
+
+ mb_isxdigit (mbc)
+ returns true if mbc is a hexadecimal digit.
+
+ mb_width (mbc)
+ returns the number of columns on the output device occupied by mbc.
+ Always >= 0.
+
+ mb_putc (mbc, stream)
+ outputs mbc on stream, a byte oriented FILE stream opened for output.
+
+ mb_setascii (&mbc, sc)
+ assigns the standard ASCII character sc to mbc.
+
+ mb_copy (&destmbc, &srcmbc)
+ copies srcmbc to destmbc.
+
+ Here are the function prototypes of the macros.
+
+ extern const char * mb_ptr (const mbchar_t mbc);
+ extern size_t mb_len (const mbchar_t mbc);
+ extern bool mb_iseq (const mbchar_t mbc, char sc);
+ extern bool mb_isnul (const mbchar_t mbc);
+ extern int mb_cmp (const mbchar_t mbc1, const mbchar_t mbc2);
+ extern int mb_casecmp (const mbchar_t mbc1, const mbchar_t mbc2);
+ extern bool mb_equal (const mbchar_t mbc1, const mbchar_t mbc2);
+ extern bool mb_caseequal (const mbchar_t mbc1, const mbchar_t mbc2);
+ extern bool mb_isalnum (const mbchar_t mbc);
+ extern bool mb_isalpha (const mbchar_t mbc);
+ extern bool mb_isascii (const mbchar_t mbc);
+ extern bool mb_isblank (const mbchar_t mbc);
+ extern bool mb_iscntrl (const mbchar_t mbc);
+ extern bool mb_isdigit (const mbchar_t mbc);
+ extern bool mb_isgraph (const mbchar_t mbc);
+ extern bool mb_islower (const mbchar_t mbc);
+ extern bool mb_isprint (const mbchar_t mbc);
+ extern bool mb_ispunct (const mbchar_t mbc);
+ extern bool mb_isspace (const mbchar_t mbc);
+ extern bool mb_isupper (const mbchar_t mbc);
+ extern bool mb_isxdigit (const mbchar_t mbc);
+ extern int mb_width (const mbchar_t mbc);
+ extern void mb_putc (const mbchar_t mbc, FILE *stream);
+ extern void mb_setascii (mbchar_t *new, char sc);
+ extern void mb_copy (mbchar_t *new, const mbchar_t *old);
+ */
+
+#ifndef _MBCHAR_H
+#define _MBCHAR_H 1
+
+#include <stdbool.h>
+#include <string.h>
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
+ <wchar.h>. */
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#define MBCHAR_BUF_SIZE 24
+
+struct mbchar
+{
+ const char *ptr; /* pointer to current character */
+ size_t bytes; /* number of bytes of current character, > 0 */
+ bool wc_valid; /* true if wc is a valid wide character */
+ wchar_t wc; /* if wc_valid: the current character */
+ char buf[MBCHAR_BUF_SIZE]; /* room for the bytes, used for file input only */
+};
+
+/* EOF (not a real character) is represented with bytes = 0 and
+ wc_valid = false. */
+
+typedef struct mbchar mbchar_t;
+
+/* Access the current character. */
+#define mb_ptr(mbc) ((mbc).ptr)
+#define mb_len(mbc) ((mbc).bytes)
+
+/* Comparison of characters. */
+#define mb_iseq(mbc, sc) ((mbc).wc_valid && (mbc).wc == (sc))
+#define mb_isnul(mbc) ((mbc).wc_valid && (mbc).wc == 0)
+#define mb_cmp(mbc1, mbc2) \
+ ((mbc1).wc_valid \
+ ? ((mbc2).wc_valid \
+ ? (int) (mbc1).wc - (int) (mbc2).wc \
+ : -1) \
+ : ((mbc2).wc_valid \
+ ? 1 \
+ : (mbc1).bytes == (mbc2).bytes \
+ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \
+ : (mbc1).bytes < (mbc2).bytes \
+ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
+ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
+#define mb_casecmp(mbc1, mbc2) \
+ ((mbc1).wc_valid \
+ ? ((mbc2).wc_valid \
+ ? (int) towlower ((mbc1).wc) - (int) towlower ((mbc2).wc) \
+ : -1) \
+ : ((mbc2).wc_valid \
+ ? 1 \
+ : (mbc1).bytes == (mbc2).bytes \
+ ? memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) \
+ : (mbc1).bytes < (mbc2).bytes \
+ ? (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) > 0 ? 1 : -1) \
+ : (memcmp ((mbc1).ptr, (mbc2).ptr, (mbc2).bytes) >= 0 ? 1 : -1)))
+#define mb_equal(mbc1, mbc2) \
+ ((mbc1).wc_valid && (mbc2).wc_valid \
+ ? (mbc1).wc == (mbc2).wc \
+ : (mbc1).bytes == (mbc2).bytes \
+ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+#define mb_caseequal(mbc1, mbc2) \
+ ((mbc1).wc_valid && (mbc2).wc_valid \
+ ? towlower ((mbc1).wc) == towlower ((mbc2).wc) \
+ : (mbc1).bytes == (mbc2).bytes \
+ && memcmp ((mbc1).ptr, (mbc2).ptr, (mbc1).bytes) == 0)
+
+/* <ctype.h>, <wctype.h> classification. */
+#define mb_isascii(mbc) \
+ ((mbc).wc_valid && (mbc).wc >= 0 && (mbc).wc <= 127)
+#define mb_isalnum(mbc) ((mbc).wc_valid && iswalnum ((mbc).wc))
+#define mb_isalpha(mbc) ((mbc).wc_valid && iswalpha ((mbc).wc))
+#define mb_isblank(mbc) ((mbc).wc_valid && iswblank ((mbc).wc))
+#define mb_iscntrl(mbc) ((mbc).wc_valid && iswcntrl ((mbc).wc))
+#define mb_isdigit(mbc) ((mbc).wc_valid && iswdigit ((mbc).wc))
+#define mb_isgraph(mbc) ((mbc).wc_valid && iswgraph ((mbc).wc))
+#define mb_islower(mbc) ((mbc).wc_valid && iswlower ((mbc).wc))
+#define mb_isprint(mbc) ((mbc).wc_valid && iswprint ((mbc).wc))
+#define mb_ispunct(mbc) ((mbc).wc_valid && iswpunct ((mbc).wc))
+#define mb_isspace(mbc) ((mbc).wc_valid && iswspace ((mbc).wc))
+#define mb_isupper(mbc) ((mbc).wc_valid && iswupper ((mbc).wc))
+#define mb_isxdigit(mbc) ((mbc).wc_valid && iswxdigit ((mbc).wc))
+
+/* Extra <wchar.h> function. */
+
+/* Unprintable characters appear as a small box of width 1. */
+#define MB_UNPRINTABLE_WIDTH 1
+
+static inline int
+mb_width_aux (wint_t wc)
+{
+ int w = wcwidth (wc);
+ /* For unprintable characters, arbitrarily return 0 for control characters
+ and MB_UNPRINTABLE_WIDTH otherwise. */
+ return (w >= 0 ? w : iswcntrl (wc) ? 0 : MB_UNPRINTABLE_WIDTH);
+}
+
+#define mb_width(mbc) \
+ ((mbc).wc_valid ? mb_width_aux ((mbc).wc) : MB_UNPRINTABLE_WIDTH)
+
+/* Output. */
+#define mb_putc(mbc, stream) fwrite ((mbc).ptr, 1, (mbc).bytes, (stream))
+
+/* Assignment. */
+#define mb_setascii(mbc, sc) \
+ ((mbc)->ptr = (mbc)->buf, (mbc)->bytes = 1, (mbc)->wc_valid = 1, \
+ (mbc)->wc = (mbc)->buf[0] = (sc))
+
+/* Copying a character. */
+static inline void
+mb_copy (mbchar_t *new_mbc, const mbchar_t *old_mbc)
+{
+ if (old_mbc->ptr == &old_mbc->buf[0])
+ {
+ memcpy (&new_mbc->buf[0], &old_mbc->buf[0], old_mbc->bytes);
+ new_mbc->ptr = &new_mbc->buf[0];
+ }
+ else
+ new_mbc->ptr = old_mbc->ptr;
+ new_mbc->bytes = old_mbc->bytes;
+ if ((new_mbc->wc_valid = old_mbc->wc_valid))
+ new_mbc->wc = old_mbc->wc;
+}
+
+
+/* is_basic(c) tests whether the single-byte character c is in the
+ ISO C "basic character set".
+ This is a convenience function, and is in this file only to share code
+ between mbiter_multi.h and mbfile_multi.h. */
+#if (' ' == 32) && ('!' == 33) && ('"' == 34) && ('#' == 35) \
+ && ('%' == 37) && ('&' == 38) && ('\'' == 39) && ('(' == 40) \
+ && (')' == 41) && ('*' == 42) && ('+' == 43) && (',' == 44) \
+ && ('-' == 45) && ('.' == 46) && ('/' == 47) && ('0' == 48) \
+ && ('1' == 49) && ('2' == 50) && ('3' == 51) && ('4' == 52) \
+ && ('5' == 53) && ('6' == 54) && ('7' == 55) && ('8' == 56) \
+ && ('9' == 57) && (':' == 58) && (';' == 59) && ('<' == 60) \
+ && ('=' == 61) && ('>' == 62) && ('?' == 63) && ('A' == 65) \
+ && ('B' == 66) && ('C' == 67) && ('D' == 68) && ('E' == 69) \
+ && ('F' == 70) && ('G' == 71) && ('H' == 72) && ('I' == 73) \
+ && ('J' == 74) && ('K' == 75) && ('L' == 76) && ('M' == 77) \
+ && ('N' == 78) && ('O' == 79) && ('P' == 80) && ('Q' == 81) \
+ && ('R' == 82) && ('S' == 83) && ('T' == 84) && ('U' == 85) \
+ && ('V' == 86) && ('W' == 87) && ('X' == 88) && ('Y' == 89) \
+ && ('Z' == 90) && ('[' == 91) && ('\\' == 92) && (']' == 93) \
+ && ('^' == 94) && ('_' == 95) && ('a' == 97) && ('b' == 98) \
+ && ('c' == 99) && ('d' == 100) && ('e' == 101) && ('f' == 102) \
+ && ('g' == 103) && ('h' == 104) && ('i' == 105) && ('j' == 106) \
+ && ('k' == 107) && ('l' == 108) && ('m' == 109) && ('n' == 110) \
+ && ('o' == 111) && ('p' == 112) && ('q' == 113) && ('r' == 114) \
+ && ('s' == 115) && ('t' == 116) && ('u' == 117) && ('v' == 118) \
+ && ('w' == 119) && ('x' == 120) && ('y' == 121) && ('z' == 122) \
+ && ('{' == 123) && ('|' == 124) && ('}' == 125) && ('~' == 126)
+/* The character set is ISO-646, not EBCDIC. */
+# define IS_BASIC_ASCII 1
+
+extern const unsigned int is_basic_table[];
+
+static inline bool
+is_basic (char c)
+{
+ return (is_basic_table [(unsigned char) c >> 5] >> ((unsigned char) c & 31))
+ & 1;
+}
+
+#else
+
+static inline bool
+is_basic (char c)
+{
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ return 1;
+ default:
+ return 0;
+ }
+}
+
+#endif
+
+#endif /* _MBCHAR_H */
diff --git a/gnu/mbiter.h b/gnu/mbiter.h
new file mode 100755
index 00000000..6b738268
--- /dev/null
+++ b/gnu/mbiter.h
@@ -0,0 +1,215 @@
+/* Iterating through multibyte strings: macros for multi-byte encodings.
+ Copyright (C) 2001, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+/* The macros in this file implement forward iteration through a
+ multi-byte string.
+
+ With these macros, an iteration loop that looks like
+
+ char *iter;
+ for (iter = buf; iter < buf + buflen; iter++)
+ {
+ do_something (*iter);
+ }
+
+ becomes
+
+ mbi_iterator_t iter;
+ for (mbi_init (iter, buf, buflen); mbi_avail (iter); mbi_advance (iter))
+ {
+ do_something (mbi_cur_ptr (iter), mb_len (mbi_cur (iter)));
+ }
+
+ The benefit of these macros over plain use of mbrtowc is:
+ - Handling of invalid multibyte sequences is possible without
+ making the code more complicated, while still preserving the
+ invalid multibyte sequences.
+
+ mbi_iterator_t
+ is a type usable for variable declarations.
+
+ mbi_init (iter, startptr, length)
+ initializes the iterator, starting at startptr and crossing length bytes.
+
+ mbi_avail (iter)
+ returns true if there are more multibyte chracters available before
+ the end of string is reached. In this case, mbi_cur (iter) is
+ initialized to the next multibyte chracter.
+
+ mbi_advance (iter)
+ advances the iterator by one multibyte character.
+
+ mbi_cur (iter)
+ returns the current multibyte character, of type mbchar_t. All the
+ macros defined in mbchar.h can be used on it.
+
+ mbi_cur_ptr (iter)
+ return a pointer to the beginning of the current multibyte character.
+
+ mbi_reloc (iter, ptrdiff)
+ relocates iterator when the string is moved by ptrdiff bytes.
+
+ mbi_copy (&destiter, &srciter)
+ copies srciter to destiter.
+
+ Here are the function prototypes of the macros.
+
+ extern void mbi_init (mbi_iterator_t iter,
+ const char *startptr, size_t length);
+ extern bool mbi_avail (mbi_iterator_t iter);
+ extern void mbi_advance (mbi_iterator_t iter);
+ extern mbchar_t mbi_cur (mbi_iterator_t iter);
+ extern const char * mbi_cur_ptr (mbi_iterator_t iter);
+ extern void mbi_reloc (mbi_iterator_t iter, ptrdiff_t ptrdiff);
+ extern void mbi_copy (mbi_iterator_t *new, const mbi_iterator_t *old);
+ */
+
+#ifndef _MBITER_H
+#define _MBITER_H 1
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <string.h>
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
+ <wchar.h>. */
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+#include "mbchar.h"
+
+struct mbiter_multi
+{
+ const char *limit; /* pointer to end of string */
+ bool in_shift; /* true if next byte may not be interpreted as ASCII */
+ mbstate_t state; /* if in_shift: current shift state */
+ bool next_done; /* true if mbi_avail has already filled the following */
+ struct mbchar cur; /* the current character:
+ const char *cur.ptr pointer to current character
+ The following are only valid after mbi_avail.
+ size_t cur.bytes number of bytes of current character
+ bool cur.wc_valid true if wc is a valid wide character
+ wchar_t cur.wc if wc_valid: the current character
+ */
+};
+
+static inline void
+mbiter_multi_next (struct mbiter_multi *iter)
+{
+ if (iter->next_done)
+ return;
+ if (iter->in_shift)
+ goto with_shift;
+ /* Handle most ASCII characters quickly, without calling mbrtowc(). */
+ if (is_basic (*iter->cur.ptr))
+ {
+ /* These characters are part of the basic character set. ISO C 99
+ guarantees that their wide character code is identical to their
+ char code. */
+ iter->cur.bytes = 1;
+ iter->cur.wc = *iter->cur.ptr;
+ iter->cur.wc_valid = true;
+ }
+ else
+ {
+ assert (mbsinit (&iter->state));
+ iter->in_shift = true;
+ with_shift:
+ iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr,
+ iter->limit - iter->cur.ptr, &iter->state);
+ if (iter->cur.bytes == (size_t) -1)
+ {
+ /* An invalid multibyte sequence was encountered. */
+ iter->cur.bytes = 1;
+ iter->cur.wc_valid = false;
+ /* Whether to set iter->in_shift = false and reset iter->state
+ or not is not very important; the string is bogus anyway. */
+ }
+ else if (iter->cur.bytes == (size_t) -2)
+ {
+ /* An incomplete multibyte character at the end. */
+ iter->cur.bytes = iter->limit - iter->cur.ptr;
+ iter->cur.wc_valid = false;
+ /* Whether to set iter->in_shift = false and reset iter->state
+ or not is not important; the string end is reached anyway. */
+ }
+ else
+ {
+ if (iter->cur.bytes == 0)
+ {
+ /* A null wide character was encountered. */
+ iter->cur.bytes = 1;
+ assert (*iter->cur.ptr == '\0');
+ assert (iter->cur.wc == 0);
+ }
+ iter->cur.wc_valid = true;
+
+ /* When in the initial state, we can go back treating ASCII
+ characters more quickly. */
+ if (mbsinit (&iter->state))
+ iter->in_shift = false;
+ }
+ }
+ iter->next_done = true;
+}
+
+static inline void
+mbiter_multi_reloc (struct mbiter_multi *iter, ptrdiff_t ptrdiff)
+{
+ iter->cur.ptr += ptrdiff;
+ iter->limit += ptrdiff;
+}
+
+static inline void
+mbiter_multi_copy (struct mbiter_multi *new_iter, const struct mbiter_multi *old_iter)
+{
+ new_iter->limit = old_iter->limit;
+ if ((new_iter->in_shift = old_iter->in_shift))
+ memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t));
+ else
+ memset (&new_iter->state, 0, sizeof (mbstate_t));
+ new_iter->next_done = old_iter->next_done;
+ mb_copy (&new_iter->cur, &old_iter->cur);
+}
+
+/* Iteration macros. */
+typedef struct mbiter_multi mbi_iterator_t;
+#define mbi_init(iter, startptr, length) \
+ ((iter).cur.ptr = (startptr), (iter).limit = (iter).cur.ptr + (length), \
+ (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \
+ (iter).next_done = false)
+#define mbi_avail(iter) \
+ ((iter).cur.ptr < (iter).limit && (mbiter_multi_next (&(iter)), true))
+#define mbi_advance(iter) \
+ ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false)
+
+/* Access to the current character. */
+#define mbi_cur(iter) (iter).cur
+#define mbi_cur_ptr(iter) (iter).cur.ptr
+
+/* Relocation. */
+#define mbi_reloc(iter, ptrdiff) mbiter_multi_reloc (&iter, ptrdiff)
+
+/* Copying an iterator. */
+#define mbi_copy mbiter_multi_copy
+
+#endif /* _MBITER_H */
diff --git a/gnu/mbrtowc.c b/gnu/mbrtowc.c
new file mode 100755
index 00000000..5c2650e9
--- /dev/null
+++ b/gnu/mbrtowc.c
@@ -0,0 +1,386 @@
+/* Convert multibyte character to wide character.
+ Copyright (C) 1999-2002, 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#if GNULIB_defined_mbstate_t
+/* Implement mbrtowc() on top of mbtowc(). */
+
+# include <errno.h>
+# include <stdlib.h>
+
+# include "localcharset.h"
+# include "streq.h"
+# include "verify.h"
+
+
+verify (sizeof (mbstate_t) >= 4);
+
+static char internal_state[4];
+
+size_t
+mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+ char *pstate = (char *)ps;
+
+ if (pstate == NULL)
+ pstate = internal_state;
+
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+
+ if (n == 0)
+ return (size_t)(-2);
+
+ /* Here n > 0. */
+ {
+ size_t nstate = pstate[0];
+ char buf[4];
+ const char *p;
+ size_t m;
+
+ switch (nstate)
+ {
+ case 0:
+ p = s;
+ m = n;
+ break;
+ case 3:
+ buf[2] = pstate[3];
+ /*FALLTHROUGH*/
+ case 2:
+ buf[1] = pstate[2];
+ /*FALLTHROUGH*/
+ case 1:
+ buf[0] = pstate[1];
+ p = buf;
+ m = nstate;
+ buf[m++] = s[0];
+ if (n >= 2 && m < 4)
+ {
+ buf[m++] = s[1];
+ if (n >= 3 && m < 4)
+ buf[m++] = s[2];
+ }
+ break;
+ default:
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ /* Here m > 0. */
+
+# if __GLIBC__
+ /* Work around bug <http://sourceware.org/bugzilla/show_bug.cgi?id=9674> */
+ mbtowc (NULL, NULL, 0);
+# endif
+ {
+ int res = mbtowc (pwc, p, m);
+
+ if (res >= 0)
+ {
+ if (pwc != NULL && ((*pwc == 0) != (res == 0)))
+ abort ();
+ if (nstate >= (res > 0 ? res : 1))
+ abort ();
+ res -= nstate;
+ pstate[0] = 0;
+ return res;
+ }
+
+ /* mbtowc does not distinguish between invalid and incomplete multibyte
+ sequences. But mbrtowc needs to make this distinction.
+ There are two possible approaches:
+ - Use iconv() and its return value.
+ - Use built-in knowledge about the possible encodings.
+ Given the low quality of implementation of iconv() on the systems that
+ lack mbrtowc(), we use the second approach.
+ The possible encodings are:
+ - 8-bit encodings,
+ - EUC-JP, EUC-KR, GB2312, EUC-TW, BIG5, GB18030, SJIS,
+ - UTF-8.
+ Use specialized code for each. */
+ if (m >= 4 || m >= MB_CUR_MAX)
+ goto invalid;
+ /* Here MB_CUR_MAX > 1 and 0 < m < 4. */
+ {
+ const char *encoding = locale_charset ();
+
+ if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0, 0))
+ {
+ /* Cf. unistr/u8-mblen.c. */
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xc2)
+ {
+ if (c < 0xe0)
+ {
+ if (m == 1)
+ goto incomplete;
+ }
+ else if (c < 0xf0)
+ {
+ if (m == 1)
+ goto incomplete;
+ if (m == 2)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xe1 || c2 >= 0xa0)
+ && (c != 0xed || c2 < 0xa0))
+ goto incomplete;
+ }
+ }
+ else if (c <= 0xf4)
+ {
+ if (m == 1)
+ goto incomplete;
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if ((c2 ^ 0x80) < 0x40
+ && (c >= 0xf1 || c2 >= 0x90)
+ && (c < 0xf4 || (c == 0xf4 && c2 < 0x90)))
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if ((c3 ^ 0x80) < 0x40)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+
+ /* As a reference for this code, you can use the GNU libiconv
+ implementation. Look for uses of the RET_TOOFEW macro. */
+
+ if (STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e || c == 0x8f)
+ goto incomplete;
+ }
+ if (m == 2)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8f)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0xa1 && c2 < 0xff)
+ goto incomplete;
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0xa1 && c < 0xff)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0xa1 && c < 0xff) || c == 0x8e)
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c == 0x8e)
+ goto incomplete;
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "GB18030", 'G', 'B', '1', '8', '0', '3', '0', 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x90 && c <= 0xe3) || (c >= 0xf8 && c <= 0xfe))
+ goto incomplete;
+ }
+ else /* m == 2 || m == 3 */
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if (c >= 0x90 && c <= 0xe3)
+ {
+ unsigned char c2 = (unsigned char) p[1];
+
+ if (c2 >= 0x30 && c2 <= 0x39)
+ {
+ if (m == 2)
+ goto incomplete;
+ else /* m == 3 */
+ {
+ unsigned char c3 = (unsigned char) p[2];
+
+ if (c3 >= 0x81 && c3 <= 0xfe)
+ goto incomplete;
+ }
+ }
+ }
+ }
+ goto invalid;
+ }
+ if (STREQ (encoding, "SJIS", 'S', 'J', 'I', 'S', 0, 0, 0, 0, 0))
+ {
+ if (m == 1)
+ {
+ unsigned char c = (unsigned char) p[0];
+
+ if ((c >= 0x81 && c <= 0x9f) || (c >= 0xe0 && c <= 0xea)
+ || (c >= 0xf0 && c <= 0xf9))
+ goto incomplete;
+ }
+ goto invalid;
+ }
+
+ /* An unknown multibyte encoding. */
+ goto incomplete;
+ }
+
+ incomplete:
+ {
+ size_t k = nstate;
+ /* Here 0 <= k < m < 4. */
+ pstate[++k] = s[0];
+ if (k < m)
+ {
+ pstate[++k] = s[1];
+ if (k < m)
+ pstate[++k] = s[2];
+ }
+ if (k != m)
+ abort ();
+ }
+ pstate[0] = m;
+ return (size_t)(-2);
+
+ invalid:
+ errno = EILSEQ;
+ /* The conversion state is undefined, says POSIX. */
+ return (size_t)(-1);
+ }
+ }
+}
+
+#else
+/* Override the system's mbrtowc() function. */
+
+# undef mbrtowc
+
+size_t
+rpl_mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps)
+{
+# if MBRTOWC_NULL_ARG_BUG || MBRTOWC_RETVAL_BUG
+ if (s == NULL)
+ {
+ pwc = NULL;
+ s = "";
+ n = 1;
+ }
+# endif
+
+# if MBRTOWC_RETVAL_BUG
+ {
+ static mbstate_t internal_state;
+
+ /* Override mbrtowc's internal state. We can not call mbsinit() on the
+ hidden internal state, but we can call it on our variable. */
+ if (ps == NULL)
+ ps = &internal_state;
+
+ if (!mbsinit (ps))
+ {
+ /* Parse the rest of the multibyte character byte for byte. */
+ size_t count = 0;
+ for (; n > 0; s++, n--)
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, 1, ps);
+
+ if (ret == (size_t)(-1))
+ return (size_t)(-1);
+ count++;
+ if (ret != (size_t)(-2))
+ {
+ /* The multibyte character has been completed. */
+ if (pwc != NULL)
+ *pwc = wc;
+ return (wc == 0 ? 0 : count);
+ }
+ }
+ return (size_t)(-2);
+ }
+ }
+# endif
+
+# if MBRTOWC_NUL_RETVAL_BUG
+ {
+ wchar_t wc;
+ size_t ret = mbrtowc (&wc, s, n, ps);
+
+ if (ret != (size_t)(-1) && ret != (size_t)(-2))
+ {
+ if (pwc != NULL)
+ *pwc = wc;
+ if (wc == 0)
+ ret = 0;
+ }
+ return ret;
+ }
+# else
+ return mbrtowc (pwc, s, n, ps);
+# endif
+}
+
+#endif
diff --git a/gnu/mbsinit.c b/gnu/mbsinit.c
new file mode 100755
index 00000000..066ddfe5
--- /dev/null
+++ b/gnu/mbsinit.c
@@ -0,0 +1,47 @@
+/* Test for initial conversion state.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Platforms that lack mbsinit() also lack mbrlen(), mbrtowc(), mbsrtowcs()
+ and wcrtomb(), wcsrtombs().
+ We assume that
+ - sizeof (mbstate_t) >= 4,
+ - only stateless encodings are supported (such as UTF-8 and EUC-JP, but
+ not ISO-2022 variants),
+ - for each encoding, the number of bytes for a wide character is <= 4.
+ (This maximum is attained for UTF-8, GB18030, EUC-TW.)
+ We define the meaning of mbstate_t as follows:
+ - In mb -> wc direction, mbstate_t's first byte contains the number of
+ buffered bytes (in the range 0..3), followed by up to 3 buffered bytes.
+ - In wc -> mb direction, mbstate_t contains no information. In other
+ words, it is always in the initial state. */
+
+verify (sizeof (mbstate_t) >= 4);
+
+int
+mbsinit (const mbstate_t *ps)
+{
+ const char *pstate = (const char *)ps;
+
+ return pstate[0] == 0;
+}
diff --git a/gnu/mbslen.c b/gnu/mbslen.c
new file mode 100755
index 00000000..5ccede64
--- /dev/null
+++ b/gnu/mbslen.c
@@ -0,0 +1,44 @@
+/* Counting the multibyte characters in a string.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+#include <stdlib.h>
+
+#include "mbuiter.h"
+
+/* Return the number of multibyte characters in the character string STRING. */
+size_t
+mbslen (const char *string)
+{
+ if (MB_CUR_MAX > 1)
+ {
+ size_t count;
+ mbui_iterator_t iter;
+
+ count = 0;
+ for (mbui_init (iter, string); mbui_avail (iter); mbui_advance (iter))
+ count++;
+
+ return count;
+ }
+ else
+ return strlen (string);
+}
diff --git a/gnu/mbsstr.c b/gnu/mbsstr.c
new file mode 100755
index 00000000..d44b4c3d
--- /dev/null
+++ b/gnu/mbsstr.c
@@ -0,0 +1,379 @@
+/* Searching in a string.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+#include <stdbool.h>
+#include <stddef.h> /* for NULL, in case a nonstandard string.h lacks it */
+
+#include "malloca.h"
+#include "mbuiter.h"
+
+/* Knuth-Morris-Pratt algorithm. */
+#define CANON_ELEMENT(c) c
+#include "str-kmp.h"
+
+/* Knuth-Morris-Pratt algorithm.
+ See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
+ Return a boolean indicating success:
+ Return true and set *RESULTP if the search was completed.
+ Return false if it was aborted because not enough memory was available. */
+static bool
+knuth_morris_pratt_multibyte (const char *haystack, const char *needle,
+ const char **resultp)
+{
+ size_t m = mbslen (needle);
+ mbchar_t *needle_mbchars;
+ size_t *table;
+
+ /* Allocate room for needle_mbchars and the table. */
+ char *memory = (char *) nmalloca (m, sizeof (mbchar_t) + sizeof (size_t));
+ if (memory == NULL)
+ return false;
+ needle_mbchars = (mbchar_t *) memory;
+ table = (size_t *) (memory + m * sizeof (mbchar_t));
+
+ /* Fill needle_mbchars. */
+ {
+ mbui_iterator_t iter;
+ size_t j;
+
+ j = 0;
+ for (mbui_init (iter, needle); mbui_avail (iter); mbui_advance (iter), j++)
+ mb_copy (&needle_mbchars[j], &mbui_cur (iter));
+ }
+
+ /* Fill the table.
+ For 0 < i < m:
+ 0 < table[i] <= i is defined such that
+ forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x],
+ and table[i] is as large as possible with this property.
+ This implies:
+ 1) For 0 < i < m:
+ If table[i] < i,
+ needle[table[i]..i-1] = needle[0..i-1-table[i]].
+ 2) For 0 < i < m:
+ rhaystack[0..i-1] == needle[0..i-1]
+ and exists h, i <= h < m: rhaystack[h] != needle[h]
+ implies
+ forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1].
+ table[0] remains uninitialized. */
+ {
+ size_t i, j;
+
+ /* i = 1: Nothing to verify for x = 0. */
+ table[1] = 1;
+ j = 0;
+
+ for (i = 2; i < m; i++)
+ {
+ /* Here: j = i-1 - table[i-1].
+ The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold
+ for x < table[i-1], by induction.
+ Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */
+ mbchar_t *b = &needle_mbchars[i - 1];
+
+ for (;;)
+ {
+ /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x]
+ is known to hold for x < i-1-j.
+ Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */
+ if (mb_equal (*b, needle_mbchars[j]))
+ {
+ /* Set table[i] := i-1-j. */
+ table[i] = i - ++j;
+ break;
+ }
+ /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+ for x = i-1-j, because
+ needle[i-1] != needle[j] = needle[i-1-x]. */
+ if (j == 0)
+ {
+ /* The inequality holds for all possible x. */
+ table[i] = i;
+ break;
+ }
+ /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+ for i-1-j < x < i-1-j+table[j], because for these x:
+ needle[x..i-2]
+ = needle[x-(i-1-j)..j-1]
+ != needle[0..j-1-(x-(i-1-j))] (by definition of table[j])
+ = needle[0..i-2-x],
+ hence needle[x..i-1] != needle[0..i-1-x].
+ Furthermore
+ needle[i-1-j+table[j]..i-2]
+ = needle[table[j]..j-1]
+ = needle[0..j-1-table[j]] (by definition of table[j]). */
+ j = j - table[j];
+ }
+ /* Here: j = i - table[i]. */
+ }
+ }
+
+ /* Search, using the table to accelerate the processing. */
+ {
+ size_t j;
+ mbui_iterator_t rhaystack;
+ mbui_iterator_t phaystack;
+
+ *resultp = NULL;
+ j = 0;
+ mbui_init (rhaystack, haystack);
+ mbui_init (phaystack, haystack);
+ /* Invariant: phaystack = rhaystack + j. */
+ while (mbui_avail (phaystack))
+ if (mb_equal (needle_mbchars[j], mbui_cur (phaystack)))
+ {
+ j++;
+ mbui_advance (phaystack);
+ if (j == m)
+ {
+ /* The entire needle has been found. */
+ *resultp = mbui_cur_ptr (rhaystack);
+ break;
+ }
+ }
+ else if (j > 0)
+ {
+ /* Found a match of needle[0..j-1], mismatch at needle[j]. */
+ size_t count = table[j];
+ j -= count;
+ for (; count > 0; count--)
+ {
+ if (!mbui_avail (rhaystack))
+ abort ();
+ mbui_advance (rhaystack);
+ }
+ }
+ else
+ {
+ /* Found a mismatch at needle[0] already. */
+ if (!mbui_avail (rhaystack))
+ abort ();
+ mbui_advance (rhaystack);
+ mbui_advance (phaystack);
+ }
+ }
+
+ freea (memory);
+ return true;
+}
+
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK. */
+char *
+mbsstr (const char *haystack, const char *needle)
+{
+ /* Be careful not to look at the entire extent of haystack or needle
+ until needed. This is useful because of these two cases:
+ - haystack may be very long, and a match of needle found early,
+ - needle may be very long, and not even a short initial segment of
+ needle may be found in haystack. */
+ if (MB_CUR_MAX > 1)
+ {
+ mbui_iterator_t iter_needle;
+
+ mbui_init (iter_needle, needle);
+ if (mbui_avail (iter_needle))
+ {
+ /* Minimizing the worst-case complexity:
+ Let n = mbslen(haystack), m = mbslen(needle).
+ The naïve algorithm is O(n*m) worst-case.
+ The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+ memory allocation.
+ To achieve linear complexity and yet amortize the cost of the
+ memory allocation, we activate the Knuth-Morris-Pratt algorithm
+ only once the naïve algorithm has already run for some time; more
+ precisely, when
+ - the outer loop count is >= 10,
+ - the average number of comparisons per outer loop is >= 5,
+ - the total number of comparisons is >= m.
+ But we try it only once. If the memory allocation attempt failed,
+ we don't retry it. */
+ bool try_kmp = true;
+ size_t outer_loop_count = 0;
+ size_t comparison_count = 0;
+ size_t last_ccount = 0; /* last comparison count */
+ mbui_iterator_t iter_needle_last_ccount; /* = needle + last_ccount */
+
+ mbui_iterator_t iter_haystack;
+
+ mbui_init (iter_needle_last_ccount, needle);
+ mbui_init (iter_haystack, haystack);
+ for (;; mbui_advance (iter_haystack))
+ {
+ if (!mbui_avail (iter_haystack))
+ /* No match. */
+ return NULL;
+
+ /* See whether it's advisable to use an asymptotically faster
+ algorithm. */
+ if (try_kmp
+ && outer_loop_count >= 10
+ && comparison_count >= 5 * outer_loop_count)
+ {
+ /* See if needle + comparison_count now reaches the end of
+ needle. */
+ size_t count = comparison_count - last_ccount;
+ for (;
+ count > 0 && mbui_avail (iter_needle_last_ccount);
+ count--)
+ mbui_advance (iter_needle_last_ccount);
+ last_ccount = comparison_count;
+ if (!mbui_avail (iter_needle_last_ccount))
+ {
+ /* Try the Knuth-Morris-Pratt algorithm. */
+ const char *result;
+ bool success =
+ knuth_morris_pratt_multibyte (haystack, needle,
+ &result);
+ if (success)
+ return (char *) result;
+ try_kmp = false;
+ }
+ }
+
+ outer_loop_count++;
+ comparison_count++;
+ if (mb_equal (mbui_cur (iter_haystack), mbui_cur (iter_needle)))
+ /* The first character matches. */
+ {
+ mbui_iterator_t rhaystack;
+ mbui_iterator_t rneedle;
+
+ memcpy (&rhaystack, &iter_haystack, sizeof (mbui_iterator_t));
+ mbui_advance (rhaystack);
+
+ mbui_init (rneedle, needle);
+ if (!mbui_avail (rneedle))
+ abort ();
+ mbui_advance (rneedle);
+
+ for (;; mbui_advance (rhaystack), mbui_advance (rneedle))
+ {
+ if (!mbui_avail (rneedle))
+ /* Found a match. */
+ return (char *) mbui_cur_ptr (iter_haystack);
+ if (!mbui_avail (rhaystack))
+ /* No match. */
+ return NULL;
+ comparison_count++;
+ if (!mb_equal (mbui_cur (rhaystack), mbui_cur (rneedle)))
+ /* Nothing in this round. */
+ break;
+ }
+ }
+ }
+ }
+ else
+ return (char *) haystack;
+ }
+ else
+ {
+ if (*needle != '\0')
+ {
+ /* Minimizing the worst-case complexity:
+ Let n = strlen(haystack), m = strlen(needle).
+ The naïve algorithm is O(n*m) worst-case.
+ The Knuth-Morris-Pratt algorithm is O(n) worst-case but it needs a
+ memory allocation.
+ To achieve linear complexity and yet amortize the cost of the
+ memory allocation, we activate the Knuth-Morris-Pratt algorithm
+ only once the naïve algorithm has already run for some time; more
+ precisely, when
+ - the outer loop count is >= 10,
+ - the average number of comparisons per outer loop is >= 5,
+ - the total number of comparisons is >= m.
+ But we try it only once. If the memory allocation attempt failed,
+ we don't retry it. */
+ bool try_kmp = true;
+ size_t outer_loop_count = 0;
+ size_t comparison_count = 0;
+ size_t last_ccount = 0; /* last comparison count */
+ const char *needle_last_ccount = needle; /* = needle + last_ccount */
+
+ /* Speed up the following searches of needle by caching its first
+ character. */
+ char b = *needle++;
+
+ for (;; haystack++)
+ {
+ if (*haystack == '\0')
+ /* No match. */
+ return NULL;
+
+ /* See whether it's advisable to use an asymptotically faster
+ algorithm. */
+ if (try_kmp
+ && outer_loop_count >= 10
+ && comparison_count >= 5 * outer_loop_count)
+ {
+ /* See if needle + comparison_count now reaches the end of
+ needle. */
+ if (needle_last_ccount != NULL)
+ {
+ needle_last_ccount +=
+ strnlen (needle_last_ccount,
+ comparison_count - last_ccount);
+ if (*needle_last_ccount == '\0')
+ needle_last_ccount = NULL;
+ last_ccount = comparison_count;
+ }
+ if (needle_last_ccount == NULL)
+ {
+ /* Try the Knuth-Morris-Pratt algorithm. */
+ const char *result;
+ bool success =
+ knuth_morris_pratt_unibyte (haystack, needle - 1,
+ &result);
+ if (success)
+ return (char *) result;
+ try_kmp = false;
+ }
+ }
+
+ outer_loop_count++;
+ comparison_count++;
+ if (*haystack == b)
+ /* The first character matches. */
+ {
+ const char *rhaystack = haystack + 1;
+ const char *rneedle = needle;
+
+ for (;; rhaystack++, rneedle++)
+ {
+ if (*rneedle == '\0')
+ /* Found a match. */
+ return (char *) haystack;
+ if (*rhaystack == '\0')
+ /* No match. */
+ return NULL;
+ comparison_count++;
+ if (*rhaystack != *rneedle)
+ /* Nothing in this round. */
+ break;
+ }
+ }
+ }
+ }
+ else
+ return (char *) haystack;
+ }
+}
diff --git a/gnu/mbuiter.h b/gnu/mbuiter.h
new file mode 100755
index 00000000..3015c4ef
--- /dev/null
+++ b/gnu/mbuiter.h
@@ -0,0 +1,222 @@
+/* Iterating through multibyte strings: macros for multi-byte encodings.
+ Copyright (C) 2001, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+/* The macros in this file implement forward iteration through a
+ multi-byte string, without knowing its length a-priori.
+
+ With these macros, an iteration loop that looks like
+
+ char *iter;
+ for (iter = buf; *iter != '\0'; iter++)
+ {
+ do_something (*iter);
+ }
+
+ becomes
+
+ mbui_iterator_t iter;
+ for (mbui_init (iter, buf); mbui_avail (iter); mbui_advance (iter))
+ {
+ do_something (mbui_cur_ptr (iter), mb_len (mbui_cur (iter)));
+ }
+
+ The benefit of these macros over plain use of mbrtowc is:
+ - Handling of invalid multibyte sequences is possible without
+ making the code more complicated, while still preserving the
+ invalid multibyte sequences.
+
+ Compared to mbiter.h, the macros here don't need to know the string's
+ length a-priori. The downside is that at each step, the look-ahead
+ that guards against overrunning the terminating '\0' is more expensive.
+ The mbui_* macros are therefore suitable when there is a high probability
+ that only the first few multibyte characters need to be inspected.
+ Whereas the mbi_* macros are better if usually the iteration runs
+ through the entire string.
+
+ mbui_iterator_t
+ is a type usable for variable declarations.
+
+ mbui_init (iter, startptr)
+ initializes the iterator, starting at startptr.
+
+ mbui_avail (iter)
+ returns true if there are more multibyte chracters available before
+ the end of string is reached. In this case, mbui_cur (iter) is
+ initialized to the next multibyte chracter.
+
+ mbui_advance (iter)
+ advances the iterator by one multibyte character.
+
+ mbui_cur (iter)
+ returns the current multibyte character, of type mbchar_t. All the
+ macros defined in mbchar.h can be used on it.
+
+ mbui_cur_ptr (iter)
+ return a pointer to the beginning of the current multibyte character.
+
+ mbui_reloc (iter, ptrdiff)
+ relocates iterator when the string is moved by ptrdiff bytes.
+
+ mbui_copy (&destiter, &srciter)
+ copies srciter to destiter.
+
+ Here are the function prototypes of the macros.
+
+ extern void mbui_init (mbui_iterator_t iter, const char *startptr);
+ extern bool mbui_avail (mbui_iterator_t iter);
+ extern void mbui_advance (mbui_iterator_t iter);
+ extern mbchar_t mbui_cur (mbui_iterator_t iter);
+ extern const char * mbui_cur_ptr (mbui_iterator_t iter);
+ extern void mbui_reloc (mbui_iterator_t iter, ptrdiff_t ptrdiff);
+ extern void mbui_copy (mbui_iterator_t *new, const mbui_iterator_t *old);
+ */
+
+#ifndef _MBUITER_H
+#define _MBUITER_H 1
+
+#include <assert.h>
+#include <stdbool.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before
+ <wchar.h>. */
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+
+#include "mbchar.h"
+#include "strnlen1.h"
+
+struct mbuiter_multi
+{
+ bool in_shift; /* true if next byte may not be interpreted as ASCII */
+ mbstate_t state; /* if in_shift: current shift state */
+ bool next_done; /* true if mbui_avail has already filled the following */
+ struct mbchar cur; /* the current character:
+ const char *cur.ptr pointer to current character
+ The following are only valid after mbui_avail.
+ size_t cur.bytes number of bytes of current character
+ bool cur.wc_valid true if wc is a valid wide character
+ wchar_t cur.wc if wc_valid: the current character
+ */
+};
+
+static inline void
+mbuiter_multi_next (struct mbuiter_multi *iter)
+{
+ if (iter->next_done)
+ return;
+ if (iter->in_shift)
+ goto with_shift;
+ /* Handle most ASCII characters quickly, without calling mbrtowc(). */
+ if (is_basic (*iter->cur.ptr))
+ {
+ /* These characters are part of the basic character set. ISO C 99
+ guarantees that their wide character code is identical to their
+ char code. */
+ iter->cur.bytes = 1;
+ iter->cur.wc = *iter->cur.ptr;
+ iter->cur.wc_valid = true;
+ }
+ else
+ {
+ assert (mbsinit (&iter->state));
+ iter->in_shift = true;
+ with_shift:
+ iter->cur.bytes = mbrtowc (&iter->cur.wc, iter->cur.ptr,
+ strnlen1 (iter->cur.ptr, MB_CUR_MAX),
+ &iter->state);
+ if (iter->cur.bytes == (size_t) -1)
+ {
+ /* An invalid multibyte sequence was encountered. */
+ iter->cur.bytes = 1;
+ iter->cur.wc_valid = false;
+ /* Whether to set iter->in_shift = false and reset iter->state
+ or not is not very important; the string is bogus anyway. */
+ }
+ else if (iter->cur.bytes == (size_t) -2)
+ {
+ /* An incomplete multibyte character at the end. */
+ iter->cur.bytes = strlen (iter->cur.ptr);
+ iter->cur.wc_valid = false;
+ /* Whether to set iter->in_shift = false and reset iter->state
+ or not is not important; the string end is reached anyway. */
+ }
+ else
+ {
+ if (iter->cur.bytes == 0)
+ {
+ /* A null wide character was encountered. */
+ iter->cur.bytes = 1;
+ assert (*iter->cur.ptr == '\0');
+ assert (iter->cur.wc == 0);
+ }
+ iter->cur.wc_valid = true;
+
+ /* When in the initial state, we can go back treating ASCII
+ characters more quickly. */
+ if (mbsinit (&iter->state))
+ iter->in_shift = false;
+ }
+ }
+ iter->next_done = true;
+}
+
+static inline void
+mbuiter_multi_reloc (struct mbuiter_multi *iter, ptrdiff_t ptrdiff)
+{
+ iter->cur.ptr += ptrdiff;
+}
+
+static inline void
+mbuiter_multi_copy (struct mbuiter_multi *new_iter, const struct mbuiter_multi *old_iter)
+{
+ if ((new_iter->in_shift = old_iter->in_shift))
+ memcpy (&new_iter->state, &old_iter->state, sizeof (mbstate_t));
+ else
+ memset (&new_iter->state, 0, sizeof (mbstate_t));
+ new_iter->next_done = old_iter->next_done;
+ mb_copy (&new_iter->cur, &old_iter->cur);
+}
+
+/* Iteration macros. */
+typedef struct mbuiter_multi mbui_iterator_t;
+#define mbui_init(iter, startptr) \
+ ((iter).cur.ptr = (startptr), \
+ (iter).in_shift = false, memset (&(iter).state, '\0', sizeof (mbstate_t)), \
+ (iter).next_done = false)
+#define mbui_avail(iter) \
+ (mbuiter_multi_next (&(iter)), !mb_isnul ((iter).cur))
+#define mbui_advance(iter) \
+ ((iter).cur.ptr += (iter).cur.bytes, (iter).next_done = false)
+
+/* Access to the current character. */
+#define mbui_cur(iter) (iter).cur
+#define mbui_cur_ptr(iter) (iter).cur.ptr
+
+/* Relocation. */
+#define mbui_reloc(iter, ptrdiff) mbuiter_multi_reloc (&iter, ptrdiff)
+
+/* Copying an iterator. */
+#define mbui_copy mbuiter_multi_copy
+
+#endif /* _MBUITER_H */
diff --git a/gnu/memchr.c b/gnu/memchr.c
new file mode 100755
index 00000000..6c2b2d6c
--- /dev/null
+++ b/gnu/memchr.c
@@ -0,0 +1,172 @@
+/* Copyright (C) 1991, 1993, 1996-1997, 1999-2000, 2003-2004, 2006, 2008-2010
+ Free Software Foundation, Inc.
+
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+ and implemented by Roland McGrath (roland@ai.mit.edu).
+
+NOTE: The canonical source of this file is maintained with the GNU C Library.
+Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include <string.h>
+
+#include <stddef.h>
+
+#if defined _LIBC
+# include <memcopy.h>
+#else
+# define reg_char char
+#endif
+
+#include <limits.h>
+
+#if HAVE_BP_SYM_H || defined _LIBC
+# include <bp-sym.h>
+#else
+# define BP_SYM(sym) sym
+#endif
+
+#undef __memchr
+#ifdef _LIBC
+# undef memchr
+#endif
+
+#ifndef weak_alias
+# define __memchr memchr
+#endif
+
+/* Search no more than N bytes of S for C. */
+void *
+__memchr (void const *s, int c_in, size_t n)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned reg_char c;
+
+ c = (unsigned char) c_in;
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+ --n, ++char_ptr)
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will test a
+ longword at a time. The tricky part is testing if *any of the four*
+ bytes in the longword in question are equal to c. We first use an xor
+ with repeated_c. This reduces the task to testing whether *any of the
+ four* bytes in longword1 is zero.
+
+ We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ So, the test whether any byte in longword1 is zero is equivalent to
+ testing whether tmp is nonzero. */
+
+ while (n >= sizeof (longword))
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+
+ if ((((longword1 - repeated_one) & ~longword1)
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ n -= sizeof (longword);
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that either n < sizeof (longword), or one of the
+ sizeof (longword) bytes starting at char_ptr is == c. On little-endian
+ machines, we could determine the first such byte without any further
+ memory accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines. Choose code
+ that works in both cases. */
+
+ for (; n > 0; --n, ++char_ptr)
+ {
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+ }
+
+ return NULL;
+}
+#ifdef weak_alias
+weak_alias (__memchr, BP_SYM (memchr))
+#endif
diff --git a/gnu/memchr.valgrind b/gnu/memchr.valgrind
new file mode 100755
index 00000000..60f247e1
--- /dev/null
+++ b/gnu/memchr.valgrind
@@ -0,0 +1,14 @@
+# Suppress a valgrind message about use of uninitialized memory in memchr().
+# POSIX states that when the character is found, memchr must not read extra
+# bytes in an overestimated length (for example, where memchr is used to
+# implement strnlen). However, we use a safe word read to provide a speedup.
+{
+ memchr-value4
+ Memcheck:Value4
+ fun:rpl_memchr
+}
+{
+ memchr-value8
+ Memcheck:Value8
+ fun:rpl_memchr
+}
diff --git a/gnu/memchr2.c b/gnu/memchr2.c
new file mode 100755
index 00000000..1ad936be
--- /dev/null
+++ b/gnu/memchr2.c
@@ -0,0 +1,164 @@
+/* Copyright (C) 1991, 1993, 1996, 1997, 1999, 2000, 2003, 2004, 2006, 2008,
+ 2009, 2010 Free Software Foundation, Inc.
+
+ Based on strlen implementation by Torbjorn Granlund (tege@sics.se),
+ with help from Dan Sahlin (dan@sics.se) and
+ commentary by Jim Blandy (jimb@ai.mit.edu);
+ adaptation to memchr suggested by Dick Karpinski (dick@cca.ucsf.edu),
+ and implemented in glibc by Roland McGrath (roland@ai.mit.edu).
+ Extension to memchr2 implemented by Eric Blake (ebb9@byu.net).
+
+This program is free software: you can redistribute it and/or modify it
+under the terms of the GNU General Public License as published by the
+Free Software Foundation; either version 3 of the License, or 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "memchr2.h"
+
+#include <limits.h>
+#include <stdint.h>
+#include <string.h>
+
+/* Return the first address of either C1 or C2 (treated as unsigned
+ char) that occurs within N bytes of the memory region S. If
+ neither byte appears, return NULL. */
+void *
+memchr2 (void const *s, int c1_in, int c2_in, size_t n)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c1;
+ longword repeated_c2;
+ unsigned char c1;
+ unsigned char c2;
+
+ c1 = (unsigned char) c1_in;
+ c2 = (unsigned char) c2_in;
+
+ if (c1 == c2)
+ return memchr (s, c1, n);
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ n > 0 && (size_t) char_ptr % sizeof (longword) != 0;
+ --n, ++char_ptr)
+ if (*char_ptr == c1 || *char_ptr == c2)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c1 has c1 in every byte.
+ repeated_c2 has c2 in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c1 = c1 | (c1 << 8);
+ repeated_c2 = c2 | (c2 << 8);
+ repeated_c1 |= repeated_c1 << 16;
+ repeated_c2 |= repeated_c2 << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c1 |= repeated_c1 << 31 << 1;
+ repeated_c2 |= repeated_c2 << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c1 |= repeated_c1 << i;
+ repeated_c2 |= repeated_c2 << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will test a
+ longword at a time. The tricky part is testing if *any of the four*
+ bytes in the longword in question are equal to c1 or c2. We first use
+ an xor with repeated_c1 and repeated_c2, respectively. This reduces
+ the task to testing whether *any of the four* bytes in longword1 or
+ longword2 is zero.
+
+ Let's consider longword1. We compute tmp1 =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp1 is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ Similary, we compute tmp2 =
+ ((longword2 - repeated_one) & ~longword2) & (repeated_one << 7).
+
+ The test whether any byte in longword1 or longword2 is zero is equivalent
+ to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine
+ this into a single test, whether (tmp1 | tmp2) is nonzero. */
+
+ while (n >= sizeof (longword))
+ {
+ longword longword1 = *longword_ptr ^ repeated_c1;
+ longword longword2 = *longword_ptr ^ repeated_c2;
+
+ if (((((longword1 - repeated_one) & ~longword1)
+ | ((longword2 - repeated_one) & ~longword2))
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ n -= sizeof (longword);
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that either n < sizeof (longword), or one of the
+ sizeof (longword) bytes starting at char_ptr is == c1 or == c2. On
+ little-endian machines, we could determine the first such byte without
+ any further memory accesses, just by looking at the (tmp1 | tmp2) result
+ from the last loop iteration. But this does not work on big-endian
+ machines. Choose code that works in both cases. */
+
+ for (; n > 0; --n, ++char_ptr)
+ {
+ if (*char_ptr == c1 || *char_ptr == c2)
+ return (void *) char_ptr;
+ }
+
+ return NULL;
+}
diff --git a/gnu/memchr2.h b/gnu/memchr2.h
new file mode 100755
index 00000000..f5db8b79
--- /dev/null
+++ b/gnu/memchr2.h
@@ -0,0 +1,31 @@
+/* Scan memory for the first of two bytes.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the first address of either C1 or C2 (treated as unsigned
+ char) that occurs within N bytes of the memory region S. If
+ neither byte appears, return NULL. */
+
+extern void *memchr2 (void const *s, int c1, int c2, size_t n);
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/gnu/memchr2.valgrind b/gnu/memchr2.valgrind
new file mode 100755
index 00000000..778fe867
--- /dev/null
+++ b/gnu/memchr2.valgrind
@@ -0,0 +1,14 @@
+# Suppress a valgrind message about use of uninitialized memory in memchr2().
+# Like memchr, it is safe to overestimate the length when the terminator
+# is guaranteed to be found. In this case, we may end up reading a word
+# that is partially uninitialized, but this use is OK for a speedup.
+{
+ memchr2-value4
+ Memcheck:Value4
+ fun:memchr2
+}
+{
+ memchr2-value8
+ Memcheck:Value8
+ fun:memchr2
+}
diff --git a/gnu/memcmp2.c b/gnu/memcmp2.c
new file mode 100755
index 00000000..7eea707e
--- /dev/null
+++ b/gnu/memcmp2.c
@@ -0,0 +1,36 @@
+/* Compare two memory areas with possibly different lengths.
+ Copyright (C) 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 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "memcmp2.h"
+
+#include <string.h>
+
+int
+memcmp2 (const char *s1, size_t n1, const char *s2, size_t n2)
+{
+ int cmp = memcmp (s1, s2, n1 <= n2 ? n1 : n2);
+ if (cmp == 0)
+ {
+ if (n1 < n2)
+ cmp = -1;
+ else if (n1 > n2)
+ cmp = 1;
+ }
+ return cmp;
+}
diff --git a/gnu/memcmp2.h b/gnu/memcmp2.h
new file mode 100755
index 00000000..02204e81
--- /dev/null
+++ b/gnu/memcmp2.h
@@ -0,0 +1,39 @@
+/* Compare two memory areas with possibly different lengths.
+ Copyright (C) 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 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef MEMCMP2_H
+#define MEMCMP2_H
+
+#include <stddef.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Compare the memory regions S1 = [s1..s1+N1-1], S2 = [s2..s2+n2-1],
+ lexicographically.
+ This function's result is locale independent, unlike memcoll()'s.
+ Return a negative number if S1 < S2, a positive number if S1 > S2, or
+ 0 if S1 and S2 have the same contents. */
+extern int memcmp2 (const char *s1, size_t n1, const char *s2, size_t n2);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* MEMCMP2_H */
diff --git a/gnu/memmem.c b/gnu/memmem.c
new file mode 100755
index 00000000..a23c4f70
--- /dev/null
+++ b/gnu/memmem.c
@@ -0,0 +1,76 @@
+/* Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1998, 2000, 2004, 2007,
+ 2008, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This particular implementation was written by Eric Blake, 2008. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Specification of memmem. */
+#include <string.h>
+
+#ifndef _LIBC
+# define __builtin_expect(expr, val) (expr)
+#endif
+
+#define RETURN_TYPE void *
+#define AVAILABLE(h, h_l, j, n_l) ((j) <= (h_l) - (n_l))
+#include "str-two-way.h"
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. Return HAYSTACK
+ if NEEDLE_LEN is 0, otherwise NULL if NEEDLE is not found in
+ HAYSTACK. */
+void *
+memmem (const void *haystack_start, size_t haystack_len,
+ const void *needle_start, size_t needle_len)
+{
+ /* Abstract memory is considered to be an array of 'unsigned char' values,
+ not an array of 'char' values. See ISO C 99 section 6.2.6.1. */
+ const unsigned char *haystack = (const unsigned char *) haystack_start;
+ const unsigned char *needle = (const unsigned char *) needle_start;
+
+ if (needle_len == 0)
+ /* The first occurrence of the empty string is deemed to occur at
+ the beginning of the string. */
+ return (void *) haystack;
+
+ /* Sanity check, otherwise the loop might search through the whole
+ memory. */
+ if (__builtin_expect (haystack_len < needle_len, 0))
+ return NULL;
+
+ /* Use optimizations in memchr when possible, to reduce the search
+ size of haystack using a linear algorithm with a smaller
+ coefficient. However, avoid memchr for long needles, since we
+ can often achieve sublinear performance. */
+ if (needle_len < LONG_NEEDLE_THRESHOLD)
+ {
+ haystack = memchr (haystack, *needle, haystack_len);
+ if (!haystack || __builtin_expect (needle_len == 1, 0))
+ return (void *) haystack;
+ haystack_len -= haystack - (const unsigned char *) haystack_start;
+ if (haystack_len < needle_len)
+ return NULL;
+ return two_way_short_needle (haystack, haystack_len, needle, needle_len);
+ }
+ else
+ return two_way_long_needle (haystack, haystack_len, needle, needle_len);
+}
+
+#undef LONG_NEEDLE_THRESHOLD
diff --git a/gnu/mkdtemp.c b/gnu/mkdtemp.c
new file mode 100755
index 00000000..075cf32c
--- /dev/null
+++ b/gnu/mkdtemp.c
@@ -0,0 +1,39 @@
+/* Copyright (C) 1999, 2001-2003, 2006-2007, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Extracted from misc/mkdtemp.c. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include "tempname.h"
+
+/* Generate a unique temporary directory from XTEMPLATE.
+ The last six characters of XTEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the filename unique.
+ The directory is created, mode 700, and its name is returned.
+ (This function comes from OpenBSD.) */
+char *
+mkdtemp (char *xtemplate)
+{
+ if (gen_tempname (xtemplate, 0, 0, GT_DIR))
+ return NULL;
+ else
+ return xtemplate;
+}
diff --git a/gnu/mkstemp-safer.c b/gnu/mkstemp-safer.c
new file mode 100755
index 00000000..47d3b2c6
--- /dev/null
+++ b/gnu/mkstemp-safer.c
@@ -0,0 +1,63 @@
+/* Invoke mkstemp, but avoid some glitches.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <config.h>
+
+#include "stdlib-safer.h"
+
+#include <stdlib.h>
+#include "unistd-safer.h"
+
+/* Like mkstemp, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+
+int
+mkstemp_safer (char *templ)
+{
+ return fd_safer (mkstemp (templ));
+}
+
+#if GNULIB_MKOSTEMP
+/* Like mkostemp, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+int
+mkostemp_safer (char *templ, int flags)
+{
+ return fd_safer_flag (mkostemp (templ, flags), flags);
+}
+#endif
+
+#if GNULIB_MKOSTEMPS
+/* Like mkostemps, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+int
+mkostemps_safer (char *templ, int suffixlen, int flags)
+{
+ return fd_safer_flag (mkostemps (templ, suffixlen, flags), flags);
+}
+#endif
+
+#if GNULIB_MKSTEMPS
+/* Like mkstemps, but do not return STDIN_FILENO, STDOUT_FILENO, or
+ STDERR_FILENO. */
+int mkstemps_safer (char *templ, int suffixlen)
+{
+ return fd_safer (mkstemps (templ, suffixlen));
+}
+#endif
diff --git a/gnu/mkstemp.c b/gnu/mkstemp.c
new file mode 100755
index 00000000..c1dc7964
--- /dev/null
+++ b/gnu/mkstemp.c
@@ -0,0 +1,46 @@
+/* Copyright (C) 1998-1999, 2001, 2005-2007, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is derived from the one in the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+#include <stdlib.h>
+
+#if !_LIBC
+# include "tempname.h"
+# define __gen_tempname gen_tempname
+# ifndef __GT_FILE
+# define __GT_FILE GT_FILE
+# endif
+#endif
+
+#include <stdio.h>
+
+#ifndef __GT_FILE
+# define __GT_FILE 0
+#endif
+
+/* Generate a unique temporary file name from XTEMPLATE.
+ The last six characters of XTEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ Then open the file and return a fd. */
+int
+mkstemp (char *xtemplate)
+{
+ return __gen_tempname (xtemplate, 0, 0, __GT_FILE);
+}
diff --git a/gnu/nl_langinfo.c b/gnu/nl_langinfo.c
new file mode 100755
index 00000000..e81c81e7
--- /dev/null
+++ b/gnu/nl_langinfo.c
@@ -0,0 +1,260 @@
+/* nl_langinfo() replacement: query locale dependent information.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <langinfo.h>
+
+#if REPLACE_NL_LANGINFO
+
+/* Override nl_langinfo with support for added nl_item values. */
+
+# include <locale.h>
+# include <string.h>
+
+# undef nl_langinfo
+
+char *
+rpl_nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+# if GNULIB_defined_CODESET
+ case CODESET:
+ {
+ const char *locale;
+ static char buf[2 + 10 + 1];
+
+ locale = setlocale (LC_CTYPE, NULL);
+ if (locale != NULL && locale[0] != '\0')
+ {
+ /* If the locale name contains an encoding after the dot, return
+ it. */
+ const char *dot = strchr (locale, '.');
+
+ if (dot != NULL)
+ {
+ const char *modifier;
+
+ dot++;
+ /* Look for the possible @... trailer and remove it, if any. */
+ modifier = strchr (dot, '@');
+ if (modifier == NULL)
+ return dot;
+ if (modifier - dot < sizeof (buf))
+ {
+ memcpy (buf, dot, modifier - dot);
+ buf [modifier - dot] = '\0';
+ return buf;
+ }
+ }
+ }
+ return "";
+ }
+# endif
+# if GNULIB_defined_ERA
+ case ERA:
+ /* The format is not standardized. In glibc it is a sequence of strings
+ of the form "direction:offset:start_date:end_date:era_name:era_format"
+ with an empty string at the end. */
+ return "";
+ case ERA_D_FMT:
+ /* The %Ex conversion in strftime behaves like %x if the locale does not
+ have an alternative time format. */
+ item = D_FMT;
+ break;
+ case ERA_D_T_FMT:
+ /* The %Ec conversion in strftime behaves like %c if the locale does not
+ have an alternative time format. */
+ item = D_T_FMT;
+ break;
+ case ERA_T_FMT:
+ /* The %EX conversion in strftime behaves like %X if the locale does not
+ have an alternative time format. */
+ item = T_FMT;
+ break;
+ case ALT_DIGITS:
+ /* The format is not standardized. In glibc it is a sequence of 10
+ strings, appended in memory. */
+ return "\0\0\0\0\0\0\0\0\0\0";
+# endif
+ default:
+ break;
+ }
+ return nl_langinfo (item);
+}
+
+#else
+
+/* Provide nl_langinfo from scratch. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Windows platforms. */
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# include <stdio.h>
+
+# else
+
+/* An old Unix platform without locales, such as Linux libc5 or BeOS. */
+
+# endif
+
+# include <locale.h>
+
+char *
+nl_langinfo (nl_item item)
+{
+ switch (item)
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ case CODESET:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ {
+ static char buf[2 + 10 + 1];
+
+ /* Woe32 has a function returning the locale's codepage as a number. */
+ sprintf (buf, "CP%u", GetACP ());
+ return buf;
+ }
+# elif defined __BEOS__
+ return "UTF-8";
+# else
+ return "ISO-8859-1";
+# endif
+ /* nl_langinfo items of the LC_NUMERIC category */
+ case RADIXCHAR:
+ return localeconv () ->decimal_point;
+ case THOUSEP:
+ return localeconv () ->thousands_sep;
+ /* nl_langinfo items of the LC_TIME category.
+ TODO: Really use the locale. */
+ case D_T_FMT:
+ case ERA_D_T_FMT:
+ return "%a %b %e %H:%M:%S %Y";
+ case D_FMT:
+ case ERA_D_FMT:
+ return "%m/%d/%y";
+ case T_FMT:
+ case ERA_T_FMT:
+ return "%H:%M:%S";
+ case T_FMT_AMPM:
+ return "%I:%M:%S %p";
+ case AM_STR:
+ return "AM";
+ case PM_STR:
+ return "PM";
+ case DAY_1:
+ return "Sunday";
+ case DAY_2:
+ return "Monday";
+ case DAY_3:
+ return "Tuesday";
+ case DAY_4:
+ return "Wednesday";
+ case DAY_5:
+ return "Thursday";
+ case DAY_6:
+ return "Friday";
+ case DAY_7:
+ return "Saturday";
+ case ABDAY_1:
+ return "Sun";
+ case ABDAY_2:
+ return "Mon";
+ case ABDAY_3:
+ return "Tue";
+ case ABDAY_4:
+ return "Wed";
+ case ABDAY_5:
+ return "Thu";
+ case ABDAY_6:
+ return "Fri";
+ case ABDAY_7:
+ return "Sat";
+ case MON_1:
+ return "January";
+ case MON_2:
+ return "February";
+ case MON_3:
+ return "March";
+ case MON_4:
+ return "April";
+ case MON_5:
+ return "May";
+ case MON_6:
+ return "June";
+ case MON_7:
+ return "July";
+ case MON_8:
+ return "August";
+ case MON_9:
+ return "September";
+ case MON_10:
+ return "October";
+ case MON_11:
+ return "November";
+ case MON_12:
+ return "December";
+ case ABMON_1:
+ return "Jan";
+ case ABMON_2:
+ return "Feb";
+ case ABMON_3:
+ return "Mar";
+ case ABMON_4:
+ return "Apr";
+ case ABMON_5:
+ return "May";
+ case ABMON_6:
+ return "Jun";
+ case ABMON_7:
+ return "Jul";
+ case ABMON_8:
+ return "Aug";
+ case ABMON_9:
+ return "Sep";
+ case ABMON_10:
+ return "Oct";
+ case ABMON_11:
+ return "Nov";
+ case ABMON_12:
+ return "Dec";
+ case ERA:
+ return "";
+ case ALT_DIGITS:
+ return "\0\0\0\0\0\0\0\0\0\0";
+ /* nl_langinfo items of the LC_MONETARY category
+ TODO: Really use the locale. */
+ case CRNCYSTR:
+ return "-";
+ /* nl_langinfo items of the LC_MESSAGES category
+ TODO: Really use the locale. */
+ case YESEXPR:
+ return "^[yY]";
+ case NOEXPR:
+ return "^[nN]";
+ default:
+ return "";
+ }
+}
+
+#endif
diff --git a/gnu/obstack.c b/gnu/obstack.c
new file mode 100755
index 00000000..7c71acde
--- /dev/null
+++ b/gnu/obstack.c
@@ -0,0 +1,430 @@
+/* obstack.c - subroutines used implicitly by object stack macros
+
+ Copyright (C) 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef _LIBC
+# include <obstack.h>
+# include <shlib-compat.h>
+#else
+# include <config.h>
+# include "obstack.h"
+#endif
+
+/* NOTE BEFORE MODIFYING THIS FILE: This version number must be
+ incremented whenever callers compiled using an old obstack.h can no
+ longer properly call the functions in this obstack.c. */
+#define OBSTACK_INTERFACE_VERSION 1
+
+/* Comment out all this code if we are using the GNU C Library, and are not
+ actually compiling the library itself, and the installed library
+ supports the same library interface we do. This code is part of the GNU
+ C Library, but also included in many other GNU distributions. Compiling
+ and linking in this code is a waste when using the GNU C library
+ (especially if it is a shared library). Rather than having every GNU
+ program understand `configure --with-gnu-libc' and omit the object
+ files, it is simpler to just do this in the source for each such file. */
+
+#include <stdio.h> /* Random thing to get __GNU_LIBRARY__. */
+#if !defined _LIBC && defined __GNU_LIBRARY__ && __GNU_LIBRARY__ > 1
+# include <gnu-versions.h>
+# if _GNU_OBSTACK_INTERFACE_VERSION == OBSTACK_INTERFACE_VERSION
+# define ELIDE_CODE
+# endif
+#endif
+
+#include <stddef.h>
+
+#ifndef ELIDE_CODE
+
+# include <stdint.h>
+
+/* Determine default alignment. */
+union fooround
+{
+ uintmax_t i;
+ long double d;
+ void *p;
+};
+struct fooalign
+{
+ char c;
+ union fooround u;
+};
+/* If malloc were really smart, it would round addresses to DEFAULT_ALIGNMENT.
+ But in fact it might be less smart and round addresses to as much as
+ DEFAULT_ROUNDING. So we prepare for it to do that. */
+enum
+ {
+ DEFAULT_ALIGNMENT = offsetof (struct fooalign, u),
+ DEFAULT_ROUNDING = sizeof (union fooround)
+ };
+
+/* When we copy a long block of data, this is the unit to do it with.
+ On some machines, copying successive ints does not work;
+ in such a case, redefine COPYING_UNIT to `long' (if that works)
+ or `char' as a last resort. */
+# ifndef COPYING_UNIT
+# define COPYING_UNIT int
+# endif
+
+
+/* The functions allocating more room by calling `obstack_chunk_alloc'
+ jump to the handler pointed to by `obstack_alloc_failed_handler'.
+ This can be set to a user defined function which should either
+ abort gracefully or use longjump - but shouldn't return. This
+ variable by default points to the internal function
+ `print_and_abort'. */
+static void print_and_abort (void);
+void (*obstack_alloc_failed_handler) (void) = print_and_abort;
+
+/* Exit value used when `print_and_abort' is used. */
+# include <stdlib.h>
+# ifdef _LIBC
+int obstack_exit_failure = EXIT_FAILURE;
+# else
+# include "exitfail.h"
+# define obstack_exit_failure exit_failure
+# endif
+
+# ifdef _LIBC
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+/* A looong time ago (before 1994, anyway; we're not sure) this global variable
+ was used by non-GNU-C macros to avoid multiple evaluation. The GNU C
+ library still exports it because somebody might use it. */
+struct obstack *_obstack_compat;
+compat_symbol (libc, _obstack_compat, _obstack, GLIBC_2_0);
+# endif
+# endif
+
+/* Define a macro that either calls functions with the traditional malloc/free
+ calling interface, or calls functions with the mmalloc/mfree interface
+ (that adds an extra first argument), based on the state of use_extra_arg.
+ For free, do not use ?:, since some compilers, like the MIPS compilers,
+ do not allow (expr) ? void : void. */
+
+# define CALL_CHUNKFUN(h, size) \
+ (((h) -> use_extra_arg) \
+ ? (*(h)->chunkfun) ((h)->extra_arg, (size)) \
+ : (*(struct _obstack_chunk *(*) (long)) (h)->chunkfun) ((size)))
+
+# define CALL_FREEFUN(h, old_chunk) \
+ do { \
+ if ((h) -> use_extra_arg) \
+ (*(h)->freefun) ((h)->extra_arg, (old_chunk)); \
+ else \
+ (*(void (*) (void *)) (h)->freefun) ((old_chunk)); \
+ } while (0)
+
+
+/* Initialize an obstack H for use. Specify chunk size SIZE (0 means default).
+ Objects start on multiples of ALIGNMENT (0 means use default).
+ CHUNKFUN is the function to use to allocate chunks,
+ and FREEFUN the function to free them.
+
+ Return nonzero if successful, calls obstack_alloc_failed_handler if
+ allocation fails. */
+
+int
+_obstack_begin (struct obstack *h,
+ int size, int alignment,
+ void *(*chunkfun) (long),
+ void (*freefun) (void *))
+{
+ register struct _obstack_chunk *chunk; /* points to new chunk */
+
+ if (alignment == 0)
+ alignment = DEFAULT_ALIGNMENT;
+ if (size == 0)
+ /* Default size is what GNU malloc can fit in a 4096-byte block. */
+ {
+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
+ Use the values for range checking, because if range checking is off,
+ the extra bytes won't be missed terribly, but if range checking is on
+ and we used a larger request, a whole extra 4096 bytes would be
+ allocated.
+
+ These number are irrelevant to the new GNU malloc. I suspect it is
+ less sensitive to the size of the request. */
+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
+ + 4 + DEFAULT_ROUNDING - 1)
+ & ~(DEFAULT_ROUNDING - 1));
+ size = 4096 - extra;
+ }
+
+ h->chunkfun = (struct _obstack_chunk * (*)(void *, long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+ h->chunk_size = size;
+ h->alignment_mask = alignment - 1;
+ h->use_extra_arg = 0;
+
+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ if (!chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
+ alignment - 1);
+ h->chunk_limit = chunk->limit
+ = (char *) chunk + h->chunk_size;
+ chunk->prev = 0;
+ /* The initial chunk now contains no empty object. */
+ h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
+ return 1;
+}
+
+int
+_obstack_begin_1 (struct obstack *h, int size, int alignment,
+ void *(*chunkfun) (void *, long),
+ void (*freefun) (void *, void *),
+ void *arg)
+{
+ register struct _obstack_chunk *chunk; /* points to new chunk */
+
+ if (alignment == 0)
+ alignment = DEFAULT_ALIGNMENT;
+ if (size == 0)
+ /* Default size is what GNU malloc can fit in a 4096-byte block. */
+ {
+ /* 12 is sizeof (mhead) and 4 is EXTRA from GNU malloc.
+ Use the values for range checking, because if range checking is off,
+ the extra bytes won't be missed terribly, but if range checking is on
+ and we used a larger request, a whole extra 4096 bytes would be
+ allocated.
+
+ These number are irrelevant to the new GNU malloc. I suspect it is
+ less sensitive to the size of the request. */
+ int extra = ((((12 + DEFAULT_ROUNDING - 1) & ~(DEFAULT_ROUNDING - 1))
+ + 4 + DEFAULT_ROUNDING - 1)
+ & ~(DEFAULT_ROUNDING - 1));
+ size = 4096 - extra;
+ }
+
+ h->chunkfun = (struct _obstack_chunk * (*)(void *,long)) chunkfun;
+ h->freefun = (void (*) (void *, struct _obstack_chunk *)) freefun;
+ h->chunk_size = size;
+ h->alignment_mask = alignment - 1;
+ h->extra_arg = arg;
+ h->use_extra_arg = 1;
+
+ chunk = h->chunk = CALL_CHUNKFUN (h, h -> chunk_size);
+ if (!chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->next_free = h->object_base = __PTR_ALIGN ((char *) chunk, chunk->contents,
+ alignment - 1);
+ h->chunk_limit = chunk->limit
+ = (char *) chunk + h->chunk_size;
+ chunk->prev = 0;
+ /* The initial chunk now contains no empty object. */
+ h->maybe_empty_object = 0;
+ h->alloc_failed = 0;
+ return 1;
+}
+
+/* Allocate a new current chunk for the obstack *H
+ on the assumption that LENGTH bytes need to be added
+ to the current object, or a new object of length LENGTH allocated.
+ Copies any partial object from the end of the old chunk
+ to the beginning of the new one. */
+
+void
+_obstack_newchunk (struct obstack *h, int length)
+{
+ register struct _obstack_chunk *old_chunk = h->chunk;
+ register struct _obstack_chunk *new_chunk;
+ register long new_size;
+ register long obj_size = h->next_free - h->object_base;
+ register long i;
+ long already;
+ char *object_base;
+
+ /* Compute size for new chunk. */
+ new_size = (obj_size + length) + (obj_size >> 3) + h->alignment_mask + 100;
+ if (new_size < h->chunk_size)
+ new_size = h->chunk_size;
+
+ /* Allocate and initialize the new chunk. */
+ new_chunk = CALL_CHUNKFUN (h, new_size);
+ if (!new_chunk)
+ (*obstack_alloc_failed_handler) ();
+ h->chunk = new_chunk;
+ new_chunk->prev = old_chunk;
+ new_chunk->limit = h->chunk_limit = (char *) new_chunk + new_size;
+
+ /* Compute an aligned object_base in the new chunk */
+ object_base =
+ __PTR_ALIGN ((char *) new_chunk, new_chunk->contents, h->alignment_mask);
+
+ /* Move the existing object to the new chunk.
+ Word at a time is fast and is safe if the object
+ is sufficiently aligned. */
+ if (h->alignment_mask + 1 >= DEFAULT_ALIGNMENT)
+ {
+ for (i = obj_size / sizeof (COPYING_UNIT) - 1;
+ i >= 0; i--)
+ ((COPYING_UNIT *)object_base)[i]
+ = ((COPYING_UNIT *)h->object_base)[i];
+ /* We used to copy the odd few remaining bytes as one extra COPYING_UNIT,
+ but that can cross a page boundary on a machine
+ which does not do strict alignment for COPYING_UNITS. */
+ already = obj_size / sizeof (COPYING_UNIT) * sizeof (COPYING_UNIT);
+ }
+ else
+ already = 0;
+ /* Copy remaining bytes one by one. */
+ for (i = already; i < obj_size; i++)
+ object_base[i] = h->object_base[i];
+
+ /* If the object just copied was the only data in OLD_CHUNK,
+ free that chunk and remove it from the chain.
+ But not if that chunk might contain an empty object. */
+ if (! h->maybe_empty_object
+ && (h->object_base
+ == __PTR_ALIGN ((char *) old_chunk, old_chunk->contents,
+ h->alignment_mask)))
+ {
+ new_chunk->prev = old_chunk->prev;
+ CALL_FREEFUN (h, old_chunk);
+ }
+
+ h->object_base = object_base;
+ h->next_free = h->object_base + obj_size;
+ /* The new chunk certainly contains no empty object yet. */
+ h->maybe_empty_object = 0;
+}
+# ifdef _LIBC
+libc_hidden_def (_obstack_newchunk)
+# endif
+
+/* Return nonzero if object OBJ has been allocated from obstack H.
+ This is here for debugging.
+ If you use it in a program, you are probably losing. */
+
+/* Suppress -Wmissing-prototypes warning. We don't want to declare this in
+ obstack.h because it is just for debugging. */
+int _obstack_allocated_p (struct obstack *h, void *obj);
+
+int
+_obstack_allocated_p (struct obstack *h, void *obj)
+{
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
+
+ lp = (h)->chunk;
+ /* We use >= rather than > since the object cannot be exactly at
+ the beginning of the chunk but might be an empty object exactly
+ at the end of an adjacent chunk. */
+ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
+ {
+ plp = lp->prev;
+ lp = plp;
+ }
+ return lp != 0;
+}
+
+/* Free objects in obstack H, including OBJ and everything allocate
+ more recently than OBJ. If OBJ is zero, free everything in H. */
+
+# undef obstack_free
+
+void
+__obstack_free (struct obstack *h, void *obj)
+{
+ register struct _obstack_chunk *lp; /* below addr of any objects in this chunk */
+ register struct _obstack_chunk *plp; /* point to previous chunk if any */
+
+ lp = h->chunk;
+ /* We use >= because there cannot be an object at the beginning of a chunk.
+ But there can be an empty object at that address
+ at the end of another chunk. */
+ while (lp != 0 && ((void *) lp >= obj || (void *) (lp)->limit < obj))
+ {
+ plp = lp->prev;
+ CALL_FREEFUN (h, lp);
+ lp = plp;
+ /* If we switch chunks, we can't tell whether the new current
+ chunk contains an empty object, so assume that it may. */
+ h->maybe_empty_object = 1;
+ }
+ if (lp)
+ {
+ h->object_base = h->next_free = (char *) (obj);
+ h->chunk_limit = lp->limit;
+ h->chunk = lp;
+ }
+ else if (obj != 0)
+ /* obj is not in any of the chunks! */
+ abort ();
+}
+
+# ifdef _LIBC
+/* Older versions of libc used a function _obstack_free intended to be
+ called by non-GCC compilers. */
+strong_alias (obstack_free, _obstack_free)
+# endif
+
+int
+_obstack_memory_used (struct obstack *h)
+{
+ register struct _obstack_chunk* lp;
+ register int nbytes = 0;
+
+ for (lp = h->chunk; lp != 0; lp = lp->prev)
+ {
+ nbytes += lp->limit - (char *) lp;
+ }
+ return nbytes;
+}
+
+/* Define the error handler. */
+# ifdef _LIBC
+# include <libintl.h>
+# else
+# include "gettext.h"
+# endif
+# ifndef _
+# define _(msgid) gettext (msgid)
+# endif
+
+# ifdef _LIBC
+# include <libio/iolibio.h>
+# endif
+
+# ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+# endif
+
+static void
+__attribute__ ((noreturn))
+print_and_abort (void)
+{
+ /* Don't change any of these strings. Yes, it would be possible to add
+ the newline to the string and use fputs or so. But this must not
+ happen because the "memory exhausted" message appears in other places
+ like this and the translation should be reused instead of creating
+ a very similar string which requires a separate translation. */
+# ifdef _LIBC
+ (void) __fxprintf (NULL, "%s\n", _("memory exhausted"));
+# else
+ fprintf (stderr, "%s\n", _("memory exhausted"));
+# endif
+ exit (obstack_exit_failure);
+}
+
+#endif /* !ELIDE_CODE */
diff --git a/gnu/obstack.h b/gnu/obstack.h
new file mode 100755
index 00000000..27b732d5
--- /dev/null
+++ b/gnu/obstack.h
@@ -0,0 +1,512 @@
+/* obstack.h - object stack macros
+ Copyright (C) 1988-1994, 1996-1999, 2003-2006, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Summary:
+
+All the apparent functions defined here are macros. The idea
+is that you would use these pre-tested macros to solve a
+very specific set of problems, and they would run fast.
+Caution: no side-effects in arguments please!! They may be
+evaluated MANY times!!
+
+These macros operate a stack of objects. Each object starts life
+small, and may grow to maturity. (Consider building a word syllable
+by syllable.) An object can move while it is growing. Once it has
+been "finished" it never changes address again. So the "top of the
+stack" is typically an immature growing object, while the rest of the
+stack is of mature, fixed size and fixed address objects.
+
+These routines grab large chunks of memory, using a function you
+supply, called `obstack_chunk_alloc'. On occasion, they free chunks,
+by calling `obstack_chunk_free'. You must define them and declare
+them before using any obstack macros.
+
+Each independent stack is represented by a `struct obstack'.
+Each of the obstack macros expects a pointer to such a structure
+as the first argument.
+
+One motivation for this package is the problem of growing char strings
+in symbol tables. Unless you are "fascist pig with a read-only mind"
+--Gosper's immortal quote from HAKMEM item 154, out of context--you
+would not like to put any arbitrary upper limit on the length of your
+symbols.
+
+In practice this often means you will build many short symbols and a
+few long symbols. At the time you are reading a symbol you don't know
+how long it is. One traditional method is to read a symbol into a
+buffer, realloc()ating the buffer every time you try to read a symbol
+that is longer than the buffer. This is beaut, but you still will
+want to copy the symbol from the buffer to a more permanent
+symbol-table entry say about half the time.
+
+With obstacks, you can work differently. Use one obstack for all symbol
+names. As you read a symbol, grow the name in the obstack gradually.
+When the name is complete, finalize it. Then, if the symbol exists already,
+free the newly read name.
+
+The way we do this is to take a large chunk, allocating memory from
+low addresses. When you want to build a symbol in the chunk you just
+add chars above the current "high water mark" in the chunk. When you
+have finished adding chars, because you got to the end of the symbol,
+you know how long the chars are, and you can create a new object.
+Mostly the chars will not burst over the highest address of the chunk,
+because you would typically expect a chunk to be (say) 100 times as
+long as an average object.
+
+In case that isn't clear, when we have enough chars to make up
+the object, THEY ARE ALREADY CONTIGUOUS IN THE CHUNK (guaranteed)
+so we just point to it where it lies. No moving of chars is
+needed and this is the second win: potentially long strings need
+never be explicitly shuffled. Once an object is formed, it does not
+change its address during its lifetime.
+
+When the chars burst over a chunk boundary, we allocate a larger
+chunk, and then copy the partly formed object from the end of the old
+chunk to the beginning of the new larger chunk. We then carry on
+accreting characters to the end of the object as we normally would.
+
+A special macro is provided to add a single char at a time to a
+growing object. This allows the use of register variables, which
+break the ordinary 'growth' macro.
+
+Summary:
+ We allocate large chunks.
+ We carve out one object at a time from the current chunk.
+ Once carved, an object never moves.
+ We are free to append data of any size to the currently
+ growing object.
+ Exactly one object is growing in an obstack at any one time.
+ You can run one obstack per control block.
+ You may have as many control blocks as you dare.
+ Because of the way we do it, you can `unwind' an obstack
+ back to a previous state. (You may remove objects much
+ as you would with a stack.)
+*/
+
+
+/* Don't do the contents of this file more than once. */
+
+#ifndef _OBSTACK_H
+#define _OBSTACK_H 1
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* We need the type of a pointer subtraction. If __PTRDIFF_TYPE__ is
+ defined, as with GNU C, use that; that way we don't pollute the
+ namespace with <stddef.h>'s symbols. Otherwise, include <stddef.h>
+ and use ptrdiff_t. */
+
+#ifdef __PTRDIFF_TYPE__
+# define PTR_INT_TYPE __PTRDIFF_TYPE__
+#else
+# include <stddef.h>
+# define PTR_INT_TYPE ptrdiff_t
+#endif
+
+/* If B is the base of an object addressed by P, return the result of
+ aligning P to the next multiple of A + 1. B and P must be of type
+ char *. A + 1 must be a power of 2. */
+
+#define __BPTR_ALIGN(B, P, A) ((B) + (((P) - (B) + (A)) & ~(A)))
+
+/* Similiar to _BPTR_ALIGN (B, P, A), except optimize the common case
+ where pointers can be converted to integers, aligned as integers,
+ and converted back again. If PTR_INT_TYPE is narrower than a
+ pointer (e.g., the AS/400), play it safe and compute the alignment
+ relative to B. Otherwise, use the faster strategy of computing the
+ alignment relative to 0. */
+
+#define __PTR_ALIGN(B, P, A) \
+ __BPTR_ALIGN (sizeof (PTR_INT_TYPE) < sizeof (void *) ? (B) : (char *) 0, \
+ P, A)
+
+#include <string.h>
+
+struct _obstack_chunk /* Lives at front of each chunk. */
+{
+ char *limit; /* 1 past end of this chunk */
+ struct _obstack_chunk *prev; /* address of prior chunk or NULL */
+ char contents[4]; /* objects begin here */
+};
+
+struct obstack /* control current object in current chunk */
+{
+ long chunk_size; /* preferred size to allocate chunks in */
+ struct _obstack_chunk *chunk; /* address of current struct obstack_chunk */
+ char *object_base; /* address of object we are building */
+ char *next_free; /* where to add next char to current object */
+ char *chunk_limit; /* address of char after current chunk */
+ union
+ {
+ PTR_INT_TYPE tempint;
+ void *tempptr;
+ } temp; /* Temporary for some macros. */
+ int alignment_mask; /* Mask of alignment for each object. */
+ /* These prototypes vary based on `use_extra_arg', and we use
+ casts to the prototypeless function type in all assignments,
+ but having prototypes here quiets -Wstrict-prototypes. */
+ struct _obstack_chunk *(*chunkfun) (void *, long);
+ void (*freefun) (void *, struct _obstack_chunk *);
+ void *extra_arg; /* first arg for chunk alloc/dealloc funcs */
+ unsigned use_extra_arg:1; /* chunk alloc/dealloc funcs take extra arg */
+ unsigned maybe_empty_object:1;/* There is a possibility that the current
+ chunk contains a zero-length object. This
+ prevents freeing the chunk if we allocate
+ a bigger chunk to replace it. */
+ unsigned alloc_failed:1; /* No longer used, as we now call the failed
+ handler on error, but retained for binary
+ compatibility. */
+};
+
+/* Declare the external functions we use; they are in obstack.c. */
+
+extern void _obstack_newchunk (struct obstack *, int);
+extern int _obstack_begin (struct obstack *, int, int,
+ void *(*) (long), void (*) (void *));
+extern int _obstack_begin_1 (struct obstack *, int, int,
+ void *(*) (void *, long),
+ void (*) (void *, void *), void *);
+extern int _obstack_memory_used (struct obstack *);
+
+/* The default name of the function for freeing a chunk is 'obstack_free',
+ but gnulib users can override this by defining '__obstack_free'. */
+#ifndef __obstack_free
+# define __obstack_free obstack_free
+#endif
+extern void __obstack_free (struct obstack *obstack, void *block);
+
+
+/* Error handler called when `obstack_chunk_alloc' failed to allocate
+ more memory. This can be set to a user defined function which
+ should either abort gracefully or use longjump - but shouldn't
+ return. The default action is to print a message and abort. */
+extern void (*obstack_alloc_failed_handler) (void);
+
+/* Exit value used when `print_and_abort' is used. */
+extern int obstack_exit_failure;
+
+/* Pointer to beginning of object being allocated or to be allocated next.
+ Note that this might not be the final address of the object
+ because a new chunk might be needed to hold the final size. */
+
+#define obstack_base(h) ((void *) (h)->object_base)
+
+/* Size for allocating ordinary chunks. */
+
+#define obstack_chunk_size(h) ((h)->chunk_size)
+
+/* Pointer to next byte not yet allocated in current chunk. */
+
+#define obstack_next_free(h) ((h)->next_free)
+
+/* Mask specifying low bits that should be clear in address of an object. */
+
+#define obstack_alignment_mask(h) ((h)->alignment_mask)
+
+/* To prevent prototype warnings provide complete argument list. */
+#define obstack_init(h) \
+ _obstack_begin ((h), 0, 0, \
+ (void *(*) (long)) obstack_chunk_alloc, \
+ (void (*) (void *)) obstack_chunk_free)
+
+#define obstack_begin(h, size) \
+ _obstack_begin ((h), (size), 0, \
+ (void *(*) (long)) obstack_chunk_alloc, \
+ (void (*) (void *)) obstack_chunk_free)
+
+#define obstack_specify_allocation(h, size, alignment, chunkfun, freefun) \
+ _obstack_begin ((h), (size), (alignment), \
+ (void *(*) (long)) (chunkfun), \
+ (void (*) (void *)) (freefun))
+
+#define obstack_specify_allocation_with_arg(h, size, alignment, chunkfun, freefun, arg) \
+ _obstack_begin_1 ((h), (size), (alignment), \
+ (void *(*) (void *, long)) (chunkfun), \
+ (void (*) (void *, void *)) (freefun), (arg))
+
+#define obstack_chunkfun(h, newchunkfun) \
+ ((h) -> chunkfun = (struct _obstack_chunk *(*)(void *, long)) (newchunkfun))
+
+#define obstack_freefun(h, newfreefun) \
+ ((h) -> freefun = (void (*)(void *, struct _obstack_chunk *)) (newfreefun))
+
+#define obstack_1grow_fast(h,achar) (*((h)->next_free)++ = (achar))
+
+#define obstack_blank_fast(h,n) ((h)->next_free += (n))
+
+#define obstack_memory_used(h) _obstack_memory_used (h)
+
+#if defined __GNUC__ && defined __STDC__ && __STDC__
+/* NextStep 2.0 cc is really gcc 1.93 but it defines __GNUC__ = 2 and
+ does not implement __extension__. But that compiler doesn't define
+ __GNUC_MINOR__. */
+# if __GNUC__ < 2 || (__NeXT__ && !__GNUC_MINOR__)
+# define __extension__
+# endif
+
+/* For GNU C, if not -traditional,
+ we can define these macros to compute all args only once
+ without using a global variable.
+ Also, we can avoid using the `temp' slot, to make faster code. */
+
+# define obstack_object_size(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (unsigned) (__o->next_free - __o->object_base); })
+
+# define obstack_room(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (unsigned) (__o->chunk_limit - __o->next_free); })
+
+# define obstack_make_room(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->chunk_limit - __o->next_free < __len) \
+ _obstack_newchunk (__o, __len); \
+ (void) 0; })
+
+# define obstack_empty_p(OBSTACK) \
+ __extension__ \
+ ({ struct obstack const *__o = (OBSTACK); \
+ (__o->chunk->prev == 0 \
+ && __o->next_free == __PTR_ALIGN ((char *) __o->chunk, \
+ __o->chunk->contents, \
+ __o->alignment_mask)); })
+
+# define obstack_grow(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->next_free + __len > __o->chunk_limit) \
+ _obstack_newchunk (__o, __len); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ (void) 0; })
+
+# define obstack_grow0(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->next_free + __len + 1 > __o->chunk_limit) \
+ _obstack_newchunk (__o, __len + 1); \
+ memcpy (__o->next_free, where, __len); \
+ __o->next_free += __len; \
+ *(__o->next_free)++ = 0; \
+ (void) 0; })
+
+# define obstack_1grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + 1 > __o->chunk_limit) \
+ _obstack_newchunk (__o, 1); \
+ obstack_1grow_fast (__o, datum); \
+ (void) 0; })
+
+/* These assume that the obstack alignment is good enough for pointers
+ or ints, and that the data added so far to the current object
+ shares that much alignment. */
+
+# define obstack_ptr_grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + sizeof (void *) > __o->chunk_limit) \
+ _obstack_newchunk (__o, sizeof (void *)); \
+ obstack_ptr_grow_fast (__o, datum); }) \
+
+# define obstack_int_grow(OBSTACK,datum) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ if (__o->next_free + sizeof (int) > __o->chunk_limit) \
+ _obstack_newchunk (__o, sizeof (int)); \
+ obstack_int_grow_fast (__o, datum); })
+
+# define obstack_ptr_grow_fast(OBSTACK,aptr) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(const void **) __o1->next_free = (aptr); \
+ __o1->next_free += sizeof (const void *); \
+ (void) 0; })
+
+# define obstack_int_grow_fast(OBSTACK,aint) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ *(int *) __o1->next_free = (aint); \
+ __o1->next_free += sizeof (int); \
+ (void) 0; })
+
+# define obstack_blank(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ int __len = (length); \
+ if (__o->chunk_limit - __o->next_free < __len) \
+ _obstack_newchunk (__o, __len); \
+ obstack_blank_fast (__o, __len); \
+ (void) 0; })
+
+# define obstack_alloc(OBSTACK,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_blank (__h, (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_grow (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+# define obstack_copy0(OBSTACK,where,length) \
+__extension__ \
+({ struct obstack *__h = (OBSTACK); \
+ obstack_grow0 (__h, (where), (length)); \
+ obstack_finish (__h); })
+
+/* The local variable is named __o1 to avoid a name conflict
+ when obstack_blank is called. */
+# define obstack_finish(OBSTACK) \
+__extension__ \
+({ struct obstack *__o1 = (OBSTACK); \
+ void *__value = (void *) __o1->object_base; \
+ if (__o1->next_free == __value) \
+ __o1->maybe_empty_object = 1; \
+ __o1->next_free \
+ = __PTR_ALIGN (__o1->object_base, __o1->next_free, \
+ __o1->alignment_mask); \
+ if (__o1->next_free - (char *)__o1->chunk \
+ > __o1->chunk_limit - (char *)__o1->chunk) \
+ __o1->next_free = __o1->chunk_limit; \
+ __o1->object_base = __o1->next_free; \
+ __value; })
+
+# define obstack_free(OBSTACK, OBJ) \
+__extension__ \
+({ struct obstack *__o = (OBSTACK); \
+ void *__obj = (OBJ); \
+ if (__obj > (void *)__o->chunk && __obj < (void *)__o->chunk_limit) \
+ __o->next_free = __o->object_base = (char *)__obj; \
+ else (__obstack_free) (__o, __obj); })
+
+#else /* not __GNUC__ or not __STDC__ */
+
+# define obstack_object_size(h) \
+ (unsigned) ((h)->next_free - (h)->object_base)
+
+# define obstack_room(h) \
+ (unsigned) ((h)->chunk_limit - (h)->next_free)
+
+# define obstack_empty_p(h) \
+ ((h)->chunk->prev == 0 \
+ && (h)->next_free == __PTR_ALIGN ((char *) (h)->chunk, \
+ (h)->chunk->contents, \
+ (h)->alignment_mask))
+
+/* Note that the call to _obstack_newchunk is enclosed in (..., 0)
+ so that we can avoid having void expressions
+ in the arms of the conditional expression.
+ Casting the third operand to void was tried before,
+ but some compilers won't accept it. */
+
+# define obstack_make_room(h,length) \
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0))
+
+# define obstack_grow(h,where,length) \
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.tempint), \
+ (h)->next_free += (h)->temp.tempint)
+
+# define obstack_grow0(h,where,length) \
+( (h)->temp.tempint = (length), \
+ (((h)->next_free + (h)->temp.tempint + 1 > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint + 1), 0) : 0), \
+ memcpy ((h)->next_free, where, (h)->temp.tempint), \
+ (h)->next_free += (h)->temp.tempint, \
+ *((h)->next_free)++ = 0)
+
+# define obstack_1grow(h,datum) \
+( (((h)->next_free + 1 > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), 1), 0) : 0), \
+ obstack_1grow_fast (h, datum))
+
+# define obstack_ptr_grow(h,datum) \
+( (((h)->next_free + sizeof (char *) > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), sizeof (char *)), 0) : 0), \
+ obstack_ptr_grow_fast (h, datum))
+
+# define obstack_int_grow(h,datum) \
+( (((h)->next_free + sizeof (int) > (h)->chunk_limit) \
+ ? (_obstack_newchunk ((h), sizeof (int)), 0) : 0), \
+ obstack_int_grow_fast (h, datum))
+
+# define obstack_ptr_grow_fast(h,aptr) \
+ (((const void **) ((h)->next_free += sizeof (void *)))[-1] = (aptr))
+
+# define obstack_int_grow_fast(h,aint) \
+ (((int *) ((h)->next_free += sizeof (int)))[-1] = (aint))
+
+# define obstack_blank(h,length) \
+( (h)->temp.tempint = (length), \
+ (((h)->chunk_limit - (h)->next_free < (h)->temp.tempint) \
+ ? (_obstack_newchunk ((h), (h)->temp.tempint), 0) : 0), \
+ obstack_blank_fast (h, (h)->temp.tempint))
+
+# define obstack_alloc(h,length) \
+ (obstack_blank ((h), (length)), obstack_finish ((h)))
+
+# define obstack_copy(h,where,length) \
+ (obstack_grow ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_copy0(h,where,length) \
+ (obstack_grow0 ((h), (where), (length)), obstack_finish ((h)))
+
+# define obstack_finish(h) \
+( ((h)->next_free == (h)->object_base \
+ ? (((h)->maybe_empty_object = 1), 0) \
+ : 0), \
+ (h)->temp.tempptr = (h)->object_base, \
+ (h)->next_free \
+ = __PTR_ALIGN ((h)->object_base, (h)->next_free, \
+ (h)->alignment_mask), \
+ (((h)->next_free - (char *) (h)->chunk \
+ > (h)->chunk_limit - (char *) (h)->chunk) \
+ ? ((h)->next_free = (h)->chunk_limit) : 0), \
+ (h)->object_base = (h)->next_free, \
+ (h)->temp.tempptr)
+
+# define obstack_free(h,obj) \
+( (h)->temp.tempint = (char *) (obj) - (char *) (h)->chunk, \
+ ((((h)->temp.tempint > 0 \
+ && (h)->temp.tempint < (h)->chunk_limit - (char *) (h)->chunk)) \
+ ? (int) ((h)->next_free = (h)->object_base \
+ = (h)->temp.tempint + (char *) (h)->chunk) \
+ : (((__obstack_free) ((h), (h)->temp.tempint + (char *) (h)->chunk), 0), 0)))
+
+#endif /* not __GNUC__ or not __STDC__ */
+
+#ifdef __cplusplus
+} /* C++ */
+#endif
+
+#endif /* obstack.h */
diff --git a/gnu/obstack_printf.c b/gnu/obstack_printf.c
new file mode 100755
index 00000000..b8e1114c
--- /dev/null
+++ b/gnu/obstack_printf.c
@@ -0,0 +1,92 @@
+/* Formatted output to obstacks.
+ Copyright (C) 2008, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include "obstack.h"
+#include "vasnprintf.h"
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+/* Grow an obstack with formatted output. Return the number of bytes
+ added to OBS. No trailing nul byte is added, and the object should
+ be closed with obstack_finish before use.
+
+ Upon memory allocation error, call obstack_alloc_failed_handler.
+ Upon other error, return -1. */
+int
+obstack_printf (struct obstack *obs, const char *format, ...)
+{
+ va_list args;
+ int result;
+
+ va_start (args, format);
+ result = obstack_vprintf (obs, format, args);
+ va_end (args);
+ return result;
+}
+
+/* Grow an obstack with formatted output. Return the number of bytes
+ added to OBS. No trailing nul byte is added, and the object should
+ be closed with obstack_finish before use.
+
+ Upon memory allocation error, call obstack_alloc_failed_handler.
+ Upon other error, return -1. */
+int
+obstack_vprintf (struct obstack *obs, const char *format, va_list args)
+{
+ /* If we are close to the end of the current obstack chunk, use a
+ stack-allocated buffer and copy, to reduce the likelihood of a
+ small-size malloc. Otherwise, print directly into the
+ obstack. */
+ enum { CUTOFF = 1024 };
+ char buf[CUTOFF];
+ char *base = obstack_next_free (obs);
+ size_t len = obstack_room (obs);
+ char *str;
+
+ if (len < CUTOFF)
+ {
+ base = buf;
+ len = CUTOFF;
+ }
+ str = vasnprintf (base, &len, format, args);
+ if (!str)
+ {
+ if (errno == ENOMEM)
+ obstack_alloc_failed_handler ();
+ return -1;
+ }
+ if (str == base && str != buf)
+ /* The output was already computed in place, but we need to
+ account for its size. */
+ obstack_blank_fast (obs, len);
+ else
+ {
+ /* The output exceeded available obstack space or we used buf;
+ copy the resulting string. */
+ obstack_grow (obs, str, len);
+ if (str != buf)
+ free (str);
+ }
+ return len;
+}
diff --git a/gnu/open.c b/gnu/open.c
new file mode 100755
index 00000000..f612b802
--- /dev/null
+++ b/gnu/open.c
@@ -0,0 +1,166 @@
+/* Open a descriptor to a file.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* Get the original definition of open. It might be defined as a macro. */
+#define __need_system_fcntl_h
+#include <fcntl.h>
+#undef __need_system_fcntl_h
+#include <sys/types.h>
+
+static inline int
+orig_open (const char *filename, int flags, mode_t mode)
+{
+ return open (filename, flags, mode);
+}
+
+/* Specification. */
+#include <fcntl.h>
+
+#include <errno.h>
+#include <stdarg.h>
+#include <string.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#ifndef REPLACE_OPEN_DIRECTORY
+# define REPLACE_OPEN_DIRECTORY 0
+#endif
+
+int
+open (const char *filename, int flags, ...)
+{
+ mode_t mode;
+ int fd;
+
+ mode = 0;
+ if (flags & O_CREAT)
+ {
+ va_list arg;
+ va_start (arg, flags);
+
+ /* We have to use PROMOTED_MODE_T instead of mode_t, otherwise GCC 4
+ creates crashing code when 'mode_t' is smaller than 'int'. */
+ mode = va_arg (arg, PROMOTED_MODE_T);
+
+ va_end (arg);
+ }
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ if (strcmp (filename, "/dev/null") == 0)
+ filename = "NUL";
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+ /* If the filename ends in a slash and one of O_CREAT, O_WRONLY, O_RDWR
+ is specified, then fail.
+ Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+ says that
+ "A pathname that contains at least one non-slash character and that
+ ends with one or more trailing slashes shall be resolved as if a
+ single dot character ( '.' ) were appended to the pathname."
+ and
+ "The special filename dot shall refer to the directory specified by
+ its predecessor."
+ If the named file already exists as a directory, then
+ - if O_CREAT is specified, open() must fail because of the semantics
+ of O_CREAT,
+ - if O_WRONLY or O_RDWR is specified, open() must fail because POSIX
+ <http://www.opengroup.org/susv3/functions/open.html> says that it
+ fails with errno = EISDIR in this case.
+ If the named file does not exist or does not name a directory, then
+ - if O_CREAT is specified, open() must fail since open() cannot create
+ directories,
+ - if O_WRONLY or O_RDWR is specified, open() must fail because the
+ file does not contain a '.' directory. */
+ if (flags & (O_CREAT | O_WRONLY | O_RDWR))
+ {
+ size_t len = strlen (filename);
+ if (len > 0 && filename[len - 1] == '/')
+ {
+ errno = EISDIR;
+ return -1;
+ }
+ }
+#endif
+
+ fd = orig_open (filename, flags, mode);
+
+#if REPLACE_FCHDIR
+ /* Implementing fchdir and fdopendir requires the ability to open a
+ directory file descriptor. If open doesn't support that (as on
+ mingw), we use a dummy file that behaves the same as directories
+ on Linux (ie. always reports EOF on attempts to read()), and
+ override fstat() in fchdir.c to hide the fact that we have a
+ dummy. */
+ if (REPLACE_OPEN_DIRECTORY && fd < 0 && errno == EACCES
+ && (flags & O_ACCMODE) == O_RDONLY)
+ {
+ struct stat statbuf;
+ if (stat (filename, &statbuf) == 0 && S_ISDIR (statbuf.st_mode))
+ {
+ /* Maximum recursion depth of 1. */
+ fd = open ("/dev/null", flags, mode);
+ if (0 <= fd)
+ fd = _gl_register_fd (fd, filename);
+ }
+ else
+ errno = EACCES;
+ }
+#endif
+
+#if OPEN_TRAILING_SLASH_BUG
+ /* If the filename ends in a slash and fd does not refer to a directory,
+ then fail.
+ Rationale: POSIX <http://www.opengroup.org/susv3/basedefs/xbd_chap04.html>
+ says that
+ "A pathname that contains at least one non-slash character and that
+ ends with one or more trailing slashes shall be resolved as if a
+ single dot character ( '.' ) were appended to the pathname."
+ and
+ "The special filename dot shall refer to the directory specified by
+ its predecessor."
+ If the named file without the slash is not a directory, open() must fail
+ with ENOTDIR. */
+ if (fd >= 0)
+ {
+ /* We know len is positive, since open did not fail with ENOENT. */
+ size_t len = strlen (filename);
+ if (filename[len - 1] == '/')
+ {
+ struct stat statbuf;
+
+ if (fstat (fd, &statbuf) >= 0 && !S_ISDIR (statbuf.st_mode))
+ {
+ close (fd);
+ errno = ENOTDIR;
+ return -1;
+ }
+ }
+ }
+#endif
+
+#if REPLACE_FCHDIR
+ if (!REPLACE_OPEN_DIRECTORY && 0 <= fd)
+ fd = _gl_register_fd (fd, filename);
+#endif
+
+ return fd;
+}
diff --git a/gnu/pathmax.h b/gnu/pathmax.h
new file mode 100755
index 00000000..c739c2cd
--- /dev/null
+++ b/gnu/pathmax.h
@@ -0,0 +1,48 @@
+/* Define PATH_MAX somehow. Requires sys/types.h.
+ Copyright (C) 1992, 1999, 2001, 2003, 2005, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PATHMAX_H
+# define _PATHMAX_H
+
+# include <unistd.h>
+
+# include <limits.h>
+
+# ifndef _POSIX_PATH_MAX
+# define _POSIX_PATH_MAX 256
+# endif
+
+# if !defined PATH_MAX && defined _PC_PATH_MAX && defined HAVE_PATHCONF
+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 \
+ : pathconf ("/", _PC_PATH_MAX))
+# endif
+
+/* Don't include sys/param.h if it already has been. */
+# if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
+# include <sys/param.h>
+# endif
+
+# if !defined PATH_MAX && defined MAXPATHLEN
+# define PATH_MAX MAXPATHLEN
+# endif
+
+# ifndef PATH_MAX
+# define PATH_MAX _POSIX_PATH_MAX
+# endif
+
+#endif /* _PATHMAX_H */
diff --git a/gnu/pipe-safer.c b/gnu/pipe-safer.c
new file mode 100755
index 00000000..ae9f2e3e
--- /dev/null
+++ b/gnu/pipe-safer.c
@@ -0,0 +1,56 @@
+/* Invoke pipe, but avoid some glitches.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+#include "unistd-safer.h"
+
+#include <unistd.h>
+#include <errno.h>
+
+/* Like pipe, but ensure that neither of the file descriptors is
+ STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. Fail with ENOSYS on
+ platforms that lack pipe. */
+
+int
+pipe_safer (int fd[2])
+{
+#if HAVE_PIPE
+ if (pipe (fd) == 0)
+ {
+ int i;
+ for (i = 0; i < 2; i++)
+ {
+ fd[i] = fd_safer (fd[i]);
+ if (fd[i] < 0)
+ {
+ int e = errno;
+ close (fd[1 - i]);
+ errno = e;
+ return -1;
+ }
+ }
+
+ return 0;
+ }
+#else
+ errno = ENOSYS;
+#endif
+
+ return -1;
+}
diff --git a/gnu/pipe.c b/gnu/pipe.c
new file mode 100755
index 00000000..69865250
--- /dev/null
+++ b/gnu/pipe.c
@@ -0,0 +1,445 @@
+/* Creation of subprocesses, communicating via pipes.
+ Copyright (C) 2001-2004, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#include "pipe.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdlib.h>
+#include <signal.h>
+#include <unistd.h>
+
+#include "error.h"
+#include "fatal-signal.h"
+#include "unistd-safer.h"
+#include "wait-process.h"
+#include "gettext.h"
+
+#define _(str) gettext (str)
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Woe32 API. */
+# include <process.h>
+# include "w32spawn.h"
+
+#else
+
+/* Unix API. */
+# include <spawn.h>
+
+#endif
+
+/* The results of open() in this file are not used with fchdir,
+ therefore save some unnecessary work in fchdir.c. */
+#undef open
+#undef close
+
+
+#ifdef EINTR
+
+/* EINTR handling for close().
+ These functions can return -1/EINTR even though we don't have any
+ signal handlers set up, namely when we get interrupted via SIGSTOP. */
+
+static inline int
+nonintr_close (int fd)
+{
+ int retval;
+
+ do
+ retval = close (fd);
+ while (retval < 0 && errno == EINTR);
+
+ return retval;
+}
+#define close nonintr_close
+
+static inline int
+nonintr_open (const char *pathname, int oflag, mode_t mode)
+{
+ int retval;
+
+ do
+ retval = open (pathname, oflag, mode);
+ while (retval < 0 && errno == EINTR);
+
+ return retval;
+}
+#undef open /* avoid warning on VMS */
+#define open nonintr_open
+
+#endif
+
+
+/* Open a pipe connected to a child process.
+ *
+ * write system read
+ * parent -> fd[1] -> STDIN_FILENO -> child if pipe_stdin
+ * parent <- fd[0] <- STDOUT_FILENO <- child if pipe_stdout
+ * read system write
+ *
+ * At least one of pipe_stdin, pipe_stdout must be true.
+ * pipe_stdin and prog_stdin together determine the child's standard input.
+ * pipe_stdout and prog_stdout together determine the child's standard output.
+ * If pipe_stdin is true, prog_stdin is ignored.
+ * If pipe_stdout is true, prog_stdout is ignored.
+ */
+static pid_t
+create_pipe (const char *progname,
+ const char *prog_path, char **prog_argv,
+ bool pipe_stdin, bool pipe_stdout,
+ const char *prog_stdin, const char *prog_stdout,
+ bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[2])
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+ /* Native Woe32 API.
+ This uses _pipe(), dup2(), and spawnv(). It could also be implemented
+ using the low-level functions CreatePipe(), DuplicateHandle(),
+ CreateProcess() and _open_osfhandle(); see the GNU make and GNU clisp
+ and cvs source code. */
+ int ifd[2];
+ int ofd[2];
+ int orig_stdin;
+ int orig_stdout;
+ int orig_stderr;
+ int child;
+ int nulloutfd;
+ int stdinfd;
+ int stdoutfd;
+
+ /* FIXME: Need to free memory allocated by prepare_spawn. */
+ prog_argv = prepare_spawn (prog_argv);
+
+ if (pipe_stdout)
+ if (pipe2_safer (ifd, O_BINARY | O_CLOEXEC) < 0)
+ error (EXIT_FAILURE, errno, _("cannot create pipe"));
+ if (pipe_stdin)
+ if (pipe2_safer (ofd, O_BINARY | O_CLOEXEC) < 0)
+ error (EXIT_FAILURE, errno, _("cannot create pipe"));
+/* Data flow diagram:
+ *
+ * write system read
+ * parent -> ofd[1] -> ofd[0] -> child if pipe_stdin
+ * parent <- ifd[0] <- ifd[1] <- child if pipe_stdout
+ * read system write
+ *
+ */
+
+ /* Save standard file handles of parent process. */
+ if (pipe_stdin || prog_stdin != NULL)
+ orig_stdin = dup_safer_noinherit (STDIN_FILENO);
+ if (pipe_stdout || prog_stdout != NULL)
+ orig_stdout = dup_safer_noinherit (STDOUT_FILENO);
+ if (null_stderr)
+ orig_stderr = dup_safer_noinherit (STDERR_FILENO);
+ child = -1;
+
+ /* Create standard file handles of child process. */
+ nulloutfd = -1;
+ stdinfd = -1;
+ stdoutfd = -1;
+ if ((!pipe_stdin || dup2 (ofd[0], STDIN_FILENO) >= 0)
+ && (!pipe_stdout || dup2 (ifd[1], STDOUT_FILENO) >= 0)
+ && (!null_stderr
+ || ((nulloutfd = open ("NUL", O_RDWR, 0)) >= 0
+ && (nulloutfd == STDERR_FILENO
+ || (dup2 (nulloutfd, STDERR_FILENO) >= 0
+ && close (nulloutfd) >= 0))))
+ && (pipe_stdin
+ || prog_stdin == NULL
+ || ((stdinfd = open (prog_stdin, O_RDONLY, 0)) >= 0
+ && (stdinfd == STDIN_FILENO
+ || (dup2 (stdinfd, STDIN_FILENO) >= 0
+ && close (stdinfd) >= 0))))
+ && (pipe_stdout
+ || prog_stdout == NULL
+ || ((stdoutfd = open (prog_stdout, O_WRONLY, 0)) >= 0
+ && (stdoutfd == STDOUT_FILENO
+ || (dup2 (stdoutfd, STDOUT_FILENO) >= 0
+ && close (stdoutfd) >= 0)))))
+ /* The child process doesn't inherit ifd[0], ifd[1], ofd[0], ofd[1],
+ but it inherits all open()ed or dup2()ed file handles (which is what
+ we want in the case of STD*_FILENO). */
+ /* Use spawnvpe and pass the environment explicitly. This is needed if
+ the program has modified the environment using putenv() or [un]setenv().
+ On Windows, programs have two environments, one in the "environment
+ block" of the process and managed through SetEnvironmentVariable(), and
+ one inside the process, in the location retrieved by the 'environ'
+ macro. When using spawnvp() without 'e', the child process inherits a
+ copy of the environment block - ignoring the effects of putenv() and
+ [un]setenv(). */
+ {
+ child = spawnvpe (P_NOWAIT, prog_path, (const char **) prog_argv,
+ (const char **) environ);
+ if (child < 0 && errno == ENOEXEC)
+ {
+ /* prog is not an native executable. Try to execute it as a
+ shell script. Note that prepare_spawn() has already prepended
+ a hidden element "sh.exe" to prog_argv. */
+ --prog_argv;
+ child = spawnvpe (P_NOWAIT, prog_argv[0], (const char **) prog_argv,
+ (const char **) environ);
+ }
+ }
+ if (stdinfd >= 0)
+ close (stdinfd);
+ if (stdoutfd >= 0)
+ close (stdoutfd);
+ if (nulloutfd >= 0)
+ close (nulloutfd);
+
+ /* Restore standard file handles of parent process. */
+ if (null_stderr)
+ undup_safer_noinherit (orig_stderr, STDERR_FILENO);
+ if (pipe_stdout || prog_stdout != NULL)
+ undup_safer_noinherit (orig_stdout, STDOUT_FILENO);
+ if (pipe_stdin || prog_stdin != NULL)
+ undup_safer_noinherit (orig_stdin, STDIN_FILENO);
+
+ if (pipe_stdin)
+ close (ofd[0]);
+ if (pipe_stdout)
+ close (ifd[1]);
+ if (child == -1)
+ {
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, errno,
+ _("%s subprocess failed"), progname);
+ if (pipe_stdout)
+ close (ifd[0]);
+ if (pipe_stdin)
+ close (ofd[1]);
+ return -1;
+ }
+
+ if (pipe_stdout)
+ fd[0] = ifd[0];
+ if (pipe_stdin)
+ fd[1] = ofd[1];
+ return child;
+
+#else
+
+ /* Unix API. */
+ int ifd[2];
+ int ofd[2];
+ sigset_t blocked_signals;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+
+ if (pipe_stdout)
+ if (pipe_safer (ifd) < 0)
+ error (EXIT_FAILURE, errno, _("cannot create pipe"));
+ if (pipe_stdin)
+ if (pipe_safer (ofd) < 0)
+ error (EXIT_FAILURE, errno, _("cannot create pipe"));
+/* Data flow diagram:
+ *
+ * write system read
+ * parent -> ofd[1] -> ofd[0] -> child if pipe_stdin
+ * parent <- ifd[0] <- ifd[1] <- child if pipe_stdout
+ * read system write
+ *
+ */
+
+ if (slave_process)
+ {
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ block_fatal_signals ();
+ }
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (pipe_stdin
+ && (err = posix_spawn_file_actions_adddup2 (&actions,
+ ofd[0], STDIN_FILENO))
+ != 0)
+ || (pipe_stdout
+ && (err = posix_spawn_file_actions_adddup2 (&actions,
+ ifd[1], STDOUT_FILENO))
+ != 0)
+ || (pipe_stdin
+ && (err = posix_spawn_file_actions_addclose (&actions, ofd[0]))
+ != 0)
+ || (pipe_stdout
+ && (err = posix_spawn_file_actions_addclose (&actions, ifd[1]))
+ != 0)
+ || (pipe_stdin
+ && (err = posix_spawn_file_actions_addclose (&actions, ofd[1]))
+ != 0)
+ || (pipe_stdout
+ && (err = posix_spawn_file_actions_addclose (&actions, ifd[0]))
+ != 0)
+ || (null_stderr
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDERR_FILENO,
+ "/dev/null", O_RDWR,
+ 0))
+ != 0)
+ || (!pipe_stdin
+ && prog_stdin != NULL
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDIN_FILENO,
+ prog_stdin, O_RDONLY,
+ 0))
+ != 0)
+ || (!pipe_stdout
+ && prog_stdout != NULL
+ && (err = posix_spawn_file_actions_addopen (&actions,
+ STDOUT_FILENO,
+ prog_stdout, O_WRONLY,
+ 0))
+ != 0)
+ || (slave_process
+ && ((err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs,
+ &blocked_signals))
+ != 0
+ || (err = posix_spawnattr_setflags (&attrs,
+ POSIX_SPAWN_SETSIGMASK))
+ != 0)))
+ || (err = posix_spawnp (&child, prog_path, &actions,
+ attrs_allocated ? &attrs : NULL, prog_argv,
+ environ))
+ != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ if (slave_process)
+ unblock_fatal_signals ();
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, err,
+ _("%s subprocess failed"), progname);
+ if (pipe_stdout)
+ {
+ close (ifd[0]);
+ close (ifd[1]);
+ }
+ if (pipe_stdin)
+ {
+ close (ofd[0]);
+ close (ofd[1]);
+ }
+ return -1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ if (slave_process)
+ {
+ register_slave_subprocess (child);
+ unblock_fatal_signals ();
+ }
+ if (pipe_stdin)
+ close (ofd[0]);
+ if (pipe_stdout)
+ close (ifd[1]);
+
+ if (pipe_stdout)
+ fd[0] = ifd[0];
+ if (pipe_stdin)
+ fd[1] = ofd[1];
+ return child;
+
+#endif
+}
+
+/* Open a bidirectional pipe.
+ *
+ * write system read
+ * parent -> fd[1] -> STDIN_FILENO -> child
+ * parent <- fd[0] <- STDOUT_FILENO <- child
+ * read system write
+ *
+ */
+pid_t
+create_pipe_bidi (const char *progname,
+ const char *prog_path, char **prog_argv,
+ bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[2])
+{
+ pid_t result = create_pipe (progname, prog_path, prog_argv,
+ true, true, NULL, NULL,
+ null_stderr, slave_process, exit_on_error,
+ fd);
+ return result;
+}
+
+/* Open a pipe for input from a child process.
+ * The child's stdin comes from a file.
+ *
+ * read system write
+ * parent <- fd[0] <- STDOUT_FILENO <- child
+ *
+ */
+pid_t
+create_pipe_in (const char *progname,
+ const char *prog_path, char **prog_argv,
+ const char *prog_stdin, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[1])
+{
+ int iofd[2];
+ pid_t result = create_pipe (progname, prog_path, prog_argv,
+ false, true, prog_stdin, NULL,
+ null_stderr, slave_process, exit_on_error,
+ iofd);
+ if (result != -1)
+ fd[0] = iofd[0];
+ return result;
+}
+
+/* Open a pipe for output to a child process.
+ * The child's stdout goes to a file.
+ *
+ * write system read
+ * parent -> fd[0] -> STDIN_FILENO -> child
+ *
+ */
+pid_t
+create_pipe_out (const char *progname,
+ const char *prog_path, char **prog_argv,
+ const char *prog_stdout, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[1])
+{
+ int iofd[2];
+ pid_t result = create_pipe (progname, prog_path, prog_argv,
+ true, false, NULL, prog_stdout,
+ null_stderr, slave_process, exit_on_error,
+ iofd);
+ if (result != -1)
+ fd[0] = iofd[1];
+ return result;
+}
diff --git a/gnu/pipe.h b/gnu/pipe.h
new file mode 100755
index 00000000..2f23903a
--- /dev/null
+++ b/gnu/pipe.h
@@ -0,0 +1,146 @@
+/* Creation of subprocesses, communicating via pipes.
+ Copyright (C) 2001-2003, 2006, 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _PIPE_H
+#define _PIPE_H
+
+/* Get pid_t. */
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* All these functions create a subprocess and don't wait for its termination.
+ They return the process id of the subprocess. They also return in fd[]
+ one or two file descriptors for communication with the subprocess.
+ If the subprocess creation fails: if exit_on_error is true, the main
+ process exits with an error message; otherwise, an error message is given
+ if null_stderr is false, then -1 is returned and fd[] remain uninitialized.
+
+ After finishing communication, the caller should call wait_subprocess()
+ to get rid of the subprocess in the process table.
+
+ If slave_process is true, the child process will be terminated when its
+ creator receives a catchable fatal signal or exits normally. If
+ slave_process is false, the child process will continue running in this
+ case, until it is lucky enough to attempt to communicate with its creator
+ and thus get a SIGPIPE signal.
+
+ If exit_on_error is false, a child process id of -1 should be treated the
+ same way as a subprocess which accepts no input, produces no output and
+ terminates with exit code 127. Why? Some errors during posix_spawnp()
+ cause the function posix_spawnp() to return an error code; some other
+ errors cause the subprocess to exit with return code 127. It is
+ implementation dependent which error is reported which way. The caller
+ must treat both cases as equivalent.
+
+ It is recommended that no signal is blocked or ignored (i.e. have a
+ signal handler with value SIG_IGN) while any of these functions is called.
+ The reason is that child processes inherit the mask of blocked signals
+ from their parent (both through posix_spawn() and fork()/exec());
+ likewise, signals ignored in the parent are also ignored in the child
+ (except possibly for SIGCHLD). And POSIX:2001 says [in the description
+ of exec()]:
+ "it should be noted that many existing applications wrongly
+ assume that they start with certain signals set to the default
+ action and/or unblocked. In particular, applications written
+ with a simpler signal model that does not include blocking of
+ signals, such as the one in the ISO C standard, may not behave
+ properly if invoked with some signals blocked. Therefore, it is
+ best not to block or ignore signals across execs without explicit
+ reason to do so, and especially not to block signals across execs
+ of arbitrary (not closely co-operating) programs." */
+
+/* Open a pipe for output to a child process.
+ * The child's stdout goes to a file.
+ *
+ * write system read
+ * parent -> fd[0] -> STDIN_FILENO -> child
+ *
+ * Note: When writing to a child process, it is useful to ignore the SIGPIPE
+ * signal and the EPIPE error code.
+ */
+extern pid_t create_pipe_out (const char *progname,
+ const char *prog_path, char **prog_argv,
+ const char *prog_stdout, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[1]);
+
+/* Open a pipe for input from a child process.
+ * The child's stdin comes from a file.
+ *
+ * read system write
+ * parent <- fd[0] <- STDOUT_FILENO <- child
+ *
+ */
+extern pid_t create_pipe_in (const char *progname,
+ const char *prog_path, char **prog_argv,
+ const char *prog_stdin, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[1]);
+
+/* Open a bidirectional pipe.
+ *
+ * write system read
+ * parent -> fd[1] -> STDIN_FILENO -> child
+ * parent <- fd[0] <- STDOUT_FILENO <- child
+ * read system write
+ *
+ * Note: When writing to a child process, it is useful to ignore the SIGPIPE
+ * signal and the EPIPE error code.
+ *
+ * Note: The parent process must be careful to avoid deadlock.
+ * 1) If you write more than PIPE_MAX bytes or, more generally, if you write
+ * more bytes than the subprocess can handle at once, the subprocess
+ * may write its data and wait on you to read it, but you are currently
+ * busy writing.
+ * 2) When you don't know ahead of time how many bytes the subprocess
+ * will produce, the usual technique of calling read (fd, buf, BUFSIZ)
+ * with a fixed BUFSIZ will, on Linux 2.2.17 and on BSD systems, cause
+ * the read() call to block until *all* of the buffer has been filled.
+ * But the subprocess cannot produce more data until you gave it more
+ * input. But you are currently busy reading from it.
+ */
+extern pid_t create_pipe_bidi (const char *progname,
+ const char *prog_path, char **prog_argv,
+ bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int fd[2]);
+
+/* The name of the "always silent" device. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Woe32 API. */
+# define DEV_NULL "NUL"
+#else
+/* Unix API. */
+# define DEV_NULL "/dev/null"
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PIPE_H */
diff --git a/gnu/pipe2-safer.c b/gnu/pipe2-safer.c
new file mode 100755
index 00000000..034fcd87
--- /dev/null
+++ b/gnu/pipe2-safer.c
@@ -0,0 +1,52 @@
+/* Invoke pipe2, but avoid some glitches.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+/* Specification. */
+#include "unistd-safer.h"
+
+#include <unistd.h>
+#include <errno.h>
+
+/* Like pipe2, but ensure that neither of the file descriptors is
+ STDIN_FILENO, STDOUT_FILENO, or STDERR_FILENO. */
+
+int
+pipe2_safer (int fd[2], int flags)
+{
+ /* This is a generalization of the pipe_safer implementation. */
+ if (pipe2 (fd, flags) == 0)
+ {
+ int i;
+ for (i = 0; i < 2; i++)
+ {
+ fd[i] = fd_safer_flag (fd[i], flags);
+ if (fd[i] < 0)
+ {
+ int e = errno;
+ close (fd[1 - i]);
+ errno = e;
+ return -1;
+ }
+ }
+
+ return 0;
+ }
+ return -1;
+}
diff --git a/gnu/pipe2.c b/gnu/pipe2.c
new file mode 100755
index 00000000..059d8039
--- /dev/null
+++ b/gnu/pipe2.c
@@ -0,0 +1,141 @@
+/* Create a pipe, with specific opening flags.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <fcntl.h>
+
+#include "binary-io.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Woe32 API. */
+
+# include <io.h>
+
+#else
+/* Unix API. */
+
+# ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+# endif
+
+#endif
+
+int
+pipe2 (int fd[2], int flags)
+{
+#if HAVE_PIPE2
+# undef pipe2
+ /* Try the system call first, if it exists. (We may be running with a glibc
+ that has the function but with an older kernel that lacks it.) */
+ {
+ /* Cache the information whether the system call really exists. */
+ static int have_pipe2_really; /* 0 = unknown, 1 = yes, -1 = no */
+ if (have_pipe2_really >= 0)
+ {
+ int result = pipe2 (fd, flags);
+ if (!(result < 0 && errno == ENOSYS))
+ {
+ have_pipe2_really = 1;
+ return result;
+ }
+ have_pipe2_really = -1;
+ }
+ }
+#endif
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Native Woe32 API. */
+
+ /* Check the supported flags. */
+ if ((flags & ~(O_CLOEXEC | O_BINARY | O_TEXT)) != 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ return _pipe (fd, 4096, flags);
+
+#else
+/* Unix API. */
+
+ /* Check the supported flags. */
+ if ((flags & ~(O_CLOEXEC | O_NONBLOCK | O_TEXT | O_BINARY)) != 0)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ if (pipe (fd) < 0)
+ return -1;
+
+ /* POSIX <http://www.opengroup.org/onlinepubs/9699919799/functions/pipe.html>
+ says that initially, the O_NONBLOCK and FD_CLOEXEC flags are cleared on
+ both fd[0] amd fd[1]. */
+
+ if (flags & O_NONBLOCK)
+ {
+ int fcntl_flags;
+
+ if ((fcntl_flags = fcntl (fd[1], F_GETFL, 0)) < 0
+ || fcntl (fd[1], F_SETFL, fcntl_flags | O_NONBLOCK) == -1
+ || (fcntl_flags = fcntl (fd[0], F_GETFL, 0)) < 0
+ || fcntl (fd[0], F_SETFL, fcntl_flags | O_NONBLOCK) == -1)
+ goto fail;
+ }
+
+ if (flags & O_CLOEXEC)
+ {
+ int fcntl_flags;
+
+ if ((fcntl_flags = fcntl (fd[1], F_GETFD, 0)) < 0
+ || fcntl (fd[1], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1
+ || (fcntl_flags = fcntl (fd[0], F_GETFD, 0)) < 0
+ || fcntl (fd[0], F_SETFD, fcntl_flags | FD_CLOEXEC) == -1)
+ goto fail;
+ }
+
+# if O_BINARY
+ if (flags & O_BINARY)
+ {
+ setmode (fd[1], O_BINARY);
+ setmode (fd[0], O_BINARY);
+ }
+ else if (flags & O_TEXT)
+ {
+ setmode (fd[1], O_TEXT);
+ setmode (fd[0], O_TEXT);
+ }
+# endif
+
+ return 0;
+
+ fail:
+ {
+ int saved_errno = errno;
+ close (fd[0]);
+ close (fd[1]);
+ errno = saved_errno;
+ return -1;
+ }
+
+#endif
+}
diff --git a/gnu/printf-args.c b/gnu/printf-args.c
new file mode 100755
index 00000000..46c03a21
--- /dev/null
+++ b/gnu/printf-args.c
@@ -0,0 +1,188 @@
+/* Decomposed printf argument list.
+ Copyright (C) 1999, 2002-2003, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ PRINTF_FETCHARGS Name of the function to be defined.
+ STATIC Set to 'static' to declare the function static. */
+
+#ifndef PRINTF_FETCHARGS
+# include <config.h>
+#endif
+
+/* Specification. */
+#ifndef PRINTF_FETCHARGS
+# include "printf-args.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_FETCHARGS (va_list args, arguments *a)
+{
+ size_t i;
+ argument *ap;
+
+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
+ switch (ap->type)
+ {
+ case TYPE_SCHAR:
+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
+ break;
+ case TYPE_UCHAR:
+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
+ break;
+ case TYPE_SHORT:
+ ap->a.a_short = va_arg (args, /*short*/ int);
+ break;
+ case TYPE_USHORT:
+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
+ break;
+ case TYPE_INT:
+ ap->a.a_int = va_arg (args, int);
+ break;
+ case TYPE_UINT:
+ ap->a.a_uint = va_arg (args, unsigned int);
+ break;
+ case TYPE_LONGINT:
+ ap->a.a_longint = va_arg (args, long int);
+ break;
+ case TYPE_ULONGINT:
+ ap->a.a_ulongint = va_arg (args, unsigned long int);
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ ap->a.a_longlongint = va_arg (args, long long int);
+ break;
+ case TYPE_ULONGLONGINT:
+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
+ break;
+#endif
+ case TYPE_DOUBLE:
+ ap->a.a_double = va_arg (args, double);
+ break;
+ case TYPE_LONGDOUBLE:
+ ap->a.a_longdouble = va_arg (args, long double);
+ break;
+ case TYPE_CHAR:
+ ap->a.a_char = va_arg (args, int);
+ break;
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+ /* Although ISO C 99 7.24.1.(2) says that wint_t is "unchanged by
+ default argument promotions", this is not the case in mingw32,
+ where wint_t is 'unsigned short'. */
+ ap->a.a_wide_char =
+ (sizeof (wint_t) < sizeof (int)
+ ? (wint_t) va_arg (args, int)
+ : va_arg (args, wint_t));
+ break;
+#endif
+ case TYPE_STRING:
+ ap->a.a_string = va_arg (args, const char *);
+ /* A null pointer is an invalid argument for "%s", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_string == NULL)
+ ap->a.a_string = "(NULL)";
+ break;
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
+ /* A null pointer is an invalid argument for "%ls", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_wide_string == NULL)
+ {
+ static const wchar_t wide_null_string[] =
+ {
+ (wchar_t)'(',
+ (wchar_t)'N', (wchar_t)'U', (wchar_t)'L', (wchar_t)'L',
+ (wchar_t)')',
+ (wchar_t)0
+ };
+ ap->a.a_wide_string = wide_null_string;
+ }
+ break;
+#endif
+ case TYPE_POINTER:
+ ap->a.a_pointer = va_arg (args, void *);
+ break;
+ case TYPE_COUNT_SCHAR_POINTER:
+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
+ break;
+ case TYPE_COUNT_SHORT_POINTER:
+ ap->a.a_count_short_pointer = va_arg (args, short *);
+ break;
+ case TYPE_COUNT_INT_POINTER:
+ ap->a.a_count_int_pointer = va_arg (args, int *);
+ break;
+ case TYPE_COUNT_LONGINT_POINTER:
+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
+ break;
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ case TYPE_U8_STRING:
+ ap->a.a_u8_string = va_arg (args, const uint8_t *);
+ /* A null pointer is an invalid argument for "%U", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u8_string == NULL)
+ {
+ static const uint8_t u8_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u8_string = u8_null_string;
+ }
+ break;
+ case TYPE_U16_STRING:
+ ap->a.a_u16_string = va_arg (args, const uint16_t *);
+ /* A null pointer is an invalid argument for "%lU", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u16_string == NULL)
+ {
+ static const uint16_t u16_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u16_string = u16_null_string;
+ }
+ break;
+ case TYPE_U32_STRING:
+ ap->a.a_u32_string = va_arg (args, const uint32_t *);
+ /* A null pointer is an invalid argument for "%llU", but in practice
+ it occurs quite frequently in printf statements that produce
+ debug output. Use a fallback in this case. */
+ if (ap->a.a_u32_string == NULL)
+ {
+ static const uint32_t u32_null_string[] =
+ { '(', 'N', 'U', 'L', 'L', ')', 0 };
+ ap->a.a_u32_string = u32_null_string;
+ }
+ break;
+#endif
+ default:
+ /* Unknown type. */
+ return -1;
+ }
+ return 0;
+}
diff --git a/gnu/printf-args.h b/gnu/printf-args.h
new file mode 100755
index 00000000..2536ebaf
--- /dev/null
+++ b/gnu/printf-args.h
@@ -0,0 +1,155 @@
+/* Decomposed printf argument list.
+ Copyright (C) 1999, 2002-2003, 2006-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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PRINTF_ARGS_H
+#define _PRINTF_ARGS_H
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ PRINTF_FETCHARGS Name of the function to be declared.
+ STATIC Set to 'static' to declare the function static. */
+
+/* Default parameters. */
+#ifndef PRINTF_FETCHARGS
+# define PRINTF_FETCHARGS printf_fetchargs
+#endif
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get wchar_t. */
+#if HAVE_WCHAR_T
+# include <stddef.h>
+#endif
+
+/* Get wint_t. */
+#if HAVE_WINT_T
+# include <wchar.h>
+#endif
+
+/* Get va_list. */
+#include <stdarg.h>
+
+
+/* Argument types */
+typedef enum
+{
+ TYPE_NONE,
+ TYPE_SCHAR,
+ TYPE_UCHAR,
+ TYPE_SHORT,
+ TYPE_USHORT,
+ TYPE_INT,
+ TYPE_UINT,
+ TYPE_LONGINT,
+ TYPE_ULONGINT,
+#if HAVE_LONG_LONG_INT
+ TYPE_LONGLONGINT,
+ TYPE_ULONGLONGINT,
+#endif
+ TYPE_DOUBLE,
+ TYPE_LONGDOUBLE,
+ TYPE_CHAR,
+#if HAVE_WINT_T
+ TYPE_WIDE_CHAR,
+#endif
+ TYPE_STRING,
+#if HAVE_WCHAR_T
+ TYPE_WIDE_STRING,
+#endif
+ TYPE_POINTER,
+ TYPE_COUNT_SCHAR_POINTER,
+ TYPE_COUNT_SHORT_POINTER,
+ TYPE_COUNT_INT_POINTER,
+ TYPE_COUNT_LONGINT_POINTER
+#if HAVE_LONG_LONG_INT
+, TYPE_COUNT_LONGLONGINT_POINTER
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+, TYPE_U8_STRING
+, TYPE_U16_STRING
+, TYPE_U32_STRING
+#endif
+} arg_type;
+
+/* Polymorphic argument */
+typedef struct
+{
+ arg_type type;
+ union
+ {
+ signed char a_schar;
+ unsigned char a_uchar;
+ short a_short;
+ unsigned short a_ushort;
+ int a_int;
+ unsigned int a_uint;
+ long int a_longint;
+ unsigned long int a_ulongint;
+#if HAVE_LONG_LONG_INT
+ long long int a_longlongint;
+ unsigned long long int a_ulonglongint;
+#endif
+ float a_float;
+ double a_double;
+ long double a_longdouble;
+ int a_char;
+#if HAVE_WINT_T
+ wint_t a_wide_char;
+#endif
+ const char* a_string;
+#if HAVE_WCHAR_T
+ const wchar_t* a_wide_string;
+#endif
+ void* a_pointer;
+ signed char * a_count_schar_pointer;
+ short * a_count_short_pointer;
+ int * a_count_int_pointer;
+ long int * a_count_longint_pointer;
+#if HAVE_LONG_LONG_INT
+ long long int * a_count_longlongint_pointer;
+#endif
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ const uint8_t * a_u8_string;
+ const uint16_t * a_u16_string;
+ const uint32_t * a_u32_string;
+#endif
+ }
+ a;
+}
+argument;
+
+typedef struct
+{
+ size_t count;
+ argument *arg;
+}
+arguments;
+
+
+/* Fetch the arguments, putting them into a. */
+#ifdef STATIC
+STATIC
+#else
+extern
+#endif
+int PRINTF_FETCHARGS (va_list args, arguments *a);
+
+#endif /* _PRINTF_ARGS_H */
diff --git a/gnu/printf-frexp.c b/gnu/printf-frexp.c
new file mode 100755
index 00000000..1a538468
--- /dev/null
+++ b/gnu/printf-frexp.c
@@ -0,0 +1,188 @@
+/* Split a double into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef USE_LONG_DOUBLE
+# include "printf-frexpl.h"
+#else
+# include "printf-frexp.h"
+#endif
+
+#include <float.h>
+#include <math.h>
+#ifdef USE_LONG_DOUBLE
+# include "fpucw.h"
+#endif
+
+/* This file assumes FLT_RADIX = 2. If FLT_RADIX is a power of 2 greater
+ than 2, or not even a power of 2, some rounding errors can occur, so that
+ then the returned mantissa is only guaranteed to be <= 2.0, not < 2.0. */
+
+#ifdef USE_LONG_DOUBLE
+# define FUNC printf_frexpl
+# define DOUBLE long double
+# define MIN_EXP LDBL_MIN_EXP
+# if HAVE_FREXPL_IN_LIBC && HAVE_LDEXPL_IN_LIBC
+# define USE_FREXP_LDEXP
+# define FREXP frexpl
+# define LDEXP ldexpl
+# endif
+# define DECL_ROUNDING DECL_LONG_DOUBLE_ROUNDING
+# define BEGIN_ROUNDING() BEGIN_LONG_DOUBLE_ROUNDING ()
+# define END_ROUNDING() END_LONG_DOUBLE_ROUNDING ()
+# define L_(literal) literal##L
+#else
+# define FUNC printf_frexp
+# define DOUBLE double
+# define MIN_EXP DBL_MIN_EXP
+# if HAVE_FREXP_IN_LIBC && HAVE_LDEXP_IN_LIBC
+# define USE_FREXP_LDEXP
+# define FREXP frexp
+# define LDEXP ldexp
+# endif
+# define DECL_ROUNDING
+# define BEGIN_ROUNDING()
+# define END_ROUNDING()
+# define L_(literal) literal
+#endif
+
+DOUBLE
+FUNC (DOUBLE x, int *expptr)
+{
+ int exponent;
+ DECL_ROUNDING
+
+ BEGIN_ROUNDING ();
+
+#ifdef USE_FREXP_LDEXP
+ /* frexp and ldexp are usually faster than the loop below. */
+ x = FREXP (x, &exponent);
+
+ x = x + x;
+ exponent -= 1;
+
+ if (exponent < MIN_EXP - 1)
+ {
+ x = LDEXP (x, exponent - (MIN_EXP - 1));
+ exponent = MIN_EXP - 1;
+ }
+#else
+ {
+ /* Since the exponent is an 'int', it fits in 64 bits. Therefore the
+ loops are executed no more than 64 times. */
+ DOUBLE pow2[64]; /* pow2[i] = 2^2^i */
+ DOUBLE powh[64]; /* powh[i] = 2^-2^i */
+ int i;
+
+ exponent = 0;
+ if (x >= L_(1.0))
+ {
+ /* A nonnegative exponent. */
+ {
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x >= 1.0. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (x >= pow2_i)
+ {
+ exponent += (1 << i);
+ x *= powh_i;
+ }
+ else
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ }
+ /* Here 1.0 <= x < 2^2^i. */
+ }
+ else
+ {
+ /* A negative exponent. */
+ {
+ DOUBLE pow2_i; /* = pow2[i] */
+ DOUBLE powh_i; /* = powh[i] */
+
+ /* Invariants: pow2_i = 2^2^i, powh_i = 2^-2^i,
+ x * 2^exponent = argument, x < 1.0, exponent >= MIN_EXP - 1. */
+ for (i = 0, pow2_i = L_(2.0), powh_i = L_(0.5);
+ ;
+ i++, pow2_i = pow2_i * pow2_i, powh_i = powh_i * powh_i)
+ {
+ if (exponent - (1 << i) < MIN_EXP - 1)
+ break;
+
+ exponent -= (1 << i);
+ x *= pow2_i;
+ if (x >= L_(1.0))
+ break;
+
+ pow2[i] = pow2_i;
+ powh[i] = powh_i;
+ }
+ }
+ /* Here either x < 1.0 and exponent - 2^i < MIN_EXP - 1 <= exponent,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+
+ if (x < L_(1.0))
+ /* Invariants: x * 2^exponent = argument, x < 1.0 and
+ exponent - 2^i < MIN_EXP - 1 <= exponent. */
+ while (i > 0)
+ {
+ i--;
+ if (exponent - (1 << i) >= MIN_EXP - 1)
+ {
+ exponent -= (1 << i);
+ x *= pow2[i];
+ if (x >= L_(1.0))
+ break;
+ }
+ }
+
+ /* Here either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+ }
+
+ /* Invariants: x * 2^exponent = argument, and
+ either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2^2^i and exponent >= MIN_EXP - 1. */
+ while (i > 0)
+ {
+ i--;
+ if (x >= pow2[i])
+ {
+ exponent += (1 << i);
+ x *= powh[i];
+ }
+ }
+ /* Here either x < 1.0 and exponent = MIN_EXP - 1,
+ or 1.0 <= x < 2.0 and exponent >= MIN_EXP - 1. */
+ }
+#endif
+
+ END_ROUNDING ();
+
+ *expptr = exponent;
+ return x;
+}
diff --git a/gnu/printf-frexp.h b/gnu/printf-frexp.h
new file mode 100755
index 00000000..0dc60f8f
--- /dev/null
+++ b/gnu/printf-frexp.h
@@ -0,0 +1,23 @@
+/* Split a double into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Write a finite, positive number x as
+ x = mantissa * 2^exp
+ where exp >= DBL_MIN_EXP - 1,
+ mantissa < 2.0,
+ if x is not a denormalized number then mantissa >= 1.0.
+ Store exp in *EXPPTR and return mantissa. */
+extern double printf_frexp (double x, int *expptr);
diff --git a/gnu/printf-frexpl.c b/gnu/printf-frexpl.c
new file mode 100755
index 00000000..36bac749
--- /dev/null
+++ b/gnu/printf-frexpl.c
@@ -0,0 +1,18 @@
+/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#define USE_LONG_DOUBLE
+#include "printf-frexp.c"
diff --git a/gnu/printf-frexpl.h b/gnu/printf-frexpl.h
new file mode 100755
index 00000000..1b5f7f77
--- /dev/null
+++ b/gnu/printf-frexpl.h
@@ -0,0 +1,23 @@
+/* Split a 'long double' into fraction and mantissa, for hexadecimal printf.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Write a finite, positive number x as
+ x = mantissa * 2^exp
+ where exp >= LDBL_MIN_EXP - 1,
+ mantissa < 2.0,
+ if x is not a denormalized number then mantissa >= 1.0.
+ Store exp in *EXPPTR and return mantissa. */
+extern long double printf_frexpl (long double x, int *expptr);
diff --git a/gnu/printf-parse.c b/gnu/printf-parse.c
new file mode 100755
index 00000000..f612beb5
--- /dev/null
+++ b/gnu/printf-parse.c
@@ -0,0 +1,627 @@
+/* Formatted output to strings.
+ Copyright (C) 1999-2000, 2002-2003, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ CHAR_T The element type of the format string.
+ CHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
+ in the format string are ASCII.
+ DIRECTIVE Structure denoting a format directive.
+ Depends on CHAR_T.
+ DIRECTIVES Structure denoting the set of format directives of a
+ format string. Depends on CHAR_T.
+ PRINTF_PARSE Function that parses a format string.
+ Depends on CHAR_T.
+ STATIC Set to 'static' to declare the function static.
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions. */
+
+#ifndef PRINTF_PARSE
+# include <config.h>
+#endif
+
+/* Specification. */
+#ifndef PRINTF_PARSE
+# include "printf-parse.h"
+#endif
+
+/* Default parameters. */
+#ifndef PRINTF_PARSE
+# define PRINTF_PARSE printf_parse
+# define CHAR_T char
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+#endif
+
+/* Get size_t, NULL. */
+#include <stddef.h>
+
+/* Get intmax_t. */
+#if defined IN_LIBINTL || defined IN_LIBASPRINTF
+# if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+# endif
+# if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+# endif
+#else
+# include <stdint.h>
+#endif
+
+/* malloc(), realloc(), free(). */
+#include <stdlib.h>
+
+/* errno. */
+#include <errno.h>
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+#if CHAR_T_ONLY_ASCII
+/* c_isascii(). */
+# include "c-ctype.h"
+#endif
+
+#ifdef STATIC
+STATIC
+#endif
+int
+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
+{
+ const CHAR_T *cp = format; /* pointer into format */
+ size_t arg_posn = 0; /* number of regular arguments consumed */
+ size_t d_allocated; /* allocated elements of d->dir */
+ size_t a_allocated; /* allocated elements of a->arg */
+ size_t max_width_length = 0;
+ size_t max_precision_length = 0;
+
+ d->count = 0;
+ d_allocated = 1;
+ d->dir = (DIRECTIVE *) malloc (d_allocated * sizeof (DIRECTIVE));
+ if (d->dir == NULL)
+ /* Out of memory. */
+ goto out_of_memory_1;
+
+ a->count = 0;
+ a_allocated = 0;
+ a->arg = NULL;
+
+#define REGISTER_ARG(_index_,_type_) \
+ { \
+ size_t n = (_index_); \
+ if (n >= a_allocated) \
+ { \
+ size_t memory_size; \
+ argument *memory; \
+ \
+ a_allocated = xtimes (a_allocated, 2); \
+ if (a_allocated <= n) \
+ a_allocated = xsum (n, 1); \
+ memory_size = xtimes (a_allocated, sizeof (argument)); \
+ if (size_overflow_p (memory_size)) \
+ /* Overflow, would lead to out of memory. */ \
+ goto out_of_memory; \
+ memory = (argument *) (a->arg \
+ ? realloc (a->arg, memory_size) \
+ : malloc (memory_size)); \
+ if (memory == NULL) \
+ /* Out of memory. */ \
+ goto out_of_memory; \
+ a->arg = memory; \
+ } \
+ while (a->count <= n) \
+ a->arg[a->count++].type = TYPE_NONE; \
+ if (a->arg[n].type == TYPE_NONE) \
+ a->arg[n].type = (_type_); \
+ else if (a->arg[n].type != (_type_)) \
+ /* Ambiguous type for positional argument. */ \
+ goto error; \
+ }
+
+ while (*cp != '\0')
+ {
+ CHAR_T c = *cp++;
+ if (c == '%')
+ {
+ size_t arg_index = ARG_NONE;
+ DIRECTIVE *dp = &d->dir[d->count]; /* pointer to next directive */
+
+ /* Initialize the next directive. */
+ dp->dir_start = cp - 1;
+ dp->flags = 0;
+ dp->width_start = NULL;
+ dp->width_end = NULL;
+ dp->width_arg_index = ARG_NONE;
+ dp->precision_start = NULL;
+ dp->precision_end = NULL;
+ dp->precision_arg_index = ARG_NONE;
+ dp->arg_index = ARG_NONE;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory later. */
+ goto error;
+ arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+
+ /* Read the flags. */
+ for (;;)
+ {
+ if (*cp == '\'')
+ {
+ dp->flags |= FLAG_GROUP;
+ cp++;
+ }
+ else if (*cp == '-')
+ {
+ dp->flags |= FLAG_LEFT;
+ cp++;
+ }
+ else if (*cp == '+')
+ {
+ dp->flags |= FLAG_SHOWSIGN;
+ cp++;
+ }
+ else if (*cp == ' ')
+ {
+ dp->flags |= FLAG_SPACE;
+ cp++;
+ }
+ else if (*cp == '#')
+ {
+ dp->flags |= FLAG_ALT;
+ cp++;
+ }
+ else if (*cp == '0')
+ {
+ dp->flags |= FLAG_ZERO;
+ cp++;
+ }
+ else
+ break;
+ }
+
+ /* Parse the field width. */
+ if (*cp == '*')
+ {
+ dp->width_start = cp;
+ cp++;
+ dp->width_end = cp;
+ if (max_width_length < 1)
+ max_width_length = 1;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory later. */
+ goto error;
+ dp->width_arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+ if (dp->width_arg_index == ARG_NONE)
+ {
+ dp->width_arg_index = arg_posn++;
+ if (dp->width_arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
+ }
+ else if (*cp >= '0' && *cp <= '9')
+ {
+ size_t width_length;
+
+ dp->width_start = cp;
+ for (; *cp >= '0' && *cp <= '9'; cp++)
+ ;
+ dp->width_end = cp;
+ width_length = dp->width_end - dp->width_start;
+ if (max_width_length < width_length)
+ max_width_length = width_length;
+ }
+
+ /* Parse the precision. */
+ if (*cp == '.')
+ {
+ cp++;
+ if (*cp == '*')
+ {
+ dp->precision_start = cp - 1;
+ cp++;
+ dp->precision_end = cp;
+ if (max_precision_length < 2)
+ max_precision_length = 2;
+
+ /* Test for positional argument. */
+ if (*cp >= '0' && *cp <= '9')
+ {
+ const CHAR_T *np;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ ;
+ if (*np == '$')
+ {
+ size_t n = 0;
+
+ for (np = cp; *np >= '0' && *np <= '9'; np++)
+ n = xsum (xtimes (n, 10), *np - '0');
+ if (n == 0)
+ /* Positional argument 0. */
+ goto error;
+ if (size_overflow_p (n))
+ /* n too large, would lead to out of memory
+ later. */
+ goto error;
+ dp->precision_arg_index = n - 1;
+ cp = np + 1;
+ }
+ }
+ if (dp->precision_arg_index == ARG_NONE)
+ {
+ dp->precision_arg_index = arg_posn++;
+ if (dp->precision_arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
+ }
+ else
+ {
+ size_t precision_length;
+
+ dp->precision_start = cp - 1;
+ for (; *cp >= '0' && *cp <= '9'; cp++)
+ ;
+ dp->precision_end = cp;
+ precision_length = dp->precision_end - dp->precision_start;
+ if (max_precision_length < precision_length)
+ max_precision_length = precision_length;
+ }
+ }
+
+ {
+ arg_type type;
+
+ /* Parse argument type/size specifiers. */
+ {
+ int flags = 0;
+
+ for (;;)
+ {
+ if (*cp == 'h')
+ {
+ flags |= (1 << (flags & 1));
+ cp++;
+ }
+ else if (*cp == 'L')
+ {
+ flags |= 4;
+ cp++;
+ }
+ else if (*cp == 'l')
+ {
+ flags += 8;
+ cp++;
+ }
+ else if (*cp == 'j')
+ {
+ if (sizeof (intmax_t) > sizeof (long))
+ {
+ /* intmax_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (intmax_t) > sizeof (int))
+ {
+ /* intmax_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+ else if (*cp == 'z' || *cp == 'Z')
+ {
+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
+ because the warning facility in gcc-2.95.2 understands
+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
+ if (sizeof (size_t) > sizeof (long))
+ {
+ /* size_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (size_t) > sizeof (int))
+ {
+ /* size_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+ else if (*cp == 't')
+ {
+ if (sizeof (ptrdiff_t) > sizeof (long))
+ {
+ /* ptrdiff_t = long long */
+ flags += 16;
+ }
+ else if (sizeof (ptrdiff_t) > sizeof (int))
+ {
+ /* ptrdiff_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+#if defined __APPLE__ && defined __MACH__
+ /* On MacOS X 10.3, PRIdMAX is defined as "qd".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'q')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* int64_t = long long */
+ flags += 16;
+ }
+ else
+ {
+ /* int64_t = long */
+ flags += 8;
+ }
+ cp++;
+ }
+#endif
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On native Win32, PRIdMAX is defined as "I64d".
+ We cannot change it to "lld" because PRIdMAX must also
+ be understood by the system's printf routines. */
+ else if (*cp == 'I' && cp[1] == '6' && cp[2] == '4')
+ {
+ if (64 / 8 > sizeof (long))
+ {
+ /* __int64 = long long */
+ flags += 16;
+ }
+ else
+ {
+ /* __int64 = long */
+ flags += 8;
+ }
+ cp += 3;
+ }
+#endif
+ else
+ break;
+ }
+
+ /* Read the conversion character. */
+ c = *cp++;
+ switch (c)
+ {
+ case 'd': case 'i':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_LONGLONGINT;
+ else
+#endif
+ /* If 'long long' exists and is the same as 'long', we parse
+ "lld" into TYPE_LONGINT. */
+ if (flags >= 8)
+ type = TYPE_LONGINT;
+ else if (flags & 2)
+ type = TYPE_SCHAR;
+ else if (flags & 1)
+ type = TYPE_SHORT;
+ else
+ type = TYPE_INT;
+ break;
+ case 'o': case 'u': case 'x': case 'X':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_ULONGLONGINT;
+ else
+#endif
+ /* If 'unsigned long long' exists and is the same as
+ 'unsigned long', we parse "llu" into TYPE_ULONGINT. */
+ if (flags >= 8)
+ type = TYPE_ULONGINT;
+ else if (flags & 2)
+ type = TYPE_UCHAR;
+ else if (flags & 1)
+ type = TYPE_USHORT;
+ else
+ type = TYPE_UINT;
+ break;
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_LONGDOUBLE;
+ else
+ type = TYPE_DOUBLE;
+ break;
+ case 'c':
+ if (flags >= 8)
+#if HAVE_WINT_T
+ type = TYPE_WIDE_CHAR;
+#else
+ goto error;
+#endif
+ else
+ type = TYPE_CHAR;
+ break;
+#if HAVE_WINT_T
+ case 'C':
+ type = TYPE_WIDE_CHAR;
+ c = 'c';
+ break;
+#endif
+ case 's':
+ if (flags >= 8)
+#if HAVE_WCHAR_T
+ type = TYPE_WIDE_STRING;
+#else
+ goto error;
+#endif
+ else
+ type = TYPE_STRING;
+ break;
+#if HAVE_WCHAR_T
+ case 'S':
+ type = TYPE_WIDE_STRING;
+ c = 's';
+ break;
+#endif
+ case 'p':
+ type = TYPE_POINTER;
+ break;
+ case 'n':
+#if HAVE_LONG_LONG_INT
+ /* If 'long long' exists and is larger than 'long': */
+ if (flags >= 16 || (flags & 4))
+ type = TYPE_COUNT_LONGLONGINT_POINTER;
+ else
+#endif
+ /* If 'long long' exists and is the same as 'long', we parse
+ "lln" into TYPE_COUNT_LONGINT_POINTER. */
+ if (flags >= 8)
+ type = TYPE_COUNT_LONGINT_POINTER;
+ else if (flags & 2)
+ type = TYPE_COUNT_SCHAR_POINTER;
+ else if (flags & 1)
+ type = TYPE_COUNT_SHORT_POINTER;
+ else
+ type = TYPE_COUNT_INT_POINTER;
+ break;
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ case 'U':
+ if (flags >= 16)
+ type = TYPE_U32_STRING;
+ else if (flags >= 8)
+ type = TYPE_U16_STRING;
+ else
+ type = TYPE_U8_STRING;
+ break;
+#endif
+ case '%':
+ type = TYPE_NONE;
+ break;
+ default:
+ /* Unknown conversion character. */
+ goto error;
+ }
+ }
+
+ if (type != TYPE_NONE)
+ {
+ dp->arg_index = arg_index;
+ if (dp->arg_index == ARG_NONE)
+ {
+ dp->arg_index = arg_posn++;
+ if (dp->arg_index == ARG_NONE)
+ /* arg_posn wrapped around. */
+ goto error;
+ }
+ REGISTER_ARG (dp->arg_index, type);
+ }
+ dp->conversion = c;
+ dp->dir_end = cp;
+ }
+
+ d->count++;
+ if (d->count >= d_allocated)
+ {
+ size_t memory_size;
+ DIRECTIVE *memory;
+
+ d_allocated = xtimes (d_allocated, 2);
+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
+ if (size_overflow_p (memory_size))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ memory = (DIRECTIVE *) realloc (d->dir, memory_size);
+ if (memory == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ d->dir = memory;
+ }
+ }
+#if CHAR_T_ONLY_ASCII
+ else if (!c_isascii (c))
+ {
+ /* Non-ASCII character. Not supported. */
+ goto error;
+ }
+#endif
+ }
+ d->dir[d->count].dir_start = cp;
+
+ d->max_width_length = max_width_length;
+ d->max_precision_length = max_precision_length;
+ return 0;
+
+error:
+ if (a->arg)
+ free (a->arg);
+ if (d->dir)
+ free (d->dir);
+ errno = EINVAL;
+ return -1;
+
+out_of_memory:
+ if (a->arg)
+ free (a->arg);
+ if (d->dir)
+ free (d->dir);
+out_of_memory_1:
+ errno = ENOMEM;
+ return -1;
+}
+
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef CHAR_T_ONLY_ASCII
+#undef CHAR_T
diff --git a/gnu/printf-parse.h b/gnu/printf-parse.h
new file mode 100755
index 00000000..0f2b7082
--- /dev/null
+++ b/gnu/printf-parse.h
@@ -0,0 +1,180 @@
+/* Parse printf format string.
+ Copyright (C) 1999, 2002-2003, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _PRINTF_PARSE_H
+#define _PRINTF_PARSE_H
+
+/* This file can be parametrized with the following macros:
+ ENABLE_UNISTDIO Set to 1 to enable the unistdio extensions.
+ STATIC Set to 'static' to declare the function static. */
+
+#include "printf-args.h"
+
+
+/* Flags */
+#define FLAG_GROUP 1 /* ' flag */
+#define FLAG_LEFT 2 /* - flag */
+#define FLAG_SHOWSIGN 4 /* + flag */
+#define FLAG_SPACE 8 /* space flag */
+#define FLAG_ALT 16 /* # flag */
+#define FLAG_ZERO 32
+
+/* arg_index value indicating that no argument is consumed. */
+#define ARG_NONE (~(size_t)0)
+
+/* xxx_directive: A parsed directive.
+ xxx_directives: A parsed format string. */
+
+/* A parsed directive. */
+typedef struct
+{
+ const char* dir_start;
+ const char* dir_end;
+ int flags;
+ const char* width_start;
+ const char* width_end;
+ size_t width_arg_index;
+ const char* precision_start;
+ const char* precision_end;
+ size_t precision_arg_index;
+ char conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+char_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ char_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+char_directives;
+
+#if ENABLE_UNISTDIO
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint8_t* dir_start;
+ const uint8_t* dir_end;
+ int flags;
+ const uint8_t* width_start;
+ const uint8_t* width_end;
+ size_t width_arg_index;
+ const uint8_t* precision_start;
+ const uint8_t* precision_end;
+ size_t precision_arg_index;
+ uint8_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u8_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u8_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u8_directives;
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint16_t* dir_start;
+ const uint16_t* dir_end;
+ int flags;
+ const uint16_t* width_start;
+ const uint16_t* width_end;
+ size_t width_arg_index;
+ const uint16_t* precision_start;
+ const uint16_t* precision_end;
+ size_t precision_arg_index;
+ uint16_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u16_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u16_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u16_directives;
+
+/* A parsed directive. */
+typedef struct
+{
+ const uint32_t* dir_start;
+ const uint32_t* dir_end;
+ int flags;
+ const uint32_t* width_start;
+ const uint32_t* width_end;
+ size_t width_arg_index;
+ const uint32_t* precision_start;
+ const uint32_t* precision_end;
+ size_t precision_arg_index;
+ uint32_t conversion; /* d i o u x X f F e E g G a A c s p n U % but not C S */
+ size_t arg_index;
+}
+u32_directive;
+
+/* A parsed format string. */
+typedef struct
+{
+ size_t count;
+ u32_directive *dir;
+ size_t max_width_length;
+ size_t max_precision_length;
+}
+u32_directives;
+
+#endif
+
+
+/* Parses the format string. Fills in the number N of directives, and fills
+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
+ to the end of the format string. Also fills in the arg_type fields of the
+ arguments and the needed count of arguments. */
+#if ENABLE_UNISTDIO
+extern int
+ ulc_printf_parse (const char *format, char_directives *d, arguments *a);
+extern int
+ u8_printf_parse (const uint8_t *format, u8_directives *d, arguments *a);
+extern int
+ u16_printf_parse (const uint16_t *format, u16_directives *d,
+ arguments *a);
+extern int
+ u32_printf_parse (const uint32_t *format, u32_directives *d,
+ arguments *a);
+#else
+# ifdef STATIC
+STATIC
+# else
+extern
+# endif
+int printf_parse (const char *format, char_directives *d, arguments *a);
+#endif
+
+#endif /* _PRINTF_PARSE_H */
diff --git a/gnu/progname.c b/gnu/progname.c
new file mode 100755
index 00000000..1415e6a5
--- /dev/null
+++ b/gnu/progname.c
@@ -0,0 +1,92 @@
+/* Program name management.
+ 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#undef ENABLE_RELOCATABLE /* avoid defining set_program_name as a macro */
+#include "progname.h"
+
+#include <errno.h> /* get program_invocation_name declaration */
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+
+/* String containing name the program is called with.
+ To be initialized by main(). */
+const char *program_name = NULL;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+void
+set_program_name (const char *argv0)
+{
+ /* libtool creates a temporary executable whose name is sometimes prefixed
+ with "lt-" (depends on the platform). It also makes argv[0] absolute.
+ But the name of the temporary executable is a detail that should not be
+ visible to the end user and to the test suite.
+ Remove this "<dirname>/.libs/" or "<dirname>/.libs/lt-" prefix here. */
+ const char *slash;
+ const char *base;
+
+ /* Sanity check. POSIX requires the invoking process to pass a non-NULL
+ argv[0]. */
+ if (argv0 == NULL)
+ {
+ /* It's a bug in the invoking program. Help diagnosing it. */
+ fputs ("A NULL argv[0] was passed through an exec system call.\n",
+ stderr);
+ abort ();
+ }
+
+ slash = strrchr (argv0, '/');
+ base = (slash != NULL ? slash + 1 : argv0);
+ if (base - argv0 >= 7 && strncmp (base - 7, "/.libs/", 7) == 0)
+ {
+ argv0 = base;
+ if (strncmp (base, "lt-", 3) == 0)
+ {
+ argv0 = base + 3;
+ /* On glibc systems, remove the "lt-" prefix from the variable
+ program_invocation_short_name. */
+#if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
+ program_invocation_short_name = (char *) argv0;
+#endif
+ }
+ }
+
+ /* But don't strip off a leading <dirname>/ in general, because when the user
+ runs
+ /some/hidden/place/bin/cp foo foo
+ he should get the error message
+ /some/hidden/place/bin/cp: `foo' and `foo' are the same file
+ not
+ cp: `foo' and `foo' are the same file
+ */
+
+ program_name = argv0;
+
+ /* On glibc systems, the error() function comes from libc and uses the
+ variable program_invocation_name, not program_name. So set this variable
+ as well. */
+#if HAVE_DECL_PROGRAM_INVOCATION_NAME
+ program_invocation_name = (char *) argv0;
+#endif
+}
diff --git a/gnu/progname.h b/gnu/progname.h
new file mode 100755
index 00000000..5ba303bd
--- /dev/null
+++ b/gnu/progname.h
@@ -0,0 +1,62 @@
+/* Program name management.
+ Copyright (C) 2001-2004, 2006, 2009-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _PROGNAME_H
+#define _PROGNAME_H
+
+/* Programs using this file should do the following in main():
+ set_program_name (argv[0]);
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* String containing name the program is called with. */
+extern const char *program_name;
+
+/* Set program_name, based on argv[0].
+ argv0 must be a string allocated with indefinite extent, and must not be
+ modified after this call. */
+extern void set_program_name (const char *argv0);
+
+#if ENABLE_RELOCATABLE
+
+/* Set program_name, based on argv[0], and original installation prefix and
+ directory, for relocatability. */
+extern void set_program_name_and_installdir (const char *argv0,
+ const char *orig_installprefix,
+ const char *orig_installdir);
+#undef set_program_name
+#define set_program_name(ARG0) \
+ set_program_name_and_installdir (ARG0, INSTALLPREFIX, INSTALLDIR)
+
+/* Return the full pathname of the current executable, based on the earlier
+ call to set_program_name_and_installdir. Return NULL if unknown. */
+extern char *get_full_program_name (void);
+
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PROGNAME_H */
diff --git a/gnu/propername.c b/gnu/propername.c
new file mode 100755
index 00000000..3971f3f7
--- /dev/null
+++ b/gnu/propername.c
@@ -0,0 +1,311 @@
+/* Localization of proper names.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "propername.h"
+
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#if HAVE_ICONV
+# include <iconv.h>
+#endif
+
+#include "trim.h"
+#include "mbchar.h"
+#include "mbuiter.h"
+#include "localcharset.h"
+#include "c-strcase.h"
+#include "xstriconv.h"
+#include "xalloc.h"
+#include "gettext.h"
+
+
+/* Tests whether STRING contains trim (SUB), starting and ending at word
+ boundaries.
+ Here, instead of implementing Unicode Standard Annex #29 for determining
+ word boundaries, we assume that trim (SUB) starts and ends with words and
+ only test whether the part before it ends with a non-word and the part
+ after it starts with a non-word. */
+static bool
+mbsstr_trimmed_wordbounded (const char *string, const char *sub)
+{
+ char *tsub = trim (sub);
+ bool found = false;
+
+ for (; *string != '\0';)
+ {
+ const char *tsub_in_string = mbsstr (string, tsub);
+ if (tsub_in_string == NULL)
+ break;
+ else
+ {
+ if (MB_CUR_MAX > 1)
+ {
+ mbui_iterator_t string_iter;
+ bool word_boundary_before;
+ bool word_boundary_after;
+
+ mbui_init (string_iter, string);
+ word_boundary_before = true;
+ if (mbui_cur_ptr (string_iter) < tsub_in_string)
+ {
+ mbchar_t last_char_before_tsub;
+ do
+ {
+ if (!mbui_avail (string_iter))
+ abort ();
+ last_char_before_tsub = mbui_cur (string_iter);
+ mbui_advance (string_iter);
+ }
+ while (mbui_cur_ptr (string_iter) < tsub_in_string);
+ if (mb_isalnum (last_char_before_tsub))
+ word_boundary_before = false;
+ }
+
+ mbui_init (string_iter, tsub_in_string);
+ {
+ mbui_iterator_t tsub_iter;
+
+ for (mbui_init (tsub_iter, tsub);
+ mbui_avail (tsub_iter);
+ mbui_advance (tsub_iter))
+ {
+ if (!mbui_avail (string_iter))
+ abort ();
+ mbui_advance (string_iter);
+ }
+ }
+ word_boundary_after = true;
+ if (mbui_avail (string_iter))
+ {
+ mbchar_t first_char_after_tsub = mbui_cur (string_iter);
+ if (mb_isalnum (first_char_after_tsub))
+ word_boundary_after = false;
+ }
+
+ if (word_boundary_before && word_boundary_after)
+ {
+ found = true;
+ break;
+ }
+
+ mbui_init (string_iter, tsub_in_string);
+ if (!mbui_avail (string_iter))
+ break;
+ string = tsub_in_string + mb_len (mbui_cur (string_iter));
+ }
+ else
+ {
+ bool word_boundary_before;
+ const char *p;
+ bool word_boundary_after;
+
+ word_boundary_before = true;
+ if (string < tsub_in_string)
+ if (isalnum ((unsigned char) tsub_in_string[-1]))
+ word_boundary_before = false;
+
+ p = tsub_in_string + strlen (tsub);
+ word_boundary_after = true;
+ if (*p != '\0')
+ if (isalnum ((unsigned char) *p))
+ word_boundary_after = false;
+
+ if (word_boundary_before && word_boundary_after)
+ {
+ found = true;
+ break;
+ }
+
+ if (*tsub_in_string == '\0')
+ break;
+ string = tsub_in_string + 1;
+ }
+ }
+ }
+ free (tsub);
+ return found;
+}
+
+/* Return the localization of NAME. NAME is written in ASCII. */
+
+const char *
+proper_name (const char *name)
+{
+ /* See whether there is a translation. */
+ const char *translation = gettext (name);
+
+ if (translation != name)
+ {
+ /* See whether the translation contains the original name. */
+ if (mbsstr_trimmed_wordbounded (translation, name))
+ return translation;
+ else
+ {
+ /* Return "TRANSLATION (NAME)". */
+ char *result =
+ XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+
+ sprintf (result, "%s (%s)", translation, name);
+ return result;
+ }
+ }
+ else
+ return name;
+}
+
+/* Return the localization of a name whose original writing is not ASCII.
+ NAME_UTF8 is the real name, written in UTF-8 with octal or hexadecimal
+ escape sequences. NAME_ASCII is a fallback written only with ASCII
+ characters. */
+
+const char *
+proper_name_utf8 (const char *name_ascii, const char *name_utf8)
+{
+ /* See whether there is a translation. */
+ const char *translation = gettext (name_ascii);
+
+ /* Try to convert NAME_UTF8 to the locale encoding. */
+ const char *locale_code = locale_charset ();
+ char *alloc_name_converted = NULL;
+ char *alloc_name_converted_translit = NULL;
+ const char *name_converted = NULL;
+ const char *name_converted_translit = NULL;
+ const char *name;
+
+ if (c_strcasecmp (locale_code, "UTF-8") != 0)
+ {
+#if HAVE_ICONV
+ name_converted = alloc_name_converted =
+ xstr_iconv (name_utf8, "UTF-8", locale_code);
+
+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
+ || _LIBICONV_VERSION >= 0x0105
+ {
+ char *converted_translit;
+
+ size_t len = strlen (locale_code);
+ char *locale_code_translit = XNMALLOC (len + 10 + 1, char);
+ memcpy (locale_code_translit, locale_code, len);
+ memcpy (locale_code_translit + len, "//TRANSLIT", 10 + 1);
+
+ converted_translit =
+ xstr_iconv (name_utf8, "UTF-8", locale_code_translit);
+
+ free (locale_code_translit);
+
+ if (converted_translit != NULL)
+ {
+# if !_LIBICONV_VERSION
+ /* Don't use the transliteration if it added question marks.
+ glibc's transliteration falls back to question marks; libiconv's
+ transliteration does not.
+ mbschr is equivalent to strchr in this case. */
+ if (strchr (converted_translit, '?') != NULL)
+ free (converted_translit);
+ else
+# endif
+ name_converted_translit = alloc_name_converted_translit =
+ converted_translit;
+ }
+ }
+# endif
+#endif
+ }
+ else
+ {
+ name_converted = name_utf8;
+ name_converted_translit = name_utf8;
+ }
+
+ /* The name in locale encoding. */
+ name = (name_converted != NULL ? name_converted :
+ name_converted_translit != NULL ? name_converted_translit :
+ name_ascii);
+
+ /* See whether we have a translation. Some translators have not understood
+ that they should use the UTF-8 form of the name, if possible. So if the
+ translator provided a no-op translation, we ignore it. */
+ if (strcmp (translation, name_ascii) != 0)
+ {
+ /* See whether the translation contains the original name. */
+ if (mbsstr_trimmed_wordbounded (translation, name_ascii)
+ || (name_converted != NULL
+ && mbsstr_trimmed_wordbounded (translation, name_converted))
+ || (name_converted_translit != NULL
+ && mbsstr_trimmed_wordbounded (translation, name_converted_translit)))
+ {
+ if (alloc_name_converted != NULL)
+ free (alloc_name_converted);
+ if (alloc_name_converted_translit != NULL)
+ free (alloc_name_converted_translit);
+ return translation;
+ }
+ else
+ {
+ /* Return "TRANSLATION (NAME)". */
+ char *result =
+ XNMALLOC (strlen (translation) + 2 + strlen (name) + 1 + 1, char);
+
+ sprintf (result, "%s (%s)", translation, name);
+
+ if (alloc_name_converted != NULL)
+ free (alloc_name_converted);
+ if (alloc_name_converted_translit != NULL)
+ free (alloc_name_converted_translit);
+ return result;
+ }
+ }
+ else
+ {
+ if (alloc_name_converted != NULL && alloc_name_converted != name)
+ free (alloc_name_converted);
+ if (alloc_name_converted_translit != NULL
+ && alloc_name_converted_translit != name)
+ free (alloc_name_converted_translit);
+ return name;
+ }
+}
+
+#ifdef TEST1
+# include <locale.h>
+int
+main (int argc, char *argv[])
+{
+ setlocale (LC_ALL, "");
+ if (mbsstr_trimmed_wordbounded (argv[1], argv[2]))
+ printf("found\n");
+ return 0;
+}
+#endif
+
+#ifdef TEST2
+# include <locale.h>
+# include <stdio.h>
+int
+main (int argc, char *argv[])
+{
+ setlocale (LC_ALL, "");
+ printf ("%s\n", proper_name_utf8 ("Franc,ois Pinard", "Fran\303\247ois Pinard"));
+ return 0;
+}
+#endif
diff --git a/gnu/propername.h b/gnu/propername.h
new file mode 100755
index 00000000..eba56f69
--- /dev/null
+++ b/gnu/propername.h
@@ -0,0 +1,106 @@
+/* Localization of proper names.
+ Copyright (C) 2006, 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* INTRODUCTION
+
+ What do
+
+ Torbjörn Granlund (coreutils)
+ François Pinard (coreutils)
+ Danilo Šegan (gettext)
+
+ have in common?
+
+ A non-ASCII name. This causes trouble in the --version output. The simple
+ "solution", unfortunately mutilates the name.
+
+ $ du --version| grep Granlund
+ Écrit par Torbjorn Granlund, David MacKenzie, Paul Eggert et Jim Meyering.
+
+ $ ptx --version| grep Pinard
+ Écrit par F. Pinard.
+
+ What is desirable, is to print the full name if the output character set
+ allows it, and the ASCIIfied name only as a fallback.
+
+ $ recode-sr-latin --version
+ ...
+ Written by Danilo Šegan and Bruno Haible.
+
+ $ LC_ALL=C recode-sr-latin --version
+ ...
+ Written by Danilo Segan and Bruno Haible.
+
+ The 'propername' module does exactly this. Plus, for languages that use
+ a different writing system than the Latin alphabet, it allows a translator
+ to write the name using that different writing system. In that case the
+ output will look like this:
+ <translated name> (<original name in English>)
+
+ To use the 'propername' module is done in three simple steps:
+
+ 1) Add it to the list of gnulib modules to import,
+
+ 2) Change the arguments of version_etc, from
+
+ from "Paul Eggert"
+ to proper_name ("Paul Eggert")
+
+ from "Torbjorn Granlund"
+ to proper_name_utf8 ("Torbjorn Granlund", "Torbj\303\266rn Granlund")
+
+ from "F. Pinard"
+ to proper_name_utf8 ("Franc,ois Pinard", "Fran\303\247ois Pinard")
+
+ (Optionally, here you can also add / * TRANSLATORS: ... * / comments
+ explaining how the name is written or pronounced.)
+
+ 3) If you are using GNU gettext version 0.16.1 or older, in po/Makevars,
+ in the definition of the XGETTEXT_OPTIONS variable, add:
+
+ --keyword='proper_name:1,"This is a proper name. See the gettext manual, section Names."'
+ --keyword='proper_name_utf8:1,"This is a proper name. See the gettext manual, section Names."'
+
+ This specifies automatic comments for the translator. (Requires
+ xgettext >= 0.15. The double-quotes inside the quoted string are on
+ purpose: they are part of the --keyword argument syntax.)
+ */
+
+#ifndef _PROPERNAME_H
+#define _PROPERNAME_H
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Return the localization of NAME. NAME is written in ASCII. */
+extern const char * proper_name (const char *name);
+
+/* Return the localization of a name whose original writing is not ASCII.
+ NAME_UTF8 is the real name, written in UTF-8 with octal or hexadecimal
+ escape sequences. NAME_ASCII is a fallback written only with ASCII
+ characters. */
+extern const char * proper_name_utf8 (const char *name_ascii,
+ const char *name_utf8);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _PROPERNAME_H */
diff --git a/gnu/quote.c b/gnu/quote.c
new file mode 100755
index 00000000..1f64f44c
--- /dev/null
+++ b/gnu/quote.c
@@ -0,0 +1,40 @@
+/* quote.c - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+#include "quote.h"
+
+/* Return an unambiguous printable representation of NAME,
+ allocated in slot N, suitable for diagnostics. */
+char const *
+quote_n (int n, char const *name)
+{
+ return quotearg_n_style (n, locale_quoting_style, name);
+}
+
+/* Return an unambiguous printable representation of NAME,
+ suitable for diagnostics. */
+char const *
+quote (char const *name)
+{
+ return quote_n (0, name);
+}
diff --git a/gnu/quote.h b/gnu/quote.h
new file mode 100755
index 00000000..a986956a
--- /dev/null
+++ b/gnu/quote.h
@@ -0,0 +1,21 @@
+/* quote.h - prototypes for quote.c
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+char const *quote_n (int n, char const *name);
+char const *quote (char const *name);
diff --git a/gnu/quotearg.c b/gnu/quotearg.c
new file mode 100755
index 00000000..5418f512
--- /dev/null
+++ b/gnu/quotearg.c
@@ -0,0 +1,889 @@
+/* quotearg.c - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2005, 2006, 2007, 2008,
+ 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include "xalloc.h"
+
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+#include <wctype.h>
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+#define N_(msgid) msgid
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#define INT_BITS (sizeof (int) * CHAR_BIT)
+
+struct quoting_options
+{
+ /* Basic quoting style. */
+ enum quoting_style style;
+
+ /* Additional flags. Bitwise combination of enum quoting_flags. */
+ int flags;
+
+ /* Quote the characters indicated by this bit vector even if the
+ quoting style would not normally require them to be quoted. */
+ unsigned int quote_these_too[(UCHAR_MAX / INT_BITS) + 1];
+
+ /* The left quote for custom_quoting_style. */
+ char const *left_quote;
+
+ /* The right quote for custom_quoting_style. */
+ char const *right_quote;
+};
+
+/* Names of quoting styles. */
+char const *const quoting_style_args[] =
+{
+ "literal",
+ "shell",
+ "shell-always",
+ "c",
+ "c-maybe",
+ "escape",
+ "locale",
+ "clocale",
+ 0
+};
+
+/* Correspondences to quoting style names. */
+enum quoting_style const quoting_style_vals[] =
+{
+ literal_quoting_style,
+ shell_quoting_style,
+ shell_always_quoting_style,
+ c_quoting_style,
+ c_maybe_quoting_style,
+ escape_quoting_style,
+ locale_quoting_style,
+ clocale_quoting_style
+};
+
+/* The default quoting options. */
+static struct quoting_options default_quoting_options;
+
+/* Allocate a new set of quoting options, with contents initially identical
+ to O if O is not null, or to the default if O is null.
+ It is the caller's responsibility to free the result. */
+struct quoting_options *
+clone_quoting_options (struct quoting_options *o)
+{
+ int e = errno;
+ struct quoting_options *p = xmemdup (o ? o : &default_quoting_options,
+ sizeof *o);
+ errno = e;
+ return p;
+}
+
+/* Get the value of O's quoting style. If O is null, use the default. */
+enum quoting_style
+get_quoting_style (struct quoting_options *o)
+{
+ return (o ? o : &default_quoting_options)->style;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting style to S. */
+void
+set_quoting_style (struct quoting_options *o, enum quoting_style s)
+{
+ (o ? o : &default_quoting_options)->style = s;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options for character C to I.
+ Return the old value. Currently, the only values defined for I are
+ 0 (the default) and 1 (which means to quote the character even if
+ it would not otherwise be quoted). */
+int
+set_char_quoting (struct quoting_options *o, char c, int i)
+{
+ unsigned char uc = c;
+ unsigned int *p =
+ (o ? o : &default_quoting_options)->quote_these_too + uc / INT_BITS;
+ int shift = uc % INT_BITS;
+ int r = (*p >> shift) & 1;
+ *p ^= ((i & 1) ^ r) << shift;
+ return r;
+}
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options flag to I, which can be a
+ bitwise combination of enum quoting_flags, or 0 for default
+ behavior. Return the old value. */
+int
+set_quoting_flags (struct quoting_options *o, int i)
+{
+ int r;
+ if (!o)
+ o = &default_quoting_options;
+ r = o->flags;
+ o->flags = i;
+ return r;
+}
+
+void
+set_custom_quoting (struct quoting_options *o,
+ char const *left_quote, char const *right_quote)
+{
+ if (!o)
+ o = &default_quoting_options;
+ o->style = custom_quoting_style;
+ if (!left_quote || !right_quote)
+ abort ();
+ o->left_quote = left_quote;
+ o->right_quote = right_quote;
+}
+
+/* Return quoting options for STYLE, with no extra quoting. */
+static struct quoting_options
+quoting_options_from_style (enum quoting_style style)
+{
+ struct quoting_options o;
+ o.style = style;
+ o.flags = 0;
+ memset (o.quote_these_too, 0, sizeof o.quote_these_too);
+ return o;
+}
+
+/* MSGID approximates a quotation mark. Return its translation if it
+ has one; otherwise, return either it or "\"", depending on S. */
+static char const *
+gettext_quote (char const *msgid, enum quoting_style s)
+{
+ char const *translation = _(msgid);
+ if (translation == msgid && s == clocale_quoting_style)
+ translation = "\"";
+ return translation;
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using QUOTING_STYLE, FLAGS, and
+ QUOTE_THESE_TOO to control quoting.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is SIZE_MAX, use the string length of the argument for ARGSIZE.
+
+ This function acts like quotearg_buffer (BUFFER, BUFFERSIZE, ARG,
+ ARGSIZE, O), except it breaks O into its component pieces and is
+ not careful about errno. */
+
+static size_t
+quotearg_buffer_restyled (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ enum quoting_style quoting_style, int flags,
+ unsigned int const *quote_these_too,
+ char const *left_quote,
+ char const *right_quote)
+{
+ size_t i;
+ size_t len = 0;
+ char const *quote_string = 0;
+ size_t quote_string_len = 0;
+ bool backslash_escapes = false;
+ bool unibyte_locale = MB_CUR_MAX == 1;
+ bool elide_outer_quotes = (flags & QA_ELIDE_OUTER_QUOTES) != 0;
+
+#define STORE(c) \
+ do \
+ { \
+ if (len < buffersize) \
+ buffer[len] = (c); \
+ len++; \
+ } \
+ while (0)
+
+ switch (quoting_style)
+ {
+ case c_maybe_quoting_style:
+ quoting_style = c_quoting_style;
+ elide_outer_quotes = true;
+ /* Fall through. */
+ case c_quoting_style:
+ if (!elide_outer_quotes)
+ STORE ('"');
+ backslash_escapes = true;
+ quote_string = "\"";
+ quote_string_len = 1;
+ break;
+
+ case escape_quoting_style:
+ backslash_escapes = true;
+ elide_outer_quotes = false;
+ break;
+
+ case locale_quoting_style:
+ case clocale_quoting_style:
+ case custom_quoting_style:
+ {
+ if (quoting_style != custom_quoting_style)
+ {
+ /* TRANSLATORS:
+ Get translations for open and closing quotation marks.
+
+ The message catalog should translate "`" to a left
+ quotation mark suitable for the locale, and similarly for
+ "'". If the catalog has no translation,
+ locale_quoting_style quotes `like this', and
+ clocale_quoting_style quotes "like this".
+
+ For example, an American English Unicode locale should
+ translate "`" to U+201C (LEFT DOUBLE QUOTATION MARK), and
+ should translate "'" to U+201D (RIGHT DOUBLE QUOTATION
+ MARK). A British English Unicode locale should instead
+ translate these to U+2018 (LEFT SINGLE QUOTATION MARK)
+ and U+2019 (RIGHT SINGLE QUOTATION MARK), respectively.
+
+ If you don't know what to put here, please see
+ <http://en.wikipedia.org/wiki/Quotation_mark#Glyphs>
+ and use glyphs suitable for your language. */
+ left_quote = gettext_quote (N_("`"), quoting_style);
+ right_quote = gettext_quote (N_("'"), quoting_style);
+ }
+ if (!elide_outer_quotes)
+ for (quote_string = left_quote; *quote_string; quote_string++)
+ STORE (*quote_string);
+ backslash_escapes = true;
+ quote_string = right_quote;
+ quote_string_len = strlen (quote_string);
+ }
+ break;
+
+ case shell_quoting_style:
+ quoting_style = shell_always_quoting_style;
+ elide_outer_quotes = true;
+ /* Fall through. */
+ case shell_always_quoting_style:
+ if (!elide_outer_quotes)
+ STORE ('\'');
+ quote_string = "'";
+ quote_string_len = 1;
+ break;
+
+ case literal_quoting_style:
+ elide_outer_quotes = false;
+ break;
+
+ default:
+ abort ();
+ }
+
+ for (i = 0; ! (argsize == SIZE_MAX ? arg[i] == '\0' : i == argsize); i++)
+ {
+ unsigned char c;
+ unsigned char esc;
+ bool is_right_quote = false;
+
+ if (backslash_escapes
+ && quote_string_len
+ && i + quote_string_len <= argsize
+ && memcmp (arg + i, quote_string, quote_string_len) == 0)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ is_right_quote = true;
+ }
+
+ c = arg[i];
+ switch (c)
+ {
+ case '\0':
+ if (backslash_escapes)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+ /* If quote_string were to begin with digits, we'd need to
+ test for the end of the arg as well. However, it's
+ hard to imagine any locale that would use digits in
+ quotes, and set_custom_quoting is documented not to
+ accept them. */
+ if (i + 1 < argsize && '0' <= arg[i + 1] && arg[i + 1] <= '9')
+ {
+ STORE ('0');
+ STORE ('0');
+ }
+ c = '0';
+ /* We don't have to worry that this last '0' will be
+ backslash-escaped because, again, quote_string should
+ not start with it and because quote_these_too is
+ documented as not accepting it. */
+ }
+ else if (flags & QA_ELIDE_NULL_BYTES)
+ continue;
+ break;
+
+ case '?':
+ switch (quoting_style)
+ {
+ case shell_always_quoting_style:
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ break;
+
+ case c_quoting_style:
+ if ((flags & QA_SPLIT_TRIGRAPHS)
+ && i + 2 < argsize && arg[i + 1] == '?')
+ switch (arg[i + 2])
+ {
+ case '!': case '\'':
+ case '(': case ')': case '-': case '/':
+ case '<': case '=': case '>':
+ /* Escape the second '?' in what would otherwise be
+ a trigraph. */
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ c = arg[i + 2];
+ i += 2;
+ STORE ('?');
+ STORE ('"');
+ STORE ('"');
+ STORE ('?');
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ default:
+ break;
+ }
+ break;
+
+ case '\a': esc = 'a'; goto c_escape;
+ case '\b': esc = 'b'; goto c_escape;
+ case '\f': esc = 'f'; goto c_escape;
+ case '\n': esc = 'n'; goto c_and_shell_escape;
+ case '\r': esc = 'r'; goto c_and_shell_escape;
+ case '\t': esc = 't'; goto c_and_shell_escape;
+ case '\v': esc = 'v'; goto c_escape;
+ case '\\': esc = c;
+ /* No need to escape the escape if we are trying to elide
+ outer quotes and nothing else is problematic. */
+ if (backslash_escapes && elide_outer_quotes && quote_string_len)
+ goto store_c;
+
+ c_and_shell_escape:
+ if (quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+ /* Fall through. */
+ c_escape:
+ if (backslash_escapes)
+ {
+ c = esc;
+ goto store_escape;
+ }
+ break;
+
+ case '{': case '}': /* sometimes special if isolated */
+ if (! (argsize == SIZE_MAX ? arg[1] == '\0' : argsize == 1))
+ break;
+ /* Fall through. */
+ case '#': case '~':
+ if (i != 0)
+ break;
+ /* Fall through. */
+ case ' ':
+ case '!': /* special in bash */
+ case '"': case '$': case '&':
+ case '(': case ')': case '*': case ';':
+ case '<':
+ case '=': /* sometimes special in 0th or (with "set -k") later args */
+ case '>': case '[':
+ case '^': /* special in old /bin/sh, e.g. SunOS 4.1.4 */
+ case '`': case '|':
+ /* A shell special character. In theory, '$' and '`' could
+ be the first bytes of multibyte characters, which means
+ we should check them with mbrtowc, but in practice this
+ doesn't happen so it's not worth worrying about. */
+ if (quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+ break;
+
+ case '\'':
+ if (quoting_style == shell_always_quoting_style)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\'');
+ STORE ('\\');
+ STORE ('\'');
+ }
+ break;
+
+ case '%': case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9': case ':':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z': case ']': case '_': case 'a': case 'b':
+ case 'c': case 'd': case 'e': case 'f': case 'g': case 'h':
+ case 'i': case 'j': case 'k': case 'l': case 'm': case 'n':
+ case 'o': case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y': case 'z':
+ /* These characters don't cause problems, no matter what the
+ quoting style is. They cannot start multibyte sequences.
+ A digit or a special letter would cause trouble if it
+ appeared at the beginning of quote_string because we'd then
+ escape by prepending a backslash. However, it's hard to
+ imagine any locale that would use digits or letters as
+ quotes, and set_custom_quoting is documented not to accept
+ them. Also, a digit or a special letter would cause
+ trouble if it appeared in quote_these_too, but that's also
+ documented as not accepting them. */
+ break;
+
+ default:
+ /* If we have a multibyte sequence, copy it until we reach
+ its end, find an error, or come back to the initial shift
+ state. For C-like styles, if the sequence has
+ unprintable characters, escape the whole sequence, since
+ we can't easily escape single characters within it. */
+ {
+ /* Length of multibyte sequence found so far. */
+ size_t m;
+
+ bool printable;
+
+ if (unibyte_locale)
+ {
+ m = 1;
+ printable = isprint (c) != 0;
+ }
+ else
+ {
+ mbstate_t mbstate;
+ memset (&mbstate, 0, sizeof mbstate);
+
+ m = 0;
+ printable = true;
+ if (argsize == SIZE_MAX)
+ argsize = strlen (arg);
+
+ do
+ {
+ wchar_t w;
+ size_t bytes = mbrtowc (&w, &arg[i + m],
+ argsize - (i + m), &mbstate);
+ if (bytes == 0)
+ break;
+ else if (bytes == (size_t) -1)
+ {
+ printable = false;
+ break;
+ }
+ else if (bytes == (size_t) -2)
+ {
+ printable = false;
+ while (i + m < argsize && arg[i + m])
+ m++;
+ break;
+ }
+ else
+ {
+ /* Work around a bug with older shells that "see" a '\'
+ that is really the 2nd byte of a multibyte character.
+ In practice the problem is limited to ASCII
+ chars >= '@' that are shell special chars. */
+ if ('[' == 0x5b && elide_outer_quotes
+ && quoting_style == shell_always_quoting_style)
+ {
+ size_t j;
+ for (j = 1; j < bytes; j++)
+ switch (arg[i + m + j])
+ {
+ case '[': case '\\': case '^':
+ case '`': case '|':
+ goto force_outer_quoting_style;
+
+ default:
+ break;
+ }
+ }
+
+ if (! iswprint (w))
+ printable = false;
+ m += bytes;
+ }
+ }
+ while (! mbsinit (&mbstate));
+ }
+
+ if (1 < m || (backslash_escapes && ! printable))
+ {
+ /* Output a multibyte sequence, or an escaped
+ unprintable unibyte character. */
+ size_t ilim = i + m;
+
+ for (;;)
+ {
+ if (backslash_escapes && ! printable)
+ {
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+ STORE ('0' + (c >> 6));
+ STORE ('0' + ((c >> 3) & 7));
+ c = '0' + (c & 7);
+ }
+ else if (is_right_quote)
+ {
+ STORE ('\\');
+ is_right_quote = false;
+ }
+ if (ilim <= i + 1)
+ break;
+ STORE (c);
+ c = arg[++i];
+ }
+
+ goto store_c;
+ }
+ }
+ }
+
+ if (! ((backslash_escapes || elide_outer_quotes)
+ && quote_these_too
+ && quote_these_too[c / INT_BITS] & (1 << (c % INT_BITS)))
+ && !is_right_quote)
+ goto store_c;
+
+ store_escape:
+ if (elide_outer_quotes)
+ goto force_outer_quoting_style;
+ STORE ('\\');
+
+ store_c:
+ STORE (c);
+ }
+
+ if (len == 0 && quoting_style == shell_always_quoting_style
+ && elide_outer_quotes)
+ goto force_outer_quoting_style;
+
+ if (quote_string && !elide_outer_quotes)
+ for (; *quote_string; quote_string++)
+ STORE (*quote_string);
+
+ if (len < buffersize)
+ buffer[len] = '\0';
+ return len;
+
+ force_outer_quoting_style:
+ /* Don't reuse quote_these_too, since the addition of outer quotes
+ sufficiently quotes the specified characters. */
+ return quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+ quoting_style,
+ flags & ~QA_ELIDE_OUTER_QUOTES, NULL,
+ left_quote, right_quote);
+}
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using O to control quoting.
+ If O is null, use the default.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is SIZE_MAX, use the string length of the argument for
+ ARGSIZE. */
+size_t
+quotearg_buffer (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ struct quoting_options const *o)
+{
+ struct quoting_options const *p = o ? o : &default_quoting_options;
+ int e = errno;
+ size_t r = quotearg_buffer_restyled (buffer, buffersize, arg, argsize,
+ p->style, p->flags, p->quote_these_too,
+ p->left_quote, p->right_quote);
+ errno = e;
+ return r;
+}
+
+/* Equivalent to quotearg_alloc (ARG, ARGSIZE, NULL, O). */
+char *
+quotearg_alloc (char const *arg, size_t argsize,
+ struct quoting_options const *o)
+{
+ return quotearg_alloc_mem (arg, argsize, NULL, o);
+}
+
+/* Like quotearg_buffer (..., ARG, ARGSIZE, O), except return newly
+ allocated storage containing the quoted string, and store the
+ resulting size into *SIZE, if non-NULL. The result can contain
+ embedded null bytes only if ARGSIZE is not SIZE_MAX, SIZE is not
+ NULL, and set_quoting_flags has not set the null byte elision
+ flag. */
+char *
+quotearg_alloc_mem (char const *arg, size_t argsize, size_t *size,
+ struct quoting_options const *o)
+{
+ struct quoting_options const *p = o ? o : &default_quoting_options;
+ int e = errno;
+ /* Elide embedded null bytes if we can't return a size. */
+ int flags = p->flags | (size ? 0 : QA_ELIDE_NULL_BYTES);
+ size_t bufsize = quotearg_buffer_restyled (0, 0, arg, argsize, p->style,
+ flags, p->quote_these_too,
+ p->left_quote,
+ p->right_quote) + 1;
+ char *buf = xcharalloc (bufsize);
+ quotearg_buffer_restyled (buf, bufsize, arg, argsize, p->style, flags,
+ p->quote_these_too,
+ p->left_quote, p->right_quote);
+ errno = e;
+ if (size)
+ *size = bufsize - 1;
+ return buf;
+}
+
+/* A storage slot with size and pointer to a value. */
+struct slotvec
+{
+ size_t size;
+ char *val;
+};
+
+/* Preallocate a slot 0 buffer, so that the caller can always quote
+ one small component of a "memory exhausted" message in slot 0. */
+static char slot0[256];
+static unsigned int nslots = 1;
+static struct slotvec slotvec0 = {sizeof slot0, slot0};
+static struct slotvec *slotvec = &slotvec0;
+
+void
+quotearg_free (void)
+{
+ struct slotvec *sv = slotvec;
+ unsigned int i;
+ for (i = 1; i < nslots; i++)
+ free (sv[i].val);
+ if (sv[0].val != slot0)
+ {
+ free (sv[0].val);
+ slotvec0.size = sizeof slot0;
+ slotvec0.val = slot0;
+ }
+ if (sv != &slotvec0)
+ {
+ free (sv);
+ slotvec = &slotvec0;
+ }
+ nslots = 1;
+}
+
+/* Use storage slot N to return a quoted version of argument ARG.
+ ARG is of size ARGSIZE, but if that is SIZE_MAX, ARG is a
+ null-terminated string.
+ OPTIONS specifies the quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+ N must be nonnegative. N is deliberately declared with type "int"
+ to allow for future extensions (using negative values). */
+static char *
+quotearg_n_options (int n, char const *arg, size_t argsize,
+ struct quoting_options const *options)
+{
+ int e = errno;
+
+ unsigned int n0 = n;
+ struct slotvec *sv = slotvec;
+
+ if (n < 0)
+ abort ();
+
+ if (nslots <= n0)
+ {
+ /* FIXME: technically, the type of n1 should be `unsigned int',
+ but that evokes an unsuppressible warning from gcc-4.0.1 and
+ older. If gcc ever provides an option to suppress that warning,
+ revert to the original type, so that the test in xalloc_oversized
+ is once again performed only at compile time. */
+ size_t n1 = n0 + 1;
+ bool preallocated = (sv == &slotvec0);
+
+ if (xalloc_oversized (n1, sizeof *sv))
+ xalloc_die ();
+
+ slotvec = sv = xrealloc (preallocated ? NULL : sv, n1 * sizeof *sv);
+ if (preallocated)
+ *sv = slotvec0;
+ memset (sv + nslots, 0, (n1 - nslots) * sizeof *sv);
+ nslots = n1;
+ }
+
+ {
+ size_t size = sv[n].size;
+ char *val = sv[n].val;
+ /* Elide embedded null bytes since we don't return a size. */
+ int flags = options->flags | QA_ELIDE_NULL_BYTES;
+ size_t qsize = quotearg_buffer_restyled (val, size, arg, argsize,
+ options->style, flags,
+ options->quote_these_too,
+ options->left_quote,
+ options->right_quote);
+
+ if (size <= qsize)
+ {
+ sv[n].size = size = qsize + 1;
+ if (val != slot0)
+ free (val);
+ sv[n].val = val = xcharalloc (size);
+ quotearg_buffer_restyled (val, size, arg, argsize, options->style,
+ flags, options->quote_these_too,
+ options->left_quote,
+ options->right_quote);
+ }
+
+ errno = e;
+ return val;
+ }
+}
+
+char *
+quotearg_n (int n, char const *arg)
+{
+ return quotearg_n_options (n, arg, SIZE_MAX, &default_quoting_options);
+}
+
+char *
+quotearg_n_mem (int n, char const *arg, size_t argsize)
+{
+ return quotearg_n_options (n, arg, argsize, &default_quoting_options);
+}
+
+char *
+quotearg (char const *arg)
+{
+ return quotearg_n (0, arg);
+}
+
+char *
+quotearg_mem (char const *arg, size_t argsize)
+{
+ return quotearg_n_mem (0, arg, argsize);
+}
+
+char *
+quotearg_n_style (int n, enum quoting_style s, char const *arg)
+{
+ struct quoting_options const o = quoting_options_from_style (s);
+ return quotearg_n_options (n, arg, SIZE_MAX, &o);
+}
+
+char *
+quotearg_n_style_mem (int n, enum quoting_style s,
+ char const *arg, size_t argsize)
+{
+ struct quoting_options const o = quoting_options_from_style (s);
+ return quotearg_n_options (n, arg, argsize, &o);
+}
+
+char *
+quotearg_style (enum quoting_style s, char const *arg)
+{
+ return quotearg_n_style (0, s, arg);
+}
+
+char *
+quotearg_style_mem (enum quoting_style s, char const *arg, size_t argsize)
+{
+ return quotearg_n_style_mem (0, s, arg, argsize);
+}
+
+char *
+quotearg_char_mem (char const *arg, size_t argsize, char ch)
+{
+ struct quoting_options options;
+ options = default_quoting_options;
+ set_char_quoting (&options, ch, 1);
+ return quotearg_n_options (0, arg, argsize, &options);
+}
+
+char *
+quotearg_char (char const *arg, char ch)
+{
+ return quotearg_char_mem (arg, SIZE_MAX, ch);
+}
+
+char *
+quotearg_colon (char const *arg)
+{
+ return quotearg_char (arg, ':');
+}
+
+char *
+quotearg_colon_mem (char const *arg, size_t argsize)
+{
+ return quotearg_char_mem (arg, argsize, ':');
+}
+
+char *
+quotearg_n_custom (int n, char const *left_quote,
+ char const *right_quote, char const *arg)
+{
+ return quotearg_n_custom_mem (n, left_quote, right_quote, arg,
+ SIZE_MAX);
+}
+
+char *
+quotearg_n_custom_mem (int n, char const *left_quote,
+ char const *right_quote,
+ char const *arg, size_t argsize)
+{
+ struct quoting_options o = default_quoting_options;
+ set_custom_quoting (&o, left_quote, right_quote);
+ return quotearg_n_options (n, arg, argsize, &o);
+}
+
+char *
+quotearg_custom (char const *left_quote, char const *right_quote,
+ char const *arg)
+{
+ return quotearg_n_custom (0, left_quote, right_quote, arg);
+}
+
+char *
+quotearg_custom_mem (char const *left_quote, char const *right_quote,
+ char const *arg, size_t argsize)
+{
+ return quotearg_n_custom_mem (0, left_quote, right_quote, arg,
+ argsize);
+}
diff --git a/gnu/quotearg.h b/gnu/quotearg.h
new file mode 100755
index 00000000..084cd1b2
--- /dev/null
+++ b/gnu/quotearg.h
@@ -0,0 +1,389 @@
+/* quotearg.h - quote arguments for output
+
+ Copyright (C) 1998, 1999, 2000, 2001, 2002, 2004, 2006, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert <eggert@twinsun.com> */
+
+#ifndef QUOTEARG_H_
+# define QUOTEARG_H_ 1
+
+# include <stddef.h>
+
+/* Basic quoting styles. For each style, an example is given on the
+ input strings "simple", "\0 \t\n'\"\033?""?/\\", and "a:b", using
+ quotearg_buffer, quotearg_mem, and quotearg_colon_mem with that
+ style and the default flags and quoted characters. Note that the
+ examples are shown here as valid C strings rather than what
+ displays on a terminal (with "??/" as a trigraph for "\\"). */
+enum quoting_style
+ {
+ /* Output names as-is (ls --quoting-style=literal). Can result in
+ embedded null bytes if QA_ELIDE_NULL_BYTES is not in
+ effect.
+
+ quotearg_buffer:
+ "simple", "\0 \t\n'\"\033??/\\", "a:b"
+ quotearg:
+ "simple", " \t\n'\"\033??/\\", "a:b"
+ quotearg_colon:
+ "simple", " \t\n'\"\033??/\\", "a:b"
+ */
+ literal_quoting_style,
+
+ /* Quote names for the shell if they contain shell metacharacters
+ or would cause ambiguous output (ls --quoting-style=shell).
+ Can result in embedded null bytes if QA_ELIDE_NULL_BYTES is not
+ in effect.
+
+ quotearg_buffer:
+ "simple", "'\0 \t\n'\\''\"\033??/\\'", "a:b"
+ quotearg:
+ "simple", "' \t\n'\\''\"\033??/\\'", "a:b"
+ quotearg_colon:
+ "simple", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ */
+ shell_quoting_style,
+
+ /* Quote names for the shell, even if they would normally not
+ require quoting (ls --quoting-style=shell-always). Can result
+ in embedded null bytes if QA_ELIDE_NULL_BYTES is not in effect.
+ Behaves like shell_quoting_style if QA_ELIDE_OUTER_QUOTES is in
+ effect.
+
+ quotearg_buffer:
+ "'simple'", "'\0 \t\n'\\''\"\033??/\\'", "'a:b'"
+ quotearg:
+ "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ quotearg_colon:
+ "'simple'", "' \t\n'\\''\"\033??/\\'", "'a:b'"
+ */
+ shell_always_quoting_style,
+
+ /* Quote names as for a C language string (ls --quoting-style=c).
+ Behaves like c_maybe_quoting_style if QA_ELIDE_OUTER_QUOTES is
+ in effect. Split into consecutive strings if
+ QA_SPLIT_TRIGRAPHS.
+
+ quotearg_buffer:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg_colon:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+ */
+ c_quoting_style,
+
+ /* Like c_quoting_style except omit the surrounding double-quote
+ characters if no quoted characters are encountered.
+
+ quotearg_buffer:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+ quotearg:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "a:b"
+ quotearg_colon:
+ "simple", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ */
+ c_maybe_quoting_style,
+
+ /* Like c_quoting_style except always omit the surrounding
+ double-quote characters and ignore QA_SPLIT_TRIGRAPHS
+ (ls --quoting-style=escape).
+
+ quotearg_buffer:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+ quotearg:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a:b"
+ quotearg_colon:
+ "simple", "\\0 \\t\\n'\"\\033??/\\\\", "a\\:b"
+ */
+ escape_quoting_style,
+
+ /* Like clocale_quoting_style, but quote `like this' instead of
+ "like this" in the default C locale (ls --quoting-style=locale).
+
+ LC_MESSAGES=C
+ quotearg_buffer:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+ quotearg:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a:b'"
+ quotearg_colon:
+ "`simple'", "`\\0 \\t\\n\\'\"\\033??/\\\\'", "`a\\:b'"
+
+ LC_MESSAGES=pt_PT.utf8
+ quotearg_buffer:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg_colon:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+ */
+ locale_quoting_style,
+
+ /* Like c_quoting_style except use quotation marks appropriate for
+ the locale and ignore QA_SPLIT_TRIGRAPHS
+ (ls --quoting-style=clocale).
+
+ LC_MESSAGES=C
+ quotearg_buffer:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a:b\""
+ quotearg_colon:
+ "\"simple\"", "\"\\0 \\t\\n'\\\"\\033??/\\\\\"", "\"a\\:b\""
+
+ LC_MESSAGES=pt_PT.utf8
+ quotearg_buffer:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a:b\302\273"
+ quotearg_colon:
+ "\302\253simple\302\273",
+ "\302\253\\0 \\t\\n'\"\\033??/\\\\\302\253", "\302\253a\\:b\302\273"
+ */
+ clocale_quoting_style,
+
+ /* Like clocale_quoting_style except use the custom quotation marks
+ set by set_custom_quoting. If custom quotation marks are not
+ set, the behavior is undefined.
+
+ left_quote = right_quote = "'"
+ quotearg_buffer:
+ "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'"
+ quotearg:
+ "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a:b'"
+ quotearg_colon:
+ "'simple'", "'\\0 \\t\\n\\'\"\\033??/\\\\'", "'a\\:b'"
+
+ left_quote = "(" and right_quote = ")"
+ quotearg_buffer:
+ "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)"
+ quotearg:
+ "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a:b)"
+ quotearg_colon:
+ "(simple)", "(\\0 \\t\\n'\"\\033??/\\\\)", "(a\\:b)"
+
+ left_quote = ":" and right_quote = " "
+ quotearg_buffer:
+ ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b "
+ quotearg:
+ ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a:b "
+ quotearg_colon:
+ ":simple ", ":\\0\\ \\t\\n'\"\\033??/\\\\ ", ":a\\:b "
+
+ left_quote = "\"'" and right_quote = "'\""
+ Notice that this is treated as a single level of quotes or two
+ levels where the outer quote need not be escaped within the inner
+ quotes. For two levels where the outer quote must be escaped
+ within the inner quotes, you must use separate quotearg
+ invocations.
+ quotearg_buffer:
+ "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\""
+ quotearg:
+ "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a:b'\""
+ quotearg_colon:
+ "\"'simple'\"", "\"'\\0 \\t\\n\\'\"\\033??/\\\\'\"", "\"'a\\:b'\""
+ */
+ custom_quoting_style
+ };
+
+/* Flags for use in set_quoting_flags. */
+enum quoting_flags
+ {
+ /* Always elide null bytes from styles that do not quote them,
+ even when the length of the result is available to the
+ caller. */
+ QA_ELIDE_NULL_BYTES = 0x01,
+
+ /* Omit the surrounding quote characters if no escaped characters
+ are encountered. Note that if no other character needs
+ escaping, then neither does the escape character. */
+ QA_ELIDE_OUTER_QUOTES = 0x02,
+
+ /* In the c_quoting_style and c_maybe_quoting_style, split ANSI
+ trigraph sequences into concatenated strings (for example,
+ "?""?/" rather than "??/", which could be confused with
+ "\\"). */
+ QA_SPLIT_TRIGRAPHS = 0x04
+ };
+
+/* For now, --quoting-style=literal is the default, but this may change. */
+# ifndef DEFAULT_QUOTING_STYLE
+# define DEFAULT_QUOTING_STYLE literal_quoting_style
+# endif
+
+/* Names of quoting styles and their corresponding values. */
+extern char const *const quoting_style_args[];
+extern enum quoting_style const quoting_style_vals[];
+
+struct quoting_options;
+
+/* The functions listed below set and use a hidden variable
+ that contains the default quoting style options. */
+
+/* Allocate a new set of quoting options, with contents initially identical
+ to O if O is not null, or to the default if O is null.
+ It is the caller's responsibility to free the result. */
+struct quoting_options *clone_quoting_options (struct quoting_options *o);
+
+/* Get the value of O's quoting style. If O is null, use the default. */
+enum quoting_style get_quoting_style (struct quoting_options *o);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting style to S. */
+void set_quoting_style (struct quoting_options *o, enum quoting_style s);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options for character C to I.
+ Return the old value. Currently, the only values defined for I are
+ 0 (the default) and 1 (which means to quote the character even if
+ it would not otherwise be quoted). C must never be a digit or a
+ letter that has special meaning after a backslash (for example, "\t"
+ for tab). */
+int set_char_quoting (struct quoting_options *o, char c, int i);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting options flag to I, which can be a
+ bitwise combination of enum quoting_flags, or 0 for default
+ behavior. Return the old value. */
+int set_quoting_flags (struct quoting_options *o, int i);
+
+/* In O (or in the default if O is null),
+ set the value of the quoting style to custom_quoting_style,
+ set the left quote to LEFT_QUOTE, and set the right quote to
+ RIGHT_QUOTE. Each of LEFT_QUOTE and RIGHT_QUOTE must be
+ null-terminated and can be the empty string. Because backslashes are
+ used for escaping, it does not make sense for RIGHT_QUOTE to contain
+ a backslash. RIGHT_QUOTE must not begin with a digit or a letter
+ that has special meaning after a backslash (for example, "\t" for
+ tab). */
+void set_custom_quoting (struct quoting_options *o,
+ char const *left_quote,
+ char const *right_quote);
+
+/* Place into buffer BUFFER (of size BUFFERSIZE) a quoted version of
+ argument ARG (of size ARGSIZE), using O to control quoting.
+ If O is null, use the default.
+ Terminate the output with a null character, and return the written
+ size of the output, not counting the terminating null.
+ If BUFFERSIZE is too small to store the output string, return the
+ value that would have been returned had BUFFERSIZE been large enough.
+ If ARGSIZE is -1, use the string length of the argument for ARGSIZE.
+ On output, BUFFER might contain embedded null bytes if ARGSIZE was
+ not -1, the style of O does not use backslash escapes, and the
+ flags of O do not request elision of null bytes.*/
+size_t quotearg_buffer (char *buffer, size_t buffersize,
+ char const *arg, size_t argsize,
+ struct quoting_options const *o);
+
+/* Like quotearg_buffer, except return the result in a newly allocated
+ buffer. It is the caller's responsibility to free the result. The
+ result will not contain embedded null bytes. */
+char *quotearg_alloc (char const *arg, size_t argsize,
+ struct quoting_options const *o);
+
+/* Like quotearg_alloc, except that the length of the result,
+ excluding the terminating null byte, is stored into SIZE if it is
+ non-NULL. The result might contain embedded null bytes if ARGSIZE
+ was not -1, SIZE was not NULL, the style of O does not use
+ backslash escapes, and the flags of O do not request elision of
+ null bytes.*/
+char *quotearg_alloc_mem (char const *arg, size_t argsize,
+ size_t *size, struct quoting_options const *o);
+
+/* Use storage slot N to return a quoted version of the string ARG.
+ Use the default quoting options.
+ The returned value points to static storage that can be
+ reused by the next call to this function with the same value of N.
+ N must be nonnegative. The output of all functions in the
+ quotearg_n family are guaranteed to not contain embedded null
+ bytes.*/
+char *quotearg_n (int n, char const *arg);
+
+/* Equivalent to quotearg_n (0, ARG). */
+char *quotearg (char const *arg);
+
+/* Use storage slot N to return a quoted version of the argument ARG
+ of size ARGSIZE. This is like quotearg_n (N, ARG), except it can
+ quote null bytes. */
+char *quotearg_n_mem (int n, char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_mem (0, ARG, ARGSIZE). */
+char *quotearg_mem (char const *arg, size_t argsize);
+
+/* Use style S and storage slot N to return a quoted version of the string ARG.
+ This is like quotearg_n (N, ARG), except that it uses S with no other
+ options to specify the quoting method. */
+char *quotearg_n_style (int n, enum quoting_style s, char const *arg);
+
+/* Use style S and storage slot N to return a quoted version of the
+ argument ARG of size ARGSIZE. This is like quotearg_n_style
+ (N, S, ARG), except it can quote null bytes. */
+char *quotearg_n_style_mem (int n, enum quoting_style s,
+ char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_style (0, S, ARG). */
+char *quotearg_style (enum quoting_style s, char const *arg);
+
+/* Equivalent to quotearg_n_style_mem (0, S, ARG, ARGSIZE). */
+char *quotearg_style_mem (enum quoting_style s,
+ char const *arg, size_t argsize);
+
+/* Like quotearg (ARG), except also quote any instances of CH.
+ See set_char_quoting for a description of acceptable CH values. */
+char *quotearg_char (char const *arg, char ch);
+
+/* Like quotearg_char (ARG, CH), except it can quote null bytes. */
+char *quotearg_char_mem (char const *arg, size_t argsize, char ch);
+
+/* Equivalent to quotearg_char (ARG, ':'). */
+char *quotearg_colon (char const *arg);
+
+/* Like quotearg_colon (ARG), except it can quote null bytes. */
+char *quotearg_colon_mem (char const *arg, size_t argsize);
+
+/* Like quotearg_n_style (N, S, ARG) but with S as custom_quoting_style
+ with left quote as LEFT_QUOTE and right quote as RIGHT_QUOTE. See
+ set_custom_quoting for a description of acceptable LEFT_QUOTE and
+ RIGHT_QUOTE values. */
+char *quotearg_n_custom (int n, char const *left_quote,
+ char const *right_quote, char const *arg);
+
+/* Like quotearg_n_custom (N, LEFT_QUOTE, RIGHT_QUOTE, ARG) except it
+ can quote null bytes. */
+char *quotearg_n_custom_mem (int n, char const *left_quote,
+ char const *right_quote,
+ char const *arg, size_t argsize);
+
+/* Equivalent to quotearg_n_custom (0, LEFT_QUOTE, RIGHT_QUOTE, ARG). */
+char *quotearg_custom (char const *left_quote, char const *right_quote,
+ char const *arg);
+
+/* Equivalent to quotearg_n_custom_mem (0, LEFT_QUOTE, RIGHT_QUOTE, ARG,
+ ARGSIZE). */
+char *quotearg_custom_mem (char const *left_quote,
+ char const *right_quote,
+ char const *arg, size_t argsize);
+
+/* Free any dynamically allocated memory. */
+void quotearg_free (void);
+
+#endif /* !QUOTEARG_H_ */
diff --git a/gnu/rawmemchr.c b/gnu/rawmemchr.c
new file mode 100755
index 00000000..0a88777d
--- /dev/null
+++ b/gnu/rawmemchr.c
@@ -0,0 +1,136 @@
+/* Searching in a string.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+/* Find the first occurrence of C in S. */
+void *
+rawmemchr (const void *s, int c_in)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned char c;
+
+ c = (unsigned char) c_in;
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ (size_t) char_ptr % sizeof (longword) != 0;
+ ++char_ptr)
+ if (*char_ptr == c)
+ return (void *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will
+ test a longword at a time. The tricky part is testing if *any of
+ the four* bytes in the longword in question are equal to NUL or
+ c. We first use an xor with repeated_c. This reduces the task
+ to testing whether *any of the four* bytes in longword1 is zero.
+
+ We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ The test whether any byte in longword1 is zero is equivalent
+ to testing whether tmp is nonzero.
+
+ This test can read beyond the end of a string, depending on where
+ C_IN is encountered. However, this is considered safe since the
+ initialization phase ensured that the read will be aligned,
+ therefore, the read will not cross page boundaries and will not
+ cause a fault. */
+
+ while (1)
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+
+ if ((((longword1 - repeated_one) & ~longword1)
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that one of the sizeof (longword) bytes
+ starting at char_ptr is == c. On little-endian machines, we
+ could determine the first such byte without any further memory
+ accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines.
+ Choose code that works in both cases. */
+
+ char_ptr = (unsigned char *) longword_ptr;
+ while (*char_ptr != c)
+ char_ptr++;
+ return (void *) char_ptr;
+}
diff --git a/gnu/rawmemchr.valgrind b/gnu/rawmemchr.valgrind
new file mode 100755
index 00000000..63639236
--- /dev/null
+++ b/gnu/rawmemchr.valgrind
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in rawmemchr().
+# This use is OK because it provides only a speedup.
+{
+ rawmemchr-value4
+ Memcheck:Value4
+ fun:rawmemchr
+}
+{
+ rawmemchr-value8
+ Memcheck:Value8
+ fun:rawmemchr
+}
diff --git a/gnu/readlink.c b/gnu/readlink.c
new file mode 100755
index 00000000..1d9b3d3b
--- /dev/null
+++ b/gnu/readlink.c
@@ -0,0 +1,74 @@
+/* Stub for readlink().
+ Copyright (C) 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_READLINK
+
+/* readlink() substitute for systems that don't have a readlink() function,
+ such as DJGPP 2.03 and mingw32. */
+
+ssize_t
+readlink (const char *name, char *buf _GL_UNUSED,
+ size_t bufsize _GL_UNUSED)
+{
+ struct stat statbuf;
+
+ /* In general we should use lstat() here, not stat(). But on platforms
+ without symbolic links, lstat() - if it exists - would be equivalent to
+ stat(), therefore we can use stat(). This saves us a configure check. */
+ if (stat (name, &statbuf) >= 0)
+ errno = EINVAL;
+ return -1;
+}
+
+#else /* HAVE_READLINK */
+
+# undef readlink
+
+/* readlink() wrapper that uses correct types, for systems like cygwin
+ 1.5.x where readlink returns int, and which rejects trailing slash,
+ for Solaris 9. */
+
+ssize_t
+rpl_readlink (const char *name, char *buf, size_t bufsize)
+{
+# if READLINK_TRAILING_SLASH_BUG
+ size_t len = strlen (name);
+ if (len && name[len - 1] == '/')
+ {
+ /* Even if name without the slash is a symlink to a directory,
+ both lstat() and stat() must resolve the trailing slash to
+ the directory rather than the symlink. We can therefore
+ safely use stat() to distinguish between EINVAL and
+ ENOTDIR/ENOENT, avoiding extra overhead of rpl_lstat(). */
+ struct stat st;
+ if (stat (name, &st) == 0)
+ errno = EINVAL;
+ return -1;
+ }
+# endif /* READLINK_TRAILING_SLASH_BUG */
+ return readlink (name, buf, bufsize);
+}
+
+#endif /* HAVE_READLINK */
diff --git a/gnu/ref-add.sin b/gnu/ref-add.sin
new file mode 100755
index 00000000..dbb61df3
--- /dev/null
+++ b/gnu/ref-add.sin
@@ -0,0 +1,30 @@
+# Add this package to a list of references stored in a text file.
+#
+# Copyright (C) 2000, 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 General Public License as published by
+# the Free Software Foundation; either version 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
diff --git a/gnu/ref-del.sin b/gnu/ref-del.sin
new file mode 100755
index 00000000..4c31a6ea
--- /dev/null
+++ b/gnu/ref-del.sin
@@ -0,0 +1,25 @@
+# Remove this package from a list of references stored in a text file.
+#
+# Copyright (C) 2000, 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 General Public License as published by
+# the Free Software Foundation; either version 3, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
diff --git a/gnu/regcomp.c b/gnu/regcomp.c
new file mode 100755
index 00000000..56212275
--- /dev/null
+++ b/gnu/regcomp.c
@@ -0,0 +1,3869 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t re_compile_internal (regex_t *preg, const char * pattern,
+ size_t length, reg_syntax_t syntax);
+static void re_compile_fastmap_iter (regex_t *bufp,
+ const re_dfastate_t *init_state,
+ char *fastmap);
+static reg_errcode_t init_dfa (re_dfa_t *dfa, size_t pat_len);
+#ifdef RE_ENABLE_I18N
+static void free_charset (re_charset_t *cset);
+#endif /* RE_ENABLE_I18N */
+static void free_workarea_compile (regex_t *preg);
+static reg_errcode_t create_initial_state (re_dfa_t *dfa);
+#ifdef RE_ENABLE_I18N
+static void optimize_utf8 (re_dfa_t *dfa);
+#endif
+static reg_errcode_t analyze (regex_t *preg);
+static reg_errcode_t preorder (bin_tree_t *root,
+ reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra);
+static reg_errcode_t postorder (bin_tree_t *root,
+ reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra);
+static reg_errcode_t optimize_subexps (void *extra, bin_tree_t *node);
+static reg_errcode_t lower_subexps (void *extra, bin_tree_t *node);
+static bin_tree_t *lower_subexp (reg_errcode_t *err, regex_t *preg,
+ bin_tree_t *node);
+static reg_errcode_t calc_first (void *extra, bin_tree_t *node);
+static reg_errcode_t calc_next (void *extra, bin_tree_t *node);
+static reg_errcode_t link_nfa_nodes (void *extra, bin_tree_t *node);
+static Idx duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint);
+static Idx search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+ unsigned int constraint);
+static reg_errcode_t calc_eclosure (re_dfa_t *dfa);
+static reg_errcode_t calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa,
+ Idx node, bool root);
+static reg_errcode_t calc_inveclosure (re_dfa_t *dfa);
+static Idx fetch_number (re_string_t *input, re_token_t *token,
+ reg_syntax_t syntax);
+static int peek_token (re_token_t *token, re_string_t *input,
+ reg_syntax_t syntax) internal_function;
+static bin_tree_t *parse (re_string_t *regexp, regex_t *preg,
+ reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_reg_exp (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_branch (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_expression (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_sub_exp (re_string_t *regexp, regex_t *preg,
+ re_token_t *token, reg_syntax_t syntax,
+ Idx nest, reg_errcode_t *err);
+static bin_tree_t *parse_dup_op (bin_tree_t *dup_elem, re_string_t *regexp,
+ re_dfa_t *dfa, re_token_t *token,
+ reg_syntax_t syntax, reg_errcode_t *err);
+static bin_tree_t *parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa,
+ re_token_t *token, reg_syntax_t syntax,
+ reg_errcode_t *err);
+static reg_errcode_t parse_bracket_element (bracket_elem_t *elem,
+ re_string_t *regexp,
+ re_token_t *token, int token_len,
+ re_dfa_t *dfa,
+ reg_syntax_t syntax,
+ bool accept_hyphen);
+static reg_errcode_t parse_bracket_symbol (bracket_elem_t *elem,
+ re_string_t *regexp,
+ re_token_t *token);
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+ re_charset_t *mbcset,
+ Idx *equiv_class_alloc,
+ const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+ bitset_t sbcset,
+ re_charset_t *mbcset,
+ Idx *char_class_alloc,
+ const unsigned char *class_name,
+ reg_syntax_t syntax);
+#else /* not RE_ENABLE_I18N */
+static reg_errcode_t build_equiv_class (bitset_t sbcset,
+ const unsigned char *name);
+static reg_errcode_t build_charclass (RE_TRANSLATE_TYPE trans,
+ bitset_t sbcset,
+ const unsigned char *class_name,
+ reg_syntax_t syntax);
+#endif /* not RE_ENABLE_I18N */
+static bin_tree_t *build_charclass_op (re_dfa_t *dfa,
+ RE_TRANSLATE_TYPE trans,
+ const unsigned char *class_name,
+ const unsigned char *extra,
+ bool non_match, reg_errcode_t *err);
+static bin_tree_t *create_tree (re_dfa_t *dfa,
+ bin_tree_t *left, bin_tree_t *right,
+ re_token_type_t type);
+static bin_tree_t *create_token_tree (re_dfa_t *dfa,
+ bin_tree_t *left, bin_tree_t *right,
+ const re_token_t *token);
+static bin_tree_t *duplicate_tree (const bin_tree_t *src, re_dfa_t *dfa);
+static void free_token (re_token_t *node);
+static reg_errcode_t free_tree (void *extra, bin_tree_t *node);
+static reg_errcode_t mark_opt_subexp (void *extra, bin_tree_t *node);
+
+/* This table gives an error message for each of the error codes listed
+ in regex.h. Obviously the order here has to be same as there.
+ POSIX doesn't require that we do anything for REG_NOERROR,
+ but why not be nice? */
+
+static const char __re_error_msgid[] =
+ {
+#define REG_NOERROR_IDX 0
+ gettext_noop ("Success") /* REG_NOERROR */
+ "\0"
+#define REG_NOMATCH_IDX (REG_NOERROR_IDX + sizeof "Success")
+ gettext_noop ("No match") /* REG_NOMATCH */
+ "\0"
+#define REG_BADPAT_IDX (REG_NOMATCH_IDX + sizeof "No match")
+ gettext_noop ("Invalid regular expression") /* REG_BADPAT */
+ "\0"
+#define REG_ECOLLATE_IDX (REG_BADPAT_IDX + sizeof "Invalid regular expression")
+ gettext_noop ("Invalid collation character") /* REG_ECOLLATE */
+ "\0"
+#define REG_ECTYPE_IDX (REG_ECOLLATE_IDX + sizeof "Invalid collation character")
+ gettext_noop ("Invalid character class name") /* REG_ECTYPE */
+ "\0"
+#define REG_EESCAPE_IDX (REG_ECTYPE_IDX + sizeof "Invalid character class name")
+ gettext_noop ("Trailing backslash") /* REG_EESCAPE */
+ "\0"
+#define REG_ESUBREG_IDX (REG_EESCAPE_IDX + sizeof "Trailing backslash")
+ gettext_noop ("Invalid back reference") /* REG_ESUBREG */
+ "\0"
+#define REG_EBRACK_IDX (REG_ESUBREG_IDX + sizeof "Invalid back reference")
+ gettext_noop ("Unmatched [ or [^") /* REG_EBRACK */
+ "\0"
+#define REG_EPAREN_IDX (REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+ gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
+ "\0"
+#define REG_EBRACE_IDX (REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")
+ gettext_noop ("Unmatched \\{") /* REG_EBRACE */
+ "\0"
+#define REG_BADBR_IDX (REG_EBRACE_IDX + sizeof "Unmatched \\{")
+ gettext_noop ("Invalid content of \\{\\}") /* REG_BADBR */
+ "\0"
+#define REG_ERANGE_IDX (REG_BADBR_IDX + sizeof "Invalid content of \\{\\}")
+ gettext_noop ("Invalid range end") /* REG_ERANGE */
+ "\0"
+#define REG_ESPACE_IDX (REG_ERANGE_IDX + sizeof "Invalid range end")
+ gettext_noop ("Memory exhausted") /* REG_ESPACE */
+ "\0"
+#define REG_BADRPT_IDX (REG_ESPACE_IDX + sizeof "Memory exhausted")
+ gettext_noop ("Invalid preceding regular expression") /* REG_BADRPT */
+ "\0"
+#define REG_EEND_IDX (REG_BADRPT_IDX + sizeof "Invalid preceding regular expression")
+ gettext_noop ("Premature end of regular expression") /* REG_EEND */
+ "\0"
+#define REG_ESIZE_IDX (REG_EEND_IDX + sizeof "Premature end of regular expression")
+ gettext_noop ("Regular expression too big") /* REG_ESIZE */
+ "\0"
+#define REG_ERPAREN_IDX (REG_ESIZE_IDX + sizeof "Regular expression too big")
+ gettext_noop ("Unmatched ) or \\)") /* REG_ERPAREN */
+ };
+
+static const size_t __re_error_msgid_idx[] =
+ {
+ REG_NOERROR_IDX,
+ REG_NOMATCH_IDX,
+ REG_BADPAT_IDX,
+ REG_ECOLLATE_IDX,
+ REG_ECTYPE_IDX,
+ REG_EESCAPE_IDX,
+ REG_ESUBREG_IDX,
+ REG_EBRACK_IDX,
+ REG_EPAREN_IDX,
+ REG_EBRACE_IDX,
+ REG_BADBR_IDX,
+ REG_ERANGE_IDX,
+ REG_ESPACE_IDX,
+ REG_BADRPT_IDX,
+ REG_EEND_IDX,
+ REG_ESIZE_IDX,
+ REG_ERPAREN_IDX
+ };
+
+/* Entry points for GNU code. */
+
+/* re_compile_pattern is the GNU regular expression compiler: it
+ compiles PATTERN (of length LENGTH) and puts the result in BUFP.
+ Returns 0 if the pattern was valid, otherwise an error string.
+
+ Assumes the `allocated' (and perhaps `buffer') and `translate' fields
+ are set in BUFP on entry. */
+
+#ifdef _LIBC
+const char *
+re_compile_pattern (pattern, length, bufp)
+ const char *pattern;
+ size_t length;
+ struct re_pattern_buffer *bufp;
+#else /* size_t might promote */
+const char *
+re_compile_pattern (const char *pattern, size_t length,
+ struct re_pattern_buffer *bufp)
+#endif
+{
+ reg_errcode_t ret;
+
+ /* And GNU code determines whether or not to get register information
+ by passing null for the REGS argument to re_match, etc., not by
+ setting no_sub, unless RE_NO_SUB is set. */
+ bufp->no_sub = !!(re_syntax_options & RE_NO_SUB);
+
+ /* Match anchors at newline. */
+ bufp->newline_anchor = 1;
+
+ ret = re_compile_internal (bufp, pattern, length, re_syntax_options);
+
+ if (!ret)
+ return NULL;
+ return gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+#ifdef _LIBC
+weak_alias (__re_compile_pattern, re_compile_pattern)
+#endif
+
+/* Set by `re_set_syntax' to the current regexp syntax to recognize. Can
+ also be assigned to arbitrarily: each pattern buffer stores its own
+ syntax, so it can be changed between regex compilations. */
+/* This has no initializer because initialized variables in Emacs
+ become read-only after dumping. */
+reg_syntax_t re_syntax_options;
+
+
+/* Specify the precise syntax of regexps for compilation. This provides
+ for compatibility for various utilities which historically have
+ different, incompatible syntaxes.
+
+ The argument SYNTAX is a bit mask comprised of the various bits
+ defined in regex.h. We return the old syntax. */
+
+reg_syntax_t
+re_set_syntax (syntax)
+ reg_syntax_t syntax;
+{
+ reg_syntax_t ret = re_syntax_options;
+
+ re_syntax_options = syntax;
+ return ret;
+}
+#ifdef _LIBC
+weak_alias (__re_set_syntax, re_set_syntax)
+#endif
+
+int
+re_compile_fastmap (bufp)
+ struct re_pattern_buffer *bufp;
+{
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ char *fastmap = bufp->fastmap;
+
+ memset (fastmap, '\0', sizeof (char) * SBC_MAX);
+ re_compile_fastmap_iter (bufp, dfa->init_state, fastmap);
+ if (dfa->init_state != dfa->init_state_word)
+ re_compile_fastmap_iter (bufp, dfa->init_state_word, fastmap);
+ if (dfa->init_state != dfa->init_state_nl)
+ re_compile_fastmap_iter (bufp, dfa->init_state_nl, fastmap);
+ if (dfa->init_state != dfa->init_state_begbuf)
+ re_compile_fastmap_iter (bufp, dfa->init_state_begbuf, fastmap);
+ bufp->fastmap_accurate = 1;
+ return 0;
+}
+#ifdef _LIBC
+weak_alias (__re_compile_fastmap, re_compile_fastmap)
+#endif
+
+static inline void
+__attribute ((always_inline))
+re_set_fastmap (char *fastmap, bool icase, int ch)
+{
+ fastmap[ch] = 1;
+ if (icase)
+ fastmap[tolower (ch)] = 1;
+}
+
+/* Helper function for re_compile_fastmap.
+ Compile fastmap for the initial_state INIT_STATE. */
+
+static void
+re_compile_fastmap_iter (regex_t *bufp, const re_dfastate_t *init_state,
+ char *fastmap)
+{
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+ Idx node_cnt;
+ bool icase = (dfa->mb_cur_max == 1 && (bufp->syntax & RE_ICASE));
+ for (node_cnt = 0; node_cnt < init_state->nodes.nelem; ++node_cnt)
+ {
+ Idx node = init_state->nodes.elems[node_cnt];
+ re_token_type_t type = dfa->nodes[node].type;
+
+ if (type == CHARACTER)
+ {
+ re_set_fastmap (fastmap, icase, dfa->nodes[node].opr.c);
+#ifdef RE_ENABLE_I18N
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ unsigned char buf[MB_LEN_MAX];
+ unsigned char *p;
+ wchar_t wc;
+ mbstate_t state;
+
+ p = buf;
+ *p++ = dfa->nodes[node].opr.c;
+ while (++node < dfa->nodes_len
+ && dfa->nodes[node].type == CHARACTER
+ && dfa->nodes[node].mb_partial)
+ *p++ = dfa->nodes[node].opr.c;
+ memset (&state, '\0', sizeof (state));
+ if (__mbrtowc (&wc, (const char *) buf, p - buf,
+ &state) == p - buf
+ && (__wcrtomb ((char *) buf, towlower (wc), &state)
+ != (size_t) -1))
+ re_set_fastmap (fastmap, false, buf[0]);
+ }
+#endif
+ }
+ else if (type == SIMPLE_BRACKET)
+ {
+ int i, ch;
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ {
+ int j;
+ bitset_word_t w = dfa->nodes[node].opr.sbcset[i];
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ if (w & ((bitset_word_t) 1 << j))
+ re_set_fastmap (fastmap, icase, ch);
+ }
+ }
+#ifdef RE_ENABLE_I18N
+ else if (type == COMPLEX_BRACKET)
+ {
+ re_charset_t *cset = dfa->nodes[node].opr.mbcset;
+ Idx i;
+
+# ifdef _LIBC
+ /* See if we have to try all bytes which start multiple collation
+ elements.
+ e.g. In da_DK, we want to catch 'a' since "aa" is a valid
+ collation element, and don't catch 'b' since 'b' is
+ the only collation element which starts from 'b' (and
+ it is caught by SIMPLE_BRACKET). */
+ if (_NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES) != 0
+ && (cset->ncoll_syms || cset->nranges))
+ {
+ const int32_t *table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ for (i = 0; i < SBC_MAX; ++i)
+ if (table[i] < 0)
+ re_set_fastmap (fastmap, icase, i);
+ }
+# endif /* _LIBC */
+
+ /* See if we have to start the match at all multibyte characters,
+ i.e. where we would not find an invalid sequence. This only
+ applies to multibyte character sets; for single byte character
+ sets, the SIMPLE_BRACKET again suffices. */
+ if (dfa->mb_cur_max > 1
+ && (cset->nchar_classes || cset->non_match || cset->nranges
+# ifdef _LIBC
+ || cset->nequiv_classes
+# endif /* _LIBC */
+ ))
+ {
+ unsigned char c = 0;
+ do
+ {
+ mbstate_t mbs;
+ memset (&mbs, 0, sizeof (mbs));
+ if (__mbrtowc (NULL, (char *) &c, 1, &mbs) == (size_t) -2)
+ re_set_fastmap (fastmap, false, (int) c);
+ }
+ while (++c != 0);
+ }
+
+ else
+ {
+ /* ... Else catch all bytes which can start the mbchars. */
+ for (i = 0; i < cset->nmbchars; ++i)
+ {
+ char buf[256];
+ mbstate_t state;
+ memset (&state, '\0', sizeof (state));
+ if (__wcrtomb (buf, cset->mbchars[i], &state) != (size_t) -1)
+ re_set_fastmap (fastmap, icase, *(unsigned char *) buf);
+ if ((bufp->syntax & RE_ICASE) && dfa->mb_cur_max > 1)
+ {
+ if (__wcrtomb (buf, towlower (cset->mbchars[i]), &state)
+ != (size_t) -1)
+ re_set_fastmap (fastmap, false, *(unsigned char *) buf);
+ }
+ }
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ else if (type == OP_PERIOD
+#ifdef RE_ENABLE_I18N
+ || type == OP_UTF8_PERIOD
+#endif /* RE_ENABLE_I18N */
+ || type == END_OF_RE)
+ {
+ memset (fastmap, '\1', sizeof (char) * SBC_MAX);
+ if (type == END_OF_RE)
+ bufp->can_be_null = 1;
+ return;
+ }
+ }
+}
+
+/* Entry point for POSIX code. */
+/* regcomp takes a regular expression as a string and compiles it.
+
+ PREG is a regex_t *. We do not expect any fields to be initialized,
+ since POSIX says we shouldn't. Thus, we set
+
+ `buffer' to the compiled pattern;
+ `used' to the length of the compiled pattern;
+ `syntax' to RE_SYNTAX_POSIX_EXTENDED if the
+ REG_EXTENDED bit in CFLAGS is set; otherwise, to
+ RE_SYNTAX_POSIX_BASIC;
+ `newline_anchor' to REG_NEWLINE being set in CFLAGS;
+ `fastmap' to an allocated space for the fastmap;
+ `fastmap_accurate' to zero;
+ `re_nsub' to the number of subexpressions in PATTERN.
+
+ PATTERN is the address of the pattern string.
+
+ CFLAGS is a series of bits which affect compilation.
+
+ If REG_EXTENDED is set, we use POSIX extended syntax; otherwise, we
+ use POSIX basic syntax.
+
+ If REG_NEWLINE is set, then . and [^...] don't match newline.
+ Also, regexec will try a match beginning after every newline.
+
+ If REG_ICASE is set, then we considers upper- and lowercase
+ versions of letters to be equivalent when matching.
+
+ If REG_NOSUB is set, then when PREG is passed to regexec, that
+ routine will report only success or failure, and nothing about the
+ registers.
+
+ It returns 0 if it succeeds, nonzero if it doesn't. (See regex.h for
+ the return codes and their meanings.) */
+
+int
+regcomp (preg, pattern, cflags)
+ regex_t *_Restrict_ preg;
+ const char *_Restrict_ pattern;
+ int cflags;
+{
+ reg_errcode_t ret;
+ reg_syntax_t syntax = ((cflags & REG_EXTENDED) ? RE_SYNTAX_POSIX_EXTENDED
+ : RE_SYNTAX_POSIX_BASIC);
+
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ preg->used = 0;
+
+ /* Try to allocate space for the fastmap. */
+ preg->fastmap = re_malloc (char, SBC_MAX);
+ if (BE (preg->fastmap == NULL, 0))
+ return REG_ESPACE;
+
+ syntax |= (cflags & REG_ICASE) ? RE_ICASE : 0;
+
+ /* If REG_NEWLINE is set, newlines are treated differently. */
+ if (cflags & REG_NEWLINE)
+ { /* REG_NEWLINE implies neither . nor [^...] match newline. */
+ syntax &= ~RE_DOT_NEWLINE;
+ syntax |= RE_HAT_LISTS_NOT_NEWLINE;
+ /* It also changes the matching behavior. */
+ preg->newline_anchor = 1;
+ }
+ else
+ preg->newline_anchor = 0;
+ preg->no_sub = !!(cflags & REG_NOSUB);
+ preg->translate = NULL;
+
+ ret = re_compile_internal (preg, pattern, strlen (pattern), syntax);
+
+ /* POSIX doesn't distinguish between an unmatched open-group and an
+ unmatched close-group: both are REG_EPAREN. */
+ if (ret == REG_ERPAREN)
+ ret = REG_EPAREN;
+
+ /* We have already checked preg->fastmap != NULL. */
+ if (BE (ret == REG_NOERROR, 1))
+ /* Compute the fastmap now, since regexec cannot modify the pattern
+ buffer. This function never fails in this implementation. */
+ (void) re_compile_fastmap (preg);
+ else
+ {
+ /* Some error occurred while compiling the expression. */
+ re_free (preg->fastmap);
+ preg->fastmap = NULL;
+ }
+
+ return (int) ret;
+}
+#ifdef _LIBC
+weak_alias (__regcomp, regcomp)
+#endif
+
+/* Returns a message corresponding to an error code, ERRCODE, returned
+ from either regcomp or regexec. We don't use PREG here. */
+
+#ifdef _LIBC
+size_t
+regerror (errcode, preg, errbuf, errbuf_size)
+ int errcode;
+ const regex_t *_Restrict_ preg;
+ char *_Restrict_ errbuf;
+ size_t errbuf_size;
+#else /* size_t might promote */
+size_t
+regerror (int errcode, const regex_t *_Restrict_ preg,
+ char *_Restrict_ errbuf, size_t errbuf_size)
+#endif
+{
+ const char *msg;
+ size_t msg_size;
+
+ if (BE (errcode < 0
+ || errcode >= (int) (sizeof (__re_error_msgid_idx)
+ / sizeof (__re_error_msgid_idx[0])), 0))
+ /* Only error codes returned by the rest of the code should be passed
+ to this routine. If we are given anything else, or if other regex
+ code generates an invalid error code, then the program has a bug.
+ Dump core so we can fix it. */
+ abort ();
+
+ msg = gettext (__re_error_msgid + __re_error_msgid_idx[errcode]);
+
+ msg_size = strlen (msg) + 1; /* Includes the null. */
+
+ if (BE (errbuf_size != 0, 1))
+ {
+ size_t cpy_size = msg_size;
+ if (BE (msg_size > errbuf_size, 0))
+ {
+ cpy_size = errbuf_size - 1;
+ errbuf[cpy_size] = '\0';
+ }
+ memcpy (errbuf, msg, cpy_size);
+ }
+
+ return msg_size;
+}
+#ifdef _LIBC
+weak_alias (__regerror, regerror)
+#endif
+
+
+#ifdef RE_ENABLE_I18N
+/* This static array is used for the map to single-byte characters when
+ UTF-8 is used. Otherwise we would allocate memory just to initialize
+ it the same all the time. UTF-8 is the preferred encoding so this is
+ a worthwhile optimization. */
+static const bitset_t utf8_sb_map =
+{
+ /* Set the first 128 bits. */
+# if 4 * BITSET_WORD_BITS < ASCII_CHARS
+# error "bitset_word_t is narrower than 32 bits"
+# elif 3 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 2 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX, BITSET_WORD_MAX,
+# elif 1 * BITSET_WORD_BITS < ASCII_CHARS
+ BITSET_WORD_MAX,
+# endif
+ (BITSET_WORD_MAX
+ >> (SBC_MAX % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - SBC_MAX % BITSET_WORD_BITS))
+};
+#endif
+
+
+static void
+free_dfa_content (re_dfa_t *dfa)
+{
+ Idx i, j;
+
+ if (dfa->nodes)
+ for (i = 0; i < dfa->nodes_len; ++i)
+ free_token (dfa->nodes + i);
+ re_free (dfa->nexts);
+ for (i = 0; i < dfa->nodes_len; ++i)
+ {
+ if (dfa->eclosures != NULL)
+ re_node_set_free (dfa->eclosures + i);
+ if (dfa->inveclosures != NULL)
+ re_node_set_free (dfa->inveclosures + i);
+ if (dfa->edests != NULL)
+ re_node_set_free (dfa->edests + i);
+ }
+ re_free (dfa->edests);
+ re_free (dfa->eclosures);
+ re_free (dfa->inveclosures);
+ re_free (dfa->nodes);
+
+ if (dfa->state_table)
+ for (i = 0; i <= dfa->state_hash_mask; ++i)
+ {
+ struct re_state_table_entry *entry = dfa->state_table + i;
+ for (j = 0; j < entry->num; ++j)
+ {
+ re_dfastate_t *state = entry->array[j];
+ free_state (state);
+ }
+ re_free (entry->array);
+ }
+ re_free (dfa->state_table);
+#ifdef RE_ENABLE_I18N
+ if (dfa->sb_char != utf8_sb_map)
+ re_free (dfa->sb_char);
+#endif
+ re_free (dfa->subexp_map);
+#ifdef DEBUG
+ re_free (dfa->re_str);
+#endif
+
+ re_free (dfa);
+}
+
+
+/* Free dynamically allocated space used by PREG. */
+
+void
+regfree (preg)
+ regex_t *preg;
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ if (BE (dfa != NULL, 1))
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+
+ re_free (preg->fastmap);
+ preg->fastmap = NULL;
+
+ re_free (preg->translate);
+ preg->translate = NULL;
+}
+#ifdef _LIBC
+weak_alias (__regfree, regfree)
+#endif
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them unless specifically requested. */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+
+/* BSD has one and only one pattern buffer. */
+static struct re_pattern_buffer re_comp_buf;
+
+char *
+# ifdef _LIBC
+/* Make these definitions weak in libc, so POSIX programs can redefine
+ these names if they don't use our functions, and still use
+ regcomp/regexec above without link errors. */
+weak_function
+# endif
+re_comp (s)
+ const char *s;
+{
+ reg_errcode_t ret;
+ char *fastmap;
+
+ if (!s)
+ {
+ if (!re_comp_buf.buffer)
+ return gettext ("No previous regular expression");
+ return 0;
+ }
+
+ if (re_comp_buf.buffer)
+ {
+ fastmap = re_comp_buf.fastmap;
+ re_comp_buf.fastmap = NULL;
+ __regfree (&re_comp_buf);
+ memset (&re_comp_buf, '\0', sizeof (re_comp_buf));
+ re_comp_buf.fastmap = fastmap;
+ }
+
+ if (re_comp_buf.fastmap == NULL)
+ {
+ re_comp_buf.fastmap = (char *) malloc (SBC_MAX);
+ if (re_comp_buf.fastmap == NULL)
+ return (char *) gettext (__re_error_msgid
+ + __re_error_msgid_idx[(int) REG_ESPACE]);
+ }
+
+ /* Since `re_exec' always passes NULL for the `regs' argument, we
+ don't need to initialize the pattern buffer fields which affect it. */
+
+ /* Match anchors at newlines. */
+ re_comp_buf.newline_anchor = 1;
+
+ ret = re_compile_internal (&re_comp_buf, s, strlen (s), re_syntax_options);
+
+ if (!ret)
+ return NULL;
+
+ /* Yes, we're discarding `const' here if !HAVE_LIBINTL. */
+ return (char *) gettext (__re_error_msgid + __re_error_msgid_idx[(int) ret]);
+}
+
+#ifdef _LIBC
+libc_freeres_fn (free_mem)
+{
+ __regfree (&re_comp_buf);
+}
+#endif
+
+#endif /* _REGEX_RE_COMP */
+
+/* Internal entry point.
+ Compile the regular expression PATTERN, whose length is LENGTH.
+ SYNTAX indicate regular expression's syntax. */
+
+static reg_errcode_t
+re_compile_internal (regex_t *preg, const char * pattern, size_t length,
+ reg_syntax_t syntax)
+{
+ reg_errcode_t err = REG_NOERROR;
+ re_dfa_t *dfa;
+ re_string_t regexp;
+
+ /* Initialize the pattern buffer. */
+ preg->fastmap_accurate = 0;
+ preg->syntax = syntax;
+ preg->not_bol = preg->not_eol = 0;
+ preg->used = 0;
+ preg->re_nsub = 0;
+ preg->can_be_null = 0;
+ preg->regs_allocated = REGS_UNALLOCATED;
+
+ /* Initialize the dfa. */
+ dfa = (re_dfa_t *) preg->buffer;
+ if (BE (preg->allocated < sizeof (re_dfa_t), 0))
+ {
+ /* If zero allocated, but buffer is non-null, try to realloc
+ enough space. This loses if buffer's address is bogus, but
+ that is the user's responsibility. If ->buffer is NULL this
+ is a simple allocation. */
+ dfa = re_realloc (preg->buffer, re_dfa_t, 1);
+ if (dfa == NULL)
+ return REG_ESPACE;
+ preg->allocated = sizeof (re_dfa_t);
+ preg->buffer = (unsigned char *) dfa;
+ }
+ preg->used = sizeof (re_dfa_t);
+
+ err = init_dfa (dfa, length);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ return err;
+ }
+#ifdef DEBUG
+ /* Note: length+1 will not overflow since it is checked in init_dfa. */
+ dfa->re_str = re_malloc (char, length + 1);
+ strncpy (dfa->re_str, pattern, length + 1);
+#endif
+
+ __libc_lock_init (dfa->lock);
+
+ err = re_string_construct (&regexp, pattern, length, preg->translate,
+ (syntax & RE_ICASE) != 0, dfa);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_compile_internal_free_return:
+ free_workarea_compile (preg);
+ re_string_destruct (&regexp);
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ return err;
+ }
+
+ /* Parse the regular expression, and build a structure tree. */
+ preg->re_nsub = 0;
+ dfa->str_tree = parse (&regexp, preg, syntax, &err);
+ if (BE (dfa->str_tree == NULL, 0))
+ goto re_compile_internal_free_return;
+
+ /* Analyze the tree and create the nfa. */
+ err = analyze (preg);
+ if (BE (err != REG_NOERROR, 0))
+ goto re_compile_internal_free_return;
+
+#ifdef RE_ENABLE_I18N
+ /* If possible, do searching in single byte encoding to speed things up. */
+ if (dfa->is_utf8 && !(syntax & RE_ICASE) && preg->translate == NULL)
+ optimize_utf8 (dfa);
+#endif
+
+ /* Then create the initial state of the dfa. */
+ err = create_initial_state (dfa);
+
+ /* Release work areas. */
+ free_workarea_compile (preg);
+ re_string_destruct (&regexp);
+
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_dfa_content (dfa);
+ preg->buffer = NULL;
+ preg->allocated = 0;
+ }
+
+ return err;
+}
+
+/* Initialize DFA. We use the length of the regular expression PAT_LEN
+ as the initial length of some arrays. */
+
+static reg_errcode_t
+init_dfa (re_dfa_t *dfa, size_t pat_len)
+{
+ __re_size_t table_size;
+#ifndef _LIBC
+ char *codeset_name;
+#endif
+#ifdef RE_ENABLE_I18N
+ size_t max_i18n_object_size = MAX (sizeof (wchar_t), sizeof (wctype_t));
+#else
+ size_t max_i18n_object_size = 0;
+#endif
+ size_t max_object_size =
+ MAX (sizeof (struct re_state_table_entry),
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ MAX (sizeof (regmatch_t),
+ max_i18n_object_size))));
+
+ memset (dfa, '\0', sizeof (re_dfa_t));
+
+ /* Force allocation of str_tree_storage the first time. */
+ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+
+ /* Avoid overflows. The extra "/ 2" is for the table_size doubling
+ calculation below, and for similar doubling calculations
+ elsewhere. And it's <= rather than <, because some of the
+ doubling calculations add 1 afterwards. */
+ if (BE (SIZE_MAX / max_object_size / 2 <= pat_len, 0))
+ return REG_ESPACE;
+
+ dfa->nodes_alloc = pat_len + 1;
+ dfa->nodes = re_malloc (re_token_t, dfa->nodes_alloc);
+
+ /* table_size = 2 ^ ceil(log pat_len) */
+ for (table_size = 1; ; table_size <<= 1)
+ if (table_size > pat_len)
+ break;
+
+ dfa->state_table = calloc (sizeof (struct re_state_table_entry), table_size);
+ dfa->state_hash_mask = table_size - 1;
+
+ dfa->mb_cur_max = MB_CUR_MAX;
+#ifdef _LIBC
+ if (dfa->mb_cur_max == 6
+ && strcmp (_NL_CURRENT (LC_CTYPE, _NL_CTYPE_CODESET_NAME), "UTF-8") == 0)
+ dfa->is_utf8 = 1;
+ dfa->map_notascii = (_NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_MAP_TO_NONASCII)
+ != 0);
+#else
+ codeset_name = nl_langinfo (CODESET);
+ if (strcasecmp (codeset_name, "UTF-8") == 0
+ || strcasecmp (codeset_name, "UTF8") == 0)
+ dfa->is_utf8 = 1;
+
+ /* We check exhaustively in the loop below if this charset is a
+ superset of ASCII. */
+ dfa->map_notascii = 0;
+#endif
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ if (dfa->is_utf8)
+ dfa->sb_char = (re_bitset_ptr_t) utf8_sb_map;
+ else
+ {
+ int i, j, ch;
+
+ dfa->sb_char = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+ if (BE (dfa->sb_char == NULL, 0))
+ return REG_ESPACE;
+
+ /* Set the bits corresponding to single byte chars. */
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ {
+ wint_t wch = __btowc (ch);
+ if (wch != WEOF)
+ dfa->sb_char[i] |= (bitset_word_t) 1 << j;
+# ifndef _LIBC
+ if (isascii (ch) && wch != ch)
+ dfa->map_notascii = 1;
+# endif
+ }
+ }
+ }
+#endif
+
+ if (BE (dfa->nodes == NULL || dfa->state_table == NULL, 0))
+ return REG_ESPACE;
+ return REG_NOERROR;
+}
+
+/* Initialize WORD_CHAR table, which indicate which character is
+ "word". In this case "word" means that it is the word construction
+ character used by some operators like "\<", "\>", etc. */
+
+static void
+internal_function
+init_word_char (re_dfa_t *dfa)
+{
+ int i, j, ch;
+ dfa->word_ops_used = 1;
+ for (i = 0, ch = 0; i < BITSET_WORDS; ++i)
+ for (j = 0; j < BITSET_WORD_BITS; ++j, ++ch)
+ if (isalnum (ch) || ch == '_')
+ dfa->word_char[i] |= (bitset_word_t) 1 << j;
+}
+
+/* Free the work area which are only used while compiling. */
+
+static void
+free_workarea_compile (regex_t *preg)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_storage_t *storage, *next;
+ for (storage = dfa->str_tree_storage; storage; storage = next)
+ {
+ next = storage->next;
+ re_free (storage);
+ }
+ dfa->str_tree_storage = NULL;
+ dfa->str_tree_storage_idx = BIN_TREE_STORAGE_SIZE;
+ dfa->str_tree = NULL;
+ re_free (dfa->org_indices);
+ dfa->org_indices = NULL;
+}
+
+/* Create initial states for all contexts. */
+
+static reg_errcode_t
+create_initial_state (re_dfa_t *dfa)
+{
+ Idx first, i;
+ reg_errcode_t err;
+ re_node_set init_nodes;
+
+ /* Initial states have the epsilon closure of the node which is
+ the first node of the regular expression. */
+ first = dfa->str_tree->first->node_idx;
+ dfa->init_node = first;
+ err = re_node_set_init_copy (&init_nodes, dfa->eclosures + first);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* The back-references which are in initial states can epsilon transit,
+ since in this case all of the subexpressions can be null.
+ Then we add epsilon closures of the nodes which are the next nodes of
+ the back-references. */
+ if (dfa->nbackref > 0)
+ for (i = 0; i < init_nodes.nelem; ++i)
+ {
+ Idx node_idx = init_nodes.elems[i];
+ re_token_type_t type = dfa->nodes[node_idx].type;
+
+ Idx clexp_idx;
+ if (type != OP_BACK_REF)
+ continue;
+ for (clexp_idx = 0; clexp_idx < init_nodes.nelem; ++clexp_idx)
+ {
+ re_token_t *clexp_node;
+ clexp_node = dfa->nodes + init_nodes.elems[clexp_idx];
+ if (clexp_node->type == OP_CLOSE_SUBEXP
+ && clexp_node->opr.idx == dfa->nodes[node_idx].opr.idx)
+ break;
+ }
+ if (clexp_idx == init_nodes.nelem)
+ continue;
+
+ if (type == OP_BACK_REF)
+ {
+ Idx dest_idx = dfa->edests[node_idx].elems[0];
+ if (!re_node_set_contains (&init_nodes, dest_idx))
+ {
+ reg_errcode_t merge_err
+ = re_node_set_merge (&init_nodes, dfa->eclosures + dest_idx);
+ if (merge_err != REG_NOERROR)
+ return merge_err;
+ i = 0;
+ }
+ }
+ }
+
+ /* It must be the first time to invoke acquire_state. */
+ dfa->init_state = re_acquire_state_context (&err, dfa, &init_nodes, 0);
+ /* We don't check ERR here, since the initial state must not be NULL. */
+ if (BE (dfa->init_state == NULL, 0))
+ return err;
+ if (dfa->init_state->has_constraint)
+ {
+ dfa->init_state_word = re_acquire_state_context (&err, dfa, &init_nodes,
+ CONTEXT_WORD);
+ dfa->init_state_nl = re_acquire_state_context (&err, dfa, &init_nodes,
+ CONTEXT_NEWLINE);
+ dfa->init_state_begbuf = re_acquire_state_context (&err, dfa,
+ &init_nodes,
+ CONTEXT_NEWLINE
+ | CONTEXT_BEGBUF);
+ if (BE (dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL, 0))
+ return err;
+ }
+ else
+ dfa->init_state_word = dfa->init_state_nl
+ = dfa->init_state_begbuf = dfa->init_state;
+
+ re_node_set_free (&init_nodes);
+ return REG_NOERROR;
+}
+
+#ifdef RE_ENABLE_I18N
+/* If it is possible to do searching in single byte encoding instead of UTF-8
+ to speed things up, set dfa->mb_cur_max to 1, clear is_utf8 and change
+ DFA nodes where needed. */
+
+static void
+optimize_utf8 (re_dfa_t *dfa)
+{
+ Idx node;
+ int i;
+ bool mb_chars = false;
+ bool has_period = false;
+
+ for (node = 0; node < dfa->nodes_len; ++node)
+ switch (dfa->nodes[node].type)
+ {
+ case CHARACTER:
+ if (dfa->nodes[node].opr.c >= ASCII_CHARS)
+ mb_chars = true;
+ break;
+ case ANCHOR:
+ switch (dfa->nodes[node].opr.ctx_type)
+ {
+ case LINE_FIRST:
+ case LINE_LAST:
+ case BUF_FIRST:
+ case BUF_LAST:
+ break;
+ default:
+ /* Word anchors etc. cannot be handled. It's okay to test
+ opr.ctx_type since constraints (for all DFA nodes) are
+ created by ORing one or more opr.ctx_type values. */
+ return;
+ }
+ break;
+ case OP_PERIOD:
+ has_period = true;
+ break;
+ case OP_BACK_REF:
+ case OP_ALT:
+ case END_OF_RE:
+ case OP_DUP_ASTERISK:
+ case OP_OPEN_SUBEXP:
+ case OP_CLOSE_SUBEXP:
+ break;
+ case COMPLEX_BRACKET:
+ return;
+ case SIMPLE_BRACKET:
+ /* Just double check. */
+ {
+ int rshift = (ASCII_CHARS % BITSET_WORD_BITS == 0
+ ? 0
+ : BITSET_WORD_BITS - ASCII_CHARS % BITSET_WORD_BITS);
+ for (i = ASCII_CHARS / BITSET_WORD_BITS; i < BITSET_WORDS; ++i)
+ {
+ if (dfa->nodes[node].opr.sbcset[i] >> rshift != 0)
+ return;
+ rshift = 0;
+ }
+ }
+ break;
+ default:
+ abort ();
+ }
+
+ if (mb_chars || has_period)
+ for (node = 0; node < dfa->nodes_len; ++node)
+ {
+ if (dfa->nodes[node].type == CHARACTER
+ && dfa->nodes[node].opr.c >= ASCII_CHARS)
+ dfa->nodes[node].mb_partial = 0;
+ else if (dfa->nodes[node].type == OP_PERIOD)
+ dfa->nodes[node].type = OP_UTF8_PERIOD;
+ }
+
+ /* The search can be in single byte locale. */
+ dfa->mb_cur_max = 1;
+ dfa->is_utf8 = 0;
+ dfa->has_mb_node = dfa->nbackref > 0 || has_period;
+}
+#endif
+
+/* Analyze the structure tree, and calculate "first", "next", "edest",
+ "eclosure", and "inveclosure". */
+
+static reg_errcode_t
+analyze (regex_t *preg)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ reg_errcode_t ret;
+
+ /* Allocate arrays. */
+ dfa->nexts = re_malloc (Idx, dfa->nodes_alloc);
+ dfa->org_indices = re_malloc (Idx, dfa->nodes_alloc);
+ dfa->edests = re_malloc (re_node_set, dfa->nodes_alloc);
+ dfa->eclosures = re_malloc (re_node_set, dfa->nodes_alloc);
+ if (BE (dfa->nexts == NULL || dfa->org_indices == NULL || dfa->edests == NULL
+ || dfa->eclosures == NULL, 0))
+ return REG_ESPACE;
+
+ dfa->subexp_map = re_malloc (Idx, preg->re_nsub);
+ if (dfa->subexp_map != NULL)
+ {
+ Idx i;
+ for (i = 0; i < preg->re_nsub; i++)
+ dfa->subexp_map[i] = i;
+ preorder (dfa->str_tree, optimize_subexps, dfa);
+ for (i = 0; i < preg->re_nsub; i++)
+ if (dfa->subexp_map[i] != i)
+ break;
+ if (i == preg->re_nsub)
+ {
+ free (dfa->subexp_map);
+ dfa->subexp_map = NULL;
+ }
+ }
+
+ ret = postorder (dfa->str_tree, lower_subexps, preg);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ ret = postorder (dfa->str_tree, calc_first, dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ preorder (dfa->str_tree, calc_next, dfa);
+ ret = preorder (dfa->str_tree, link_nfa_nodes, dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ ret = calc_eclosure (dfa);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ /* We only need this during the prune_impossible_nodes pass in regexec.c;
+ skip it if p_i_n will not run, as calc_inveclosure can be quadratic. */
+ if ((!preg->no_sub && preg->re_nsub > 0 && dfa->has_plural_match)
+ || dfa->nbackref)
+ {
+ dfa->inveclosures = re_malloc (re_node_set, dfa->nodes_len);
+ if (BE (dfa->inveclosures == NULL, 0))
+ return REG_ESPACE;
+ ret = calc_inveclosure (dfa);
+ }
+
+ return ret;
+}
+
+/* Our parse trees are very unbalanced, so we cannot use a stack to
+ implement parse tree visits. Instead, we use parent pointers and
+ some hairy code in these two functions. */
+static reg_errcode_t
+postorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra)
+{
+ bin_tree_t *node, *prev;
+
+ for (node = root; ; )
+ {
+ /* Descend down the tree, preferably to the left (or to the right
+ if that's the only child). */
+ while (node->left || node->right)
+ if (node->left)
+ node = node->left;
+ else
+ node = node->right;
+
+ do
+ {
+ reg_errcode_t err = fn (extra, node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ if (node->parent == NULL)
+ return REG_NOERROR;
+ prev = node;
+ node = node->parent;
+ }
+ /* Go up while we have a node that is reached from the right. */
+ while (node->right == prev || node->right == NULL);
+ node = node->right;
+ }
+}
+
+static reg_errcode_t
+preorder (bin_tree_t *root, reg_errcode_t (fn (void *, bin_tree_t *)),
+ void *extra)
+{
+ bin_tree_t *node;
+
+ for (node = root; ; )
+ {
+ reg_errcode_t err = fn (extra, node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* Go to the left node, or up and to the right. */
+ if (node->left)
+ node = node->left;
+ else
+ {
+ bin_tree_t *prev = NULL;
+ while (node->right == prev || node->right == NULL)
+ {
+ prev = node;
+ node = node->parent;
+ if (!node)
+ return REG_NOERROR;
+ }
+ node = node->right;
+ }
+ }
+}
+
+/* Optimization pass: if a SUBEXP is entirely contained, strip it and tell
+ re_search_internal to map the inner one's opr.idx to this one's. Adjust
+ backreferences as well. Requires a preorder visit. */
+static reg_errcode_t
+optimize_subexps (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+
+ if (node->token.type == OP_BACK_REF && dfa->subexp_map)
+ {
+ int idx = node->token.opr.idx;
+ node->token.opr.idx = dfa->subexp_map[idx];
+ dfa->used_bkref_map |= 1 << node->token.opr.idx;
+ }
+
+ else if (node->token.type == SUBEXP
+ && node->left && node->left->token.type == SUBEXP)
+ {
+ Idx other_idx = node->left->token.opr.idx;
+
+ node->left = node->left->left;
+ if (node->left)
+ node->left->parent = node;
+
+ dfa->subexp_map[other_idx] = dfa->subexp_map[node->token.opr.idx];
+ if (other_idx < BITSET_WORD_BITS)
+ dfa->used_bkref_map &= ~((bitset_word_t) 1 << other_idx);
+ }
+
+ return REG_NOERROR;
+}
+
+/* Lowering pass: Turn each SUBEXP node into the appropriate concatenation
+ of OP_OPEN_SUBEXP, the body of the SUBEXP (if any) and OP_CLOSE_SUBEXP. */
+static reg_errcode_t
+lower_subexps (void *extra, bin_tree_t *node)
+{
+ regex_t *preg = (regex_t *) extra;
+ reg_errcode_t err = REG_NOERROR;
+
+ if (node->left && node->left->token.type == SUBEXP)
+ {
+ node->left = lower_subexp (&err, preg, node->left);
+ if (node->left)
+ node->left->parent = node;
+ }
+ if (node->right && node->right->token.type == SUBEXP)
+ {
+ node->right = lower_subexp (&err, preg, node->right);
+ if (node->right)
+ node->right->parent = node;
+ }
+
+ return err;
+}
+
+static bin_tree_t *
+lower_subexp (reg_errcode_t *err, regex_t *preg, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *body = node->left;
+ bin_tree_t *op, *cls, *tree1, *tree;
+
+ if (preg->no_sub
+ /* We do not optimize empty subexpressions, because otherwise we may
+ have bad CONCAT nodes with NULL children. This is obviously not
+ very common, so we do not lose much. An example that triggers
+ this case is the sed "script" /\(\)/x. */
+ && node->left != NULL
+ && (node->token.opr.idx >= BITSET_WORD_BITS
+ || !(dfa->used_bkref_map
+ & ((bitset_word_t) 1 << node->token.opr.idx))))
+ return node->left;
+
+ /* Convert the SUBEXP node to the concatenation of an
+ OP_OPEN_SUBEXP, the contents, and an OP_CLOSE_SUBEXP. */
+ op = create_tree (dfa, NULL, NULL, OP_OPEN_SUBEXP);
+ cls = create_tree (dfa, NULL, NULL, OP_CLOSE_SUBEXP);
+ tree1 = body ? create_tree (dfa, body, cls, CONCAT) : cls;
+ tree = create_tree (dfa, op, tree1, CONCAT);
+ if (BE (tree == NULL || tree1 == NULL || op == NULL || cls == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ op->token.opr.idx = cls->token.opr.idx = node->token.opr.idx;
+ op->token.opt_subexp = cls->token.opt_subexp = node->token.opt_subexp;
+ return tree;
+}
+
+/* Pass 1 in building the NFA: compute FIRST and create unlinked automaton
+ nodes. Requires a postorder visit. */
+static reg_errcode_t
+calc_first (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+ if (node->token.type == CONCAT)
+ {
+ node->first = node->left->first;
+ node->node_idx = node->left->node_idx;
+ }
+ else
+ {
+ node->first = node;
+ node->node_idx = re_dfa_add_node (dfa, node->token);
+ if (BE (node->node_idx == REG_MISSING, 0))
+ return REG_ESPACE;
+ if (node->token.type == ANCHOR)
+ dfa->nodes[node->node_idx].constraint = node->token.opr.ctx_type;
+ }
+ return REG_NOERROR;
+}
+
+/* Pass 2: compute NEXT on the tree. Preorder visit. */
+static reg_errcode_t
+calc_next (void *extra, bin_tree_t *node)
+{
+ switch (node->token.type)
+ {
+ case OP_DUP_ASTERISK:
+ node->left->next = node;
+ break;
+ case CONCAT:
+ node->left->next = node->right->first;
+ node->right->next = node->next;
+ break;
+ default:
+ if (node->left)
+ node->left->next = node->next;
+ if (node->right)
+ node->right->next = node->next;
+ break;
+ }
+ return REG_NOERROR;
+}
+
+/* Pass 3: link all DFA nodes to their NEXT node (any order will do). */
+static reg_errcode_t
+link_nfa_nodes (void *extra, bin_tree_t *node)
+{
+ re_dfa_t *dfa = (re_dfa_t *) extra;
+ Idx idx = node->node_idx;
+ reg_errcode_t err = REG_NOERROR;
+
+ switch (node->token.type)
+ {
+ case CONCAT:
+ break;
+
+ case END_OF_RE:
+ assert (node->next == NULL);
+ break;
+
+ case OP_DUP_ASTERISK:
+ case OP_ALT:
+ {
+ Idx left, right;
+ dfa->has_plural_match = 1;
+ if (node->left != NULL)
+ left = node->left->first->node_idx;
+ else
+ left = node->next->node_idx;
+ if (node->right != NULL)
+ right = node->right->first->node_idx;
+ else
+ right = node->next->node_idx;
+ assert (REG_VALID_INDEX (left));
+ assert (REG_VALID_INDEX (right));
+ err = re_node_set_init_2 (dfa->edests + idx, left, right);
+ }
+ break;
+
+ case ANCHOR:
+ case OP_OPEN_SUBEXP:
+ case OP_CLOSE_SUBEXP:
+ err = re_node_set_init_1 (dfa->edests + idx, node->next->node_idx);
+ break;
+
+ case OP_BACK_REF:
+ dfa->nexts[idx] = node->next->node_idx;
+ if (node->token.type == OP_BACK_REF)
+ err = re_node_set_init_1 (dfa->edests + idx, dfa->nexts[idx]);
+ break;
+
+ default:
+ assert (!IS_EPSILON_NODE (node->token.type));
+ dfa->nexts[idx] = node->next->node_idx;
+ break;
+ }
+
+ return err;
+}
+
+/* Duplicate the epsilon closure of the node ROOT_NODE.
+ Note that duplicated nodes have constraint INIT_CONSTRAINT in addition
+ to their own constraint. */
+
+static reg_errcode_t
+internal_function
+duplicate_node_closure (re_dfa_t *dfa, Idx top_org_node, Idx top_clone_node,
+ Idx root_node, unsigned int init_constraint)
+{
+ Idx org_node, clone_node;
+ bool ok;
+ unsigned int constraint = init_constraint;
+ for (org_node = top_org_node, clone_node = top_clone_node;;)
+ {
+ Idx org_dest, clone_dest;
+ if (dfa->nodes[org_node].type == OP_BACK_REF)
+ {
+ /* If the back reference epsilon-transit, its destination must
+ also have the constraint. Then duplicate the epsilon closure
+ of the destination of the back reference, and store it in
+ edests of the back reference. */
+ org_dest = dfa->nexts[org_node];
+ re_node_set_empty (dfa->edests + clone_node);
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ dfa->nexts[clone_node] = dfa->nexts[org_node];
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ else if (dfa->edests[org_node].nelem == 0)
+ {
+ /* In case of the node can't epsilon-transit, don't duplicate the
+ destination and store the original destination as the
+ destination of the node. */
+ dfa->nexts[clone_node] = dfa->nexts[org_node];
+ break;
+ }
+ else if (dfa->edests[org_node].nelem == 1)
+ {
+ /* In case of the node can epsilon-transit, and it has only one
+ destination. */
+ org_dest = dfa->edests[org_node].elems[0];
+ re_node_set_empty (dfa->edests + clone_node);
+ /* If the node is root_node itself, it means the epsilon closure
+ has a loop. Then tie it to the destination of the root_node. */
+ if (org_node == root_node && clone_node != org_node)
+ {
+ ok = re_node_set_insert (dfa->edests + clone_node, org_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ break;
+ }
+ /* In case the node has another constraint, append it. */
+ constraint |= dfa->nodes[org_node].constraint;
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ else /* dfa->edests[org_node].nelem == 2 */
+ {
+ /* In case of the node can epsilon-transit, and it has two
+ destinations. In the bin_tree_t and DFA, that's '|' and '*'. */
+ org_dest = dfa->edests[org_node].elems[0];
+ re_node_set_empty (dfa->edests + clone_node);
+ /* Search for a duplicated node which satisfies the constraint. */
+ clone_dest = search_duplicated_node (dfa, org_dest, constraint);
+ if (clone_dest == REG_MISSING)
+ {
+ /* There is no such duplicated node, create a new one. */
+ reg_errcode_t err;
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ err = duplicate_node_closure (dfa, org_dest, clone_dest,
+ root_node, constraint);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ {
+ /* There is a duplicated node which satisfies the constraint,
+ use it to avoid infinite loop. */
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+
+ org_dest = dfa->edests[org_node].elems[1];
+ clone_dest = duplicate_node (dfa, org_dest, constraint);
+ if (BE (clone_dest == REG_MISSING, 0))
+ return REG_ESPACE;
+ ok = re_node_set_insert (dfa->edests + clone_node, clone_dest);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ org_node = org_dest;
+ clone_node = clone_dest;
+ }
+ return REG_NOERROR;
+}
+
+/* Search for a node which is duplicated from the node ORG_NODE, and
+ satisfies the constraint CONSTRAINT. */
+
+static Idx
+search_duplicated_node (const re_dfa_t *dfa, Idx org_node,
+ unsigned int constraint)
+{
+ Idx idx;
+ for (idx = dfa->nodes_len - 1; dfa->nodes[idx].duplicated && idx > 0; --idx)
+ {
+ if (org_node == dfa->org_indices[idx]
+ && constraint == dfa->nodes[idx].constraint)
+ return idx; /* Found. */
+ }
+ return REG_MISSING; /* Not found. */
+}
+
+/* Duplicate the node whose index is ORG_IDX and set the constraint CONSTRAINT.
+ Return the index of the new node, or REG_MISSING if insufficient storage is
+ available. */
+
+static Idx
+duplicate_node (re_dfa_t *dfa, Idx org_idx, unsigned int constraint)
+{
+ Idx dup_idx = re_dfa_add_node (dfa, dfa->nodes[org_idx]);
+ if (BE (dup_idx != REG_MISSING, 1))
+ {
+ dfa->nodes[dup_idx].constraint = constraint;
+ dfa->nodes[dup_idx].constraint |= dfa->nodes[org_idx].constraint;
+ dfa->nodes[dup_idx].duplicated = 1;
+
+ /* Store the index of the original node. */
+ dfa->org_indices[dup_idx] = org_idx;
+ }
+ return dup_idx;
+}
+
+static reg_errcode_t
+calc_inveclosure (re_dfa_t *dfa)
+{
+ Idx src, idx;
+ bool ok;
+ for (idx = 0; idx < dfa->nodes_len; ++idx)
+ re_node_set_init_empty (dfa->inveclosures + idx);
+
+ for (src = 0; src < dfa->nodes_len; ++src)
+ {
+ Idx *elems = dfa->eclosures[src].elems;
+ for (idx = 0; idx < dfa->eclosures[src].nelem; ++idx)
+ {
+ ok = re_node_set_insert_last (dfa->inveclosures + elems[idx], src);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Calculate "eclosure" for all the node in DFA. */
+
+static reg_errcode_t
+calc_eclosure (re_dfa_t *dfa)
+{
+ Idx node_idx;
+ bool incomplete;
+#ifdef DEBUG
+ assert (dfa->nodes_len > 0);
+#endif
+ incomplete = false;
+ /* For each nodes, calculate epsilon closure. */
+ for (node_idx = 0; ; ++node_idx)
+ {
+ reg_errcode_t err;
+ re_node_set eclosure_elem;
+ if (node_idx == dfa->nodes_len)
+ {
+ if (!incomplete)
+ break;
+ incomplete = false;
+ node_idx = 0;
+ }
+
+#ifdef DEBUG
+ assert (dfa->eclosures[node_idx].nelem != REG_MISSING);
+#endif
+
+ /* If we have already calculated, skip it. */
+ if (dfa->eclosures[node_idx].nelem != 0)
+ continue;
+ /* Calculate epsilon closure of `node_idx'. */
+ err = calc_eclosure_iter (&eclosure_elem, dfa, node_idx, true);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (dfa->eclosures[node_idx].nelem == 0)
+ {
+ incomplete = true;
+ re_node_set_free (&eclosure_elem);
+ }
+ }
+ return REG_NOERROR;
+}
+
+/* Calculate epsilon closure of NODE. */
+
+static reg_errcode_t
+calc_eclosure_iter (re_node_set *new_set, re_dfa_t *dfa, Idx node, bool root)
+{
+ reg_errcode_t err;
+ Idx i;
+ re_node_set eclosure;
+ bool ok;
+ bool incomplete = false;
+ err = re_node_set_alloc (&eclosure, dfa->edests[node].nelem + 1);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* This indicates that we are calculating this node now.
+ We reference this value to avoid infinite loop. */
+ dfa->eclosures[node].nelem = REG_MISSING;
+
+ /* If the current node has constraints, duplicate all nodes
+ since they must inherit the constraints. */
+ if (dfa->nodes[node].constraint
+ && dfa->edests[node].nelem
+ && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
+ {
+ err = duplicate_node_closure (dfa, node, node, node,
+ dfa->nodes[node].constraint);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ /* Expand each epsilon destination nodes. */
+ if (IS_EPSILON_NODE(dfa->nodes[node].type))
+ for (i = 0; i < dfa->edests[node].nelem; ++i)
+ {
+ re_node_set eclosure_elem;
+ Idx edest = dfa->edests[node].elems[i];
+ /* If calculating the epsilon closure of `edest' is in progress,
+ return intermediate result. */
+ if (dfa->eclosures[edest].nelem == REG_MISSING)
+ {
+ incomplete = true;
+ continue;
+ }
+ /* If we haven't calculated the epsilon closure of `edest' yet,
+ calculate now. Otherwise use calculated epsilon closure. */
+ if (dfa->eclosures[edest].nelem == 0)
+ {
+ err = calc_eclosure_iter (&eclosure_elem, dfa, edest, false);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ eclosure_elem = dfa->eclosures[edest];
+ /* Merge the epsilon closure of `edest'. */
+ err = re_node_set_merge (&eclosure, &eclosure_elem);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ /* If the epsilon closure of `edest' is incomplete,
+ the epsilon closure of this node is also incomplete. */
+ if (dfa->eclosures[edest].nelem == 0)
+ {
+ incomplete = true;
+ re_node_set_free (&eclosure_elem);
+ }
+ }
+
+ /* An epsilon closure includes itself. */
+ ok = re_node_set_insert (&eclosure, node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ if (incomplete && !root)
+ dfa->eclosures[node].nelem = 0;
+ else
+ dfa->eclosures[node] = eclosure;
+ *new_set = eclosure;
+ return REG_NOERROR;
+}
+
+/* Functions for token which are used in the parser. */
+
+/* Fetch a token from INPUT.
+ We must not use this function inside bracket expressions. */
+
+static void
+internal_function
+fetch_token (re_token_t *result, re_string_t *input, reg_syntax_t syntax)
+{
+ re_string_skip_bytes (input, peek_token (result, input, syntax));
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+ We must not use this function inside bracket expressions. */
+
+static int
+internal_function
+peek_token (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+ unsigned char c;
+
+ if (re_string_eoi (input))
+ {
+ token->type = END_OF_RE;
+ return 0;
+ }
+
+ c = re_string_peek_byte (input, 0);
+ token->opr.c = c;
+
+ token->word_char = 0;
+#ifdef RE_ENABLE_I18N
+ token->mb_partial = 0;
+ if (input->mb_cur_max > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+ token->mb_partial = 1;
+ return 1;
+ }
+#endif
+ if (c == '\\')
+ {
+ unsigned char c2;
+ if (re_string_cur_idx (input) + 1 >= re_string_length (input))
+ {
+ token->type = BACK_SLASH;
+ return 1;
+ }
+
+ c2 = re_string_peek_byte_case (input, 1);
+ token->opr.c = c2;
+ token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc = re_string_wchar_at (input,
+ re_string_cur_idx (input) + 1);
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+ }
+ else
+#endif
+ token->word_char = IS_WORD_CHAR (c2) != 0;
+
+ switch (c2)
+ {
+ case '|':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_NO_BK_VBAR))
+ token->type = OP_ALT;
+ break;
+ case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ if (!(syntax & RE_NO_BK_REFS))
+ {
+ token->type = OP_BACK_REF;
+ token->opr.idx = c2 - '1';
+ }
+ break;
+ case '<':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_FIRST;
+ }
+ break;
+ case '>':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_LAST;
+ }
+ break;
+ case 'b':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = WORD_DELIM;
+ }
+ break;
+ case 'B':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = NOT_WORD_DELIM;
+ }
+ break;
+ case 'w':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_WORD;
+ break;
+ case 'W':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_NOTWORD;
+ break;
+ case 's':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_SPACE;
+ break;
+ case 'S':
+ if (!(syntax & RE_NO_GNU_OPS))
+ token->type = OP_NOTSPACE;
+ break;
+ case '`':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = BUF_FIRST;
+ }
+ break;
+ case '\'':
+ if (!(syntax & RE_NO_GNU_OPS))
+ {
+ token->type = ANCHOR;
+ token->opr.ctx_type = BUF_LAST;
+ }
+ break;
+ case '(':
+ if (!(syntax & RE_NO_BK_PARENS))
+ token->type = OP_OPEN_SUBEXP;
+ break;
+ case ')':
+ if (!(syntax & RE_NO_BK_PARENS))
+ token->type = OP_CLOSE_SUBEXP;
+ break;
+ case '+':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_PLUS;
+ break;
+ case '?':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_QUESTION;
+ break;
+ case '{':
+ if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+ token->type = OP_OPEN_DUP_NUM;
+ break;
+ case '}':
+ if ((syntax & RE_INTERVALS) && (!(syntax & RE_NO_BK_BRACES)))
+ token->type = OP_CLOSE_DUP_NUM;
+ break;
+ default:
+ break;
+ }
+ return 2;
+ }
+
+ token->type = CHARACTER;
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc = re_string_wchar_at (input, re_string_cur_idx (input));
+ token->word_char = IS_WIDE_WORD_CHAR (wc) != 0;
+ }
+ else
+#endif
+ token->word_char = IS_WORD_CHAR (token->opr.c);
+
+ switch (c)
+ {
+ case '\n':
+ if (syntax & RE_NEWLINE_ALT)
+ token->type = OP_ALT;
+ break;
+ case '|':
+ if (!(syntax & RE_LIMITED_OPS) && (syntax & RE_NO_BK_VBAR))
+ token->type = OP_ALT;
+ break;
+ case '*':
+ token->type = OP_DUP_ASTERISK;
+ break;
+ case '+':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_PLUS;
+ break;
+ case '?':
+ if (!(syntax & RE_LIMITED_OPS) && !(syntax & RE_BK_PLUS_QM))
+ token->type = OP_DUP_QUESTION;
+ break;
+ case '{':
+ if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+ token->type = OP_OPEN_DUP_NUM;
+ break;
+ case '}':
+ if ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES))
+ token->type = OP_CLOSE_DUP_NUM;
+ break;
+ case '(':
+ if (syntax & RE_NO_BK_PARENS)
+ token->type = OP_OPEN_SUBEXP;
+ break;
+ case ')':
+ if (syntax & RE_NO_BK_PARENS)
+ token->type = OP_CLOSE_SUBEXP;
+ break;
+ case '[':
+ token->type = OP_OPEN_BRACKET;
+ break;
+ case '.':
+ token->type = OP_PERIOD;
+ break;
+ case '^':
+ if (!(syntax & (RE_CONTEXT_INDEP_ANCHORS | RE_CARET_ANCHORS_HERE)) &&
+ re_string_cur_idx (input) != 0)
+ {
+ char prev = re_string_peek_byte (input, -1);
+ if (!(syntax & RE_NEWLINE_ALT) || prev != '\n')
+ break;
+ }
+ token->type = ANCHOR;
+ token->opr.ctx_type = LINE_FIRST;
+ break;
+ case '$':
+ if (!(syntax & RE_CONTEXT_INDEP_ANCHORS) &&
+ re_string_cur_idx (input) + 1 != re_string_length (input))
+ {
+ re_token_t next;
+ re_string_skip_bytes (input, 1);
+ peek_token (&next, input, syntax);
+ re_string_skip_bytes (input, -1);
+ if (next.type != OP_ALT && next.type != OP_CLOSE_SUBEXP)
+ break;
+ }
+ token->type = ANCHOR;
+ token->opr.ctx_type = LINE_LAST;
+ break;
+ default:
+ break;
+ }
+ return 1;
+}
+
+/* Peek a token from INPUT, and return the length of the token.
+ We must not use this function out of bracket expressions. */
+
+static int
+internal_function
+peek_token_bracket (re_token_t *token, re_string_t *input, reg_syntax_t syntax)
+{
+ unsigned char c;
+ if (re_string_eoi (input))
+ {
+ token->type = END_OF_RE;
+ return 0;
+ }
+ c = re_string_peek_byte (input, 0);
+ token->opr.c = c;
+
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1 &&
+ !re_string_first_byte (input, re_string_cur_idx (input)))
+ {
+ token->type = CHARACTER;
+ return 1;
+ }
+#endif /* RE_ENABLE_I18N */
+
+ if (c == '\\' && (syntax & RE_BACKSLASH_ESCAPE_IN_LISTS)
+ && re_string_cur_idx (input) + 1 < re_string_length (input))
+ {
+ /* In this case, '\' escape a character. */
+ unsigned char c2;
+ re_string_skip_bytes (input, 1);
+ c2 = re_string_peek_byte (input, 0);
+ token->opr.c = c2;
+ token->type = CHARACTER;
+ return 1;
+ }
+ if (c == '[') /* '[' is a special char in a bracket exps. */
+ {
+ unsigned char c2;
+ int token_len;
+ if (re_string_cur_idx (input) + 1 < re_string_length (input))
+ c2 = re_string_peek_byte (input, 1);
+ else
+ c2 = 0;
+ token->opr.c = c2;
+ token_len = 2;
+ switch (c2)
+ {
+ case '.':
+ token->type = OP_OPEN_COLL_ELEM;
+ break;
+ case '=':
+ token->type = OP_OPEN_EQUIV_CLASS;
+ break;
+ case ':':
+ if (syntax & RE_CHAR_CLASSES)
+ {
+ token->type = OP_OPEN_CHAR_CLASS;
+ break;
+ }
+ /* else fall through. */
+ default:
+ token->type = CHARACTER;
+ token->opr.c = c;
+ token_len = 1;
+ break;
+ }
+ return token_len;
+ }
+ switch (c)
+ {
+ case '-':
+ token->type = OP_CHARSET_RANGE;
+ break;
+ case ']':
+ token->type = OP_CLOSE_BRACKET;
+ break;
+ case '^':
+ token->type = OP_NON_MATCH_LIST;
+ break;
+ default:
+ token->type = CHARACTER;
+ }
+ return 1;
+}
+
+/* Functions for parser. */
+
+/* Entry point of the parser.
+ Parse the regular expression REGEXP and return the structure tree.
+ If an error is occured, ERR is set by error code, and return NULL.
+ This function build the following tree, from regular expression <reg_exp>:
+ CAT
+ / \
+ / \
+ <reg_exp> EOR
+
+ CAT means concatenation.
+ EOR means end of regular expression. */
+
+static bin_tree_t *
+parse (re_string_t *regexp, regex_t *preg, reg_syntax_t syntax,
+ reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree, *eor, *root;
+ re_token_t current_token;
+ dfa->syntax = syntax;
+ fetch_token (&current_token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+ tree = parse_reg_exp (regexp, preg, &current_token, syntax, 0, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ eor = create_tree (dfa, NULL, NULL, END_OF_RE);
+ if (tree != NULL)
+ root = create_tree (dfa, tree, eor, CONCAT);
+ else
+ root = eor;
+ if (BE (eor == NULL || root == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ return root;
+}
+
+/* This function build the following tree, from regular expression
+ <branch1>|<branch2>:
+ ALT
+ / \
+ / \
+ <branch1> <branch2>
+
+ ALT means alternative, which represents the operator `|'. */
+
+static bin_tree_t *
+parse_reg_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree, *branch = NULL;
+ tree = parse_branch (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+
+ while (token->type == OP_ALT)
+ {
+ fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+ if (token->type != OP_ALT && token->type != END_OF_RE
+ && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+ {
+ branch = parse_branch (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && branch == NULL, 0))
+ return NULL;
+ }
+ else
+ branch = NULL;
+ tree = create_tree (dfa, tree, branch, OP_ALT);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ return tree;
+}
+
+/* This function build the following tree, from regular expression
+ <exp1><exp2>:
+ CAT
+ / \
+ / \
+ <exp1> <exp2>
+
+ CAT means concatenation. */
+
+static bin_tree_t *
+parse_branch (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ bin_tree_t *tree, *expr;
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ tree = parse_expression (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+
+ while (token->type != OP_ALT && token->type != END_OF_RE
+ && (nest == 0 || token->type != OP_CLOSE_SUBEXP))
+ {
+ expr = parse_expression (regexp, preg, token, syntax, nest, err);
+ if (BE (*err != REG_NOERROR && expr == NULL, 0))
+ {
+ return NULL;
+ }
+ if (tree != NULL && expr != NULL)
+ {
+ tree = create_tree (dfa, tree, expr, CONCAT);
+ if (tree == NULL)
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ else if (tree == NULL)
+ tree = expr;
+ /* Otherwise expr == NULL, we don't need to create new tree. */
+ }
+ return tree;
+}
+
+/* This function build the following tree, from regular expression a*:
+ *
+ |
+ a
+*/
+
+static bin_tree_t *
+parse_expression (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree;
+ switch (token->type)
+ {
+ case CHARACTER:
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ while (!re_string_eoi (regexp)
+ && !re_string_first_byte (regexp, re_string_cur_idx (regexp)))
+ {
+ bin_tree_t *mbc_remain;
+ fetch_token (token, regexp, syntax);
+ mbc_remain = create_token_tree (dfa, NULL, NULL, token);
+ tree = create_tree (dfa, tree, mbc_remain, CONCAT);
+ if (BE (mbc_remain == NULL || tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ }
+#endif
+ break;
+ case OP_OPEN_SUBEXP:
+ tree = parse_sub_exp (regexp, preg, token, syntax, nest + 1, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_OPEN_BRACKET:
+ tree = parse_bracket_exp (regexp, dfa, token, syntax, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_BACK_REF:
+ if (!BE (dfa->completed_bkref_map & (1 << token->opr.idx), 1))
+ {
+ *err = REG_ESUBREG;
+ return NULL;
+ }
+ dfa->used_bkref_map |= 1 << token->opr.idx;
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ ++dfa->nbackref;
+ dfa->has_mb_node = 1;
+ break;
+ case OP_OPEN_DUP_NUM:
+ if (syntax & RE_CONTEXT_INVALID_DUP)
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ /* FALLTHROUGH */
+ case OP_DUP_ASTERISK:
+ case OP_DUP_PLUS:
+ case OP_DUP_QUESTION:
+ if (syntax & RE_CONTEXT_INVALID_OPS)
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ else if (syntax & RE_CONTEXT_INDEP_OPS)
+ {
+ fetch_token (token, regexp, syntax);
+ return parse_expression (regexp, preg, token, syntax, nest, err);
+ }
+ /* else fall through */
+ case OP_CLOSE_SUBEXP:
+ if ((token->type == OP_CLOSE_SUBEXP) &&
+ !(syntax & RE_UNMATCHED_RIGHT_PAREN_ORD))
+ {
+ *err = REG_ERPAREN;
+ return NULL;
+ }
+ /* else fall through */
+ case OP_CLOSE_DUP_NUM:
+ /* We treat it as a normal character. */
+
+ /* Then we can these characters as normal characters. */
+ token->type = CHARACTER;
+ /* mb_partial and word_char bits should be initialized already
+ by peek_token. */
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ break;
+ case ANCHOR:
+ if ((token->opr.ctx_type
+ & (WORD_DELIM | NOT_WORD_DELIM | WORD_FIRST | WORD_LAST))
+ && dfa->word_ops_used == 0)
+ init_word_char (dfa);
+ if (token->opr.ctx_type == WORD_DELIM
+ || token->opr.ctx_type == NOT_WORD_DELIM)
+ {
+ bin_tree_t *tree_first, *tree_last;
+ if (token->opr.ctx_type == WORD_DELIM)
+ {
+ token->opr.ctx_type = WORD_FIRST;
+ tree_first = create_token_tree (dfa, NULL, NULL, token);
+ token->opr.ctx_type = WORD_LAST;
+ }
+ else
+ {
+ token->opr.ctx_type = INSIDE_WORD;
+ tree_first = create_token_tree (dfa, NULL, NULL, token);
+ token->opr.ctx_type = INSIDE_NOTWORD;
+ }
+ tree_last = create_token_tree (dfa, NULL, NULL, token);
+ tree = create_tree (dfa, tree_first, tree_last, OP_ALT);
+ if (BE (tree_first == NULL || tree_last == NULL || tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ else
+ {
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ }
+ /* We must return here, since ANCHORs can't be followed
+ by repetition operators.
+ eg. RE"^*" is invalid or "<ANCHOR(^)><CHAR(*)>",
+ it must not be "<ANCHOR(^)><REPEAT(*)>". */
+ fetch_token (token, regexp, syntax);
+ return tree;
+ case OP_PERIOD:
+ tree = create_token_tree (dfa, NULL, NULL, token);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ if (dfa->mb_cur_max > 1)
+ dfa->has_mb_node = 1;
+ break;
+ case OP_WORD:
+ case OP_NOTWORD:
+ tree = build_charclass_op (dfa, regexp->trans,
+ (const unsigned char *) "alnum",
+ (const unsigned char *) "_",
+ token->type == OP_NOTWORD, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_SPACE:
+ case OP_NOTSPACE:
+ tree = build_charclass_op (dfa, regexp->trans,
+ (const unsigned char *) "space",
+ (const unsigned char *) "",
+ token->type == OP_NOTSPACE, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ break;
+ case OP_ALT:
+ case END_OF_RE:
+ return NULL;
+ case BACK_SLASH:
+ *err = REG_EESCAPE;
+ return NULL;
+ default:
+ /* Must not happen? */
+#ifdef DEBUG
+ assert (0);
+#endif
+ return NULL;
+ }
+ fetch_token (token, regexp, syntax);
+
+ while (token->type == OP_DUP_ASTERISK || token->type == OP_DUP_PLUS
+ || token->type == OP_DUP_QUESTION || token->type == OP_OPEN_DUP_NUM)
+ {
+ tree = parse_dup_op (tree, regexp, dfa, token, syntax, err);
+ if (BE (*err != REG_NOERROR && tree == NULL, 0))
+ return NULL;
+ /* In BRE consecutive duplications are not allowed. */
+ if ((syntax & RE_CONTEXT_INVALID_DUP)
+ && (token->type == OP_DUP_ASTERISK
+ || token->type == OP_OPEN_DUP_NUM))
+ {
+ *err = REG_BADRPT;
+ return NULL;
+ }
+ }
+
+ return tree;
+}
+
+/* This function build the following tree, from regular expression
+ (<reg_exp>):
+ SUBEXP
+ |
+ <reg_exp>
+*/
+
+static bin_tree_t *
+parse_sub_exp (re_string_t *regexp, regex_t *preg, re_token_t *token,
+ reg_syntax_t syntax, Idx nest, reg_errcode_t *err)
+{
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+ bin_tree_t *tree;
+ size_t cur_nsub;
+ cur_nsub = preg->re_nsub++;
+
+ fetch_token (token, regexp, syntax | RE_CARET_ANCHORS_HERE);
+
+ /* The subexpression may be a null string. */
+ if (token->type == OP_CLOSE_SUBEXP)
+ tree = NULL;
+ else
+ {
+ tree = parse_reg_exp (regexp, preg, token, syntax, nest, err);
+ if (BE (*err == REG_NOERROR && token->type != OP_CLOSE_SUBEXP, 0))
+ *err = REG_EPAREN;
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+
+ if (cur_nsub <= '9' - '1')
+ dfa->completed_bkref_map |= 1 << cur_nsub;
+
+ tree = create_tree (dfa, tree, NULL, SUBEXP);
+ if (BE (tree == NULL, 0))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+ tree->token.opr.idx = cur_nsub;
+ return tree;
+}
+
+/* This function parse repetition operators like "*", "+", "{1,3}" etc. */
+
+static bin_tree_t *
+parse_dup_op (bin_tree_t *elem, re_string_t *regexp, re_dfa_t *dfa,
+ re_token_t *token, reg_syntax_t syntax, reg_errcode_t *err)
+{
+ bin_tree_t *tree = NULL, *old_tree = NULL;
+ Idx i, start, end, start_idx = re_string_cur_idx (regexp);
+ re_token_t start_token = *token;
+
+ if (token->type == OP_OPEN_DUP_NUM)
+ {
+ end = 0;
+ start = fetch_number (regexp, token, syntax);
+ if (start == REG_MISSING)
+ {
+ if (token->type == CHARACTER && token->opr.c == ',')
+ start = 0; /* We treat "{,m}" as "{0,m}". */
+ else
+ {
+ *err = REG_BADBR; /* <re>{} is invalid. */
+ return NULL;
+ }
+ }
+ if (BE (start != REG_ERROR, 1))
+ {
+ /* We treat "{n}" as "{n,n}". */
+ end = ((token->type == OP_CLOSE_DUP_NUM) ? start
+ : ((token->type == CHARACTER && token->opr.c == ',')
+ ? fetch_number (regexp, token, syntax) : REG_ERROR));
+ }
+ if (BE (start == REG_ERROR || end == REG_ERROR, 0))
+ {
+ /* Invalid sequence. */
+ if (BE (!(syntax & RE_INVALID_INTERVAL_ORD), 0))
+ {
+ if (token->type == END_OF_RE)
+ *err = REG_EBRACE;
+ else
+ *err = REG_BADBR;
+
+ return NULL;
+ }
+
+ /* If the syntax bit is set, rollback. */
+ re_string_set_index (regexp, start_idx);
+ *token = start_token;
+ token->type = CHARACTER;
+ /* mb_partial and word_char bits should be already initialized by
+ peek_token. */
+ return elem;
+ }
+
+ if (BE ((end != REG_MISSING && start > end)
+ || token->type != OP_CLOSE_DUP_NUM, 0))
+ {
+ /* First number greater than second. */
+ *err = REG_BADBR;
+ return NULL;
+ }
+ }
+ else
+ {
+ start = (token->type == OP_DUP_PLUS) ? 1 : 0;
+ end = (token->type == OP_DUP_QUESTION) ? 1 : REG_MISSING;
+ }
+
+ fetch_token (token, regexp, syntax);
+
+ if (BE (elem == NULL, 0))
+ return NULL;
+ if (BE (start == 0 && end == 0, 0))
+ {
+ postorder (elem, free_tree, NULL);
+ return NULL;
+ }
+
+ /* Extract "<re>{n,m}" to "<re><re>...<re><re>{0,<m-n>}". */
+ if (BE (start > 0, 0))
+ {
+ tree = elem;
+ for (i = 2; i <= start; ++i)
+ {
+ elem = duplicate_tree (elem, dfa);
+ tree = create_tree (dfa, tree, elem, CONCAT);
+ if (BE (elem == NULL || tree == NULL, 0))
+ goto parse_dup_op_espace;
+ }
+
+ if (start == end)
+ return tree;
+
+ /* Duplicate ELEM before it is marked optional. */
+ elem = duplicate_tree (elem, dfa);
+ old_tree = tree;
+ }
+ else
+ old_tree = NULL;
+
+ if (elem->token.type == SUBEXP)
+ postorder (elem, mark_opt_subexp, (void *) (long) elem->token.opr.idx);
+
+ tree = create_tree (dfa, elem, NULL,
+ (end == REG_MISSING ? OP_DUP_ASTERISK : OP_ALT));
+ if (BE (tree == NULL, 0))
+ goto parse_dup_op_espace;
+
+/* From gnulib's "intprops.h":
+ True if the arithmetic type T is signed. */
+#define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+ /* This loop is actually executed only when end != REG_MISSING,
+ to rewrite <re>{0,n} as (<re>(<re>...<re>?)?)?... We have
+ already created the start+1-th copy. */
+ if (TYPE_SIGNED (Idx) || end != REG_MISSING)
+ for (i = start + 2; i <= end; ++i)
+ {
+ elem = duplicate_tree (elem, dfa);
+ tree = create_tree (dfa, tree, elem, CONCAT);
+ if (BE (elem == NULL || tree == NULL, 0))
+ goto parse_dup_op_espace;
+
+ tree = create_tree (dfa, tree, NULL, OP_ALT);
+ if (BE (tree == NULL, 0))
+ goto parse_dup_op_espace;
+ }
+
+ if (old_tree)
+ tree = create_tree (dfa, old_tree, tree, CONCAT);
+
+ return tree;
+
+ parse_dup_op_espace:
+ *err = REG_ESPACE;
+ return NULL;
+}
+
+/* Size of the names for collating symbol/equivalence_class/character_class.
+ I'm not sure, but maybe enough. */
+#define BRACKET_NAME_BUF_SIZE 32
+
+#ifndef _LIBC
+ /* Local function for parse_bracket_exp only used in case of NOT _LIBC.
+ Build the range expression which starts from START_ELEM, and ends
+ at END_ELEM. The result are written to MBCSET and SBCSET.
+ RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+ mbcset->range_ends, is a pointer argument sinse we may
+ update it. */
+
+static reg_errcode_t
+internal_function
+# ifdef RE_ENABLE_I18N
+build_range_exp (bitset_t sbcset, re_charset_t *mbcset, Idx *range_alloc,
+ bracket_elem_t *start_elem, bracket_elem_t *end_elem)
+# else /* not RE_ENABLE_I18N */
+build_range_exp (bitset_t sbcset, bracket_elem_t *start_elem,
+ bracket_elem_t *end_elem)
+# endif /* not RE_ENABLE_I18N */
+{
+ unsigned int start_ch, end_ch;
+ /* Equivalence Classes and Character Classes can't be a range start/end. */
+ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+ 0))
+ return REG_ERANGE;
+
+ /* We can handle no multi character collating elements without libc
+ support. */
+ if (BE ((start_elem->type == COLL_SYM
+ && strlen ((char *) start_elem->opr.name) > 1)
+ || (end_elem->type == COLL_SYM
+ && strlen ((char *) end_elem->opr.name) > 1), 0))
+ return REG_ECOLLATE;
+
+# ifdef RE_ENABLE_I18N
+ {
+ wchar_t wc;
+ wint_t start_wc;
+ wint_t end_wc;
+ wchar_t cmp_buf[6] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+
+ start_ch = ((start_elem->type == SB_CHAR) ? start_elem->opr.ch
+ : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+ : 0));
+ end_ch = ((end_elem->type == SB_CHAR) ? end_elem->opr.ch
+ : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+ : 0));
+ start_wc = ((start_elem->type == SB_CHAR || start_elem->type == COLL_SYM)
+ ? __btowc (start_ch) : start_elem->opr.wch);
+ end_wc = ((end_elem->type == SB_CHAR || end_elem->type == COLL_SYM)
+ ? __btowc (end_ch) : end_elem->opr.wch);
+ if (start_wc == WEOF || end_wc == WEOF)
+ return REG_ECOLLATE;
+ cmp_buf[0] = start_wc;
+ cmp_buf[4] = end_wc;
+ if (wcscoll (cmp_buf, cmp_buf + 4) > 0)
+ return REG_ERANGE;
+
+ /* Got valid collation sequence values, add them as a new entry.
+ However, for !_LIBC we have no collation elements: if the
+ character set is single byte, the single byte character set
+ that we build below suffices. parse_bracket_exp passes
+ no MBCSET if dfa->mb_cur_max == 1. */
+ if (mbcset)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+ {
+ /* There is not enough space, need realloc. */
+ wchar_t *new_array_start, *new_array_end;
+ Idx new_nranges;
+
+ /* +1 in case of mbcset->nranges is 0. */
+ new_nranges = 2 * mbcset->nranges + 1;
+ /* Use realloc since mbcset->range_starts and mbcset->range_ends
+ are NULL if *range_alloc == 0. */
+ new_array_start = re_realloc (mbcset->range_starts, wchar_t,
+ new_nranges);
+ new_array_end = re_realloc (mbcset->range_ends, wchar_t,
+ new_nranges);
+
+ if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ return REG_ESPACE;
+
+ mbcset->range_starts = new_array_start;
+ mbcset->range_ends = new_array_end;
+ *range_alloc = new_nranges;
+ }
+
+ mbcset->range_starts[mbcset->nranges] = start_wc;
+ mbcset->range_ends[mbcset->nranges++] = end_wc;
+ }
+
+ /* Build the table for single byte characters. */
+ for (wc = 0; wc < SBC_MAX; ++wc)
+ {
+ cmp_buf[2] = wc;
+ if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+ && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ bitset_set (sbcset, wc);
+ }
+ }
+# else /* not RE_ENABLE_I18N */
+ {
+ unsigned int ch;
+ start_ch = ((start_elem->type == SB_CHAR ) ? start_elem->opr.ch
+ : ((start_elem->type == COLL_SYM) ? start_elem->opr.name[0]
+ : 0));
+ end_ch = ((end_elem->type == SB_CHAR ) ? end_elem->opr.ch
+ : ((end_elem->type == COLL_SYM) ? end_elem->opr.name[0]
+ : 0));
+ if (start_ch > end_ch)
+ return REG_ERANGE;
+ /* Build the table for single byte characters. */
+ for (ch = 0; ch < SBC_MAX; ++ch)
+ if (start_ch <= ch && ch <= end_ch)
+ bitset_set (sbcset, ch);
+ }
+# endif /* not RE_ENABLE_I18N */
+ return REG_NOERROR;
+}
+#endif /* not _LIBC */
+
+#ifndef _LIBC
+/* Helper function for parse_bracket_exp only used in case of NOT _LIBC..
+ Build the collating element which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+ pointer argument since we may update it. */
+
+static reg_errcode_t
+internal_function
+build_collating_symbol (bitset_t sbcset,
+# ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset, Idx *coll_sym_alloc,
+# endif
+ const unsigned char *name)
+{
+ size_t name_len = strlen ((const char *) name);
+ if (BE (name_len != 1, 0))
+ return REG_ECOLLATE;
+ else
+ {
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+}
+#endif /* not _LIBC */
+
+/* This function parse bracket expression like "[abc]", "[a-c]",
+ "[[.a-a.]]" etc. */
+
+static bin_tree_t *
+parse_bracket_exp (re_string_t *regexp, re_dfa_t *dfa, re_token_t *token,
+ reg_syntax_t syntax, reg_errcode_t *err)
+{
+#ifdef _LIBC
+ const unsigned char *collseqmb;
+ const char *collseqwc;
+ uint32_t nrules;
+ int32_t table_size;
+ const int32_t *symb_table;
+ const unsigned char *extra;
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Seek the collating symbol entry correspondings to NAME.
+ Return the index of the symbol in the SYMB_TABLE. */
+
+ auto inline int32_t
+ __attribute ((always_inline))
+ seek_collating_symbol_entry (name, name_len)
+ const unsigned char *name;
+ size_t name_len;
+ {
+ int32_t hash = elem_hash ((const char *) name, name_len);
+ int32_t elem = hash % table_size;
+ if (symb_table[2 * elem] != 0)
+ {
+ int32_t second = hash % (table_size - 2) + 1;
+
+ do
+ {
+ /* First compare the hashing value. */
+ if (symb_table[2 * elem] == hash
+ /* Compare the length of the name. */
+ && name_len == extra[symb_table[2 * elem + 1]]
+ /* Compare the name. */
+ && memcmp (name, &extra[symb_table[2 * elem + 1] + 1],
+ name_len) == 0)
+ {
+ /* Yep, this is the entry. */
+ break;
+ }
+
+ /* Next entry. */
+ elem += second;
+ }
+ while (symb_table[2 * elem] != 0);
+ }
+ return elem;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environment.
+ Look up the collation sequence value of BR_ELEM.
+ Return the value if succeeded, UINT_MAX otherwise. */
+
+ auto inline unsigned int
+ __attribute ((always_inline))
+ lookup_collation_sequence_value (br_elem)
+ bracket_elem_t *br_elem;
+ {
+ if (br_elem->type == SB_CHAR)
+ {
+ /*
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+ return collseqmb[br_elem->opr.ch];
+ else
+ {
+ wint_t wc = __btowc (br_elem->opr.ch);
+ return __collseq_table_lookup (collseqwc, wc);
+ }
+ }
+ else if (br_elem->type == MB_CHAR)
+ {
+ if (nrules != 0)
+ return __collseq_table_lookup (collseqwc, br_elem->opr.wch);
+ }
+ else if (br_elem->type == COLL_SYM)
+ {
+ size_t sym_name_len = strlen ((char *) br_elem->opr.name);
+ if (nrules != 0)
+ {
+ int32_t elem, idx;
+ elem = seek_collating_symbol_entry (br_elem->opr.name,
+ sym_name_len);
+ if (symb_table[2 * elem] != 0)
+ {
+ /* We found the entry. */
+ idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ /* Skip the byte sequence of the collating element. */
+ idx += 1 + extra[idx];
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+ /* Skip the multibyte collation sequence value. */
+ idx += sizeof (unsigned int);
+ /* Skip the wide char sequence of the collating element. */
+ idx += sizeof (unsigned int) *
+ (1 + *(unsigned int *) (extra + idx));
+ /* Return the collation sequence value. */
+ return *(unsigned int *) (extra + idx);
+ }
+ else if (symb_table[2 * elem] == 0 && sym_name_len == 1)
+ {
+ /* No valid character. Match it as a single byte
+ character. */
+ return collseqmb[br_elem->opr.name[0]];
+ }
+ }
+ else if (sym_name_len == 1)
+ return collseqmb[br_elem->opr.name[0]];
+ }
+ return UINT_MAX;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Build the range expression which starts from START_ELEM, and ends
+ at END_ELEM. The result are written to MBCSET and SBCSET.
+ RANGE_ALLOC is the allocated size of mbcset->range_starts, and
+ mbcset->range_ends, is a pointer argument sinse we may
+ update it. */
+
+ auto inline reg_errcode_t
+ __attribute ((always_inline))
+ build_range_exp (sbcset, mbcset, range_alloc, start_elem, end_elem)
+ re_charset_t *mbcset;
+ Idx *range_alloc;
+ bitset_t sbcset;
+ bracket_elem_t *start_elem, *end_elem;
+ {
+ unsigned int ch;
+ uint32_t start_collseq;
+ uint32_t end_collseq;
+
+ /* Equivalence Classes and Character Classes can't be a range
+ start/end. */
+ if (BE (start_elem->type == EQUIV_CLASS || start_elem->type == CHAR_CLASS
+ || end_elem->type == EQUIV_CLASS || end_elem->type == CHAR_CLASS,
+ 0))
+ return REG_ERANGE;
+
+ start_collseq = lookup_collation_sequence_value (start_elem);
+ end_collseq = lookup_collation_sequence_value (end_elem);
+ /* Check start/end collation sequence values. */
+ if (BE (start_collseq == UINT_MAX || end_collseq == UINT_MAX, 0))
+ return REG_ECOLLATE;
+ if (BE ((syntax & RE_NO_EMPTY_RANGES) && start_collseq > end_collseq, 0))
+ return REG_ERANGE;
+
+ /* Got valid collation sequence values, add them as a new entry.
+ However, if we have no collation elements, and the character set
+ is single byte, the single byte character set that we
+ build below suffices. */
+ if (nrules > 0 || dfa->mb_cur_max > 1)
+ {
+ /* Check the space of the arrays. */
+ if (BE (*range_alloc == mbcset->nranges, 0))
+ {
+ /* There is not enough space, need realloc. */
+ uint32_t *new_array_start;
+ uint32_t *new_array_end;
+ Idx new_nranges;
+
+ /* +1 in case of mbcset->nranges is 0. */
+ new_nranges = 2 * mbcset->nranges + 1;
+ new_array_start = re_realloc (mbcset->range_starts, uint32_t,
+ new_nranges);
+ new_array_end = re_realloc (mbcset->range_ends, uint32_t,
+ new_nranges);
+
+ if (BE (new_array_start == NULL || new_array_end == NULL, 0))
+ return REG_ESPACE;
+
+ mbcset->range_starts = new_array_start;
+ mbcset->range_ends = new_array_end;
+ *range_alloc = new_nranges;
+ }
+
+ mbcset->range_starts[mbcset->nranges] = start_collseq;
+ mbcset->range_ends[mbcset->nranges++] = end_collseq;
+ }
+
+ /* Build the table for single byte characters. */
+ for (ch = 0; ch < SBC_MAX; ch++)
+ {
+ uint32_t ch_collseq;
+ /*
+ if (MB_CUR_MAX == 1)
+ */
+ if (nrules == 0)
+ ch_collseq = collseqmb[ch];
+ else
+ ch_collseq = __collseq_table_lookup (collseqwc, __btowc (ch));
+ if (start_collseq <= ch_collseq && ch_collseq <= end_collseq)
+ bitset_set (sbcset, ch);
+ }
+ return REG_NOERROR;
+ }
+
+ /* Local function for parse_bracket_exp used in _LIBC environement.
+ Build the collating element which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ COLL_SYM_ALLOC is the allocated size of mbcset->coll_sym, is a
+ pointer argument sinse we may update it. */
+
+ auto inline reg_errcode_t
+ __attribute ((always_inline))
+ build_collating_symbol (sbcset, mbcset, coll_sym_alloc, name)
+ re_charset_t *mbcset;
+ Idx *coll_sym_alloc;
+ bitset_t sbcset;
+ const unsigned char *name;
+ {
+ int32_t elem, idx;
+ size_t name_len = strlen ((const char *) name);
+ if (nrules != 0)
+ {
+ elem = seek_collating_symbol_entry (name, name_len);
+ if (symb_table[2 * elem] != 0)
+ {
+ /* We found the entry. */
+ idx = symb_table[2 * elem + 1];
+ /* Skip the name of collating element name. */
+ idx += 1 + extra[idx];
+ }
+ else if (symb_table[2 * elem] == 0 && name_len == 1)
+ {
+ /* No valid character, treat it as a normal
+ character. */
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+ else
+ return REG_ECOLLATE;
+
+ /* Got valid collation sequence, add it as a new entry. */
+ /* Check the space of the arrays. */
+ if (BE (*coll_sym_alloc == mbcset->ncoll_syms, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->ncoll_syms is 0. */
+ Idx new_coll_sym_alloc = 2 * mbcset->ncoll_syms + 1;
+ /* Use realloc since mbcset->coll_syms is NULL
+ if *alloc == 0. */
+ int32_t *new_coll_syms = re_realloc (mbcset->coll_syms, int32_t,
+ new_coll_sym_alloc);
+ if (BE (new_coll_syms == NULL, 0))
+ return REG_ESPACE;
+ mbcset->coll_syms = new_coll_syms;
+ *coll_sym_alloc = new_coll_sym_alloc;
+ }
+ mbcset->coll_syms[mbcset->ncoll_syms++] = idx;
+ return REG_NOERROR;
+ }
+ else
+ {
+ if (BE (name_len != 1, 0))
+ return REG_ECOLLATE;
+ else
+ {
+ bitset_set (sbcset, name[0]);
+ return REG_NOERROR;
+ }
+ }
+ }
+#endif
+
+ re_token_t br_token;
+ re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+ Idx coll_sym_alloc = 0, range_alloc = 0, mbchar_alloc = 0;
+ Idx equiv_class_alloc = 0, char_class_alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+ bool non_match = false;
+ bin_tree_t *work_tree;
+ int token_len;
+ bool first_round = true;
+#ifdef _LIBC
+ collseqmb = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules)
+ {
+ /*
+ if (MB_CUR_MAX > 1)
+ */
+ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ table_size = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_SYMB_HASH_SIZEMB);
+ symb_table = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_TABLEMB);
+ extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_SYMB_EXTRAMB);
+ }
+#endif
+ sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+#ifdef RE_ENABLE_I18N
+ if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else
+ if (BE (sbcset == NULL, 0))
+#endif /* RE_ENABLE_I18N */
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ token_len = peek_token_bracket (token, regexp, syntax);
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_BADPAT;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_NON_MATCH_LIST)
+ {
+#ifdef RE_ENABLE_I18N
+ mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+ non_match = true;
+ if (syntax & RE_HAT_LISTS_NOT_NEWLINE)
+ bitset_set (sbcset, '\n');
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ token_len = peek_token_bracket (token, regexp, syntax);
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_BADPAT;
+ goto parse_bracket_exp_free_return;
+ }
+ }
+
+ /* We treat the first ']' as a normal character. */
+ if (token->type == OP_CLOSE_BRACKET)
+ token->type = CHARACTER;
+
+ while (1)
+ {
+ bracket_elem_t start_elem, end_elem;
+ unsigned char start_name_buf[BRACKET_NAME_BUF_SIZE];
+ unsigned char end_name_buf[BRACKET_NAME_BUF_SIZE];
+ reg_errcode_t ret;
+ int token_len2 = 0;
+ bool is_range_exp = false;
+ re_token_t token2;
+
+ start_elem.opr.name = start_name_buf;
+ ret = parse_bracket_element (&start_elem, regexp, token, token_len, dfa,
+ syntax, first_round);
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ *err = ret;
+ goto parse_bracket_exp_free_return;
+ }
+ first_round = false;
+
+ /* Get information about the next token. We need it in any case. */
+ token_len = peek_token_bracket (token, regexp, syntax);
+
+ /* Do not check for ranges if we know they are not allowed. */
+ if (start_elem.type != CHAR_CLASS && start_elem.type != EQUIV_CLASS)
+ {
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_CHARSET_RANGE)
+ {
+ re_string_skip_bytes (regexp, token_len); /* Skip '-'. */
+ token_len2 = peek_token_bracket (&token2, regexp, syntax);
+ if (BE (token2.type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token2.type == OP_CLOSE_BRACKET)
+ {
+ /* We treat the last '-' as a normal character. */
+ re_string_skip_bytes (regexp, -token_len);
+ token->type = CHARACTER;
+ }
+ else
+ is_range_exp = true;
+ }
+ }
+
+ if (is_range_exp == true)
+ {
+ end_elem.opr.name = end_name_buf;
+ ret = parse_bracket_element (&end_elem, regexp, &token2, token_len2,
+ dfa, syntax, true);
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ *err = ret;
+ goto parse_bracket_exp_free_return;
+ }
+
+ token_len = peek_token_bracket (token, regexp, syntax);
+
+#ifdef _LIBC
+ *err = build_range_exp (sbcset, mbcset, &range_alloc,
+ &start_elem, &end_elem);
+#else
+# ifdef RE_ENABLE_I18N
+ *err = build_range_exp (sbcset,
+ dfa->mb_cur_max > 1 ? mbcset : NULL,
+ &range_alloc, &start_elem, &end_elem);
+# else
+ *err = build_range_exp (sbcset, &start_elem, &end_elem);
+# endif
+#endif /* RE_ENABLE_I18N */
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ }
+ else
+ {
+ switch (start_elem.type)
+ {
+ case SB_CHAR:
+ bitset_set (sbcset, start_elem.opr.ch);
+ break;
+#ifdef RE_ENABLE_I18N
+ case MB_CHAR:
+ /* Check whether the array has enough space. */
+ if (BE (mbchar_alloc == mbcset->nmbchars, 0))
+ {
+ wchar_t *new_mbchars;
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nmbchars is 0. */
+ mbchar_alloc = 2 * mbcset->nmbchars + 1;
+ /* Use realloc since array is NULL if *alloc == 0. */
+ new_mbchars = re_realloc (mbcset->mbchars, wchar_t,
+ mbchar_alloc);
+ if (BE (new_mbchars == NULL, 0))
+ goto parse_bracket_exp_espace;
+ mbcset->mbchars = new_mbchars;
+ }
+ mbcset->mbchars[mbcset->nmbchars++] = start_elem.opr.wch;
+ break;
+#endif /* RE_ENABLE_I18N */
+ case EQUIV_CLASS:
+ *err = build_equiv_class (sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &equiv_class_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ case COLL_SYM:
+ *err = build_collating_symbol (sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &coll_sym_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ case CHAR_CLASS:
+ *err = build_charclass (regexp->trans, sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &char_class_alloc,
+#endif /* RE_ENABLE_I18N */
+ start_elem.opr.name, syntax);
+ if (BE (*err != REG_NOERROR, 0))
+ goto parse_bracket_exp_free_return;
+ break;
+ default:
+ assert (0);
+ break;
+ }
+ }
+ if (BE (token->type == END_OF_RE, 0))
+ {
+ *err = REG_EBRACK;
+ goto parse_bracket_exp_free_return;
+ }
+ if (token->type == OP_CLOSE_BRACKET)
+ break;
+ }
+
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+
+ /* If it is non-matching list. */
+ if (non_match)
+ bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+ if (dfa->mb_cur_max > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+
+ if (mbcset->nmbchars || mbcset->ncoll_syms || mbcset->nequiv_classes
+ || mbcset->nranges || (dfa->mb_cur_max > 1 && (mbcset->nchar_classes
+ || mbcset->non_match)))
+ {
+ bin_tree_t *mbc_tree;
+ int sbc_idx;
+ /* Build a tree for complex bracket. */
+ dfa->has_mb_node = 1;
+ br_token.type = COMPLEX_BRACKET;
+ br_token.opr.mbcset = mbcset;
+ mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (mbc_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ for (sbc_idx = 0; sbc_idx < BITSET_WORDS; ++sbc_idx)
+ if (sbcset[sbc_idx])
+ break;
+ /* If there are no bits set in sbcset, there is no point
+ of having both SIMPLE_BRACKET and COMPLEX_BRACKET. */
+ if (sbc_idx < BITSET_WORDS)
+ {
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+
+ /* Then join them by ALT node. */
+ work_tree = create_tree (dfa, work_tree, mbc_tree, OP_ALT);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ }
+ else
+ {
+ re_free (sbcset);
+ work_tree = mbc_tree;
+ }
+ }
+ else
+#endif /* not RE_ENABLE_I18N */
+ {
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ work_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (work_tree == NULL, 0))
+ goto parse_bracket_exp_espace;
+ }
+ return work_tree;
+
+ parse_bracket_exp_espace:
+ *err = REG_ESPACE;
+ parse_bracket_exp_free_return:
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ return NULL;
+}
+
+/* Parse an element in the bracket expression. */
+
+static reg_errcode_t
+parse_bracket_element (bracket_elem_t *elem, re_string_t *regexp,
+ re_token_t *token, int token_len, re_dfa_t *dfa,
+ reg_syntax_t syntax, bool accept_hyphen)
+{
+#ifdef RE_ENABLE_I18N
+ int cur_char_size;
+ cur_char_size = re_string_char_size_at (regexp, re_string_cur_idx (regexp));
+ if (cur_char_size > 1)
+ {
+ elem->type = MB_CHAR;
+ elem->opr.wch = re_string_wchar_at (regexp, re_string_cur_idx (regexp));
+ re_string_skip_bytes (regexp, cur_char_size);
+ return REG_NOERROR;
+ }
+#endif /* RE_ENABLE_I18N */
+ re_string_skip_bytes (regexp, token_len); /* Skip a token. */
+ if (token->type == OP_OPEN_COLL_ELEM || token->type == OP_OPEN_CHAR_CLASS
+ || token->type == OP_OPEN_EQUIV_CLASS)
+ return parse_bracket_symbol (elem, regexp, token);
+ if (BE (token->type == OP_CHARSET_RANGE, 0) && !accept_hyphen)
+ {
+ /* A '-' must only appear as anything but a range indicator before
+ the closing bracket. Everything else is an error. */
+ re_token_t token2;
+ (void) peek_token_bracket (&token2, regexp, syntax);
+ if (token2.type != OP_CLOSE_BRACKET)
+ /* The actual error value is not standardized since this whole
+ case is undefined. But ERANGE makes good sense. */
+ return REG_ERANGE;
+ }
+ elem->type = SB_CHAR;
+ elem->opr.ch = token->opr.c;
+ return REG_NOERROR;
+}
+
+/* Parse a bracket symbol in the bracket expression. Bracket symbols are
+ such as [:<character_class>:], [.<collating_element>.], and
+ [=<equivalent_class>=]. */
+
+static reg_errcode_t
+parse_bracket_symbol (bracket_elem_t *elem, re_string_t *regexp,
+ re_token_t *token)
+{
+ unsigned char ch, delim = token->opr.c;
+ int i = 0;
+ if (re_string_eoi(regexp))
+ return REG_EBRACK;
+ for (;; ++i)
+ {
+ if (i >= BRACKET_NAME_BUF_SIZE)
+ return REG_EBRACK;
+ if (token->type == OP_OPEN_CHAR_CLASS)
+ ch = re_string_fetch_byte_case (regexp);
+ else
+ ch = re_string_fetch_byte (regexp);
+ if (re_string_eoi(regexp))
+ return REG_EBRACK;
+ if (ch == delim && re_string_peek_byte (regexp, 0) == ']')
+ break;
+ elem->opr.name[i] = ch;
+ }
+ re_string_skip_bytes (regexp, 1);
+ elem->opr.name[i] = '\0';
+ switch (token->type)
+ {
+ case OP_OPEN_COLL_ELEM:
+ elem->type = COLL_SYM;
+ break;
+ case OP_OPEN_EQUIV_CLASS:
+ elem->type = EQUIV_CLASS;
+ break;
+ case OP_OPEN_CHAR_CLASS:
+ elem->type = CHAR_CLASS;
+ break;
+ default:
+ break;
+ }
+ return REG_NOERROR;
+}
+
+ /* Helper function for parse_bracket_exp.
+ Build the equivalence class which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ EQUIV_CLASS_ALLOC is the allocated size of mbcset->equiv_classes,
+ is a pointer argument sinse we may update it. */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_equiv_class (bitset_t sbcset, re_charset_t *mbcset,
+ Idx *equiv_class_alloc, const unsigned char *name)
+#else /* not RE_ENABLE_I18N */
+build_equiv_class (bitset_t sbcset, const unsigned char *name)
+#endif /* not RE_ENABLE_I18N */
+{
+#ifdef _LIBC
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+ const int32_t *table, *indirect;
+ const unsigned char *weights, *extra, *cp;
+ unsigned char char_buf[2];
+ int32_t idx1, idx2;
+ unsigned int ch;
+ size_t len;
+ /* This #include defines a local function! */
+# include <locale/weight.h>
+ /* Calculate the index for equivalence class. */
+ cp = name;
+ table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_INDIRECTMB);
+ idx1 = findidx (&cp);
+ if (BE (idx1 == 0 || cp < name + strlen ((const char *) name), 0))
+ /* This isn't a valid character. */
+ return REG_ECOLLATE;
+
+ /* Build single byte matcing table for this equivalence class. */
+ char_buf[1] = (unsigned char) '\0';
+ len = weights[idx1 & 0xffffff];
+ for (ch = 0; ch < SBC_MAX; ++ch)
+ {
+ char_buf[0] = ch;
+ cp = char_buf;
+ idx2 = findidx (&cp);
+/*
+ idx2 = table[ch];
+*/
+ if (idx2 == 0)
+ /* This isn't a valid character. */
+ continue;
+ /* Compare only if the length matches and the collation rule
+ index is the same. */
+ if (len == weights[idx2 & 0xffffff] && (idx1 >> 24) == (idx2 >> 24))
+ {
+ int cnt = 0;
+
+ while (cnt <= len &&
+ weights[(idx1 & 0xffffff) + 1 + cnt]
+ == weights[(idx2 & 0xffffff) + 1 + cnt])
+ ++cnt;
+
+ if (cnt > len)
+ bitset_set (sbcset, ch);
+ }
+ }
+ /* Check whether the array has enough space. */
+ if (BE (*equiv_class_alloc == mbcset->nequiv_classes, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nequiv_classes is 0. */
+ Idx new_equiv_class_alloc = 2 * mbcset->nequiv_classes + 1;
+ /* Use realloc since the array is NULL if *alloc == 0. */
+ int32_t *new_equiv_classes = re_realloc (mbcset->equiv_classes,
+ int32_t,
+ new_equiv_class_alloc);
+ if (BE (new_equiv_classes == NULL, 0))
+ return REG_ESPACE;
+ mbcset->equiv_classes = new_equiv_classes;
+ *equiv_class_alloc = new_equiv_class_alloc;
+ }
+ mbcset->equiv_classes[mbcset->nequiv_classes++] = idx1;
+ }
+ else
+#endif /* _LIBC */
+ {
+ if (BE (strlen ((const char *) name) != 1, 0))
+ return REG_ECOLLATE;
+ bitset_set (sbcset, *name);
+ }
+ return REG_NOERROR;
+}
+
+ /* Helper function for parse_bracket_exp.
+ Build the character class which is represented by NAME.
+ The result are written to MBCSET and SBCSET.
+ CHAR_CLASS_ALLOC is the allocated size of mbcset->char_classes,
+ is a pointer argument sinse we may update it. */
+
+static reg_errcode_t
+#ifdef RE_ENABLE_I18N
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+ re_charset_t *mbcset, Idx *char_class_alloc,
+ const unsigned char *class_name, reg_syntax_t syntax)
+#else /* not RE_ENABLE_I18N */
+build_charclass (RE_TRANSLATE_TYPE trans, bitset_t sbcset,
+ const unsigned char *class_name, reg_syntax_t syntax)
+#endif /* not RE_ENABLE_I18N */
+{
+ int i;
+ const char *name = (const char *) class_name;
+
+ /* In case of REG_ICASE "upper" and "lower" match the both of
+ upper and lower cases. */
+ if ((syntax & RE_ICASE)
+ && (strcmp (name, "upper") == 0 || strcmp (name, "lower") == 0))
+ name = "alpha";
+
+#ifdef RE_ENABLE_I18N
+ /* Check the space of the arrays. */
+ if (BE (*char_class_alloc == mbcset->nchar_classes, 0))
+ {
+ /* Not enough, realloc it. */
+ /* +1 in case of mbcset->nchar_classes is 0. */
+ Idx new_char_class_alloc = 2 * mbcset->nchar_classes + 1;
+ /* Use realloc since array is NULL if *alloc == 0. */
+ wctype_t *new_char_classes = re_realloc (mbcset->char_classes, wctype_t,
+ new_char_class_alloc);
+ if (BE (new_char_classes == NULL, 0))
+ return REG_ESPACE;
+ mbcset->char_classes = new_char_classes;
+ *char_class_alloc = new_char_class_alloc;
+ }
+ mbcset->char_classes[mbcset->nchar_classes++] = __wctype (name);
+#endif /* RE_ENABLE_I18N */
+
+#define BUILD_CHARCLASS_LOOP(ctype_func) \
+ do { \
+ if (BE (trans != NULL, 0)) \
+ { \
+ for (i = 0; i < SBC_MAX; ++i) \
+ if (ctype_func (i)) \
+ bitset_set (sbcset, trans[i]); \
+ } \
+ else \
+ { \
+ for (i = 0; i < SBC_MAX; ++i) \
+ if (ctype_func (i)) \
+ bitset_set (sbcset, i); \
+ } \
+ } while (0)
+
+ if (strcmp (name, "alnum") == 0)
+ BUILD_CHARCLASS_LOOP (isalnum);
+ else if (strcmp (name, "cntrl") == 0)
+ BUILD_CHARCLASS_LOOP (iscntrl);
+ else if (strcmp (name, "lower") == 0)
+ BUILD_CHARCLASS_LOOP (islower);
+ else if (strcmp (name, "space") == 0)
+ BUILD_CHARCLASS_LOOP (isspace);
+ else if (strcmp (name, "alpha") == 0)
+ BUILD_CHARCLASS_LOOP (isalpha);
+ else if (strcmp (name, "digit") == 0)
+ BUILD_CHARCLASS_LOOP (isdigit);
+ else if (strcmp (name, "print") == 0)
+ BUILD_CHARCLASS_LOOP (isprint);
+ else if (strcmp (name, "upper") == 0)
+ BUILD_CHARCLASS_LOOP (isupper);
+ else if (strcmp (name, "blank") == 0)
+ BUILD_CHARCLASS_LOOP (isblank);
+ else if (strcmp (name, "graph") == 0)
+ BUILD_CHARCLASS_LOOP (isgraph);
+ else if (strcmp (name, "punct") == 0)
+ BUILD_CHARCLASS_LOOP (ispunct);
+ else if (strcmp (name, "xdigit") == 0)
+ BUILD_CHARCLASS_LOOP (isxdigit);
+ else
+ return REG_ECTYPE;
+
+ return REG_NOERROR;
+}
+
+static bin_tree_t *
+build_charclass_op (re_dfa_t *dfa, RE_TRANSLATE_TYPE trans,
+ const unsigned char *class_name,
+ const unsigned char *extra, bool non_match,
+ reg_errcode_t *err)
+{
+ re_bitset_ptr_t sbcset;
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset;
+ Idx alloc = 0;
+#endif /* not RE_ENABLE_I18N */
+ reg_errcode_t ret;
+ re_token_t br_token;
+ bin_tree_t *tree;
+
+ sbcset = (re_bitset_ptr_t) calloc (sizeof (bitset_t), 1);
+#ifdef RE_ENABLE_I18N
+ mbcset = (re_charset_t *) calloc (sizeof (re_charset_t), 1);
+#endif /* RE_ENABLE_I18N */
+
+#ifdef RE_ENABLE_I18N
+ if (BE (sbcset == NULL || mbcset == NULL, 0))
+#else /* not RE_ENABLE_I18N */
+ if (BE (sbcset == NULL, 0))
+#endif /* not RE_ENABLE_I18N */
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ if (non_match)
+ {
+#ifdef RE_ENABLE_I18N
+ mbcset->non_match = 1;
+#endif /* not RE_ENABLE_I18N */
+ }
+
+ /* We don't care the syntax in this case. */
+ ret = build_charclass (trans, sbcset,
+#ifdef RE_ENABLE_I18N
+ mbcset, &alloc,
+#endif /* RE_ENABLE_I18N */
+ class_name, 0);
+
+ if (BE (ret != REG_NOERROR, 0))
+ {
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ *err = ret;
+ return NULL;
+ }
+ /* \w match '_' also. */
+ for (; *extra; extra++)
+ bitset_set (sbcset, *extra);
+
+ /* If it is non-matching list. */
+ if (non_match)
+ bitset_not (sbcset);
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure only single byte characters are set. */
+ if (dfa->mb_cur_max > 1)
+ bitset_mask (sbcset, dfa->sb_char);
+#endif
+
+ /* Build a tree for simple bracket. */
+ br_token.type = SIMPLE_BRACKET;
+ br_token.opr.sbcset = sbcset;
+ tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (tree == NULL, 0))
+ goto build_word_op_espace;
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ bin_tree_t *mbc_tree;
+ /* Build a tree for complex bracket. */
+ br_token.type = COMPLEX_BRACKET;
+ br_token.opr.mbcset = mbcset;
+ dfa->has_mb_node = 1;
+ mbc_tree = create_token_tree (dfa, NULL, NULL, &br_token);
+ if (BE (mbc_tree == NULL, 0))
+ goto build_word_op_espace;
+ /* Then join them by ALT node. */
+ tree = create_tree (dfa, tree, mbc_tree, OP_ALT);
+ if (BE (mbc_tree != NULL, 1))
+ return tree;
+ }
+ else
+ {
+ free_charset (mbcset);
+ return tree;
+ }
+#else /* not RE_ENABLE_I18N */
+ return tree;
+#endif /* not RE_ENABLE_I18N */
+
+ build_word_op_espace:
+ re_free (sbcset);
+#ifdef RE_ENABLE_I18N
+ free_charset (mbcset);
+#endif /* RE_ENABLE_I18N */
+ *err = REG_ESPACE;
+ return NULL;
+}
+
+/* This is intended for the expressions like "a{1,3}".
+ Fetch a number from `input', and return the number.
+ Return REG_MISSING if the number field is empty like "{,1}".
+ Return REG_ERROR if an error occurred. */
+
+static Idx
+fetch_number (re_string_t *input, re_token_t *token, reg_syntax_t syntax)
+{
+ Idx num = REG_MISSING;
+ unsigned char c;
+ while (1)
+ {
+ fetch_token (token, input, syntax);
+ c = token->opr.c;
+ if (BE (token->type == END_OF_RE, 0))
+ return REG_ERROR;
+ if (token->type == OP_CLOSE_DUP_NUM || c == ',')
+ break;
+ num = ((token->type != CHARACTER || c < '0' || '9' < c
+ || num == REG_ERROR)
+ ? REG_ERROR
+ : ((num == REG_MISSING) ? c - '0' : num * 10 + c - '0'));
+ num = (num > RE_DUP_MAX) ? REG_ERROR : num;
+ }
+ return num;
+}
+
+#ifdef RE_ENABLE_I18N
+static void
+free_charset (re_charset_t *cset)
+{
+ re_free (cset->mbchars);
+# ifdef _LIBC
+ re_free (cset->coll_syms);
+ re_free (cset->equiv_classes);
+ re_free (cset->range_starts);
+ re_free (cset->range_ends);
+# endif
+ re_free (cset->char_classes);
+ re_free (cset);
+}
+#endif /* RE_ENABLE_I18N */
+
+/* Functions for binary tree operation. */
+
+/* Create a tree node. */
+
+static bin_tree_t *
+create_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+ re_token_type_t type)
+{
+ re_token_t t;
+ t.type = type;
+ return create_token_tree (dfa, left, right, &t);
+}
+
+static bin_tree_t *
+create_token_tree (re_dfa_t *dfa, bin_tree_t *left, bin_tree_t *right,
+ const re_token_t *token)
+{
+ bin_tree_t *tree;
+ if (BE (dfa->str_tree_storage_idx == BIN_TREE_STORAGE_SIZE, 0))
+ {
+ bin_tree_storage_t *storage = re_malloc (bin_tree_storage_t, 1);
+
+ if (storage == NULL)
+ return NULL;
+ storage->next = dfa->str_tree_storage;
+ dfa->str_tree_storage = storage;
+ dfa->str_tree_storage_idx = 0;
+ }
+ tree = &dfa->str_tree_storage->data[dfa->str_tree_storage_idx++];
+
+ tree->parent = NULL;
+ tree->left = left;
+ tree->right = right;
+ tree->token = *token;
+ tree->token.duplicated = 0;
+ tree->token.opt_subexp = 0;
+ tree->first = NULL;
+ tree->next = NULL;
+ tree->node_idx = REG_MISSING;
+
+ if (left != NULL)
+ left->parent = tree;
+ if (right != NULL)
+ right->parent = tree;
+ return tree;
+}
+
+/* Mark the tree SRC as an optional subexpression.
+ To be called from preorder or postorder. */
+
+static reg_errcode_t
+mark_opt_subexp (void *extra, bin_tree_t *node)
+{
+ Idx idx = (Idx) (long) extra;
+ if (node->token.type == SUBEXP && node->token.opr.idx == idx)
+ node->token.opt_subexp = 1;
+
+ return REG_NOERROR;
+}
+
+/* Free the allocated memory inside NODE. */
+
+static void
+free_token (re_token_t *node)
+{
+#ifdef RE_ENABLE_I18N
+ if (node->type == COMPLEX_BRACKET && node->duplicated == 0)
+ free_charset (node->opr.mbcset);
+ else
+#endif /* RE_ENABLE_I18N */
+ if (node->type == SIMPLE_BRACKET && node->duplicated == 0)
+ re_free (node->opr.sbcset);
+}
+
+/* Worker function for tree walking. Free the allocated memory inside NODE
+ and its children. */
+
+static reg_errcode_t
+free_tree (void *extra, bin_tree_t *node)
+{
+ free_token (&node->token);
+ return REG_NOERROR;
+}
+
+
+/* Duplicate the node SRC, and return new node. This is a preorder
+ visit similar to the one implemented by the generic visitor, but
+ we need more infrastructure to maintain two parallel trees --- so,
+ it's easier to duplicate. */
+
+static bin_tree_t *
+duplicate_tree (const bin_tree_t *root, re_dfa_t *dfa)
+{
+ const bin_tree_t *node;
+ bin_tree_t *dup_root;
+ bin_tree_t **p_new = &dup_root, *dup_node = root->parent;
+
+ for (node = root; ; )
+ {
+ /* Create a new tree and link it back to the current parent. */
+ *p_new = create_token_tree (dfa, NULL, NULL, &node->token);
+ if (*p_new == NULL)
+ return NULL;
+ (*p_new)->parent = dup_node;
+ (*p_new)->token.duplicated = 1;
+ dup_node = *p_new;
+
+ /* Go to the left node, or up and to the right. */
+ if (node->left)
+ {
+ node = node->left;
+ p_new = &dup_node->left;
+ }
+ else
+ {
+ const bin_tree_t *prev = NULL;
+ while (node->right == prev || node->right == NULL)
+ {
+ prev = node;
+ node = node->parent;
+ dup_node = dup_node->parent;
+ if (!node)
+ return dup_root;
+ }
+ node = node->right;
+ p_new = &dup_node->right;
+ }
+ }
+}
diff --git a/gnu/regex.c b/gnu/regex.c
new file mode 100755
index 00000000..ba0eebee
--- /dev/null
+++ b/gnu/regex.c
@@ -0,0 +1,72 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Make sure noone compiles this code with a C++ compiler. */
+#if defined __cplusplus && defined _LIBC
+# error "This is C code, use a C compiler"
+#endif
+
+#ifdef _LIBC
+/* We have to keep the namespace clean. */
+# define regfree(preg) __regfree (preg)
+# define regexec(pr, st, nm, pm, ef) __regexec (pr, st, nm, pm, ef)
+# define regcomp(preg, pattern, cflags) __regcomp (preg, pattern, cflags)
+# define regerror(errcode, preg, errbuf, errbuf_size) \
+ __regerror(errcode, preg, errbuf, errbuf_size)
+# define re_set_registers(bu, re, nu, st, en) \
+ __re_set_registers (bu, re, nu, st, en)
+# define re_match_2(bufp, string1, size1, string2, size2, pos, regs, stop) \
+ __re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop)
+# define re_match(bufp, string, size, pos, regs) \
+ __re_match (bufp, string, size, pos, regs)
+# define re_search(bufp, string, size, startpos, range, regs) \
+ __re_search (bufp, string, size, startpos, range, regs)
+# define re_compile_pattern(pattern, length, bufp) \
+ __re_compile_pattern (pattern, length, bufp)
+# define re_set_syntax(syntax) __re_set_syntax (syntax)
+# define re_search_2(bufp, st1, s1, st2, s2, startpos, range, regs, stop) \
+ __re_search_2 (bufp, st1, s1, st2, s2, startpos, range, regs, stop)
+# define re_compile_fastmap(bufp) __re_compile_fastmap (bufp)
+
+# include "../locale/localeinfo.h"
+#endif
+
+/* On some systems, limits.h sets RE_DUP_MAX to a lower value than
+ GNU regex allows. Include it before <regex.h>, which correctly
+ #undefs RE_DUP_MAX and sets it to the right value. */
+#include <limits.h>
+
+#include <regex.h>
+#include "regex_internal.h"
+
+#include "regex_internal.c"
+#include "regcomp.c"
+#include "regexec.c"
+
+/* Binary backward compatibility. */
+#if _LIBC
+# include <shlib-compat.h>
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3)
+link_warning (re_max_failures, "the 're_max_failures' variable is obsolete and will go away.")
+int re_max_failures = 2000;
+# endif
+#endif
diff --git a/gnu/regex.h b/gnu/regex.h
new file mode 100755
index 00000000..d7426c76
--- /dev/null
+++ b/gnu/regex.h
@@ -0,0 +1,676 @@
+/* Definitions for data structures and routines for the regular
+ expression library.
+ Copyright (C) 1985, 1989, 1990, 1991, 1992, 1993, 1995, 1996, 1997, 1998,
+ 2000, 2001, 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_H
+#define _REGEX_H 1
+
+#include <sys/types.h>
+
+/* Allow the use in C++ code. */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Define __USE_GNU_REGEX to declare GNU extensions that violate the
+ POSIX name space rules. */
+#undef __USE_GNU_REGEX
+#if (defined _GNU_SOURCE \
+ || (!defined _POSIX_C_SOURCE && !defined _POSIX_SOURCE \
+ && !defined _XOPEN_SOURCE))
+# define __USE_GNU_REGEX 1
+#endif
+
+#ifdef _REGEX_LARGE_OFFSETS
+
+/* Use types and values that are wide enough to represent signed and
+ unsigned byte offsets in memory. This currently works only when
+ the regex code is used outside of the GNU C library; it is not yet
+ supported within glibc itself, and glibc users should not define
+ _REGEX_LARGE_OFFSETS. */
+
+/* The type of the offset of a byte within a string.
+ For historical reasons POSIX 1003.1-2004 requires that regoff_t be
+ at least as wide as off_t. However, many common POSIX platforms set
+ regoff_t to the more-sensible ssize_t and the Open Group has
+ signalled its intention to change the requirement to be that
+ regoff_t be at least as wide as ptrdiff_t and ssize_t; see XBD ERN
+ 60 (2005-08-25). We don't know of any hosts where ssize_t or
+ ptrdiff_t is wider than ssize_t, so ssize_t is safe. */
+typedef ssize_t regoff_t;
+
+/* The type of nonnegative object indexes. Traditionally, GNU regex
+ uses 'int' for these. Code that uses __re_idx_t should work
+ regardless of whether the type is signed. */
+typedef size_t __re_idx_t;
+
+/* The type of object sizes. */
+typedef size_t __re_size_t;
+
+/* The type of object sizes, in places where the traditional code
+ uses unsigned long int. */
+typedef size_t __re_long_size_t;
+
+#else
+
+/* Use types that are binary-compatible with the traditional GNU regex
+ implementation, which mishandles strings longer than INT_MAX. */
+
+typedef int regoff_t;
+typedef int __re_idx_t;
+typedef unsigned int __re_size_t;
+typedef unsigned long int __re_long_size_t;
+
+#endif
+
+/* The following two types have to be signed and unsigned integer type
+ wide enough to hold a value of a pointer. For most ANSI compilers
+ ptrdiff_t and size_t should be likely OK. Still size of these two
+ types is 2 for Microsoft C. Ugh... */
+typedef long int s_reg_t;
+typedef unsigned long int active_reg_t;
+
+/* The following bits are used to determine the regexp syntax we
+ recognize. The set/not-set meanings are chosen so that Emacs syntax
+ remains the value 0. The bits are given in alphabetical order, and
+ the definitions shifted by one from the previous bit; thus, when we
+ add or remove a bit, only one other definition need change. */
+typedef unsigned long int reg_syntax_t;
+
+#ifdef __USE_GNU_REGEX
+
+/* If this bit is not set, then \ inside a bracket expression is literal.
+ If set, then such a \ quotes the following character. */
+# define RE_BACKSLASH_ESCAPE_IN_LISTS ((unsigned long int) 1)
+
+/* If this bit is not set, then + and ? are operators, and \+ and \? are
+ literals.
+ If set, then \+ and \? are operators and + and ? are literals. */
+# define RE_BK_PLUS_QM (RE_BACKSLASH_ESCAPE_IN_LISTS << 1)
+
+/* If this bit is set, then character classes are supported. They are:
+ [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:],
+ [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:].
+ If not set, then character classes are not supported. */
+# define RE_CHAR_CLASSES (RE_BK_PLUS_QM << 1)
+
+/* If this bit is set, then ^ and $ are always anchors (outside bracket
+ expressions, of course).
+ If this bit is not set, then it depends:
+ ^ is an anchor if it is at the beginning of a regular
+ expression or after an open-group or an alternation operator;
+ $ is an anchor if it is at the end of a regular expression, or
+ before a close-group or an alternation operator.
+
+ This bit could be (re)combined with RE_CONTEXT_INDEP_OPS, because
+ POSIX draft 11.2 says that * etc. in leading positions is undefined.
+ We already implemented a previous draft which made those constructs
+ invalid, though, so we haven't changed the code back. */
+# define RE_CONTEXT_INDEP_ANCHORS (RE_CHAR_CLASSES << 1)
+
+/* If this bit is set, then special characters are always special
+ regardless of where they are in the pattern.
+ If this bit is not set, then special characters are special only in
+ some contexts; otherwise they are ordinary. Specifically,
+ * + ? and intervals are only special when not after the beginning,
+ open-group, or alternation operator. */
+# define RE_CONTEXT_INDEP_OPS (RE_CONTEXT_INDEP_ANCHORS << 1)
+
+/* If this bit is set, then *, +, ?, and { cannot be first in an re or
+ immediately after an alternation or begin-group operator. */
+# define RE_CONTEXT_INVALID_OPS (RE_CONTEXT_INDEP_OPS << 1)
+
+/* If this bit is set, then . matches newline.
+ If not set, then it doesn't. */
+# define RE_DOT_NEWLINE (RE_CONTEXT_INVALID_OPS << 1)
+
+/* If this bit is set, then . doesn't match NUL.
+ If not set, then it does. */
+# define RE_DOT_NOT_NULL (RE_DOT_NEWLINE << 1)
+
+/* If this bit is set, nonmatching lists [^...] do not match newline.
+ If not set, they do. */
+# define RE_HAT_LISTS_NOT_NEWLINE (RE_DOT_NOT_NULL << 1)
+
+/* If this bit is set, either \{...\} or {...} defines an
+ interval, depending on RE_NO_BK_BRACES.
+ If not set, \{, \}, {, and } are literals. */
+# define RE_INTERVALS (RE_HAT_LISTS_NOT_NEWLINE << 1)
+
+/* If this bit is set, +, ? and | aren't recognized as operators.
+ If not set, they are. */
+# define RE_LIMITED_OPS (RE_INTERVALS << 1)
+
+/* If this bit is set, newline is an alternation operator.
+ If not set, newline is literal. */
+# define RE_NEWLINE_ALT (RE_LIMITED_OPS << 1)
+
+/* If this bit is set, then `{...}' defines an interval, and \{ and \}
+ are literals.
+ If not set, then `\{...\}' defines an interval. */
+# define RE_NO_BK_BRACES (RE_NEWLINE_ALT << 1)
+
+/* If this bit is set, (...) defines a group, and \( and \) are literals.
+ If not set, \(...\) defines a group, and ( and ) are literals. */
+# define RE_NO_BK_PARENS (RE_NO_BK_BRACES << 1)
+
+/* If this bit is set, then \<digit> matches <digit>.
+ If not set, then \<digit> is a back-reference. */
+# define RE_NO_BK_REFS (RE_NO_BK_PARENS << 1)
+
+/* If this bit is set, then | is an alternation operator, and \| is literal.
+ If not set, then \| is an alternation operator, and | is literal. */
+# define RE_NO_BK_VBAR (RE_NO_BK_REFS << 1)
+
+/* If this bit is set, then an ending range point collating higher
+ than the starting range point, as in [z-a], is invalid.
+ If not set, then when ending range point collates higher than the
+ starting range point, the range is ignored. */
+# define RE_NO_EMPTY_RANGES (RE_NO_BK_VBAR << 1)
+
+/* If this bit is set, then an unmatched ) is ordinary.
+ If not set, then an unmatched ) is invalid. */
+# define RE_UNMATCHED_RIGHT_PAREN_ORD (RE_NO_EMPTY_RANGES << 1)
+
+/* If this bit is set, succeed as soon as we match the whole pattern,
+ without further backtracking. */
+# define RE_NO_POSIX_BACKTRACKING (RE_UNMATCHED_RIGHT_PAREN_ORD << 1)
+
+/* If this bit is set, do not process the GNU regex operators.
+ If not set, then the GNU regex operators are recognized. */
+# define RE_NO_GNU_OPS (RE_NO_POSIX_BACKTRACKING << 1)
+
+/* If this bit is set, turn on internal regex debugging.
+ If not set, and debugging was on, turn it off.
+ This only works if regex.c is compiled -DDEBUG.
+ We define this bit always, so that all that's needed to turn on
+ debugging is to recompile regex.c; the calling code can always have
+ this bit set, and it won't affect anything in the normal case. */
+# define RE_DEBUG (RE_NO_GNU_OPS << 1)
+
+/* If this bit is set, a syntactically invalid interval is treated as
+ a string of ordinary characters. For example, the ERE 'a{1' is
+ treated as 'a\{1'. */
+# define RE_INVALID_INTERVAL_ORD (RE_DEBUG << 1)
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+# define RE_ICASE (RE_INVALID_INTERVAL_ORD << 1)
+
+/* This bit is used internally like RE_CONTEXT_INDEP_ANCHORS but only
+ for ^, because it is difficult to scan the regex backwards to find
+ whether ^ should be special. */
+# define RE_CARET_ANCHORS_HERE (RE_ICASE << 1)
+
+/* If this bit is set, then \{ cannot be first in an bre or
+ immediately after an alternation or begin-group operator. */
+# define RE_CONTEXT_INVALID_DUP (RE_CARET_ANCHORS_HERE << 1)
+
+/* If this bit is set, then no_sub will be set to 1 during
+ re_compile_pattern. */
+# define RE_NO_SUB (RE_CONTEXT_INVALID_DUP << 1)
+
+#endif /* defined __USE_GNU_REGEX */
+
+/* This global variable defines the particular regexp syntax to use (for
+ some interfaces). When a regexp is compiled, the syntax used is
+ stored in the pattern buffer, so changing this does not affect
+ already-compiled regexps. */
+extern reg_syntax_t re_syntax_options;
+
+#ifdef __USE_GNU_REGEX
+/* Define combinations of the above bits for the standard possibilities.
+ (The [[[ comments delimit what gets put into the Texinfo file, so
+ don't delete them!) */
+/* [[[begin syntaxes]]] */
+# define RE_SYNTAX_EMACS 0
+
+# define RE_SYNTAX_AWK \
+ (RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DOT_NOT_NULL \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_NO_EMPTY_RANGES \
+ | RE_DOT_NEWLINE | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_UNMATCHED_RIGHT_PAREN_ORD | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GNU_AWK \
+ ((RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS | RE_DEBUG) \
+ & ~(RE_DOT_NOT_NULL | RE_INTERVALS | RE_CONTEXT_INDEP_OPS \
+ | RE_CONTEXT_INVALID_OPS ))
+
+# define RE_SYNTAX_POSIX_AWK \
+ (RE_SYNTAX_POSIX_EXTENDED | RE_BACKSLASH_ESCAPE_IN_LISTS \
+ | RE_INTERVALS | RE_NO_GNU_OPS)
+
+# define RE_SYNTAX_GREP \
+ (RE_BK_PLUS_QM | RE_CHAR_CLASSES \
+ | RE_HAT_LISTS_NOT_NEWLINE | RE_INTERVALS \
+ | RE_NEWLINE_ALT)
+
+# define RE_SYNTAX_EGREP \
+ (RE_CHAR_CLASSES | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_HAT_LISTS_NOT_NEWLINE \
+ | RE_NEWLINE_ALT | RE_NO_BK_PARENS \
+ | RE_NO_BK_VBAR)
+
+# define RE_SYNTAX_POSIX_EGREP \
+ (RE_SYNTAX_EGREP | RE_INTERVALS | RE_NO_BK_BRACES \
+ | RE_INVALID_INTERVAL_ORD)
+
+/* P1003.2/D11.2, section 4.20.7.1, lines 5078ff. */
+# define RE_SYNTAX_ED RE_SYNTAX_POSIX_BASIC
+
+# define RE_SYNTAX_SED RE_SYNTAX_POSIX_BASIC
+
+/* Syntax bits common to both basic and extended POSIX regex syntax. */
+# define _RE_SYNTAX_POSIX_COMMON \
+ (RE_CHAR_CLASSES | RE_DOT_NEWLINE | RE_DOT_NOT_NULL \
+ | RE_INTERVALS | RE_NO_EMPTY_RANGES)
+
+# define RE_SYNTAX_POSIX_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_BK_PLUS_QM | RE_CONTEXT_INVALID_DUP)
+
+/* Differs from ..._POSIX_BASIC only in that RE_BK_PLUS_QM becomes
+ RE_LIMITED_OPS, i.e., \? \+ \| are not recognized. Actually, this
+ isn't minimal, since other operators, such as \`, aren't disabled. */
+# define RE_SYNTAX_POSIX_MINIMAL_BASIC \
+ (_RE_SYNTAX_POSIX_COMMON | RE_LIMITED_OPS)
+
+# define RE_SYNTAX_POSIX_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INDEP_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_VBAR \
+ | RE_CONTEXT_INVALID_OPS | RE_UNMATCHED_RIGHT_PAREN_ORD)
+
+/* Differs from ..._POSIX_EXTENDED in that RE_CONTEXT_INDEP_OPS is
+ removed and RE_NO_BK_REFS is added. */
+# define RE_SYNTAX_POSIX_MINIMAL_EXTENDED \
+ (_RE_SYNTAX_POSIX_COMMON | RE_CONTEXT_INDEP_ANCHORS \
+ | RE_CONTEXT_INVALID_OPS | RE_NO_BK_BRACES \
+ | RE_NO_BK_PARENS | RE_NO_BK_REFS \
+ | RE_NO_BK_VBAR | RE_UNMATCHED_RIGHT_PAREN_ORD)
+/* [[[end syntaxes]]] */
+
+#endif /* defined __USE_GNU_REGEX */
+
+#ifdef __USE_GNU_REGEX
+
+/* Maximum number of duplicates an interval can allow. POSIX-conforming
+ systems might define this in <limits.h>, but we want our
+ value, so remove any previous define. */
+# ifdef RE_DUP_MAX
+# undef RE_DUP_MAX
+# endif
+
+/* RE_DUP_MAX is 2**15 - 1 because an earlier implementation stored
+ the counter as a 2-byte signed integer. This is no longer true, so
+ RE_DUP_MAX could be increased to (INT_MAX / 10 - 1), or to
+ ((SIZE_MAX - 2) / 10 - 1) if _REGEX_LARGE_OFFSETS is defined.
+ However, there would be a huge performance problem if someone
+ actually used a pattern like a\{214748363\}, so RE_DUP_MAX retains
+ its historical value. */
+# define RE_DUP_MAX (0x7fff)
+
+#endif /* defined __USE_GNU_REGEX */
+
+
+/* POSIX `cflags' bits (i.e., information for `regcomp'). */
+
+/* If this bit is set, then use extended regular expression syntax.
+ If not set, then use basic regular expression syntax. */
+#define REG_EXTENDED 1
+
+/* If this bit is set, then ignore case when matching.
+ If not set, then case is significant. */
+#define REG_ICASE (1 << 1)
+
+/* If this bit is set, then anchors do not match at newline
+ characters in the string.
+ If not set, then anchors do match at newlines. */
+#define REG_NEWLINE (1 << 2)
+
+/* If this bit is set, then report only success or fail in regexec.
+ If not set, then returns differ between not matching and errors. */
+#define REG_NOSUB (1 << 3)
+
+
+/* POSIX `eflags' bits (i.e., information for regexec). */
+
+/* If this bit is set, then the beginning-of-line operator doesn't match
+ the beginning of the string (presumably because it's not the
+ beginning of a line).
+ If not set, then the beginning-of-line operator does match the
+ beginning of the string. */
+#define REG_NOTBOL 1
+
+/* Like REG_NOTBOL, except for the end-of-line. */
+#define REG_NOTEOL (1 << 1)
+
+/* Use PMATCH[0] to delimit the start and end of the search in the
+ buffer. */
+#define REG_STARTEND (1 << 2)
+
+
+/* If any error codes are removed, changed, or added, update the
+ `__re_error_msgid' table in regcomp.c. */
+
+typedef enum
+{
+ _REG_ENOSYS = -1, /* This will never happen for this implementation. */
+ _REG_NOERROR = 0, /* Success. */
+ _REG_NOMATCH, /* Didn't find a match (for regexec). */
+
+ /* POSIX regcomp return error codes. (In the order listed in the
+ standard.) */
+ _REG_BADPAT, /* Invalid pattern. */
+ _REG_ECOLLATE, /* Invalid collating element. */
+ _REG_ECTYPE, /* Invalid character class name. */
+ _REG_EESCAPE, /* Trailing backslash. */
+ _REG_ESUBREG, /* Invalid back reference. */
+ _REG_EBRACK, /* Unmatched left bracket. */
+ _REG_EPAREN, /* Parenthesis imbalance. */
+ _REG_EBRACE, /* Unmatched \{. */
+ _REG_BADBR, /* Invalid contents of \{\}. */
+ _REG_ERANGE, /* Invalid range end. */
+ _REG_ESPACE, /* Ran out of memory. */
+ _REG_BADRPT, /* No preceding re for repetition op. */
+
+ /* Error codes we've added. */
+ _REG_EEND, /* Premature end. */
+ _REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
+ _REG_ERPAREN /* Unmatched ) or \); not returned from regcomp. */
+} reg_errcode_t;
+
+#ifdef _XOPEN_SOURCE
+# define REG_ENOSYS _REG_ENOSYS
+#endif
+#define REG_NOERROR _REG_NOERROR
+#define REG_NOMATCH _REG_NOMATCH
+#define REG_BADPAT _REG_BADPAT
+#define REG_ECOLLATE _REG_ECOLLATE
+#define REG_ECTYPE _REG_ECTYPE
+#define REG_EESCAPE _REG_EESCAPE
+#define REG_ESUBREG _REG_ESUBREG
+#define REG_EBRACK _REG_EBRACK
+#define REG_EPAREN _REG_EPAREN
+#define REG_EBRACE _REG_EBRACE
+#define REG_BADBR _REG_BADBR
+#define REG_ERANGE _REG_ERANGE
+#define REG_ESPACE _REG_ESPACE
+#define REG_BADRPT _REG_BADRPT
+#define REG_EEND _REG_EEND
+#define REG_ESIZE _REG_ESIZE
+#define REG_ERPAREN _REG_ERPAREN
+
+/* struct re_pattern_buffer normally uses member names like `buffer'
+ that POSIX does not allow. In POSIX mode these members have names
+ with leading `re_' (e.g., `re_buffer'). */
+#ifdef __USE_GNU_REGEX
+# define _REG_RE_NAME(id) id
+# define _REG_RM_NAME(id) id
+#else
+# define _REG_RE_NAME(id) re_##id
+# define _REG_RM_NAME(id) rm_##id
+#endif
+
+/* The user can specify the type of the re_translate member by
+ defining the macro RE_TRANSLATE_TYPE, which defaults to unsigned
+ char *. This pollutes the POSIX name space, so in POSIX mode just
+ use unsigned char *. */
+#ifdef __USE_GNU_REGEX
+# ifndef RE_TRANSLATE_TYPE
+# define RE_TRANSLATE_TYPE unsigned char *
+# endif
+# define REG_TRANSLATE_TYPE RE_TRANSLATE_TYPE
+#else
+# define REG_TRANSLATE_TYPE unsigned char *
+#endif
+
+/* This data structure represents a compiled pattern. Before calling
+ the pattern compiler, the fields `buffer', `allocated', `fastmap',
+ `translate', and `no_sub' can be set. After the pattern has been
+ compiled, the `re_nsub' field is available. All other fields are
+ private to the regex routines. */
+
+struct re_pattern_buffer
+{
+ /* Space that holds the compiled pattern. It is declared as
+ `unsigned char *' because its elements are sometimes used as
+ array indexes. */
+ unsigned char *_REG_RE_NAME (buffer);
+
+ /* Number of bytes to which `buffer' points. */
+ __re_long_size_t _REG_RE_NAME (allocated);
+
+ /* Number of bytes actually used in `buffer'. */
+ __re_long_size_t _REG_RE_NAME (used);
+
+ /* Syntax setting with which the pattern was compiled. */
+ reg_syntax_t _REG_RE_NAME (syntax);
+
+ /* Pointer to a fastmap, if any, otherwise zero. re_search uses the
+ fastmap, if there is one, to skip over impossible starting points
+ for matches. */
+ char *_REG_RE_NAME (fastmap);
+
+ /* Either a translate table to apply to all characters before
+ comparing them, or zero for no translation. The translation is
+ applied to a pattern when it is compiled and to a string when it
+ is matched. */
+ REG_TRANSLATE_TYPE _REG_RE_NAME (translate);
+
+ /* Number of subexpressions found by the compiler. */
+ size_t re_nsub;
+
+ /* Zero if this pattern cannot match the empty string, one else.
+ Well, in truth it's used only in `re_search_2', to see whether or
+ not we should use the fastmap, so we don't set this absolutely
+ perfectly; see `re_compile_fastmap' (the `duplicate' case). */
+ unsigned int _REG_RE_NAME (can_be_null) : 1;
+
+ /* If REGS_UNALLOCATED, allocate space in the `regs' structure
+ for `max (RE_NREGS, re_nsub + 1)' groups.
+ If REGS_REALLOCATE, reallocate space if necessary.
+ If REGS_FIXED, use what's there. */
+#ifdef __USE_GNU_REGEX
+# define REGS_UNALLOCATED 0
+# define REGS_REALLOCATE 1
+# define REGS_FIXED 2
+#endif
+ unsigned int _REG_RE_NAME (regs_allocated) : 2;
+
+ /* Set to zero when `regex_compile' compiles a pattern; set to one
+ by `re_compile_fastmap' if it updates the fastmap. */
+ unsigned int _REG_RE_NAME (fastmap_accurate) : 1;
+
+ /* If set, `re_match_2' does not return information about
+ subexpressions. */
+ unsigned int _REG_RE_NAME (no_sub) : 1;
+
+ /* If set, a beginning-of-line anchor doesn't match at the beginning
+ of the string. */
+ unsigned int _REG_RE_NAME (not_bol) : 1;
+
+ /* Similarly for an end-of-line anchor. */
+ unsigned int _REG_RE_NAME (not_eol) : 1;
+
+ /* If true, an anchor at a newline matches. */
+ unsigned int _REG_RE_NAME (newline_anchor) : 1;
+
+/* [[[end pattern_buffer]]] */
+};
+
+typedef struct re_pattern_buffer regex_t;
+
+/* This is the structure we store register match data in. See
+ regex.texinfo for a full description of what registers match. */
+struct re_registers
+{
+ __re_size_t _REG_RM_NAME (num_regs);
+ regoff_t *_REG_RM_NAME (start);
+ regoff_t *_REG_RM_NAME (end);
+};
+
+
+/* If `regs_allocated' is REGS_UNALLOCATED in the pattern buffer,
+ `re_match_2' returns information about at least this many registers
+ the first time a `regs' structure is passed. */
+#if !defined RE_NREGS && defined __USE_GNU_REGEX
+# define RE_NREGS 30
+#endif
+
+
+/* POSIX specification for registers. Aside from the different names than
+ `re_registers', POSIX uses an array of structures, instead of a
+ structure of arrays. */
+typedef struct
+{
+ regoff_t rm_so; /* Byte offset from string's start to substring's start. */
+ regoff_t rm_eo; /* Byte offset from string's start to substring's end. */
+} regmatch_t;
+
+/* Declarations for routines. */
+
+/* Sets the current default syntax to SYNTAX, and return the old syntax.
+ You can also simply assign to the `re_syntax_options' variable. */
+extern reg_syntax_t re_set_syntax (reg_syntax_t __syntax);
+
+/* Compile the regular expression PATTERN, with length LENGTH
+ and syntax given by the global `re_syntax_options', into the buffer
+ BUFFER. Return NULL if successful, and an error string if not. */
+extern const char *re_compile_pattern (const char *__pattern, size_t __length,
+ struct re_pattern_buffer *__buffer);
+
+
+/* Compile a fastmap for the compiled pattern in BUFFER; used to
+ accelerate searches. Return 0 if successful and -2 if was an
+ internal error. */
+extern int re_compile_fastmap (struct re_pattern_buffer *__buffer);
+
+
+/* Search in the string STRING (with length LENGTH) for the pattern
+ compiled into BUFFER. Start searching at position START, for RANGE
+ characters. Return the starting position of the match, -1 for no
+ match, or -2 for an internal error. Also return register
+ information in REGS (if REGS and BUFFER->no_sub are nonzero). */
+extern regoff_t re_search (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs);
+
+
+/* Like `re_search', but search in the concatenation of STRING1 and
+ STRING2. Also, stop searching at index START + STOP. */
+extern regoff_t re_search_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, regoff_t __range,
+ struct re_registers *__regs,
+ __re_idx_t __stop);
+
+
+/* Like `re_search', but return how many characters in STRING the regexp
+ in BUFFER matched, starting at position START. */
+extern regoff_t re_match (struct re_pattern_buffer *__buffer,
+ const char *__string, __re_idx_t __length,
+ __re_idx_t __start, struct re_registers *__regs);
+
+
+/* Relates to `re_match' as `re_search_2' relates to `re_search'. */
+extern regoff_t re_match_2 (struct re_pattern_buffer *__buffer,
+ const char *__string1, __re_idx_t __length1,
+ const char *__string2, __re_idx_t __length2,
+ __re_idx_t __start, struct re_registers *__regs,
+ __re_idx_t __stop);
+
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using BUFFER and REGS will use this memory
+ for recording register information. STARTS and ENDS must be
+ allocated with malloc, and must each be at least `NUM_REGS * sizeof
+ (regoff_t)' bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+extern void re_set_registers (struct re_pattern_buffer *__buffer,
+ struct re_registers *__regs,
+ __re_size_t __num_regs,
+ regoff_t *__starts, regoff_t *__ends);
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+# ifndef _CRAY
+/* 4.2 bsd compatibility. */
+extern char *re_comp (const char *);
+extern int re_exec (const char *);
+# endif
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict".
+ Other compilers use __restrict, __restrict__, and _Restrict, and
+ 'configure' might #define 'restrict' to those words, so pick a
+ different name. */
+#ifndef _Restrict_
+# if 199901L <= __STDC_VERSION__
+# define _Restrict_ restrict
+# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
+# define _Restrict_ __restrict
+# else
+# define _Restrict_
+# endif
+#endif
+/* gcc 3.1 and up support the [restrict] syntax. Don't trust
+ sys/cdefs.h's definition of __restrict_arr, though, as it
+ mishandles gcc -ansi -pedantic. */
+#ifndef _Restrict_arr_
+# if ((199901L <= __STDC_VERSION__ \
+ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
+ && !__STRICT_ANSI__)) \
+ && !defined __GNUG__)
+# define _Restrict_arr_ _Restrict_
+# else
+# define _Restrict_arr_
+# endif
+#endif
+
+/* POSIX compatibility. */
+extern int regcomp (regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __pattern,
+ int __cflags);
+
+extern int regexec (const regex_t *_Restrict_ __preg,
+ const char *_Restrict_ __string, size_t __nmatch,
+ regmatch_t __pmatch[_Restrict_arr_],
+ int __eflags);
+
+extern size_t regerror (int __errcode, const regex_t *_Restrict_ __preg,
+ char *_Restrict_ __errbuf, size_t __errbuf_size);
+
+extern void regfree (regex_t *__preg);
+
+
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
+#endif /* regex.h */
diff --git a/gnu/regex_internal.c b/gnu/regex_internal.c
new file mode 100755
index 00000000..17eafaa9
--- /dev/null
+++ b/gnu/regex_internal.c
@@ -0,0 +1,1740 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static void re_string_construct_common (const char *str, Idx len,
+ re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
+ const re_dfa_t *dfa) internal_function;
+static re_dfastate_t *create_ci_newstate (const re_dfa_t *dfa,
+ const re_node_set *nodes,
+ re_hashval_t hash) internal_function;
+static re_dfastate_t *create_cd_newstate (const re_dfa_t *dfa,
+ const re_node_set *nodes,
+ unsigned int context,
+ re_hashval_t hash) internal_function;
+
+/* Functions for string operation. */
+
+/* This function allocate the buffers. It is necessary to call
+ re_string_reconstruct before using the object. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_allocate (re_string_t *pstr, const char *str, Idx len, Idx init_len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+ reg_errcode_t ret;
+ Idx init_buf_len;
+
+ /* Ensure at least one character fits into the buffers. */
+ if (init_len < dfa->mb_cur_max)
+ init_len = dfa->mb_cur_max;
+ init_buf_len = (len + 1 < init_len) ? len + 1: init_len;
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+ ret = re_string_realloc_buffers (pstr, init_buf_len);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ pstr->word_char = dfa->word_char;
+ pstr->word_ops_used = dfa->word_ops_used;
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+ pstr->valid_len = (pstr->mbs_allocated || dfa->mb_cur_max > 1) ? 0 : len;
+ pstr->valid_raw_len = pstr->valid_len;
+ return REG_NOERROR;
+}
+
+/* This function allocate the buffers, and initialize them. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_construct (re_string_t *pstr, const char *str, Idx len,
+ RE_TRANSLATE_TYPE trans, bool icase, const re_dfa_t *dfa)
+{
+ reg_errcode_t ret;
+ memset (pstr, '\0', sizeof (re_string_t));
+ re_string_construct_common (str, len, pstr, trans, icase, dfa);
+
+ if (len > 0)
+ {
+ ret = re_string_realloc_buffers (pstr, len + 1);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ pstr->mbs = pstr->mbs_allocated ? pstr->mbs : (unsigned char *) str;
+
+ if (icase)
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ {
+ while (1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ if (pstr->valid_raw_len >= len)
+ break;
+ if (pstr->bufs_len > pstr->valid_len + dfa->mb_cur_max)
+ break;
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ build_upper_buffer (pstr);
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ build_wcs_buffer (pstr);
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ if (trans != NULL)
+ re_string_translate_buffer (pstr);
+ else
+ {
+ pstr->valid_len = pstr->bufs_len;
+ pstr->valid_raw_len = pstr->bufs_len;
+ }
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Helper functions for re_string_allocate, and re_string_construct. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_realloc_buffers (re_string_t *pstr, Idx new_buf_len)
+{
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ wint_t *new_wcs;
+
+ /* Avoid overflow. */
+ size_t max_object_size = MAX (sizeof (wint_t), sizeof (Idx));
+ if (BE (SIZE_MAX / max_object_size < new_buf_len, 0))
+ return REG_ESPACE;
+
+ new_wcs = re_realloc (pstr->wcs, wint_t, new_buf_len);
+ if (BE (new_wcs == NULL, 0))
+ return REG_ESPACE;
+ pstr->wcs = new_wcs;
+ if (pstr->offsets != NULL)
+ {
+ Idx *new_offsets = re_realloc (pstr->offsets, Idx, new_buf_len);
+ if (BE (new_offsets == NULL, 0))
+ return REG_ESPACE;
+ pstr->offsets = new_offsets;
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ if (pstr->mbs_allocated)
+ {
+ unsigned char *new_mbs = re_realloc (pstr->mbs, unsigned char,
+ new_buf_len);
+ if (BE (new_mbs == NULL, 0))
+ return REG_ESPACE;
+ pstr->mbs = new_mbs;
+ }
+ pstr->bufs_len = new_buf_len;
+ return REG_NOERROR;
+}
+
+
+static void
+internal_function
+re_string_construct_common (const char *str, Idx len, re_string_t *pstr,
+ RE_TRANSLATE_TYPE trans, bool icase,
+ const re_dfa_t *dfa)
+{
+ pstr->raw_mbs = (const unsigned char *) str;
+ pstr->len = len;
+ pstr->raw_len = len;
+ pstr->trans = trans;
+ pstr->icase = icase;
+ pstr->mbs_allocated = (trans != NULL || icase);
+ pstr->mb_cur_max = dfa->mb_cur_max;
+ pstr->is_utf8 = dfa->is_utf8;
+ pstr->map_notascii = dfa->map_notascii;
+ pstr->stop = pstr->len;
+ pstr->raw_stop = pstr->stop;
+}
+
+#ifdef RE_ENABLE_I18N
+
+/* Build wide character buffer PSTR->WCS.
+ If the byte sequence of the string are:
+ <mb1>(0), <mb1>(1), <mb2>(0), <mb2>(1), <sb3>
+ Then wide character buffer will be:
+ <wc1> , WEOF , <wc2> , WEOF , <wc3>
+ We use WEOF for padding, they indicate that the position isn't
+ a first byte of a multibyte character.
+
+ Note that this function assumes PSTR->VALID_LEN elements are already
+ built and starts from PSTR->VALID_LEN. */
+
+static void
+internal_function
+build_wcs_buffer (re_string_t *pstr)
+{
+#ifdef _LIBC
+ unsigned char buf[MB_LEN_MAX];
+ assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+ unsigned char buf[64];
+#endif
+ mbstate_t prev_st;
+ Idx byte_idx, end_idx, remain_len;
+ size_t mbclen;
+
+ /* Build the buffers from pstr->valid_len to either pstr->len or
+ pstr->bufs_len. */
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+ for (byte_idx = pstr->valid_len; byte_idx < end_idx;)
+ {
+ wchar_t wc;
+ const char *p;
+
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ /* Apply the translation if we need. */
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i, ch;
+
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + byte_idx + i];
+ buf[i] = pstr->mbs[byte_idx + i] = pstr->trans[ch];
+ }
+ p = (const char *) buf;
+ }
+ else
+ p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx;
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ if (BE (mbclen == (size_t) -2, 0))
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ else if (BE (mbclen == (size_t) -1 || mbclen == 0, 0))
+ {
+ /* We treat these cases as a singlebyte character. */
+ mbclen = 1;
+ wc = (wchar_t) pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+ if (BE (pstr->trans != NULL, 0))
+ wc = pstr->trans[wc];
+ pstr->cur_state = prev_st;
+ }
+
+ /* Write wide character and padding. */
+ pstr->wcs[byte_idx++] = wc;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = byte_idx;
+}
+
+/* Build wide character buffer PSTR->WCS like build_wcs_buffer,
+ but for REG_ICASE. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_wcs_upper_buffer (re_string_t *pstr)
+{
+ mbstate_t prev_st;
+ Idx src_idx, byte_idx, end_idx, remain_len;
+ size_t mbclen;
+#ifdef _LIBC
+ char buf[MB_LEN_MAX];
+ assert (MB_LEN_MAX >= pstr->mb_cur_max);
+#else
+ char buf[64];
+#endif
+
+ byte_idx = pstr->valid_len;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ /* The following optimization assumes that ASCII characters can be
+ mapped to wide characters with a simple cast. */
+ if (! pstr->map_notascii && pstr->trans == NULL && !pstr->offsets_needed)
+ {
+ while (byte_idx < end_idx)
+ {
+ wchar_t wc;
+
+ if (isascii (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx])
+ && mbsinit (&pstr->cur_state))
+ {
+ /* In case of a singlebyte character. */
+ pstr->mbs[byte_idx]
+ = toupper (pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx]);
+ /* The next step uses the assumption that wchar_t is encoded
+ ASCII-safe: all ASCII values can be converted like this. */
+ pstr->wcs[byte_idx] = (wchar_t) pstr->mbs[byte_idx];
+ ++byte_idx;
+ continue;
+ }
+
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ mbclen = __mbrtowc (&wc,
+ ((const char *) pstr->raw_mbs + pstr->raw_mbs_idx
+ + byte_idx), remain_len, &pstr->cur_state);
+ if (BE (mbclen < (size_t) -2, 1))
+ {
+ wchar_t wcu = wc;
+ if (iswlower (wc))
+ {
+ size_t mbcdlen;
+
+ wcu = towupper (wc);
+ mbcdlen = wcrtomb (buf, wcu, &prev_st);
+ if (BE (mbclen == mbcdlen, 1))
+ memcpy (pstr->mbs + byte_idx, buf, mbclen);
+ else
+ {
+ src_idx = byte_idx;
+ goto offsets_needed;
+ }
+ }
+ else
+ memcpy (pstr->mbs + byte_idx,
+ pstr->raw_mbs + pstr->raw_mbs_idx + byte_idx, mbclen);
+ pstr->wcs[byte_idx++] = wcu;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ else if (mbclen == (size_t) -1 || mbclen == 0)
+ {
+ /* It is an invalid character or '\0'. Just use the byte. */
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + byte_idx];
+ pstr->mbs[byte_idx] = ch;
+ /* And also cast it to wide char. */
+ pstr->wcs[byte_idx++] = (wchar_t) ch;
+ if (BE (mbclen == (size_t) -1, 0))
+ pstr->cur_state = prev_st;
+ }
+ else
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = byte_idx;
+ return REG_NOERROR;
+ }
+ else
+ for (src_idx = pstr->valid_raw_len; byte_idx < end_idx;)
+ {
+ wchar_t wc;
+ const char *p;
+ offsets_needed:
+ remain_len = end_idx - byte_idx;
+ prev_st = pstr->cur_state;
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i, ch;
+
+ for (i = 0; i < pstr->mb_cur_max && i < remain_len; ++i)
+ {
+ ch = pstr->raw_mbs [pstr->raw_mbs_idx + src_idx + i];
+ buf[i] = pstr->trans[ch];
+ }
+ p = (const char *) buf;
+ }
+ else
+ p = (const char *) pstr->raw_mbs + pstr->raw_mbs_idx + src_idx;
+ mbclen = __mbrtowc (&wc, p, remain_len, &pstr->cur_state);
+ if (BE (mbclen < (size_t) -2, 1))
+ {
+ wchar_t wcu = wc;
+ if (iswlower (wc))
+ {
+ size_t mbcdlen;
+
+ wcu = towupper (wc);
+ mbcdlen = wcrtomb ((char *) buf, wcu, &prev_st);
+ if (BE (mbclen == mbcdlen, 1))
+ memcpy (pstr->mbs + byte_idx, buf, mbclen);
+ else if (mbcdlen != (size_t) -1)
+ {
+ size_t i;
+
+ if (byte_idx + mbcdlen > pstr->bufs_len)
+ {
+ pstr->cur_state = prev_st;
+ break;
+ }
+
+ if (pstr->offsets == NULL)
+ {
+ pstr->offsets = re_malloc (Idx, pstr->bufs_len);
+
+ if (pstr->offsets == NULL)
+ return REG_ESPACE;
+ }
+ if (!pstr->offsets_needed)
+ {
+ for (i = 0; i < (size_t) byte_idx; ++i)
+ pstr->offsets[i] = i;
+ pstr->offsets_needed = 1;
+ }
+
+ memcpy (pstr->mbs + byte_idx, buf, mbcdlen);
+ pstr->wcs[byte_idx] = wcu;
+ pstr->offsets[byte_idx] = src_idx;
+ for (i = 1; i < mbcdlen; ++i)
+ {
+ pstr->offsets[byte_idx + i]
+ = src_idx + (i < mbclen ? i : mbclen - 1);
+ pstr->wcs[byte_idx + i] = WEOF;
+ }
+ pstr->len += mbcdlen - mbclen;
+ if (pstr->raw_stop > src_idx)
+ pstr->stop += mbcdlen - mbclen;
+ end_idx = (pstr->bufs_len > pstr->len)
+ ? pstr->len : pstr->bufs_len;
+ byte_idx += mbcdlen;
+ src_idx += mbclen;
+ continue;
+ }
+ else
+ memcpy (pstr->mbs + byte_idx, p, mbclen);
+ }
+ else
+ memcpy (pstr->mbs + byte_idx, p, mbclen);
+
+ if (BE (pstr->offsets_needed != 0, 0))
+ {
+ size_t i;
+ for (i = 0; i < mbclen; ++i)
+ pstr->offsets[byte_idx + i] = src_idx + i;
+ }
+ src_idx += mbclen;
+
+ pstr->wcs[byte_idx++] = wcu;
+ /* Write paddings. */
+ for (remain_len = byte_idx + mbclen - 1; byte_idx < remain_len ;)
+ pstr->wcs[byte_idx++] = WEOF;
+ }
+ else if (mbclen == (size_t) -1 || mbclen == 0)
+ {
+ /* It is an invalid character or '\0'. Just use the byte. */
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + src_idx];
+
+ if (BE (pstr->trans != NULL, 0))
+ ch = pstr->trans [ch];
+ pstr->mbs[byte_idx] = ch;
+
+ if (BE (pstr->offsets_needed != 0, 0))
+ pstr->offsets[byte_idx] = src_idx;
+ ++src_idx;
+
+ /* And also cast it to wide char. */
+ pstr->wcs[byte_idx++] = (wchar_t) ch;
+ if (BE (mbclen == (size_t) -1, 0))
+ pstr->cur_state = prev_st;
+ }
+ else
+ {
+ /* The buffer doesn't have enough space, finish to build. */
+ pstr->cur_state = prev_st;
+ break;
+ }
+ }
+ pstr->valid_len = byte_idx;
+ pstr->valid_raw_len = src_idx;
+ return REG_NOERROR;
+}
+
+/* Skip characters until the index becomes greater than NEW_RAW_IDX.
+ Return the index. */
+
+static Idx
+internal_function
+re_string_skip_chars (re_string_t *pstr, Idx new_raw_idx, wint_t *last_wc)
+{
+ mbstate_t prev_st;
+ Idx rawbuf_idx;
+ size_t mbclen;
+ wint_t wc = WEOF;
+
+ /* Skip the characters which are not necessary to check. */
+ for (rawbuf_idx = pstr->raw_mbs_idx + pstr->valid_raw_len;
+ rawbuf_idx < new_raw_idx;)
+ {
+ wchar_t wc2;
+ Idx remain_len;
+ remain_len = pstr->len - rawbuf_idx;
+ prev_st = pstr->cur_state;
+ mbclen = __mbrtowc (&wc2, (const char *) pstr->raw_mbs + rawbuf_idx,
+ remain_len, &pstr->cur_state);
+ if (BE (mbclen == (size_t) -2 || mbclen == (size_t) -1 || mbclen == 0, 0))
+ {
+ /* We treat these cases as a single byte character. */
+ if (mbclen == 0 || remain_len == 0)
+ wc = L'\0';
+ else
+ wc = *(unsigned char *) (pstr->raw_mbs + rawbuf_idx);
+ mbclen = 1;
+ pstr->cur_state = prev_st;
+ }
+ else
+ wc = wc2;
+ /* Then proceed the next character. */
+ rawbuf_idx += mbclen;
+ }
+ *last_wc = wc;
+ return rawbuf_idx;
+}
+#endif /* RE_ENABLE_I18N */
+
+/* Build the buffer PSTR->MBS, and apply the translation if we need.
+ This function is used in case of REG_ICASE. */
+
+static void
+internal_function
+build_upper_buffer (re_string_t *pstr)
+{
+ Idx char_idx, end_idx;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ for (char_idx = pstr->valid_len; char_idx < end_idx; ++char_idx)
+ {
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + char_idx];
+ if (BE (pstr->trans != NULL, 0))
+ ch = pstr->trans[ch];
+ if (islower (ch))
+ pstr->mbs[char_idx] = toupper (ch);
+ else
+ pstr->mbs[char_idx] = ch;
+ }
+ pstr->valid_len = char_idx;
+ pstr->valid_raw_len = char_idx;
+}
+
+/* Apply TRANS to the buffer in PSTR. */
+
+static void
+internal_function
+re_string_translate_buffer (re_string_t *pstr)
+{
+ Idx buf_idx, end_idx;
+ end_idx = (pstr->bufs_len > pstr->len) ? pstr->len : pstr->bufs_len;
+
+ for (buf_idx = pstr->valid_len; buf_idx < end_idx; ++buf_idx)
+ {
+ int ch = pstr->raw_mbs[pstr->raw_mbs_idx + buf_idx];
+ pstr->mbs[buf_idx] = pstr->trans[ch];
+ }
+
+ pstr->valid_len = buf_idx;
+ pstr->valid_raw_len = buf_idx;
+}
+
+/* This function re-construct the buffers.
+ Concretely, convert to wide character in case of pstr->mb_cur_max > 1,
+ convert to upper case in case of REG_ICASE, apply translation. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_string_reconstruct (re_string_t *pstr, Idx idx, int eflags)
+{
+ Idx offset;
+
+ if (BE (pstr->raw_mbs_idx <= idx, 0))
+ offset = idx - pstr->raw_mbs_idx;
+ else
+ {
+ /* Reset buffer. */
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+#endif /* RE_ENABLE_I18N */
+ pstr->len = pstr->raw_len;
+ pstr->stop = pstr->raw_stop;
+ pstr->valid_len = 0;
+ pstr->raw_mbs_idx = 0;
+ pstr->valid_raw_len = 0;
+ pstr->offsets_needed = 0;
+ pstr->tip_context = ((eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+ : CONTEXT_NEWLINE | CONTEXT_BEGBUF);
+ if (!pstr->mbs_allocated)
+ pstr->mbs = (unsigned char *) pstr->raw_mbs;
+ offset = idx;
+ }
+
+ if (BE (offset != 0, 1))
+ {
+ /* Should the already checked characters be kept? */
+ if (BE (offset < pstr->valid_raw_len, 1))
+ {
+ /* Yes, move them to the front of the buffer. */
+#ifdef RE_ENABLE_I18N
+ if (BE (pstr->offsets_needed, 0))
+ {
+ Idx low = 0, high = pstr->valid_len, mid;
+ do
+ {
+ mid = (high + low) / 2;
+ if (pstr->offsets[mid] > offset)
+ high = mid;
+ else if (pstr->offsets[mid] < offset)
+ low = mid + 1;
+ else
+ break;
+ }
+ while (low < high);
+ if (pstr->offsets[mid] < offset)
+ ++mid;
+ pstr->tip_context = re_string_context_at (pstr, mid - 1,
+ eflags);
+ /* This can be quite complicated, so handle specially
+ only the common and easy case where the character with
+ different length representation of lower and upper
+ case is present at or after offset. */
+ if (pstr->valid_len > offset
+ && mid == offset && pstr->offsets[mid] == offset)
+ {
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+ memmove (pstr->mbs, pstr->mbs + offset, pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
+ for (low = 0; low < pstr->valid_len; low++)
+ pstr->offsets[low] = pstr->offsets[low + offset] - offset;
+ }
+ else
+ {
+ /* Otherwise, just find out how long the partial multibyte
+ character at offset is and fill it with WEOF/255. */
+ pstr->len = pstr->raw_len - idx + offset;
+ pstr->stop = pstr->raw_stop - idx + offset;
+ pstr->offsets_needed = 0;
+ while (mid > 0 && pstr->offsets[mid - 1] == offset)
+ --mid;
+ while (mid < pstr->valid_len)
+ if (pstr->wcs[mid] != WEOF)
+ break;
+ else
+ ++mid;
+ if (mid == pstr->valid_len)
+ pstr->valid_len = 0;
+ else
+ {
+ pstr->valid_len = pstr->offsets[mid] - offset;
+ if (pstr->valid_len)
+ {
+ for (low = 0; low < pstr->valid_len; ++low)
+ pstr->wcs[low] = WEOF;
+ memset (pstr->mbs, 255, pstr->valid_len);
+ }
+ }
+ pstr->valid_raw_len = pstr->valid_len;
+ }
+ }
+ else
+#endif
+ {
+ pstr->tip_context = re_string_context_at (pstr, offset - 1,
+ eflags);
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ memmove (pstr->wcs, pstr->wcs + offset,
+ (pstr->valid_len - offset) * sizeof (wint_t));
+#endif /* RE_ENABLE_I18N */
+ if (BE (pstr->mbs_allocated, 0))
+ memmove (pstr->mbs, pstr->mbs + offset,
+ pstr->valid_len - offset);
+ pstr->valid_len -= offset;
+ pstr->valid_raw_len -= offset;
+#if DEBUG
+ assert (pstr->valid_len > 0);
+#endif
+ }
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ /* No, skip all characters until IDX. */
+ Idx prev_valid_len = pstr->valid_len;
+
+ if (BE (pstr->offsets_needed, 0))
+ {
+ pstr->len = pstr->raw_len - idx + offset;
+ pstr->stop = pstr->raw_stop - idx + offset;
+ pstr->offsets_needed = 0;
+ }
+#endif
+ pstr->valid_len = 0;
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ Idx wcs_idx;
+ wint_t wc = WEOF;
+
+ if (pstr->is_utf8)
+ {
+ const unsigned char *raw, *p, *end;
+
+ /* Special case UTF-8. Multi-byte chars start with any
+ byte other than 0x80 - 0xbf. */
+ raw = pstr->raw_mbs + pstr->raw_mbs_idx;
+ end = raw + (offset - pstr->mb_cur_max);
+ if (end < pstr->raw_mbs)
+ end = pstr->raw_mbs;
+ p = raw + offset - 1;
+#ifdef _LIBC
+ /* We know the wchar_t encoding is UCS4, so for the simple
+ case, ASCII characters, skip the conversion step. */
+ if (isascii (*p) && BE (pstr->trans == NULL, 1))
+ {
+ memset (&pstr->cur_state, '\0', sizeof (mbstate_t));
+ /* pstr->valid_len = 0; */
+ wc = (wchar_t) *p;
+ }
+ else
+#endif
+ for (; p >= end; --p)
+ if ((*p & 0xc0) != 0x80)
+ {
+ mbstate_t cur_state;
+ wchar_t wc2;
+ Idx mlen = raw + pstr->len - p;
+ unsigned char buf[6];
+ size_t mbclen;
+
+ if (BE (pstr->trans != NULL, 0))
+ {
+ int i = mlen < 6 ? mlen : 6;
+ while (--i >= 0)
+ buf[i] = pstr->trans[p[i]];
+ }
+ /* XXX Don't use mbrtowc, we know which conversion
+ to use (UTF-8 -> UCS4). */
+ memset (&cur_state, 0, sizeof (cur_state));
+ mbclen = __mbrtowc (&wc2, (const char *) p, mlen,
+ &cur_state);
+ if (raw + offset - p <= mbclen
+ && mbclen < (size_t) -2)
+ {
+ memset (&pstr->cur_state, '\0',
+ sizeof (mbstate_t));
+ pstr->valid_len = mbclen - (raw + offset - p);
+ wc = wc2;
+ }
+ break;
+ }
+ }
+
+ if (wc == WEOF)
+ pstr->valid_len = re_string_skip_chars (pstr, idx, &wc) - idx;
+ if (wc == WEOF)
+ pstr->tip_context
+ = re_string_context_at (pstr, prev_valid_len - 1, eflags);
+ else
+ pstr->tip_context = ((BE (pstr->word_ops_used != 0, 0)
+ && IS_WIDE_WORD_CHAR (wc))
+ ? CONTEXT_WORD
+ : ((IS_WIDE_NEWLINE (wc)
+ && pstr->newline_anchor)
+ ? CONTEXT_NEWLINE : 0));
+ if (BE (pstr->valid_len, 0))
+ {
+ for (wcs_idx = 0; wcs_idx < pstr->valid_len; ++wcs_idx)
+ pstr->wcs[wcs_idx] = WEOF;
+ if (pstr->mbs_allocated)
+ memset (pstr->mbs, 255, pstr->valid_len);
+ }
+ pstr->valid_raw_len = pstr->valid_len;
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ int c = pstr->raw_mbs[pstr->raw_mbs_idx + offset - 1];
+ pstr->valid_raw_len = 0;
+ if (pstr->trans)
+ c = pstr->trans[c];
+ pstr->tip_context = (bitset_contain (pstr->word_char, c)
+ ? CONTEXT_WORD
+ : ((IS_NEWLINE (c) && pstr->newline_anchor)
+ ? CONTEXT_NEWLINE : 0));
+ }
+ }
+ if (!BE (pstr->mbs_allocated, 0))
+ pstr->mbs += offset;
+ }
+ pstr->raw_mbs_idx = idx;
+ pstr->len -= offset;
+ pstr->stop -= offset;
+
+ /* Then build the buffers. */
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ if (pstr->icase)
+ {
+ reg_errcode_t ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ else
+ build_wcs_buffer (pstr);
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ if (BE (pstr->mbs_allocated, 0))
+ {
+ if (pstr->icase)
+ build_upper_buffer (pstr);
+ else if (pstr->trans != NULL)
+ re_string_translate_buffer (pstr);
+ }
+ else
+ pstr->valid_len = pstr->len;
+
+ pstr->cur_idx = 0;
+ return REG_NOERROR;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_peek_byte_case (const re_string_t *pstr, Idx idx)
+{
+ int ch;
+ Idx off;
+
+ /* Handle the common (easiest) cases first. */
+ if (BE (!pstr->mbs_allocated, 1))
+ return re_string_peek_byte (pstr, idx);
+
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1
+ && ! re_string_is_single_byte_char (pstr, pstr->cur_idx + idx))
+ return re_string_peek_byte (pstr, idx);
+#endif
+
+ off = pstr->cur_idx + idx;
+#ifdef RE_ENABLE_I18N
+ if (pstr->offsets_needed)
+ off = pstr->offsets[off];
+#endif
+
+ ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+#ifdef RE_ENABLE_I18N
+ /* Ensure that e.g. for tr_TR.UTF-8 BACKSLASH DOTLESS SMALL LETTER I
+ this function returns CAPITAL LETTER I instead of first byte of
+ DOTLESS SMALL LETTER I. The latter would confuse the parser,
+ since peek_byte_case doesn't advance cur_idx in any way. */
+ if (pstr->offsets_needed && !isascii (ch))
+ return re_string_peek_byte (pstr, idx);
+#endif
+
+ return ch;
+}
+
+static unsigned char
+internal_function __attribute ((pure))
+re_string_fetch_byte_case (re_string_t *pstr)
+{
+ if (BE (!pstr->mbs_allocated, 1))
+ return re_string_fetch_byte (pstr);
+
+#ifdef RE_ENABLE_I18N
+ if (pstr->offsets_needed)
+ {
+ Idx off;
+ int ch;
+
+ /* For tr_TR.UTF-8 [[:islower:]] there is
+ [[: CAPITAL LETTER I WITH DOT lower:]] in mbs. Skip
+ in that case the whole multi-byte character and return
+ the original letter. On the other side, with
+ [[: DOTLESS SMALL LETTER I return [[:I, as doing
+ anything else would complicate things too much. */
+
+ if (!re_string_first_byte (pstr, pstr->cur_idx))
+ return re_string_fetch_byte (pstr);
+
+ off = pstr->offsets[pstr->cur_idx];
+ ch = pstr->raw_mbs[pstr->raw_mbs_idx + off];
+
+ if (! isascii (ch))
+ return re_string_fetch_byte (pstr);
+
+ re_string_skip_bytes (pstr,
+ re_string_char_size_at (pstr, pstr->cur_idx));
+ return ch;
+ }
+#endif
+
+ return pstr->raw_mbs[pstr->raw_mbs_idx + pstr->cur_idx++];
+}
+
+static void
+internal_function
+re_string_destruct (re_string_t *pstr)
+{
+#ifdef RE_ENABLE_I18N
+ re_free (pstr->wcs);
+ re_free (pstr->offsets);
+#endif /* RE_ENABLE_I18N */
+ if (pstr->mbs_allocated)
+ re_free (pstr->mbs);
+}
+
+/* Return the context at IDX in INPUT. */
+
+static unsigned int
+internal_function
+re_string_context_at (const re_string_t *input, Idx idx, int eflags)
+{
+ int c;
+ if (BE (! REG_VALID_INDEX (idx), 0))
+ /* In this case, we use the value stored in input->tip_context,
+ since we can't know the character in input->mbs[-1] here. */
+ return input->tip_context;
+ if (BE (idx == input->len, 0))
+ return ((eflags & REG_NOTEOL) ? CONTEXT_ENDBUF
+ : CONTEXT_NEWLINE | CONTEXT_ENDBUF);
+#ifdef RE_ENABLE_I18N
+ if (input->mb_cur_max > 1)
+ {
+ wint_t wc;
+ Idx wc_idx = idx;
+ while(input->wcs[wc_idx] == WEOF)
+ {
+#ifdef DEBUG
+ /* It must not happen. */
+ assert (REG_VALID_INDEX (wc_idx));
+#endif
+ --wc_idx;
+ if (! REG_VALID_INDEX (wc_idx))
+ return input->tip_context;
+ }
+ wc = input->wcs[wc_idx];
+ if (BE (input->word_ops_used != 0, 0) && IS_WIDE_WORD_CHAR (wc))
+ return CONTEXT_WORD;
+ return (IS_WIDE_NEWLINE (wc) && input->newline_anchor
+ ? CONTEXT_NEWLINE : 0);
+ }
+ else
+#endif
+ {
+ c = re_string_byte_at (input, idx);
+ if (bitset_contain (input->word_char, c))
+ return CONTEXT_WORD;
+ return IS_NEWLINE (c) && input->newline_anchor ? CONTEXT_NEWLINE : 0;
+ }
+}
+
+/* Functions for set operation. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_alloc (re_node_set *set, Idx size)
+{
+ set->alloc = size;
+ set->nelem = 0;
+ set->elems = re_malloc (Idx, size);
+ if (BE (set->elems == NULL, 0))
+ return REG_ESPACE;
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_1 (re_node_set *set, Idx elem)
+{
+ set->alloc = 1;
+ set->nelem = 1;
+ set->elems = re_malloc (Idx, 1);
+ if (BE (set->elems == NULL, 0))
+ {
+ set->alloc = set->nelem = 0;
+ return REG_ESPACE;
+ }
+ set->elems[0] = elem;
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_2 (re_node_set *set, Idx elem1, Idx elem2)
+{
+ set->alloc = 2;
+ set->elems = re_malloc (Idx, 2);
+ if (BE (set->elems == NULL, 0))
+ return REG_ESPACE;
+ if (elem1 == elem2)
+ {
+ set->nelem = 1;
+ set->elems[0] = elem1;
+ }
+ else
+ {
+ set->nelem = 2;
+ if (elem1 < elem2)
+ {
+ set->elems[0] = elem1;
+ set->elems[1] = elem2;
+ }
+ else
+ {
+ set->elems[0] = elem2;
+ set->elems[1] = elem1;
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_copy (re_node_set *dest, const re_node_set *src)
+{
+ dest->nelem = src->nelem;
+ if (src->nelem > 0)
+ {
+ dest->alloc = dest->nelem;
+ dest->elems = re_malloc (Idx, dest->alloc);
+ if (BE (dest->elems == NULL, 0))
+ {
+ dest->alloc = dest->nelem = 0;
+ return REG_ESPACE;
+ }
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+ }
+ else
+ re_node_set_init_empty (dest);
+ return REG_NOERROR;
+}
+
+/* Calculate the intersection of the sets SRC1 and SRC2. And merge it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded.
+ Note: We assume dest->elems is NULL, when dest->alloc is 0. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_add_intersect (re_node_set *dest, const re_node_set *src1,
+ const re_node_set *src2)
+{
+ Idx i1, i2, is, id, delta, sbase;
+ if (src1->nelem == 0 || src2->nelem == 0)
+ return REG_NOERROR;
+
+ /* We need dest->nelem + 2 * elems_in_intersection; this is a
+ conservative estimate. */
+ if (src1->nelem + src2->nelem + dest->nelem > dest->alloc)
+ {
+ Idx new_alloc = src1->nelem + src2->nelem + dest->alloc;
+ Idx *new_elems = re_realloc (dest->elems, Idx, new_alloc);
+ if (BE (new_elems == NULL, 0))
+ return REG_ESPACE;
+ dest->elems = new_elems;
+ dest->alloc = new_alloc;
+ }
+
+ /* Find the items in the intersection of SRC1 and SRC2, and copy
+ into the top of DEST those that are not already in DEST itself. */
+ sbase = dest->nelem + src1->nelem + src2->nelem;
+ i1 = src1->nelem - 1;
+ i2 = src2->nelem - 1;
+ id = dest->nelem - 1;
+ for (;;)
+ {
+ if (src1->elems[i1] == src2->elems[i2])
+ {
+ /* Try to find the item in DEST. Maybe we could binary search? */
+ while (REG_VALID_INDEX (id) && dest->elems[id] > src1->elems[i1])
+ --id;
+
+ if (! REG_VALID_INDEX (id) || dest->elems[id] != src1->elems[i1])
+ dest->elems[--sbase] = src1->elems[i1];
+
+ if (! REG_VALID_INDEX (--i1) || ! REG_VALID_INDEX (--i2))
+ break;
+ }
+
+ /* Lower the highest of the two items. */
+ else if (src1->elems[i1] < src2->elems[i2])
+ {
+ if (! REG_VALID_INDEX (--i2))
+ break;
+ }
+ else
+ {
+ if (! REG_VALID_INDEX (--i1))
+ break;
+ }
+ }
+
+ id = dest->nelem - 1;
+ is = dest->nelem + src1->nelem + src2->nelem - 1;
+ delta = is - sbase + 1;
+
+ /* Now copy. When DELTA becomes zero, the remaining
+ DEST elements are already in place; this is more or
+ less the same loop that is in re_node_set_merge. */
+ dest->nelem += delta;
+ if (delta > 0 && REG_VALID_INDEX (id))
+ for (;;)
+ {
+ if (dest->elems[is] > dest->elems[id])
+ {
+ /* Copy from the top. */
+ dest->elems[id + delta--] = dest->elems[is--];
+ if (delta == 0)
+ break;
+ }
+ else
+ {
+ /* Slide from the bottom. */
+ dest->elems[id + delta] = dest->elems[id];
+ if (! REG_VALID_INDEX (--id))
+ break;
+ }
+ }
+
+ /* Copy remaining SRC elements. */
+ memcpy (dest->elems, dest->elems + sbase, delta * sizeof (Idx));
+
+ return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets SRC1 and SRC2. And store it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_init_union (re_node_set *dest, const re_node_set *src1,
+ const re_node_set *src2)
+{
+ Idx i1, i2, id;
+ if (src1 != NULL && src1->nelem > 0 && src2 != NULL && src2->nelem > 0)
+ {
+ dest->alloc = src1->nelem + src2->nelem;
+ dest->elems = re_malloc (Idx, dest->alloc);
+ if (BE (dest->elems == NULL, 0))
+ return REG_ESPACE;
+ }
+ else
+ {
+ if (src1 != NULL && src1->nelem > 0)
+ return re_node_set_init_copy (dest, src1);
+ else if (src2 != NULL && src2->nelem > 0)
+ return re_node_set_init_copy (dest, src2);
+ else
+ re_node_set_init_empty (dest);
+ return REG_NOERROR;
+ }
+ for (i1 = i2 = id = 0 ; i1 < src1->nelem && i2 < src2->nelem ;)
+ {
+ if (src1->elems[i1] > src2->elems[i2])
+ {
+ dest->elems[id++] = src2->elems[i2++];
+ continue;
+ }
+ if (src1->elems[i1] == src2->elems[i2])
+ ++i2;
+ dest->elems[id++] = src1->elems[i1++];
+ }
+ if (i1 < src1->nelem)
+ {
+ memcpy (dest->elems + id, src1->elems + i1,
+ (src1->nelem - i1) * sizeof (Idx));
+ id += src1->nelem - i1;
+ }
+ else if (i2 < src2->nelem)
+ {
+ memcpy (dest->elems + id, src2->elems + i2,
+ (src2->nelem - i2) * sizeof (Idx));
+ id += src2->nelem - i2;
+ }
+ dest->nelem = id;
+ return REG_NOERROR;
+}
+
+/* Calculate the union set of the sets DEST and SRC. And store it to
+ DEST. Return value indicate the error code or REG_NOERROR if succeeded. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_node_set_merge (re_node_set *dest, const re_node_set *src)
+{
+ Idx is, id, sbase, delta;
+ if (src == NULL || src->nelem == 0)
+ return REG_NOERROR;
+ if (dest->alloc < 2 * src->nelem + dest->nelem)
+ {
+ Idx new_alloc = 2 * (src->nelem + dest->alloc);
+ Idx *new_buffer = re_realloc (dest->elems, Idx, new_alloc);
+ if (BE (new_buffer == NULL, 0))
+ return REG_ESPACE;
+ dest->elems = new_buffer;
+ dest->alloc = new_alloc;
+ }
+
+ if (BE (dest->nelem == 0, 0))
+ {
+ dest->nelem = src->nelem;
+ memcpy (dest->elems, src->elems, src->nelem * sizeof (Idx));
+ return REG_NOERROR;
+ }
+
+ /* Copy into the top of DEST the items of SRC that are not
+ found in DEST. Maybe we could binary search in DEST? */
+ for (sbase = dest->nelem + 2 * src->nelem,
+ is = src->nelem - 1, id = dest->nelem - 1;
+ REG_VALID_INDEX (is) && REG_VALID_INDEX (id); )
+ {
+ if (dest->elems[id] == src->elems[is])
+ is--, id--;
+ else if (dest->elems[id] < src->elems[is])
+ dest->elems[--sbase] = src->elems[is--];
+ else /* if (dest->elems[id] > src->elems[is]) */
+ --id;
+ }
+
+ if (REG_VALID_INDEX (is))
+ {
+ /* If DEST is exhausted, the remaining items of SRC must be unique. */
+ sbase -= is + 1;
+ memcpy (dest->elems + sbase, src->elems, (is + 1) * sizeof (Idx));
+ }
+
+ id = dest->nelem - 1;
+ is = dest->nelem + 2 * src->nelem - 1;
+ delta = is - sbase + 1;
+ if (delta == 0)
+ return REG_NOERROR;
+
+ /* Now copy. When DELTA becomes zero, the remaining
+ DEST elements are already in place. */
+ dest->nelem += delta;
+ for (;;)
+ {
+ if (dest->elems[is] > dest->elems[id])
+ {
+ /* Copy from the top. */
+ dest->elems[id + delta--] = dest->elems[is--];
+ if (delta == 0)
+ break;
+ }
+ else
+ {
+ /* Slide from the bottom. */
+ dest->elems[id + delta] = dest->elems[id];
+ if (! REG_VALID_INDEX (--id))
+ {
+ /* Copy remaining SRC elements. */
+ memcpy (dest->elems, dest->elems + sbase,
+ delta * sizeof (Idx));
+ break;
+ }
+ }
+ }
+
+ return REG_NOERROR;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+ SET should not already have ELEM.
+ Return true if successful. */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert (re_node_set *set, Idx elem)
+{
+ Idx idx;
+ /* In case the set is empty. */
+ if (set->alloc == 0)
+ return BE (re_node_set_init_1 (set, elem) == REG_NOERROR, 1);
+
+ if (BE (set->nelem, 0) == 0)
+ {
+ /* We already guaranteed above that set->alloc != 0. */
+ set->elems[0] = elem;
+ ++set->nelem;
+ return true;
+ }
+
+ /* Realloc if we need. */
+ if (set->alloc == set->nelem)
+ {
+ Idx *new_elems;
+ set->alloc = set->alloc * 2;
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
+ if (BE (new_elems == NULL, 0))
+ return false;
+ set->elems = new_elems;
+ }
+
+ /* Move the elements which follows the new element. Test the
+ first element separately to skip a check in the inner loop. */
+ if (elem < set->elems[0])
+ {
+ idx = 0;
+ for (idx = set->nelem; idx > 0; idx--)
+ set->elems[idx] = set->elems[idx - 1];
+ }
+ else
+ {
+ for (idx = set->nelem; set->elems[idx - 1] > elem; idx--)
+ set->elems[idx] = set->elems[idx - 1];
+ }
+
+ /* Insert the new element. */
+ set->elems[idx] = elem;
+ ++set->nelem;
+ return true;
+}
+
+/* Insert the new element ELEM to the re_node_set* SET.
+ SET should not already have any element greater than or equal to ELEM.
+ Return true if successful. */
+
+static bool
+internal_function __attribute_warn_unused_result__
+re_node_set_insert_last (re_node_set *set, Idx elem)
+{
+ /* Realloc if we need. */
+ if (set->alloc == set->nelem)
+ {
+ Idx *new_elems;
+ set->alloc = (set->alloc + 1) * 2;
+ new_elems = re_realloc (set->elems, Idx, set->alloc);
+ if (BE (new_elems == NULL, 0))
+ return false;
+ set->elems = new_elems;
+ }
+
+ /* Insert the new element. */
+ set->elems[set->nelem++] = elem;
+ return true;
+}
+
+/* Compare two node sets SET1 and SET2.
+ Return true if SET1 and SET2 are equivalent. */
+
+static bool
+internal_function __attribute ((pure))
+re_node_set_compare (const re_node_set *set1, const re_node_set *set2)
+{
+ Idx i;
+ if (set1 == NULL || set2 == NULL || set1->nelem != set2->nelem)
+ return false;
+ for (i = set1->nelem ; REG_VALID_INDEX (--i) ; )
+ if (set1->elems[i] != set2->elems[i])
+ return false;
+ return true;
+}
+
+/* Return (idx + 1) if SET contains the element ELEM, return 0 otherwise. */
+
+static Idx
+internal_function __attribute ((pure))
+re_node_set_contains (const re_node_set *set, Idx elem)
+{
+ __re_size_t idx, right, mid;
+ if (! REG_VALID_NONZERO_INDEX (set->nelem))
+ return 0;
+
+ /* Binary search the element. */
+ idx = 0;
+ right = set->nelem - 1;
+ while (idx < right)
+ {
+ mid = (idx + right) / 2;
+ if (set->elems[mid] < elem)
+ idx = mid + 1;
+ else
+ right = mid;
+ }
+ return set->elems[idx] == elem ? idx + 1 : 0;
+}
+
+static void
+internal_function
+re_node_set_remove_at (re_node_set *set, Idx idx)
+{
+ if (idx < 0 || idx >= set->nelem)
+ return;
+ --set->nelem;
+ for (; idx < set->nelem; idx++)
+ set->elems[idx] = set->elems[idx + 1];
+}
+
+
+/* Add the token TOKEN to dfa->nodes, and return the index of the token.
+ Or return REG_MISSING if an error occurred. */
+
+static Idx
+internal_function
+re_dfa_add_node (re_dfa_t *dfa, re_token_t token)
+{
+ if (BE (dfa->nodes_len >= dfa->nodes_alloc, 0))
+ {
+ size_t new_nodes_alloc = dfa->nodes_alloc * 2;
+ Idx *new_nexts, *new_indices;
+ re_node_set *new_edests, *new_eclosures;
+ re_token_t *new_nodes;
+ size_t max_object_size =
+ MAX (sizeof (re_token_t),
+ MAX (sizeof (re_node_set),
+ sizeof (Idx)));
+
+ /* Avoid overflows. */
+ if (BE (SIZE_MAX / 2 / max_object_size < dfa->nodes_alloc, 0))
+ return REG_MISSING;
+
+ new_nodes = re_realloc (dfa->nodes, re_token_t, new_nodes_alloc);
+ if (BE (new_nodes == NULL, 0))
+ return REG_MISSING;
+ dfa->nodes = new_nodes;
+ new_nexts = re_realloc (dfa->nexts, Idx, new_nodes_alloc);
+ new_indices = re_realloc (dfa->org_indices, Idx, new_nodes_alloc);
+ new_edests = re_realloc (dfa->edests, re_node_set, new_nodes_alloc);
+ new_eclosures = re_realloc (dfa->eclosures, re_node_set, new_nodes_alloc);
+ if (BE (new_nexts == NULL || new_indices == NULL
+ || new_edests == NULL || new_eclosures == NULL, 0))
+ return REG_MISSING;
+ dfa->nexts = new_nexts;
+ dfa->org_indices = new_indices;
+ dfa->edests = new_edests;
+ dfa->eclosures = new_eclosures;
+ dfa->nodes_alloc = new_nodes_alloc;
+ }
+ dfa->nodes[dfa->nodes_len] = token;
+ dfa->nodes[dfa->nodes_len].constraint = 0;
+#ifdef RE_ENABLE_I18N
+ {
+ int type = token.type;
+ dfa->nodes[dfa->nodes_len].accept_mb =
+ (type == OP_PERIOD && dfa->mb_cur_max > 1) || type == COMPLEX_BRACKET;
+ }
+#endif
+ dfa->nexts[dfa->nodes_len] = REG_MISSING;
+ re_node_set_init_empty (dfa->edests + dfa->nodes_len);
+ re_node_set_init_empty (dfa->eclosures + dfa->nodes_len);
+ return dfa->nodes_len++;
+}
+
+static inline re_hashval_t
+internal_function
+calc_state_hash (const re_node_set *nodes, unsigned int context)
+{
+ re_hashval_t hash = nodes->nelem + context;
+ Idx i;
+ for (i = 0 ; i < nodes->nelem ; i++)
+ hash += nodes->elems[i];
+ return hash;
+}
+
+/* Search for the state whose node_set is equivalent to NODES.
+ Return the pointer to the state, if we found it in the DFA.
+ Otherwise create the new one and return it. In case of an error
+ return NULL and set the error code in ERR.
+ Note: - We assume NULL as the invalid state, then it is possible that
+ return value is NULL and ERR is REG_NOERROR.
+ - We never return non-NULL value in case of any errors, it is for
+ optimization. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state (reg_errcode_t *err, const re_dfa_t *dfa,
+ const re_node_set *nodes)
+{
+ re_hashval_t hash;
+ re_dfastate_t *new_state;
+ struct re_state_table_entry *spot;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
+ if (BE (nodes->nelem == 0, 0))
+ {
+ *err = REG_NOERROR;
+ return NULL;
+ }
+ hash = calc_state_hash (nodes, 0);
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+ for (i = 0 ; i < spot->num ; i++)
+ {
+ re_dfastate_t *state = spot->array[i];
+ if (hash != state->hash)
+ continue;
+ if (re_node_set_compare (&state->nodes, nodes))
+ return state;
+ }
+
+ /* There are no appropriate state in the dfa, create the new one. */
+ new_state = create_ci_newstate (dfa, nodes, hash);
+ if (BE (new_state == NULL, 0))
+ *err = REG_ESPACE;
+
+ return new_state;
+}
+
+/* Search for the state whose node_set is equivalent to NODES and
+ whose context is equivalent to CONTEXT.
+ Return the pointer to the state, if we found it in the DFA.
+ Otherwise create the new one and return it. In case of an error
+ return NULL and set the error code in ERR.
+ Note: - We assume NULL as the invalid state, then it is possible that
+ return value is NULL and ERR is REG_NOERROR.
+ - We never return non-NULL value in case of any errors, it is for
+ optimization. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+re_acquire_state_context (reg_errcode_t *err, const re_dfa_t *dfa,
+ const re_node_set *nodes, unsigned int context)
+{
+ re_hashval_t hash;
+ re_dfastate_t *new_state;
+ struct re_state_table_entry *spot;
+ Idx i;
+#ifdef lint
+ /* Suppress bogus uninitialized-variable warnings. */
+ *err = REG_NOERROR;
+#endif
+ if (nodes->nelem == 0)
+ {
+ *err = REG_NOERROR;
+ return NULL;
+ }
+ hash = calc_state_hash (nodes, context);
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+
+ for (i = 0 ; i < spot->num ; i++)
+ {
+ re_dfastate_t *state = spot->array[i];
+ if (state->hash == hash
+ && state->context == context
+ && re_node_set_compare (state->entrance_nodes, nodes))
+ return state;
+ }
+ /* There are no appropriate state in `dfa', create the new one. */
+ new_state = create_cd_newstate (dfa, nodes, context, hash);
+ if (BE (new_state == NULL, 0))
+ *err = REG_ESPACE;
+
+ return new_state;
+}
+
+/* Finish initialization of the new state NEWSTATE, and using its hash value
+ HASH put in the appropriate bucket of DFA's state table. Return value
+ indicates the error code if failed. */
+
+static reg_errcode_t
+__attribute_warn_unused_result__
+register_state (const re_dfa_t *dfa, re_dfastate_t *newstate,
+ re_hashval_t hash)
+{
+ struct re_state_table_entry *spot;
+ reg_errcode_t err;
+ Idx i;
+
+ newstate->hash = hash;
+ err = re_node_set_alloc (&newstate->non_eps_nodes, newstate->nodes.nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ for (i = 0; i < newstate->nodes.nelem; i++)
+ {
+ Idx elem = newstate->nodes.elems[i];
+ if (!IS_EPSILON_NODE (dfa->nodes[elem].type))
+ if (BE (! re_node_set_insert_last (&newstate->non_eps_nodes, elem), 0))
+ return REG_ESPACE;
+ }
+
+ spot = dfa->state_table + (hash & dfa->state_hash_mask);
+ if (BE (spot->alloc <= spot->num, 0))
+ {
+ Idx new_alloc = 2 * spot->num + 2;
+ re_dfastate_t **new_array = re_realloc (spot->array, re_dfastate_t *,
+ new_alloc);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ spot->array = new_array;
+ spot->alloc = new_alloc;
+ }
+ spot->array[spot->num++] = newstate;
+ return REG_NOERROR;
+}
+
+static void
+free_state (re_dfastate_t *state)
+{
+ re_node_set_free (&state->non_eps_nodes);
+ re_node_set_free (&state->inveclosure);
+ if (state->entrance_nodes != &state->nodes)
+ {
+ re_node_set_free (state->entrance_nodes);
+ re_free (state->entrance_nodes);
+ }
+ re_node_set_free (&state->nodes);
+ re_free (state->word_trtable);
+ re_free (state->trtable);
+ re_free (state);
+}
+
+/* Create the new state which is independ of contexts.
+ Return the new state if succeeded, otherwise return NULL. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_ci_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+ re_hashval_t hash)
+{
+ Idx i;
+ reg_errcode_t err;
+ re_dfastate_t *newstate;
+
+ newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ if (BE (newstate == NULL, 0))
+ return NULL;
+ err = re_node_set_init_copy (&newstate->nodes, nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_free (newstate);
+ return NULL;
+ }
+
+ newstate->entrance_nodes = &newstate->nodes;
+ for (i = 0 ; i < nodes->nelem ; i++)
+ {
+ re_token_t *node = dfa->nodes + nodes->elems[i];
+ re_token_type_t type = node->type;
+ if (type == CHARACTER && !node->constraint)
+ continue;
+#ifdef RE_ENABLE_I18N
+ newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+ /* If the state has the halt node, the state is a halt state. */
+ if (type == END_OF_RE)
+ newstate->halt = 1;
+ else if (type == OP_BACK_REF)
+ newstate->has_backref = 1;
+ else if (type == ANCHOR || node->constraint)
+ newstate->has_constraint = 1;
+ }
+ err = register_state (dfa, newstate, hash);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_state (newstate);
+ newstate = NULL;
+ }
+ return newstate;
+}
+
+/* Create the new state which is depend on the context CONTEXT.
+ Return the new state if succeeded, otherwise return NULL. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+create_cd_newstate (const re_dfa_t *dfa, const re_node_set *nodes,
+ unsigned int context, re_hashval_t hash)
+{
+ Idx i, nctx_nodes = 0;
+ reg_errcode_t err;
+ re_dfastate_t *newstate;
+
+ newstate = (re_dfastate_t *) calloc (sizeof (re_dfastate_t), 1);
+ if (BE (newstate == NULL, 0))
+ return NULL;
+ err = re_node_set_init_copy (&newstate->nodes, nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_free (newstate);
+ return NULL;
+ }
+
+ newstate->context = context;
+ newstate->entrance_nodes = &newstate->nodes;
+
+ for (i = 0 ; i < nodes->nelem ; i++)
+ {
+ re_token_t *node = dfa->nodes + nodes->elems[i];
+ re_token_type_t type = node->type;
+ unsigned int constraint = node->constraint;
+
+ if (type == CHARACTER && !constraint)
+ continue;
+#ifdef RE_ENABLE_I18N
+ newstate->accept_mb |= node->accept_mb;
+#endif /* RE_ENABLE_I18N */
+
+ /* If the state has the halt node, the state is a halt state. */
+ if (type == END_OF_RE)
+ newstate->halt = 1;
+ else if (type == OP_BACK_REF)
+ newstate->has_backref = 1;
+
+ if (constraint)
+ {
+ if (newstate->entrance_nodes == &newstate->nodes)
+ {
+ newstate->entrance_nodes = re_malloc (re_node_set, 1);
+ if (BE (newstate->entrance_nodes == NULL, 0))
+ {
+ free_state (newstate);
+ return NULL;
+ }
+ if (re_node_set_init_copy (newstate->entrance_nodes, nodes)
+ != REG_NOERROR)
+ return NULL;
+ nctx_nodes = 0;
+ newstate->has_constraint = 1;
+ }
+
+ if (NOT_SATISFY_PREV_CONSTRAINT (constraint,context))
+ {
+ re_node_set_remove_at (&newstate->nodes, i - nctx_nodes);
+ ++nctx_nodes;
+ }
+ }
+ }
+ err = register_state (dfa, newstate, hash);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ free_state (newstate);
+ newstate = NULL;
+ }
+ return newstate;
+}
diff --git a/gnu/regex_internal.h b/gnu/regex_internal.h
new file mode 100755
index 00000000..2cb8c4d0
--- /dev/null
+++ b/gnu/regex_internal.h
@@ -0,0 +1,871 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _REGEX_INTERNAL_H
+#define _REGEX_INTERNAL_H 1
+
+#include <assert.h>
+#include <ctype.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <langinfo.h>
+#ifndef _LIBC
+# include "localcharset.h"
+#endif
+#if defined HAVE_LOCALE_H || defined _LIBC
+# include <locale.h>
+#endif
+
+#include <wchar.h>
+#include <wctype.h>
+#include <stdint.h>
+#if defined _LIBC
+# include <bits/libc-lock.h>
+#else
+# define __libc_lock_init(NAME) do { } while (0)
+# define __libc_lock_lock(NAME) do { } while (0)
+# define __libc_lock_unlock(NAME) do { } while (0)
+#endif
+
+/* In case that the system doesn't have isblank(). */
+#if !defined _LIBC && ! (defined isblank || (HAVE_ISBLANK && HAVE_DECL_ISBLANK))
+# define isblank(ch) ((ch) == ' ' || (ch) == '\t')
+#endif
+
+#ifdef _LIBC
+# ifndef _RE_DEFINE_LOCALE_FUNCTIONS
+# define _RE_DEFINE_LOCALE_FUNCTIONS 1
+# include <locale/localeinfo.h>
+# include <locale/elem-hash.h>
+# include <locale/coll-lookup.h>
+# endif
+#endif
+
+/* This is for other GNU distributions with internationalized messages. */
+#if (HAVE_LIBINTL_H && ENABLE_NLS) || defined _LIBC
+# include <libintl.h>
+# ifdef _LIBC
+# undef gettext
+# define gettext(msgid) \
+ INTUSE(__dcgettext) (_libc_intl_domainname, msgid, LC_MESSAGES)
+# endif
+#else
+# define gettext(msgid) (msgid)
+#endif
+
+#ifndef gettext_noop
+/* This define is so xgettext can find the internationalizable
+ strings. */
+# define gettext_noop(String) String
+#endif
+
+/* For loser systems without the definition. */
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+#if (defined MB_CUR_MAX && HAVE_LOCALE_H && HAVE_WCTYPE_H && HAVE_ISWCTYPE && HAVE_WCSCOLL) || _LIBC
+# define RE_ENABLE_I18N
+#endif
+
+#if __GNUC__ >= 3
+# define BE(expr, val) __builtin_expect (expr, val)
+#else
+# define BE(expr, val) (expr)
+# ifdef _LIBC
+# define inline
+# endif
+#endif
+
+/* Number of ASCII characters. */
+#define ASCII_CHARS 0x80
+
+/* Number of single byte characters. */
+#define SBC_MAX (UCHAR_MAX + 1)
+
+#define COLL_ELEM_LEN_MAX 8
+
+/* The character which represents newline. */
+#define NEWLINE_CHAR '\n'
+#define WIDE_NEWLINE_CHAR L'\n'
+
+/* Rename to standard API for using out of glibc. */
+#ifndef _LIBC
+# define __wctype wctype
+# define __iswctype iswctype
+# define __btowc btowc
+# define __wcrtomb wcrtomb
+# define __mbrtowc mbrtowc
+# define __regfree regfree
+# define attribute_hidden
+#endif /* not _LIBC */
+
+#if __GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)
+# define __attribute(arg) __attribute__ (arg)
+#else
+# define __attribute(arg)
+#endif
+
+typedef __re_idx_t Idx;
+
+/* Special return value for failure to match. */
+#define REG_MISSING ((Idx) -1)
+
+/* Special return value for internal error. */
+#define REG_ERROR ((Idx) -2)
+
+/* Test whether N is a valid index, and is not one of the above. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_INDEX(n) ((Idx) (n) < REG_ERROR)
+#else
+# define REG_VALID_INDEX(n) (0 <= (n))
+#endif
+
+/* Test whether N is a valid nonzero index. */
+#ifdef _REGEX_LARGE_OFFSETS
+# define REG_VALID_NONZERO_INDEX(n) ((Idx) ((n) - 1) < (Idx) (REG_ERROR - 1))
+#else
+# define REG_VALID_NONZERO_INDEX(n) (0 < (n))
+#endif
+
+/* A hash value, suitable for computing hash tables. */
+typedef __re_size_t re_hashval_t;
+
+/* An integer used to represent a set of bits. It must be unsigned,
+ and must be at least as wide as unsigned int. */
+typedef unsigned long int bitset_word_t;
+/* All bits set in a bitset_word_t. */
+#define BITSET_WORD_MAX ULONG_MAX
+
+/* Number of bits in a bitset_word_t. For portability to hosts with
+ padding bits, do not use '(sizeof (bitset_word_t) * CHAR_BIT)';
+ instead, deduce it directly from BITSET_WORD_MAX. Avoid
+ greater-than-32-bit integers and unconditional shifts by more than
+ 31 bits, as they're not portable. */
+#if BITSET_WORD_MAX == 0xffffffffUL
+# define BITSET_WORD_BITS 32
+#elif BITSET_WORD_MAX >> 31 >> 4 == 1
+# define BITSET_WORD_BITS 36
+#elif BITSET_WORD_MAX >> 31 >> 16 == 1
+# define BITSET_WORD_BITS 48
+#elif BITSET_WORD_MAX >> 31 >> 28 == 1
+# define BITSET_WORD_BITS 60
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 1 == 1
+# define BITSET_WORD_BITS 64
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 9 == 1
+# define BITSET_WORD_BITS 72
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 3 == 1
+# define BITSET_WORD_BITS 128
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 == 1
+# define BITSET_WORD_BITS 256
+#elif BITSET_WORD_MAX >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 31 >> 7 > 1
+# define BITSET_WORD_BITS 257 /* any value > SBC_MAX will do here */
+# if BITSET_WORD_BITS <= SBC_MAX
+# error "Invalid SBC_MAX"
+# endif
+#else
+# error "Add case for new bitset_word_t size"
+#endif
+
+/* Number of bitset_word_t values in a bitset_t. */
+#define BITSET_WORDS ((SBC_MAX + BITSET_WORD_BITS - 1) / BITSET_WORD_BITS)
+
+typedef bitset_word_t bitset_t[BITSET_WORDS];
+typedef bitset_word_t *re_bitset_ptr_t;
+typedef const bitset_word_t *re_const_bitset_ptr_t;
+
+#define PREV_WORD_CONSTRAINT 0x0001
+#define PREV_NOTWORD_CONSTRAINT 0x0002
+#define NEXT_WORD_CONSTRAINT 0x0004
+#define NEXT_NOTWORD_CONSTRAINT 0x0008
+#define PREV_NEWLINE_CONSTRAINT 0x0010
+#define NEXT_NEWLINE_CONSTRAINT 0x0020
+#define PREV_BEGBUF_CONSTRAINT 0x0040
+#define NEXT_ENDBUF_CONSTRAINT 0x0080
+#define WORD_DELIM_CONSTRAINT 0x0100
+#define NOT_WORD_DELIM_CONSTRAINT 0x0200
+
+typedef enum
+{
+ INSIDE_WORD = PREV_WORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+ WORD_FIRST = PREV_NOTWORD_CONSTRAINT | NEXT_WORD_CONSTRAINT,
+ WORD_LAST = PREV_WORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+ INSIDE_NOTWORD = PREV_NOTWORD_CONSTRAINT | NEXT_NOTWORD_CONSTRAINT,
+ LINE_FIRST = PREV_NEWLINE_CONSTRAINT,
+ LINE_LAST = NEXT_NEWLINE_CONSTRAINT,
+ BUF_FIRST = PREV_BEGBUF_CONSTRAINT,
+ BUF_LAST = NEXT_ENDBUF_CONSTRAINT,
+ WORD_DELIM = WORD_DELIM_CONSTRAINT,
+ NOT_WORD_DELIM = NOT_WORD_DELIM_CONSTRAINT
+} re_context_type;
+
+typedef struct
+{
+ Idx alloc;
+ Idx nelem;
+ Idx *elems;
+} re_node_set;
+
+typedef enum
+{
+ NON_TYPE = 0,
+
+ /* Node type, These are used by token, node, tree. */
+ CHARACTER = 1,
+ END_OF_RE = 2,
+ SIMPLE_BRACKET = 3,
+ OP_BACK_REF = 4,
+ OP_PERIOD = 5,
+#ifdef RE_ENABLE_I18N
+ COMPLEX_BRACKET = 6,
+ OP_UTF8_PERIOD = 7,
+#endif /* RE_ENABLE_I18N */
+
+ /* We define EPSILON_BIT as a macro so that OP_OPEN_SUBEXP is used
+ when the debugger shows values of this enum type. */
+#define EPSILON_BIT 8
+ OP_OPEN_SUBEXP = EPSILON_BIT | 0,
+ OP_CLOSE_SUBEXP = EPSILON_BIT | 1,
+ OP_ALT = EPSILON_BIT | 2,
+ OP_DUP_ASTERISK = EPSILON_BIT | 3,
+ ANCHOR = EPSILON_BIT | 4,
+
+ /* Tree type, these are used only by tree. */
+ CONCAT = 16,
+ SUBEXP = 17,
+
+ /* Token type, these are used only by token. */
+ OP_DUP_PLUS = 18,
+ OP_DUP_QUESTION,
+ OP_OPEN_BRACKET,
+ OP_CLOSE_BRACKET,
+ OP_CHARSET_RANGE,
+ OP_OPEN_DUP_NUM,
+ OP_CLOSE_DUP_NUM,
+ OP_NON_MATCH_LIST,
+ OP_OPEN_COLL_ELEM,
+ OP_CLOSE_COLL_ELEM,
+ OP_OPEN_EQUIV_CLASS,
+ OP_CLOSE_EQUIV_CLASS,
+ OP_OPEN_CHAR_CLASS,
+ OP_CLOSE_CHAR_CLASS,
+ OP_WORD,
+ OP_NOTWORD,
+ OP_SPACE,
+ OP_NOTSPACE,
+ BACK_SLASH
+
+} re_token_type_t;
+
+#ifdef RE_ENABLE_I18N
+typedef struct
+{
+ /* Multibyte characters. */
+ wchar_t *mbchars;
+
+ /* Collating symbols. */
+# ifdef _LIBC
+ int32_t *coll_syms;
+# endif
+
+ /* Equivalence classes. */
+# ifdef _LIBC
+ int32_t *equiv_classes;
+# endif
+
+ /* Range expressions. */
+# ifdef _LIBC
+ uint32_t *range_starts;
+ uint32_t *range_ends;
+# else /* not _LIBC */
+ wchar_t *range_starts;
+ wchar_t *range_ends;
+# endif /* not _LIBC */
+
+ /* Character classes. */
+ wctype_t *char_classes;
+
+ /* If this character set is the non-matching list. */
+ unsigned int non_match : 1;
+
+ /* # of multibyte characters. */
+ Idx nmbchars;
+
+ /* # of collating symbols. */
+ Idx ncoll_syms;
+
+ /* # of equivalence classes. */
+ Idx nequiv_classes;
+
+ /* # of range expressions. */
+ Idx nranges;
+
+ /* # of character classes. */
+ Idx nchar_classes;
+} re_charset_t;
+#endif /* RE_ENABLE_I18N */
+
+typedef struct
+{
+ union
+ {
+ unsigned char c; /* for CHARACTER */
+ re_bitset_ptr_t sbcset; /* for SIMPLE_BRACKET */
+#ifdef RE_ENABLE_I18N
+ re_charset_t *mbcset; /* for COMPLEX_BRACKET */
+#endif /* RE_ENABLE_I18N */
+ Idx idx; /* for BACK_REF */
+ re_context_type ctx_type; /* for ANCHOR */
+ } opr;
+#if __GNUC__ >= 2 && !__STRICT_ANSI__
+ re_token_type_t type : 8;
+#else
+ re_token_type_t type;
+#endif
+ unsigned int constraint : 10; /* context constraint */
+ unsigned int duplicated : 1;
+ unsigned int opt_subexp : 1;
+#ifdef RE_ENABLE_I18N
+ unsigned int accept_mb : 1;
+ /* These 2 bits can be moved into the union if needed (e.g. if running out
+ of bits; move opr.c to opr.c.c and move the flags to opr.c.flags). */
+ unsigned int mb_partial : 1;
+#endif
+ unsigned int word_char : 1;
+} re_token_t;
+
+#define IS_EPSILON_NODE(type) ((type) & EPSILON_BIT)
+
+struct re_string_t
+{
+ /* Indicate the raw buffer which is the original string passed as an
+ argument of regexec(), re_search(), etc.. */
+ const unsigned char *raw_mbs;
+ /* Store the multibyte string. In case of "case insensitive mode" like
+ REG_ICASE, upper cases of the string are stored, otherwise MBS points
+ the same address that RAW_MBS points. */
+ unsigned char *mbs;
+#ifdef RE_ENABLE_I18N
+ /* Store the wide character string which is corresponding to MBS. */
+ wint_t *wcs;
+ Idx *offsets;
+ mbstate_t cur_state;
+#endif
+ /* Index in RAW_MBS. Each character mbs[i] corresponds to
+ raw_mbs[raw_mbs_idx + i]. */
+ Idx raw_mbs_idx;
+ /* The length of the valid characters in the buffers. */
+ Idx valid_len;
+ /* The corresponding number of bytes in raw_mbs array. */
+ Idx valid_raw_len;
+ /* The length of the buffers MBS and WCS. */
+ Idx bufs_len;
+ /* The index in MBS, which is updated by re_string_fetch_byte. */
+ Idx cur_idx;
+ /* length of RAW_MBS array. */
+ Idx raw_len;
+ /* This is RAW_LEN - RAW_MBS_IDX + VALID_LEN - VALID_RAW_LEN. */
+ Idx len;
+ /* End of the buffer may be shorter than its length in the cases such
+ as re_match_2, re_search_2. Then, we use STOP for end of the buffer
+ instead of LEN. */
+ Idx raw_stop;
+ /* This is RAW_STOP - RAW_MBS_IDX adjusted through OFFSETS. */
+ Idx stop;
+
+ /* The context of mbs[0]. We store the context independently, since
+ the context of mbs[0] may be different from raw_mbs[0], which is
+ the beginning of the input string. */
+ unsigned int tip_context;
+ /* The translation passed as a part of an argument of re_compile_pattern. */
+ RE_TRANSLATE_TYPE trans;
+ /* Copy of re_dfa_t's word_char. */
+ re_const_bitset_ptr_t word_char;
+ /* true if REG_ICASE. */
+ unsigned char icase;
+ unsigned char is_utf8;
+ unsigned char map_notascii;
+ unsigned char mbs_allocated;
+ unsigned char offsets_needed;
+ unsigned char newline_anchor;
+ unsigned char word_ops_used;
+ int mb_cur_max;
+};
+typedef struct re_string_t re_string_t;
+
+
+struct re_dfa_t;
+typedef struct re_dfa_t re_dfa_t;
+
+#ifndef _LIBC
+# if defined __i386__ && !defined __EMX__
+# define internal_function __attribute ((regparm (3), stdcall))
+# else
+# define internal_function
+# endif
+#endif
+
+static reg_errcode_t re_string_realloc_buffers (re_string_t *pstr,
+ Idx new_buf_len)
+ internal_function;
+#ifdef RE_ENABLE_I18N
+static void build_wcs_buffer (re_string_t *pstr) internal_function;
+static reg_errcode_t build_wcs_upper_buffer (re_string_t *pstr)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static void build_upper_buffer (re_string_t *pstr) internal_function;
+static void re_string_translate_buffer (re_string_t *pstr) internal_function;
+static unsigned int re_string_context_at (const re_string_t *input, Idx idx,
+ int eflags)
+ internal_function __attribute ((pure));
+#define re_string_peek_byte(pstr, offset) \
+ ((pstr)->mbs[(pstr)->cur_idx + offset])
+#define re_string_fetch_byte(pstr) \
+ ((pstr)->mbs[(pstr)->cur_idx++])
+#define re_string_first_byte(pstr, idx) \
+ ((idx) == (pstr)->valid_len || (pstr)->wcs[idx] != WEOF)
+#define re_string_is_single_byte_char(pstr, idx) \
+ ((pstr)->wcs[idx] != WEOF && ((pstr)->valid_len == (idx) + 1 \
+ || (pstr)->wcs[(idx) + 1] != WEOF))
+#define re_string_eoi(pstr) ((pstr)->stop <= (pstr)->cur_idx)
+#define re_string_cur_idx(pstr) ((pstr)->cur_idx)
+#define re_string_get_buffer(pstr) ((pstr)->mbs)
+#define re_string_length(pstr) ((pstr)->len)
+#define re_string_byte_at(pstr,idx) ((pstr)->mbs[idx])
+#define re_string_skip_bytes(pstr,idx) ((pstr)->cur_idx += (idx))
+#define re_string_set_index(pstr,idx) ((pstr)->cur_idx = (idx))
+
+#include <alloca.h>
+
+#ifndef _LIBC
+# if HAVE_ALLOCA
+/* The OS usually guarantees only one guard page at the bottom of the stack,
+ and a page size can be as small as 4096 bytes. So we cannot safely
+ allocate anything larger than 4096 bytes. Also care for the possibility
+ of a few compiler-allocated temporary stack slots. */
+# define __libc_use_alloca(n) ((n) < 4032)
+# else
+/* alloca is implemented with malloc, so just use malloc. */
+# define __libc_use_alloca(n) 0
+# endif
+#endif
+
+#ifndef MAX
+# define MAX(a,b) ((a) < (b) ? (b) : (a))
+#endif
+
+#define re_malloc(t,n) ((t *) malloc ((n) * sizeof (t)))
+#define re_realloc(p,t,n) ((t *) realloc (p, (n) * sizeof (t)))
+#define re_free(p) free (p)
+
+struct bin_tree_t
+{
+ struct bin_tree_t *parent;
+ struct bin_tree_t *left;
+ struct bin_tree_t *right;
+ struct bin_tree_t *first;
+ struct bin_tree_t *next;
+
+ re_token_t token;
+
+ /* `node_idx' is the index in dfa->nodes, if `type' == 0.
+ Otherwise `type' indicate the type of this node. */
+ Idx node_idx;
+};
+typedef struct bin_tree_t bin_tree_t;
+
+#define BIN_TREE_STORAGE_SIZE \
+ ((1024 - sizeof (void *)) / sizeof (bin_tree_t))
+
+struct bin_tree_storage_t
+{
+ struct bin_tree_storage_t *next;
+ bin_tree_t data[BIN_TREE_STORAGE_SIZE];
+};
+typedef struct bin_tree_storage_t bin_tree_storage_t;
+
+#define CONTEXT_WORD 1
+#define CONTEXT_NEWLINE (CONTEXT_WORD << 1)
+#define CONTEXT_BEGBUF (CONTEXT_NEWLINE << 1)
+#define CONTEXT_ENDBUF (CONTEXT_BEGBUF << 1)
+
+#define IS_WORD_CONTEXT(c) ((c) & CONTEXT_WORD)
+#define IS_NEWLINE_CONTEXT(c) ((c) & CONTEXT_NEWLINE)
+#define IS_BEGBUF_CONTEXT(c) ((c) & CONTEXT_BEGBUF)
+#define IS_ENDBUF_CONTEXT(c) ((c) & CONTEXT_ENDBUF)
+#define IS_ORDINARY_CONTEXT(c) ((c) == 0)
+
+#define IS_WORD_CHAR(ch) (isalnum (ch) || (ch) == '_')
+#define IS_NEWLINE(ch) ((ch) == NEWLINE_CHAR)
+#define IS_WIDE_WORD_CHAR(ch) (iswalnum (ch) || (ch) == L'_')
+#define IS_WIDE_NEWLINE(ch) ((ch) == WIDE_NEWLINE_CHAR)
+
+#define NOT_SATISFY_PREV_CONSTRAINT(constraint,context) \
+ ((((constraint) & PREV_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+ || ((constraint & PREV_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+ || ((constraint & PREV_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context))\
+ || ((constraint & PREV_BEGBUF_CONSTRAINT) && !IS_BEGBUF_CONTEXT (context)))
+
+#define NOT_SATISFY_NEXT_CONSTRAINT(constraint,context) \
+ ((((constraint) & NEXT_WORD_CONSTRAINT) && !IS_WORD_CONTEXT (context)) \
+ || (((constraint) & NEXT_NOTWORD_CONSTRAINT) && IS_WORD_CONTEXT (context)) \
+ || (((constraint) & NEXT_NEWLINE_CONSTRAINT) && !IS_NEWLINE_CONTEXT (context)) \
+ || (((constraint) & NEXT_ENDBUF_CONSTRAINT) && !IS_ENDBUF_CONTEXT (context)))
+
+struct re_dfastate_t
+{
+ re_hashval_t hash;
+ re_node_set nodes;
+ re_node_set non_eps_nodes;
+ re_node_set inveclosure;
+ re_node_set *entrance_nodes;
+ struct re_dfastate_t **trtable, **word_trtable;
+ unsigned int context : 4;
+ unsigned int halt : 1;
+ /* If this state can accept `multi byte'.
+ Note that we refer to multibyte characters, and multi character
+ collating elements as `multi byte'. */
+ unsigned int accept_mb : 1;
+ /* If this state has backreference node(s). */
+ unsigned int has_backref : 1;
+ unsigned int has_constraint : 1;
+};
+typedef struct re_dfastate_t re_dfastate_t;
+
+struct re_state_table_entry
+{
+ Idx num;
+ Idx alloc;
+ re_dfastate_t **array;
+};
+
+/* Array type used in re_sub_match_last_t and re_sub_match_top_t. */
+
+typedef struct
+{
+ Idx next_idx;
+ Idx alloc;
+ re_dfastate_t **array;
+} state_array_t;
+
+/* Store information about the node NODE whose type is OP_CLOSE_SUBEXP. */
+
+typedef struct
+{
+ Idx node;
+ Idx str_idx; /* The position NODE match at. */
+ state_array_t path;
+} re_sub_match_last_t;
+
+/* Store information about the node NODE whose type is OP_OPEN_SUBEXP.
+ And information about the node, whose type is OP_CLOSE_SUBEXP,
+ corresponding to NODE is stored in LASTS. */
+
+typedef struct
+{
+ Idx str_idx;
+ Idx node;
+ state_array_t *path;
+ Idx alasts; /* Allocation size of LASTS. */
+ Idx nlasts; /* The number of LASTS. */
+ re_sub_match_last_t **lasts;
+} re_sub_match_top_t;
+
+struct re_backref_cache_entry
+{
+ Idx node;
+ Idx str_idx;
+ Idx subexp_from;
+ Idx subexp_to;
+ char more;
+ char unused;
+ unsigned short int eps_reachable_subexps_map;
+};
+
+typedef struct
+{
+ /* The string object corresponding to the input string. */
+ re_string_t input;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+ const re_dfa_t *const dfa;
+#else
+ const re_dfa_t *dfa;
+#endif
+ /* EFLAGS of the argument of regexec. */
+ int eflags;
+ /* Where the matching ends. */
+ Idx match_last;
+ Idx last_node;
+ /* The state log used by the matcher. */
+ re_dfastate_t **state_log;
+ Idx state_log_top;
+ /* Back reference cache. */
+ Idx nbkref_ents;
+ Idx abkref_ents;
+ struct re_backref_cache_entry *bkref_ents;
+ int max_mb_elem_len;
+ Idx nsub_tops;
+ Idx asub_tops;
+ re_sub_match_top_t **sub_tops;
+} re_match_context_t;
+
+typedef struct
+{
+ re_dfastate_t **sifted_states;
+ re_dfastate_t **limited_states;
+ Idx last_node;
+ Idx last_str_idx;
+ re_node_set limits;
+} re_sift_context_t;
+
+struct re_fail_stack_ent_t
+{
+ Idx idx;
+ Idx node;
+ regmatch_t *regs;
+ re_node_set eps_via_nodes;
+};
+
+struct re_fail_stack_t
+{
+ Idx num;
+ Idx alloc;
+ struct re_fail_stack_ent_t *stack;
+};
+
+struct re_dfa_t
+{
+ re_token_t *nodes;
+ size_t nodes_alloc;
+ size_t nodes_len;
+ Idx *nexts;
+ Idx *org_indices;
+ re_node_set *edests;
+ re_node_set *eclosures;
+ re_node_set *inveclosures;
+ struct re_state_table_entry *state_table;
+ re_dfastate_t *init_state;
+ re_dfastate_t *init_state_word;
+ re_dfastate_t *init_state_nl;
+ re_dfastate_t *init_state_begbuf;
+ bin_tree_t *str_tree;
+ bin_tree_storage_t *str_tree_storage;
+ re_bitset_ptr_t sb_char;
+ int str_tree_storage_idx;
+
+ /* number of subexpressions `re_nsub' is in regex_t. */
+ re_hashval_t state_hash_mask;
+ Idx init_node;
+ Idx nbackref; /* The number of backreference in this dfa. */
+
+ /* Bitmap expressing which backreference is used. */
+ bitset_word_t used_bkref_map;
+ bitset_word_t completed_bkref_map;
+
+ unsigned int has_plural_match : 1;
+ /* If this dfa has "multibyte node", which is a backreference or
+ a node which can accept multibyte character or multi character
+ collating element. */
+ unsigned int has_mb_node : 1;
+ unsigned int is_utf8 : 1;
+ unsigned int map_notascii : 1;
+ unsigned int word_ops_used : 1;
+ int mb_cur_max;
+ bitset_t word_char;
+ reg_syntax_t syntax;
+ Idx *subexp_map;
+#ifdef DEBUG
+ char* re_str;
+#endif
+#ifdef _LIBC
+ __libc_lock_define (, lock)
+#endif
+};
+
+#define re_node_set_init_empty(set) memset (set, '\0', sizeof (re_node_set))
+#define re_node_set_remove(set,id) \
+ (re_node_set_remove_at (set, re_node_set_contains (set, id) - 1))
+#define re_node_set_empty(p) ((p)->nelem = 0)
+#define re_node_set_free(set) re_free ((set)->elems)
+
+
+typedef enum
+{
+ SB_CHAR,
+ MB_CHAR,
+ EQUIV_CLASS,
+ COLL_SYM,
+ CHAR_CLASS
+} bracket_elem_type;
+
+typedef struct
+{
+ bracket_elem_type type;
+ union
+ {
+ unsigned char ch;
+ unsigned char *name;
+ wchar_t wch;
+ } opr;
+} bracket_elem_t;
+
+
+/* Inline functions for bitset_t operation. */
+
+static inline void
+bitset_set (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] |= (bitset_word_t) 1 << i % BITSET_WORD_BITS;
+}
+
+static inline void
+bitset_clear (bitset_t set, Idx i)
+{
+ set[i / BITSET_WORD_BITS] &= ~ ((bitset_word_t) 1 << i % BITSET_WORD_BITS);
+}
+
+static inline bool
+bitset_contain (const bitset_t set, Idx i)
+{
+ return (set[i / BITSET_WORD_BITS] >> i % BITSET_WORD_BITS) & 1;
+}
+
+static inline void
+bitset_empty (bitset_t set)
+{
+ memset (set, '\0', sizeof (bitset_t));
+}
+
+static inline void
+bitset_set_all (bitset_t set)
+{
+ memset (set, -1, sizeof (bitset_word_t) * (SBC_MAX / BITSET_WORD_BITS));
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1;
+}
+
+static inline void
+bitset_copy (bitset_t dest, const bitset_t src)
+{
+ memcpy (dest, src, sizeof (bitset_t));
+}
+
+static inline void
+bitset_not (bitset_t set)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < SBC_MAX / BITSET_WORD_BITS; ++bitset_i)
+ set[bitset_i] = ~set[bitset_i];
+ if (SBC_MAX % BITSET_WORD_BITS != 0)
+ set[BITSET_WORDS - 1] =
+ ((((bitset_word_t) 1 << SBC_MAX % BITSET_WORD_BITS) - 1)
+ & ~set[BITSET_WORDS - 1]);
+}
+
+static inline void
+bitset_merge (bitset_t dest, const bitset_t src)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+ dest[bitset_i] |= src[bitset_i];
+}
+
+static inline void
+bitset_mask (bitset_t dest, const bitset_t src)
+{
+ int bitset_i;
+ for (bitset_i = 0; bitset_i < BITSET_WORDS; ++bitset_i)
+ dest[bitset_i] &= src[bitset_i];
+}
+
+#ifdef RE_ENABLE_I18N
+/* Inline functions for re_string. */
+static inline int
+internal_function __attribute ((pure))
+re_string_char_size_at (const re_string_t *pstr, Idx idx)
+{
+ int byte_idx;
+ if (pstr->mb_cur_max == 1)
+ return 1;
+ for (byte_idx = 1; idx + byte_idx < pstr->valid_len; ++byte_idx)
+ if (pstr->wcs[idx + byte_idx] != WEOF)
+ break;
+ return byte_idx;
+}
+
+static inline wint_t
+internal_function __attribute ((pure))
+re_string_wchar_at (const re_string_t *pstr, Idx idx)
+{
+ if (pstr->mb_cur_max == 1)
+ return (wint_t) pstr->mbs[idx];
+ return (wint_t) pstr->wcs[idx];
+}
+
+static int
+internal_function __attribute ((pure))
+re_string_elem_size_at (const re_string_t *pstr, Idx idx)
+{
+# ifdef _LIBC
+ const unsigned char *p, *extra;
+ const int32_t *table, *indirect;
+ int32_t tmp;
+# include <locale/weight.h>
+ uint_fast32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+
+ if (nrules != 0)
+ {
+ table = (const int32_t *) _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *) _NL_CURRENT (LC_COLLATE,
+ _NL_COLLATE_INDIRECTMB);
+ p = pstr->mbs + idx;
+ tmp = findidx (&p);
+ return p - pstr->mbs - idx;
+ }
+ else
+# endif /* _LIBC */
+ return 1;
+}
+#endif /* RE_ENABLE_I18N */
+
+#ifndef __GNUC_PREREQ
+# if defined __GNUC__ && defined __GNUC_MINOR__
+# define __GNUC_PREREQ(maj, min) \
+ ((__GNUC__ << 16) + __GNUC_MINOR__ >= ((maj) << 16) + (min))
+# else
+# define __GNUC_PREREQ(maj, min) 0
+# endif
+#endif
+
+#if __GNUC_PREREQ (3,4)
+# undef __attribute_warn_unused_result__
+# define __attribute_warn_unused_result__ \
+ __attribute__ ((__warn_unused_result__))
+#else
+# define __attribute_warn_unused_result__ /* empty */
+#endif
+
+#endif /* _REGEX_INTERNAL_H */
diff --git a/gnu/regexec.c b/gnu/regexec.c
new file mode 100755
index 00000000..dc449ce5
--- /dev/null
+++ b/gnu/regexec.c
@@ -0,0 +1,4416 @@
+/* Extended regular expression matching and search library.
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free
+ Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Isamu Hasegawa <isamu@yamato.ibm.com>.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+static reg_errcode_t match_ctx_init (re_match_context_t *cache, int eflags,
+ Idx n) internal_function;
+static void match_ctx_clean (re_match_context_t *mctx) internal_function;
+static void match_ctx_free (re_match_context_t *cache) internal_function;
+static reg_errcode_t match_ctx_add_entry (re_match_context_t *cache, Idx node,
+ Idx str_idx, Idx from, Idx to)
+ internal_function;
+static Idx search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+ internal_function;
+static reg_errcode_t match_ctx_add_subtop (re_match_context_t *mctx, Idx node,
+ Idx str_idx) internal_function;
+static re_sub_match_last_t * match_ctx_add_sublast (re_sub_match_top_t *subtop,
+ Idx node, Idx str_idx)
+ internal_function;
+static void sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+ re_dfastate_t **limited_sts, Idx last_node,
+ Idx last_str_idx)
+ internal_function;
+static reg_errcode_t re_search_internal (const regex_t *preg,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
+ size_t nmatch, regmatch_t pmatch[],
+ int eflags) internal_function;
+static regoff_t re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range,
+ struct re_registers *regs,
+ Idx stop, bool ret_len) internal_function;
+static regoff_t re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length, Idx start,
+ regoff_t range, Idx stop,
+ struct re_registers *regs,
+ bool ret_len) internal_function;
+static unsigned int re_copy_regs (struct re_registers *regs, regmatch_t *pmatch,
+ Idx nregs, int regs_allocated)
+ internal_function;
+static reg_errcode_t prune_impossible_nodes (re_match_context_t *mctx)
+ internal_function;
+static Idx check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first) internal_function;
+static Idx check_halt_state_context (const re_match_context_t *mctx,
+ const re_dfastate_t *state, Idx idx)
+ internal_function;
+static void update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+ regmatch_t *prev_idx_match, Idx cur_node,
+ Idx cur_idx, Idx nmatch) internal_function;
+static reg_errcode_t push_fail_stack (struct re_fail_stack_t *fs,
+ Idx str_idx, Idx dest_node, Idx nregs,
+ regmatch_t *regs,
+ re_node_set *eps_via_nodes)
+ internal_function;
+static reg_errcode_t set_regs (const regex_t *preg,
+ const re_match_context_t *mctx,
+ size_t nmatch, regmatch_t *pmatch,
+ bool fl_backtrack) internal_function;
+static reg_errcode_t free_fail_stack_return (struct re_fail_stack_t *fs)
+ internal_function;
+
+#ifdef RE_ENABLE_I18N
+static int sift_states_iter_mb (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t sift_states_backward (const re_match_context_t *mctx,
+ re_sift_context_t *sctx)
+ internal_function;
+static reg_errcode_t build_sifted_states (const re_match_context_t *mctx,
+ re_sift_context_t *sctx, Idx str_idx,
+ re_node_set *cur_dest)
+ internal_function;
+static reg_errcode_t update_cur_sifted_state (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx str_idx,
+ re_node_set *dest_nodes)
+ internal_function;
+static reg_errcode_t add_epsilon_src_nodes (const re_dfa_t *dfa,
+ re_node_set *dest_nodes,
+ const re_node_set *candidates)
+ internal_function;
+static bool check_dst_limits (const re_match_context_t *mctx,
+ const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node,
+ Idx src_idx) internal_function;
+static int check_dst_limits_calc_pos_1 (const re_match_context_t *mctx,
+ int boundaries, Idx subexp_idx,
+ Idx from_node, Idx bkref_idx)
+ internal_function;
+static int check_dst_limits_calc_pos (const re_match_context_t *mctx,
+ Idx limit, Idx subexp_idx,
+ Idx node, Idx str_idx,
+ Idx bkref_idx) internal_function;
+static reg_errcode_t check_subexp_limits (const re_dfa_t *dfa,
+ re_node_set *dest_nodes,
+ const re_node_set *candidates,
+ re_node_set *limits,
+ struct re_backref_cache_entry *bkref_ents,
+ Idx str_idx) internal_function;
+static reg_errcode_t sift_states_bkref (const re_match_context_t *mctx,
+ re_sift_context_t *sctx,
+ Idx str_idx, const re_node_set *candidates)
+ internal_function;
+static reg_errcode_t merge_state_array (const re_dfa_t *dfa,
+ re_dfastate_t **dst,
+ re_dfastate_t **src, Idx num)
+ internal_function;
+static re_dfastate_t *find_recover_state (reg_errcode_t *err,
+ re_match_context_t *mctx) internal_function;
+static re_dfastate_t *transit_state (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *state) internal_function;
+static re_dfastate_t *merge_state_with_log (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *next_state)
+ internal_function;
+static reg_errcode_t check_subexp_matching_top (re_match_context_t *mctx,
+ re_node_set *cur_nodes,
+ Idx str_idx) internal_function;
+#if 0
+static re_dfastate_t *transit_state_sb (reg_errcode_t *err,
+ re_match_context_t *mctx,
+ re_dfastate_t *pstate)
+ internal_function;
+#endif
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t transit_state_mb (re_match_context_t *mctx,
+ re_dfastate_t *pstate)
+ internal_function;
+#endif /* RE_ENABLE_I18N */
+static reg_errcode_t transit_state_bkref (re_match_context_t *mctx,
+ const re_node_set *nodes)
+ internal_function;
+static reg_errcode_t get_subexp (re_match_context_t *mctx,
+ Idx bkref_node, Idx bkref_str_idx)
+ internal_function;
+static reg_errcode_t get_subexp_sub (re_match_context_t *mctx,
+ const re_sub_match_top_t *sub_top,
+ re_sub_match_last_t *sub_last,
+ Idx bkref_node, Idx bkref_str)
+ internal_function;
+static Idx find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+ Idx subexp_idx, int type) internal_function;
+static reg_errcode_t check_arrival (re_match_context_t *mctx,
+ state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str,
+ int type) internal_function;
+static reg_errcode_t check_arrival_add_next_nodes (re_match_context_t *mctx,
+ Idx str_idx,
+ re_node_set *cur_nodes,
+ re_node_set *next_nodes)
+ internal_function;
+static reg_errcode_t check_arrival_expand_ecl (const re_dfa_t *dfa,
+ re_node_set *cur_nodes,
+ Idx ex_subexp, int type)
+ internal_function;
+static reg_errcode_t check_arrival_expand_ecl_sub (const re_dfa_t *dfa,
+ re_node_set *dst_nodes,
+ Idx target, Idx ex_subexp,
+ int type) internal_function;
+static reg_errcode_t expand_bkref_cache (re_match_context_t *mctx,
+ re_node_set *cur_nodes, Idx cur_str,
+ Idx subexp_num, int type)
+ internal_function;
+static bool build_trtable (const re_dfa_t *dfa,
+ re_dfastate_t *state) internal_function;
+#ifdef RE_ENABLE_I18N
+static int check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx idx)
+ internal_function;
+# ifdef _LIBC
+static unsigned int find_collation_sequence_value (const unsigned char *mbs,
+ size_t name_len)
+ internal_function;
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+static Idx group_nodes_into_DFAstates (const re_dfa_t *dfa,
+ const re_dfastate_t *state,
+ re_node_set *states_node,
+ bitset_t *states_ch) internal_function;
+static bool check_node_accept (const re_match_context_t *mctx,
+ const re_token_t *node, Idx idx)
+ internal_function;
+static reg_errcode_t extend_buffers (re_match_context_t *mctx)
+ internal_function;
+
+/* Entry point for POSIX code. */
+
+/* regexec searches for a given pattern, specified by PREG, in the
+ string STRING.
+
+ If NMATCH is zero or REG_NOSUB was set in the cflags argument to
+ `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at
+ least NMATCH elements, and we set them to the offsets of the
+ corresponding matched substrings.
+
+ EFLAGS specifies `execution flags' which affect matching: if
+ REG_NOTBOL is set, then ^ does not match at the beginning of the
+ string; if REG_NOTEOL is set, then $ does not match at the end.
+
+ We return 0 if we find a match and REG_NOMATCH if not. */
+
+int
+regexec (preg, string, nmatch, pmatch, eflags)
+ const regex_t *_Restrict_ preg;
+ const char *_Restrict_ string;
+ size_t nmatch;
+ regmatch_t pmatch[_Restrict_arr_];
+ int eflags;
+{
+ reg_errcode_t err;
+ Idx start, length;
+#ifdef _LIBC
+ re_dfa_t *dfa = (re_dfa_t *) preg->buffer;
+#endif
+
+ if (eflags & ~(REG_NOTBOL | REG_NOTEOL | REG_STARTEND))
+ return REG_BADPAT;
+
+ if (eflags & REG_STARTEND)
+ {
+ start = pmatch[0].rm_so;
+ length = pmatch[0].rm_eo;
+ }
+ else
+ {
+ start = 0;
+ length = strlen (string);
+ }
+
+ __libc_lock_lock (dfa->lock);
+ if (preg->no_sub)
+ err = re_search_internal (preg, string, length, start, length,
+ length, 0, NULL, eflags);
+ else
+ err = re_search_internal (preg, string, length, start, length,
+ length, nmatch, pmatch, eflags);
+ __libc_lock_unlock (dfa->lock);
+ return err != REG_NOERROR;
+}
+
+#ifdef _LIBC
+# include <shlib-compat.h>
+versioned_symbol (libc, __regexec, regexec, GLIBC_2_3_4);
+
+# if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_3_4)
+__typeof__ (__regexec) __compat_regexec;
+
+int
+attribute_compat_text_section
+__compat_regexec (const regex_t *_Restrict_ preg,
+ const char *_Restrict_ string, size_t nmatch,
+ regmatch_t pmatch[], int eflags)
+{
+ return regexec (preg, string, nmatch, pmatch,
+ eflags & (REG_NOTBOL | REG_NOTEOL));
+}
+compat_symbol (libc, __compat_regexec, regexec, GLIBC_2_0);
+# endif
+#endif
+
+/* Entry points for GNU code. */
+
+/* re_match, re_search, re_match_2, re_search_2
+
+ The former two functions operate on STRING with length LENGTH,
+ while the later two operate on concatenation of STRING1 and STRING2
+ with lengths LENGTH1 and LENGTH2, respectively.
+
+ re_match() matches the compiled pattern in BUFP against the string,
+ starting at index START.
+
+ re_search() first tries matching at index START, then it tries to match
+ starting from index START + 1, and so on. The last start position tried
+ is START + RANGE. (Thus RANGE = 0 forces re_search to operate the same
+ way as re_match().)
+
+ The parameter STOP of re_{match,search}_2 specifies that no match exceeding
+ the first STOP characters of the concatenation of the strings should be
+ concerned.
+
+ If REGS is not NULL, and BUFP->no_sub is not set, the offsets of the match
+ and all groups is stored in REGS. (For the "_2" variants, the offsets are
+ computed relative to the concatenation, not relative to the individual
+ strings.)
+
+ On success, re_match* functions return the length of the match, re_search*
+ return the position of the start of the match. Return value -1 means no
+ match was found and -2 indicates an internal error. */
+
+regoff_t
+re_match (bufp, string, length, start, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ Idx length, start;
+ struct re_registers *regs;
+{
+ return re_search_stub (bufp, string, length, start, 0, length, regs, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match, re_match)
+#endif
+
+regoff_t
+re_search (bufp, string, length, start, range, regs)
+ struct re_pattern_buffer *bufp;
+ const char *string;
+ Idx length, start;
+ regoff_t range;
+ struct re_registers *regs;
+{
+ return re_search_stub (bufp, string, length, start, range, length, regs,
+ false);
+}
+#ifdef _LIBC
+weak_alias (__re_search, re_search)
+#endif
+
+regoff_t
+re_match_2 (bufp, string1, length1, string2, length2, start, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ Idx length1, length2, start, stop;
+ struct re_registers *regs;
+{
+ return re_search_2_stub (bufp, string1, length1, string2, length2,
+ start, 0, regs, stop, true);
+}
+#ifdef _LIBC
+weak_alias (__re_match_2, re_match_2)
+#endif
+
+regoff_t
+re_search_2 (bufp, string1, length1, string2, length2, start, range, regs, stop)
+ struct re_pattern_buffer *bufp;
+ const char *string1, *string2;
+ Idx length1, length2, start, stop;
+ regoff_t range;
+ struct re_registers *regs;
+{
+ return re_search_2_stub (bufp, string1, length1, string2, length2,
+ start, range, regs, stop, false);
+}
+#ifdef _LIBC
+weak_alias (__re_search_2, re_search_2)
+#endif
+
+static regoff_t
+internal_function
+re_search_2_stub (struct re_pattern_buffer *bufp,
+ const char *string1, Idx length1,
+ const char *string2, Idx length2,
+ Idx start, regoff_t range, struct re_registers *regs,
+ Idx stop, bool ret_len)
+{
+ const char *str;
+ regoff_t rval;
+ Idx len = length1 + length2;
+ char *s = NULL;
+
+ if (BE (length1 < 0 || length2 < 0 || stop < 0 || len < length1, 0))
+ return -2;
+
+ /* Concatenate the strings. */
+ if (length2 > 0)
+ if (length1 > 0)
+ {
+ s = re_malloc (char, len);
+
+ if (BE (s == NULL, 0))
+ return -2;
+#ifdef _LIBC
+ memcpy (__mempcpy (s, string1, length1), string2, length2);
+#else
+ memcpy (s, string1, length1);
+ memcpy (s + length1, string2, length2);
+#endif
+ str = s;
+ }
+ else
+ str = string2;
+ else
+ str = string1;
+
+ rval = re_search_stub (bufp, str, len, start, range, stop, regs,
+ ret_len);
+ re_free (s);
+ return rval;
+}
+
+/* The parameters have the same meaning as those of re_search.
+ Additional parameters:
+ If RET_LEN is true the length of the match is returned (re_match style);
+ otherwise the position of the match is returned. */
+
+static regoff_t
+internal_function
+re_search_stub (struct re_pattern_buffer *bufp,
+ const char *string, Idx length,
+ Idx start, regoff_t range, Idx stop, struct re_registers *regs,
+ bool ret_len)
+{
+ reg_errcode_t result;
+ regmatch_t *pmatch;
+ Idx nregs;
+ regoff_t rval;
+ int eflags = 0;
+#ifdef _LIBC
+ re_dfa_t *dfa = (re_dfa_t *) bufp->buffer;
+#endif
+ Idx last_start = start + range;
+
+ /* Check for out-of-range. */
+ if (BE (start < 0 || start > length, 0))
+ return -1;
+ if (BE (length < last_start || (0 <= range && last_start < start), 0))
+ last_start = length;
+ else if (BE (last_start < 0 || (range < 0 && start <= last_start), 0))
+ last_start = 0;
+
+ __libc_lock_lock (dfa->lock);
+
+ eflags |= (bufp->not_bol) ? REG_NOTBOL : 0;
+ eflags |= (bufp->not_eol) ? REG_NOTEOL : 0;
+
+ /* Compile fastmap if we haven't yet. */
+ if (start < last_start && bufp->fastmap != NULL && !bufp->fastmap_accurate)
+ re_compile_fastmap (bufp);
+
+ if (BE (bufp->no_sub, 0))
+ regs = NULL;
+
+ /* We need at least 1 register. */
+ if (regs == NULL)
+ nregs = 1;
+ else if (BE (bufp->regs_allocated == REGS_FIXED
+ && regs->num_regs <= bufp->re_nsub, 0))
+ {
+ nregs = regs->num_regs;
+ if (BE (nregs < 1, 0))
+ {
+ /* Nothing can be copied to regs. */
+ regs = NULL;
+ nregs = 1;
+ }
+ }
+ else
+ nregs = bufp->re_nsub + 1;
+ pmatch = re_malloc (regmatch_t, nregs);
+ if (BE (pmatch == NULL, 0))
+ {
+ rval = -2;
+ goto out;
+ }
+
+ result = re_search_internal (bufp, string, length, start, last_start, stop,
+ nregs, pmatch, eflags);
+
+ rval = 0;
+
+ /* I hope we needn't fill ther regs with -1's when no match was found. */
+ if (result != REG_NOERROR)
+ rval = -1;
+ else if (regs != NULL)
+ {
+ /* If caller wants register contents data back, copy them. */
+ bufp->regs_allocated = re_copy_regs (regs, pmatch, nregs,
+ bufp->regs_allocated);
+ if (BE (bufp->regs_allocated == REGS_UNALLOCATED, 0))
+ rval = -2;
+ }
+
+ if (BE (rval == 0, 1))
+ {
+ if (ret_len)
+ {
+ assert (pmatch[0].rm_so == start);
+ rval = pmatch[0].rm_eo - start;
+ }
+ else
+ rval = pmatch[0].rm_so;
+ }
+ re_free (pmatch);
+ out:
+ __libc_lock_unlock (dfa->lock);
+ return rval;
+}
+
+static unsigned int
+internal_function
+re_copy_regs (struct re_registers *regs, regmatch_t *pmatch, Idx nregs,
+ int regs_allocated)
+{
+ int rval = REGS_REALLOCATE;
+ Idx i;
+ Idx need_regs = nregs + 1;
+ /* We need one extra element beyond `num_regs' for the `-1' marker GNU code
+ uses. */
+
+ /* Have the register data arrays been allocated? */
+ if (regs_allocated == REGS_UNALLOCATED)
+ { /* No. So allocate them with malloc. */
+ regs->start = re_malloc (regoff_t, need_regs);
+ if (BE (regs->start == NULL, 0))
+ return REGS_UNALLOCATED;
+ regs->end = re_malloc (regoff_t, need_regs);
+ if (BE (regs->end == NULL, 0))
+ {
+ re_free (regs->start);
+ return REGS_UNALLOCATED;
+ }
+ regs->num_regs = need_regs;
+ }
+ else if (regs_allocated == REGS_REALLOCATE)
+ { /* Yes. If we need more elements than were already
+ allocated, reallocate them. If we need fewer, just
+ leave it alone. */
+ if (BE (need_regs > regs->num_regs, 0))
+ {
+ regoff_t *new_start = re_realloc (regs->start, regoff_t, need_regs);
+ regoff_t *new_end;
+ if (BE (new_start == NULL, 0))
+ return REGS_UNALLOCATED;
+ new_end = re_realloc (regs->end, regoff_t, need_regs);
+ if (BE (new_end == NULL, 0))
+ {
+ re_free (new_start);
+ return REGS_UNALLOCATED;
+ }
+ regs->start = new_start;
+ regs->end = new_end;
+ regs->num_regs = need_regs;
+ }
+ }
+ else
+ {
+ assert (regs_allocated == REGS_FIXED);
+ /* This function may not be called with REGS_FIXED and nregs too big. */
+ assert (regs->num_regs >= nregs);
+ rval = REGS_FIXED;
+ }
+
+ /* Copy the regs. */
+ for (i = 0; i < nregs; ++i)
+ {
+ regs->start[i] = pmatch[i].rm_so;
+ regs->end[i] = pmatch[i].rm_eo;
+ }
+ for ( ; i < regs->num_regs; ++i)
+ regs->start[i] = regs->end[i] = -1;
+
+ return rval;
+}
+
+/* Set REGS to hold NUM_REGS registers, storing them in STARTS and
+ ENDS. Subsequent matches using PATTERN_BUFFER and REGS will use
+ this memory for recording register information. STARTS and ENDS
+ must be allocated using the malloc library routine, and must each
+ be at least NUM_REGS * sizeof (regoff_t) bytes long.
+
+ If NUM_REGS == 0, then subsequent matches should allocate their own
+ register data.
+
+ Unless this function is called, the first search or match using
+ PATTERN_BUFFER will allocate its own register data, without
+ freeing the old data. */
+
+void
+re_set_registers (bufp, regs, num_regs, starts, ends)
+ struct re_pattern_buffer *bufp;
+ struct re_registers *regs;
+ __re_size_t num_regs;
+ regoff_t *starts, *ends;
+{
+ if (num_regs)
+ {
+ bufp->regs_allocated = REGS_REALLOCATE;
+ regs->num_regs = num_regs;
+ regs->start = starts;
+ regs->end = ends;
+ }
+ else
+ {
+ bufp->regs_allocated = REGS_UNALLOCATED;
+ regs->num_regs = 0;
+ regs->start = regs->end = NULL;
+ }
+}
+#ifdef _LIBC
+weak_alias (__re_set_registers, re_set_registers)
+#endif
+
+/* Entry points compatible with 4.2 BSD regex library. We don't define
+ them unless specifically requested. */
+
+#if defined _REGEX_RE_COMP || defined _LIBC
+int
+# ifdef _LIBC
+weak_function
+# endif
+re_exec (s)
+ const char *s;
+{
+ return 0 == regexec (&re_comp_buf, s, 0, NULL, 0);
+}
+#endif /* _REGEX_RE_COMP */
+
+/* Internal entry point. */
+
+/* Searches for a compiled pattern PREG in the string STRING, whose
+ length is LENGTH. NMATCH, PMATCH, and EFLAGS have the same
+ meaning as with regexec. LAST_START is START + RANGE, where
+ START and RANGE have the same meaning as with re_search.
+ Return REG_NOERROR if we find a match, and REG_NOMATCH if not,
+ otherwise return the error code.
+ Note: We assume front end functions already check ranges.
+ (0 <= LAST_START && LAST_START <= LENGTH) */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+re_search_internal (const regex_t *preg,
+ const char *string, Idx length,
+ Idx start, Idx last_start, Idx stop,
+ size_t nmatch, regmatch_t pmatch[],
+ int eflags)
+{
+ reg_errcode_t err;
+ const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ Idx left_lim, right_lim;
+ int incr;
+ bool fl_longest_match;
+ int match_kind;
+ Idx match_first;
+ Idx match_last = REG_MISSING;
+ Idx extra_nmatch;
+ bool sb;
+ int ch;
+#if defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
+ re_match_context_t mctx = { .dfa = dfa };
+#else
+ re_match_context_t mctx;
+#endif
+ char *fastmap = ((preg->fastmap != NULL && preg->fastmap_accurate
+ && start != last_start && !preg->can_be_null)
+ ? preg->fastmap : NULL);
+ RE_TRANSLATE_TYPE t = preg->translate;
+
+#if !(defined _LIBC || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L))
+ memset (&mctx, '\0', sizeof (re_match_context_t));
+ mctx.dfa = dfa;
+#endif
+
+ extra_nmatch = (nmatch > preg->re_nsub) ? nmatch - (preg->re_nsub + 1) : 0;
+ nmatch -= extra_nmatch;
+
+ /* Check if the DFA haven't been compiled. */
+ if (BE (preg->used == 0 || dfa->init_state == NULL
+ || dfa->init_state_word == NULL || dfa->init_state_nl == NULL
+ || dfa->init_state_begbuf == NULL, 0))
+ return REG_NOMATCH;
+
+#ifdef DEBUG
+ /* We assume front-end functions already check them. */
+ assert (0 <= last_start && last_start <= length);
+#endif
+
+ /* If initial states with non-begbuf contexts have no elements,
+ the regex must be anchored. If preg->newline_anchor is set,
+ we'll never use init_state_nl, so do not check it. */
+ if (dfa->init_state->nodes.nelem == 0
+ && dfa->init_state_word->nodes.nelem == 0
+ && (dfa->init_state_nl->nodes.nelem == 0
+ || !preg->newline_anchor))
+ {
+ if (start != 0 && last_start != 0)
+ return REG_NOMATCH;
+ start = last_start = 0;
+ }
+
+ /* We must check the longest matching, if nmatch > 0. */
+ fl_longest_match = (nmatch != 0 || dfa->nbackref);
+
+ err = re_string_allocate (&mctx.input, string, length, dfa->nodes_len + 1,
+ preg->translate, (preg->syntax & RE_ICASE) != 0,
+ dfa);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ mctx.input.stop = stop;
+ mctx.input.raw_stop = stop;
+ mctx.input.newline_anchor = preg->newline_anchor;
+
+ err = match_ctx_init (&mctx, eflags, dfa->nbackref * 2);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* We will log all the DFA states through which the dfa pass,
+ if nmatch > 1, or this dfa has "multibyte node", which is a
+ back-reference or a node which can accept multibyte character or
+ multi character collating element. */
+ if (nmatch > 1 || dfa->has_mb_node)
+ {
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= mctx.input.bufs_len, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+
+ mctx.state_log = re_malloc (re_dfastate_t *, mctx.input.bufs_len + 1);
+ if (BE (mctx.state_log == NULL, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ }
+ else
+ mctx.state_log = NULL;
+
+ match_first = start;
+ mctx.input.tip_context = (eflags & REG_NOTBOL) ? CONTEXT_BEGBUF
+ : CONTEXT_NEWLINE | CONTEXT_BEGBUF;
+
+ /* Check incrementally whether of not the input string match. */
+ incr = (last_start < start) ? -1 : 1;
+ left_lim = (last_start < start) ? last_start : start;
+ right_lim = (last_start < start) ? start : last_start;
+ sb = dfa->mb_cur_max == 1;
+ match_kind =
+ (fastmap
+ ? ((sb || !(preg->syntax & RE_ICASE || t) ? 4 : 0)
+ | (start <= last_start ? 2 : 0)
+ | (t != NULL ? 1 : 0))
+ : 8);
+
+ for (;; match_first += incr)
+ {
+ err = REG_NOMATCH;
+ if (match_first < left_lim || right_lim < match_first)
+ goto free_return;
+
+ /* Advance as rapidly as possible through the string, until we
+ find a plausible place to start matching. This may be done
+ with varying efficiency, so there are various possibilities:
+ only the most common of them are specialized, in order to
+ save on code size. We use a switch statement for speed. */
+ switch (match_kind)
+ {
+ case 8:
+ /* No fastmap. */
+ break;
+
+ case 7:
+ /* Fastmap with single-byte translation, match forward. */
+ while (BE (match_first < right_lim, 1)
+ && !fastmap[t[(unsigned char) string[match_first]]])
+ ++match_first;
+ goto forward_match_found_start_or_reached_end;
+
+ case 6:
+ /* Fastmap without translation, match forward. */
+ while (BE (match_first < right_lim, 1)
+ && !fastmap[(unsigned char) string[match_first]])
+ ++match_first;
+
+ forward_match_found_start_or_reached_end:
+ if (BE (match_first == right_lim, 0))
+ {
+ ch = match_first >= length
+ ? 0 : (unsigned char) string[match_first];
+ if (!fastmap[t ? t[ch] : ch])
+ goto free_return;
+ }
+ break;
+
+ case 4:
+ case 5:
+ /* Fastmap without multi-byte translation, match backwards. */
+ while (match_first >= left_lim)
+ {
+ ch = match_first >= length
+ ? 0 : (unsigned char) string[match_first];
+ if (fastmap[t ? t[ch] : ch])
+ break;
+ --match_first;
+ }
+ if (match_first < left_lim)
+ goto free_return;
+ break;
+
+ default:
+ /* In this case, we can't determine easily the current byte,
+ since it might be a component byte of a multibyte
+ character. Then we use the constructed buffer instead. */
+ for (;;)
+ {
+ /* If MATCH_FIRST is out of the valid range, reconstruct the
+ buffers. */
+ __re_size_t offset = match_first - mctx.input.raw_mbs_idx;
+ if (BE (offset >= (__re_size_t) mctx.input.valid_raw_len, 0))
+ {
+ err = re_string_reconstruct (&mctx.input, match_first,
+ eflags);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ offset = match_first - mctx.input.raw_mbs_idx;
+ }
+ /* If MATCH_FIRST is out of the buffer, leave it as '\0'.
+ Note that MATCH_FIRST must not be smaller than 0. */
+ ch = (match_first >= length
+ ? 0 : re_string_byte_at (&mctx.input, offset));
+ if (fastmap[ch])
+ break;
+ match_first += incr;
+ if (match_first < left_lim || match_first > right_lim)
+ {
+ err = REG_NOMATCH;
+ goto free_return;
+ }
+ }
+ break;
+ }
+
+ /* Reconstruct the buffers so that the matcher can assume that
+ the matching starts from the beginning of the buffer. */
+ err = re_string_reconstruct (&mctx.input, match_first, eflags);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+#ifdef RE_ENABLE_I18N
+ /* Don't consider this char as a possible match start if it part,
+ yet isn't the head, of a multibyte character. */
+ if (!sb && !re_string_first_byte (&mctx.input, 0))
+ continue;
+#endif
+
+ /* It seems to be appropriate one, then use the matcher. */
+ /* We assume that the matching starts from 0. */
+ mctx.state_log_top = mctx.nbkref_ents = mctx.max_mb_elem_len = 0;
+ match_last = check_matching (&mctx, fl_longest_match,
+ start <= last_start ? &match_first : NULL);
+ if (match_last != REG_MISSING)
+ {
+ if (BE (match_last == REG_ERROR, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ else
+ {
+ mctx.match_last = match_last;
+ if ((!preg->no_sub && nmatch > 1) || dfa->nbackref)
+ {
+ re_dfastate_t *pstate = mctx.state_log[match_last];
+ mctx.last_node = check_halt_state_context (&mctx, pstate,
+ match_last);
+ }
+ if ((!preg->no_sub && nmatch > 1 && dfa->has_plural_match)
+ || dfa->nbackref)
+ {
+ err = prune_impossible_nodes (&mctx);
+ if (err == REG_NOERROR)
+ break;
+ if (BE (err != REG_NOMATCH, 0))
+ goto free_return;
+ match_last = REG_MISSING;
+ }
+ else
+ break; /* We found a match. */
+ }
+ }
+
+ match_ctx_clean (&mctx);
+ }
+
+#ifdef DEBUG
+ assert (match_last != REG_MISSING);
+ assert (err == REG_NOERROR);
+#endif
+
+ /* Set pmatch[] if we need. */
+ if (nmatch > 0)
+ {
+ Idx reg_idx;
+
+ /* Initialize registers. */
+ for (reg_idx = 1; reg_idx < nmatch; ++reg_idx)
+ pmatch[reg_idx].rm_so = pmatch[reg_idx].rm_eo = -1;
+
+ /* Set the points where matching start/end. */
+ pmatch[0].rm_so = 0;
+ pmatch[0].rm_eo = mctx.match_last;
+ /* FIXME: This function should fail if mctx.match_last exceeds
+ the maximum possible regoff_t value. We need a new error
+ code REG_OVERFLOW. */
+
+ if (!preg->no_sub && nmatch > 1)
+ {
+ err = set_regs (preg, &mctx, nmatch, pmatch,
+ dfa->has_plural_match && dfa->nbackref > 0);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+
+ /* At last, add the offset to the each registers, since we slided
+ the buffers so that we could assume that the matching starts
+ from 0. */
+ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+ if (pmatch[reg_idx].rm_so != -1)
+ {
+#ifdef RE_ENABLE_I18N
+ if (BE (mctx.input.offsets_needed != 0, 0))
+ {
+ pmatch[reg_idx].rm_so =
+ (pmatch[reg_idx].rm_so == mctx.input.valid_len
+ ? mctx.input.valid_raw_len
+ : mctx.input.offsets[pmatch[reg_idx].rm_so]);
+ pmatch[reg_idx].rm_eo =
+ (pmatch[reg_idx].rm_eo == mctx.input.valid_len
+ ? mctx.input.valid_raw_len
+ : mctx.input.offsets[pmatch[reg_idx].rm_eo]);
+ }
+#else
+ assert (mctx.input.offsets_needed == 0);
+#endif
+ pmatch[reg_idx].rm_so += match_first;
+ pmatch[reg_idx].rm_eo += match_first;
+ }
+ for (reg_idx = 0; reg_idx < extra_nmatch; ++reg_idx)
+ {
+ pmatch[nmatch + reg_idx].rm_so = -1;
+ pmatch[nmatch + reg_idx].rm_eo = -1;
+ }
+
+ if (dfa->subexp_map)
+ for (reg_idx = 0; reg_idx + 1 < nmatch; reg_idx++)
+ if (dfa->subexp_map[reg_idx] != reg_idx)
+ {
+ pmatch[reg_idx + 1].rm_so
+ = pmatch[dfa->subexp_map[reg_idx] + 1].rm_so;
+ pmatch[reg_idx + 1].rm_eo
+ = pmatch[dfa->subexp_map[reg_idx] + 1].rm_eo;
+ }
+ }
+
+ free_return:
+ re_free (mctx.state_log);
+ if (dfa->nbackref)
+ match_ctx_free (&mctx);
+ re_string_destruct (&mctx.input);
+ return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+prune_impossible_nodes (re_match_context_t *mctx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx halt_node, match_last;
+ reg_errcode_t ret;
+ re_dfastate_t **sifted_states;
+ re_dfastate_t **lim_states = NULL;
+ re_sift_context_t sctx;
+#ifdef DEBUG
+ assert (mctx->state_log != NULL);
+#endif
+ match_last = mctx->match_last;
+ halt_node = mctx->last_node;
+
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / sizeof (re_dfastate_t *) <= match_last, 0))
+ return REG_ESPACE;
+
+ sifted_states = re_malloc (re_dfastate_t *, match_last + 1);
+ if (BE (sifted_states == NULL, 0))
+ {
+ ret = REG_ESPACE;
+ goto free_return;
+ }
+ if (dfa->nbackref)
+ {
+ lim_states = re_malloc (re_dfastate_t *, match_last + 1);
+ if (BE (lim_states == NULL, 0))
+ {
+ ret = REG_ESPACE;
+ goto free_return;
+ }
+ while (1)
+ {
+ memset (lim_states, '\0',
+ sizeof (re_dfastate_t *) * (match_last + 1));
+ sift_ctx_init (&sctx, sifted_states, lim_states, halt_node,
+ match_last);
+ ret = sift_states_backward (mctx, &sctx);
+ re_node_set_free (&sctx.limits);
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ if (sifted_states[0] != NULL || lim_states[0] != NULL)
+ break;
+ do
+ {
+ --match_last;
+ if (! REG_VALID_INDEX (match_last))
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
+ } while (mctx->state_log[match_last] == NULL
+ || !mctx->state_log[match_last]->halt);
+ halt_node = check_halt_state_context (mctx,
+ mctx->state_log[match_last],
+ match_last);
+ }
+ ret = merge_state_array (dfa, sifted_states, lim_states,
+ match_last + 1);
+ re_free (lim_states);
+ lim_states = NULL;
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ }
+ else
+ {
+ sift_ctx_init (&sctx, sifted_states, lim_states, halt_node, match_last);
+ ret = sift_states_backward (mctx, &sctx);
+ re_node_set_free (&sctx.limits);
+ if (BE (ret != REG_NOERROR, 0))
+ goto free_return;
+ if (sifted_states[0] == NULL)
+ {
+ ret = REG_NOMATCH;
+ goto free_return;
+ }
+ }
+ re_free (mctx->state_log);
+ mctx->state_log = sifted_states;
+ sifted_states = NULL;
+ mctx->last_node = halt_node;
+ mctx->match_last = match_last;
+ ret = REG_NOERROR;
+ free_return:
+ re_free (sifted_states);
+ re_free (lim_states);
+ return ret;
+}
+
+/* Acquire an initial state and return it.
+ We must select appropriate initial state depending on the context,
+ since initial states may have constraints like "\<", "^", etc.. */
+
+static inline re_dfastate_t *
+__attribute ((always_inline)) internal_function
+acquire_init_state_context (reg_errcode_t *err, const re_match_context_t *mctx,
+ Idx idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ if (dfa->init_state->has_constraint)
+ {
+ unsigned int context;
+ context = re_string_context_at (&mctx->input, idx - 1, mctx->eflags);
+ if (IS_WORD_CONTEXT (context))
+ return dfa->init_state_word;
+ else if (IS_ORDINARY_CONTEXT (context))
+ return dfa->init_state;
+ else if (IS_BEGBUF_CONTEXT (context) && IS_NEWLINE_CONTEXT (context))
+ return dfa->init_state_begbuf;
+ else if (IS_NEWLINE_CONTEXT (context))
+ return dfa->init_state_nl;
+ else if (IS_BEGBUF_CONTEXT (context))
+ {
+ /* It is relatively rare case, then calculate on demand. */
+ return re_acquire_state_context (err, dfa,
+ dfa->init_state->entrance_nodes,
+ context);
+ }
+ else
+ /* Must not happen? */
+ return dfa->init_state;
+ }
+ else
+ return dfa->init_state;
+}
+
+/* Check whether the regular expression match input string INPUT or not,
+ and return the index where the matching end. Return REG_MISSING if
+ there is no match, and return REG_ERROR in case of an error.
+ FL_LONGEST_MATCH means we want the POSIX longest matching.
+ If P_MATCH_FIRST is not NULL, and the match fails, it is set to the
+ next place where we may want to try matching.
+ Note that the matcher assume that the maching starts from the current
+ index of the buffer. */
+
+static Idx
+internal_function __attribute_warn_unused_result__
+check_matching (re_match_context_t *mctx, bool fl_longest_match,
+ Idx *p_match_first)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx match = 0;
+ Idx match_last = REG_MISSING;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+ re_dfastate_t *cur_state;
+ bool at_init_state = p_match_first != NULL;
+ Idx next_start_idx = cur_str_idx;
+
+ err = REG_NOERROR;
+ cur_state = acquire_init_state_context (&err, mctx, cur_str_idx);
+ /* An initial state must not be NULL (invalid). */
+ if (BE (cur_state == NULL, 0))
+ {
+ assert (err == REG_ESPACE);
+ return REG_ERROR;
+ }
+
+ if (mctx->state_log != NULL)
+ {
+ mctx->state_log[cur_str_idx] = cur_state;
+
+ /* Check OP_OPEN_SUBEXP in the initial state in case that we use them
+ later. E.g. Processing back references. */
+ if (BE (dfa->nbackref, 0))
+ {
+ at_init_state = false;
+ err = check_subexp_matching_top (mctx, &cur_state->nodes, 0);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (cur_state->has_backref)
+ {
+ err = transit_state_bkref (mctx, &cur_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ }
+
+ /* If the RE accepts NULL string. */
+ if (BE (cur_state->halt, 0))
+ {
+ if (!cur_state->has_constraint
+ || check_halt_state_context (mctx, cur_state, cur_str_idx))
+ {
+ if (!fl_longest_match)
+ return cur_str_idx;
+ else
+ {
+ match_last = cur_str_idx;
+ match = 1;
+ }
+ }
+ }
+
+ while (!re_string_eoi (&mctx->input))
+ {
+ re_dfastate_t *old_state = cur_state;
+ Idx next_char_idx = re_string_cur_idx (&mctx->input) + 1;
+
+ if (BE (next_char_idx >= mctx->input.bufs_len, 0)
+ || (BE (next_char_idx >= mctx->input.valid_len, 0)
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ assert (err == REG_ESPACE);
+ return REG_ERROR;
+ }
+ }
+
+ cur_state = transit_state (&err, mctx, cur_state);
+ if (mctx->state_log != NULL)
+ cur_state = merge_state_with_log (&err, mctx, cur_state);
+
+ if (cur_state == NULL)
+ {
+ /* Reached the invalid state or an error. Try to recover a valid
+ state using the state log, if available and if we have not
+ already found a valid (even if not the longest) match. */
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ERROR;
+
+ if (mctx->state_log == NULL
+ || (match && !fl_longest_match)
+ || (cur_state = find_recover_state (&err, mctx)) == NULL)
+ break;
+ }
+
+ if (BE (at_init_state, 0))
+ {
+ if (old_state == cur_state)
+ next_start_idx = next_char_idx;
+ else
+ at_init_state = false;
+ }
+
+ if (cur_state->halt)
+ {
+ /* Reached a halt state.
+ Check the halt state can satisfy the current context. */
+ if (!cur_state->has_constraint
+ || check_halt_state_context (mctx, cur_state,
+ re_string_cur_idx (&mctx->input)))
+ {
+ /* We found an appropriate halt state. */
+ match_last = re_string_cur_idx (&mctx->input);
+ match = 1;
+
+ /* We found a match, do not modify match_first below. */
+ p_match_first = NULL;
+ if (!fl_longest_match)
+ break;
+ }
+ }
+ }
+
+ if (p_match_first)
+ *p_match_first += next_start_idx;
+
+ return match_last;
+}
+
+/* Check NODE match the current context. */
+
+static bool
+internal_function
+check_halt_node_context (const re_dfa_t *dfa, Idx node, unsigned int context)
+{
+ re_token_type_t type = dfa->nodes[node].type;
+ unsigned int constraint = dfa->nodes[node].constraint;
+ if (type != END_OF_RE)
+ return false;
+ if (!constraint)
+ return true;
+ if (NOT_SATISFY_NEXT_CONSTRAINT (constraint, context))
+ return false;
+ return true;
+}
+
+/* Check the halt state STATE match the current context.
+ Return 0 if not match, if the node, STATE has, is a halt node and
+ match the context, return the node. */
+
+static Idx
+internal_function
+check_halt_state_context (const re_match_context_t *mctx,
+ const re_dfastate_t *state, Idx idx)
+{
+ Idx i;
+ unsigned int context;
+#ifdef DEBUG
+ assert (state->halt);
+#endif
+ context = re_string_context_at (&mctx->input, idx, mctx->eflags);
+ for (i = 0; i < state->nodes.nelem; ++i)
+ if (check_halt_node_context (mctx->dfa, state->nodes.elems[i], context))
+ return state->nodes.elems[i];
+ return 0;
+}
+
+/* Compute the next node to which "NFA" transit from NODE("NFA" is a NFA
+ corresponding to the DFA).
+ Return the destination node, and update EPS_VIA_NODES;
+ return REG_MISSING in case of errors. */
+
+static Idx
+internal_function
+proceed_next_node (const re_match_context_t *mctx, Idx nregs, regmatch_t *regs,
+ Idx *pidx, Idx node, re_node_set *eps_via_nodes,
+ struct re_fail_stack_t *fs)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx i;
+ bool ok;
+ if (IS_EPSILON_NODE (dfa->nodes[node].type))
+ {
+ re_node_set *cur_nodes = &mctx->state_log[*pidx]->nodes;
+ re_node_set *edests = &dfa->edests[node];
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
+ /* Pick up a valid destination, or return REG_MISSING if none
+ is found. */
+ for (dest_node = REG_MISSING, i = 0; i < edests->nelem; ++i)
+ {
+ Idx candidate = edests->elems[i];
+ if (!re_node_set_contains (cur_nodes, candidate))
+ continue;
+ if (dest_node == REG_MISSING)
+ dest_node = candidate;
+
+ else
+ {
+ /* In order to avoid infinite loop like "(a*)*", return the second
+ epsilon-transition if the first was already considered. */
+ if (re_node_set_contains (eps_via_nodes, dest_node))
+ return candidate;
+
+ /* Otherwise, push the second epsilon-transition on the fail stack. */
+ else if (fs != NULL
+ && push_fail_stack (fs, *pidx, candidate, nregs, regs,
+ eps_via_nodes))
+ return REG_ERROR;
+
+ /* We know we are going to exit. */
+ break;
+ }
+ }
+ return dest_node;
+ }
+ else
+ {
+ Idx naccepted = 0;
+ re_token_type_t type = dfa->nodes[node].type;
+
+#ifdef RE_ENABLE_I18N
+ if (dfa->nodes[node].accept_mb)
+ naccepted = check_node_accept_bytes (dfa, node, &mctx->input, *pidx);
+ else
+#endif /* RE_ENABLE_I18N */
+ if (type == OP_BACK_REF)
+ {
+ Idx subexp_idx = dfa->nodes[node].opr.idx + 1;
+ naccepted = regs[subexp_idx].rm_eo - regs[subexp_idx].rm_so;
+ if (fs != NULL)
+ {
+ if (regs[subexp_idx].rm_so == -1 || regs[subexp_idx].rm_eo == -1)
+ return REG_MISSING;
+ else if (naccepted)
+ {
+ char *buf = (char *) re_string_get_buffer (&mctx->input);
+ if (memcmp (buf + regs[subexp_idx].rm_so, buf + *pidx,
+ naccepted) != 0)
+ return REG_MISSING;
+ }
+ }
+
+ if (naccepted == 0)
+ {
+ Idx dest_node;
+ ok = re_node_set_insert (eps_via_nodes, node);
+ if (BE (! ok, 0))
+ return REG_ERROR;
+ dest_node = dfa->edests[node].elems[0];
+ if (re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+ dest_node))
+ return dest_node;
+ }
+ }
+
+ if (naccepted != 0
+ || check_node_accept (mctx, dfa->nodes + node, *pidx))
+ {
+ Idx dest_node = dfa->nexts[node];
+ *pidx = (naccepted == 0) ? *pidx + 1 : *pidx + naccepted;
+ if (fs && (*pidx > mctx->match_last || mctx->state_log[*pidx] == NULL
+ || !re_node_set_contains (&mctx->state_log[*pidx]->nodes,
+ dest_node)))
+ return REG_MISSING;
+ re_node_set_empty (eps_via_nodes);
+ return dest_node;
+ }
+ }
+ return REG_MISSING;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+push_fail_stack (struct re_fail_stack_t *fs, Idx str_idx, Idx dest_node,
+ Idx nregs, regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+ reg_errcode_t err;
+ Idx num = fs->num++;
+ if (fs->num == fs->alloc)
+ {
+ struct re_fail_stack_ent_t *new_array;
+ new_array = realloc (fs->stack, (sizeof (struct re_fail_stack_ent_t)
+ * fs->alloc * 2));
+ if (new_array == NULL)
+ return REG_ESPACE;
+ fs->alloc *= 2;
+ fs->stack = new_array;
+ }
+ fs->stack[num].idx = str_idx;
+ fs->stack[num].node = dest_node;
+ fs->stack[num].regs = re_malloc (regmatch_t, nregs);
+ if (fs->stack[num].regs == NULL)
+ return REG_ESPACE;
+ memcpy (fs->stack[num].regs, regs, sizeof (regmatch_t) * nregs);
+ err = re_node_set_init_copy (&fs->stack[num].eps_via_nodes, eps_via_nodes);
+ return err;
+}
+
+static Idx
+internal_function
+pop_fail_stack (struct re_fail_stack_t *fs, Idx *pidx, Idx nregs,
+ regmatch_t *regs, re_node_set *eps_via_nodes)
+{
+ Idx num = --fs->num;
+ assert (REG_VALID_INDEX (num));
+ *pidx = fs->stack[num].idx;
+ memcpy (regs, fs->stack[num].regs, sizeof (regmatch_t) * nregs);
+ re_node_set_free (eps_via_nodes);
+ re_free (fs->stack[num].regs);
+ *eps_via_nodes = fs->stack[num].eps_via_nodes;
+ return fs->stack[num].node;
+}
+
+/* Set the positions where the subexpressions are starts/ends to registers
+ PMATCH.
+ Note: We assume that pmatch[0] is already set, and
+ pmatch[i].rm_so == pmatch[i].rm_eo == -1 for 0 < i < nmatch. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+set_regs (const regex_t *preg, const re_match_context_t *mctx, size_t nmatch,
+ regmatch_t *pmatch, bool fl_backtrack)
+{
+ const re_dfa_t *dfa = (const re_dfa_t *) preg->buffer;
+ Idx idx, cur_node;
+ re_node_set eps_via_nodes;
+ struct re_fail_stack_t *fs;
+ struct re_fail_stack_t fs_body = { 0, 2, NULL };
+ regmatch_t *prev_idx_match;
+ bool prev_idx_match_malloced = false;
+
+#ifdef DEBUG
+ assert (nmatch > 1);
+ assert (mctx->state_log != NULL);
+#endif
+ if (fl_backtrack)
+ {
+ fs = &fs_body;
+ fs->stack = re_malloc (struct re_fail_stack_ent_t, fs->alloc);
+ if (fs->stack == NULL)
+ return REG_ESPACE;
+ }
+ else
+ fs = NULL;
+
+ cur_node = dfa->init_node;
+ re_node_set_init_empty (&eps_via_nodes);
+
+ if (__libc_use_alloca (nmatch * sizeof (regmatch_t)))
+ prev_idx_match = (regmatch_t *) alloca (nmatch * sizeof (regmatch_t));
+ else
+ {
+ prev_idx_match = re_malloc (regmatch_t, nmatch);
+ if (prev_idx_match == NULL)
+ {
+ free_fail_stack_return (fs);
+ return REG_ESPACE;
+ }
+ prev_idx_match_malloced = true;
+ }
+ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+
+ for (idx = pmatch[0].rm_so; idx <= pmatch[0].rm_eo ;)
+ {
+ update_regs (dfa, pmatch, prev_idx_match, cur_node, idx, nmatch);
+
+ if (idx == pmatch[0].rm_eo && cur_node == mctx->last_node)
+ {
+ Idx reg_idx;
+ if (fs)
+ {
+ for (reg_idx = 0; reg_idx < nmatch; ++reg_idx)
+ if (pmatch[reg_idx].rm_so > -1 && pmatch[reg_idx].rm_eo == -1)
+ break;
+ if (reg_idx == nmatch)
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return free_fail_stack_return (fs);
+ }
+ cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+ &eps_via_nodes);
+ }
+ else
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return REG_NOERROR;
+ }
+ }
+
+ /* Proceed to next node. */
+ cur_node = proceed_next_node (mctx, nmatch, pmatch, &idx, cur_node,
+ &eps_via_nodes, fs);
+
+ if (BE (! REG_VALID_INDEX (cur_node), 0))
+ {
+ if (BE (cur_node == REG_ERROR, 0))
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ free_fail_stack_return (fs);
+ return REG_ESPACE;
+ }
+ if (fs)
+ cur_node = pop_fail_stack (fs, &idx, nmatch, pmatch,
+ &eps_via_nodes);
+ else
+ {
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return REG_NOMATCH;
+ }
+ }
+ }
+ re_node_set_free (&eps_via_nodes);
+ if (prev_idx_match_malloced)
+ re_free (prev_idx_match);
+ return free_fail_stack_return (fs);
+}
+
+static reg_errcode_t
+internal_function
+free_fail_stack_return (struct re_fail_stack_t *fs)
+{
+ if (fs)
+ {
+ Idx fs_idx;
+ for (fs_idx = 0; fs_idx < fs->num; ++fs_idx)
+ {
+ re_node_set_free (&fs->stack[fs_idx].eps_via_nodes);
+ re_free (fs->stack[fs_idx].regs);
+ }
+ re_free (fs->stack);
+ }
+ return REG_NOERROR;
+}
+
+static void
+internal_function
+update_regs (const re_dfa_t *dfa, regmatch_t *pmatch,
+ regmatch_t *prev_idx_match, Idx cur_node, Idx cur_idx, Idx nmatch)
+{
+ int type = dfa->nodes[cur_node].type;
+ if (type == OP_OPEN_SUBEXP)
+ {
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+
+ /* We are at the first node of this sub expression. */
+ if (reg_num < nmatch)
+ {
+ pmatch[reg_num].rm_so = cur_idx;
+ pmatch[reg_num].rm_eo = -1;
+ }
+ }
+ else if (type == OP_CLOSE_SUBEXP)
+ {
+ Idx reg_num = dfa->nodes[cur_node].opr.idx + 1;
+ if (reg_num < nmatch)
+ {
+ /* We are at the last node of this sub expression. */
+ if (pmatch[reg_num].rm_so < cur_idx)
+ {
+ pmatch[reg_num].rm_eo = cur_idx;
+ /* This is a non-empty match or we are not inside an optional
+ subexpression. Accept this right away. */
+ memcpy (prev_idx_match, pmatch, sizeof (regmatch_t) * nmatch);
+ }
+ else
+ {
+ if (dfa->nodes[cur_node].opt_subexp
+ && prev_idx_match[reg_num].rm_so != -1)
+ /* We transited through an empty match for an optional
+ subexpression, like (a?)*, and this is not the subexp's
+ first match. Copy back the old content of the registers
+ so that matches of an inner subexpression are undone as
+ well, like in ((a?))*. */
+ memcpy (pmatch, prev_idx_match, sizeof (regmatch_t) * nmatch);
+ else
+ /* We completed a subexpression, but it may be part of
+ an optional one, so do not update PREV_IDX_MATCH. */
+ pmatch[reg_num].rm_eo = cur_idx;
+ }
+ }
+ }
+}
+
+/* This function checks the STATE_LOG from the SCTX->last_str_idx to 0
+ and sift the nodes in each states according to the following rules.
+ Updated state_log will be wrote to STATE_LOG.
+
+ Rules: We throw away the Node `a' in the STATE_LOG[STR_IDX] if...
+ 1. When STR_IDX == MATCH_LAST(the last index in the state_log):
+ If `a' isn't the LAST_NODE and `a' can't epsilon transit to
+ the LAST_NODE, we throw away the node `a'.
+ 2. When 0 <= STR_IDX < MATCH_LAST and `a' accepts
+ string `s' and transit to `b':
+ i. If 'b' isn't in the STATE_LOG[STR_IDX+strlen('s')], we throw
+ away the node `a'.
+ ii. If 'b' is in the STATE_LOG[STR_IDX+strlen('s')] but 'b' is
+ thrown away, we throw away the node `a'.
+ 3. When 0 <= STR_IDX < MATCH_LAST and 'a' epsilon transit to 'b':
+ i. If 'b' isn't in the STATE_LOG[STR_IDX], we throw away the
+ node `a'.
+ ii. If 'b' is in the STATE_LOG[STR_IDX] but 'b' is thrown away,
+ we throw away the node `a'. */
+
+#define STATE_NODE_CONTAINS(state,node) \
+ ((state) != NULL && re_node_set_contains (&(state)->nodes, node))
+
+static reg_errcode_t
+internal_function
+sift_states_backward (const re_match_context_t *mctx, re_sift_context_t *sctx)
+{
+ reg_errcode_t err;
+ int null_cnt = 0;
+ Idx str_idx = sctx->last_str_idx;
+ re_node_set cur_dest;
+
+#ifdef DEBUG
+ assert (mctx->state_log != NULL && mctx->state_log[str_idx] != NULL);
+#endif
+
+ /* Build sifted state_log[str_idx]. It has the nodes which can epsilon
+ transit to the last_node and the last_node itself. */
+ err = re_node_set_init_1 (&cur_dest, sctx->last_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* Then check each states in the state_log. */
+ while (str_idx > 0)
+ {
+ /* Update counters. */
+ null_cnt = (sctx->sifted_states[str_idx] == NULL) ? null_cnt + 1 : 0;
+ if (null_cnt > mctx->max_mb_elem_len)
+ {
+ memset (sctx->sifted_states, '\0',
+ sizeof (re_dfastate_t *) * str_idx);
+ re_node_set_free (&cur_dest);
+ return REG_NOERROR;
+ }
+ re_node_set_empty (&cur_dest);
+ --str_idx;
+
+ if (mctx->state_log[str_idx])
+ {
+ err = build_sifted_states (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+
+ /* Add all the nodes which satisfy the following conditions:
+ - It can epsilon transit to a node in CUR_DEST.
+ - It is in CUR_SRC.
+ And update state_log. */
+ err = update_cur_sifted_state (mctx, sctx, str_idx, &cur_dest);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ err = REG_NOERROR;
+ free_return:
+ re_node_set_free (&cur_dest);
+ return err;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+build_sifted_states (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx str_idx, re_node_set *cur_dest)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ const re_node_set *cur_src = &mctx->state_log[str_idx]->non_eps_nodes;
+ Idx i;
+
+ /* Then build the next sifted state.
+ We build the next sifted state on `cur_dest', and update
+ `sifted_states[str_idx]' with `cur_dest'.
+ Note:
+ `cur_dest' is the sifted state from `state_log[str_idx + 1]'.
+ `cur_src' points the node_set of the old `state_log[str_idx]'
+ (with the epsilon nodes pre-filtered out). */
+ for (i = 0; i < cur_src->nelem; i++)
+ {
+ Idx prev_node = cur_src->elems[i];
+ int naccepted = 0;
+ bool ok;
+
+#ifdef DEBUG
+ re_token_type_t type = dfa->nodes[prev_node].type;
+ assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+ /* If the node may accept `multi byte'. */
+ if (dfa->nodes[prev_node].accept_mb)
+ naccepted = sift_states_iter_mb (mctx, sctx, prev_node,
+ str_idx, sctx->last_str_idx);
+#endif /* RE_ENABLE_I18N */
+
+ /* We don't check backreferences here.
+ See update_cur_sifted_state(). */
+ if (!naccepted
+ && check_node_accept (mctx, dfa->nodes + prev_node, str_idx)
+ && STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + 1],
+ dfa->nexts[prev_node]))
+ naccepted = 1;
+
+ if (naccepted == 0)
+ continue;
+
+ if (sctx->limits.nelem)
+ {
+ Idx to_idx = str_idx + naccepted;
+ if (check_dst_limits (mctx, &sctx->limits,
+ dfa->nexts[prev_node], to_idx,
+ prev_node, str_idx))
+ continue;
+ }
+ ok = re_node_set_insert (cur_dest, prev_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+
+ return REG_NOERROR;
+}
+
+/* Helper functions. */
+
+static reg_errcode_t
+internal_function
+clean_state_log_if_needed (re_match_context_t *mctx, Idx next_state_log_idx)
+{
+ Idx top = mctx->state_log_top;
+
+ if (next_state_log_idx >= mctx->input.bufs_len
+ || (next_state_log_idx >= mctx->input.valid_len
+ && mctx->input.valid_len < mctx->input.len))
+ {
+ reg_errcode_t err;
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (top < next_state_log_idx)
+ {
+ memset (mctx->state_log + top + 1, '\0',
+ sizeof (re_dfastate_t *) * (next_state_log_idx - top));
+ mctx->state_log_top = next_state_log_idx;
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+merge_state_array (const re_dfa_t *dfa, re_dfastate_t **dst,
+ re_dfastate_t **src, Idx num)
+{
+ Idx st_idx;
+ reg_errcode_t err;
+ for (st_idx = 0; st_idx < num; ++st_idx)
+ {
+ if (dst[st_idx] == NULL)
+ dst[st_idx] = src[st_idx];
+ else if (src[st_idx] != NULL)
+ {
+ re_node_set merged_set;
+ err = re_node_set_init_union (&merged_set, &dst[st_idx]->nodes,
+ &src[st_idx]->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ dst[st_idx] = re_acquire_state (&err, dfa, &merged_set);
+ re_node_set_free (&merged_set);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function
+update_cur_sifted_state (const re_match_context_t *mctx,
+ re_sift_context_t *sctx, Idx str_idx,
+ re_node_set *dest_nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err = REG_NOERROR;
+ const re_node_set *candidates;
+ candidates = ((mctx->state_log[str_idx] == NULL) ? NULL
+ : &mctx->state_log[str_idx]->nodes);
+
+ if (dest_nodes->nelem == 0)
+ sctx->sifted_states[str_idx] = NULL;
+ else
+ {
+ if (candidates)
+ {
+ /* At first, add the nodes which can epsilon transit to a node in
+ DEST_NODE. */
+ err = add_epsilon_src_nodes (dfa, dest_nodes, candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ /* Then, check the limitations in the current sift_context. */
+ if (sctx->limits.nelem)
+ {
+ err = check_subexp_limits (dfa, dest_nodes, candidates, &sctx->limits,
+ mctx->bkref_ents, str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+
+ sctx->sifted_states[str_idx] = re_acquire_state (&err, dfa, dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (candidates && mctx->state_log[str_idx]->has_backref)
+ {
+ err = sift_states_bkref (mctx, sctx, str_idx, candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+add_epsilon_src_nodes (const re_dfa_t *dfa, re_node_set *dest_nodes,
+ const re_node_set *candidates)
+{
+ reg_errcode_t err = REG_NOERROR;
+ Idx i;
+
+ re_dfastate_t *state = re_acquire_state (&err, dfa, dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ if (!state->inveclosure.alloc)
+ {
+ err = re_node_set_alloc (&state->inveclosure, dest_nodes->nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ for (i = 0; i < dest_nodes->nelem; i++)
+ {
+ err = re_node_set_merge (&state->inveclosure,
+ dfa->inveclosures + dest_nodes->elems[i]);
+ if (BE (err != REG_NOERROR, 0))
+ return REG_ESPACE;
+ }
+ }
+ return re_node_set_add_intersect (dest_nodes, candidates,
+ &state->inveclosure);
+}
+
+static reg_errcode_t
+internal_function
+sub_epsilon_src_nodes (const re_dfa_t *dfa, Idx node, re_node_set *dest_nodes,
+ const re_node_set *candidates)
+{
+ Idx ecl_idx;
+ reg_errcode_t err;
+ re_node_set *inv_eclosure = dfa->inveclosures + node;
+ re_node_set except_nodes;
+ re_node_set_init_empty (&except_nodes);
+ for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+ {
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
+ if (cur_node == node)
+ continue;
+ if (IS_EPSILON_NODE (dfa->nodes[cur_node].type))
+ {
+ Idx edst1 = dfa->edests[cur_node].elems[0];
+ Idx edst2 = ((dfa->edests[cur_node].nelem > 1)
+ ? dfa->edests[cur_node].elems[1] : REG_MISSING);
+ if ((!re_node_set_contains (inv_eclosure, edst1)
+ && re_node_set_contains (dest_nodes, edst1))
+ || (REG_VALID_NONZERO_INDEX (edst2)
+ && !re_node_set_contains (inv_eclosure, edst2)
+ && re_node_set_contains (dest_nodes, edst2)))
+ {
+ err = re_node_set_add_intersect (&except_nodes, candidates,
+ dfa->inveclosures + cur_node);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&except_nodes);
+ return err;
+ }
+ }
+ }
+ }
+ for (ecl_idx = 0; ecl_idx < inv_eclosure->nelem; ++ecl_idx)
+ {
+ Idx cur_node = inv_eclosure->elems[ecl_idx];
+ if (!re_node_set_contains (&except_nodes, cur_node))
+ {
+ Idx idx = re_node_set_contains (dest_nodes, cur_node) - 1;
+ re_node_set_remove_at (dest_nodes, idx);
+ }
+ }
+ re_node_set_free (&except_nodes);
+ return REG_NOERROR;
+}
+
+static bool
+internal_function
+check_dst_limits (const re_match_context_t *mctx, const re_node_set *limits,
+ Idx dst_node, Idx dst_idx, Idx src_node, Idx src_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx lim_idx, src_pos, dst_pos;
+
+ Idx dst_bkref_idx = search_cur_bkref_entry (mctx, dst_idx);
+ Idx src_bkref_idx = search_cur_bkref_entry (mctx, src_idx);
+ for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+ {
+ Idx subexp_idx;
+ struct re_backref_cache_entry *ent;
+ ent = mctx->bkref_ents + limits->elems[lim_idx];
+ subexp_idx = dfa->nodes[ent->node].opr.idx;
+
+ dst_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+ subexp_idx, dst_node, dst_idx,
+ dst_bkref_idx);
+ src_pos = check_dst_limits_calc_pos (mctx, limits->elems[lim_idx],
+ subexp_idx, src_node, src_idx,
+ src_bkref_idx);
+
+ /* In case of:
+ <src> <dst> ( <subexp> )
+ ( <subexp> ) <src> <dst>
+ ( <subexp1> <src> <subexp2> <dst> <subexp3> ) */
+ if (src_pos == dst_pos)
+ continue; /* This is unrelated limitation. */
+ else
+ return true;
+ }
+ return false;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos_1 (const re_match_context_t *mctx, int boundaries,
+ Idx subexp_idx, Idx from_node, Idx bkref_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ const re_node_set *eclosures = dfa->eclosures + from_node;
+ Idx node_idx;
+
+ /* Else, we are on the boundary: examine the nodes on the epsilon
+ closure. */
+ for (node_idx = 0; node_idx < eclosures->nelem; ++node_idx)
+ {
+ Idx node = eclosures->elems[node_idx];
+ switch (dfa->nodes[node].type)
+ {
+ case OP_BACK_REF:
+ if (bkref_idx != REG_MISSING)
+ {
+ struct re_backref_cache_entry *ent = mctx->bkref_ents + bkref_idx;
+ do
+ {
+ Idx dst;
+ int cpos;
+
+ if (ent->node != node)
+ continue;
+
+ if (subexp_idx < BITSET_WORD_BITS
+ && !(ent->eps_reachable_subexps_map
+ & ((bitset_word_t) 1 << subexp_idx)))
+ continue;
+
+ /* Recurse trying to reach the OP_OPEN_SUBEXP and
+ OP_CLOSE_SUBEXP cases below. But, if the
+ destination node is the same node as the source
+ node, don't recurse because it would cause an
+ infinite loop: a regex that exhibits this behavior
+ is ()\1*\1* */
+ dst = dfa->edests[node].elems[0];
+ if (dst == from_node)
+ {
+ if (boundaries & 1)
+ return -1;
+ else /* if (boundaries & 2) */
+ return 0;
+ }
+
+ cpos =
+ check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+ dst, bkref_idx);
+ if (cpos == -1 /* && (boundaries & 1) */)
+ return -1;
+ if (cpos == 0 && (boundaries & 2))
+ return 0;
+
+ if (subexp_idx < BITSET_WORD_BITS)
+ ent->eps_reachable_subexps_map
+ &= ~((bitset_word_t) 1 << subexp_idx);
+ }
+ while (ent++->more);
+ }
+ break;
+
+ case OP_OPEN_SUBEXP:
+ if ((boundaries & 1) && subexp_idx == dfa->nodes[node].opr.idx)
+ return -1;
+ break;
+
+ case OP_CLOSE_SUBEXP:
+ if ((boundaries & 2) && subexp_idx == dfa->nodes[node].opr.idx)
+ return 0;
+ break;
+
+ default:
+ break;
+ }
+ }
+
+ return (boundaries & 2) ? 1 : 0;
+}
+
+static int
+internal_function
+check_dst_limits_calc_pos (const re_match_context_t *mctx, Idx limit,
+ Idx subexp_idx, Idx from_node, Idx str_idx,
+ Idx bkref_idx)
+{
+ struct re_backref_cache_entry *lim = mctx->bkref_ents + limit;
+ int boundaries;
+
+ /* If we are outside the range of the subexpression, return -1 or 1. */
+ if (str_idx < lim->subexp_from)
+ return -1;
+
+ if (lim->subexp_to < str_idx)
+ return 1;
+
+ /* If we are within the subexpression, return 0. */
+ boundaries = (str_idx == lim->subexp_from);
+ boundaries |= (str_idx == lim->subexp_to) << 1;
+ if (boundaries == 0)
+ return 0;
+
+ /* Else, examine epsilon closure. */
+ return check_dst_limits_calc_pos_1 (mctx, boundaries, subexp_idx,
+ from_node, bkref_idx);
+}
+
+/* Check the limitations of sub expressions LIMITS, and remove the nodes
+ which are against limitations from DEST_NODES. */
+
+static reg_errcode_t
+internal_function
+check_subexp_limits (const re_dfa_t *dfa, re_node_set *dest_nodes,
+ const re_node_set *candidates, re_node_set *limits,
+ struct re_backref_cache_entry *bkref_ents, Idx str_idx)
+{
+ reg_errcode_t err;
+ Idx node_idx, lim_idx;
+
+ for (lim_idx = 0; lim_idx < limits->nelem; ++lim_idx)
+ {
+ Idx subexp_idx;
+ struct re_backref_cache_entry *ent;
+ ent = bkref_ents + limits->elems[lim_idx];
+
+ if (str_idx <= ent->subexp_from || ent->str_idx < str_idx)
+ continue; /* This is unrelated limitation. */
+
+ subexp_idx = dfa->nodes[ent->node].opr.idx;
+ if (ent->subexp_to == str_idx)
+ {
+ Idx ops_node = REG_MISSING;
+ Idx cls_node = REG_MISSING;
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ re_token_type_t type = dfa->nodes[node].type;
+ if (type == OP_OPEN_SUBEXP
+ && subexp_idx == dfa->nodes[node].opr.idx)
+ ops_node = node;
+ else if (type == OP_CLOSE_SUBEXP
+ && subexp_idx == dfa->nodes[node].opr.idx)
+ cls_node = node;
+ }
+
+ /* Check the limitation of the open subexpression. */
+ /* Note that (ent->subexp_to = str_idx != ent->subexp_from). */
+ if (REG_VALID_INDEX (ops_node))
+ {
+ err = sub_epsilon_src_nodes (dfa, ops_node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ /* Check the limitation of the close subexpression. */
+ if (REG_VALID_INDEX (cls_node))
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ if (!re_node_set_contains (dfa->inveclosures + node,
+ cls_node)
+ && !re_node_set_contains (dfa->eclosures + node,
+ cls_node))
+ {
+ /* It is against this limitation.
+ Remove it form the current sifted state. */
+ err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ --node_idx;
+ }
+ }
+ }
+ else /* (ent->subexp_to != str_idx) */
+ {
+ for (node_idx = 0; node_idx < dest_nodes->nelem; ++node_idx)
+ {
+ Idx node = dest_nodes->elems[node_idx];
+ re_token_type_t type = dfa->nodes[node].type;
+ if (type == OP_CLOSE_SUBEXP || type == OP_OPEN_SUBEXP)
+ {
+ if (subexp_idx != dfa->nodes[node].opr.idx)
+ continue;
+ /* It is against this limitation.
+ Remove it form the current sifted state. */
+ err = sub_epsilon_src_nodes (dfa, node, dest_nodes,
+ candidates);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ }
+ }
+ return REG_NOERROR;
+}
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+sift_states_bkref (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx str_idx, const re_node_set *candidates)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx node_idx, node;
+ re_sift_context_t local_sctx;
+ Idx first_idx = search_cur_bkref_entry (mctx, str_idx);
+
+ if (first_idx == REG_MISSING)
+ return REG_NOERROR;
+
+ local_sctx.sifted_states = NULL; /* Mark that it hasn't been initialized. */
+
+ for (node_idx = 0; node_idx < candidates->nelem; ++node_idx)
+ {
+ Idx enabled_idx;
+ re_token_type_t type;
+ struct re_backref_cache_entry *entry;
+ node = candidates->elems[node_idx];
+ type = dfa->nodes[node].type;
+ /* Avoid infinite loop for the REs like "()\1+". */
+ if (node == sctx->last_node && str_idx == sctx->last_str_idx)
+ continue;
+ if (type != OP_BACK_REF)
+ continue;
+
+ entry = mctx->bkref_ents + first_idx;
+ enabled_idx = first_idx;
+ do
+ {
+ Idx subexp_len;
+ Idx to_idx;
+ Idx dst_node;
+ bool ok;
+ re_dfastate_t *cur_state;
+
+ if (entry->node != node)
+ continue;
+ subexp_len = entry->subexp_to - entry->subexp_from;
+ to_idx = str_idx + subexp_len;
+ dst_node = (subexp_len ? dfa->nexts[node]
+ : dfa->edests[node].elems[0]);
+
+ if (to_idx > sctx->last_str_idx
+ || sctx->sifted_states[to_idx] == NULL
+ || !STATE_NODE_CONTAINS (sctx->sifted_states[to_idx], dst_node)
+ || check_dst_limits (mctx, &sctx->limits, node,
+ str_idx, dst_node, to_idx))
+ continue;
+
+ if (local_sctx.sifted_states == NULL)
+ {
+ local_sctx = *sctx;
+ err = re_node_set_init_copy (&local_sctx.limits, &sctx->limits);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ local_sctx.last_node = node;
+ local_sctx.last_str_idx = str_idx;
+ ok = re_node_set_insert (&local_sctx.limits, enabled_idx);
+ if (BE (! ok, 0))
+ {
+ err = REG_ESPACE;
+ goto free_return;
+ }
+ cur_state = local_sctx.sifted_states[str_idx];
+ err = sift_states_backward (mctx, &local_sctx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ if (sctx->limited_states != NULL)
+ {
+ err = merge_state_array (dfa, sctx->limited_states,
+ local_sctx.sifted_states,
+ str_idx + 1);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ local_sctx.sifted_states[str_idx] = cur_state;
+ re_node_set_remove (&local_sctx.limits, enabled_idx);
+
+ /* mctx->bkref_ents may have changed, reload the pointer. */
+ entry = mctx->bkref_ents + enabled_idx;
+ }
+ while (enabled_idx++, entry++->more);
+ }
+ err = REG_NOERROR;
+ free_return:
+ if (local_sctx.sifted_states != NULL)
+ {
+ re_node_set_free (&local_sctx.limits);
+ }
+
+ return err;
+}
+
+
+#ifdef RE_ENABLE_I18N
+static int
+internal_function
+sift_states_iter_mb (const re_match_context_t *mctx, re_sift_context_t *sctx,
+ Idx node_idx, Idx str_idx, Idx max_str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ int naccepted;
+ /* Check the node can accept `multi byte'. */
+ naccepted = check_node_accept_bytes (dfa, node_idx, &mctx->input, str_idx);
+ if (naccepted > 0 && str_idx + naccepted <= max_str_idx &&
+ !STATE_NODE_CONTAINS (sctx->sifted_states[str_idx + naccepted],
+ dfa->nexts[node_idx]))
+ /* The node can't accept the `multi byte', or the
+ destination was already thrown away, then the node
+ could't accept the current input `multi byte'. */
+ naccepted = 0;
+ /* Otherwise, it is sure that the node could accept
+ `naccepted' bytes input. */
+ return naccepted;
+}
+#endif /* RE_ENABLE_I18N */
+
+
+/* Functions for state transition. */
+
+/* Return the next state to which the current state STATE will transit by
+ accepting the current input byte, and update STATE_LOG if necessary.
+ If STATE can accept a multibyte char/collating element/back reference
+ update the destination of STATE_LOG. */
+
+static re_dfastate_t *
+internal_function __attribute_warn_unused_result__
+transit_state (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *state)
+{
+ re_dfastate_t **trtable;
+ unsigned char ch;
+
+#ifdef RE_ENABLE_I18N
+ /* If the current state can accept multibyte. */
+ if (BE (state->accept_mb, 0))
+ {
+ *err = transit_state_mb (mctx, state);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+#endif /* RE_ENABLE_I18N */
+
+ /* Then decide the next state with the single byte. */
+#if 0
+ if (0)
+ /* don't use transition table */
+ return transit_state_sb (err, mctx, state);
+#endif
+
+ /* Use transition table */
+ ch = re_string_fetch_byte (&mctx->input);
+ for (;;)
+ {
+ trtable = state->trtable;
+ if (BE (trtable != NULL, 1))
+ return trtable[ch];
+
+ trtable = state->word_trtable;
+ if (BE (trtable != NULL, 1))
+ {
+ unsigned int context;
+ context
+ = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input) - 1,
+ mctx->eflags);
+ if (IS_WORD_CONTEXT (context))
+ return trtable[ch + SBC_MAX];
+ else
+ return trtable[ch];
+ }
+
+ if (!build_trtable (mctx->dfa, state))
+ {
+ *err = REG_ESPACE;
+ return NULL;
+ }
+
+ /* Retry, we now have a transition table. */
+ }
+}
+
+/* Update the state_log if we need */
+static re_dfastate_t *
+internal_function
+merge_state_with_log (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *next_state)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx cur_idx = re_string_cur_idx (&mctx->input);
+
+ if (cur_idx > mctx->state_log_top)
+ {
+ mctx->state_log[cur_idx] = next_state;
+ mctx->state_log_top = cur_idx;
+ }
+ else if (mctx->state_log[cur_idx] == 0)
+ {
+ mctx->state_log[cur_idx] = next_state;
+ }
+ else
+ {
+ re_dfastate_t *pstate;
+ unsigned int context;
+ re_node_set next_nodes, *log_nodes, *table_nodes = NULL;
+ /* If (state_log[cur_idx] != 0), it implies that cur_idx is
+ the destination of a multibyte char/collating element/
+ back reference. Then the next state is the union set of
+ these destinations and the results of the transition table. */
+ pstate = mctx->state_log[cur_idx];
+ log_nodes = pstate->entrance_nodes;
+ if (next_state != NULL)
+ {
+ table_nodes = next_state->entrance_nodes;
+ *err = re_node_set_init_union (&next_nodes, table_nodes,
+ log_nodes);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ }
+ else
+ next_nodes = *log_nodes;
+ /* Note: We already add the nodes of the initial state,
+ then we don't need to add them here. */
+
+ context = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input) - 1,
+ mctx->eflags);
+ next_state = mctx->state_log[cur_idx]
+ = re_acquire_state_context (err, dfa, &next_nodes, context);
+ /* We don't need to check errors here, since the return value of
+ this function is next_state and ERR is already set. */
+
+ if (table_nodes != NULL)
+ re_node_set_free (&next_nodes);
+ }
+
+ if (BE (dfa->nbackref, 0) && next_state != NULL)
+ {
+ /* Check OP_OPEN_SUBEXP in the current state in case that we use them
+ later. We must check them here, since the back references in the
+ next state might use them. */
+ *err = check_subexp_matching_top (mctx, &next_state->nodes,
+ cur_idx);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+
+ /* If the next state has back references. */
+ if (next_state->has_backref)
+ {
+ *err = transit_state_bkref (mctx, &next_state->nodes);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ next_state = mctx->state_log[cur_idx];
+ }
+ }
+
+ return next_state;
+}
+
+/* Skip bytes in the input that correspond to part of a
+ multi-byte match, then look in the log for a state
+ from which to restart matching. */
+static re_dfastate_t *
+internal_function
+find_recover_state (reg_errcode_t *err, re_match_context_t *mctx)
+{
+ re_dfastate_t *cur_state;
+ do
+ {
+ Idx max = mctx->state_log_top;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+ do
+ {
+ if (++cur_str_idx > max)
+ return NULL;
+ re_string_skip_bytes (&mctx->input, 1);
+ }
+ while (mctx->state_log[cur_str_idx] == NULL);
+
+ cur_state = merge_state_with_log (err, mctx, NULL);
+ }
+ while (*err == REG_NOERROR && cur_state == NULL);
+ return cur_state;
+}
+
+/* Helper functions for transit_state. */
+
+/* From the node set CUR_NODES, pick up the nodes whose types are
+ OP_OPEN_SUBEXP and which have corresponding back references in the regular
+ expression. And register them to use them later for evaluating the
+ correspoding back references. */
+
+static reg_errcode_t
+internal_function
+check_subexp_matching_top (re_match_context_t *mctx, re_node_set *cur_nodes,
+ Idx str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx node_idx;
+ reg_errcode_t err;
+
+ /* TODO: This isn't efficient.
+ Because there might be more than one nodes whose types are
+ OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+ nodes.
+ E.g. RE: (a){2} */
+ for (node_idx = 0; node_idx < cur_nodes->nelem; ++node_idx)
+ {
+ Idx node = cur_nodes->elems[node_idx];
+ if (dfa->nodes[node].type == OP_OPEN_SUBEXP
+ && dfa->nodes[node].opr.idx < BITSET_WORD_BITS
+ && (dfa->used_bkref_map
+ & ((bitset_word_t) 1 << dfa->nodes[node].opr.idx)))
+ {
+ err = match_ctx_add_subtop (mctx, node, str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ return REG_NOERROR;
+}
+
+#if 0
+/* Return the next state to which the current state STATE will transit by
+ accepting the current input byte. */
+
+static re_dfastate_t *
+transit_state_sb (reg_errcode_t *err, re_match_context_t *mctx,
+ re_dfastate_t *state)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ re_node_set next_nodes;
+ re_dfastate_t *next_state;
+ Idx node_cnt, cur_str_idx = re_string_cur_idx (&mctx->input);
+ unsigned int context;
+
+ *err = re_node_set_alloc (&next_nodes, state->nodes.nelem + 1);
+ if (BE (*err != REG_NOERROR, 0))
+ return NULL;
+ for (node_cnt = 0; node_cnt < state->nodes.nelem; ++node_cnt)
+ {
+ Idx cur_node = state->nodes.elems[node_cnt];
+ if (check_node_accept (mctx, dfa->nodes + cur_node, cur_str_idx))
+ {
+ *err = re_node_set_merge (&next_nodes,
+ dfa->eclosures + dfa->nexts[cur_node]);
+ if (BE (*err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return NULL;
+ }
+ }
+ }
+ context = re_string_context_at (&mctx->input, cur_str_idx, mctx->eflags);
+ next_state = re_acquire_state_context (err, dfa, &next_nodes, context);
+ /* We don't need to check errors here, since the return value of
+ this function is next_state and ERR is already set. */
+
+ re_node_set_free (&next_nodes);
+ re_string_skip_bytes (&mctx->input, 1);
+ return next_state;
+}
+#endif
+
+#ifdef RE_ENABLE_I18N
+static reg_errcode_t
+internal_function
+transit_state_mb (re_match_context_t *mctx, re_dfastate_t *pstate)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx i;
+
+ for (i = 0; i < pstate->nodes.nelem; ++i)
+ {
+ re_node_set dest_nodes, *new_nodes;
+ Idx cur_node_idx = pstate->nodes.elems[i];
+ int naccepted;
+ Idx dest_idx;
+ unsigned int context;
+ re_dfastate_t *dest_state;
+
+ if (!dfa->nodes[cur_node_idx].accept_mb)
+ continue;
+
+ if (dfa->nodes[cur_node_idx].constraint)
+ {
+ context = re_string_context_at (&mctx->input,
+ re_string_cur_idx (&mctx->input),
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (dfa->nodes[cur_node_idx].constraint,
+ context))
+ continue;
+ }
+
+ /* How many bytes the node can accept? */
+ naccepted = check_node_accept_bytes (dfa, cur_node_idx, &mctx->input,
+ re_string_cur_idx (&mctx->input));
+ if (naccepted == 0)
+ continue;
+
+ /* The node can accepts `naccepted' bytes. */
+ dest_idx = re_string_cur_idx (&mctx->input) + naccepted;
+ mctx->max_mb_elem_len = ((mctx->max_mb_elem_len < naccepted) ? naccepted
+ : mctx->max_mb_elem_len);
+ err = clean_state_log_if_needed (mctx, dest_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+#ifdef DEBUG
+ assert (dfa->nexts[cur_node_idx] != REG_MISSING);
+#endif
+ new_nodes = dfa->eclosures + dfa->nexts[cur_node_idx];
+
+ dest_state = mctx->state_log[dest_idx];
+ if (dest_state == NULL)
+ dest_nodes = *new_nodes;
+ else
+ {
+ err = re_node_set_init_union (&dest_nodes,
+ dest_state->entrance_nodes, new_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ context = re_string_context_at (&mctx->input, dest_idx - 1,
+ mctx->eflags);
+ mctx->state_log[dest_idx]
+ = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+ if (dest_state != NULL)
+ re_node_set_free (&dest_nodes);
+ if (BE (mctx->state_log[dest_idx] == NULL && err != REG_NOERROR, 0))
+ return err;
+ }
+ return REG_NOERROR;
+}
+#endif /* RE_ENABLE_I18N */
+
+static reg_errcode_t
+internal_function
+transit_state_bkref (re_match_context_t *mctx, const re_node_set *nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx i;
+ Idx cur_str_idx = re_string_cur_idx (&mctx->input);
+
+ for (i = 0; i < nodes->nelem; ++i)
+ {
+ Idx dest_str_idx, prev_nelem, bkc_idx;
+ Idx node_idx = nodes->elems[i];
+ unsigned int context;
+ const re_token_t *node = dfa->nodes + node_idx;
+ re_node_set *new_dest_nodes;
+
+ /* Check whether `node' is a backreference or not. */
+ if (node->type != OP_BACK_REF)
+ continue;
+
+ if (node->constraint)
+ {
+ context = re_string_context_at (&mctx->input, cur_str_idx,
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+ continue;
+ }
+
+ /* `node' is a backreference.
+ Check the substring which the substring matched. */
+ bkc_idx = mctx->nbkref_ents;
+ err = get_subexp (mctx, node_idx, cur_str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+
+ /* And add the epsilon closures (which is `new_dest_nodes') of
+ the backreference to appropriate state_log. */
+#ifdef DEBUG
+ assert (dfa->nexts[node_idx] != REG_MISSING);
+#endif
+ for (; bkc_idx < mctx->nbkref_ents; ++bkc_idx)
+ {
+ Idx subexp_len;
+ re_dfastate_t *dest_state;
+ struct re_backref_cache_entry *bkref_ent;
+ bkref_ent = mctx->bkref_ents + bkc_idx;
+ if (bkref_ent->node != node_idx || bkref_ent->str_idx != cur_str_idx)
+ continue;
+ subexp_len = bkref_ent->subexp_to - bkref_ent->subexp_from;
+ new_dest_nodes = (subexp_len == 0
+ ? dfa->eclosures + dfa->edests[node_idx].elems[0]
+ : dfa->eclosures + dfa->nexts[node_idx]);
+ dest_str_idx = (cur_str_idx + bkref_ent->subexp_to
+ - bkref_ent->subexp_from);
+ context = re_string_context_at (&mctx->input, dest_str_idx - 1,
+ mctx->eflags);
+ dest_state = mctx->state_log[dest_str_idx];
+ prev_nelem = ((mctx->state_log[cur_str_idx] == NULL) ? 0
+ : mctx->state_log[cur_str_idx]->nodes.nelem);
+ /* Add `new_dest_node' to state_log. */
+ if (dest_state == NULL)
+ {
+ mctx->state_log[dest_str_idx]
+ = re_acquire_state_context (&err, dfa, new_dest_nodes,
+ context);
+ if (BE (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ else
+ {
+ re_node_set dest_nodes;
+ err = re_node_set_init_union (&dest_nodes,
+ dest_state->entrance_nodes,
+ new_dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&dest_nodes);
+ goto free_return;
+ }
+ mctx->state_log[dest_str_idx]
+ = re_acquire_state_context (&err, dfa, &dest_nodes, context);
+ re_node_set_free (&dest_nodes);
+ if (BE (mctx->state_log[dest_str_idx] == NULL
+ && err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ /* We need to check recursively if the backreference can epsilon
+ transit. */
+ if (subexp_len == 0
+ && mctx->state_log[cur_str_idx]->nodes.nelem > prev_nelem)
+ {
+ err = check_subexp_matching_top (mctx, new_dest_nodes,
+ cur_str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ err = transit_state_bkref (mctx, new_dest_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ goto free_return;
+ }
+ }
+ }
+ err = REG_NOERROR;
+ free_return:
+ return err;
+}
+
+/* Enumerate all the candidates which the backreference BKREF_NODE can match
+ at BKREF_STR_IDX, and register them by match_ctx_add_entry().
+ Note that we might collect inappropriate candidates here.
+ However, the cost of checking them strictly here is too high, then we
+ delay these checking for prune_impossible_nodes(). */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+get_subexp (re_match_context_t *mctx, Idx bkref_node, Idx bkref_str_idx)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ Idx subexp_num, sub_top_idx;
+ const char *buf = (const char *) re_string_get_buffer (&mctx->input);
+ /* Return if we have already checked BKREF_NODE at BKREF_STR_IDX. */
+ Idx cache_idx = search_cur_bkref_entry (mctx, bkref_str_idx);
+ if (cache_idx != REG_MISSING)
+ {
+ const struct re_backref_cache_entry *entry
+ = mctx->bkref_ents + cache_idx;
+ do
+ if (entry->node == bkref_node)
+ return REG_NOERROR; /* We already checked it. */
+ while (entry++->more);
+ }
+
+ subexp_num = dfa->nodes[bkref_node].opr.idx;
+
+ /* For each sub expression */
+ for (sub_top_idx = 0; sub_top_idx < mctx->nsub_tops; ++sub_top_idx)
+ {
+ reg_errcode_t err;
+ re_sub_match_top_t *sub_top = mctx->sub_tops[sub_top_idx];
+ re_sub_match_last_t *sub_last;
+ Idx sub_last_idx, sl_str, bkref_str_off;
+
+ if (dfa->nodes[sub_top->node].opr.idx != subexp_num)
+ continue; /* It isn't related. */
+
+ sl_str = sub_top->str_idx;
+ bkref_str_off = bkref_str_idx;
+ /* At first, check the last node of sub expressions we already
+ evaluated. */
+ for (sub_last_idx = 0; sub_last_idx < sub_top->nlasts; ++sub_last_idx)
+ {
+ regoff_t sl_str_diff;
+ sub_last = sub_top->lasts[sub_last_idx];
+ sl_str_diff = sub_last->str_idx - sl_str;
+ /* The matched string by the sub expression match with the substring
+ at the back reference? */
+ if (sl_str_diff > 0)
+ {
+ if (BE (bkref_str_off + sl_str_diff > mctx->input.valid_len, 0))
+ {
+ /* Not enough chars for a successful match. */
+ if (bkref_str_off + sl_str_diff > mctx->input.len)
+ break;
+
+ err = clean_state_log_if_needed (mctx,
+ bkref_str_off
+ + sl_str_diff);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+ }
+ if (memcmp (buf + bkref_str_off, buf + sl_str, sl_str_diff) != 0)
+ /* We don't need to search this sub expression any more. */
+ break;
+ }
+ bkref_str_off += sl_str_diff;
+ sl_str += sl_str_diff;
+ err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+ bkref_str_idx);
+
+ /* Reload buf, since the preceding call might have reallocated
+ the buffer. */
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+
+ if (err == REG_NOMATCH)
+ continue;
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+
+ if (sub_last_idx < sub_top->nlasts)
+ continue;
+ if (sub_last_idx > 0)
+ ++sl_str;
+ /* Then, search for the other last nodes of the sub expression. */
+ for (; sl_str <= bkref_str_idx; ++sl_str)
+ {
+ Idx cls_node;
+ regoff_t sl_str_off;
+ const re_node_set *nodes;
+ sl_str_off = sl_str - sub_top->str_idx;
+ /* The matched string by the sub expression match with the substring
+ at the back reference? */
+ if (sl_str_off > 0)
+ {
+ if (BE (bkref_str_off >= mctx->input.valid_len, 0))
+ {
+ /* If we are at the end of the input, we cannot match. */
+ if (bkref_str_off >= mctx->input.len)
+ break;
+
+ err = extend_buffers (mctx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+
+ buf = (const char *) re_string_get_buffer (&mctx->input);
+ }
+ if (buf [bkref_str_off++] != buf[sl_str - 1])
+ break; /* We don't need to search this sub expression
+ any more. */
+ }
+ if (mctx->state_log[sl_str] == NULL)
+ continue;
+ /* Does this state have a ')' of the sub expression? */
+ nodes = &mctx->state_log[sl_str]->nodes;
+ cls_node = find_subexp_node (dfa, nodes, subexp_num,
+ OP_CLOSE_SUBEXP);
+ if (cls_node == REG_MISSING)
+ continue; /* No. */
+ if (sub_top->path == NULL)
+ {
+ sub_top->path = calloc (sizeof (state_array_t),
+ sl_str - sub_top->str_idx + 1);
+ if (sub_top->path == NULL)
+ return REG_ESPACE;
+ }
+ /* Can the OP_OPEN_SUBEXP node arrive the OP_CLOSE_SUBEXP node
+ in the current context? */
+ err = check_arrival (mctx, sub_top->path, sub_top->node,
+ sub_top->str_idx, cls_node, sl_str,
+ OP_CLOSE_SUBEXP);
+ if (err == REG_NOMATCH)
+ continue;
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ sub_last = match_ctx_add_sublast (sub_top, cls_node, sl_str);
+ if (BE (sub_last == NULL, 0))
+ return REG_ESPACE;
+ err = get_subexp_sub (mctx, sub_top, sub_last, bkref_node,
+ bkref_str_idx);
+ if (err == REG_NOMATCH)
+ continue;
+ }
+ }
+ return REG_NOERROR;
+}
+
+/* Helper functions for get_subexp(). */
+
+/* Check SUB_LAST can arrive to the back reference BKREF_NODE at BKREF_STR.
+ If it can arrive, register the sub expression expressed with SUB_TOP
+ and SUB_LAST. */
+
+static reg_errcode_t
+internal_function
+get_subexp_sub (re_match_context_t *mctx, const re_sub_match_top_t *sub_top,
+ re_sub_match_last_t *sub_last, Idx bkref_node, Idx bkref_str)
+{
+ reg_errcode_t err;
+ Idx to_idx;
+ /* Can the subexpression arrive the back reference? */
+ err = check_arrival (mctx, &sub_last->path, sub_last->node,
+ sub_last->str_idx, bkref_node, bkref_str,
+ OP_OPEN_SUBEXP);
+ if (err != REG_NOERROR)
+ return err;
+ err = match_ctx_add_entry (mctx, bkref_node, bkref_str, sub_top->str_idx,
+ sub_last->str_idx);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ to_idx = bkref_str + sub_last->str_idx - sub_top->str_idx;
+ return clean_state_log_if_needed (mctx, to_idx);
+}
+
+/* Find the first node which is '(' or ')' and whose index is SUBEXP_IDX.
+ Search '(' if FL_OPEN, or search ')' otherwise.
+ TODO: This function isn't efficient...
+ Because there might be more than one nodes whose types are
+ OP_OPEN_SUBEXP and whose index is SUBEXP_IDX, we must check all
+ nodes.
+ E.g. RE: (a){2} */
+
+static Idx
+internal_function
+find_subexp_node (const re_dfa_t *dfa, const re_node_set *nodes,
+ Idx subexp_idx, int type)
+{
+ Idx cls_idx;
+ for (cls_idx = 0; cls_idx < nodes->nelem; ++cls_idx)
+ {
+ Idx cls_node = nodes->elems[cls_idx];
+ const re_token_t *node = dfa->nodes + cls_node;
+ if (node->type == type
+ && node->opr.idx == subexp_idx)
+ return cls_node;
+ }
+ return REG_MISSING;
+}
+
+/* Check whether the node TOP_NODE at TOP_STR can arrive to the node
+ LAST_NODE at LAST_STR. We record the path onto PATH since it will be
+ heavily reused.
+ Return REG_NOERROR if it can arrive, or REG_NOMATCH otherwise. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival (re_match_context_t *mctx, state_array_t *path, Idx top_node,
+ Idx top_str, Idx last_node, Idx last_str, int type)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err = REG_NOERROR;
+ Idx subexp_num, backup_cur_idx, str_idx, null_cnt;
+ re_dfastate_t *cur_state = NULL;
+ re_node_set *cur_nodes, next_nodes;
+ re_dfastate_t **backup_state_log;
+ unsigned int context;
+
+ subexp_num = dfa->nodes[top_node].opr.idx;
+ /* Extend the buffer if we need. */
+ if (BE (path->alloc < last_str + mctx->max_mb_elem_len + 1, 0))
+ {
+ re_dfastate_t **new_array;
+ Idx old_alloc = path->alloc;
+ Idx new_alloc = old_alloc + last_str + mctx->max_mb_elem_len + 1;
+ if (BE (new_alloc < old_alloc, 0)
+ || BE (SIZE_MAX / sizeof (re_dfastate_t *) < new_alloc, 0))
+ return REG_ESPACE;
+ new_array = re_realloc (path->array, re_dfastate_t *, new_alloc);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ path->array = new_array;
+ path->alloc = new_alloc;
+ memset (new_array + old_alloc, '\0',
+ sizeof (re_dfastate_t *) * (path->alloc - old_alloc));
+ }
+
+ str_idx = path->next_idx ? path->next_idx : top_str;
+
+ /* Temporary modify MCTX. */
+ backup_state_log = mctx->state_log;
+ backup_cur_idx = mctx->input.cur_idx;
+ mctx->state_log = path->array;
+ mctx->input.cur_idx = str_idx;
+
+ /* Setup initial node set. */
+ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+ if (str_idx == top_str)
+ {
+ err = re_node_set_init_1 (&next_nodes, top_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ else
+ {
+ cur_state = mctx->state_log[str_idx];
+ if (cur_state && cur_state->has_backref)
+ {
+ err = re_node_set_init_copy (&next_nodes, &cur_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ else
+ re_node_set_init_empty (&next_nodes);
+ }
+ if (str_idx == top_str || (cur_state && cur_state->has_backref))
+ {
+ if (next_nodes.nelem)
+ {
+ err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+ subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+ if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ mctx->state_log[str_idx] = cur_state;
+ }
+
+ for (null_cnt = 0; str_idx < last_str && null_cnt <= mctx->max_mb_elem_len;)
+ {
+ re_node_set_empty (&next_nodes);
+ if (mctx->state_log[str_idx + 1])
+ {
+ err = re_node_set_merge (&next_nodes,
+ &mctx->state_log[str_idx + 1]->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ if (cur_state)
+ {
+ err = check_arrival_add_next_nodes (mctx, str_idx,
+ &cur_state->non_eps_nodes,
+ &next_nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ ++str_idx;
+ if (next_nodes.nelem)
+ {
+ err = check_arrival_expand_ecl (dfa, &next_nodes, subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ err = expand_bkref_cache (mctx, &next_nodes, str_idx,
+ subexp_num, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ }
+ context = re_string_context_at (&mctx->input, str_idx - 1, mctx->eflags);
+ cur_state = re_acquire_state_context (&err, dfa, &next_nodes, context);
+ if (BE (cur_state == NULL && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&next_nodes);
+ return err;
+ }
+ mctx->state_log[str_idx] = cur_state;
+ null_cnt = cur_state == NULL ? null_cnt + 1 : 0;
+ }
+ re_node_set_free (&next_nodes);
+ cur_nodes = (mctx->state_log[last_str] == NULL ? NULL
+ : &mctx->state_log[last_str]->nodes);
+ path->next_idx = str_idx;
+
+ /* Fix MCTX. */
+ mctx->state_log = backup_state_log;
+ mctx->input.cur_idx = backup_cur_idx;
+
+ /* Then check the current node set has the node LAST_NODE. */
+ if (cur_nodes != NULL && re_node_set_contains (cur_nodes, last_node))
+ return REG_NOERROR;
+
+ return REG_NOMATCH;
+}
+
+/* Helper functions for check_arrival. */
+
+/* Calculate the destination nodes of CUR_NODES at STR_IDX, and append them
+ to NEXT_NODES.
+ TODO: This function is similar to the functions transit_state*(),
+ however this function has many additional works.
+ Can't we unify them? */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_add_next_nodes (re_match_context_t *mctx, Idx str_idx,
+ re_node_set *cur_nodes, re_node_set *next_nodes)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ bool ok;
+ Idx cur_idx;
+#ifdef RE_ENABLE_I18N
+ reg_errcode_t err = REG_NOERROR;
+#endif
+ re_node_set union_set;
+ re_node_set_init_empty (&union_set);
+ for (cur_idx = 0; cur_idx < cur_nodes->nelem; ++cur_idx)
+ {
+ int naccepted = 0;
+ Idx cur_node = cur_nodes->elems[cur_idx];
+#ifdef DEBUG
+ re_token_type_t type = dfa->nodes[cur_node].type;
+ assert (!IS_EPSILON_NODE (type));
+#endif
+#ifdef RE_ENABLE_I18N
+ /* If the node may accept `multi byte'. */
+ if (dfa->nodes[cur_node].accept_mb)
+ {
+ naccepted = check_node_accept_bytes (dfa, cur_node, &mctx->input,
+ str_idx);
+ if (naccepted > 1)
+ {
+ re_dfastate_t *dest_state;
+ Idx next_node = dfa->nexts[cur_node];
+ Idx next_idx = str_idx + naccepted;
+ dest_state = mctx->state_log[next_idx];
+ re_node_set_empty (&union_set);
+ if (dest_state)
+ {
+ err = re_node_set_merge (&union_set, &dest_state->nodes);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&union_set);
+ return err;
+ }
+ }
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ return REG_ESPACE;
+ }
+ mctx->state_log[next_idx] = re_acquire_state (&err, dfa,
+ &union_set);
+ if (BE (mctx->state_log[next_idx] == NULL
+ && err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&union_set);
+ return err;
+ }
+ }
+ }
+#endif /* RE_ENABLE_I18N */
+ if (naccepted
+ || check_node_accept (mctx, dfa->nodes + cur_node, str_idx))
+ {
+ ok = re_node_set_insert (next_nodes, dfa->nexts[cur_node]);
+ if (BE (! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ return REG_ESPACE;
+ }
+ }
+ }
+ re_node_set_free (&union_set);
+ return REG_NOERROR;
+}
+
+/* For all the nodes in CUR_NODES, add the epsilon closures of them to
+ CUR_NODES, however exclude the nodes which are:
+ - inside the sub expression whose number is EX_SUBEXP, if FL_OPEN.
+ - out of the sub expression whose number is EX_SUBEXP, if !FL_OPEN.
+*/
+
+static reg_errcode_t
+internal_function
+check_arrival_expand_ecl (const re_dfa_t *dfa, re_node_set *cur_nodes,
+ Idx ex_subexp, int type)
+{
+ reg_errcode_t err;
+ Idx idx, outside_node;
+ re_node_set new_nodes;
+#ifdef DEBUG
+ assert (cur_nodes->nelem);
+#endif
+ err = re_node_set_alloc (&new_nodes, cur_nodes->nelem);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ /* Create a new node set NEW_NODES with the nodes which are epsilon
+ closures of the node in CUR_NODES. */
+
+ for (idx = 0; idx < cur_nodes->nelem; ++idx)
+ {
+ Idx cur_node = cur_nodes->elems[idx];
+ const re_node_set *eclosure = dfa->eclosures + cur_node;
+ outside_node = find_subexp_node (dfa, eclosure, ex_subexp, type);
+ if (outside_node == REG_MISSING)
+ {
+ /* There are no problematic nodes, just merge them. */
+ err = re_node_set_merge (&new_nodes, eclosure);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&new_nodes);
+ return err;
+ }
+ }
+ else
+ {
+ /* There are problematic nodes, re-calculate incrementally. */
+ err = check_arrival_expand_ecl_sub (dfa, &new_nodes, cur_node,
+ ex_subexp, type);
+ if (BE (err != REG_NOERROR, 0))
+ {
+ re_node_set_free (&new_nodes);
+ return err;
+ }
+ }
+ }
+ re_node_set_free (cur_nodes);
+ *cur_nodes = new_nodes;
+ return REG_NOERROR;
+}
+
+/* Helper function for check_arrival_expand_ecl.
+ Check incrementally the epsilon closure of TARGET, and if it isn't
+ problematic append it to DST_NODES. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+check_arrival_expand_ecl_sub (const re_dfa_t *dfa, re_node_set *dst_nodes,
+ Idx target, Idx ex_subexp, int type)
+{
+ Idx cur_node;
+ for (cur_node = target; !re_node_set_contains (dst_nodes, cur_node);)
+ {
+ bool ok;
+
+ if (dfa->nodes[cur_node].type == type
+ && dfa->nodes[cur_node].opr.idx == ex_subexp)
+ {
+ if (type == OP_CLOSE_SUBEXP)
+ {
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ }
+ break;
+ }
+ ok = re_node_set_insert (dst_nodes, cur_node);
+ if (BE (! ok, 0))
+ return REG_ESPACE;
+ if (dfa->edests[cur_node].nelem == 0)
+ break;
+ if (dfa->edests[cur_node].nelem == 2)
+ {
+ reg_errcode_t err;
+ err = check_arrival_expand_ecl_sub (dfa, dst_nodes,
+ dfa->edests[cur_node].elems[1],
+ ex_subexp, type);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ cur_node = dfa->edests[cur_node].elems[0];
+ }
+ return REG_NOERROR;
+}
+
+
+/* For all the back references in the current state, calculate the
+ destination of the back references by the appropriate entry
+ in MCTX->BKREF_ENTS. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+expand_bkref_cache (re_match_context_t *mctx, re_node_set *cur_nodes,
+ Idx cur_str, Idx subexp_num, int type)
+{
+ const re_dfa_t *const dfa = mctx->dfa;
+ reg_errcode_t err;
+ Idx cache_idx_start = search_cur_bkref_entry (mctx, cur_str);
+ struct re_backref_cache_entry *ent;
+
+ if (cache_idx_start == REG_MISSING)
+ return REG_NOERROR;
+
+ restart:
+ ent = mctx->bkref_ents + cache_idx_start;
+ do
+ {
+ Idx to_idx, next_node;
+
+ /* Is this entry ENT is appropriate? */
+ if (!re_node_set_contains (cur_nodes, ent->node))
+ continue; /* No. */
+
+ to_idx = cur_str + ent->subexp_to - ent->subexp_from;
+ /* Calculate the destination of the back reference, and append it
+ to MCTX->STATE_LOG. */
+ if (to_idx == cur_str)
+ {
+ /* The backreference did epsilon transit, we must re-check all the
+ node in the current state. */
+ re_node_set new_dests;
+ reg_errcode_t err2, err3;
+ next_node = dfa->edests[ent->node].elems[0];
+ if (re_node_set_contains (cur_nodes, next_node))
+ continue;
+ err = re_node_set_init_1 (&new_dests, next_node);
+ err2 = check_arrival_expand_ecl (dfa, &new_dests, subexp_num, type);
+ err3 = re_node_set_merge (cur_nodes, &new_dests);
+ re_node_set_free (&new_dests);
+ if (BE (err != REG_NOERROR || err2 != REG_NOERROR
+ || err3 != REG_NOERROR, 0))
+ {
+ err = (err != REG_NOERROR ? err
+ : (err2 != REG_NOERROR ? err2 : err3));
+ return err;
+ }
+ /* TODO: It is still inefficient... */
+ goto restart;
+ }
+ else
+ {
+ re_node_set union_set;
+ next_node = dfa->nexts[ent->node];
+ if (mctx->state_log[to_idx])
+ {
+ bool ok;
+ if (re_node_set_contains (&mctx->state_log[to_idx]->nodes,
+ next_node))
+ continue;
+ err = re_node_set_init_copy (&union_set,
+ &mctx->state_log[to_idx]->nodes);
+ ok = re_node_set_insert (&union_set, next_node);
+ if (BE (err != REG_NOERROR || ! ok, 0))
+ {
+ re_node_set_free (&union_set);
+ err = err != REG_NOERROR ? err : REG_ESPACE;
+ return err;
+ }
+ }
+ else
+ {
+ err = re_node_set_init_1 (&union_set, next_node);
+ if (BE (err != REG_NOERROR, 0))
+ return err;
+ }
+ mctx->state_log[to_idx] = re_acquire_state (&err, dfa, &union_set);
+ re_node_set_free (&union_set);
+ if (BE (mctx->state_log[to_idx] == NULL
+ && err != REG_NOERROR, 0))
+ return err;
+ }
+ }
+ while (ent++->more);
+ return REG_NOERROR;
+}
+
+/* Build transition table for the state.
+ Return true if successful. */
+
+static bool
+internal_function
+build_trtable (const re_dfa_t *dfa, re_dfastate_t *state)
+{
+ reg_errcode_t err;
+ Idx i, j;
+ int ch;
+ bool need_word_trtable = false;
+ bitset_word_t elem, mask;
+ bool dests_node_malloced = false;
+ bool dest_states_malloced = false;
+ Idx ndests; /* Number of the destination states from `state'. */
+ re_dfastate_t **trtable;
+ re_dfastate_t **dest_states = NULL, **dest_states_word, **dest_states_nl;
+ re_node_set follows, *dests_node;
+ bitset_t *dests_ch;
+ bitset_t acceptable;
+
+ struct dests_alloc
+ {
+ re_node_set dests_node[SBC_MAX];
+ bitset_t dests_ch[SBC_MAX];
+ } *dests_alloc;
+
+ /* We build DFA states which corresponds to the destination nodes
+ from `state'. `dests_node[i]' represents the nodes which i-th
+ destination state contains, and `dests_ch[i]' represents the
+ characters which i-th destination state accepts. */
+ if (__libc_use_alloca (sizeof (struct dests_alloc)))
+ dests_alloc = (struct dests_alloc *) alloca (sizeof (struct dests_alloc));
+ else
+ {
+ dests_alloc = re_malloc (struct dests_alloc, 1);
+ if (BE (dests_alloc == NULL, 0))
+ return false;
+ dests_node_malloced = true;
+ }
+ dests_node = dests_alloc->dests_node;
+ dests_ch = dests_alloc->dests_ch;
+
+ /* Initialize transiton table. */
+ state->word_trtable = state->trtable = NULL;
+
+ /* At first, group all nodes belonging to `state' into several
+ destinations. */
+ ndests = group_nodes_into_DFAstates (dfa, state, dests_node, dests_ch);
+ if (BE (! REG_VALID_NONZERO_INDEX (ndests), 0))
+ {
+ if (dests_node_malloced)
+ free (dests_alloc);
+ if (ndests == 0)
+ {
+ state->trtable = (re_dfastate_t **)
+ calloc (sizeof (re_dfastate_t *), SBC_MAX);
+ return true;
+ }
+ return false;
+ }
+
+ err = re_node_set_alloc (&follows, ndests + 1);
+ if (BE (err != REG_NOERROR, 0))
+ goto out_free;
+
+ /* Avoid arithmetic overflow in size calculation. */
+ if (BE ((((SIZE_MAX - (sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX)
+ / (3 * sizeof (re_dfastate_t *)))
+ < ndests),
+ 0))
+ goto out_free;
+
+ if (__libc_use_alloca ((sizeof (re_node_set) + sizeof (bitset_t)) * SBC_MAX
+ + ndests * 3 * sizeof (re_dfastate_t *)))
+ dest_states = (re_dfastate_t **)
+ alloca (ndests * 3 * sizeof (re_dfastate_t *));
+ else
+ {
+ dest_states = (re_dfastate_t **)
+ malloc (ndests * 3 * sizeof (re_dfastate_t *));
+ if (BE (dest_states == NULL, 0))
+ {
+out_free:
+ if (dest_states_malloced)
+ free (dest_states);
+ re_node_set_free (&follows);
+ for (i = 0; i < ndests; ++i)
+ re_node_set_free (dests_node + i);
+ if (dests_node_malloced)
+ free (dests_alloc);
+ return false;
+ }
+ dest_states_malloced = true;
+ }
+ dest_states_word = dest_states + ndests;
+ dest_states_nl = dest_states_word + ndests;
+ bitset_empty (acceptable);
+
+ /* Then build the states for all destinations. */
+ for (i = 0; i < ndests; ++i)
+ {
+ Idx next_node;
+ re_node_set_empty (&follows);
+ /* Merge the follows of this destination states. */
+ for (j = 0; j < dests_node[i].nelem; ++j)
+ {
+ next_node = dfa->nexts[dests_node[i].elems[j]];
+ if (next_node != REG_MISSING)
+ {
+ err = re_node_set_merge (&follows, dfa->eclosures + next_node);
+ if (BE (err != REG_NOERROR, 0))
+ goto out_free;
+ }
+ }
+ dest_states[i] = re_acquire_state_context (&err, dfa, &follows, 0);
+ if (BE (dest_states[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+ /* If the new state has context constraint,
+ build appropriate states for these contexts. */
+ if (dest_states[i]->has_constraint)
+ {
+ dest_states_word[i] = re_acquire_state_context (&err, dfa, &follows,
+ CONTEXT_WORD);
+ if (BE (dest_states_word[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+
+ if (dest_states[i] != dest_states_word[i] && dfa->mb_cur_max > 1)
+ need_word_trtable = true;
+
+ dest_states_nl[i] = re_acquire_state_context (&err, dfa, &follows,
+ CONTEXT_NEWLINE);
+ if (BE (dest_states_nl[i] == NULL && err != REG_NOERROR, 0))
+ goto out_free;
+ }
+ else
+ {
+ dest_states_word[i] = dest_states[i];
+ dest_states_nl[i] = dest_states[i];
+ }
+ bitset_merge (acceptable, dests_ch[i]);
+ }
+
+ if (!BE (need_word_trtable, 0))
+ {
+ /* We don't care about whether the following character is a word
+ character, or we are in a single-byte character set so we can
+ discern by looking at the character code: allocate a
+ 256-entry transition table. */
+ trtable = state->trtable =
+ (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), SBC_MAX);
+ if (BE (trtable == NULL, 0))
+ goto out_free;
+
+ /* For all characters ch...: */
+ for (i = 0; i < BITSET_WORDS; ++i)
+ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+ elem;
+ mask <<= 1, elem >>= 1, ++ch)
+ if (BE (elem & 1, 0))
+ {
+ /* There must be exactly one destination which accepts
+ character ch. See group_nodes_into_DFAstates. */
+ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+ ;
+
+ /* j-th destination accepts the word character ch. */
+ if (dfa->word_char[i] & mask)
+ trtable[ch] = dest_states_word[j];
+ else
+ trtable[ch] = dest_states[j];
+ }
+ }
+ else
+ {
+ /* We care about whether the following character is a word
+ character, and we are in a multi-byte character set: discern
+ by looking at the character code: build two 256-entry
+ transition tables, one starting at trtable[0] and one
+ starting at trtable[SBC_MAX]. */
+ trtable = state->word_trtable =
+ (re_dfastate_t **) calloc (sizeof (re_dfastate_t *), 2 * SBC_MAX);
+ if (BE (trtable == NULL, 0))
+ goto out_free;
+
+ /* For all characters ch...: */
+ for (i = 0; i < BITSET_WORDS; ++i)
+ for (ch = i * BITSET_WORD_BITS, elem = acceptable[i], mask = 1;
+ elem;
+ mask <<= 1, elem >>= 1, ++ch)
+ if (BE (elem & 1, 0))
+ {
+ /* There must be exactly one destination which accepts
+ character ch. See group_nodes_into_DFAstates. */
+ for (j = 0; (dests_ch[j][i] & mask) == 0; ++j)
+ ;
+
+ /* j-th destination accepts the word character ch. */
+ trtable[ch] = dest_states[j];
+ trtable[ch + SBC_MAX] = dest_states_word[j];
+ }
+ }
+
+ /* new line */
+ if (bitset_contain (acceptable, NEWLINE_CHAR))
+ {
+ /* The current state accepts newline character. */
+ for (j = 0; j < ndests; ++j)
+ if (bitset_contain (dests_ch[j], NEWLINE_CHAR))
+ {
+ /* k-th destination accepts newline character. */
+ trtable[NEWLINE_CHAR] = dest_states_nl[j];
+ if (need_word_trtable)
+ trtable[NEWLINE_CHAR + SBC_MAX] = dest_states_nl[j];
+ /* There must be only one destination which accepts
+ newline. See group_nodes_into_DFAstates. */
+ break;
+ }
+ }
+
+ if (dest_states_malloced)
+ free (dest_states);
+
+ re_node_set_free (&follows);
+ for (i = 0; i < ndests; ++i)
+ re_node_set_free (dests_node + i);
+
+ if (dests_node_malloced)
+ free (dests_alloc);
+
+ return true;
+}
+
+/* Group all nodes belonging to STATE into several destinations.
+ Then for all destinations, set the nodes belonging to the destination
+ to DESTS_NODE[i] and set the characters accepted by the destination
+ to DEST_CH[i]. This function return the number of destinations. */
+
+static Idx
+internal_function
+group_nodes_into_DFAstates (const re_dfa_t *dfa, const re_dfastate_t *state,
+ re_node_set *dests_node, bitset_t *dests_ch)
+{
+ reg_errcode_t err;
+ bool ok;
+ Idx i, j, k;
+ Idx ndests; /* Number of the destinations from `state'. */
+ bitset_t accepts; /* Characters a node can accept. */
+ const re_node_set *cur_nodes = &state->nodes;
+ bitset_empty (accepts);
+ ndests = 0;
+
+ /* For all the nodes belonging to `state', */
+ for (i = 0; i < cur_nodes->nelem; ++i)
+ {
+ re_token_t *node = &dfa->nodes[cur_nodes->elems[i]];
+ re_token_type_t type = node->type;
+ unsigned int constraint = node->constraint;
+
+ /* Enumerate all single byte character this node can accept. */
+ if (type == CHARACTER)
+ bitset_set (accepts, node->opr.c);
+ else if (type == SIMPLE_BRACKET)
+ {
+ bitset_merge (accepts, node->opr.sbcset);
+ }
+ else if (type == OP_PERIOD)
+ {
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ bitset_merge (accepts, dfa->sb_char);
+ else
+#endif
+ bitset_set_all (accepts);
+ if (!(dfa->syntax & RE_DOT_NEWLINE))
+ bitset_clear (accepts, '\n');
+ if (dfa->syntax & RE_DOT_NOT_NULL)
+ bitset_clear (accepts, '\0');
+ }
+#ifdef RE_ENABLE_I18N
+ else if (type == OP_UTF8_PERIOD)
+ {
+ if (ASCII_CHARS % BITSET_WORD_BITS == 0)
+ memset (accepts, -1, ASCII_CHARS / CHAR_BIT);
+ else
+ bitset_merge (accepts, utf8_sb_map);
+ if (!(dfa->syntax & RE_DOT_NEWLINE))
+ bitset_clear (accepts, '\n');
+ if (dfa->syntax & RE_DOT_NOT_NULL)
+ bitset_clear (accepts, '\0');
+ }
+#endif
+ else
+ continue;
+
+ /* Check the `accepts' and sift the characters which are not
+ match it the context. */
+ if (constraint)
+ {
+ if (constraint & NEXT_NEWLINE_CONSTRAINT)
+ {
+ bool accepts_newline = bitset_contain (accepts, NEWLINE_CHAR);
+ bitset_empty (accepts);
+ if (accepts_newline)
+ bitset_set (accepts, NEWLINE_CHAR);
+ else
+ continue;
+ }
+ if (constraint & NEXT_ENDBUF_CONSTRAINT)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+
+ if (constraint & NEXT_WORD_CONSTRAINT)
+ {
+ bitset_word_t any_set = 0;
+ if (type == CHARACTER && !node->word_char)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= (dfa->word_char[j] | ~dfa->sb_char[j]));
+ else
+#endif
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= dfa->word_char[j]);
+ if (!any_set)
+ continue;
+ }
+ if (constraint & NEXT_NOTWORD_CONSTRAINT)
+ {
+ bitset_word_t any_set = 0;
+ if (type == CHARACTER && node->word_char)
+ {
+ bitset_empty (accepts);
+ continue;
+ }
+#ifdef RE_ENABLE_I18N
+ if (dfa->mb_cur_max > 1)
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~(dfa->word_char[j] & dfa->sb_char[j]));
+ else
+#endif
+ for (j = 0; j < BITSET_WORDS; ++j)
+ any_set |= (accepts[j] &= ~dfa->word_char[j]);
+ if (!any_set)
+ continue;
+ }
+ }
+
+ /* Then divide `accepts' into DFA states, or create a new
+ state. Above, we make sure that accepts is not empty. */
+ for (j = 0; j < ndests; ++j)
+ {
+ bitset_t intersec; /* Intersection sets, see below. */
+ bitset_t remains;
+ /* Flags, see below. */
+ bitset_word_t has_intersec, not_subset, not_consumed;
+
+ /* Optimization, skip if this state doesn't accept the character. */
+ if (type == CHARACTER && !bitset_contain (dests_ch[j], node->opr.c))
+ continue;
+
+ /* Enumerate the intersection set of this state and `accepts'. */
+ has_intersec = 0;
+ for (k = 0; k < BITSET_WORDS; ++k)
+ has_intersec |= intersec[k] = accepts[k] & dests_ch[j][k];
+ /* And skip if the intersection set is empty. */
+ if (!has_intersec)
+ continue;
+
+ /* Then check if this state is a subset of `accepts'. */
+ not_subset = not_consumed = 0;
+ for (k = 0; k < BITSET_WORDS; ++k)
+ {
+ not_subset |= remains[k] = ~accepts[k] & dests_ch[j][k];
+ not_consumed |= accepts[k] = accepts[k] & ~dests_ch[j][k];
+ }
+
+ /* If this state isn't a subset of `accepts', create a
+ new group state, which has the `remains'. */
+ if (not_subset)
+ {
+ bitset_copy (dests_ch[ndests], remains);
+ bitset_copy (dests_ch[j], intersec);
+ err = re_node_set_init_copy (dests_node + ndests, &dests_node[j]);
+ if (BE (err != REG_NOERROR, 0))
+ goto error_return;
+ ++ndests;
+ }
+
+ /* Put the position in the current group. */
+ ok = re_node_set_insert (&dests_node[j], cur_nodes->elems[i]);
+ if (BE (! ok, 0))
+ goto error_return;
+
+ /* If all characters are consumed, go to next node. */
+ if (!not_consumed)
+ break;
+ }
+ /* Some characters remain, create a new group. */
+ if (j == ndests)
+ {
+ bitset_copy (dests_ch[ndests], accepts);
+ err = re_node_set_init_1 (dests_node + ndests, cur_nodes->elems[i]);
+ if (BE (err != REG_NOERROR, 0))
+ goto error_return;
+ ++ndests;
+ bitset_empty (accepts);
+ }
+ }
+ return ndests;
+ error_return:
+ for (j = 0; j < ndests; ++j)
+ re_node_set_free (dests_node + j);
+ return REG_MISSING;
+}
+
+#ifdef RE_ENABLE_I18N
+/* Check how many bytes the node `dfa->nodes[node_idx]' accepts.
+ Return the number of the bytes the node accepts.
+ STR_IDX is the current index of the input string.
+
+ This function handles the nodes which can accept one character, or
+ one collating element like '.', '[a-z]', opposite to the other nodes
+ can only accept one byte. */
+
+static int
+internal_function
+check_node_accept_bytes (const re_dfa_t *dfa, Idx node_idx,
+ const re_string_t *input, Idx str_idx)
+{
+ const re_token_t *node = dfa->nodes + node_idx;
+ int char_len, elem_len;
+ Idx i;
+
+ if (BE (node->type == OP_UTF8_PERIOD, 0))
+ {
+ unsigned char c = re_string_byte_at (input, str_idx), d;
+ if (BE (c < 0xc2, 1))
+ return 0;
+
+ if (str_idx + 2 > input->len)
+ return 0;
+
+ d = re_string_byte_at (input, str_idx + 1);
+ if (c < 0xe0)
+ return (d < 0x80 || d > 0xbf) ? 0 : 2;
+ else if (c < 0xf0)
+ {
+ char_len = 3;
+ if (c == 0xe0 && d < 0xa0)
+ return 0;
+ }
+ else if (c < 0xf8)
+ {
+ char_len = 4;
+ if (c == 0xf0 && d < 0x90)
+ return 0;
+ }
+ else if (c < 0xfc)
+ {
+ char_len = 5;
+ if (c == 0xf8 && d < 0x88)
+ return 0;
+ }
+ else if (c < 0xfe)
+ {
+ char_len = 6;
+ if (c == 0xfc && d < 0x84)
+ return 0;
+ }
+ else
+ return 0;
+
+ if (str_idx + char_len > input->len)
+ return 0;
+
+ for (i = 1; i < char_len; ++i)
+ {
+ d = re_string_byte_at (input, str_idx + i);
+ if (d < 0x80 || d > 0xbf)
+ return 0;
+ }
+ return char_len;
+ }
+
+ char_len = re_string_char_size_at (input, str_idx);
+ if (node->type == OP_PERIOD)
+ {
+ if (char_len <= 1)
+ return 0;
+ /* FIXME: I don't think this if is needed, as both '\n'
+ and '\0' are char_len == 1. */
+ /* '.' accepts any one character except the following two cases. */
+ if ((!(dfa->syntax & RE_DOT_NEWLINE) &&
+ re_string_byte_at (input, str_idx) == '\n') ||
+ ((dfa->syntax & RE_DOT_NOT_NULL) &&
+ re_string_byte_at (input, str_idx) == '\0'))
+ return 0;
+ return char_len;
+ }
+
+ elem_len = re_string_elem_size_at (input, str_idx);
+ if ((elem_len <= 1 && char_len <= 1) || char_len == 0)
+ return 0;
+
+ if (node->type == COMPLEX_BRACKET)
+ {
+ const re_charset_t *cset = node->opr.mbcset;
+# ifdef _LIBC
+ const unsigned char *pin
+ = ((const unsigned char *) re_string_get_buffer (input) + str_idx);
+ Idx j;
+ uint32_t nrules;
+# endif /* _LIBC */
+ int match_len = 0;
+ wchar_t wc = ((cset->nranges || cset->nchar_classes || cset->nmbchars)
+ ? re_string_wchar_at (input, str_idx) : 0);
+
+ /* match with multibyte character? */
+ for (i = 0; i < cset->nmbchars; ++i)
+ if (wc == cset->mbchars[i])
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ /* match with character_class? */
+ for (i = 0; i < cset->nchar_classes; ++i)
+ {
+ wctype_t wt = cset->char_classes[i];
+ if (__iswctype (wc, wt))
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+
+# ifdef _LIBC
+ nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules != 0)
+ {
+ unsigned int in_collseq = 0;
+ const int32_t *table, *indirect;
+ const unsigned char *weights, *extra;
+ const char *collseqwc;
+ int32_t idx;
+ /* This #include defines a local function! */
+# include <locale/weight.h>
+
+ /* match with collating_symbol? */
+ if (cset->ncoll_syms)
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+ for (i = 0; i < cset->ncoll_syms; ++i)
+ {
+ const unsigned char *coll_sym = extra + cset->coll_syms[i];
+ /* Compare the length of input collating element and
+ the length of current collating element. */
+ if (*coll_sym != elem_len)
+ continue;
+ /* Compare each bytes. */
+ for (j = 0; j < *coll_sym; j++)
+ if (pin[j] != coll_sym[1 + j])
+ break;
+ if (j == *coll_sym)
+ {
+ /* Match if every bytes is equal. */
+ match_len = j;
+ goto check_node_accept_bytes_match;
+ }
+ }
+
+ if (cset->nranges)
+ {
+ if (elem_len <= char_len)
+ {
+ collseqwc = _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQWC);
+ in_collseq = __collseq_table_lookup (collseqwc, wc);
+ }
+ else
+ in_collseq = find_collation_sequence_value (pin, elem_len);
+ }
+ /* match with range expression? */
+ for (i = 0; i < cset->nranges; ++i)
+ if (cset->range_starts[i] <= in_collseq
+ && in_collseq <= cset->range_ends[i])
+ {
+ match_len = elem_len;
+ goto check_node_accept_bytes_match;
+ }
+
+ /* match with equivalence_class? */
+ if (cset->nequiv_classes)
+ {
+ const unsigned char *cp = pin;
+ table = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_TABLEMB);
+ weights = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_WEIGHTMB);
+ extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_EXTRAMB);
+ indirect = (const int32_t *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_INDIRECTMB);
+ int32_t idx = findidx (&cp);
+ if (idx > 0)
+ for (i = 0; i < cset->nequiv_classes; ++i)
+ {
+ int32_t equiv_class_idx = cset->equiv_classes[i];
+ size_t weight_len = weights[idx & 0xffffff];
+ if (weight_len == weights[equiv_class_idx & 0xffffff]
+ && (idx >> 24) == (equiv_class_idx >> 24))
+ {
+ Idx cnt = 0;
+
+ idx &= 0xffffff;
+ equiv_class_idx &= 0xffffff;
+
+ while (cnt <= weight_len
+ && (weights[equiv_class_idx + 1 + cnt]
+ == weights[idx + 1 + cnt]))
+ ++cnt;
+ if (cnt > weight_len)
+ {
+ match_len = elem_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+ }
+ }
+ }
+ else
+# endif /* _LIBC */
+ {
+ /* match with range expression? */
+#if __GNUC__ >= 2 && ! (__STDC_VERSION__ < 199901L && __STRICT_ANSI__)
+ wchar_t cmp_buf[] = {L'\0', L'\0', wc, L'\0', L'\0', L'\0'};
+#else
+ wchar_t cmp_buf[] = {L'\0', L'\0', L'\0', L'\0', L'\0', L'\0'};
+ cmp_buf[2] = wc;
+#endif
+ for (i = 0; i < cset->nranges; ++i)
+ {
+ cmp_buf[0] = cset->range_starts[i];
+ cmp_buf[4] = cset->range_ends[i];
+ if (wcscoll (cmp_buf, cmp_buf + 2) <= 0
+ && wcscoll (cmp_buf + 2, cmp_buf + 4) <= 0)
+ {
+ match_len = char_len;
+ goto check_node_accept_bytes_match;
+ }
+ }
+ }
+ check_node_accept_bytes_match:
+ if (!cset->non_match)
+ return match_len;
+ else
+ {
+ if (match_len > 0)
+ return 0;
+ else
+ return (elem_len > char_len) ? elem_len : char_len;
+ }
+ }
+ return 0;
+}
+
+# ifdef _LIBC
+static unsigned int
+internal_function
+find_collation_sequence_value (const unsigned char *mbs, size_t mbs_len)
+{
+ uint32_t nrules = _NL_CURRENT_WORD (LC_COLLATE, _NL_COLLATE_NRULES);
+ if (nrules == 0)
+ {
+ if (mbs_len == 1)
+ {
+ /* No valid character. Match it as a single byte character. */
+ const unsigned char *collseq = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_COLLSEQMB);
+ return collseq[mbs[0]];
+ }
+ return UINT_MAX;
+ }
+ else
+ {
+ int32_t idx;
+ const unsigned char *extra = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB);
+ int32_t extrasize = (const unsigned char *)
+ _NL_CURRENT (LC_COLLATE, _NL_COLLATE_SYMB_EXTRAMB + 1) - extra;
+
+ for (idx = 0; idx < extrasize;)
+ {
+ int mbs_cnt;
+ bool found = false;
+ int32_t elem_mbs_len;
+ /* Skip the name of collating element name. */
+ idx = idx + extra[idx] + 1;
+ elem_mbs_len = extra[idx++];
+ if (mbs_len == elem_mbs_len)
+ {
+ for (mbs_cnt = 0; mbs_cnt < elem_mbs_len; ++mbs_cnt)
+ if (extra[idx + mbs_cnt] != mbs[mbs_cnt])
+ break;
+ if (mbs_cnt == elem_mbs_len)
+ /* Found the entry. */
+ found = true;
+ }
+ /* Skip the byte sequence of the collating element. */
+ idx += elem_mbs_len;
+ /* Adjust for the alignment. */
+ idx = (idx + 3) & ~3;
+ /* Skip the collation sequence value. */
+ idx += sizeof (uint32_t);
+ /* Skip the wide char sequence of the collating element. */
+ idx = idx + sizeof (uint32_t) * (extra[idx] + 1);
+ /* If we found the entry, return the sequence value. */
+ if (found)
+ return *(uint32_t *) (extra + idx);
+ /* Skip the collation sequence value. */
+ idx += sizeof (uint32_t);
+ }
+ return UINT_MAX;
+ }
+}
+# endif /* _LIBC */
+#endif /* RE_ENABLE_I18N */
+
+/* Check whether the node accepts the byte which is IDX-th
+ byte of the INPUT. */
+
+static bool
+internal_function
+check_node_accept (const re_match_context_t *mctx, const re_token_t *node,
+ Idx idx)
+{
+ unsigned char ch;
+ ch = re_string_byte_at (&mctx->input, idx);
+ switch (node->type)
+ {
+ case CHARACTER:
+ if (node->opr.c != ch)
+ return false;
+ break;
+
+ case SIMPLE_BRACKET:
+ if (!bitset_contain (node->opr.sbcset, ch))
+ return false;
+ break;
+
+#ifdef RE_ENABLE_I18N
+ case OP_UTF8_PERIOD:
+ if (ch >= ASCII_CHARS)
+ return false;
+ /* FALLTHROUGH */
+#endif
+ case OP_PERIOD:
+ if ((ch == '\n' && !(mctx->dfa->syntax & RE_DOT_NEWLINE))
+ || (ch == '\0' && (mctx->dfa->syntax & RE_DOT_NOT_NULL)))
+ return false;
+ break;
+
+ default:
+ return false;
+ }
+
+ if (node->constraint)
+ {
+ /* The node has constraints. Check whether the current context
+ satisfies the constraints. */
+ unsigned int context = re_string_context_at (&mctx->input, idx,
+ mctx->eflags);
+ if (NOT_SATISFY_NEXT_CONSTRAINT (node->constraint, context))
+ return false;
+ }
+
+ return true;
+}
+
+/* Extend the buffers, if the buffers have run out. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+extend_buffers (re_match_context_t *mctx)
+{
+ reg_errcode_t ret;
+ re_string_t *pstr = &mctx->input;
+
+ /* Avoid overflow. */
+ if (BE (SIZE_MAX / 2 / sizeof (re_dfastate_t *) <= pstr->bufs_len, 0))
+ return REG_ESPACE;
+
+ /* Double the lengthes of the buffers. */
+ ret = re_string_realloc_buffers (pstr, pstr->bufs_len * 2);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+
+ if (mctx->state_log != NULL)
+ {
+ /* And double the length of state_log. */
+ /* XXX We have no indication of the size of this buffer. If this
+ allocation fail we have no indication that the state_log array
+ does not have the right size. */
+ re_dfastate_t **new_array = re_realloc (mctx->state_log, re_dfastate_t *,
+ pstr->bufs_len + 1);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ mctx->state_log = new_array;
+ }
+
+ /* Then reconstruct the buffers. */
+ if (pstr->icase)
+ {
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ {
+ ret = build_wcs_upper_buffer (pstr);
+ if (BE (ret != REG_NOERROR, 0))
+ return ret;
+ }
+ else
+#endif /* RE_ENABLE_I18N */
+ build_upper_buffer (pstr);
+ }
+ else
+ {
+#ifdef RE_ENABLE_I18N
+ if (pstr->mb_cur_max > 1)
+ build_wcs_buffer (pstr);
+ else
+#endif /* RE_ENABLE_I18N */
+ {
+ if (pstr->trans != NULL)
+ re_string_translate_buffer (pstr);
+ }
+ }
+ return REG_NOERROR;
+}
+
+
+/* Functions for matching context. */
+
+/* Initialize MCTX. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_init (re_match_context_t *mctx, int eflags, Idx n)
+{
+ mctx->eflags = eflags;
+ mctx->match_last = REG_MISSING;
+ if (n > 0)
+ {
+ /* Avoid overflow. */
+ size_t max_object_size =
+ MAX (sizeof (struct re_backref_cache_entry),
+ sizeof (re_sub_match_top_t *));
+ if (BE (SIZE_MAX / max_object_size < n, 0))
+ return REG_ESPACE;
+
+ mctx->bkref_ents = re_malloc (struct re_backref_cache_entry, n);
+ mctx->sub_tops = re_malloc (re_sub_match_top_t *, n);
+ if (BE (mctx->bkref_ents == NULL || mctx->sub_tops == NULL, 0))
+ return REG_ESPACE;
+ }
+ /* Already zero-ed by the caller.
+ else
+ mctx->bkref_ents = NULL;
+ mctx->nbkref_ents = 0;
+ mctx->nsub_tops = 0; */
+ mctx->abkref_ents = n;
+ mctx->max_mb_elem_len = 1;
+ mctx->asub_tops = n;
+ return REG_NOERROR;
+}
+
+/* Clean the entries which depend on the current input in MCTX.
+ This function must be invoked when the matcher changes the start index
+ of the input, or changes the input string. */
+
+static void
+internal_function
+match_ctx_clean (re_match_context_t *mctx)
+{
+ Idx st_idx;
+ for (st_idx = 0; st_idx < mctx->nsub_tops; ++st_idx)
+ {
+ Idx sl_idx;
+ re_sub_match_top_t *top = mctx->sub_tops[st_idx];
+ for (sl_idx = 0; sl_idx < top->nlasts; ++sl_idx)
+ {
+ re_sub_match_last_t *last = top->lasts[sl_idx];
+ re_free (last->path.array);
+ re_free (last);
+ }
+ re_free (top->lasts);
+ if (top->path)
+ {
+ re_free (top->path->array);
+ re_free (top->path);
+ }
+ free (top);
+ }
+
+ mctx->nsub_tops = 0;
+ mctx->nbkref_ents = 0;
+}
+
+/* Free all the memory associated with MCTX. */
+
+static void
+internal_function
+match_ctx_free (re_match_context_t *mctx)
+{
+ /* First, free all the memory associated with MCTX->SUB_TOPS. */
+ match_ctx_clean (mctx);
+ re_free (mctx->sub_tops);
+ re_free (mctx->bkref_ents);
+}
+
+/* Add a new backreference entry to MCTX.
+ Note that we assume that caller never call this function with duplicate
+ entry, and call with STR_IDX which isn't smaller than any existing entry.
+*/
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_entry (re_match_context_t *mctx, Idx node, Idx str_idx, Idx from,
+ Idx to)
+{
+ if (mctx->nbkref_ents >= mctx->abkref_ents)
+ {
+ struct re_backref_cache_entry* new_entry;
+ new_entry = re_realloc (mctx->bkref_ents, struct re_backref_cache_entry,
+ mctx->abkref_ents * 2);
+ if (BE (new_entry == NULL, 0))
+ {
+ re_free (mctx->bkref_ents);
+ return REG_ESPACE;
+ }
+ mctx->bkref_ents = new_entry;
+ memset (mctx->bkref_ents + mctx->nbkref_ents, '\0',
+ sizeof (struct re_backref_cache_entry) * mctx->abkref_ents);
+ mctx->abkref_ents *= 2;
+ }
+ if (mctx->nbkref_ents > 0
+ && mctx->bkref_ents[mctx->nbkref_ents - 1].str_idx == str_idx)
+ mctx->bkref_ents[mctx->nbkref_ents - 1].more = 1;
+
+ mctx->bkref_ents[mctx->nbkref_ents].node = node;
+ mctx->bkref_ents[mctx->nbkref_ents].str_idx = str_idx;
+ mctx->bkref_ents[mctx->nbkref_ents].subexp_from = from;
+ mctx->bkref_ents[mctx->nbkref_ents].subexp_to = to;
+
+ /* This is a cache that saves negative results of check_dst_limits_calc_pos.
+ If bit N is clear, means that this entry won't epsilon-transition to
+ an OP_OPEN_SUBEXP or OP_CLOSE_SUBEXP for the N+1-th subexpression. If
+ it is set, check_dst_limits_calc_pos_1 will recurse and try to find one
+ such node.
+
+ A backreference does not epsilon-transition unless it is empty, so set
+ to all zeros if FROM != TO. */
+ mctx->bkref_ents[mctx->nbkref_ents].eps_reachable_subexps_map
+ = (from == to ? -1 : 0);
+
+ mctx->bkref_ents[mctx->nbkref_ents++].more = 0;
+ if (mctx->max_mb_elem_len < to - from)
+ mctx->max_mb_elem_len = to - from;
+ return REG_NOERROR;
+}
+
+/* Return the first entry with the same str_idx, or REG_MISSING if none is
+ found. Note that MCTX->BKREF_ENTS is already sorted by MCTX->STR_IDX. */
+
+static Idx
+internal_function
+search_cur_bkref_entry (const re_match_context_t *mctx, Idx str_idx)
+{
+ Idx left, right, mid, last;
+ last = right = mctx->nbkref_ents;
+ for (left = 0; left < right;)
+ {
+ mid = (left + right) / 2;
+ if (mctx->bkref_ents[mid].str_idx < str_idx)
+ left = mid + 1;
+ else
+ right = mid;
+ }
+ if (left < last && mctx->bkref_ents[left].str_idx == str_idx)
+ return left;
+ else
+ return REG_MISSING;
+}
+
+/* Register the node NODE, whose type is OP_OPEN_SUBEXP, and which matches
+ at STR_IDX. */
+
+static reg_errcode_t
+internal_function __attribute_warn_unused_result__
+match_ctx_add_subtop (re_match_context_t *mctx, Idx node, Idx str_idx)
+{
+#ifdef DEBUG
+ assert (mctx->sub_tops != NULL);
+ assert (mctx->asub_tops > 0);
+#endif
+ if (BE (mctx->nsub_tops == mctx->asub_tops, 0))
+ {
+ Idx new_asub_tops = mctx->asub_tops * 2;
+ re_sub_match_top_t **new_array = re_realloc (mctx->sub_tops,
+ re_sub_match_top_t *,
+ new_asub_tops);
+ if (BE (new_array == NULL, 0))
+ return REG_ESPACE;
+ mctx->sub_tops = new_array;
+ mctx->asub_tops = new_asub_tops;
+ }
+ mctx->sub_tops[mctx->nsub_tops] = calloc (1, sizeof (re_sub_match_top_t));
+ if (BE (mctx->sub_tops[mctx->nsub_tops] == NULL, 0))
+ return REG_ESPACE;
+ mctx->sub_tops[mctx->nsub_tops]->node = node;
+ mctx->sub_tops[mctx->nsub_tops++]->str_idx = str_idx;
+ return REG_NOERROR;
+}
+
+/* Register the node NODE, whose type is OP_CLOSE_SUBEXP, and which matches
+ at STR_IDX, whose corresponding OP_OPEN_SUBEXP is SUB_TOP. */
+
+static re_sub_match_last_t *
+internal_function
+match_ctx_add_sublast (re_sub_match_top_t *subtop, Idx node, Idx str_idx)
+{
+ re_sub_match_last_t *new_entry;
+ if (BE (subtop->nlasts == subtop->alasts, 0))
+ {
+ Idx new_alasts = 2 * subtop->alasts + 1;
+ re_sub_match_last_t **new_array = re_realloc (subtop->lasts,
+ re_sub_match_last_t *,
+ new_alasts);
+ if (BE (new_array == NULL, 0))
+ return NULL;
+ subtop->lasts = new_array;
+ subtop->alasts = new_alasts;
+ }
+ new_entry = calloc (1, sizeof (re_sub_match_last_t));
+ if (BE (new_entry != NULL, 1))
+ {
+ subtop->lasts[subtop->nlasts] = new_entry;
+ new_entry->node = node;
+ new_entry->str_idx = str_idx;
+ ++subtop->nlasts;
+ }
+ return new_entry;
+}
+
+static void
+internal_function
+sift_ctx_init (re_sift_context_t *sctx, re_dfastate_t **sifted_sts,
+ re_dfastate_t **limited_sts, Idx last_node, Idx last_str_idx)
+{
+ sctx->sifted_states = sifted_sts;
+ sctx->limited_states = limited_sts;
+ sctx->last_node = last_node;
+ sctx->last_str_idx = last_str_idx;
+ re_node_set_init_empty (&sctx->limits);
+}
diff --git a/gnu/rename.c b/gnu/rename.c
new file mode 100755
index 00000000..ca3a6696
--- /dev/null
+++ b/gnu/rename.c
@@ -0,0 +1,473 @@
+/* Work around rename bugs in some systems.
+
+ Copyright (C) 2001-2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Volker Borchert, Eric Blake. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#undef rename
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* The mingw rename has problems with trailing slashes; it also
+ requires use of native Windows calls to allow atomic renames over
+ existing files. */
+
+# include <errno.h>
+# include <stdbool.h>
+# include <stdlib.h>
+# include <sys/stat.h>
+# include <unistd.h>
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+# include "dirname.h"
+
+/* Rename the file SRC to DST. This replacement is necessary on
+ Windows, on which the system rename function will not replace
+ an existing DST. */
+int
+rpl_rename (char const *src, char const *dst)
+{
+ int error;
+ size_t src_len = strlen (src);
+ size_t dst_len = strlen (dst);
+ char *src_base = last_component (src);
+ char *dst_base = last_component (dst);
+ bool src_slash;
+ bool dst_slash;
+ bool dst_exists;
+ struct stat src_st;
+ struct stat dst_st;
+
+ /* Filter out dot as last component. */
+ if (!src_len || !dst_len)
+ {
+ errno = ENOENT;
+ return -1;
+ }
+ if (*src_base == '.')
+ {
+ size_t len = base_len (src_base);
+ if (len == 1 || (len == 2 && src_base[1] == '.'))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ }
+ if (*dst_base == '.')
+ {
+ size_t len = base_len (dst_base);
+ if (len == 1 || (len == 2 && dst_base[1] == '.'))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ }
+
+ /* Presence of a trailing slash requires directory semantics. If
+ the source does not exist, or if the destination cannot be turned
+ into a directory, give up now. Otherwise, strip trailing slashes
+ before calling rename. There are no symlinks on mingw, so stat
+ works instead of lstat. */
+ src_slash = ISSLASH (src[src_len - 1]);
+ dst_slash = ISSLASH (dst[dst_len - 1]);
+ if (stat (src, &src_st))
+ return -1;
+ if (stat (dst, &dst_st))
+ {
+ if (errno != ENOENT || (!S_ISDIR (src_st.st_mode) && dst_slash))
+ return -1;
+ dst_exists = false;
+ }
+ else
+ {
+ if (S_ISDIR (dst_st.st_mode) != S_ISDIR (src_st.st_mode))
+ {
+ errno = S_ISDIR (dst_st.st_mode) ? EISDIR : ENOTDIR;
+ return -1;
+ }
+ dst_exists = true;
+ }
+
+ /* There are no symlinks, so if a file existed with a trailing
+ slash, it must be a directory, and we don't have to worry about
+ stripping strip trailing slash. However, mingw refuses to
+ replace an existing empty directory, so we have to help it out.
+ And canonicalize_file_name is not yet ported to mingw; however,
+ for directories, getcwd works as a viable alternative. Ensure
+ that we can get back to where we started before using it; later
+ attempts to return are fatal. Note that we can end up losing a
+ directory if rename then fails, but it was empty, so not much
+ damage was done. */
+ if (dst_exists && S_ISDIR (dst_st.st_mode))
+ {
+ char *cwd = getcwd (NULL, 0);
+ char *src_temp;
+ char *dst_temp;
+ if (!cwd || chdir (cwd))
+ return -1;
+ if (IS_ABSOLUTE_FILE_NAME (src))
+ {
+ dst_temp = chdir (dst) ? NULL : getcwd (NULL, 0);
+ src_temp = chdir (src) ? NULL : getcwd (NULL, 0);
+ }
+ else
+ {
+ src_temp = chdir (src) ? NULL : getcwd (NULL, 0);
+ if (!IS_ABSOLUTE_FILE_NAME (dst) && chdir (cwd))
+ abort ();
+ dst_temp = chdir (dst) ? NULL : getcwd (NULL, 0);
+ }
+ if (chdir (cwd))
+ abort ();
+ free (cwd);
+ if (!src_temp || !dst_temp)
+ {
+ free (src_temp);
+ free (dst_temp);
+ errno = ENOMEM;
+ return -1;
+ }
+ src_len = strlen (src_temp);
+ if (strncmp (src_temp, dst_temp, src_len) == 0
+ && (ISSLASH (dst_temp[src_len]) || dst_temp[src_len] == '\0'))
+ {
+ error = dst_temp[src_len];
+ free (src_temp);
+ free (dst_temp);
+ if (error)
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ return 0;
+ }
+ if (rmdir (dst))
+ {
+ error = errno;
+ free (src_temp);
+ free (dst_temp);
+ errno = error;
+ return -1;
+ }
+ free (src_temp);
+ free (dst_temp);
+ }
+
+ /* MoveFileEx works if SRC is a directory without any flags, but
+ fails with MOVEFILE_REPLACE_EXISTING, so try without flags first.
+ Thankfully, MoveFileEx handles hard links correctly, even though
+ rename() does not. */
+ if (MoveFileEx (src, dst, 0))
+ return 0;
+
+ /* Retry with MOVEFILE_REPLACE_EXISTING if the move failed
+ due to the destination already existing. */
+ error = GetLastError ();
+ if (error == ERROR_FILE_EXISTS || error == ERROR_ALREADY_EXISTS)
+ {
+ if (MoveFileEx (src, dst, MOVEFILE_REPLACE_EXISTING))
+ return 0;
+
+ error = GetLastError ();
+ }
+
+ switch (error)
+ {
+ case ERROR_FILE_NOT_FOUND:
+ case ERROR_PATH_NOT_FOUND:
+ case ERROR_BAD_PATHNAME:
+ case ERROR_DIRECTORY:
+ errno = ENOENT;
+ break;
+
+ case ERROR_ACCESS_DENIED:
+ case ERROR_SHARING_VIOLATION:
+ errno = EACCES;
+ break;
+
+ case ERROR_OUTOFMEMORY:
+ errno = ENOMEM;
+ break;
+
+ case ERROR_CURRENT_DIRECTORY:
+ errno = EBUSY;
+ break;
+
+ case ERROR_NOT_SAME_DEVICE:
+ errno = EXDEV;
+ break;
+
+ case ERROR_WRITE_PROTECT:
+ errno = EROFS;
+ break;
+
+ case ERROR_WRITE_FAULT:
+ case ERROR_READ_FAULT:
+ case ERROR_GEN_FAILURE:
+ errno = EIO;
+ break;
+
+ case ERROR_HANDLE_DISK_FULL:
+ case ERROR_DISK_FULL:
+ case ERROR_DISK_TOO_FRAGMENTED:
+ errno = ENOSPC;
+ break;
+
+ case ERROR_FILE_EXISTS:
+ case ERROR_ALREADY_EXISTS:
+ errno = EEXIST;
+ break;
+
+ case ERROR_BUFFER_OVERFLOW:
+ case ERROR_FILENAME_EXCED_RANGE:
+ errno = ENAMETOOLONG;
+ break;
+
+ case ERROR_INVALID_NAME:
+ case ERROR_DELETE_PENDING:
+ errno = EPERM; /* ? */
+ break;
+
+# ifndef ERROR_FILE_TOO_LARGE
+/* This value is documented but not defined in all versions of windows.h. */
+# define ERROR_FILE_TOO_LARGE 223
+# endif
+ case ERROR_FILE_TOO_LARGE:
+ errno = EFBIG;
+ break;
+
+ default:
+ errno = EINVAL;
+ break;
+ }
+
+ return -1;
+}
+
+#else /* ! W32 platform */
+
+# include <errno.h>
+# include <stdio.h>
+# include <stdlib.h>
+# include <string.h>
+# include <sys/stat.h>
+# include <unistd.h>
+
+# include "dirname.h"
+# include "same-inode.h"
+
+/* Rename the file SRC to DST, fixing any trailing slash bugs. */
+
+int
+rpl_rename (char const *src, char const *dst)
+{
+ size_t src_len = strlen (src);
+ size_t dst_len = strlen (dst);
+ char *src_temp = (char *) src;
+ char *dst_temp = (char *) dst;
+ bool src_slash;
+ bool dst_slash;
+ bool dst_exists;
+ int ret_val = -1;
+ int rename_errno = ENOTDIR;
+ struct stat src_st;
+ struct stat dst_st;
+
+ if (!src_len || !dst_len)
+ return rename (src, dst); /* Let strace see the ENOENT failure. */
+
+# if RENAME_DEST_EXISTS_BUG
+ {
+ char *src_base = last_component (src);
+ char *dst_base = last_component (dst);
+ if (*src_base == '.')
+ {
+ size_t len = base_len (src_base);
+ if (len == 1 || (len == 2 && src_base[1] == '.'))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ }
+ if (*dst_base == '.')
+ {
+ size_t len = base_len (dst_base);
+ if (len == 1 || (len == 2 && dst_base[1] == '.'))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ }
+ }
+# endif /* RENAME_DEST_EXISTS_BUG */
+
+ src_slash = src[src_len - 1] == '/';
+ dst_slash = dst[dst_len - 1] == '/';
+
+# if !RENAME_HARD_LINK_BUG && !RENAME_DEST_EXISTS_BUG
+ /* If there are no trailing slashes, then trust the native
+ implementation unless we also suspect issues with hard link
+ detection or file/directory conflicts. */
+ if (!src_slash && !dst_slash)
+ return rename (src, dst);
+# endif /* !RENAME_HARD_LINK_BUG && !RENAME_DEST_EXISTS_BUG */
+
+ /* Presence of a trailing slash requires directory semantics. If
+ the source does not exist, or if the destination cannot be turned
+ into a directory, give up now. Otherwise, strip trailing slashes
+ before calling rename. */
+ if (lstat (src, &src_st))
+ return -1;
+ if (lstat (dst, &dst_st))
+ {
+ if (errno != ENOENT || (!S_ISDIR (src_st.st_mode) && dst_slash))
+ return -1;
+ dst_exists = false;
+ }
+ else
+ {
+ if (S_ISDIR (dst_st.st_mode) != S_ISDIR (src_st.st_mode))
+ {
+ errno = S_ISDIR (dst_st.st_mode) ? EISDIR : ENOTDIR;
+ return -1;
+ }
+# if RENAME_HARD_LINK_BUG
+ if (SAME_INODE (src_st, dst_st))
+ return 0;
+# endif /* RENAME_HARD_LINK_BUG */
+ dst_exists = true;
+ }
+
+# if (RENAME_TRAILING_SLASH_SOURCE_BUG || RENAME_DEST_EXISTS_BUG \
+ || RENAME_HARD_LINK_BUG)
+ /* If the only bug was that a trailing slash was allowed on a
+ non-existing file destination, as in Solaris 10, then we've
+ already covered that situation. But if there is any problem with
+ a trailing slash on an existing source or destination, as in
+ Solaris 9, or if a directory can overwrite a symlink, as on
+ Cygwin 1.5, or if directories cannot be created with trailing
+ slash, as on NetBSD 1.6, then we must strip the offending slash
+ and check that we have not encountered a symlink instead of a
+ directory.
+
+ Stripping a trailing slash interferes with POSIX semantics, where
+ rename behavior on a symlink with a trailing slash operates on
+ the corresponding target directory. We prefer the GNU semantics
+ of rejecting any use of a symlink with trailing slash, but do not
+ enforce them, since Solaris 10 is able to obey POSIX semantics
+ and there might be clients expecting it, as counter-intuitive as
+ those semantics are.
+
+ Technically, we could also follow the POSIX behavior by chasing a
+ readlink trail, but that is harder to implement. */
+ if (src_slash)
+ {
+ src_temp = strdup (src);
+ if (!src_temp)
+ {
+ /* Rather than rely on strdup-posix, we set errno ourselves. */
+ rename_errno = ENOMEM;
+ goto out;
+ }
+ strip_trailing_slashes (src_temp);
+ if (lstat (src_temp, &src_st))
+ {
+ rename_errno = errno;
+ goto out;
+ }
+ if (S_ISLNK (src_st.st_mode))
+ goto out;
+ }
+ if (dst_slash)
+ {
+ dst_temp = strdup (dst);
+ if (!dst_temp)
+ {
+ rename_errno = ENOMEM;
+ goto out;
+ }
+ strip_trailing_slashes (dst_temp);
+ if (lstat (dst_temp, &dst_st))
+ {
+ if (errno != ENOENT)
+ {
+ rename_errno = errno;
+ goto out;
+ }
+ }
+ else if (S_ISLNK (dst_st.st_mode))
+ goto out;
+ }
+# endif /* RENAME_TRAILING_SLASH_SOURCE_BUG || RENAME_DEST_EXISTS_BUG
+ || RENAME_HARD_LINK_BUG */
+
+# if RENAME_DEST_EXISTS_BUG
+ /* Cygwin 1.5 sometimes behaves oddly when moving a non-empty
+ directory on top of an empty one (the old directory name can
+ reappear if the new directory tree is removed). Work around this
+ by removing the target first, but don't remove the target if it
+ is a subdirectory of the source. Note that we can end up losing
+ a directory if rename then fails, but it was empty, so not much
+ damage was done. */
+ if (dst_exists && S_ISDIR (dst_st.st_mode))
+ {
+ if (src_st.st_dev != dst_st.st_dev)
+ {
+ rename_errno = EXDEV;
+ goto out;
+ }
+ if (src_temp != src)
+ free (src_temp);
+ src_temp = canonicalize_file_name (src);
+ if (dst_temp != dst)
+ free (dst_temp);
+ dst_temp = canonicalize_file_name (dst);
+ if (!src_temp || !dst_temp)
+ {
+ rename_errno = ENOMEM;
+ goto out;
+ }
+ src_len = strlen (src_temp);
+ if (strncmp (src_temp, dst_temp, src_len) == 0
+ && dst_temp[src_len] == '/')
+ {
+ rename_errno = EINVAL;
+ goto out;
+ }
+ if (rmdir (dst))
+ {
+ rename_errno = errno;
+ goto out;
+ }
+ }
+# endif /* RENAME_DEST_EXISTS_BUG */
+
+ ret_val = rename (src_temp, dst_temp);
+ rename_errno = errno;
+ out:
+ if (src_temp != src)
+ free (src_temp);
+ if (dst_temp != dst)
+ free (dst_temp);
+ errno = rename_errno;
+ return ret_val;
+}
+#endif /* ! W32 platform */
diff --git a/gnu/rmdir.c b/gnu/rmdir.c
new file mode 100755
index 00000000..36a61180
--- /dev/null
+++ b/gnu/rmdir.c
@@ -0,0 +1,99 @@
+/* Work around rmdir bugs.
+
+ Copyright (C) 1988, 1990, 1999, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <sys/types.h>
+
+#undef rmdir
+
+/* Remove directory DIR.
+ Return 0 if successful, -1 if not. */
+
+int
+rpl_rmdir (char const *dir)
+{
+#if HAVE_RMDIR
+ /* Work around cygwin 1.5.x bug where rmdir("dir/./") succeeds. */
+ size_t len = strlen (dir);
+ int result;
+ while (len && ISSLASH (dir[len - 1]))
+ len--;
+ if (len && dir[len - 1] == '.' && (1 == len || ISSLASH (dir[len - 2])))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ result = rmdir (dir);
+ /* Work around mingw bug, where rmdir("file/") fails with EINVAL
+ instead of ENOTDIR. We've already filtered out trailing ., the
+ only reason allowed by POSIX for EINVAL. */
+ if (result == -1 && errno == EINVAL)
+ errno = ENOTDIR;
+ return result;
+
+#else /* !HAVE_RMDIR */
+ /* rmdir adapted from GNU tar. FIXME: Delete this implementation in
+ 2010 if no one reports a system with missing rmdir. */
+ pid_t cpid;
+ int status;
+ struct stat statbuf;
+
+ if (stat (dir, &statbuf) != 0)
+ return -1; /* errno already set */
+
+ if (!S_ISDIR (statbuf.st_mode))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+
+ cpid = fork ();
+ switch (cpid)
+ {
+ case -1: /* cannot fork */
+ return -1; /* errno already set */
+
+ case 0: /* child process */
+ execl ("/bin/rmdir", "rmdir", dir, (char *) 0);
+ _exit (1);
+
+ default: /* parent process */
+
+ /* Wait for kid to finish. */
+
+ while (wait (&status) != cpid)
+ /* Do nothing. */ ;
+
+ if (status)
+ {
+
+ /* /bin/rmdir failed. */
+
+ errno = EIO;
+ return -1;
+ }
+ return 0;
+ }
+#endif /* !HAVE_RMDIR */
+}
diff --git a/gnu/same-inode.h b/gnu/same-inode.h
new file mode 100755
index 00000000..e978abbe
--- /dev/null
+++ b/gnu/same-inode.h
@@ -0,0 +1,25 @@
+/* Determine whether two stat buffers refer to the same file.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef SAME_INODE_H
+# define SAME_INODE_H 1
+
+# define SAME_INODE(Stat_buf_1, Stat_buf_2) \
+ ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
+ && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
+
+#endif
diff --git a/gnu/sched.in.h b/gnu/sched.in.h
new file mode 100755
index 00000000..a164133b
--- /dev/null
+++ b/gnu/sched.in.h
@@ -0,0 +1,47 @@
+/* Replacement <sched.h> for platforms that lack it.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_SCHED_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SCHED_H@
+# @INCLUDE_NEXT@ @NEXT_SCHED_H@
+#endif
+
+#ifndef _GL_SCHED_H
+#define _GL_SCHED_H
+
+#if !@HAVE_STRUCT_SCHED_PARAM@
+
+struct sched_param
+{
+ int sched_priority;
+};
+
+#endif
+
+#if !(defined SCHED_FIFO && defined SCHED_RR && defined SCHED_OTHER)
+# define SCHED_FIFO 1
+# define SCHED_RR 2
+# define SCHED_OTHER 0
+#endif
+
+#endif /* _GL_SCHED_H */
+#endif /* _GL_SCHED_H */
diff --git a/gnu/setenv.c b/gnu/setenv.c
new file mode 100755
index 00000000..b4c55322
--- /dev/null
+++ b/gnu/setenv.c
@@ -0,0 +1,383 @@
+/* Copyright (C) 1992, 1995-2003, 2005-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if !_LIBC
+# include <config.h>
+#endif
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
+#include <alloca.h>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#if _LIBC || HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+
+#if !_LIBC
+# include "malloca.h"
+#endif
+
+#if _LIBC || !HAVE_SETENV
+
+#if !_LIBC
+# define __environ environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean. */
+#ifdef _LIBC
+# define setenv __setenv
+# define clearenv __clearenv
+# define tfind __tfind
+# define tsearch __tsearch
+#endif
+
+/* In the GNU C library implementation we try to be more clever and
+ allow arbitrarily many changes of the environment given that the used
+ values are from a small set. Outside glibc this will eat up all
+ memory after a while. */
+#if defined _LIBC || (defined HAVE_SEARCH_H && defined HAVE_TSEARCH \
+ && defined __GNUC__)
+# define USE_TSEARCH 1
+# include <search.h>
+typedef int (*compar_fn_t) (const void *, const void *);
+
+/* This is a pointer to the root of the search tree with the known
+ values. */
+static void *known_values;
+
+# define KNOWN_VALUE(Str) \
+ ({ \
+ void *value = tfind (Str, &known_values, (compar_fn_t) strcmp); \
+ value != NULL ? *(char **) value : NULL; \
+ })
+# define STORE_VALUE(Str) \
+ tsearch (Str, &known_values, (compar_fn_t) strcmp)
+
+#else
+# undef USE_TSEARCH
+
+# define KNOWN_VALUE(Str) NULL
+# define STORE_VALUE(Str) do { } while (0)
+
+#endif
+
+
+/* If this variable is not a null pointer we allocated the current
+ environment. */
+static char **last_environ;
+
+
+/* This function is used by `setenv' and `putenv'. The difference between
+ the two functions is that for the former must create a new string which
+ is then placed in the environment, while the argument of `putenv'
+ must be used directly. This is all complicated by the fact that we try
+ to reuse values once generated for a `setenv' call since we can never
+ free the strings. */
+int
+__add_to_environ (const char *name, const char *value, const char *combined,
+ int replace)
+{
+ register char **ep;
+ register size_t size;
+ const size_t namelen = strlen (name);
+ const size_t vallen = value != NULL ? strlen (value) + 1 : 0;
+
+ LOCK;
+
+ /* We have to get the pointer now that we have the lock and not earlier
+ since another thread might have created a new environment. */
+ ep = __environ;
+
+ size = 0;
+ if (ep != NULL)
+ {
+ for (; *ep != NULL; ++ep)
+ if (!strncmp (*ep, name, namelen) && (*ep)[namelen] == '=')
+ break;
+ else
+ ++size;
+ }
+
+ if (ep == NULL || *ep == NULL)
+ {
+ char **new_environ;
+#ifdef USE_TSEARCH
+ char *new_value;
+#endif
+
+ /* We allocated this space; we can extend it. */
+ new_environ =
+ (char **) (last_environ == NULL
+ ? malloc ((size + 2) * sizeof (char *))
+ : realloc (last_environ, (size + 2) * sizeof (char *)));
+ if (new_environ == NULL)
+ {
+ UNLOCK;
+ return -1;
+ }
+
+ /* If the whole entry is given add it. */
+ if (combined != NULL)
+ /* We must not add the string to the search tree since it belongs
+ to the user. */
+ new_environ[size] = (char *) combined;
+ else
+ {
+ /* See whether the value is already known. */
+#ifdef USE_TSEARCH
+# ifdef _LIBC
+ new_value = (char *) alloca (namelen + 1 + vallen);
+ __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+ value, vallen);
+# else
+ new_value = (char *) malloca (namelen + 1 + vallen);
+ if (new_value == NULL)
+ {
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+ memcpy (new_value, name, namelen);
+ new_value[namelen] = '=';
+ memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+ new_environ[size] = KNOWN_VALUE (new_value);
+ if (new_environ[size] == NULL)
+#endif
+ {
+ new_environ[size] = (char *) malloc (namelen + 1 + vallen);
+ if (new_environ[size] == NULL)
+ {
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+#ifdef USE_TSEARCH
+ memcpy (new_environ[size], new_value, namelen + 1 + vallen);
+#else
+ memcpy (new_environ[size], name, namelen);
+ new_environ[size][namelen] = '=';
+ memcpy (&new_environ[size][namelen + 1], value, vallen);
+#endif
+ /* And save the value now. We cannot do this when we remove
+ the string since then we cannot decide whether it is a
+ user string or not. */
+ STORE_VALUE (new_environ[size]);
+ }
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ }
+
+ if (__environ != last_environ)
+ memcpy ((char *) new_environ, (char *) __environ,
+ size * sizeof (char *));
+
+ new_environ[size + 1] = NULL;
+
+ last_environ = __environ = new_environ;
+ }
+ else if (replace)
+ {
+ char *np;
+
+ /* Use the user string if given. */
+ if (combined != NULL)
+ np = (char *) combined;
+ else
+ {
+#ifdef USE_TSEARCH
+ char *new_value;
+# ifdef _LIBC
+ new_value = alloca (namelen + 1 + vallen);
+ __mempcpy (__mempcpy (__mempcpy (new_value, name, namelen), "=", 1),
+ value, vallen);
+# else
+ new_value = malloca (namelen + 1 + vallen);
+ if (new_value == NULL)
+ {
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+ memcpy (new_value, name, namelen);
+ new_value[namelen] = '=';
+ memcpy (&new_value[namelen + 1], value, vallen);
+# endif
+
+ np = KNOWN_VALUE (new_value);
+ if (np == NULL)
+#endif
+ {
+ np = malloc (namelen + 1 + vallen);
+ if (np == NULL)
+ {
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ __set_errno (ENOMEM);
+ UNLOCK;
+ return -1;
+ }
+
+#ifdef USE_TSEARCH
+ memcpy (np, new_value, namelen + 1 + vallen);
+#else
+ memcpy (np, name, namelen);
+ np[namelen] = '=';
+ memcpy (&np[namelen + 1], value, vallen);
+#endif
+ /* And remember the value. */
+ STORE_VALUE (np);
+ }
+#if defined USE_TSEARCH && !defined _LIBC
+ freea (new_value);
+#endif
+ }
+
+ *ep = np;
+ }
+
+ UNLOCK;
+
+ return 0;
+}
+
+int
+setenv (const char *name, const char *value, int replace)
+{
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ return __add_to_environ (name, value, NULL, replace);
+}
+
+/* The `clearenv' was planned to be added to POSIX.1 but probably
+ never made it. Nevertheless the POSIX.9 standard (POSIX bindings
+ for Fortran 77) requires this function. */
+int
+clearenv (void)
+{
+ LOCK;
+
+ if (__environ == last_environ && __environ != NULL)
+ {
+ /* We allocated this environment so we can free it. */
+ free (__environ);
+ last_environ = NULL;
+ }
+
+ /* Clear the environment pointer removes the whole environment. */
+ __environ = NULL;
+
+ UNLOCK;
+
+ return 0;
+}
+
+#ifdef _LIBC
+static void
+free_mem (void)
+{
+ /* Remove all traces. */
+ clearenv ();
+
+ /* Now remove the search tree. */
+ __tdestroy (known_values, free);
+ known_values = NULL;
+}
+text_set_element (__libc_subfreeres, free_mem);
+
+
+# undef setenv
+# undef clearenv
+weak_alias (__setenv, setenv)
+weak_alias (__clearenv, clearenv)
+#endif
+
+#endif /* _LIBC || !HAVE_SETENV */
+
+/* The rest of this file is called into use when replacing an existing
+ but buggy setenv. Known bugs include failure to diagnose invalid
+ name, and consuming a leading '=' from value. */
+#if HAVE_SETENV
+
+# undef setenv
+# define STREQ(a, b) (strcmp (a, b) == 0)
+
+int
+rpl_setenv (const char *name, const char *value, int replace)
+{
+ int result;
+ if (!name || !*name || strchr (name, '='))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ /* Call the real setenv even if replace is 0, in case implementation
+ has underlying data to update, such as when environ changes. */
+ result = setenv (name, value, replace);
+ if (result == 0 && replace && *value == '=')
+ {
+ char *tmp = getenv (name);
+ if (!STREQ (tmp, value))
+ {
+ int saved_errno;
+ size_t len = strlen (value);
+ tmp = malloca (len + 2);
+ /* Since leading '=' is eaten, double it up. */
+ *tmp = '=';
+ memcpy (tmp + 1, value, len + 1);
+ result = setenv (name, tmp, replace);
+ saved_errno = errno;
+ freea (tmp);
+ errno = saved_errno;
+ }
+ }
+ return result;
+}
+
+#endif /* HAVE_SETENV */
diff --git a/gnu/sig-handler.h b/gnu/sig-handler.h
new file mode 100755
index 00000000..6a634c24
--- /dev/null
+++ b/gnu/sig-handler.h
@@ -0,0 +1,44 @@
+/* Convenience declarations when working with <signal.h>.
+
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_SIG_HANDLER_H
+#define _GL_SIG_HANDLER_H
+
+#include <signal.h>
+
+/* Convenience type when working with signal handlers. */
+typedef void (*sa_handler_t) (int);
+
+/* Return the handler of a signal, as a sa_handler_t value regardless
+ of its true type. The resulting function can be compared to
+ special values like SIG_IGN but it is not portable to call it. */
+static inline sa_handler_t
+get_handler (struct sigaction const *a)
+{
+#ifdef SA_SIGINFO
+ /* POSIX says that special values like SIG_IGN can only occur when
+ action.sa_flags does not contain SA_SIGINFO. But in Linux 2.4,
+ for example, sa_sigaction and sa_handler are aliases and a signal
+ is ignored if sa_sigaction (after casting) equals SIG_IGN. So
+ use (and cast) sa_sigaction in that case. */
+ if (a->sa_flags & SA_SIGINFO)
+ return (sa_handler_t) a->sa_sigaction;
+#endif
+ return a->sa_handler;
+}
+
+#endif /* _GL_SIG_HANDLER_H */
diff --git a/gnu/sigaction.c b/gnu/sigaction.c
new file mode 100755
index 00000000..e14bd964
--- /dev/null
+++ b/gnu/sigaction.c
@@ -0,0 +1,204 @@
+/* POSIX compatible signal blocking.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Eric Blake <ebb9@byu.net>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/* This implementation of sigaction is tailored to Woe32 behavior:
+ signal() has SysV semantics (ie. the handler is uninstalled before
+ it is invoked). This is an inherent data race if an asynchronous
+ signal is sent twice in a row before we can reinstall our handler,
+ but there's nothing we can do about it. Meanwhile, sigprocmask()
+ is not present, and while we can use the gnulib replacement to
+ provide critical sections, it too suffers from potential data races
+ in the face of an ill-timed asynchronous signal. And we compound
+ the situation by reading static storage in a signal handler, which
+ POSIX warns is not generically async-signal-safe. Oh well.
+
+ Additionally:
+ - We don't implement SA_NOCLDSTOP or SA_NOCLDWAIT, because SIGCHLD
+ is not defined.
+ - We don't implement SA_ONSTACK, because sigaltstack() is not present.
+ - We ignore SA_RESTART, because blocking Win32 calls are not interrupted
+ anyway when an asynchronous signal occurs, and the MSVCRT runtime
+ never sets errno to EINTR.
+ - We don't implement SA_SIGINFO because it is impossible to do so
+ portably.
+
+ POSIX states that an application should not mix signal() and
+ sigaction(). We support the use of signal() within the gnulib
+ sigprocmask() substitute, but all other application code linked
+ with this module should stick with only sigaction(). */
+
+/* Check some of our assumptions. */
+#if defined SIGCHLD || defined HAVE_SIGALTSTACK || defined HAVE_SIGINTERRUPT
+# error "Revisit the assumptions made in the sigaction module"
+#endif
+
+/* Out-of-range substitutes make a good fallback for uncatchable
+ signals. */
+#ifndef SIGKILL
+# define SIGKILL (-1)
+#endif
+#ifndef SIGSTOP
+# define SIGSTOP (-1)
+#endif
+
+/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
+ for the signal SIGABRT. Only one signal handler is stored for both
+ SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef SIGABRT_COMPAT
+# define SIGABRT_COMPAT 6
+#endif
+
+/* A signal handler. */
+typedef void (*handler_t) (int signal);
+
+/* Set of current actions. If sa_handler for an entry is NULL, then
+ that signal is not currently handled by the sigaction handler. */
+static struct sigaction volatile action_array[NSIG] /* = 0 */;
+
+/* Signal handler that is installed for signals. */
+static void
+sigaction_handler (int sig)
+{
+ handler_t handler;
+ sigset_t mask;
+ sigset_t oldmask;
+ int saved_errno = errno;
+ if (sig < 0 || NSIG <= sig || !action_array[sig].sa_handler)
+ {
+ /* Unexpected situation; be careful to avoid recursive abort. */
+ if (sig == SIGABRT)
+ signal (SIGABRT, SIG_DFL);
+ abort ();
+ }
+
+ /* Reinstall the signal handler when required; otherwise update the
+ bookkeeping so that the user's handler may call sigaction and get
+ accurate results. We know the signal isn't currently blocked, or
+ we wouldn't be in its handler, therefore we know that we are not
+ interrupting a sigaction() call. There is a race where any
+ asynchronous instance of the same signal occurring before we
+ reinstall the handler will trigger the default handler; oh
+ well. */
+ handler = action_array[sig].sa_handler;
+ if ((action_array[sig].sa_flags & SA_RESETHAND) == 0)
+ signal (sig, sigaction_handler);
+ else
+ action_array[sig].sa_handler = NULL;
+
+ /* Block appropriate signals. */
+ mask = action_array[sig].sa_mask;
+ if ((action_array[sig].sa_flags & SA_NODEFER) == 0)
+ sigaddset (&mask, sig);
+ sigprocmask (SIG_BLOCK, &mask, &oldmask);
+
+ /* Invoke the user's handler, then restore prior mask. */
+ errno = saved_errno;
+ handler (sig);
+ saved_errno = errno;
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ errno = saved_errno;
+}
+
+/* Change and/or query the action that will be taken on delivery of
+ signal SIG. If not NULL, ACT describes the new behavior. If not
+ NULL, OACT is set to the prior behavior. Return 0 on success, or
+ set errno and return -1 on failure. */
+int
+sigaction (int sig, const struct sigaction *restrict act,
+ struct sigaction *restrict oact)
+{
+ sigset_t mask;
+ sigset_t oldmask;
+ int saved_errno;
+
+ if (sig < 0 || NSIG <= sig || sig == SIGKILL || sig == SIGSTOP
+ || (act && act->sa_handler == SIG_ERR))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ /* POSIX requires sigaction() to be async-signal-safe. In other
+ words, if an asynchronous signal can occur while we are anywhere
+ inside this function, the user's handler could then call
+ sigaction() recursively and expect consistent results. We meet
+ this rule by using sigprocmask to block all signals before
+ modifying any data structure that could be read from a signal
+ handler; this works since we know that the gnulib sigprocmask
+ replacement does not try to use sigaction() from its handler. */
+ if (!act && !oact)
+ return 0;
+ sigfillset (&mask);
+ sigprocmask (SIG_BLOCK, &mask, &oldmask);
+ if (oact)
+ {
+ if (action_array[sig].sa_handler)
+ *oact = action_array[sig];
+ else
+ {
+ /* Safe to change the handler at will here, since all
+ signals are currently blocked. */
+ oact->sa_handler = signal (sig, SIG_DFL);
+ if (oact->sa_handler == SIG_ERR)
+ goto failure;
+ signal (sig, oact->sa_handler);
+ oact->sa_flags = SA_RESETHAND | SA_NODEFER;
+ sigemptyset (&oact->sa_mask);
+ }
+ }
+
+ if (act)
+ {
+ /* Safe to install the handler before updating action_array,
+ since all signals are currently blocked. */
+ if (act->sa_handler == SIG_DFL || act->sa_handler == SIG_IGN)
+ {
+ if (signal (sig, act->sa_handler) == SIG_ERR)
+ goto failure;
+ action_array[sig].sa_handler = NULL;
+ }
+ else
+ {
+ if (signal (sig, sigaction_handler) == SIG_ERR)
+ goto failure;
+ action_array[sig] = *act;
+ }
+ }
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ return 0;
+
+ failure:
+ saved_errno = errno;
+ sigprocmask (SIG_SETMASK, &oldmask, NULL);
+ errno = saved_errno;
+ return -1;
+}
diff --git a/gnu/signal.in.h b/gnu/signal.in.h
new file mode 100755
index 00000000..131132ab
--- /dev/null
+++ b/gnu/signal.in.h
@@ -0,0 +1,249 @@
+/* A GNU-like <signal.h>.
+
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_sig_atomic_t || defined __need_sigset_t
+/* Special invocation convention inside glibc header files. */
+
+# @INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_SIGNAL_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_SIGNAL_H@
+
+#ifndef _GL_SIGNAL_H
+#define _GL_SIGNAL_H
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Define pid_t, uid_t.
+ Also, mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>
+
+/* On AIX, sig_atomic_t already includes volatile. C99 requires that
+ 'volatile sig_atomic_t' ignore the extra modifier, but C89 did not.
+ Hence, redefine this to a non-volatile type as needed. */
+#if ! @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+typedef int rpl_sig_atomic_t;
+# undef sig_atomic_t
+# define sig_atomic_t rpl_sig_atomic_t
+#endif
+
+/* A set or mask of signals. */
+#if !@HAVE_SIGSET_T@
+typedef unsigned int sigset_t;
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_SIGNAL_H_SIGPIPE@
+# ifndef SIGPIPE
+/* Define SIGPIPE to a value that does not overlap with other signals. */
+# define SIGPIPE 13
+# define GNULIB_defined_SIGPIPE 1
+/* To actually use SIGPIPE, you also need the gnulib modules 'sigprocmask',
+ 'write', 'stdio'. */
+# endif
+#endif
+
+
+#if @GNULIB_SIGPROCMASK@
+# if !@HAVE_POSIX_SIGNALBLOCKING@
+
+/* Maximum signal number + 1. */
+# ifndef NSIG
+# define NSIG 32
+# endif
+
+/* This code supports only 32 signals. */
+typedef int verify_NSIG_constraint[2 * (NSIG <= 32) - 1];
+
+/* Test whether a given signal is contained in a signal set. */
+extern int sigismember (const sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
+
+/* Initialize a signal set to the empty set. */
+extern int sigemptyset (sigset_t *set) _GL_ARG_NONNULL ((1));
+
+/* Add a signal to a signal set. */
+extern int sigaddset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
+
+/* Remove a signal from a signal set. */
+extern int sigdelset (sigset_t *set, int sig) _GL_ARG_NONNULL ((1));
+
+/* Fill a signal set with all possible signals. */
+extern int sigfillset (sigset_t *set) _GL_ARG_NONNULL ((1));
+
+/* Return the set of those blocked signals that are pending. */
+extern int sigpending (sigset_t *set) _GL_ARG_NONNULL ((1));
+
+/* If OLD_SET is not NULL, put the current set of blocked signals in *OLD_SET.
+ Then, if SET is not NULL, affect the current set of blocked signals by
+ combining it with *SET as indicated in OPERATION.
+ In this implementation, you are not allowed to change a signal handler
+ while the signal is blocked. */
+# define SIG_BLOCK 0 /* blocked_set = blocked_set | *set; */
+# define SIG_SETMASK 1 /* blocked_set = *set; */
+# define SIG_UNBLOCK 2 /* blocked_set = blocked_set & ~*set; */
+extern int sigprocmask (int operation, const sigset_t *set, sigset_t *old_set);
+
+# define signal rpl_signal
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+extern void (*signal (int sig, void (*func) (int))) (int);
+
+# if GNULIB_defined_SIGPIPE
+
+/* Raise signal SIG. */
+# undef raise
+# define raise rpl_raise
+extern int raise (int sig);
+
+# endif
+
+# endif /* !@HAVE_POSIX_SIGNALBLOCKING@ */
+#elif defined GNULIB_POSIXCHECK
+# undef sigaddset
+# if HAVE_RAW_DECL_SIGADDSET
+_GL_WARN_ON_USE (sigaddset, "sigaddset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigdelset
+# if HAVE_RAW_DECL_SIGDELSET
+_GL_WARN_ON_USE (sigdelset, "sigdelset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigemptyset
+# if HAVE_RAW_DECL_SIGEMPTYSET
+_GL_WARN_ON_USE (sigemptyset, "sigemptyset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigfillset
+# if HAVE_RAW_DECL_SIGFILLSET
+_GL_WARN_ON_USE (sigfillset, "sigfillset is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigismember
+# if HAVE_RAW_DECL_SIGISMEMBER
+_GL_WARN_ON_USE (sigismember, "sigismember is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigpending
+# if HAVE_RAW_DECL_SIGPENDING
+_GL_WARN_ON_USE (sigpending, "sigpending is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+# undef sigprocmask
+# if HAVE_RAW_DECL_SIGPROCMASK
+_GL_WARN_ON_USE (sigprocmask, "sigprocmask is unportable - "
+ "use the gnulib module sigprocmask for portability");
+# endif
+#endif /* @GNULIB_SIGPROCMASK@ */
+
+
+#if @GNULIB_SIGACTION@
+# if !@HAVE_SIGACTION@
+
+# if !@HAVE_SIGINFO_T@
+/* Present to allow compilation, but unsupported by gnulib. */
+union sigval
+{
+ int sival_int;
+ void *sival_ptr;
+};
+
+/* Present to allow compilation, but unsupported by gnulib. */
+struct siginfo_t
+{
+ int si_signo;
+ int si_code;
+ int si_errno;
+ pid_t si_pid;
+ uid_t si_uid;
+ void *si_addr;
+ int si_status;
+ long si_band;
+ union sigval si_value;
+};
+typedef struct siginfo_t siginfo_t;
+# endif /* !@HAVE_SIGINFO_T@ */
+
+/* We assume that platforms which lack the sigaction() function also lack
+ the 'struct sigaction' type, and vice versa. */
+
+struct sigaction
+{
+ union
+ {
+ void (*_sa_handler) (int);
+ /* Present to allow compilation, but unsupported by gnulib. POSIX
+ says that implementations may, but not must, make sa_sigaction
+ overlap with sa_handler, but we know of no implementation where
+ they do not overlap. */
+ void (*_sa_sigaction) (int, siginfo_t *, void *);
+ } _sa_func;
+ sigset_t sa_mask;
+ /* Not all POSIX flags are supported. */
+ int sa_flags;
+};
+# define sa_handler _sa_func._sa_handler
+# define sa_sigaction _sa_func._sa_sigaction
+/* Unsupported flags are not present. */
+# define SA_RESETHAND 1
+# define SA_NODEFER 2
+# define SA_RESTART 4
+
+extern int sigaction (int, const struct sigaction *restrict,
+ struct sigaction *restrict);
+
+# elif !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+
+# define sa_sigaction sa_handler
+
+# endif /* !@HAVE_SIGACTION@, !@HAVE_STRUCT_SIGACTION_SA_SIGACTION@ */
+#elif defined GNULIB_POSIXCHECK
+# undef sigaction
+# if HAVE_RAW_DECL_SIGACTION
+_GL_WARN_ON_USE (sigaction, "sigaction is unportable - "
+ "use the gnulib module sigaction for portability");
+# endif
+#endif
+
+/* Some systems don't have SA_NODEFER. */
+#ifndef SA_NODEFER
+# define SA_NODEFER 0
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_SIGNAL_H */
+#endif /* _GL_SIGNAL_H */
+#endif
diff --git a/gnu/signbitd.c b/gnu/signbitd.c
new file mode 100755
index 00000000..3645615e
--- /dev/null
+++ b/gnu/signbitd.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <math.h>
+
+#include <string.h>
+#include "isnand-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitd_OPTIMIZED_MACRO
+# undef gl_signbitd
+#endif
+
+int
+gl_signbitd (double arg)
+{
+#if defined DBL_SIGNBIT_WORD && defined DBL_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { double value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[DBL_SIGNBIT_WORD] >> DBL_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGN_IN_LIBC
+ return copysign (1.0, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnand (arg))
+ return 0;
+ if (arg < 0.0)
+ return 1;
+ else if (arg == 0.0)
+ {
+ /* Distinguish 0.0 and -0.0. */
+ static double plus_zero = 0.0;
+ double arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_DBL) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/gnu/signbitf.c b/gnu/signbitf.c
new file mode 100755
index 00000000..becc7e0c
--- /dev/null
+++ b/gnu/signbitf.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <math.h>
+
+#include <string.h>
+#include "isnanf-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitf_OPTIMIZED_MACRO
+# undef gl_signbitf
+#endif
+
+int
+gl_signbitf (float arg)
+{
+#if defined FLT_SIGNBIT_WORD && defined FLT_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { float value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[FLT_SIGNBIT_WORD] >> FLT_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGNF_IN_LIBC
+ return copysignf (1.0f, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnanf (arg))
+ return 0;
+ if (arg < 0.0f)
+ return 1;
+ else if (arg == 0.0f)
+ {
+ /* Distinguish 0.0f and -0.0f. */
+ static float plus_zero = 0.0f;
+ float arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_FLT) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/gnu/signbitl.c b/gnu/signbitl.c
new file mode 100755
index 00000000..c0dd49fa
--- /dev/null
+++ b/gnu/signbitl.c
@@ -0,0 +1,64 @@
+/* signbit() macro: Determine the sign bit of a floating-point number.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <math.h>
+
+#include <string.h>
+#include "isnanl-nolibm.h"
+#include "float+.h"
+
+#ifdef gl_signbitl_OPTIMIZED_MACRO
+# undef gl_signbitl
+#endif
+
+int
+gl_signbitl (long double arg)
+{
+#if defined LDBL_SIGNBIT_WORD && defined LDBL_SIGNBIT_BIT
+ /* The use of a union to extract the bits of the representation of a
+ 'long double' is safe in practice, despite of the "aliasing rules" of
+ C99, because the GCC docs say
+ "Even with '-fstrict-aliasing', type-punning is allowed, provided the
+ memory is accessed through the union type."
+ and similarly for other compilers. */
+# define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ union { long double value; unsigned int word[NWORDS]; } m;
+ m.value = arg;
+ return (m.word[LDBL_SIGNBIT_WORD] >> LDBL_SIGNBIT_BIT) & 1;
+#elif HAVE_COPYSIGNL_IN_LIBC
+ return copysignl (1.0L, arg) < 0;
+#else
+ /* This does not do the right thing for NaN, but this is irrelevant for
+ most use cases. */
+ if (isnanl (arg))
+ return 0;
+ if (arg < 0.0L)
+ return 1;
+ else if (arg == 0.0L)
+ {
+ /* Distinguish 0.0L and -0.0L. */
+ static long double plus_zero = 0.0L;
+ long double arg_mem = arg;
+ return (memcmp (&plus_zero, &arg_mem, SIZEOF_LDBL) != 0);
+ }
+ else
+ return 0;
+#endif
+}
diff --git a/gnu/sigprocmask.c b/gnu/sigprocmask.c
new file mode 100755
index 00000000..016325ec
--- /dev/null
+++ b/gnu/sigprocmask.c
@@ -0,0 +1,329 @@
+/* POSIX compatible signal blocking.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <signal.h>
+
+#include <errno.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+/* We assume that a platform without POSIX signal blocking functions
+ also does not have the POSIX sigaction() function, only the
+ signal() function. We also assume signal() has SysV semantics,
+ where any handler is uninstalled prior to being invoked. This is
+ true for Woe32 platforms. */
+
+/* We use raw signal(), but also provide a wrapper rpl_signal() so
+ that applications can query or change a blocked signal. */
+#undef signal
+
+/* Provide invalid signal numbers as fallbacks if the uncatchable
+ signals are not defined. */
+#ifndef SIGKILL
+# define SIGKILL (-1)
+#endif
+#ifndef SIGSTOP
+# define SIGSTOP (-1)
+#endif
+
+/* On native Windows, as of 2008, the signal SIGABRT_COMPAT is an alias
+ for the signal SIGABRT. Only one signal handler is stored for both
+ SIGABRT and SIGABRT_COMPAT. SIGABRT_COMPAT is not a signal of its own. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# undef SIGABRT_COMPAT
+# define SIGABRT_COMPAT 6
+#endif
+#ifdef SIGABRT_COMPAT
+# define SIGABRT_COMPAT_MASK (1U << SIGABRT_COMPAT)
+#else
+# define SIGABRT_COMPAT_MASK 0
+#endif
+
+typedef void (*handler_t) (int);
+
+/* Handling of gnulib defined signals. */
+
+#if GNULIB_defined_SIGPIPE
+static handler_t SIGPIPE_handler = SIG_DFL;
+#endif
+
+#if GNULIB_defined_SIGPIPE
+static handler_t
+ext_signal (int sig, handler_t handler)
+{
+ switch (sig)
+ {
+ case SIGPIPE:
+ {
+ handler_t old_handler = SIGPIPE_handler;
+ SIGPIPE_handler = handler;
+ return old_handler;
+ }
+ default: /* System defined signal */
+ return signal (sig, handler);
+ }
+}
+# define signal ext_signal
+#endif
+
+int
+sigismember (const sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ return (*set >> sig) & 1;
+ }
+ else
+ return 0;
+}
+
+int
+sigemptyset (sigset_t *set)
+{
+ *set = 0;
+ return 0;
+}
+
+int
+sigaddset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set |= 1U << sig;
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+int
+sigdelset (sigset_t *set, int sig)
+{
+ if (sig >= 0 && sig < NSIG)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ *set &= ~(1U << sig);
+ return 0;
+ }
+ else
+ {
+ errno = EINVAL;
+ return -1;
+ }
+}
+
+
+int
+sigfillset (sigset_t *set)
+{
+ *set = ((2U << (NSIG - 1)) - 1) & ~ SIGABRT_COMPAT_MASK;
+ return 0;
+}
+
+/* Set of currently blocked signals. */
+static volatile sigset_t blocked_set /* = 0 */;
+
+/* Set of currently blocked and pending signals. */
+static volatile sig_atomic_t pending_array[NSIG] /* = { 0 } */;
+
+/* Signal handler that is installed for blocked signals. */
+static void
+blocked_handler (int sig)
+{
+ /* Reinstall the handler, in case the signal occurs multiple times
+ while blocked. There is an inherent race where an asynchronous
+ signal in between when the kernel uninstalled the handler and
+ when we reinstall it will trigger the default handler; oh
+ well. */
+ signal (sig, blocked_handler);
+ if (sig >= 0 && sig < NSIG)
+ pending_array[sig] = 1;
+}
+
+int
+sigpending (sigset_t *set)
+{
+ sigset_t pending = 0;
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (pending_array[sig])
+ pending |= 1U << sig;
+ *set = pending;
+ return 0;
+}
+
+/* The previous signal handlers.
+ Only the array elements corresponding to blocked signals are relevant. */
+static volatile handler_t old_handlers[NSIG];
+
+int
+sigprocmask (int operation, const sigset_t *set, sigset_t *old_set)
+{
+ if (old_set != NULL)
+ *old_set = blocked_set;
+
+ if (set != NULL)
+ {
+ sigset_t new_blocked_set;
+ sigset_t to_unblock;
+ sigset_t to_block;
+
+ switch (operation)
+ {
+ case SIG_BLOCK:
+ new_blocked_set = blocked_set | *set;
+ break;
+ case SIG_SETMASK:
+ new_blocked_set = *set;
+ break;
+ case SIG_UNBLOCK:
+ new_blocked_set = blocked_set & ~*set;
+ break;
+ default:
+ errno = EINVAL;
+ return -1;
+ }
+ to_unblock = blocked_set & ~new_blocked_set;
+ to_block = new_blocked_set & ~blocked_set;
+
+ if (to_block != 0)
+ {
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_block >> sig) & 1)
+ {
+ pending_array[sig] = 0;
+ if ((old_handlers[sig] = signal (sig, blocked_handler)) != SIG_ERR)
+ blocked_set |= 1U << sig;
+ }
+ }
+
+ if (to_unblock != 0)
+ {
+ sig_atomic_t received[NSIG];
+ int sig;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if ((to_unblock >> sig) & 1)
+ {
+ if (signal (sig, old_handlers[sig]) != blocked_handler)
+ /* The application changed a signal handler while the signal
+ was blocked, bypassing our rpl_signal replacement.
+ We don't support this. */
+ abort ();
+ received[sig] = pending_array[sig];
+ blocked_set &= ~(1U << sig);
+ pending_array[sig] = 0;
+ }
+ else
+ received[sig] = 0;
+
+ for (sig = 0; sig < NSIG; sig++)
+ if (received[sig])
+ raise (sig);
+ }
+ }
+ return 0;
+}
+
+/* Install the handler FUNC for signal SIG, and return the previous
+ handler. */
+handler_t
+rpl_signal (int sig, handler_t handler)
+{
+ /* We must provide a wrapper, so that a user can query what handler
+ they installed even if that signal is currently blocked. */
+ if (sig >= 0 && sig < NSIG && sig != SIGKILL && sig != SIGSTOP
+ && handler != SIG_ERR)
+ {
+ #ifdef SIGABRT_COMPAT
+ if (sig == SIGABRT_COMPAT)
+ sig = SIGABRT;
+ #endif
+
+ if (blocked_set & (1U << sig))
+ {
+ /* POSIX states that sigprocmask and signal are both
+ async-signal-safe. This is not true of our
+ implementation - there is a slight data race where an
+ asynchronous interrupt on signal A can occur after we
+ install blocked_handler but before we have updated
+ old_handlers for signal B, such that handler A can see
+ stale information if it calls signal(B). Oh well -
+ signal handlers really shouldn't try to manipulate the
+ installed handlers of unrelated signals. */
+ handler_t result = old_handlers[sig];
+ old_handlers[sig] = handler;
+ return result;
+ }
+ else
+ return signal (sig, handler);
+ }
+ else
+ {
+ errno = EINVAL;
+ return SIG_ERR;
+ }
+}
+
+#if GNULIB_defined_SIGPIPE
+/* Raise the signal SIG. */
+int
+rpl_raise (int sig)
+# undef raise
+{
+ switch (sig)
+ {
+ case SIGPIPE:
+ if (blocked_set & (1U << sig))
+ pending_array[sig] = 1;
+ else
+ {
+ handler_t handler = SIGPIPE_handler;
+ if (handler == SIG_DFL)
+ exit (128 + SIGPIPE);
+ else if (handler != SIG_IGN)
+ (*handler) (sig);
+ }
+ return 0;
+ default: /* System defined signal */
+ return raise (sig);
+ }
+}
+#endif
diff --git a/gnu/size_max.h b/gnu/size_max.h
new file mode 100755
index 00000000..56d5a9b1
--- /dev/null
+++ b/gnu/size_max.h
@@ -0,0 +1,31 @@
+/* size_max.h -- declare SIZE_MAX through system headers
+ Copyright (C) 2005-2006, 2009-2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef GNULIB_SIZE_MAX_H
+#define GNULIB_SIZE_MAX_H
+
+/* Get SIZE_MAX declaration on systems like Solaris 7/8/9. */
+# include <limits.h>
+/* Get SIZE_MAX declaration on systems like glibc 2. */
+# if HAVE_STDINT_H
+# include <stdint.h>
+# endif
+/* On systems where these include files don't define it, SIZE_MAX is defined
+ in config.h. */
+
+#endif /* GNULIB_SIZE_MAX_H */
diff --git a/gnu/snprintf.c b/gnu/snprintf.c
new file mode 100755
index 00000000..810ca14b
--- /dev/null
+++ b/gnu/snprintf.c
@@ -0,0 +1,72 @@
+/* Formatted output to strings.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson and Paul Eggert.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "vasnprintf.h"
+
+/* Print formatted output to string STR. Similar to sprintf, but
+ additional length SIZE limit how much is written into STR. Returns
+ string length of formatted string (which may be larger than SIZE).
+ STR may be NULL, in which case nothing will be written. On error,
+ return a negative value. */
+int
+snprintf (char *str, size_t size, const char *format, ...)
+{
+ char *output;
+ size_t len;
+ size_t lenbuf = size;
+ va_list args;
+
+ va_start (args, format);
+ output = vasnprintf (str, &lenbuf, format, args);
+ len = lenbuf;
+ va_end (args);
+
+ if (!output)
+ return -1;
+
+ if (output != str)
+ {
+ if (size)
+ {
+ size_t pruned_len = (len < size ? len : size - 1);
+ memcpy (str, output, pruned_len);
+ str[pruned_len] = '\0';
+ }
+
+ free (output);
+ }
+
+ if (INT_MAX < len)
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ return len;
+}
diff --git a/gnu/spawn.in.h b/gnu/spawn.in.h
new file mode 100755
index 00000000..84ba93c1
--- /dev/null
+++ b/gnu/spawn.in.h
@@ -0,0 +1,548 @@
+/* Definitions for POSIX spawn interface.
+ Copyright (C) 2000, 2003-2004, 2008-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_SPAWN_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_SPAWN_H@
+# @INCLUDE_NEXT@ @NEXT_SPAWN_H@
+#endif
+
+#ifndef _GL_SPAWN_H
+#define _GL_SPAWN_H
+
+/* Get definitions of 'struct sched_param' and 'sigset_t'.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <sched.h>
+# include <signal.h>
+#endif
+
+#include <sys/types.h>
+
+#ifndef __THROW
+# define __THROW
+#endif
+
+/* GCC 2.95 and later have "__restrict"; C99 compilers have
+ "restrict", and "configure" may have defined "restrict".
+ Other compilers use __restrict, __restrict__, and _Restrict, and
+ 'configure' might #define 'restrict' to those words, so pick a
+ different name. */
+#ifndef _Restrict_
+# if 199901L <= __STDC_VERSION__
+# define _Restrict_ restrict
+# elif 2 < __GNUC__ || (2 == __GNUC__ && 95 <= __GNUC_MINOR__)
+# define _Restrict_ __restrict
+# else
+# define _Restrict_
+# endif
+#endif
+/* gcc 3.1 and up support the [restrict] syntax. Don't trust
+ sys/cdefs.h's definition of __restrict_arr, though, as it
+ mishandles gcc -ansi -pedantic. */
+#ifndef _Restrict_arr_
+# if ((199901L <= __STDC_VERSION__ \
+ || ((3 < __GNUC__ || (3 == __GNUC__ && 1 <= __GNUC_MINOR__)) \
+ && !__STRICT_ANSI__)) \
+ && !defined __GNUG__)
+# define _Restrict_arr_ _Restrict_
+# else
+# define _Restrict_arr_
+# endif
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Data structure to contain attributes for thread creation. */
+#if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_t rpl_posix_spawnattr_t
+#endif
+#if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWNATTR_T@
+typedef struct
+{
+ short int _flags;
+ pid_t _pgrp;
+ sigset_t _sd;
+ sigset_t _ss;
+ struct sched_param _sp;
+ int _policy;
+ int __pad[16];
+} posix_spawnattr_t;
+#endif
+
+
+/* Data structure to contain information about the actions to be
+ performed in the new process with respect to file descriptors. */
+#if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_t rpl_posix_spawn_file_actions_t
+#endif
+#if @REPLACE_POSIX_SPAWN@ || !@HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+typedef struct
+{
+ int _allocated;
+ int _used;
+ struct __spawn_action *_actions;
+ int __pad[16];
+} posix_spawn_file_actions_t;
+#endif
+
+
+/* Flags to be set in the `posix_spawnattr_t'. */
+#if @REPLACE_POSIX_SPAWN@
+/* Use the values from the system, for better compatibility. */
+/* But this implementation does not support AIX extensions. */
+# undef POSIX_SPAWN_FORK_HANDLERS
+#else
+# define POSIX_SPAWN_RESETIDS 0x01
+# define POSIX_SPAWN_SETPGROUP 0x02
+# define POSIX_SPAWN_SETSIGDEF 0x04
+# define POSIX_SPAWN_SETSIGMASK 0x08
+# define POSIX_SPAWN_SETSCHEDPARAM 0x10
+# define POSIX_SPAWN_SETSCHEDULER 0x20
+#endif
+/* A GNU extension. Use the next free bit position. */
+#define POSIX_SPAWN_USEVFORK \
+ ((POSIX_SPAWN_RESETIDS | (POSIX_SPAWN_RESETIDS - 1) \
+ | POSIX_SPAWN_SETPGROUP | (POSIX_SPAWN_SETPGROUP - 1) \
+ | POSIX_SPAWN_SETSIGDEF | (POSIX_SPAWN_SETSIGDEF - 1) \
+ | POSIX_SPAWN_SETSIGMASK | (POSIX_SPAWN_SETSIGMASK - 1) \
+ | POSIX_SPAWN_SETSCHEDPARAM | (POSIX_SPAWN_SETSCHEDPARAM - 1) \
+ | POSIX_SPAWN_SETSCHEDULER | (POSIX_SPAWN_SETSCHEDULER - 1)) \
+ + 1)
+typedef int verify_POSIX_SPAWN_USEVFORK_no_overlap
+ [2 * (((POSIX_SPAWN_RESETIDS | POSIX_SPAWN_SETPGROUP
+ | POSIX_SPAWN_SETSIGDEF | POSIX_SPAWN_SETSIGMASK
+ | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER)
+ & POSIX_SPAWN_USEVFORK) == 0) - 1];
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_POSIX_SPAWN@
+/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
+ Before running the process perform the actions described in FILE-ACTIONS.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn rpl_posix_spawn
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn (pid_t *_Restrict_ __pid,
+ const char *_Restrict_ __path,
+ const posix_spawn_file_actions_t *_Restrict_ __file_actions,
+ const posix_spawnattr_t *_Restrict_ __attrp,
+ char *const argv[_Restrict_arr_],
+ char *const envp[_Restrict_arr_])
+ _GL_ARG_NONNULL ((2, 5, 6));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn
+# if HAVE_RAW_DECL_POSIX_SPAWN
+_GL_WARN_ON_USE (posix_spawn, "posix_spawn is unportable - "
+ "use gnulib module posix_spawn for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNP@
+/* Similar to `posix_spawn' but search for FILE in the PATH.
+
+ This function is a possible cancellation points and therefore not
+ marked with __THROW. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnp rpl_posix_spawnp
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnp (pid_t *__pid, const char *__file,
+ const posix_spawn_file_actions_t *__file_actions,
+ const posix_spawnattr_t *__attrp,
+ char *const argv[], char *const envp[])
+ _GL_ARG_NONNULL ((2, 5, 6));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnp
+# if HAVE_RAW_DECL_POSIX_SPAWNP
+_GL_WARN_ON_USE (posix_spawnp, "posix_spawnp is unportable - "
+ "use gnulib module posix_spawnp for portability");
+# endif
+#endif
+
+
+#if @GNULIB_POSIX_SPAWNATTR_INIT@
+/* Initialize data structure with attributes for `spawn' to default values. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_init rpl_posix_spawnattr_init
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_init (posix_spawnattr_t *__attr)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_init
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_INIT
+_GL_WARN_ON_USE (posix_spawnattr_init, "posix_spawnattr_init is unportable - "
+ "use gnulib module posix_spawnattr_init for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_DESTROY@
+/* Free resources associated with ATTR. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_destroy rpl_posix_spawnattr_destroy
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_destroy (posix_spawnattr_t *__attr)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_destroy
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_DESTROY
+_GL_WARN_ON_USE (posix_spawnattr_destroy, "posix_spawnattr_destroy is unportable - "
+ "use gnulib module posix_spawnattr_destroy for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+/* Store signal mask for signals with default handling from ATTR in
+ SIGDEFAULT. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getsigdefault rpl_posix_spawnattr_getsigdefault
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getsigdefault (const posix_spawnattr_t *_Restrict_ __attr,
+ sigset_t *_Restrict_ __sigdefault)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigdefault
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGDEFAULT
+_GL_WARN_ON_USE (posix_spawnattr_getsigdefault, "posix_spawnattr_getsigdefault is unportable - "
+ "use gnulib module posix_spawnattr_getsigdefault for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+/* Set signal mask for signals with default handling in ATTR to SIGDEFAULT. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setsigdefault rpl_posix_spawnattr_setsigdefault
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setsigdefault (posix_spawnattr_t *_Restrict_ __attr,
+ const sigset_t *_Restrict_ __sigdefault)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigdefault
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGDEFAULT
+_GL_WARN_ON_USE (posix_spawnattr_setsigdefault, "posix_spawnattr_setsigdefault is unportable - "
+ "use gnulib module posix_spawnattr_setsigdefault for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+/* Store signal mask for the new process from ATTR in SIGMASK. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getsigmask rpl_posix_spawnattr_getsigmask
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getsigmask (const posix_spawnattr_t *_Restrict_ __attr,
+ sigset_t *_Restrict_ __sigmask)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getsigmask
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSIGMASK
+_GL_WARN_ON_USE (posix_spawnattr_getsigmask, "posix_spawnattr_getsigmask is unportable - "
+ "use gnulib module posix_spawnattr_getsigmask for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+/* Set signal mask for the new process in ATTR to SIGMASK. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setsigmask rpl_posix_spawnattr_setsigmask
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setsigmask (posix_spawnattr_t *_Restrict_ __attr,
+ const sigset_t *_Restrict_ __sigmask)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setsigmask
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSIGMASK
+_GL_WARN_ON_USE (posix_spawnattr_setsigmask, "posix_spawnattr_setsigmask is unportable - "
+ "use gnulib module posix_spawnattr_setsigmask for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+/* Get flag word from the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getflags rpl_posix_spawnattr_getflags
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getflags (const posix_spawnattr_t *_Restrict_ __attr,
+ short int *_Restrict_ __flags)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getflags
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETFLAGS
+_GL_WARN_ON_USE (posix_spawnattr_getflags, "posix_spawnattr_getflags is unportable - "
+ "use gnulib module posix_spawnattr_getflags for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+/* Store flags in the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setflags rpl_posix_spawnattr_setflags
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setflags (posix_spawnattr_t *__attr,
+ short int __flags)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setflags
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETFLAGS
+_GL_WARN_ON_USE (posix_spawnattr_setflags, "posix_spawnattr_setflags is unportable - "
+ "use gnulib module posix_spawnattr_setflags for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+/* Get process group ID from the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getpgroup rpl_posix_spawnattr_getpgroup
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getpgroup (const posix_spawnattr_t *_Restrict_ __attr,
+ pid_t *_Restrict_ __pgroup)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getpgroup
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETPGROUP
+_GL_WARN_ON_USE (posix_spawnattr_getpgroup, "posix_spawnattr_getpgroup is unportable - "
+ "use gnulib module posix_spawnattr_getpgroup for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+/* Store process group ID in the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setpgroup rpl_posix_spawnattr_setpgroup
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setpgroup (posix_spawnattr_t *__attr,
+ pid_t __pgroup)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setpgroup
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETPGROUP
+_GL_WARN_ON_USE (posix_spawnattr_setpgroup, "posix_spawnattr_setpgroup is unportable - "
+ "use gnulib module posix_spawnattr_setpgroup for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+/* Get scheduling policy from the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getschedpolicy rpl_posix_spawnattr_getschedpolicy
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getschedpolicy (const posix_spawnattr_t *_Restrict_ __attr,
+ int *_Restrict_ __schedpolicy)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedpolicy
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPOLICY
+_GL_WARN_ON_USE (posix_spawnattr_getschedpolicy, "posix_spawnattr_getschedpolicy is unportable - "
+ "use gnulib module posix_spawnattr_getschedpolicy for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+/* Store scheduling policy in the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setschedpolicy rpl_posix_spawnattr_setschedpolicy
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setschedpolicy (posix_spawnattr_t *__attr,
+ int __schedpolicy)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedpolicy
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPOLICY
+_GL_WARN_ON_USE (posix_spawnattr_setschedpolicy, "posix_spawnattr_setschedpolicy is unportable - "
+ "use gnulib module posix_spawnattr_setschedpolicy for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+/* Get scheduling parameters from the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_getschedparam rpl_posix_spawnattr_getschedparam
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_getschedparam (const posix_spawnattr_t *_Restrict_ __attr,
+ struct sched_param *_Restrict_ __schedparam)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_getschedparam
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_GETSCHEDPARAM
+_GL_WARN_ON_USE (posix_spawnattr_getschedparam, "posix_spawnattr_getschedparam is unportable - "
+ "use gnulib module posix_spawnattr_getschedparam for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+/* Store scheduling parameters in the attribute structure. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawnattr_setschedparam rpl_posix_spawnattr_setschedparam
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawnattr_setschedparam (posix_spawnattr_t *_Restrict_ __attr,
+ const struct sched_param *_Restrict_ __schedparam)
+ __THROW _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawnattr_setschedparam
+# if HAVE_RAW_DECL_POSIX_SPAWNATTR_SETSCHEDPARAM
+_GL_WARN_ON_USE (posix_spawnattr_setschedparam, "posix_spawnattr_setschedparam is unportable - "
+ "use gnulib module posix_spawnattr_setschedparam for portability");
+# endif
+#endif
+
+
+#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+/* Initialize data structure for file attribute for `spawn' call. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_init rpl_posix_spawn_file_actions_init
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn_file_actions_init (posix_spawn_file_actions_t *__file_actions)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_init
+# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_INIT
+_GL_WARN_ON_USE (posix_spawn_file_actions_init, "posix_spawn_file_actions_init is unportable - "
+ "use gnulib module posix_spawn_file_actions_init for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+/* Free resources associated with FILE-ACTIONS. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_destroy rpl_posix_spawn_file_actions_destroy
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *__file_actions)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_destroy
+# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_DESTROY
+_GL_WARN_ON_USE (posix_spawn_file_actions_destroy, "posix_spawn_file_actions_destroy is unportable - "
+ "use gnulib module posix_spawn_file_actions_destroy for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `open' for the given file during the `spawn' call. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_addopen rpl_posix_spawn_file_actions_addopen
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *_Restrict_ __file_actions,
+ int __fd,
+ const char *_Restrict_ __path,
+ int __oflag, mode_t __mode)
+ __THROW _GL_ARG_NONNULL ((1, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addopen
+# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN
+_GL_WARN_ON_USE (posix_spawn_file_actions_addopen, "posix_spawn_file_actions_addopen is unportable - "
+ "use gnulib module posix_spawn_file_actions_addopen for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `close' for the given file descriptor during the `spawn' call. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_addclose rpl_posix_spawn_file_actions_addclose
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *__file_actions,
+ int __fd)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_addclose
+# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE
+_GL_WARN_ON_USE (posix_spawn_file_actions_addclose, "posix_spawn_file_actions_addclose is unportable - "
+ "use gnulib module posix_spawn_file_actions_addclose for portability");
+# endif
+#endif
+
+#if @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `dup2' for the given file descriptors during the `spawn' call. */
+# if @REPLACE_POSIX_SPAWN@
+# define posix_spawn_file_actions_adddup2 rpl_posix_spawn_file_actions_adddup2
+# endif
+# if !@HAVE_POSIX_SPAWN@ || @REPLACE_POSIX_SPAWN@
+extern int posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *__file_actions,
+ int __fd, int __newfd)
+ __THROW _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef posix_spawn_file_actions_adddup2
+# if HAVE_RAW_DECL_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2
+_GL_WARN_ON_USE (posix_spawn_file_actions_adddup2, "posix_spawn_file_actions_adddup2 is unportable - "
+ "use gnulib module posix_spawn_file_actions_adddup2 for portability");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_SPAWN_H */
+#endif /* _GL_SPAWN_H */
diff --git a/gnu/spawn_faction_addclose.c b/gnu/spawn_faction_addclose.c
new file mode 100755
index 00000000..f89209f7
--- /dev/null
+++ b/gnu/spawn_faction_addclose.c
@@ -0,0 +1,59 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __sysconf(open_max) getdtablesize ()
+#endif
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `close' for the given file descriptor during the `spawn' call. */
+int
+posix_spawn_file_actions_addclose (posix_spawn_file_actions_t *file_actions,
+ int fd)
+{
+ int maxfd = __sysconf (_SC_OPEN_MAX);
+ struct __spawn_action *rec;
+
+ /* Test for the validity of the file descriptor. */
+ if (fd < 0 || fd >= maxfd)
+ return EBADF;
+
+ /* Allocate more memory if needed. */
+ if (file_actions->_used == file_actions->_allocated
+ && __posix_spawn_file_actions_realloc (file_actions) != 0)
+ /* This can only mean we ran out of memory. */
+ return ENOMEM;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_close;
+ rec->action.open_action.fd = fd;
+
+ /* Account for the new entry. */
+ ++file_actions->_used;
+
+ return 0;
+}
diff --git a/gnu/spawn_faction_adddup2.c b/gnu/spawn_faction_adddup2.c
new file mode 100755
index 00000000..6ba9108b
--- /dev/null
+++ b/gnu/spawn_faction_adddup2.c
@@ -0,0 +1,60 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __sysconf(open_max) getdtablesize ()
+#endif
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `dup2' for the given file descriptors during the `spawn' call. */
+int
+posix_spawn_file_actions_adddup2 (posix_spawn_file_actions_t *file_actions,
+ int fd, int newfd)
+{
+ int maxfd = __sysconf (_SC_OPEN_MAX);
+ struct __spawn_action *rec;
+
+ /* Test for the validity of the file descriptor. */
+ if (fd < 0 || newfd < 0 || fd >= maxfd || newfd >= maxfd)
+ return EBADF;
+
+ /* Allocate more memory if needed. */
+ if (file_actions->_used == file_actions->_allocated
+ && __posix_spawn_file_actions_realloc (file_actions) != 0)
+ /* This can only mean we ran out of memory. */
+ return ENOMEM;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_dup2;
+ rec->action.dup2_action.fd = fd;
+ rec->action.dup2_action.newfd = newfd;
+
+ /* Account for the new entry. */
+ ++file_actions->_used;
+
+ return 0;
+}
diff --git a/gnu/spawn_faction_addopen.c b/gnu/spawn_faction_addopen.c
new file mode 100755
index 00000000..231d4be3
--- /dev/null
+++ b/gnu/spawn_faction_addopen.c
@@ -0,0 +1,63 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <errno.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __sysconf(open_max) getdtablesize ()
+#endif
+
+#include "spawn_int.h"
+
+/* Add an action to FILE-ACTIONS which tells the implementation to call
+ `open' for the given file during the `spawn' call. */
+int
+posix_spawn_file_actions_addopen (posix_spawn_file_actions_t *file_actions,
+ int fd, const char *path, int oflag,
+ mode_t mode)
+{
+ int maxfd = __sysconf (_SC_OPEN_MAX);
+ struct __spawn_action *rec;
+
+ /* Test for the validity of the file descriptor. */
+ if (fd < 0 || fd >= maxfd)
+ return EBADF;
+
+ /* Allocate more memory if needed. */
+ if (file_actions->_used == file_actions->_allocated
+ && __posix_spawn_file_actions_realloc (file_actions) != 0)
+ /* This can only mean we ran out of memory. */
+ return ENOMEM;
+
+ /* Add the new value. */
+ rec = &file_actions->_actions[file_actions->_used];
+ rec->tag = spawn_do_open;
+ rec->action.open_action.fd = fd;
+ rec->action.open_action.path = path;
+ rec->action.open_action.oflag = oflag;
+ rec->action.open_action.mode = mode;
+
+ /* Account for the new entry. */
+ ++file_actions->_used;
+
+ return 0;
+}
diff --git a/gnu/spawn_faction_destroy.c b/gnu/spawn_faction_destroy.c
new file mode 100755
index 00000000..d3b8251f
--- /dev/null
+++ b/gnu/spawn_faction_destroy.c
@@ -0,0 +1,31 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <stdlib.h>
+
+/* Initialize data structure for file attribute for `spawn' call. */
+int
+posix_spawn_file_actions_destroy (posix_spawn_file_actions_t *file_actions)
+{
+ /* Free the memory allocated. */
+ free (file_actions->_actions);
+ return 0;
+}
diff --git a/gnu/spawn_faction_init.c b/gnu/spawn_faction_init.c
new file mode 100755
index 00000000..b2d7540c
--- /dev/null
+++ b/gnu/spawn_faction_init.c
@@ -0,0 +1,56 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "spawn_int.h"
+
+
+/* Function used to increase the size of the allocated array. This
+ function is called from the `add'-functions. */
+int
+__posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *file_actions)
+{
+ int newalloc = file_actions->_allocated + 8;
+ void *newmem = realloc (file_actions->_actions,
+ newalloc * sizeof (struct __spawn_action));
+
+ if (newmem == NULL)
+ /* Not enough memory. */
+ return ENOMEM;
+
+ file_actions->_actions = (struct __spawn_action *) newmem;
+ file_actions->_allocated = newalloc;
+
+ return 0;
+}
+
+
+/* Initialize data structure for file attribute for `spawn' call. */
+int
+posix_spawn_file_actions_init (posix_spawn_file_actions_t *file_actions)
+{
+ /* Simply clear all the elements. */
+ memset (file_actions, '\0', sizeof (*file_actions));
+ return 0;
+}
diff --git a/gnu/spawn_int.h b/gnu/spawn_int.h
new file mode 100755
index 00000000..e04da6bf
--- /dev/null
+++ b/gnu/spawn_int.h
@@ -0,0 +1,62 @@
+/* Copyright (C) 2000, 2008, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <sys/types.h>
+
+/* Data structure to contain the action information. */
+struct __spawn_action
+{
+ enum
+ {
+ spawn_do_close,
+ spawn_do_dup2,
+ spawn_do_open
+ } tag;
+
+ union
+ {
+ struct
+ {
+ int fd;
+ } close_action;
+ struct
+ {
+ int fd;
+ int newfd;
+ } dup2_action;
+ struct
+ {
+ int fd;
+ const char *path;
+ int oflag;
+ mode_t mode;
+ } open_action;
+ } action;
+};
+
+#if !_LIBC
+# define __posix_spawn_file_actions_realloc gl_posix_spawn_file_actions_realloc
+#endif
+extern int __posix_spawn_file_actions_realloc (posix_spawn_file_actions_t *
+ file_actions);
+
+#if !_LIBC
+# define __spawni gl_posix_spawn_internal
+#endif
+extern int __spawni (pid_t *pid, const char *path,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp, char *const argv[],
+ char *const envp[], int use_path);
diff --git a/gnu/spawnattr_destroy.c b/gnu/spawnattr_destroy.c
new file mode 100755
index 00000000..896064d1
--- /dev/null
+++ b/gnu/spawnattr_destroy.c
@@ -0,0 +1,28 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+/* Initialize data structure for file attribute for `spawn' call. */
+int
+posix_spawnattr_destroy (posix_spawnattr_t *attr)
+{
+ /* Nothing to do in the moment. */
+ return 0;
+}
diff --git a/gnu/spawnattr_init.c b/gnu/spawnattr_init.c
new file mode 100755
index 00000000..1441f3c3
--- /dev/null
+++ b/gnu/spawnattr_init.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <string.h>
+
+/* Initialize data structure for file attribute for `spawn' call. */
+int
+posix_spawnattr_init (posix_spawnattr_t *attr)
+{
+ /* All elements have to be initialized to the default values which
+ is generally zero. */
+ memset (attr, '\0', sizeof (*attr));
+
+ return 0;
+}
diff --git a/gnu/spawnattr_setflags.c b/gnu/spawnattr_setflags.c
new file mode 100755
index 00000000..bd8a79ca
--- /dev/null
+++ b/gnu/spawnattr_setflags.c
@@ -0,0 +1,45 @@
+/* Copyright (C) 2000, 2004, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <errno.h>
+#include <string.h>
+
+#define ALL_FLAGS (POSIX_SPAWN_RESETIDS \
+ | POSIX_SPAWN_SETPGROUP \
+ | POSIX_SPAWN_SETSIGDEF \
+ | POSIX_SPAWN_SETSIGMASK \
+ | POSIX_SPAWN_SETSCHEDPARAM \
+ | POSIX_SPAWN_SETSCHEDULER \
+ | POSIX_SPAWN_USEVFORK)
+
+/* Store flags in the attribute structure. */
+int
+posix_spawnattr_setflags (posix_spawnattr_t *attr, short int flags)
+{
+ /* Check no invalid bits are set. */
+ if (flags & ~ALL_FLAGS)
+ return EINVAL;
+
+ /* Store the flag word. */
+ attr->_flags = flags;
+
+ return 0;
+}
diff --git a/gnu/spawnattr_setsigmask.c b/gnu/spawnattr_setsigmask.c
new file mode 100755
index 00000000..7c3f333c
--- /dev/null
+++ b/gnu/spawnattr_setsigmask.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include <string.h>
+
+/* Set signal mask for the new process in ATTR to SIGMASK. */
+int
+posix_spawnattr_setsigmask (posix_spawnattr_t *attr,
+ const sigset_t *sigmask)
+{
+ /* Copy the sigset_t data to the user buffer. */
+ memcpy (&attr->_ss, sigmask, sizeof (sigset_t));
+
+ return 0;
+}
diff --git a/gnu/spawni.c b/gnu/spawni.c
new file mode 100755
index 00000000..048d9cfc
--- /dev/null
+++ b/gnu/spawni.c
@@ -0,0 +1,374 @@
+/* Guts of POSIX spawn interface. Generic POSIX.1 version.
+ Copyright (C) 2000-2006, 2008-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+#include "spawn_int.h"
+
+#include <alloca.h>
+#include <errno.h>
+
+#include <fcntl.h>
+#ifndef O_LARGEFILE
+# define O_LARGEFILE 0
+#endif
+
+#if _LIBC || HAVE_PATHS_H
+# include <paths.h>
+#else
+# define _PATH_BSHELL "/bin/sh"
+#endif
+
+#include <signal.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#if _LIBC
+# include <not-cancel.h>
+#else
+# define close_not_cancel close
+# define open_not_cancel open
+#endif
+
+#if _LIBC
+# include <local-setxid.h>
+#else
+# if !HAVE_SETEUID
+# define seteuid(id) setresuid (-1, id, -1)
+# endif
+# if !HAVE_SETEGID
+# define setegid(id) setresgid (-1, id, -1)
+# endif
+# define local_seteuid(id) seteuid (id)
+# define local_setegid(id) setegid (id)
+#endif
+
+#if _LIBC
+# define alloca __alloca
+# define execve __execve
+# define dup2 __dup2
+# define fork __fork
+# define getgid __getgid
+# define getuid __getuid
+# define sched_setparam __sched_setparam
+# define sched_setscheduler __sched_setscheduler
+# define setpgid __setpgid
+# define sigaction __sigaction
+# define sigismember __sigismember
+# define sigprocmask __sigprocmask
+# define strchrnul __strchrnul
+# define vfork __vfork
+#else
+# undef internal_function
+# define internal_function /* empty */
+#endif
+
+
+/* The Unix standard contains a long explanation of the way to signal
+ an error after the fork() was successful. Since no new wait status
+ was wanted there is no way to signal an error using one of the
+ available methods. The committee chose to signal an error by a
+ normal program exit with the exit code 127. */
+#define SPAWN_ERROR 127
+
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+/* Native Woe32 API. */
+int
+__spawni (pid_t *pid, const char *file,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp, char *const argv[],
+ char *const envp[], int use_path)
+{
+ /* Not yet implemented. */
+ return ENOSYS;
+}
+
+#else
+
+
+/* The file is accessible but it is not an executable file. Invoke
+ the shell to interpret it as a script. */
+static void
+internal_function
+script_execute (const char *file, char *const argv[], char *const envp[])
+{
+ /* Count the arguments. */
+ int argc = 0;
+ while (argv[argc++])
+ ;
+
+ /* Construct an argument list for the shell. */
+ {
+ char **new_argv = (char **) alloca ((argc + 1) * sizeof (char *));
+ new_argv[0] = (char *) _PATH_BSHELL;
+ new_argv[1] = (char *) file;
+ while (argc > 1)
+ {
+ new_argv[argc] = argv[argc - 1];
+ --argc;
+ }
+
+ /* Execute the shell. */
+ execve (new_argv[0], new_argv, envp);
+ }
+}
+
+
+/* Spawn a new process executing PATH with the attributes describes in *ATTRP.
+ Before running the process perform the actions described in FILE-ACTIONS. */
+int
+__spawni (pid_t *pid, const char *file,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp, char *const argv[],
+ char *const envp[], int use_path)
+{
+ pid_t new_pid;
+ char *path, *p, *name;
+ size_t len;
+ size_t pathlen;
+
+ /* Do this once. */
+ short int flags = attrp == NULL ? 0 : attrp->_flags;
+
+ /* Avoid gcc warning
+ "variable 'flags' might be clobbered by 'longjmp' or 'vfork'" */
+ (void) &flags;
+
+ /* Generate the new process. */
+#if HAVE_VFORK
+ if ((flags & POSIX_SPAWN_USEVFORK) != 0
+ /* If no major work is done, allow using vfork. Note that we
+ might perform the path searching. But this would be done by
+ a call to execvp(), too, and such a call must be OK according
+ to POSIX. */
+ || ((flags & (POSIX_SPAWN_SETSIGMASK | POSIX_SPAWN_SETSIGDEF
+ | POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER
+ | POSIX_SPAWN_SETPGROUP | POSIX_SPAWN_RESETIDS)) == 0
+ && file_actions == NULL))
+ new_pid = vfork ();
+ else
+#endif
+ new_pid = fork ();
+
+ if (new_pid != 0)
+ {
+ if (new_pid < 0)
+ return errno;
+
+ /* The call was successful. Store the PID if necessary. */
+ if (pid != NULL)
+ *pid = new_pid;
+
+ return 0;
+ }
+
+ /* Set signal mask. */
+ if ((flags & POSIX_SPAWN_SETSIGMASK) != 0
+ && sigprocmask (SIG_SETMASK, &attrp->_ss, NULL) != 0)
+ _exit (SPAWN_ERROR);
+
+ /* Set signal default action. */
+ if ((flags & POSIX_SPAWN_SETSIGDEF) != 0)
+ {
+ /* We have to iterate over all signals. This could possibly be
+ done better but it requires system specific solutions since
+ the sigset_t data type can be very different on different
+ architectures. */
+ int sig;
+ struct sigaction sa;
+
+ memset (&sa, '\0', sizeof (sa));
+ sa.sa_handler = SIG_DFL;
+
+ for (sig = 1; sig <= NSIG; ++sig)
+ if (sigismember (&attrp->_sd, sig) != 0
+ && sigaction (sig, &sa, NULL) != 0)
+ _exit (SPAWN_ERROR);
+
+ }
+
+#if (_LIBC ? defined _POSIX_PRIORITY_SCHEDULING : HAVE_SCHED_SETPARAM && HAVE_SCHED_SETSCHEDULER)
+ /* Set the scheduling algorithm and parameters. */
+ if ((flags & (POSIX_SPAWN_SETSCHEDPARAM | POSIX_SPAWN_SETSCHEDULER))
+ == POSIX_SPAWN_SETSCHEDPARAM)
+ {
+ if (sched_setparam (0, &attrp->_sp) == -1)
+ _exit (SPAWN_ERROR);
+ }
+ else if ((flags & POSIX_SPAWN_SETSCHEDULER) != 0)
+ {
+ if (sched_setscheduler (0, attrp->_policy,
+ (flags & POSIX_SPAWN_SETSCHEDPARAM) != 0
+ ? &attrp->_sp : NULL) == -1)
+ _exit (SPAWN_ERROR);
+ }
+#endif
+
+ /* Set the process group ID. */
+ if ((flags & POSIX_SPAWN_SETPGROUP) != 0
+ && setpgid (0, attrp->_pgrp) != 0)
+ _exit (SPAWN_ERROR);
+
+ /* Set the effective user and group IDs. */
+ if ((flags & POSIX_SPAWN_RESETIDS) != 0
+ && (local_seteuid (getuid ()) != 0
+ || local_setegid (getgid ()) != 0))
+ _exit (SPAWN_ERROR);
+
+ /* Execute the file actions. */
+ if (file_actions != NULL)
+ {
+ int cnt;
+
+ for (cnt = 0; cnt < file_actions->_used; ++cnt)
+ {
+ struct __spawn_action *action = &file_actions->_actions[cnt];
+
+ switch (action->tag)
+ {
+ case spawn_do_close:
+ if (close_not_cancel (action->action.close_action.fd) != 0)
+ /* Signal the error. */
+ _exit (SPAWN_ERROR);
+ break;
+
+ case spawn_do_open:
+ {
+ int new_fd = open_not_cancel (action->action.open_action.path,
+ action->action.open_action.oflag
+ | O_LARGEFILE,
+ action->action.open_action.mode);
+
+ if (new_fd == -1)
+ /* The `open' call failed. */
+ _exit (SPAWN_ERROR);
+
+ /* Make sure the desired file descriptor is used. */
+ if (new_fd != action->action.open_action.fd)
+ {
+ if (dup2 (new_fd, action->action.open_action.fd)
+ != action->action.open_action.fd)
+ /* The `dup2' call failed. */
+ _exit (SPAWN_ERROR);
+
+ if (close_not_cancel (new_fd) != 0)
+ /* The `close' call failed. */
+ _exit (SPAWN_ERROR);
+ }
+ }
+ break;
+
+ case spawn_do_dup2:
+ if (dup2 (action->action.dup2_action.fd,
+ action->action.dup2_action.newfd)
+ != action->action.dup2_action.newfd)
+ /* The `dup2' call failed. */
+ _exit (SPAWN_ERROR);
+ break;
+ }
+ }
+ }
+
+ if (! use_path || strchr (file, '/') != NULL)
+ {
+ /* The FILE parameter is actually a path. */
+ execve (file, argv, envp);
+
+ if (errno == ENOEXEC)
+ script_execute (file, argv, envp);
+
+ /* Oh, oh. `execve' returns. This is bad. */
+ _exit (SPAWN_ERROR);
+ }
+
+ /* We have to search for FILE on the path. */
+ path = getenv ("PATH");
+ if (path == NULL)
+ {
+#if HAVE_CONFSTR
+ /* There is no `PATH' in the environment.
+ The default search path is the current directory
+ followed by the path `confstr' returns for `_CS_PATH'. */
+ len = confstr (_CS_PATH, (char *) NULL, 0);
+ path = (char *) alloca (1 + len);
+ path[0] = ':';
+ (void) confstr (_CS_PATH, path + 1, len);
+#else
+ /* Pretend that the PATH contains only the current directory. */
+ path = "";
+#endif
+ }
+
+ len = strlen (file) + 1;
+ pathlen = strlen (path);
+ name = alloca (pathlen + len + 1);
+ /* Copy the file name at the top. */
+ name = (char *) memcpy (name + pathlen + 1, file, len);
+ /* And add the slash. */
+ *--name = '/';
+
+ p = path;
+ do
+ {
+ char *startp;
+
+ path = p;
+ p = strchrnul (path, ':');
+
+ if (p == path)
+ /* Two adjacent colons, or a colon at the beginning or the end
+ of `PATH' means to search the current directory. */
+ startp = name + 1;
+ else
+ startp = (char *) memcpy (name - (p - path), path, p - path);
+
+ /* Try to execute this name. If it works, execv will not return. */
+ execve (startp, argv, envp);
+
+ if (errno == ENOEXEC)
+ script_execute (startp, argv, envp);
+
+ switch (errno)
+ {
+ case EACCES:
+ case ENOENT:
+ case ESTALE:
+ case ENOTDIR:
+ /* Those errors indicate the file is missing or not executable
+ by us, in which case we want to just try the next path
+ directory. */
+ break;
+
+ default:
+ /* Some other error means we found an executable file, but
+ something went wrong executing it; return the error to our
+ caller. */
+ _exit (SPAWN_ERROR);
+ }
+ }
+ while (*p++ != '\0');
+
+ /* Return with an error. */
+ _exit (SPAWN_ERROR);
+}
+
+#endif
diff --git a/gnu/spawnp.c b/gnu/spawnp.c
new file mode 100755
index 00000000..e7d28bf2
--- /dev/null
+++ b/gnu/spawnp.c
@@ -0,0 +1,33 @@
+/* Copyright (C) 2000, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <spawn.h>
+
+#include "spawn_int.h"
+
+/* Spawn a new process executing FILE with the attributes describes in *ATTRP.
+ Before running the process perform the actions described in FILE-ACTIONS. */
+int
+posix_spawnp (pid_t *pid, const char *file,
+ const posix_spawn_file_actions_t *file_actions,
+ const posix_spawnattr_t *attrp, char *const argv[],
+ char *const envp[])
+{
+ return __spawni (pid, file, file_actions, attrp, argv, envp, 1);
+}
diff --git a/gnu/sprintf.c b/gnu/sprintf.c
new file mode 100755
index 00000000..ad887c80
--- /dev/null
+++ b/gnu/sprintf.c
@@ -0,0 +1,80 @@
+/* Formatted output to strings.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if 1
+# include <config.h>
+#endif
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdint.h>
+#include <stdlib.h>
+
+#include "vasnprintf.h"
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+/* Print formatted output to string STR.
+ Return string length of formatted string. On error, return a negative
+ value. */
+int
+sprintf (char *str, const char *format, ...)
+{
+ char *output;
+ size_t len;
+ size_t lenbuf;
+ va_list args;
+
+ /* vasnprintf fails with EOVERFLOW when the buffer size argument is larger
+ than INT_MAX (if that fits into a 'size_t' at all).
+ Also note that glibc's iconv fails with E2BIG when we pass a length that
+ is so large that str + lenbuf wraps around, i.e.
+ (uintptr_t) (str + lenbuf) < (uintptr_t) str.
+ Therefore set lenbuf = min (SIZE_MAX, INT_MAX, - (uintptr_t) str - 1). */
+ lenbuf = (SIZE_MAX < INT_MAX ? SIZE_MAX : INT_MAX);
+ if (lenbuf > ~ (uintptr_t) str)
+ lenbuf = ~ (uintptr_t) str;
+
+ va_start (args, format);
+ output = vasnprintf (str, &lenbuf, format, args);
+ len = lenbuf;
+ va_end (args);
+
+ if (!output)
+ return -1;
+
+ if (output != str)
+ {
+ /* len is near SIZE_MAX. */
+ free (output);
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ if (len > INT_MAX)
+ {
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ return len;
+}
diff --git a/gnu/stat.c b/gnu/stat.c
new file mode 100755
index 00000000..875317bf
--- /dev/null
+++ b/gnu/stat.c
@@ -0,0 +1,104 @@
+/* Work around platform bugs in stat.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* written by Eric Blake */
+
+#include <config.h>
+
+/* Get the original definition of stat. It might be defined as a macro. */
+#define __need_system_sys_stat_h
+#include <sys/types.h>
+#include <sys/stat.h>
+#undef __need_system_sys_stat_h
+
+static inline int
+orig_stat (const char *filename, struct stat *buf)
+{
+ return stat (filename, buf);
+}
+
+/* Specification. */
+#include <sys/stat.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdbool.h>
+#include <string.h>
+
+/* Store information about NAME into ST. Work around bugs with
+ trailing slashes. Mingw has other bugs (such as st_ino always
+ being 0 on success) which this wrapper does not work around. But
+ at least this implementation provides the ability to emulate fchdir
+ correctly. */
+
+int
+rpl_stat (char const *name, struct stat *st)
+{
+ int result = orig_stat (name, st);
+#if REPLACE_FUNC_STAT_FILE
+ /* Solaris 9 mistakenly succeeds when given a non-directory with a
+ trailing slash. */
+ if (result == 0 && !S_ISDIR (st->st_mode))
+ {
+ size_t len = strlen (name);
+ if (ISSLASH (name[len - 1]))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+ }
+#endif /* REPLACE_FUNC_STAT_FILE */
+#if REPLACE_FUNC_STAT_DIR
+ if (result == -1 && errno == ENOENT)
+ {
+ /* Due to mingw's oddities, there are some directories (like
+ c:\) where stat() only succeeds with a trailing slash, and
+ other directories (like c:\windows) where stat() only
+ succeeds without a trailing slash. But we want the two to be
+ synonymous, since chdir() manages either style. Likewise, Mingw also
+ reports ENOENT for names longer than PATH_MAX, when we want
+ ENAMETOOLONG, and for stat("file/"), when we want ENOTDIR.
+ Fortunately, mingw PATH_MAX is small enough for stack
+ allocation. */
+ char fixed_name[PATH_MAX + 1] = {0};
+ size_t len = strlen (name);
+ bool check_dir = false;
+ if (PATH_MAX <= len)
+ errno = ENAMETOOLONG;
+ else if (len)
+ {
+ strcpy (fixed_name, name);
+ if (ISSLASH (fixed_name[len - 1]))
+ {
+ check_dir = true;
+ while (len && ISSLASH (fixed_name[len - 1]))
+ fixed_name[--len] = '\0';
+ if (!len)
+ fixed_name[0] = '/';
+ }
+ else
+ fixed_name[len++] = '/';
+ result = orig_stat (fixed_name, st);
+ if (result == 0 && check_dir && !S_ISDIR (st->st_mode))
+ {
+ result = -1;
+ errno = ENOTDIR;
+ }
+ }
+ }
+#endif /* REPLACE_FUNC_STAT_DIR */
+ return result;
+}
diff --git a/gnu/stdarg.in.h b/gnu/stdarg.in.h
new file mode 100755
index 00000000..3e0c49d1
--- /dev/null
+++ b/gnu/stdarg.in.h
@@ -0,0 +1,35 @@
+/* Substitute for and wrapper around <stdarg.h>.
+ Copyright (C) 2008, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STDARG_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDARG_H@
+
+#ifndef _GL_STDARG_H
+#define _GL_STDARG_H
+
+#ifndef va_copy
+# define va_copy(a,b) ((a) = (b))
+#endif
+
+#endif /* _GL_STDARG_H */
+#endif /* _GL_STDARG_H */
diff --git a/gnu/stdbool.in.h b/gnu/stdbool.in.h
new file mode 100755
index 00000000..e2312ecb
--- /dev/null
+++ b/gnu/stdbool.in.h
@@ -0,0 +1,119 @@
+/* Copyright (C) 2001-2003, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STDBOOL_H
+#define _GL_STDBOOL_H
+
+/* ISO C 99 <stdbool.h> for platforms that lack it. */
+
+/* Usage suggestions:
+
+ Programs that use <stdbool.h> should be aware of some limitations
+ and standards compliance issues.
+
+ Standards compliance:
+
+ - <stdbool.h> must be #included before 'bool', 'false', 'true'
+ can be used.
+
+ - You cannot assume that sizeof (bool) == 1.
+
+ - Programs should not undefine the macros bool, true, and false,
+ as C99 lists that as an "obsolescent feature".
+
+ Limitations of this substitute, when used in a C89 environment:
+
+ - <stdbool.h> must be #included before the '_Bool' type can be used.
+
+ - You cannot assume that _Bool is a typedef; it might be a macro.
+
+ - Bit-fields of type 'bool' are not supported. Portable code
+ should use 'unsigned int foo : 1;' rather than 'bool foo : 1;'.
+
+ - In C99, casts and automatic conversions to '_Bool' or 'bool' are
+ performed in such a way that every nonzero value gets converted
+ to 'true', and zero gets converted to 'false'. This doesn't work
+ with this substitute. With this substitute, only the values 0 and 1
+ give the expected result when converted to _Bool' or 'bool'.
+
+ Also, it is suggested that programs use 'bool' rather than '_Bool';
+ this isn't required, but 'bool' is more common. */
+
+
+/* 7.16. Boolean type and values */
+
+/* BeOS <sys/socket.h> already #defines false 0, true 1. We use the same
+ definitions below, but temporarily we have to #undef them. */
+#if defined __BEOS__ && !defined __HAIKU__
+# include <OS.h> /* defines bool but not _Bool */
+# undef false
+# undef true
+#endif
+
+/* For the sake of symbolic names in gdb, we define true and false as
+ enum constants, not only as macros.
+ It is tempting to write
+ typedef enum { false = 0, true = 1 } _Bool;
+ so that gdb prints values of type 'bool' symbolically. But if we do
+ this, values of type '_Bool' may promote to 'int' or 'unsigned int'
+ (see ISO C 99 6.7.2.2.(4)); however, '_Bool' must promote to 'int'
+ (see ISO C 99 6.3.1.1.(2)). So we add a negative value to the
+ enum; this ensures that '_Bool' promotes to 'int'. */
+#if defined __cplusplus || (defined __BEOS__ && !defined __HAIKU__)
+ /* A compiler known to have 'bool'. */
+ /* If the compiler already has both 'bool' and '_Bool', we can assume they
+ are the same types. */
+# if !@HAVE__BOOL@
+typedef bool _Bool;
+# endif
+#else
+# if !defined __GNUC__
+ /* If @HAVE__BOOL@:
+ Some HP-UX cc and AIX IBM C compiler versions have compiler bugs when
+ the built-in _Bool type is used. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ Similar bugs are likely with other compilers as well; this file
+ wouldn't be used if <stdbool.h> was working.
+ So we override the _Bool type.
+ If !@HAVE__BOOL@:
+ Need to define _Bool ourselves. As 'signed char' or as an enum type?
+ Use of a typedef, with SunPRO C, leads to a stupid
+ "warning: _Bool is a keyword in ISO C99".
+ Use of an enum type, with IRIX cc, leads to a stupid
+ "warning(1185): enumerated type mixed with another type".
+ Even the existence of an enum type, without a typedef,
+ "Invalid enumerator. (badenum)" with HP-UX cc on Tru64.
+ The only benefit of the enum, debuggability, is not important
+ with these compilers. So use 'signed char' and no enum. */
+# define _Bool signed char
+# else
+ /* With this compiler, trust the _Bool type if the compiler has it. */
+# if !@HAVE__BOOL@
+typedef enum { _Bool_must_promote_to_int = -1, false = 0, true = 1 } _Bool;
+# endif
+# endif
+#endif
+#define bool _Bool
+
+/* The other macros must be usable in preprocessor directives. */
+#define false 0
+#define true 1
+#define __bool_true_false_are_defined 1
+
+#endif /* _GL_STDBOOL_H */
diff --git a/gnu/stddef.in.h b/gnu/stddef.in.h
new file mode 100755
index 00000000..08778a23
--- /dev/null
+++ b/gnu/stddef.in.h
@@ -0,0 +1,86 @@
+/* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
+
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+/*
+ * POSIX 2008 <stddef.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/stddef.h.html>
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_wchar_t || defined __need_size_t \
+ || defined __need_ptrdiff_t || defined __need_NULL \
+ || defined __need_wint_t
+/* Special invocation convention inside gcc header files. In
+ particular, gcc provides a version of <stddef.h> that blindly
+ redefines NULL even when __need_wint_t was defined, even though
+ wint_t is not normally provided by <stddef.h>. Hence, we must
+ remember if special invocation has ever been used to obtain wint_t,
+ in which case we need to clean up NULL yet again. */
+
+# if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
+# ifdef __need_wint_t
+# undef _GL_STDDEF_H
+# define _GL_STDDEF_WINT_T
+# endif
+# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+# endif
+
+#else
+/* Normal invocation convention. */
+
+# ifndef _GL_STDDEF_H
+
+/* The include_next requires a split double-inclusion guard. */
+
+# @INCLUDE_NEXT@ @NEXT_STDDEF_H@
+
+# ifndef _GL_STDDEF_H
+# define _GL_STDDEF_H
+
+/* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
+#if @REPLACE_NULL@
+# undef NULL
+# ifdef __cplusplus
+ /* ISO C++ says that the macro NULL must expand to an integer constant
+ expression, hence '((void *) 0)' is not allowed in C++. */
+# if __GNUG__ >= 3
+ /* GNU C++ has a __null macro that behaves like an integer ('int' or
+ 'long') but has the same size as a pointer. Use that, to avoid
+ warnings. */
+# define NULL __null
+# else
+# define NULL 0L
+# endif
+# else
+# define NULL ((void *) 0)
+# endif
+#endif
+
+/* Some platforms lack wchar_t. */
+#if !@HAVE_WCHAR_T@
+# define wchar_t int
+#endif
+
+# endif /* _GL_STDDEF_H */
+# endif /* _GL_STDDEF_H */
+#endif /* __need_XXX */
diff --git a/gnu/stdint.in.h b/gnu/stdint.in.h
new file mode 100755
index 00000000..3fb87d51
--- /dev/null
+++ b/gnu/stdint.in.h
@@ -0,0 +1,567 @@
+/* Copyright (C) 2001-2002, 2004-2010 Free Software Foundation, Inc.
+ Written by Paul Eggert, Bruno Haible, Sam Steingold, Peter Burwood.
+ This file is part of gnulib.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/*
+ * ISO C 99 <stdint.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/stdint.h.html>
+ */
+
+#ifndef _GL_STDINT_H
+
+/* When including a system file that in turn includes <inttypes.h>,
+ use the system <inttypes.h>, not our substitute. This avoids
+ problems with (for example) VMS, whose <sys/bitypes.h> includes
+ <inttypes.h>. */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Get those types that are already defined in other system include
+ files, so that we can "#define int8_t signed char" below without
+ worrying about a later system include file containing a "typedef
+ signed char int8_t;" that will get messed up by our macro. Our
+ macros should all be consistent with the system versions, except
+ for the "fast" types and macros, which we recommend against using
+ in public interfaces due to compiler differences. */
+
+#if @HAVE_STDINT_H@
+# if defined __sgi && ! defined __c99
+ /* Bypass IRIX's <stdint.h> if in C89 mode, since it merely annoys users
+ with "This header file is to be used only for c99 mode compilations"
+ diagnostics. */
+# define __STDINT_H__
+# endif
+ /* Other systems may have an incomplete or buggy <stdint.h>.
+ Include it before <inttypes.h>, since any "#include <stdint.h>"
+ in <inttypes.h> would reinclude us, skipping our contents because
+ _GL_STDINT_H is defined.
+ The include_next requires a split double-inclusion guard. */
+# if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+# endif
+# @INCLUDE_NEXT@ @NEXT_STDINT_H@
+#endif
+
+#if ! defined _GL_STDINT_H && ! defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+#define _GL_STDINT_H
+
+/* <sys/types.h> defines some of the stdint.h types as well, on glibc,
+ IRIX 6.5, and OpenBSD 3.8 (via <machine/types.h>).
+ AIX 5.2 <sys/types.h> isn't needed and causes troubles.
+ MacOS X 10.4.6 <sys/types.h> includes <stdint.h> (which is us), but
+ relies on the system <stdint.h> definitions, so include
+ <sys/types.h> after @NEXT_STDINT_H@. */
+#if @HAVE_SYS_TYPES_H@ && ! defined _AIX
+# include <sys/types.h>
+#endif
+
+/* Get LONG_MIN, LONG_MAX, ULONG_MAX. */
+#include <limits.h>
+
+#if @HAVE_INTTYPES_H@
+ /* In OpenBSD 3.8, <inttypes.h> includes <machine/types.h>, which defines
+ int{8,16,32,64}_t, uint{8,16,32,64}_t and __BIT_TYPES_DEFINED__.
+ <inttypes.h> also defines intptr_t and uintptr_t. */
+# include <inttypes.h>
+#elif @HAVE_SYS_INTTYPES_H@
+ /* Solaris 7 <sys/inttypes.h> has the types except the *_fast*_t types, and
+ the macros except for *_FAST*_*, INTPTR_MIN, PTRDIFF_MIN, PTRDIFF_MAX. */
+# include <sys/inttypes.h>
+#endif
+
+#if @HAVE_SYS_BITYPES_H@ && ! defined __BIT_TYPES_DEFINED__
+ /* Linux libc4 >= 4.6.7 and libc5 have a <sys/bitypes.h> that defines
+ int{8,16,32,64}_t and __BIT_TYPES_DEFINED__. In libc5 >= 5.2.2 it is
+ included by <sys/types.h>. */
+# include <sys/bitypes.h>
+#endif
+
+#undef _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H
+
+/* Minimum and maximum values for a integer type under the usual assumption.
+ Return an unspecified value if BITS == 0, adding a check to pacify
+ picky compilers. */
+
+#define _STDINT_MIN(signed, bits, zero) \
+ ((signed) ? (- ((zero) + 1) << ((bits) ? (bits) - 1 : 0)) : (zero))
+
+#define _STDINT_MAX(signed, bits, zero) \
+ ((signed) \
+ ? ~ _STDINT_MIN (signed, bits, zero) \
+ : /* The expression for the unsigned case. The subtraction of (signed) \
+ is a nop in the unsigned case and avoids "signed integer overflow" \
+ warnings in the signed case. */ \
+ ((((zero) + 1) << ((bits) ? (bits) - 1 - (signed) : 0)) - 1) * 2 + 1)
+
+/* 7.18.1.1. Exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef int8_t
+#undef uint8_t
+typedef signed char gl_int8_t;
+typedef unsigned char gl_uint8_t;
+#define int8_t gl_int8_t
+#define uint8_t gl_uint8_t
+
+#undef int16_t
+#undef uint16_t
+typedef short int gl_int16_t;
+typedef unsigned short int gl_uint16_t;
+#define int16_t gl_int16_t
+#define uint16_t gl_uint16_t
+
+#undef int32_t
+#undef uint32_t
+typedef int gl_int32_t;
+typedef unsigned int gl_uint32_t;
+#define int32_t gl_int32_t
+#define uint32_t gl_uint32_t
+
+/* Do not undefine int64_t if gnulib is not being used with 64-bit
+ types, since otherwise it breaks platforms like Tandem/NSK. */
+#if LONG_MAX >> 31 >> 31 == 1
+# undef int64_t
+typedef long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif defined _MSC_VER
+# undef int64_t
+typedef __int64 gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#elif @HAVE_LONG_LONG_INT@
+# undef int64_t
+typedef long long int gl_int64_t;
+# define int64_t gl_int64_t
+# define GL_INT64_T
+#endif
+
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# undef uint64_t
+typedef unsigned long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif defined _MSC_VER
+# undef uint64_t
+typedef unsigned __int64 gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# undef uint64_t
+typedef unsigned long long int gl_uint64_t;
+# define uint64_t gl_uint64_t
+# define GL_UINT64_T
+#endif
+
+/* Avoid collision with Solaris 2.5.1 <pthread.h> etc. */
+#define _UINT8_T
+#define _UINT32_T
+#define _UINT64_T
+
+
+/* 7.18.1.2. Minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef int_least8_t
+#undef uint_least8_t
+#undef int_least16_t
+#undef uint_least16_t
+#undef int_least32_t
+#undef uint_least32_t
+#undef int_least64_t
+#undef uint_least64_t
+#define int_least8_t int8_t
+#define uint_least8_t uint8_t
+#define int_least16_t int16_t
+#define uint_least16_t uint16_t
+#define int_least32_t int32_t
+#define uint_least32_t uint32_t
+#ifdef GL_INT64_T
+# define int_least64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_least64_t uint64_t
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+
+/* Note: Other <stdint.h> substitutes may define these types differently.
+ It is not recommended to use these types in public header files. */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. Assume that 'long int'
+ is fast enough for all narrower integers. */
+
+#undef int_fast8_t
+#undef uint_fast8_t
+#undef int_fast16_t
+#undef uint_fast16_t
+#undef int_fast32_t
+#undef uint_fast32_t
+#undef int_fast64_t
+#undef uint_fast64_t
+typedef long int gl_int_fast8_t;
+typedef unsigned long int gl_uint_fast8_t;
+typedef long int gl_int_fast16_t;
+typedef unsigned long int gl_uint_fast16_t;
+typedef long int gl_int_fast32_t;
+typedef unsigned long int gl_uint_fast32_t;
+#define int_fast8_t gl_int_fast8_t
+#define uint_fast8_t gl_uint_fast8_t
+#define int_fast16_t gl_int_fast16_t
+#define uint_fast16_t gl_uint_fast16_t
+#define int_fast32_t gl_int_fast32_t
+#define uint_fast32_t gl_uint_fast32_t
+#ifdef GL_INT64_T
+# define int_fast64_t int64_t
+#endif
+#ifdef GL_UINT64_T
+# define uint_fast64_t uint64_t
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+
+#undef intptr_t
+#undef uintptr_t
+typedef long int gl_intptr_t;
+typedef unsigned long int gl_uintptr_t;
+#define intptr_t gl_intptr_t
+#define uintptr_t gl_uintptr_t
+
+/* 7.18.1.5. Greatest-width integer types */
+
+/* Note: These types are compiler dependent. It may be unwise to use them in
+ public header files. */
+
+#undef intmax_t
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+typedef long long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#elif defined GL_INT64_T
+# define intmax_t int64_t
+#else
+typedef long int gl_intmax_t;
+# define intmax_t gl_intmax_t
+#endif
+
+#undef uintmax_t
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+typedef unsigned long long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#elif defined GL_UINT64_T
+# define uintmax_t uint64_t
+#else
+typedef unsigned long int gl_uintmax_t;
+# define uintmax_t gl_uintmax_t
+#endif
+
+/* Verify that intmax_t and uintmax_t have the same size. Too much code
+ breaks if this is not the case. If this check fails, the reason is likely
+ to be found in the autoconf macros. */
+typedef int _verify_intmax_size[2 * (sizeof (intmax_t) == sizeof (uintmax_t)) - 1];
+
+/* 7.18.2. Limits of specified-width integer types */
+
+#if ! defined __cplusplus || defined __STDC_LIMIT_MACROS
+
+/* 7.18.2.1. Limits of exact-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. */
+
+#undef INT8_MIN
+#undef INT8_MAX
+#undef UINT8_MAX
+#define INT8_MIN (~ INT8_MAX)
+#define INT8_MAX 127
+#define UINT8_MAX 255
+
+#undef INT16_MIN
+#undef INT16_MAX
+#undef UINT16_MAX
+#define INT16_MIN (~ INT16_MAX)
+#define INT16_MAX 32767
+#define UINT16_MAX 65535
+
+#undef INT32_MIN
+#undef INT32_MAX
+#undef UINT32_MAX
+#define INT32_MIN (~ INT32_MAX)
+#define INT32_MAX 2147483647
+#define UINT32_MAX 4294967295U
+
+#undef INT64_MIN
+#undef INT64_MAX
+#ifdef GL_INT64_T
+/* Prefer (- INTMAX_C (1) << 63) over (~ INT64_MAX) because SunPRO C 5.0
+ evaluates the latter incorrectly in preprocessor expressions. */
+# define INT64_MIN (- INTMAX_C (1) << 63)
+# define INT64_MAX INTMAX_C (9223372036854775807)
+#endif
+
+#undef UINT64_MAX
+#ifdef GL_UINT64_T
+# define UINT64_MAX UINTMAX_C (18446744073709551615)
+#endif
+
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the leastN_t types
+ are the same as the corresponding N_t types. */
+
+#undef INT_LEAST8_MIN
+#undef INT_LEAST8_MAX
+#undef UINT_LEAST8_MAX
+#define INT_LEAST8_MIN INT8_MIN
+#define INT_LEAST8_MAX INT8_MAX
+#define UINT_LEAST8_MAX UINT8_MAX
+
+#undef INT_LEAST16_MIN
+#undef INT_LEAST16_MAX
+#undef UINT_LEAST16_MAX
+#define INT_LEAST16_MIN INT16_MIN
+#define INT_LEAST16_MAX INT16_MAX
+#define UINT_LEAST16_MAX UINT16_MAX
+
+#undef INT_LEAST32_MIN
+#undef INT_LEAST32_MAX
+#undef UINT_LEAST32_MAX
+#define INT_LEAST32_MIN INT32_MIN
+#define INT_LEAST32_MAX INT32_MAX
+#define UINT_LEAST32_MAX UINT32_MAX
+
+#undef INT_LEAST64_MIN
+#undef INT_LEAST64_MAX
+#ifdef GL_INT64_T
+# define INT_LEAST64_MIN INT64_MIN
+# define INT_LEAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_LEAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_LEAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits. Therefore the fastN_t types
+ are taken from the same list of types. */
+
+#undef INT_FAST8_MIN
+#undef INT_FAST8_MAX
+#undef UINT_FAST8_MAX
+#define INT_FAST8_MIN LONG_MIN
+#define INT_FAST8_MAX LONG_MAX
+#define UINT_FAST8_MAX ULONG_MAX
+
+#undef INT_FAST16_MIN
+#undef INT_FAST16_MAX
+#undef UINT_FAST16_MAX
+#define INT_FAST16_MIN LONG_MIN
+#define INT_FAST16_MAX LONG_MAX
+#define UINT_FAST16_MAX ULONG_MAX
+
+#undef INT_FAST32_MIN
+#undef INT_FAST32_MAX
+#undef UINT_FAST32_MAX
+#define INT_FAST32_MIN LONG_MIN
+#define INT_FAST32_MAX LONG_MAX
+#define UINT_FAST32_MAX ULONG_MAX
+
+#undef INT_FAST64_MIN
+#undef INT_FAST64_MAX
+#ifdef GL_INT64_T
+# define INT_FAST64_MIN INT64_MIN
+# define INT_FAST64_MAX INT64_MAX
+#endif
+
+#undef UINT_FAST64_MAX
+#ifdef GL_UINT64_T
+# define UINT_FAST64_MAX UINT64_MAX
+#endif
+
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+#undef INTPTR_MIN
+#undef INTPTR_MAX
+#undef UINTPTR_MAX
+#define INTPTR_MIN LONG_MIN
+#define INTPTR_MAX LONG_MAX
+#define UINTPTR_MAX ULONG_MAX
+
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+#undef INTMAX_MIN
+#undef INTMAX_MAX
+#ifdef INT64_MAX
+# define INTMAX_MIN INT64_MIN
+# define INTMAX_MAX INT64_MAX
+#else
+# define INTMAX_MIN INT32_MIN
+# define INTMAX_MAX INT32_MAX
+#endif
+
+#undef UINTMAX_MAX
+#ifdef UINT64_MAX
+# define UINTMAX_MAX UINT64_MAX
+#else
+# define UINTMAX_MAX UINT32_MAX
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+/* ptrdiff_t limits */
+#undef PTRDIFF_MIN
+#undef PTRDIFF_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define PTRDIFF_MIN _STDINT_MIN (1, 64, 0l)
+# define PTRDIFF_MAX _STDINT_MAX (1, 64, 0l)
+# else
+# define PTRDIFF_MIN _STDINT_MIN (1, 32, 0)
+# define PTRDIFF_MAX _STDINT_MAX (1, 32, 0)
+# endif
+#else
+# define PTRDIFF_MIN \
+ _STDINT_MIN (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+# define PTRDIFF_MAX \
+ _STDINT_MAX (1, @BITSIZEOF_PTRDIFF_T@, 0@PTRDIFF_T_SUFFIX@)
+#endif
+
+/* sig_atomic_t limits */
+#undef SIG_ATOMIC_MIN
+#undef SIG_ATOMIC_MAX
+#define SIG_ATOMIC_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+#define SIG_ATOMIC_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_SIG_ATOMIC_T@, @BITSIZEOF_SIG_ATOMIC_T@, \
+ 0@SIG_ATOMIC_T_SUFFIX@)
+
+
+/* size_t limit */
+#undef SIZE_MAX
+#if @APPLE_UNIVERSAL_BUILD@
+# ifdef _LP64
+# define SIZE_MAX _STDINT_MAX (0, 64, 0ul)
+# else
+# define SIZE_MAX _STDINT_MAX (0, 32, 0ul)
+# endif
+#else
+# define SIZE_MAX _STDINT_MAX (0, @BITSIZEOF_SIZE_T@, 0@SIZE_T_SUFFIX@)
+#endif
+
+/* wchar_t limits */
+/* Get WCHAR_MIN, WCHAR_MAX.
+ This include is not on the top, above, because on OSF/1 4.0 we have a sequence of nested
+ includes <wchar.h> -> <stdio.h> -> <getopt.h> -> <stdlib.h>, and the latter includes
+ <stdint.h> and assumes its types are already defined. */
+#if ! (defined WCHAR_MIN && defined WCHAR_MAX)
+# define _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+# include <wchar.h>
+# undef _GL_JUST_INCLUDE_SYSTEM_WCHAR_H
+#endif
+#undef WCHAR_MIN
+#undef WCHAR_MAX
+#define WCHAR_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+#define WCHAR_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WCHAR_T@, @BITSIZEOF_WCHAR_T@, 0@WCHAR_T_SUFFIX@)
+
+/* wint_t limits */
+#undef WINT_MIN
+#undef WINT_MAX
+#define WINT_MIN \
+ _STDINT_MIN (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+#define WINT_MAX \
+ _STDINT_MAX (@HAVE_SIGNED_WINT_T@, @BITSIZEOF_WINT_T@, 0@WINT_T_SUFFIX@)
+
+#endif /* !defined __cplusplus || defined __STDC_LIMIT_MACROS */
+
+/* 7.18.4. Macros for integer constants */
+
+#if ! defined __cplusplus || defined __STDC_CONSTANT_MACROS
+
+/* 7.18.4.1. Macros for minimum-width integer constants */
+/* According to ISO C 99 Technical Corrigendum 1 */
+
+/* Here we assume a standard architecture where the hardware integer
+ types have 8, 16, 32, optionally 64 bits, and int is 32 bits. */
+
+#undef INT8_C
+#undef UINT8_C
+#define INT8_C(x) x
+#define UINT8_C(x) x
+
+#undef INT16_C
+#undef UINT16_C
+#define INT16_C(x) x
+#define UINT16_C(x) x
+
+#undef INT32_C
+#undef UINT32_C
+#define INT32_C(x) x
+#define UINT32_C(x) x ## U
+
+#undef INT64_C
+#undef UINT64_C
+#if LONG_MAX >> 31 >> 31 == 1
+# define INT64_C(x) x##L
+#elif defined _MSC_VER
+# define INT64_C(x) x##i64
+#elif @HAVE_LONG_LONG_INT@
+# define INT64_C(x) x##LL
+#endif
+#if ULONG_MAX >> 31 >> 31 >> 1 == 1
+# define UINT64_C(x) x##UL
+#elif defined _MSC_VER
+# define UINT64_C(x) x##ui64
+#elif @HAVE_UNSIGNED_LONG_LONG_INT@
+# define UINT64_C(x) x##ULL
+#endif
+
+/* 7.18.4.2. Macros for greatest-width integer constants */
+
+#undef INTMAX_C
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
+# define INTMAX_C(x) x##LL
+#elif defined GL_INT64_T
+# define INTMAX_C(x) INT64_C(x)
+#else
+# define INTMAX_C(x) x##L
+#endif
+
+#undef UINTMAX_C
+#if @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1
+# define UINTMAX_C(x) x##ULL
+#elif defined GL_UINT64_T
+# define UINTMAX_C(x) UINT64_C(x)
+#else
+# define UINTMAX_C(x) x##UL
+#endif
+
+#endif /* !defined __cplusplus || defined __STDC_CONSTANT_MACROS */
+
+#endif /* _GL_STDINT_H */
+#endif /* !defined _GL_STDINT_H && !defined _GL_JUST_INCLUDE_SYSTEM_STDINT_H */
diff --git a/gnu/stdio--.h b/gnu/stdio--.h
new file mode 100755
index 00000000..b8323089
--- /dev/null
+++ b/gnu/stdio--.h
@@ -0,0 +1,41 @@
+/* Like stdio.h, but redefine some names to avoid glitches.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <stdio.h>
+#include "stdio-safer.h"
+
+#if GNULIB_FOPEN_SAFER
+# undef fopen
+# define fopen fopen_safer
+#endif
+
+#if GNULIB_FREOPEN_SAFER
+# undef freopen
+# define freopen freopen_safer
+#endif
+
+#if GNULIB_TMPFILE_SAFER
+# undef tmpfile
+# define tmpfile tmpfile_safer
+#endif
+
+#if GNULIB_POPEN_SAFER
+# undef popen
+# define popen popen_safer
+#endif
diff --git a/gnu/stdio-impl.h b/gnu/stdio-impl.h
new file mode 100755
index 00000000..7d719efe
--- /dev/null
+++ b/gnu/stdio-impl.h
@@ -0,0 +1,94 @@
+/* Implementation details of FILE streams.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Many stdio implementations have the same logic and therefore can share
+ the same implementation of stdio extension API, except that some fields
+ have different naming conventions, or their access requires some casts. */
+
+
+/* BSD stdio derived implementations. */
+
+#if defined __sferror || defined __DragonFly__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, MacOS X, Cygwin */
+
+# if defined __DragonFly__ /* DragonFly */
+ /* See <http://www.dragonflybsd.org/cvsweb/src/lib/libc/stdio/priv_stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+# define fp_ ((struct { struct __FILE_public pub; \
+ struct { unsigned char *_base; int _size; } _bf; \
+ void *cookie; \
+ void *_close; \
+ void *_read; \
+ void *_seek; \
+ void *_write; \
+ struct { unsigned char *_base; int _size; } _ub; \
+ int _ur; \
+ unsigned char _ubuf[3]; \
+ unsigned char _nbuf[1]; \
+ struct { unsigned char *_base; int _size; } _lb; \
+ int _blksize; \
+ fpos_t _offset; \
+ /* More fields, not relevant here. */ \
+ } *) fp)
+ /* See <http://www.dragonflybsd.org/cvsweb/src/include/stdio.h?rev=HEAD&content-type=text/x-cvsweb-markup>. */
+# define _p pub._p
+# define _flags pub._flags
+# define _r pub._r
+# define _w pub._w
+# else
+# define fp_ fp
+# endif
+
+# if defined __NetBSD__ || defined __OpenBSD__ /* NetBSD, OpenBSD */
+ /* See <http://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup>
+ and <http://www.openbsd.org/cgi-bin/cvsweb/src/lib/libc/stdio/fileext.h?rev=HEAD&content-type=text/x-cvsweb-markup> */
+ struct __sfileext
+ {
+ struct __sbuf _ub; /* ungetc buffer */
+ /* More fields, not relevant here. */
+ };
+# define fp_ub ((struct __sfileext *) fp->_ext._base)->_ub
+# else /* FreeBSD, DragonFly, MacOS X, Cygwin */
+# define fp_ub fp_->_ub
+# endif
+
+# define HASUB(fp) (fp_ub._base != NULL)
+
+#endif
+
+
+/* SystemV derived implementations. */
+
+#if defined _IOERR
+
+# if defined __sun && defined _LP64 /* Solaris/{SPARC,AMD64} 64-bit */
+# define fp_ ((struct { unsigned char *_ptr; \
+ unsigned char *_base; \
+ unsigned char *_end; \
+ long _cnt; \
+ int _file; \
+ unsigned int _flag; \
+ } *) fp)
+# else
+# define fp_ fp
+# endif
+
+# if defined _SCO_DS /* OpenServer */
+# define _cnt __cnt
+# define _ptr __ptr
+# define _base __base
+# define _flag __flag
+# endif
+
+#endif
diff --git a/gnu/stdio-safer.h b/gnu/stdio-safer.h
new file mode 100755
index 00000000..9a7c4da5
--- /dev/null
+++ b/gnu/stdio-safer.h
@@ -0,0 +1,36 @@
+/* Invoke stdio functions, but avoid some glitches.
+
+ Copyright (C) 2001, 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <stdio.h>
+
+#if GNULIB_FOPEN_SAFER
+FILE *fopen_safer (char const *, char const *);
+#endif
+
+#if GNULIB_FREOPEN_SAFER
+FILE *freopen_safer (char const *, char const *, FILE *);
+#endif
+
+#if GNULIB_POPEN_SAFER
+FILE *popen_safer (char const *, char const *);
+#endif
+
+#if GNULIB_TMPFILE_SAFER
+FILE *tmpfile_safer (void);
+#endif
diff --git a/gnu/stdio-write.c b/gnu/stdio-write.c
new file mode 100755
index 00000000..f7da9e42
--- /dev/null
+++ b/gnu/stdio-write.c
@@ -0,0 +1,150 @@
+/* POSIX compatible FILE stream write function.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+/* Replace these functions only if module 'sigpipe' is requested. */
+#if GNULIB_SIGPIPE
+
+/* On native Windows platforms, SIGPIPE does not exist. When write() is
+ called on a pipe with no readers, WriteFile() fails with error
+ GetLastError() = ERROR_NO_DATA, and write() in consequence fails with
+ error EINVAL. This write() function is at the basis of the function
+ which flushes the buffer of a FILE stream. */
+
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# include <errno.h>
+# include <signal.h>
+# include <io.h>
+
+# define WIN32_LEAN_AND_MEAN /* avoid including junk */
+# include <windows.h>
+
+# define CALL_WITH_SIGPIPE_EMULATION(RETTYPE, EXPRESSION, FAILED) \
+ if (ferror (stream)) \
+ return (EXPRESSION); \
+ else \
+ { \
+ RETTYPE ret; \
+ SetLastError (0); \
+ ret = (EXPRESSION); \
+ if (FAILED && GetLastError () == ERROR_NO_DATA && ferror (stream)) \
+ { \
+ int fd = fileno (stream); \
+ if (fd >= 0 \
+ && GetFileType ((HANDLE) _get_osfhandle (fd)) == FILE_TYPE_PIPE)\
+ { \
+ /* Try to raise signal SIGPIPE. */ \
+ raise (SIGPIPE); \
+ /* If it is currently blocked or ignored, change errno from \
+ EINVAL to EPIPE. */ \
+ errno = EPIPE; \
+ } \
+ } \
+ return ret; \
+ }
+
+# if !REPLACE_PRINTF_POSIX /* avoid collision with printf.c */
+# if !DEPENDS_ON_LIBINTL /* avoid collision with intl/printf.c */
+int
+printf (const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stdout, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+# endif
+
+# if !REPLACE_FPRINTF_POSIX /* avoid collision with fprintf.c */
+int
+fprintf (FILE *stream, const char *format, ...)
+{
+ int retval;
+ va_list args;
+
+ va_start (args, format);
+ retval = vfprintf (stream, format, args);
+ va_end (args);
+
+ return retval;
+}
+# endif
+
+# if !REPLACE_VPRINTF_POSIX /* avoid collision with vprintf.c */
+int
+vprintf (const char *format, va_list args)
+{
+ return vfprintf (stdout, format, args);
+}
+# endif
+
+# if !REPLACE_VFPRINTF_POSIX /* avoid collision with vfprintf.c */
+int
+vfprintf (FILE *stream, const char *format, va_list args)
+#undef vfprintf
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, vfprintf (stream, format, args), ret == EOF)
+}
+# endif
+
+int
+putchar (int c)
+{
+ return fputc (c, stdout);
+}
+
+int
+fputc (int c, FILE *stream)
+#undef fputc
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputc (c, stream), ret == EOF)
+}
+
+int
+fputs (const char *string, FILE *stream)
+#undef fputs
+{
+ CALL_WITH_SIGPIPE_EMULATION (int, fputs (string, stream), ret == EOF)
+}
+
+int
+puts (const char *string)
+#undef puts
+{
+ FILE *stream = stdout;
+ CALL_WITH_SIGPIPE_EMULATION (int, puts (string), ret == EOF)
+}
+
+size_t
+fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+#undef fwrite
+{
+ CALL_WITH_SIGPIPE_EMULATION (size_t, fwrite (ptr, s, n, stream), ret < n)
+}
+
+# endif
+#endif
diff --git a/gnu/stdio.in.h b/gnu/stdio.in.h
new file mode 100755
index 00000000..d992b8aa
--- /dev/null
+++ b/gnu/stdio.in.h
@@ -0,0 +1,675 @@
+/* A GNU-like <stdio.h>.
+
+ Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_FILE || defined __need___FILE
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDIO_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDIO_H@
+
+#ifndef _GL_STDIO_H
+#define _GL_STDIO_H
+
+/* Get va_list. Needed on many systems, including glibc 2.8. */
+#include <stdarg.h>
+
+#include <stddef.h>
+
+/* Get off_t and ssize_t. Needed on many systems, including glibc 2.8. */
+#include <sys/types.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_DPRINTF@
+# if @REPLACE_DPRINTF@
+# define dprintf rpl_dprintf
+# endif
+# if @REPLACE_DPRINTF@ || !@HAVE_DPRINTF@
+extern int dprintf (int fd, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dprintf
+# if HAVE_RAW_DECL_DPRINTF
+_GL_WARN_ON_USE (dprintf, "dprintf is unportable - "
+ "use gnulib module dprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_FCLOSE@
+# if @REPLACE_FCLOSE@
+# define fclose rpl_fclose
+ /* Close STREAM and its underlying file descriptor. */
+extern int fclose (FILE *stream) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fclose
+/* Assume fclose is always declared. */
+_GL_WARN_ON_USE (fclose, "fclose is not always POSIX compliant - "
+ "use gnulib module fclose for portable POSIX compliance");
+#endif
+
+#if @GNULIB_FFLUSH@
+# if @REPLACE_FFLUSH@
+# define fflush rpl_fflush
+ /* Flush all pending data on STREAM according to POSIX rules. Both
+ output and seekable input streams are supported.
+ Note! LOSS OF DATA can occur if fflush is applied on an input stream
+ that is _not_seekable_ or on an update stream that is _not_seekable_
+ and in which the most recent operation was input. Seekability can
+ be tested with lseek(fileno(fp),0,SEEK_CUR). */
+ extern int fflush (FILE *gl_stream);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fflush
+/* Assume fflush is always declared. */
+_GL_WARN_ON_USE (fflush, "fflush is not always POSIX compliant - "
+ "use gnulib module fflush for portable POSIX compliance");
+#endif
+
+/* It is very rare that the developer ever has full control of stdin,
+ so any use of gets warrants an unconditional warning. Assume it is
+ always declared, since it is required by C89. */
+#undef gets
+_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
+
+#if @GNULIB_FOPEN@
+# if @REPLACE_FOPEN@
+# undef fopen
+# define fopen rpl_fopen
+extern FILE * fopen (const char *filename, const char *mode)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fopen
+/* Assume fopen is always declared. */
+_GL_WARN_ON_USE (fopen, "fopen on Win32 platforms is not POSIX compatible - "
+ "use gnulib module fopen for portability");
+#endif
+
+#if @GNULIB_FPRINTF_POSIX@ || @GNULIB_FPRINTF@
+# if (@GNULIB_FPRINTF_POSIX@ && @REPLACE_FPRINTF@) \
+ || (@GNULIB_FPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# define fprintf rpl_fprintf
+# define GNULIB_overrides_fprintf 1
+extern int fprintf (FILE *fp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#endif
+#if !@GNULIB_FPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_fprintf
+# undef fprintf
+# endif
+/* Assume fprintf is always declared. */
+_GL_WARN_ON_USE (fprintf, "fprintf is not always POSIX compliant - "
+ "use gnulib module fprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_FPURGE@
+# if @REPLACE_FPURGE@
+# define fpurge rpl_fpurge
+# endif
+# if @REPLACE_FPURGE@ || !@HAVE_DECL_FPURGE@
+ /* Discard all pending buffered I/O data on STREAM.
+ STREAM must not be wide-character oriented.
+ When discarding pending output, the file position is set back to where it
+ was before the write calls. When discarding pending input, the file
+ position is advanced to match the end of the previously read input.
+ Return 0 if successful. Upon error, return -1 and set errno. */
+ extern int fpurge (FILE *gl_stream) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fpurge
+# if HAVE_RAW_DECL_FPURGE
+_GL_WARN_ON_USE (fpurge, "fpurge is not always present - "
+ "use gnulib module fpurge for portability");
+# endif
+#endif
+
+#if @GNULIB_FPUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputc
+# define fputc rpl_fputc
+extern int fputc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
+#endif
+
+#if @GNULIB_FPUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fputs
+# define fputs rpl_fputs
+extern int fputs (const char *string, FILE *stream) _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_FREOPEN@
+# if @REPLACE_FREOPEN@
+# undef freopen
+# define freopen rpl_freopen
+extern FILE * freopen (const char *filename, const char *mode, FILE *stream)
+ _GL_ARG_NONNULL ((2, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef freopen
+/* Assume freopen is always declared. */
+_GL_WARN_ON_USE (freopen, "freopen on Win32 platforms is not POSIX compatible - "
+ "use gnulib module freopen for portability");
+#endif
+
+
+/* Set up the following warnings, based on which modules are in use.
+ GNU Coding Standards discourage the use of fseek, since it imposes
+ an arbitrary limitation on some 32-bit hosts. Remember that the
+ fseek module depends on the fseeko module, so we only have three
+ cases to consider:
+
+ 1. The developer is not using either module. Issue a warning under
+ GNULIB_POSIXCHECK for both functions, to remind them that both
+ functions have bugs on some systems. _GL_NO_LARGE_FILES has no
+ impact on this warning.
+
+ 2. The developer is using both modules. They may be unaware of the
+ arbitrary limitations of fseek, so issue a warning under
+ GNULIB_POSIXCHECK. On the other hand, they may be using both
+ modules intentionally, so the developer can define
+ _GL_NO_LARGE_FILES in the compilation units where the use of fseek
+ is safe, to silence the warning.
+
+ 3. The developer is using the fseeko module, but not fseek. Gnulib
+ guarantees that fseek will still work around platform bugs in that
+ case, but we presume that the developer is aware of the pitfalls of
+ fseek and was trying to avoid it, so issue a warning even when
+ GNULIB_POSIXCHECK is undefined. Again, _GL_NO_LARGE_FILES can be
+ defined to silence the warning in particular compilation units.
+
+ Most gnulib clients that perform stream operations should fall into
+ category 3. */
+
+#if @GNULIB_FSEEK@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+# define _GL_FSEEK_WARN /* Category 2, above. */
+# undef fseek
+# endif
+# if @REPLACE_FSEEK@
+# undef fseek
+# define fseek rpl_fseek
+extern int fseek (FILE *fp, long offset, int whence) _GL_ARG_NONNULL ((1));
+# endif
+#endif
+
+#if @GNULIB_FSEEKO@
+# if !@GNULIB_FSEEK@ && !defined _GL_NO_LARGE_FILES
+# define _GL_FSEEK_WARN /* Category 3, above. */
+# undef fseek
+# endif
+# if @REPLACE_FSEEKO@
+/* Provide fseek, fseeko functions that are aware of a preceding
+ fflush(), and which detect pipes. */
+# undef fseeko
+# define fseeko rpl_fseeko
+extern int fseeko (FILE *fp, off_t offset, int whence) _GL_ARG_NONNULL ((1));
+# if !@GNULIB_FSEEK@
+# undef fseek
+# define fseek rpl_fseek
+static inline int _GL_ARG_NONNULL ((1))
+rpl_fseek (FILE *fp, long offset, int whence)
+{
+ return fseeko (fp, offset, whence);
+}
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FSEEK_WARN /* Category 1, above. */
+# undef fseek
+# undef fseeko
+# if HAVE_RAW_DECL_FSEEKO
+_GL_WARN_ON_USE (fseeko, "fseeko is unportable - "
+ "use gnulib module fseeko for portability");
+# endif
+#endif
+
+#ifdef _GL_FSEEK_WARN
+# undef _GL_FSEEK_WARN
+/* Here, either fseek is undefined (but C89 guarantees that it is
+ declared), or it is defined as rpl_fseek (declared above). */
+_GL_WARN_ON_USE (fseek, "fseek cannot handle files larger than 4 GB "
+ "on 32-bit platforms - "
+ "use fseeko function for handling of large files");
+#endif
+
+
+/* ftell, ftello. See the comments on fseek/fseeko. */
+
+#if @GNULIB_FTELL@
+# if defined GNULIB_POSIXCHECK && !defined _GL_NO_LARGE_FILES
+# define _GL_FTELL_WARN /* Category 2, above. */
+# undef ftell
+# endif
+# if @REPLACE_FTELL@
+# undef ftell
+# define ftell rpl_ftell
+extern long ftell (FILE *fp) _GL_ARG_NONNULL ((1));
+# endif
+#endif
+
+#if @GNULIB_FTELLO@
+# if !@GNULIB_FTELL@ && !defined _GL_NO_LARGE_FILES
+# define _GL_FTELL_WARN /* Category 3, above. */
+# undef ftell
+# endif
+# if @REPLACE_FTELLO@
+# undef ftello
+# define ftello rpl_ftello
+extern off_t ftello (FILE *fp) _GL_ARG_NONNULL ((1));
+# if !@GNULIB_FTELL@
+# undef ftell
+# define ftell rpl_ftell
+static inline long _GL_ARG_NONNULL ((1))
+rpl_ftell (FILE *f)
+{
+ return ftello (f);
+}
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# define _GL_FTELL_WARN /* Category 1, above. */
+# undef ftell
+# undef ftello
+# if HAVE_RAW_DECL_FTELLO
+_GL_WARN_ON_USE (ftello, "ftello is unportable - "
+ "use gnulib module ftello for portability");
+# endif
+#endif
+
+#ifdef _GL_FTELL_WARN
+# undef _GL_FTELL_WARN
+/* Here, either ftell is undefined (but C89 guarantees that it is
+ declared), or it is defined as rpl_ftell (declared above). */
+_GL_WARN_ON_USE (ftell, "ftell cannot handle files larger than 4 GB "
+ "on 32-bit platforms - "
+ "use ftello function for handling of large files");
+#endif
+
+
+#if @GNULIB_FWRITE@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef fwrite
+# define fwrite rpl_fwrite
+extern size_t fwrite (const void *ptr, size_t s, size_t n, FILE *stream)
+ _GL_ARG_NONNULL ((1, 4));
+#endif
+
+#if @GNULIB_GETDELIM@
+# if @REPLACE_GETDELIM@
+# undef getdelim
+# define getdelim rpl_getdelim
+# endif
+# if !@HAVE_DECL_GETDELIM@ || @REPLACE_GETDELIM@
+/* Read input, up to (and including) the next occurrence of DELIMITER, from
+ STREAM, store it in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+extern ssize_t getdelim (char **lineptr, size_t *linesize, int delimiter,
+ FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 4));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdelim
+# if HAVE_RAW_DECL_GETDELIM
+_GL_WARN_ON_USE (getdelim, "getdelim is unportable - "
+ "use gnulib module getdelim for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLINE@
+# if @REPLACE_GETLINE@
+# undef getline
+# define getline rpl_getline
+# endif
+# if !@HAVE_DECL_GETLINE@ || @REPLACE_GETLINE@
+/* Read a line, up to (and including) the next newline, from STREAM, store it
+ in *LINEPTR (and NUL-terminate it).
+ *LINEPTR is a pointer returned from malloc (or NULL), pointing to *LINESIZE
+ bytes of space. It is realloc'd as necessary.
+ Return the number of bytes read and stored at *LINEPTR (not including the
+ NUL terminator), or -1 on error or EOF. */
+extern ssize_t getline (char **lineptr, size_t *linesize, FILE *stream)
+ _GL_ARG_NONNULL ((1, 2, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getline
+# if HAVE_RAW_DECL_GETLINE
+_GL_WARN_ON_USE (getline, "getline is unportable - "
+ "use gnulib module getline for portability");
+# endif
+#endif
+
+#if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@
+# if @REPLACE_OBSTACK_PRINTF@
+# define obstack_printf rpl_obstack_printf
+# define obstack_vprintf rpl_obstack_vprintf
+# endif
+# if @REPLACE_OBSTACK_PRINTF@ || !@HAVE_DECL_OBSTACK_PRINTF@
+ struct obstack;
+ /* Grow an obstack with formatted output. Return the number of
+ bytes added to OBS. No trailing nul byte is added, and the
+ object should be closed with obstack_finish before use. Upon
+ memory allocation error, call obstack_alloc_failed_handler. Upon
+ other error, return -1. */
+ extern int obstack_printf (struct obstack *obs, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
+ extern int obstack_vprintf (struct obstack *obs, const char *format,
+ va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
+# endif
+#endif
+
+#if @GNULIB_PERROR@
+# if @REPLACE_PERROR@
+# define perror rpl_perror
+/* Print a message to standard error, describing the value of ERRNO,
+ (if STRING is not NULL and not empty) prefixed with STRING and ": ",
+ and terminated with a newline. */
+extern void perror (const char *string);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef perror
+/* Assume perror is always declared. */
+_GL_WARN_ON_USE (perror, "perror is not always POSIX compliant - "
+ "use gnulib module perror for portability");
+#endif
+
+#if @GNULIB_POPEN@
+# if @REPLACE_POPEN@
+# undef popen
+# define popen rpl_popen
+extern FILE *popen (const char *cmd, const char *mode)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef popen
+# if HAVE_RAW_DECL_POPEN
+_GL_WARN_ON_USE (popen, "popen is buggy on some platforms - "
+ "use gnulib module popen or pipe for more portability");
+# endif
+#endif
+
+#if @GNULIB_PRINTF_POSIX@ || @GNULIB_PRINTF@
+# if (@GNULIB_PRINTF_POSIX@ && @REPLACE_PRINTF@) \
+ || (@GNULIB_PRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+/* Don't break __attribute__((format(printf,M,N))). */
+# define printf __printf__
+# define GNULIB_overrides_printf 1
+extern int printf (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2))) _GL_ARG_NONNULL ((1));
+# endif
+#endif
+#if !@GNULIB_PRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_printf
+# undef printf
+# endif
+/* Assume printf is always declared. */
+_GL_WARN_ON_USE (printf, "printf is not always POSIX compliant - "
+ "use gnulib module printf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_PUTC@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putc
+# define putc rpl_fputc
+extern int putc (int c, FILE *stream) _GL_ARG_NONNULL ((2));
+#endif
+
+#if @GNULIB_PUTCHAR@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef putchar
+# define putchar rpl_putchar
+extern int putchar (int c);
+#endif
+
+#if @GNULIB_PUTS@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@
+# undef puts
+# define puts rpl_puts
+extern int puts (const char *string) _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_REMOVE@
+# if @REPLACE_REMOVE@
+# undef remove
+# define remove rpl_remove
+extern int remove (const char *name) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef remove
+/* Assume remove is always declared. */
+_GL_WARN_ON_USE (remove, "remove cannot handle directories on some platforms - "
+ "use gnulib module remove for more portability");
+#endif
+
+#if @GNULIB_RENAME@
+# if @REPLACE_RENAME@
+# undef rename
+# define rename rpl_rename
+extern int rename (const char *old_filename, const char *new_filename)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rename
+/* Assume rename is always declared. */
+_GL_WARN_ON_USE (rename, "rename is buggy on some platforms - "
+ "use gnulib module rename for more portability");
+#endif
+
+#if @GNULIB_RENAMEAT@
+# if @REPLACE_RENAMEAT@
+# undef renameat
+# define renameat rpl_renameat
+# endif
+# if !@HAVE_RENAMEAT@ || @REPLACE_RENAMEAT@
+extern int renameat (int fd1, char const *file1, int fd2, char const *file2)
+ _GL_ARG_NONNULL ((2, 4));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef renameat
+# if HAVE_RAW_DECL_RENAMEAT
+_GL_WARN_ON_USE (renameat, "renameat is not portable - "
+ "use gnulib module renameat for portability");
+# endif
+#endif
+
+#if @GNULIB_SNPRINTF@
+# if @REPLACE_SNPRINTF@
+# define snprintf rpl_snprintf
+# endif
+# if @REPLACE_SNPRINTF@ || !@HAVE_DECL_SNPRINTF@
+extern int snprintf (char *str, size_t size, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)))
+ _GL_ARG_NONNULL ((3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef snprintf
+# if HAVE_RAW_DECL_SNPRINTF
+_GL_WARN_ON_USE (snprintf, "snprintf is unportable - "
+ "use gnulib module snprintf for portability");
+# endif
+#endif
+
+/* Some people would argue that sprintf should be handled like gets
+ (for example, OpenBSD issues a link warning for both functions),
+ since both can cause security holes due to buffer overruns.
+ However, we believe that sprintf can be used safely, and is more
+ efficient than snprintf in those safe cases; and as proof of our
+ belief, we use sprintf in several gnulib modules. So this header
+ intentionally avoids adding a warning to sprintf except when
+ GNULIB_POSIXCHECK is defined. */
+
+#if @GNULIB_SPRINTF_POSIX@
+# if @REPLACE_SPRINTF@
+# define sprintf rpl_sprintf
+extern int sprintf (char *str, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)))
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sprintf
+/* Assume sprintf is always declared. */
+_GL_WARN_ON_USE (sprintf, "sprintf is not always POSIX compliant - "
+ "use gnulib module sprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_VASPRINTF@
+# if @REPLACE_VASPRINTF@
+# define asprintf rpl_asprintf
+# define vasprintf rpl_vasprintf
+# endif
+# if @REPLACE_VASPRINTF@ || !@HAVE_VASPRINTF@
+ /* Write formatted output to a string dynamically allocated with malloc().
+ If the memory allocation succeeds, store the address of the string in
+ *RESULT and return the number of resulting bytes, excluding the trailing
+ NUL. Upon memory allocation error, or some other error, return -1. */
+ extern int asprintf (char **result, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3))) _GL_ARG_NONNULL ((1, 2));
+ extern int vasprintf (char **result, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((1, 2));
+# endif
+#endif
+
+#if @GNULIB_VDPRINTF@
+# if @REPLACE_VDPRINTF@
+# define vdprintf rpl_vdprintf
+# endif
+# if @REPLACE_VDPRINTF@ || !@HAVE_VDPRINTF@
+extern int vdprintf (int fd, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0))) _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vdprintf
+# if HAVE_RAW_DECL_VDPRINTF
+_GL_WARN_ON_USE (vdprintf, "vdprintf is unportable - "
+ "use gnulib module vdprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VFPRINTF_POSIX@ || @GNULIB_VFPRINTF@
+# if (@GNULIB_VFPRINTF_POSIX@ && @REPLACE_VFPRINTF@) \
+ || (@GNULIB_VFPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# define vfprintf rpl_vfprintf
+# define GNULIB_overrides_vfprintf 1
+extern int vfprintf (FILE *fp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#endif
+#if !@GNULIB_VFPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vfprintf
+# undef vfprintf
+# endif
+/* Assume vfprintf is always declared. */
+_GL_WARN_ON_USE (vfprintf, "vfprintf is not always POSIX compliant - "
+ "use gnulib module vfprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_VPRINTF_POSIX@ || @GNULIB_VPRINTF@
+# if (@GNULIB_VPRINTF_POSIX@ && @REPLACE_VPRINTF@) \
+ || (@GNULIB_VPRINTF@ && @REPLACE_STDIO_WRITE_FUNCS@ && @GNULIB_STDIO_H_SIGPIPE@)
+# define vprintf rpl_vprintf
+# define GNULIB_overrides_vprintf 1
+extern int vprintf (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0))) _GL_ARG_NONNULL ((1));
+# endif
+#endif
+#if !@GNULIB_VPRINTF_POSIX@ && defined GNULIB_POSIXCHECK
+# if !GNULIB_overrides_vprintf
+# undef vprintf
+# endif
+/* Assume vprintf is always declared. */
+_GL_WARN_ON_USE (vprintf, "vprintf is not always POSIX compliant - "
+ "use gnulib module vprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#if @GNULIB_VSNPRINTF@
+# if @REPLACE_VSNPRINTF@
+# define vsnprintf rpl_vsnprintf
+# endif
+# if @REPLACE_VSNPRINTF@ || !@HAVE_DECL_VSNPRINTF@
+extern int vsnprintf (char *str, size_t size, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)))
+ _GL_ARG_NONNULL ((3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsnprintf
+# if HAVE_RAW_DECL_VSNPRINTF
+_GL_WARN_ON_USE (vsnprintf, "vsnprintf is unportable - "
+ "use gnulib module vsnprintf for portability");
+# endif
+#endif
+
+#if @GNULIB_VSPRINTF_POSIX@
+# if @REPLACE_VSPRINTF@
+# define vsprintf rpl_vsprintf
+extern int vsprintf (char *str, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)))
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef vsprintf
+/* Assume vsprintf is always declared. */
+_GL_WARN_ON_USE (vsprintf, "vsprintf is not always POSIX compliant - "
+ "use gnulib module vsprintf-posix for portable "
+ "POSIX compliance");
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STDIO_H */
+#endif /* _GL_STDIO_H */
+#endif
diff --git a/gnu/stdlib--.h b/gnu/stdlib--.h
new file mode 100755
index 00000000..368eb56a
--- /dev/null
+++ b/gnu/stdlib--.h
@@ -0,0 +1,36 @@
+/* Like stdlib.h, but redefine some names to avoid glitches.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <stdlib.h>
+#include "stdlib-safer.h"
+
+#undef mkstemp
+#define mkstemp mkstemp_safer
+
+#if GNULIB_MKOSTEMP
+# define mkostemp mkostemp_safer
+#endif
+
+#if GNULIB_MKOSTEMPS
+# define mkostemps mkostemps_safer
+#endif
+
+#if GNULIB_MKSTEMPS
+# define mkstemps mkstemps_safer
+#endif
diff --git a/gnu/stdlib-safer.h b/gnu/stdlib-safer.h
new file mode 100755
index 00000000..ff0cadc0
--- /dev/null
+++ b/gnu/stdlib-safer.h
@@ -0,0 +1,32 @@
+/* Invoke stdlib.h functions, but avoid some glitches.
+
+ Copyright (C) 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+int mkstemp_safer (char *);
+
+#if GNULIB_MKOSTEMP
+int mkostemp_safer (char *, int);
+#endif
+
+#if GNULIB_MKOSTEMPS
+int mkostemps_safer (char *, int, int);
+#endif
+
+#if GNULIB_MKSTEMPS
+int mkstemps_safer (char *, int);
+#endif
diff --git a/gnu/stdlib.in.h b/gnu/stdlib.in.h
new file mode 100755
index 00000000..7f86496f
--- /dev/null
+++ b/gnu/stdlib.in.h
@@ -0,0 +1,497 @@
+/* A GNU-like <stdlib.h>.
+
+ Copyright (C) 1995, 2001-2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_malloc_and_calloc
+/* Special invocation convention inside glibc header files. */
+
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_STDLIB_H
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STDLIB_H@
+
+#ifndef _GL_STDLIB_H
+#define _GL_STDLIB_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* Solaris declares getloadavg() in <sys/loadavg.h>. */
+#if (@GNULIB_GETLOADAVG@ || defined GNULIB_POSIXCHECK) && @HAVE_SYS_LOADAVG_H@
+# include <sys/loadavg.h>
+#endif
+
+/* OSF/1 5.1 declares 'struct random_data' in <random.h>, which is included
+ from <stdlib.h> if _REENTRANT is defined. Include it always. */
+#if @HAVE_RANDOM_H@
+# include <random.h>
+#endif
+
+#if !@HAVE_STRUCT_RANDOM_DATA@ || (@GNULIB_RANDOM_R@ && !@HAVE_RANDOM_R@) \
+ || defined GNULIB_POSIXCHECK
+# include <stdint.h>
+#endif
+
+#if !@HAVE_STRUCT_RANDOM_DATA@
+struct random_data
+{
+ int32_t *fptr; /* Front pointer. */
+ int32_t *rptr; /* Rear pointer. */
+ int32_t *state; /* Array of state values. */
+ int rand_type; /* Type of random number generator. */
+ int rand_deg; /* Degree of random number generator. */
+ int rand_sep; /* Distance between front and rear. */
+ int32_t *end_ptr; /* Pointer behind state table. */
+};
+#endif
+
+#if (@GNULIB_MKSTEMP@ || @GNULIB_GETSUBOPT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+/* On MacOS X 10.3, only <unistd.h> declares mkstemp. */
+/* On Cygwin 1.7.1, only <unistd.h> declares getsubopt. */
+/* But avoid namespace pollution on glibc systems. */
+# include <unistd.h>
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* Some systems do not define EXIT_*, despite otherwise supporting C89. */
+#ifndef EXIT_SUCCESS
+# define EXIT_SUCCESS 0
+#endif
+/* Tandem/NSK and other platforms that define EXIT_FAILURE as -1 interfere
+ with proper operation of xargs. */
+#ifndef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#elif EXIT_FAILURE != 1
+# undef EXIT_FAILURE
+# define EXIT_FAILURE 1
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if @GNULIB_ATOLL@
+# if !@HAVE_ATOLL@
+/* Parse a signed decimal integer.
+ Returns the value of the integer. Errors are not detected. */
+extern long long atoll (const char *string) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef atoll
+# if HAVE_RAW_DECL_ATOLL
+_GL_WARN_ON_USE (atoll, "atoll is unportable - "
+ "use gnulib module atoll for portability");
+# endif
+#endif
+
+#if @GNULIB_CALLOC_POSIX@
+# if !@HAVE_CALLOC_POSIX@
+# undef calloc
+# define calloc rpl_calloc
+extern void * calloc (size_t nmemb, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef calloc
+/* Assume calloc is always declared. */
+_GL_WARN_ON_USE (calloc, "calloc is not POSIX compliant everywhere - "
+ "use gnulib module calloc-posix for portability");
+#endif
+
+#if @GNULIB_CANONICALIZE_FILE_NAME@
+# if @REPLACE_CANONICALIZE_FILE_NAME@
+# define canonicalize_file_name rpl_canonicalize_file_name
+# endif
+# if !@HAVE_CANONICALIZE_FILE_NAME@ || @REPLACE_CANONICALIZE_FILE_NAME@
+extern char *canonicalize_file_name (const char *name) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef canonicalize_file_name
+# if HAVE_RAW_DECL_CANONICALIZE_FILE_NAME
+_GL_WARN_ON_USE (canonicalize_file_name, "canonicalize_file_name is unportable - "
+ "use gnulib module canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_GETLOADAVG@
+# if !@HAVE_DECL_GETLOADAVG@
+/* Store max(NELEM,3) load average numbers in LOADAVG[].
+ The three numbers are the load average of the last 1 minute, the last 5
+ minutes, and the last 15 minutes, respectively.
+ LOADAVG is an array of NELEM numbers. */
+extern int getloadavg (double loadavg[], int nelem) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getloadavg
+# if HAVE_RAW_DECL_GETLOADAVG
+_GL_WARN_ON_USE (getloadavg, "getloadavg is not portable - "
+ "use gnulib module getloadavg for portability");
+# endif
+#endif
+
+#if @GNULIB_GETSUBOPT@
+/* Assuming *OPTIONP is a comma separated list of elements of the form
+ "token" or "token=value", getsubopt parses the first of these elements.
+ If the first element refers to a "token" that is member of the given
+ NULL-terminated array of tokens:
+ - It replaces the comma with a NUL byte, updates *OPTIONP to point past
+ the first option and the comma, sets *VALUEP to the value of the
+ element (or NULL if it doesn't contain an "=" sign),
+ - It returns the index of the "token" in the given array of tokens.
+ Otherwise it returns -1, and *OPTIONP and *VALUEP are undefined.
+ For more details see the POSIX:2001 specification.
+ http://www.opengroup.org/susv3xsh/getsubopt.html */
+# if !@HAVE_GETSUBOPT@
+extern int getsubopt (char **optionp, char *const *tokens, char **valuep)
+ _GL_ARG_NONNULL ((1, 2, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getsubopt
+# if HAVE_RAW_DECL_GETSUBOPT
+_GL_WARN_ON_USE (getsubopt, "getsubopt is unportable - "
+ "use gnulib module getsubopt for portability");
+# endif
+#endif
+
+#if @GNULIB_MALLOC_POSIX@
+# if !@HAVE_MALLOC_POSIX@
+# undef malloc
+# define malloc rpl_malloc
+extern void * malloc (size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef malloc
+/* Assume malloc is always declared. */
+_GL_WARN_ON_USE (malloc, "malloc is not POSIX compliant everywhere - "
+ "use gnulib module malloc-posix for portability");
+#endif
+
+#if @GNULIB_MKDTEMP@
+# if !@HAVE_MKDTEMP@
+/* Create a unique temporary directory from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the directory name unique.
+ Returns TEMPLATE, or a null pointer if it cannot get a unique name.
+ The directory is created mode 700. */
+extern char * mkdtemp (char * /*template*/) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkdtemp
+# if HAVE_RAW_DECL_MKDTEMP
+_GL_WARN_ON_USE (mkdtemp, "mkdtemp is unportable - "
+ "use gnulib module mkdtemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMP@
+# if !@HAVE_MKOSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkostemp (char * /*template*/, int /*flags*/) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemp
+# if HAVE_RAW_DECL_MKOSTEMP
+_GL_WARN_ON_USE (mkostemp, "mkostemp is unportable - "
+ "use gnulib module mkostemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKOSTEMPS@
+# if !@HAVE_MKOSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE before a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ The file is then created, with the specified flags, ensuring it didn't exist
+ before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkostemps (char * /*template*/, int /*suffixlen*/, int /*flags*/)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkostemps
+# if HAVE_RAW_DECL_MKOSTEMPS
+_GL_WARN_ON_USE (mkostemps, "mkostemps is unportable - "
+ "use gnulib module mkostemps for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMP@
+# if @REPLACE_MKSTEMP@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+# define mkstemp rpl_mkstemp
+extern int mkstemp (char * /*template*/) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemp
+# if HAVE_RAW_DECL_MKSTEMP
+_GL_WARN_ON_USE (mkstemp, "mkstemp is unportable - "
+ "use gnulib module mkstemp for portability");
+# endif
+#endif
+
+#if @GNULIB_MKSTEMPS@
+# if !@HAVE_MKSTEMPS@
+/* Create a unique temporary file from TEMPLATE.
+ The last six characters of TEMPLATE prior to a suffix of length
+ SUFFIXLEN must be "XXXXXX";
+ they are replaced with a string that makes the file name unique.
+ The file is then created, ensuring it didn't exist before.
+ The file is created read-write (mask at least 0600 & ~umask), but it may be
+ world-readable and world-writable (mask 0666 & ~umask), depending on the
+ implementation.
+ Returns the open file descriptor if successful, otherwise -1 and errno
+ set. */
+extern int mkstemps (char * /*template*/, int /*suffixlen*/)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkstemps
+# if HAVE_RAW_DECL_MKSTEMPS
+_GL_WARN_ON_USE (mkstemps, "mkstemps is unportable - "
+ "use gnulib module mkstemps for portability");
+# endif
+#endif
+
+#if @GNULIB_PUTENV@
+# if @REPLACE_PUTENV@
+# undef putenv
+# define putenv rpl_putenv
+extern int putenv (char *string) _GL_ARG_NONNULL ((1));
+# endif
+#endif
+
+#if @GNULIB_RANDOM_R@
+# if !@HAVE_RANDOM_R@
+
+# ifndef RAND_MAX
+# define RAND_MAX 2147483647
+# endif
+
+int srandom_r (unsigned int seed, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2));
+int initstate_r (unsigned int seed, char *buf, size_t buf_size,
+ struct random_data *rand_state)
+ _GL_ARG_NONNULL ((2, 4));
+int setstate_r (char *arg_state, struct random_data *rand_state)
+ _GL_ARG_NONNULL ((1, 2));
+int random_r (struct random_data *buf, int32_t *result)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef random_r
+# if HAVE_RAW_DECL_RANDOM_R
+_GL_WARN_ON_USE (random_r, "random_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+# undef initstate_r
+# if HAVE_RAW_DECL_INITSTATE_R
+_GL_WARN_ON_USE (initstate_r, "initstate_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+# undef srandom_r
+# if HAVE_RAW_DECL_SRANDOM_R
+_GL_WARN_ON_USE (srandom_r, "srandom_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+# undef setstate_r
+# if HAVE_RAW_DECL_SETSTATE_R
+_GL_WARN_ON_USE (setstate_r, "setstate_r is unportable - "
+ "use gnulib module random_r for portability");
+# endif
+#endif
+
+#if @GNULIB_REALLOC_POSIX@
+# if !@HAVE_REALLOC_POSIX@
+# undef realloc
+# define realloc rpl_realloc
+extern void * realloc (void *ptr, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef realloc
+/* Assume realloc is always declared. */
+_GL_WARN_ON_USE (realloc, "realloc is not POSIX compliant everywhere - "
+ "use gnulib module realloc-posix for portability");
+#endif
+
+#if @GNULIB_REALPATH@
+# if @REPLACE_REALPATH@
+# define realpath rpl_realpath
+# endif
+# if !@HAVE_REALPATH@ || @REPLACE_REALPATH@
+extern char *realpath (const char *name, char *resolved) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef realpath
+# if HAVE_RAW_DECL_REALPATH
+_GL_WARN_ON_USE (realpath, "realpath is unportable - use gnulib module "
+ "canonicalize or canonicalize-lgpl for portability");
+# endif
+#endif
+
+#if @GNULIB_RPMATCH@
+# if !@HAVE_RPMATCH@
+/* Test a user response to a question.
+ Return 1 if it is affirmative, 0 if it is negative, or -1 if not clear. */
+extern int rpmatch (const char *response) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rpmatch
+# if HAVE_RAW_DECL_RPMATCH
+_GL_WARN_ON_USE (rpmatch, "rpmatch is unportable - "
+ "use gnulib module rpmatch for portability");
+# endif
+#endif
+
+#if @GNULIB_SETENV@
+# if @REPLACE_SETENV@
+# undef setenv
+# define setenv rpl_setenv
+# endif
+# if !@HAVE_SETENV@ || @REPLACE_SETENV@
+/* Set NAME to VALUE in the environment.
+ If REPLACE is nonzero, overwrite an existing value. */
+extern int setenv (const char *name, const char *value, int replace)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef setenv
+# if HAVE_RAW_DECL_SETENV
+_GL_WARN_ON_USE (setenv, "setenv is unportable - "
+ "use gnulib module setenv for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOD@
+# if @REPLACE_STRTOD@
+# define strtod rpl_strtod
+# endif
+# if !@HAVE_STRTOD@ || @REPLACE_STRTOD@
+ /* Parse a double from STRING, updating ENDP if appropriate. */
+extern double strtod (const char *str, char **endp) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtod
+# if HAVE_RAW_DECL_STRTOD
+_GL_WARN_ON_USE (strtod, "strtod is unportable - "
+ "use gnulib module strtod for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOLL@
+# if !@HAVE_STRTOLL@
+/* Parse a signed integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is LLONG_MAX or LLONG_MIN, and errno is set
+ to ERANGE. */
+extern long long strtoll (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoll
+# if HAVE_RAW_DECL_STRTOLL
+_GL_WARN_ON_USE (strtoll, "strtoll is unportable - "
+ "use gnulib module strtoll for portability");
+# endif
+#endif
+
+#if @GNULIB_STRTOULL@
+# if !@HAVE_STRTOULL@
+/* Parse an unsigned integer whose textual representation starts at STRING.
+ The integer is expected to be in base BASE (2 <= BASE <= 36); if BASE == 0,
+ it may be decimal or octal (with prefix "0") or hexadecimal (with prefix
+ "0x").
+ If ENDPTR is not NULL, the address of the first byte after the integer is
+ stored in *ENDPTR.
+ Upon overflow, the return value is ULLONG_MAX, and errno is set to
+ ERANGE. */
+extern unsigned long long strtoull (const char *string, char **endptr, int base)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtoull
+# if HAVE_RAW_DECL_STRTOULL
+_GL_WARN_ON_USE (strtoull, "strtoull is unportable - "
+ "use gnulib module strtoull for portability");
+# endif
+#endif
+
+#if @GNULIB_UNSETENV@
+# if @REPLACE_UNSETENV@
+# undef unsetenv
+# define unsetenv rpl_unsetenv
+# endif
+# if !@HAVE_UNSETENV@ || @REPLACE_UNSETENV@
+/* Remove the variable NAME from the environment. */
+extern int unsetenv (const char *name) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unsetenv
+# if HAVE_RAW_DECL_UNSETENV
+_GL_WARN_ON_USE (unsetenv, "unsetenv is unportable - "
+ "use gnulib module unsetenv for portability");
+# endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STDLIB_H */
+#endif /* _GL_STDLIB_H */
+#endif
diff --git a/gnu/str-kmp.h b/gnu/str-kmp.h
new file mode 100755
index 00000000..d0e9bd23
--- /dev/null
+++ b/gnu/str-kmp.h
@@ -0,0 +1,150 @@
+/* Substring search in a NUL terminated string of 'char' elements,
+ using the Knuth-Morris-Pratt algorithm.
+ Copyright (C) 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2005.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Before including this file, you need to define:
+ CANON_ELEMENT(c) A macro that canonicalizes an element right after
+ it has been fetched from one of the two strings.
+ The argument is an 'unsigned char'; the result
+ must be an 'unsigned char' as well. */
+
+/* Knuth-Morris-Pratt algorithm.
+ See http://en.wikipedia.org/wiki/Knuth-Morris-Pratt_algorithm
+ Return a boolean indicating success:
+ Return true and set *RESULTP if the search was completed.
+ Return false if it was aborted because not enough memory was available. */
+static bool
+knuth_morris_pratt_unibyte (const char *haystack, const char *needle,
+ const char **resultp)
+{
+ size_t m = strlen (needle);
+
+ /* Allocate the table. */
+ size_t *table = (size_t *) nmalloca (m, sizeof (size_t));
+ if (table == NULL)
+ return false;
+ /* Fill the table.
+ For 0 < i < m:
+ 0 < table[i] <= i is defined such that
+ forall 0 < x < table[i]: needle[x..i-1] != needle[0..i-1-x],
+ and table[i] is as large as possible with this property.
+ This implies:
+ 1) For 0 < i < m:
+ If table[i] < i,
+ needle[table[i]..i-1] = needle[0..i-1-table[i]].
+ 2) For 0 < i < m:
+ rhaystack[0..i-1] == needle[0..i-1]
+ and exists h, i <= h < m: rhaystack[h] != needle[h]
+ implies
+ forall 0 <= x < table[i]: rhaystack[x..x+m-1] != needle[0..m-1].
+ table[0] remains uninitialized. */
+ {
+ size_t i, j;
+
+ /* i = 1: Nothing to verify for x = 0. */
+ table[1] = 1;
+ j = 0;
+
+ for (i = 2; i < m; i++)
+ {
+ /* Here: j = i-1 - table[i-1].
+ The inequality needle[x..i-1] != needle[0..i-1-x] is known to hold
+ for x < table[i-1], by induction.
+ Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */
+ unsigned char b = CANON_ELEMENT ((unsigned char) needle[i - 1]);
+
+ for (;;)
+ {
+ /* Invariants: The inequality needle[x..i-1] != needle[0..i-1-x]
+ is known to hold for x < i-1-j.
+ Furthermore, if j>0: needle[i-1-j..i-2] = needle[0..j-1]. */
+ if (b == CANON_ELEMENT ((unsigned char) needle[j]))
+ {
+ /* Set table[i] := i-1-j. */
+ table[i] = i - ++j;
+ break;
+ }
+ /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+ for x = i-1-j, because
+ needle[i-1] != needle[j] = needle[i-1-x]. */
+ if (j == 0)
+ {
+ /* The inequality holds for all possible x. */
+ table[i] = i;
+ break;
+ }
+ /* The inequality needle[x..i-1] != needle[0..i-1-x] also holds
+ for i-1-j < x < i-1-j+table[j], because for these x:
+ needle[x..i-2]
+ = needle[x-(i-1-j)..j-1]
+ != needle[0..j-1-(x-(i-1-j))] (by definition of table[j])
+ = needle[0..i-2-x],
+ hence needle[x..i-1] != needle[0..i-1-x].
+ Furthermore
+ needle[i-1-j+table[j]..i-2]
+ = needle[table[j]..j-1]
+ = needle[0..j-1-table[j]] (by definition of table[j]). */
+ j = j - table[j];
+ }
+ /* Here: j = i - table[i]. */
+ }
+ }
+
+ /* Search, using the table to accelerate the processing. */
+ {
+ size_t j;
+ const char *rhaystack;
+ const char *phaystack;
+
+ *resultp = NULL;
+ j = 0;
+ rhaystack = haystack;
+ phaystack = haystack;
+ /* Invariant: phaystack = rhaystack + j. */
+ while (*phaystack != '\0')
+ if (CANON_ELEMENT ((unsigned char) needle[j])
+ == CANON_ELEMENT ((unsigned char) *phaystack))
+ {
+ j++;
+ phaystack++;
+ if (j == m)
+ {
+ /* The entire needle has been found. */
+ *resultp = rhaystack;
+ break;
+ }
+ }
+ else if (j > 0)
+ {
+ /* Found a match of needle[0..j-1], mismatch at needle[j]. */
+ rhaystack += table[j];
+ j -= table[j];
+ }
+ else
+ {
+ /* Found a mismatch at needle[0] already. */
+ rhaystack++;
+ phaystack++;
+ }
+ }
+
+ freea (table);
+ return true;
+}
+
+#undef CANON_ELEMENT
diff --git a/gnu/str-two-way.h b/gnu/str-two-way.h
new file mode 100755
index 00000000..c08f60ef
--- /dev/null
+++ b/gnu/str-two-way.h
@@ -0,0 +1,429 @@
+/* Byte-wise substring search, using the Two-Way algorithm.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Written by Eric Blake <ebb9@byu.net>, 2008.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Before including this file, you need to include <config.h> and
+ <string.h>, and define:
+ RESULT_TYPE A macro that expands to the return type.
+ AVAILABLE(h, h_l, j, n_l)
+ A macro that returns nonzero if there are
+ at least N_L bytes left starting at H[J].
+ H is 'unsigned char *', H_L, J, and N_L
+ are 'size_t'; H_L is an lvalue. For
+ NUL-terminated searches, H_L can be
+ modified each iteration to avoid having
+ to compute the end of H up front.
+
+ For case-insensitivity, you may optionally define:
+ CMP_FUNC(p1, p2, l) A macro that returns 0 iff the first L
+ characters of P1 and P2 are equal.
+ CANON_ELEMENT(c) A macro that canonicalizes an element right after
+ it has been fetched from one of the two strings.
+ The argument is an 'unsigned char'; the result
+ must be an 'unsigned char' as well.
+
+ This file undefines the macros documented above, and defines
+ LONG_NEEDLE_THRESHOLD.
+*/
+
+#include <limits.h>
+#include <stdint.h>
+
+/* We use the Two-Way string matching algorithm, which guarantees
+ linear complexity with constant space. Additionally, for long
+ needles, we also use a bad character shift table similar to the
+ Boyer-Moore algorithm to achieve improved (potentially sub-linear)
+ performance.
+
+ See http://www-igm.univ-mlv.fr/~lecroq/string/node26.html#SECTION00260
+ and http://en.wikipedia.org/wiki/Boyer-Moore_string_search_algorithm
+*/
+
+/* Point at which computing a bad-byte shift table is likely to be
+ worthwhile. Small needles should not compute a table, since it
+ adds (1 << CHAR_BIT) + NEEDLE_LEN computations of preparation for a
+ speedup no greater than a factor of NEEDLE_LEN. The larger the
+ needle, the better the potential performance gain. On the other
+ hand, on non-POSIX systems with CHAR_BIT larger than eight, the
+ memory required for the table is prohibitive. */
+#if CHAR_BIT < 10
+# define LONG_NEEDLE_THRESHOLD 32U
+#else
+# define LONG_NEEDLE_THRESHOLD SIZE_MAX
+#endif
+
+#ifndef MAX
+# define MAX(a, b) ((a < b) ? (b) : (a))
+#endif
+
+#ifndef CANON_ELEMENT
+# define CANON_ELEMENT(c) c
+#endif
+#ifndef CMP_FUNC
+# define CMP_FUNC memcmp
+#endif
+
+/* Perform a critical factorization of NEEDLE, of length NEEDLE_LEN.
+ Return the index of the first byte in the right half, and set
+ *PERIOD to the global period of the right half.
+
+ The global period of a string is the smallest index (possibly its
+ length) at which all remaining bytes in the string are repetitions
+ of the prefix (the last repetition may be a subset of the prefix).
+
+ When NEEDLE is factored into two halves, a local period is the
+ length of the smallest word that shares a suffix with the left half
+ and shares a prefix with the right half. All factorizations of a
+ non-empty NEEDLE have a local period of at least 1 and no greater
+ than NEEDLE_LEN.
+
+ A critical factorization has the property that the local period
+ equals the global period. All strings have at least one critical
+ factorization with the left half smaller than the global period.
+
+ Given an ordered alphabet, a critical factorization can be computed
+ in linear time, with 2 * NEEDLE_LEN comparisons, by computing the
+ larger of two ordered maximal suffixes. The ordered maximal
+ suffixes are determined by lexicographic comparison of
+ periodicity. */
+static size_t
+critical_factorization (const unsigned char *needle, size_t needle_len,
+ size_t *period)
+{
+ /* Index of last byte of left half, or SIZE_MAX. */
+ size_t max_suffix, max_suffix_rev;
+ size_t j; /* Index into NEEDLE for current candidate suffix. */
+ size_t k; /* Offset into current period. */
+ size_t p; /* Intermediate period. */
+ unsigned char a, b; /* Current comparison bytes. */
+
+ /* Invariants:
+ 0 <= j < NEEDLE_LEN - 1
+ -1 <= max_suffix{,_rev} < j (treating SIZE_MAX as if it were signed)
+ min(max_suffix, max_suffix_rev) < global period of NEEDLE
+ 1 <= p <= global period of NEEDLE
+ p == global period of the substring NEEDLE[max_suffix{,_rev}+1...j]
+ 1 <= k <= p
+ */
+
+ /* Perform lexicographic search. */
+ max_suffix = SIZE_MAX;
+ j = 0;
+ k = p = 1;
+ while (j + k < needle_len)
+ {
+ a = CANON_ELEMENT (needle[j + k]);
+ b = CANON_ELEMENT (needle[max_suffix + k]);
+ if (a < b)
+ {
+ /* Suffix is smaller, period is entire prefix so far. */
+ j += k;
+ k = 1;
+ p = j - max_suffix;
+ }
+ else if (a == b)
+ {
+ /* Advance through repetition of the current period. */
+ if (k != p)
+ ++k;
+ else
+ {
+ j += p;
+ k = 1;
+ }
+ }
+ else /* b < a */
+ {
+ /* Suffix is larger, start over from current location. */
+ max_suffix = j++;
+ k = p = 1;
+ }
+ }
+ *period = p;
+
+ /* Perform reverse lexicographic search. */
+ max_suffix_rev = SIZE_MAX;
+ j = 0;
+ k = p = 1;
+ while (j + k < needle_len)
+ {
+ a = CANON_ELEMENT (needle[j + k]);
+ b = CANON_ELEMENT (needle[max_suffix_rev + k]);
+ if (b < a)
+ {
+ /* Suffix is smaller, period is entire prefix so far. */
+ j += k;
+ k = 1;
+ p = j - max_suffix_rev;
+ }
+ else if (a == b)
+ {
+ /* Advance through repetition of the current period. */
+ if (k != p)
+ ++k;
+ else
+ {
+ j += p;
+ k = 1;
+ }
+ }
+ else /* a < b */
+ {
+ /* Suffix is larger, start over from current location. */
+ max_suffix_rev = j++;
+ k = p = 1;
+ }
+ }
+
+ /* Choose the longer suffix. Return the first byte of the right
+ half, rather than the last byte of the left half. */
+ if (max_suffix_rev + 1 < max_suffix + 1)
+ return max_suffix + 1;
+ *period = p;
+ return max_suffix_rev + 1;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+ NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This
+ method is optimized for NEEDLE_LEN < LONG_NEEDLE_THRESHOLD.
+ Performance is guaranteed to be linear, with an initialization cost
+ of 2 * NEEDLE_LEN comparisons.
+
+ If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+ most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching.
+ If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+ HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching. */
+static RETURN_TYPE
+two_way_short_needle (const unsigned char *haystack, size_t haystack_len,
+ const unsigned char *needle, size_t needle_len)
+{
+ size_t i; /* Index into current byte of NEEDLE. */
+ size_t j; /* Index into current window of HAYSTACK. */
+ size_t period; /* The period of the right half of needle. */
+ size_t suffix; /* The index of the right half of needle. */
+
+ /* Factor the needle into two halves, such that the left half is
+ smaller than the global period, and the right half is
+ periodic (with a period as large as NEEDLE_LEN - suffix). */
+ suffix = critical_factorization (needle, needle_len, &period);
+
+ /* Perform the search. Each iteration compares the right half
+ first. */
+ if (CMP_FUNC (needle, needle + period, suffix) == 0)
+ {
+ /* Entire needle is periodic; a mismatch can only advance by the
+ period, so use memory to avoid rescanning known occurrences
+ of the period. */
+ size_t memory = 0;
+ j = 0;
+ while (AVAILABLE (haystack, haystack_len, j, needle_len))
+ {
+ /* Scan for matches in right half. */
+ i = MAX (suffix, memory);
+ while (i < needle_len && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ ++i;
+ if (needle_len <= i)
+ {
+ /* Scan for matches in left half. */
+ i = suffix - 1;
+ while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ --i;
+ if (i + 1 < memory + 1)
+ return (RETURN_TYPE) (haystack + j);
+ /* No match, so remember how many repetitions of period
+ on the right half were scanned. */
+ j += period;
+ memory = needle_len - period;
+ }
+ else
+ {
+ j += i - suffix + 1;
+ memory = 0;
+ }
+ }
+ }
+ else
+ {
+ /* The two halves of needle are distinct; no extra memory is
+ required, and any mismatch results in a maximal shift. */
+ period = MAX (suffix, needle_len - suffix) + 1;
+ j = 0;
+ while (AVAILABLE (haystack, haystack_len, j, needle_len))
+ {
+ /* Scan for matches in right half. */
+ i = suffix;
+ while (i < needle_len && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ ++i;
+ if (needle_len <= i)
+ {
+ /* Scan for matches in left half. */
+ i = suffix - 1;
+ while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ --i;
+ if (i == SIZE_MAX)
+ return (RETURN_TYPE) (haystack + j);
+ j += period;
+ }
+ else
+ j += i - suffix + 1;
+ }
+ }
+ return NULL;
+}
+
+/* Return the first location of non-empty NEEDLE within HAYSTACK, or
+ NULL. HAYSTACK_LEN is the minimum known length of HAYSTACK. This
+ method is optimized for LONG_NEEDLE_THRESHOLD <= NEEDLE_LEN.
+ Performance is guaranteed to be linear, with an initialization cost
+ of 3 * NEEDLE_LEN + (1 << CHAR_BIT) operations.
+
+ If AVAILABLE does not modify HAYSTACK_LEN (as in memmem), then at
+ most 2 * HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching,
+ and sublinear performance O(HAYSTACK_LEN / NEEDLE_LEN) is possible.
+ If AVAILABLE modifies HAYSTACK_LEN (as in strstr), then at most 3 *
+ HAYSTACK_LEN - NEEDLE_LEN comparisons occur in searching, and
+ sublinear performance is not possible. */
+static RETURN_TYPE
+two_way_long_needle (const unsigned char *haystack, size_t haystack_len,
+ const unsigned char *needle, size_t needle_len)
+{
+ size_t i; /* Index into current byte of NEEDLE. */
+ size_t j; /* Index into current window of HAYSTACK. */
+ size_t period; /* The period of the right half of needle. */
+ size_t suffix; /* The index of the right half of needle. */
+ size_t shift_table[1U << CHAR_BIT]; /* See below. */
+
+ /* Factor the needle into two halves, such that the left half is
+ smaller than the global period, and the right half is
+ periodic (with a period as large as NEEDLE_LEN - suffix). */
+ suffix = critical_factorization (needle, needle_len, &period);
+
+ /* Populate shift_table. For each possible byte value c,
+ shift_table[c] is the distance from the last occurrence of c to
+ the end of NEEDLE, or NEEDLE_LEN if c is absent from the NEEDLE.
+ shift_table[NEEDLE[NEEDLE_LEN - 1]] contains the only 0. */
+ for (i = 0; i < 1U << CHAR_BIT; i++)
+ shift_table[i] = needle_len;
+ for (i = 0; i < needle_len; i++)
+ shift_table[CANON_ELEMENT (needle[i])] = needle_len - i - 1;
+
+ /* Perform the search. Each iteration compares the right half
+ first. */
+ if (CMP_FUNC (needle, needle + period, suffix) == 0)
+ {
+ /* Entire needle is periodic; a mismatch can only advance by the
+ period, so use memory to avoid rescanning known occurrences
+ of the period. */
+ size_t memory = 0;
+ size_t shift;
+ j = 0;
+ while (AVAILABLE (haystack, haystack_len, j, needle_len))
+ {
+ /* Check the last byte first; if it does not match, then
+ shift to the next possible match location. */
+ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+ if (0 < shift)
+ {
+ if (memory && shift < period)
+ {
+ /* Since needle is periodic, but the last period has
+ a byte out of place, there can be no match until
+ after the mismatch. */
+ shift = needle_len - period;
+ memory = 0;
+ }
+ j += shift;
+ continue;
+ }
+ /* Scan for matches in right half. The last byte has
+ already been matched, by virtue of the shift table. */
+ i = MAX (suffix, memory);
+ while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ ++i;
+ if (needle_len - 1 <= i)
+ {
+ /* Scan for matches in left half. */
+ i = suffix - 1;
+ while (memory < i + 1 && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ --i;
+ if (i + 1 < memory + 1)
+ return (RETURN_TYPE) (haystack + j);
+ /* No match, so remember how many repetitions of period
+ on the right half were scanned. */
+ j += period;
+ memory = needle_len - period;
+ }
+ else
+ {
+ j += i - suffix + 1;
+ memory = 0;
+ }
+ }
+ }
+ else
+ {
+ /* The two halves of needle are distinct; no extra memory is
+ required, and any mismatch results in a maximal shift. */
+ size_t shift;
+ period = MAX (suffix, needle_len - suffix) + 1;
+ j = 0;
+ while (AVAILABLE (haystack, haystack_len, j, needle_len))
+ {
+ /* Check the last byte first; if it does not match, then
+ shift to the next possible match location. */
+ shift = shift_table[CANON_ELEMENT (haystack[j + needle_len - 1])];
+ if (0 < shift)
+ {
+ j += shift;
+ continue;
+ }
+ /* Scan for matches in right half. The last byte has
+ already been matched, by virtue of the shift table. */
+ i = suffix;
+ while (i < needle_len - 1 && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ ++i;
+ if (needle_len - 1 <= i)
+ {
+ /* Scan for matches in left half. */
+ i = suffix - 1;
+ while (i != SIZE_MAX && (CANON_ELEMENT (needle[i])
+ == CANON_ELEMENT (haystack[i + j])))
+ --i;
+ if (i == SIZE_MAX)
+ return (RETURN_TYPE) (haystack + j);
+ j += period;
+ }
+ else
+ j += i - suffix + 1;
+ }
+ }
+ return NULL;
+}
+
+#undef AVAILABLE
+#undef CANON_ELEMENT
+#undef CMP_FUNC
+#undef MAX
+#undef RETURN_TYPE
diff --git a/gnu/strchrnul.c b/gnu/strchrnul.c
new file mode 100755
index 00000000..f834d343
--- /dev/null
+++ b/gnu/strchrnul.c
@@ -0,0 +1,142 @@
+/* Searching in a string.
+ Copyright (C) 2003, 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <string.h>
+
+/* Find the first occurrence of C in S or the final NUL byte. */
+char *
+strchrnul (const char *s, int c_in)
+{
+ /* On 32-bit hardware, choosing longword to be a 32-bit unsigned
+ long instead of a 64-bit uintmax_t tends to give better
+ performance. On 64-bit hardware, unsigned long is generally 64
+ bits already. Change this typedef to experiment with
+ performance. */
+ typedef unsigned long int longword;
+
+ const unsigned char *char_ptr;
+ const longword *longword_ptr;
+ longword repeated_one;
+ longword repeated_c;
+ unsigned char c;
+
+ c = (unsigned char) c_in;
+ if (!c)
+ return rawmemchr (s, 0);
+
+ /* Handle the first few bytes by reading one byte at a time.
+ Do this until CHAR_PTR is aligned on a longword boundary. */
+ for (char_ptr = (const unsigned char *) s;
+ (size_t) char_ptr % sizeof (longword) != 0;
+ ++char_ptr)
+ if (!*char_ptr || *char_ptr == c)
+ return (char *) char_ptr;
+
+ longword_ptr = (const longword *) char_ptr;
+
+ /* All these elucidatory comments refer to 4-byte longwords,
+ but the theory applies equally well to any size longwords. */
+
+ /* Compute auxiliary longword values:
+ repeated_one is a value which has a 1 in every byte.
+ repeated_c has c in every byte. */
+ repeated_one = 0x01010101;
+ repeated_c = c | (c << 8);
+ repeated_c |= repeated_c << 16;
+ if (0xffffffffU < (longword) -1)
+ {
+ repeated_one |= repeated_one << 31 << 1;
+ repeated_c |= repeated_c << 31 << 1;
+ if (8 < sizeof (longword))
+ {
+ size_t i;
+
+ for (i = 64; i < sizeof (longword) * 8; i *= 2)
+ {
+ repeated_one |= repeated_one << i;
+ repeated_c |= repeated_c << i;
+ }
+ }
+ }
+
+ /* Instead of the traditional loop which tests each byte, we will
+ test a longword at a time. The tricky part is testing if *any of
+ the four* bytes in the longword in question are equal to NUL or
+ c. We first use an xor with repeated_c. This reduces the task
+ to testing whether *any of the four* bytes in longword1 or
+ longword2 is zero.
+
+ Let's consider longword1. We compute tmp =
+ ((longword1 - repeated_one) & ~longword1) & (repeated_one << 7).
+ That is, we perform the following operations:
+ 1. Subtract repeated_one.
+ 2. & ~longword1.
+ 3. & a mask consisting of 0x80 in every byte.
+ Consider what happens in each byte:
+ - If a byte of longword1 is zero, step 1 and 2 transform it into 0xff,
+ and step 3 transforms it into 0x80. A carry can also be propagated
+ to more significant bytes.
+ - If a byte of longword1 is nonzero, let its lowest 1 bit be at
+ position k (0 <= k <= 7); so the lowest k bits are 0. After step 1,
+ the byte ends in a single bit of value 0 and k bits of value 1.
+ After step 2, the result is just k bits of value 1: 2^k - 1. After
+ step 3, the result is 0. And no carry is produced.
+ So, if longword1 has only non-zero bytes, tmp is zero.
+ Whereas if longword1 has a zero byte, call j the position of the least
+ significant zero byte. Then the result has a zero at positions 0, ...,
+ j-1 and a 0x80 at position j. We cannot predict the result at the more
+ significant bytes (positions j+1..3), but it does not matter since we
+ already have a non-zero bit at position 8*j+7.
+
+ The test whether any byte in longword1 or longword2 is zero is equivalent
+ to testing whether tmp1 is nonzero or tmp2 is nonzero. We can combine
+ this into a single test, whether (tmp1 | tmp2) is nonzero.
+
+ This test can read more than one byte beyond the end of a string,
+ depending on where the terminating NUL is encountered. However,
+ this is considered safe since the initialization phase ensured
+ that the read will be aligned, therefore, the read will not cross
+ page boundaries and will not cause a fault. */
+
+ while (1)
+ {
+ longword longword1 = *longword_ptr ^ repeated_c;
+ longword longword2 = *longword_ptr;
+
+ if (((((longword1 - repeated_one) & ~longword1)
+ | ((longword2 - repeated_one) & ~longword2))
+ & (repeated_one << 7)) != 0)
+ break;
+ longword_ptr++;
+ }
+
+ char_ptr = (const unsigned char *) longword_ptr;
+
+ /* At this point, we know that one of the sizeof (longword) bytes
+ starting at char_ptr is == 0 or == c. On little-endian machines,
+ we could determine the first such byte without any further memory
+ accesses, just by looking at the tmp result from the last loop
+ iteration. But this does not work on big-endian machines.
+ Choose code that works in both cases. */
+
+ char_ptr = (unsigned char *) longword_ptr;
+ while (*char_ptr && (*char_ptr != c))
+ char_ptr++;
+ return (char *) char_ptr;
+}
diff --git a/gnu/strchrnul.valgrind b/gnu/strchrnul.valgrind
new file mode 100755
index 00000000..b14fa130
--- /dev/null
+++ b/gnu/strchrnul.valgrind
@@ -0,0 +1,12 @@
+# Suppress a valgrind message about use of uninitialized memory in strchrnul().
+# This use is OK because it provides only a speedup.
+{
+ strchrnul-value4
+ Memcheck:Value4
+ fun:strchrnul
+}
+{
+ strchrnul-value8
+ Memcheck:Value8
+ fun:strchrnul
+}
diff --git a/gnu/streq.h b/gnu/streq.h
new file mode 100755
index 00000000..aa65bb8e
--- /dev/null
+++ b/gnu/streq.h
@@ -0,0 +1,176 @@
+/* Optimized string comparison.
+ Copyright (C) 2001-2002, 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 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>. */
+
+#ifndef _GL_STREQ_H
+#define _GL_STREQ_H
+
+#include <string.h>
+
+/* STREQ allows to optimize string comparison with a small literal string.
+ STREQ (s, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ is semantically equivalent to
+ strcmp (s, "EUC-KR") == 0
+ just faster. */
+
+/* Help GCC to generate good code for string comparisons with
+ immediate strings. */
+#if defined (__GNUC__) && defined (__OPTIMIZE__)
+
+static inline int
+streq9 (const char *s1, const char *s2)
+{
+ return strcmp (s1 + 9, s2 + 9) == 0;
+}
+
+static inline int
+streq8 (const char *s1, const char *s2, char s28)
+{
+ if (s1[8] == s28)
+ {
+ if (s28 == 0)
+ return 1;
+ else
+ return streq9 (s1, s2);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq7 (const char *s1, const char *s2, char s27, char s28)
+{
+ if (s1[7] == s27)
+ {
+ if (s27 == 0)
+ return 1;
+ else
+ return streq8 (s1, s2, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq6 (const char *s1, const char *s2, char s26, char s27, char s28)
+{
+ if (s1[6] == s26)
+ {
+ if (s26 == 0)
+ return 1;
+ else
+ return streq7 (s1, s2, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq5 (const char *s1, const char *s2, char s25, char s26, char s27, char s28)
+{
+ if (s1[5] == s25)
+ {
+ if (s25 == 0)
+ return 1;
+ else
+ return streq6 (s1, s2, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq4 (const char *s1, const char *s2, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[4] == s24)
+ {
+ if (s24 == 0)
+ return 1;
+ else
+ return streq5 (s1, s2, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq3 (const char *s1, const char *s2, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[3] == s23)
+ {
+ if (s23 == 0)
+ return 1;
+ else
+ return streq4 (s1, s2, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq2 (const char *s1, const char *s2, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[2] == s22)
+ {
+ if (s22 == 0)
+ return 1;
+ else
+ return streq3 (s1, s2, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq1 (const char *s1, const char *s2, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[1] == s21)
+ {
+ if (s21 == 0)
+ return 1;
+ else
+ return streq2 (s1, s2, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+static inline int
+streq0 (const char *s1, const char *s2, char s20, char s21, char s22, char s23, char s24, char s25, char s26, char s27, char s28)
+{
+ if (s1[0] == s20)
+ {
+ if (s20 == 0)
+ return 1;
+ else
+ return streq1 (s1, s2, s21, s22, s23, s24, s25, s26, s27, s28);
+ }
+ else
+ return 0;
+}
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ streq0 (s1, s2, s20, s21, s22, s23, s24, s25, s26, s27, s28)
+
+#else
+
+#define STREQ(s1,s2,s20,s21,s22,s23,s24,s25,s26,s27,s28) \
+ (strcmp (s1, s2) == 0)
+
+#endif
+
+#endif /* _GL_STREQ_H */
diff --git a/gnu/strerror.c b/gnu/strerror.c
new file mode 100755
index 00000000..b0df7784
--- /dev/null
+++ b/gnu/strerror.c
@@ -0,0 +1,347 @@
+/* strerror.c --- POSIX compatible system error routine
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#if REPLACE_STRERROR
+
+# include <errno.h>
+# include <stdio.h>
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+# if HAVE_WINSOCK2_H
+# include <winsock2.h>
+# endif
+# endif
+
+# include "intprops.h"
+
+# undef strerror
+# if ! HAVE_DECL_STRERROR
+# define strerror(n) NULL
+# endif
+
+char *
+rpl_strerror (int n)
+{
+ char const *msg = NULL;
+ /* These error messages are taken from glibc/sysdeps/gnu/errlist.c. */
+ switch (n)
+ {
+# if GNULIB_defined_ETXTBSY
+ case ETXTBSY:
+ msg = "Text file busy";
+ break;
+# endif
+
+# if GNULIB_defined_ESOCK /* native Windows platforms */
+ /* EWOULDBLOCK is the same as EAGAIN. */
+ case EINPROGRESS:
+ msg = "Operation now in progress";
+ break;
+ case EALREADY:
+ msg = "Operation already in progress";
+ break;
+ case ENOTSOCK:
+ msg = "Socket operation on non-socket";
+ break;
+ case EDESTADDRREQ:
+ msg = "Destination address required";
+ break;
+ case EMSGSIZE:
+ msg = "Message too long";
+ break;
+ case EPROTOTYPE:
+ msg = "Protocol wrong type for socket";
+ break;
+ case ENOPROTOOPT:
+ msg = "Protocol not available";
+ break;
+ case EPROTONOSUPPORT:
+ msg = "Protocol not supported";
+ break;
+ case ESOCKTNOSUPPORT:
+ msg = "Socket type not supported";
+ break;
+ case EOPNOTSUPP:
+ msg = "Operation not supported";
+ break;
+ case EPFNOSUPPORT:
+ msg = "Protocol family not supported";
+ break;
+ case EAFNOSUPPORT:
+ msg = "Address family not supported by protocol";
+ break;
+ case EADDRINUSE:
+ msg = "Address already in use";
+ break;
+ case EADDRNOTAVAIL:
+ msg = "Cannot assign requested address";
+ break;
+ case ENETDOWN:
+ msg = "Network is down";
+ break;
+ case ENETUNREACH:
+ msg = "Network is unreachable";
+ break;
+ case ENETRESET:
+ msg = "Network dropped connection on reset";
+ break;
+ case ECONNABORTED:
+ msg = "Software caused connection abort";
+ break;
+ case ECONNRESET:
+ msg = "Connection reset by peer";
+ break;
+ case ENOBUFS:
+ msg = "No buffer space available";
+ break;
+ case EISCONN:
+ msg = "Transport endpoint is already connected";
+ break;
+ case ENOTCONN:
+ msg = "Transport endpoint is not connected";
+ break;
+ case ESHUTDOWN:
+ msg = "Cannot send after transport endpoint shutdown";
+ break;
+ case ETOOMANYREFS:
+ msg = "Too many references: cannot splice";
+ break;
+ case ETIMEDOUT:
+ msg = "Connection timed out";
+ break;
+ case ECONNREFUSED:
+ msg = "Connection refused";
+ break;
+ case ELOOP:
+ msg = "Too many levels of symbolic links";
+ break;
+ case EHOSTDOWN:
+ msg = "Host is down";
+ break;
+ case EHOSTUNREACH:
+ msg = "No route to host";
+ break;
+ case EPROCLIM:
+ msg = "Too many processes";
+ break;
+ case EUSERS:
+ msg = "Too many users";
+ break;
+ case EDQUOT:
+ msg = "Disk quota exceeded";
+ break;
+ case ESTALE:
+ msg = "Stale NFS file handle";
+ break;
+ case EREMOTE:
+ msg = "Object is remote";
+ break;
+# if HAVE_WINSOCK2_H
+ /* WSA_INVALID_HANDLE maps to EBADF */
+ /* WSA_NOT_ENOUGH_MEMORY maps to ENOMEM */
+ /* WSA_INVALID_PARAMETER maps to EINVAL */
+ case WSA_OPERATION_ABORTED:
+ msg = "Overlapped operation aborted";
+ break;
+ case WSA_IO_INCOMPLETE:
+ msg = "Overlapped I/O event object not in signaled state";
+ break;
+ case WSA_IO_PENDING:
+ msg = "Overlapped operations will complete later";
+ break;
+ /* WSAEINTR maps to EINTR */
+ /* WSAEBADF maps to EBADF */
+ /* WSAEACCES maps to EACCES */
+ /* WSAEFAULT maps to EFAULT */
+ /* WSAEINVAL maps to EINVAL */
+ /* WSAEMFILE maps to EMFILE */
+ /* WSAEWOULDBLOCK maps to EWOULDBLOCK */
+ /* WSAEINPROGRESS is EINPROGRESS */
+ /* WSAEALREADY is EALREADY */
+ /* WSAENOTSOCK is ENOTSOCK */
+ /* WSAEDESTADDRREQ is EDESTADDRREQ */
+ /* WSAEMSGSIZE is EMSGSIZE */
+ /* WSAEPROTOTYPE is EPROTOTYPE */
+ /* WSAENOPROTOOPT is ENOPROTOOPT */
+ /* WSAEPROTONOSUPPORT is EPROTONOSUPPORT */
+ /* WSAESOCKTNOSUPPORT is ESOCKTNOSUPPORT */
+ /* WSAEOPNOTSUPP is EOPNOTSUPP */
+ /* WSAEPFNOSUPPORT is EPFNOSUPPORT */
+ /* WSAEAFNOSUPPORT is EAFNOSUPPORT */
+ /* WSAEADDRINUSE is EADDRINUSE */
+ /* WSAEADDRNOTAVAIL is EADDRNOTAVAIL */
+ /* WSAENETDOWN is ENETDOWN */
+ /* WSAENETUNREACH is ENETUNREACH */
+ /* WSAENETRESET is ENETRESET */
+ /* WSAECONNABORTED is ECONNABORTED */
+ /* WSAECONNRESET is ECONNRESET */
+ /* WSAENOBUFS is ENOBUFS */
+ /* WSAEISCONN is EISCONN */
+ /* WSAENOTCONN is ENOTCONN */
+ /* WSAESHUTDOWN is ESHUTDOWN */
+ /* WSAETOOMANYREFS is ETOOMANYREFS */
+ /* WSAETIMEDOUT is ETIMEDOUT */
+ /* WSAECONNREFUSED is ECONNREFUSED */
+ /* WSAELOOP is ELOOP */
+ /* WSAENAMETOOLONG maps to ENAMETOOLONG */
+ /* WSAEHOSTDOWN is EHOSTDOWN */
+ /* WSAEHOSTUNREACH is EHOSTUNREACH */
+ /* WSAENOTEMPTY maps to ENOTEMPTY */
+ /* WSAEPROCLIM is EPROCLIM */
+ /* WSAEUSERS is EUSERS */
+ /* WSAEDQUOT is EDQUOT */
+ /* WSAESTALE is ESTALE */
+ /* WSAEREMOTE is EREMOTE */
+ case WSASYSNOTREADY:
+ msg = "Network subsystem is unavailable";
+ break;
+ case WSAVERNOTSUPPORTED:
+ msg = "Winsock.dll version out of range";
+ break;
+ case WSANOTINITIALISED:
+ msg = "Successful WSAStartup not yet performed";
+ break;
+ case WSAEDISCON:
+ msg = "Graceful shutdown in progress";
+ break;
+ case WSAENOMORE: case WSA_E_NO_MORE:
+ msg = "No more results";
+ break;
+ case WSAECANCELLED: case WSA_E_CANCELLED:
+ msg = "Call was canceled";
+ break;
+ case WSAEINVALIDPROCTABLE:
+ msg = "Procedure call table is invalid";
+ break;
+ case WSAEINVALIDPROVIDER:
+ msg = "Service provider is invalid";
+ break;
+ case WSAEPROVIDERFAILEDINIT:
+ msg = "Service provider failed to initialize";
+ break;
+ case WSASYSCALLFAILURE:
+ msg = "System call failure";
+ break;
+ case WSASERVICE_NOT_FOUND:
+ msg = "Service not found";
+ break;
+ case WSATYPE_NOT_FOUND:
+ msg = "Class type not found";
+ break;
+ case WSAEREFUSED:
+ msg = "Database query was refused";
+ break;
+ case WSAHOST_NOT_FOUND:
+ msg = "Host not found";
+ break;
+ case WSATRY_AGAIN:
+ msg = "Nonauthoritative host not found";
+ break;
+ case WSANO_RECOVERY:
+ msg = "Nonrecoverable error";
+ break;
+ case WSANO_DATA:
+ msg = "Valid name, no data record of requested type";
+ break;
+ /* WSA_QOS_* omitted */
+# endif
+# endif
+
+# if GNULIB_defined_ENOMSG
+ case ENOMSG:
+ msg = "No message of desired type";
+ break;
+# endif
+
+# if GNULIB_defined_EIDRM
+ case EIDRM:
+ msg = "Identifier removed";
+ break;
+# endif
+
+# if GNULIB_defined_ENOLINK
+ case ENOLINK:
+ msg = "Link has been severed";
+ break;
+# endif
+
+# if GNULIB_defined_EPROTO
+ case EPROTO:
+ msg = "Protocol error";
+ break;
+# endif
+
+# if GNULIB_defined_EMULTIHOP
+ case EMULTIHOP:
+ msg = "Multihop attempted";
+ break;
+# endif
+
+# if GNULIB_defined_EBADMSG
+ case EBADMSG:
+ msg = "Bad message";
+ break;
+# endif
+
+# if GNULIB_defined_EOVERFLOW
+ case EOVERFLOW:
+ msg = "Value too large for defined data type";
+ break;
+# endif
+
+# if GNULIB_defined_ENOTSUP
+ case ENOTSUP:
+ msg = "Not supported";
+ break;
+# endif
+
+# if GNULIB_defined_ESTALE
+ case ESTALE:
+ msg = "Stale NFS file handle";
+ break;
+# endif
+
+# if GNULIB_defined_ECANCELED
+ case ECANCELED:
+ msg = "Operation canceled";
+ break;
+# endif
+ }
+
+ if (msg)
+ return (char *) msg;
+
+ {
+ char *result = strerror (n);
+
+ if (result == NULL || result[0] == '\0')
+ {
+ static char const fmt[] = "Unknown error (%d)";
+ static char msg_buf[sizeof fmt + INT_STRLEN_BOUND (n)];
+ sprintf (msg_buf, fmt, n);
+ return msg_buf;
+ }
+
+ return result;
+ }
+}
+
+#endif
diff --git a/gnu/striconv.c b/gnu/striconv.c
new file mode 100755
index 00000000..64b1137f
--- /dev/null
+++ b/gnu/striconv.c
@@ -0,0 +1,457 @@
+/* Charset conversion.
+ Copyright (C) 2001-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible and Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include "striconv.h"
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if HAVE_ICONV
+# include <iconv.h>
+/* Get MB_LEN_MAX, CHAR_BIT. */
+# include <limits.h>
+#endif
+
+#include "c-strcase.h"
+
+#ifndef SIZE_MAX
+# define SIZE_MAX ((size_t) -1)
+#endif
+
+
+#if HAVE_ICONV
+
+int
+mem_cd_iconv (const char *src, size_t srclen, iconv_t cd,
+ char **resultp, size_t *lengthp)
+{
+# define tmpbufsize 4096
+ size_t length;
+ char *result;
+
+ /* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ /* Set to the initial state. */
+ iconv (cd, NULL, NULL, NULL, NULL);
+# endif
+
+ /* Determine the length we need. */
+ {
+ size_t count = 0;
+ /* The alignment is needed when converting e.g. to glibc's WCHAR_T or
+ libiconv's UCS-4-INTERNAL encoding. */
+ union { unsigned int align; char buf[tmpbufsize]; } tmp;
+# define tmpbuf tmp.buf
+ const char *inptr = src;
+ size_t insize = srclen;
+
+ while (insize > 0)
+ {
+ char *outptr = tmpbuf;
+ size_t outsize = tmpbufsize;
+ size_t res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &insize,
+ &outptr, &outsize);
+
+ if (res == (size_t)(-1))
+ {
+ if (errno == E2BIG)
+ ;
+ else if (errno == EINVAL)
+ break;
+ else
+ return -1;
+ }
+# if !defined _LIBICONV_VERSION && !defined __GLIBC__
+ /* Irix iconv() inserts a NUL byte if it cannot convert.
+ NetBSD iconv() inserts a question mark if it cannot convert.
+ Only GNU libiconv and GNU libc are known to prefer to fail rather
+ than doing a lossy conversion. */
+ else if (res > 0)
+ {
+ errno = EILSEQ;
+ return -1;
+ }
+# endif
+ count += outptr - tmpbuf;
+ }
+ /* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ {
+ char *outptr = tmpbuf;
+ size_t outsize = tmpbufsize;
+ size_t res = iconv (cd, NULL, NULL, &outptr, &outsize);
+
+ if (res == (size_t)(-1))
+ return -1;
+ count += outptr - tmpbuf;
+ }
+# endif
+ length = count;
+# undef tmpbuf
+ }
+
+ if (length == 0)
+ {
+ *lengthp = 0;
+ return 0;
+ }
+ if (*resultp != NULL && *lengthp >= length)
+ result = *resultp;
+ else
+ {
+ result = (char *) malloc (length);
+ if (result == NULL)
+ {
+ errno = ENOMEM;
+ return -1;
+ }
+ }
+
+ /* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ /* Return to the initial state. */
+ iconv (cd, NULL, NULL, NULL, NULL);
+# endif
+
+ /* Do the conversion for real. */
+ {
+ const char *inptr = src;
+ size_t insize = srclen;
+ char *outptr = result;
+ size_t outsize = length;
+
+ while (insize > 0)
+ {
+ size_t res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &insize,
+ &outptr, &outsize);
+
+ if (res == (size_t)(-1))
+ {
+ if (errno == EINVAL)
+ break;
+ else
+ goto fail;
+ }
+# if !defined _LIBICONV_VERSION && !defined __GLIBC__
+ /* Irix iconv() inserts a NUL byte if it cannot convert.
+ NetBSD iconv() inserts a question mark if it cannot convert.
+ Only GNU libiconv and GNU libc are known to prefer to fail rather
+ than doing a lossy conversion. */
+ else if (res > 0)
+ {
+ errno = EILSEQ;
+ goto fail;
+ }
+# endif
+ }
+ /* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ {
+ size_t res = iconv (cd, NULL, NULL, &outptr, &outsize);
+
+ if (res == (size_t)(-1))
+ goto fail;
+ }
+# endif
+ if (outsize != 0)
+ abort ();
+ }
+
+ *resultp = result;
+ *lengthp = length;
+
+ return 0;
+
+ fail:
+ {
+ if (result != *resultp)
+ {
+ int saved_errno = errno;
+ free (result);
+ errno = saved_errno;
+ }
+ return -1;
+ }
+# undef tmpbufsize
+}
+
+char *
+str_cd_iconv (const char *src, iconv_t cd)
+{
+ /* For most encodings, a trailing NUL byte in the input will be converted
+ to a trailing NUL byte in the output. But not for UTF-7. So that this
+ function is usable for UTF-7, we have to exclude the NUL byte from the
+ conversion and add it by hand afterwards. */
+# if !defined _LIBICONV_VERSION && !defined __GLIBC__
+ /* Irix iconv() inserts a NUL byte if it cannot convert.
+ NetBSD iconv() inserts a question mark if it cannot convert.
+ Only GNU libiconv and GNU libc are known to prefer to fail rather
+ than doing a lossy conversion. For other iconv() implementations,
+ we have to look at the number of irreversible conversions returned;
+ but this information is lost when iconv() returns for an E2BIG reason.
+ Therefore we cannot use the second, faster algorithm. */
+
+ char *result = NULL;
+ size_t length = 0;
+ int retval = mem_cd_iconv (src, strlen (src), cd, &result, &length);
+ char *final_result;
+
+ if (retval < 0)
+ {
+ if (result != NULL)
+ abort ();
+ return NULL;
+ }
+
+ /* Add the terminating NUL byte. */
+ final_result =
+ (result != NULL ? realloc (result, length + 1) : malloc (length + 1));
+ if (final_result == NULL)
+ {
+ free (result);
+ errno = ENOMEM;
+ return NULL;
+ }
+ final_result[length] = '\0';
+
+ return final_result;
+
+# else
+ /* This algorithm is likely faster than the one above. But it may produce
+ iconv() returns for an E2BIG reason, when the output size guess is too
+ small. Therefore it can only be used when we don't need the number of
+ irreversible conversions performed. */
+ char *result;
+ size_t result_size;
+ size_t length;
+ const char *inptr = src;
+ size_t inbytes_remaining = strlen (src);
+
+ /* Make a guess for the worst-case output size, in order to avoid a
+ realloc. It's OK if the guess is wrong as long as it is not zero and
+ doesn't lead to an integer overflow. */
+ result_size = inbytes_remaining;
+ {
+ size_t approx_sqrt_SIZE_MAX = SIZE_MAX >> (sizeof (size_t) * CHAR_BIT / 2);
+ if (result_size <= approx_sqrt_SIZE_MAX / MB_LEN_MAX)
+ result_size *= MB_LEN_MAX;
+ }
+ result_size += 1; /* for the terminating NUL */
+
+ result = (char *) malloc (result_size);
+ if (result == NULL)
+ {
+ errno = ENOMEM;
+ return NULL;
+ }
+
+ /* Avoid glibc-2.1 bug and Solaris 2.7-2.9 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ /* Set to the initial state. */
+ iconv (cd, NULL, NULL, NULL, NULL);
+# endif
+
+ /* Do the conversion. */
+ {
+ char *outptr = result;
+ size_t outbytes_remaining = result_size - 1;
+
+ for (;;)
+ {
+ /* Here inptr + inbytes_remaining = src + strlen (src),
+ outptr + outbytes_remaining = result + result_size - 1. */
+ size_t res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytes_remaining,
+ &outptr, &outbytes_remaining);
+
+ if (res == (size_t)(-1))
+ {
+ if (errno == EINVAL)
+ break;
+ else if (errno == E2BIG)
+ {
+ size_t used = outptr - result;
+ size_t newsize = result_size * 2;
+ char *newresult;
+
+ if (!(newsize > result_size))
+ {
+ errno = ENOMEM;
+ goto failed;
+ }
+ newresult = (char *) realloc (result, newsize);
+ if (newresult == NULL)
+ {
+ errno = ENOMEM;
+ goto failed;
+ }
+ result = newresult;
+ result_size = newsize;
+ outptr = result + used;
+ outbytes_remaining = result_size - 1 - used;
+ }
+ else
+ goto failed;
+ }
+ else
+ break;
+ }
+ /* Avoid glibc-2.1 bug and Solaris 2.7 bug. */
+# if defined _LIBICONV_VERSION \
+ || !((__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) || defined __sun)
+ for (;;)
+ {
+ /* Here outptr + outbytes_remaining = result + result_size - 1. */
+ size_t res = iconv (cd, NULL, NULL, &outptr, &outbytes_remaining);
+
+ if (res == (size_t)(-1))
+ {
+ if (errno == E2BIG)
+ {
+ size_t used = outptr - result;
+ size_t newsize = result_size * 2;
+ char *newresult;
+
+ if (!(newsize > result_size))
+ {
+ errno = ENOMEM;
+ goto failed;
+ }
+ newresult = (char *) realloc (result, newsize);
+ if (newresult == NULL)
+ {
+ errno = ENOMEM;
+ goto failed;
+ }
+ result = newresult;
+ result_size = newsize;
+ outptr = result + used;
+ outbytes_remaining = result_size - 1 - used;
+ }
+ else
+ goto failed;
+ }
+ else
+ break;
+ }
+# endif
+
+ /* Add the terminating NUL byte. */
+ *outptr++ = '\0';
+
+ length = outptr - result;
+ }
+
+ /* Give away unused memory. */
+ if (length < result_size)
+ {
+ char *smaller_result = (char *) realloc (result, length);
+
+ if (smaller_result != NULL)
+ result = smaller_result;
+ }
+
+ return result;
+
+ failed:
+ {
+ int saved_errno = errno;
+ free (result);
+ errno = saved_errno;
+ return NULL;
+ }
+
+# endif
+}
+
+#endif
+
+char *
+str_iconv (const char *src, const char *from_codeset, const char *to_codeset)
+{
+ if (*src == '\0' || c_strcasecmp (from_codeset, to_codeset) == 0)
+ {
+ char *result = strdup (src);
+
+ if (result == NULL)
+ errno = ENOMEM;
+ return result;
+ }
+ else
+ {
+#if HAVE_ICONV
+ iconv_t cd;
+ char *result;
+
+ /* Avoid glibc-2.1 bug with EUC-KR. */
+# if (__GLIBC__ - 0 == 2 && __GLIBC_MINOR__ - 0 <= 1) && !defined _LIBICONV_VERSION
+ if (c_strcasecmp (from_codeset, "EUC-KR") == 0
+ || c_strcasecmp (to_codeset, "EUC-KR") == 0)
+ {
+ errno = EINVAL;
+ return NULL;
+ }
+# endif
+ cd = iconv_open (to_codeset, from_codeset);
+ if (cd == (iconv_t) -1)
+ return NULL;
+
+ result = str_cd_iconv (src, cd);
+
+ if (result == NULL)
+ {
+ /* Close cd, but preserve the errno from str_cd_iconv. */
+ int saved_errno = errno;
+ iconv_close (cd);
+ errno = saved_errno;
+ }
+ else
+ {
+ if (iconv_close (cd) < 0)
+ {
+ /* Return NULL, but free the allocated memory, and while doing
+ that, preserve the errno from iconv_close. */
+ int saved_errno = errno;
+ free (result);
+ errno = saved_errno;
+ return NULL;
+ }
+ }
+ return result;
+#else
+ /* This is a different error code than if iconv_open existed but didn't
+ support from_codeset and to_codeset, so that the caller can emit
+ an error message such as
+ "iconv() is not supported. Installing GNU libiconv and
+ then reinstalling this package would fix this." */
+ errno = ENOSYS;
+ return NULL;
+#endif
+ }
+}
diff --git a/gnu/striconv.h b/gnu/striconv.h
new file mode 100755
index 00000000..74fa9329
--- /dev/null
+++ b/gnu/striconv.h
@@ -0,0 +1,76 @@
+/* Charset conversion.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible and Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _STRICONV_H
+#define _STRICONV_H
+
+#include <stddef.h>
+#if HAVE_ICONV
+#include <iconv.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if HAVE_ICONV
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is at [SRC,...,SRC+SRCLEN-1].
+ The conversion descriptor is passed as CD.
+ *RESULTP and *LENGTH should initially be a scratch buffer and its size,
+ or *RESULTP can initially be NULL.
+ May erase the contents of the memory at *RESULTP.
+ Return value: 0 if successful, otherwise -1 and errno set.
+ If successful: The resulting string is stored in *RESULTP and its length
+ in *LENGTHP. *RESULTP is set to a freshly allocated memory block, or is
+ unchanged if no dynamic memory allocation was necessary. */
+extern int mem_cd_iconv (const char *src, size_t srclen, iconv_t cd,
+ char **resultp, size_t *lengthp);
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is the NUL-terminated string starting at SRC.
+ The conversion descriptor is passed as CD. Both the "from" and the "to"
+ encoding must use a single NUL byte at the end of the string (i.e. not
+ UCS-2, UCS-4, UTF-16, UTF-32).
+ Allocate a malloced memory block for the result.
+ Return value: the freshly allocated resulting NUL-terminated string if
+ successful, otherwise NULL and errno set. */
+extern char * str_cd_iconv (const char *src, iconv_t cd);
+
+#endif
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is the NUL-terminated string starting at SRC.
+ Both the "from" and the "to" encoding must use a single NUL byte at the
+ end of the string (i.e. not UCS-2, UCS-4, UTF-16, UTF-32).
+ Allocate a malloced memory block for the result.
+ Return value: the freshly allocated resulting NUL-terminated string if
+ successful, otherwise NULL and errno set. */
+extern char * str_iconv (const char *src,
+ const char *from_codeset, const char *to_codeset);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _STRICONV_H */
diff --git a/gnu/string.in.h b/gnu/string.in.h
new file mode 100755
index 00000000..8d88bda1
--- /dev/null
+++ b/gnu/string.in.h
@@ -0,0 +1,642 @@
+/* A GNU-like <string.h>.
+
+ Copyright (C) 1995-1996, 2001-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_STRING_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_STRING_H@
+
+#ifndef _GL_STRING_H
+#define _GL_STRING_H
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* MirBSD defines mbslen as a macro. */
+#if @GNULIB_MBSLEN@ && defined __MirBSD__
+# include <wchar.h>
+#endif
+
+#ifndef __attribute__
+/* This feature is available in gcc versions 2.5 and later. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5)
+# define __attribute__(Spec) /* empty */
+# endif
+/* The attribute __pure__ was added in gcc 2.96. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 96)
+# define __pure__ /* empty */
+# endif
+#endif
+
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Return the first instance of C within N bytes of S, or NULL. */
+#if @GNULIB_MEMCHR@
+# if @REPLACE_MEMCHR@
+# define memchr rpl_memchr
+extern void *memchr (void const *__s, int __c, size_t __n)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memchr
+/* Assume memchr is always declared. */
+_GL_WARN_ON_USE (memchr, "memchr has platform-specific bugs - "
+ "use gnulib module memchr for portability" );
+#endif
+
+/* Return the first occurrence of NEEDLE in HAYSTACK. */
+#if @GNULIB_MEMMEM@
+# if @REPLACE_MEMMEM@
+# define memmem rpl_memmem
+# endif
+# if ! @HAVE_DECL_MEMMEM@ || @REPLACE_MEMMEM@
+extern void *memmem (void const *__haystack, size_t __haystack_len,
+ void const *__needle, size_t __needle_len)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memmem
+# if HAVE_RAW_DECL_MEMMEM
+_GL_WARN_ON_USE (memmem, "memmem is unportable and often quadratic - "
+ "use gnulib module memmem-simple for portability, "
+ "and module memmem for speed" );
+# endif
+#endif
+
+/* Copy N bytes of SRC to DEST, return pointer to bytes after the
+ last written byte. */
+#if @GNULIB_MEMPCPY@
+# if ! @HAVE_MEMPCPY@
+extern void *mempcpy (void *restrict __dest, void const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mempcpy
+# if HAVE_RAW_DECL_MEMPCPY
+_GL_WARN_ON_USE (mempcpy, "mempcpy is unportable - "
+ "use gnulib module mempcpy for portability");
+# endif
+#endif
+
+/* Search backwards through a block for a byte (specified as an int). */
+#if @GNULIB_MEMRCHR@
+# if ! @HAVE_DECL_MEMRCHR@
+extern void *memrchr (void const *, int, size_t)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef memrchr
+# if HAVE_RAW_DECL_MEMRCHR
+_GL_WARN_ON_USE (memrchr, "memrchr is unportable - "
+ "use gnulib module memrchr for portability");
+# endif
+#endif
+
+/* Find the first occurrence of C in S. More efficient than
+ memchr(S,C,N), at the expense of undefined behavior if C does not
+ occur within N bytes. */
+#if @GNULIB_RAWMEMCHR@
+# if ! @HAVE_RAWMEMCHR@
+extern void *rawmemchr (void const *__s, int __c_in)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rawmemchr
+# if HAVE_RAW_DECL_RAWMEMCHR
+_GL_WARN_ON_USE (rawmemchr, "rawmemchr is unportable - "
+ "use gnulib module rawmemchr for portability");
+# endif
+#endif
+
+/* Copy SRC to DST, returning the address of the terminating '\0' in DST. */
+#if @GNULIB_STPCPY@
+# if ! @HAVE_STPCPY@
+extern char *stpcpy (char *restrict __dst, char const *restrict __src)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stpcpy
+# if HAVE_RAW_DECL_STPCPY
+_GL_WARN_ON_USE (stpcpy, "stpcpy is unportable - "
+ "use gnulib module stpcpy for portability");
+# endif
+#endif
+
+/* Copy no more than N bytes of SRC to DST, returning a pointer past the
+ last non-NUL byte written into DST. */
+#if @GNULIB_STPNCPY@
+# if ! @HAVE_STPNCPY@
+# define stpncpy gnu_stpncpy
+extern char *stpncpy (char *restrict __dst, char const *restrict __src,
+ size_t __n)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stpncpy
+# if HAVE_RAW_DECL_STPNCPY
+_GL_WARN_ON_USE (stpncpy, "stpncpy is unportable - "
+ "use gnulib module stpncpy for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strchr
+/* Assume strchr is always declared. */
+_GL_WARN_ON_USE (strchr, "strchr cannot work correctly on character strings "
+ "in some multibyte locales - "
+ "use mbschr if you care about internationalization");
+#endif
+
+/* Find the first occurrence of C in S or the final NUL byte. */
+#if @GNULIB_STRCHRNUL@
+# if ! @HAVE_STRCHRNUL@
+extern char *strchrnul (char const *__s, int __c_in)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strchrnul
+# if HAVE_RAW_DECL_STRCHRNUL
+_GL_WARN_ON_USE (strchrnul, "strchrnul is unportable - "
+ "use gnulib module strchrnul for portability");
+# endif
+#endif
+
+/* Duplicate S, returning an identical malloc'd string. */
+#if @GNULIB_STRDUP@
+# if @REPLACE_STRDUP@
+# undef strdup
+# define strdup rpl_strdup
+# endif
+# if !(@HAVE_DECL_STRDUP@ || defined strdup) || @REPLACE_STRDUP@
+extern char *strdup (char const *__s) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strdup
+# if HAVE_RAW_DECL_STRDUP
+_GL_WARN_ON_USE (strdup, "strdup is unportable - "
+ "use gnulib module strdup for portability");
+# endif
+#endif
+
+/* Return a newly allocated copy of at most N bytes of STRING. */
+#if @GNULIB_STRNDUP@
+# if @REPLACE_STRNDUP@
+# undef strndup
+# define strndup rpl_strndup
+# endif
+# if @REPLACE_STRNDUP@ || ! @HAVE_DECL_STRNDUP@
+extern char *strndup (char const *__string, size_t __n) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strndup
+# if HAVE_RAW_DECL_STRNDUP
+_GL_WARN_ON_USE (strndup, "strndup is unportable - "
+ "use gnulib module strndup for portability");
+# endif
+#endif
+
+/* Find the length (number of bytes) of STRING, but scan at most
+ MAXLEN bytes. If no '\0' terminator is found in that many bytes,
+ return MAXLEN. */
+#if @GNULIB_STRNLEN@
+# if ! @HAVE_DECL_STRNLEN@
+extern size_t strnlen (char const *__string, size_t __maxlen)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strnlen
+# if HAVE_RAW_DECL_STRNLEN
+_GL_WARN_ON_USE (strnlen, "strnlen is unportable - "
+ "use gnulib module strnlen for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strcspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strcspn
+/* Assume strcspn is always declared. */
+_GL_WARN_ON_USE (strcspn, "strcspn cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbscspn if you care about internationalization");
+#endif
+
+/* Find the first occurrence in S of any character in ACCEPT. */
+#if @GNULIB_STRPBRK@
+# if ! @HAVE_STRPBRK@
+extern char *strpbrk (char const *__s, char const *__accept)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
+# endif
+# if defined GNULIB_POSIXCHECK
+/* strpbrk() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it does not work with multibyte strings if the
+ locale encoding is GB18030 and one of the characters to be searched is a
+ digit. */
+# undef strpbrk
+_GL_WARN_ON_USE (strpbrk, "strpbrk cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbspbrk if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strpbrk
+# if HAVE_RAW_DECL_STRPBRK
+_GL_WARN_ON_USE (strpbrk, "strpbrk is unportable - "
+ "use gnulib module strpbrk for portability");
+# endif
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strspn() assumes the second argument is a list of single-byte characters.
+ Even in this simple case, it cannot work with multibyte strings. */
+# undef strspn
+/* Assume strspn is always declared. */
+_GL_WARN_ON_USE (strspn, "strspn cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbsspn if you care about internationalization");
+#endif
+
+#if defined GNULIB_POSIXCHECK
+/* strrchr() does not work with multibyte strings if the locale encoding is
+ GB18030 and the character to be searched is a digit. */
+# undef strrchr
+/* Assume strrchr is always declared. */
+_GL_WARN_ON_USE (strrchr, "strrchr cannot work correctly on character strings "
+ "in some multibyte locales - "
+ "use mbsrchr if you care about internationalization");
+#endif
+
+/* Search the next delimiter (char listed in DELIM) starting at *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP
+ to point to the next char after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of strtok() that is multithread-safe and supports
+ empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strtok_r(). */
+#if @GNULIB_STRSEP@
+# if ! @HAVE_STRSEP@
+extern char *strsep (char **restrict __stringp, char const *restrict __delim)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+# if defined GNULIB_POSIXCHECK
+# undef strsep
+_GL_WARN_ON_USE (strsep, "strsep cannot work correctly on character strings "
+ "in multibyte locales - "
+ "use mbssep if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsep
+# if HAVE_RAW_DECL_STRSEP
+_GL_WARN_ON_USE (strsep, "strsep is unportable - "
+ "use gnulib module strsep for portability");
+# endif
+#endif
+
+#if @GNULIB_STRSTR@
+# if @REPLACE_STRSTR@
+# define strstr rpl_strstr
+extern char *strstr (const char *haystack, const char *needle)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strstr() does not work with multibyte strings if the locale encoding is
+ different from UTF-8:
+ POSIX says that it operates on "strings", and "string" in POSIX is defined
+ as a sequence of bytes, not of characters. */
+# undef strstr
+/* Assume strstr is always declared. */
+_GL_WARN_ON_USE (strstr, "strstr is quadratic on many systems, and cannot "
+ "work correctly on character strings in most "
+ "multibyte locales - "
+ "use mbsstr if you care about internationalization, "
+ "or use strstr if you care about speed");
+#endif
+
+/* Find the first occurrence of NEEDLE in HAYSTACK, using case-insensitive
+ comparison. */
+#if @GNULIB_STRCASESTR@
+# if @REPLACE_STRCASESTR@
+# define strcasestr rpl_strcasestr
+# endif
+# if ! @HAVE_STRCASESTR@ || @REPLACE_STRCASESTR@
+extern char *strcasestr (const char *haystack, const char *needle)
+ __attribute__ ((__pure__)) _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+/* strcasestr() does not work with multibyte strings:
+ It is a glibc extension, and glibc implements it only for unibyte
+ locales. */
+# undef strcasestr
+# if HAVE_RAW_DECL_STRCASESTR
+_GL_WARN_ON_USE (strcasestr, "strcasestr does work correctly on character "
+ "strings in multibyte locales - "
+ "use mbscasestr if you care about "
+ "internationalization, or use c-strcasestr if you want "
+ "a locale independent function");
+# endif
+#endif
+
+/* Parse S into tokens separated by characters in DELIM.
+ If S is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = strtok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = strtok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = strtok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ This is a variant of strtok() that is multithread-safe.
+
+ For the POSIX documentation for this function, see:
+ http://www.opengroup.org/susv3xsh/strtok.html
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+ Caveat: It doesn't work with multibyte strings unless all of the delimiter
+ characters are ASCII characters < 0x30.
+
+ See also strsep(). */
+#if @GNULIB_STRTOK_R@
+# if @REPLACE_STRTOK_R@
+# undef strtok_r
+# define strtok_r rpl_strtok_r
+# elif @UNDEFINE_STRTOK_R@ || defined GNULIB_POSIXCHECK
+# undef strtok_r
+# endif
+# if ! @HAVE_DECL_STRTOK_R@ || @REPLACE_STRTOK_R@
+extern char *strtok_r (char *restrict s, char const *restrict delim,
+ char **restrict save_ptr)
+ _GL_ARG_NONNULL ((2, 3));
+# endif
+# if defined GNULIB_POSIXCHECK
+_GL_WARN_ON_USE (strtok_r, "strtok_r cannot work correctly on character "
+ "strings in multibyte locales - "
+ "use mbstok_r if you care about internationalization");
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strtok_r
+# if HAVE_RAW_DECL_STRTOK_R
+_GL_WARN_ON_USE (strtok_r, "strtok_r is unportable - "
+ "use gnulib module strtok_r for portability");
+# endif
+#endif
+
+
+/* The following functions are not specified by POSIX. They are gnulib
+ extensions. */
+
+#if @GNULIB_MBSLEN@
+/* Return the number of multibyte characters in the character string STRING.
+ This considers multibyte characters, unlike strlen, which counts bytes. */
+# ifdef __MirBSD__ /* MirBSD defines mbslen as a macro. Override it. */
+# undef mbslen
+# endif
+# if @HAVE_MBSLEN@ /* AIX, OSF/1, MirBSD define mbslen already in libc. */
+# define mbslen rpl_mbslen
+# endif
+extern size_t mbslen (const char *string) _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSNLEN@
+/* Return the number of multibyte characters in the character string starting
+ at STRING and ending at STRING + LEN. */
+extern size_t mbsnlen (const char *string, size_t len) _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSCHR@
+/* Locate the first single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# define mbschr rpl_mbschr /* avoid collision with HP-UX function */
+extern char * mbschr (const char *string, int c) _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSRCHR@
+/* Locate the last single-byte character C in the character string STRING,
+ and return a pointer to it. Return NULL if C is not found in STRING.
+ Unlike strrchr(), this function works correctly in multibyte locales with
+ encodings such as GB18030. */
+# define mbsrchr rpl_mbsrchr /* avoid collision with HP-UX function */
+extern char * mbsrchr (const char *string, int c) _GL_ARG_NONNULL ((1));
+#endif
+
+#if @GNULIB_MBSSTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK. Return NULL if NEEDLE is not found in HAYSTACK.
+ Unlike strstr(), this function works correctly in multibyte locales with
+ encodings different from UTF-8. */
+extern char * mbsstr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASECMP@
+/* Compare the character strings S1 and S2, ignoring case, returning less than,
+ equal to or greater than zero if S1 is lexicographically less than, equal to
+ or greater than S2.
+ Note: This function may, in multibyte locales, return 0 for strings of
+ different lengths!
+ Unlike strcasecmp(), this function works correctly in multibyte locales. */
+extern int mbscasecmp (const char *s1, const char *s2)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSNCASECMP@
+/* Compare the initial segment of the character string S1 consisting of at most
+ N characters with the initial segment of the character string S2 consisting
+ of at most N characters, ignoring case, returning less than, equal to or
+ greater than zero if the initial segment of S1 is lexicographically less
+ than, equal to or greater than the initial segment of S2.
+ Note: This function may, in multibyte locales, return 0 for initial segments
+ of different lengths!
+ Unlike strncasecmp(), this function works correctly in multibyte locales.
+ But beware that N is not a byte count but a character count! */
+extern int mbsncasecmp (const char *s1, const char *s2, size_t n)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPCASECMP@
+/* Compare the initial segment of the character string STRING consisting of
+ at most mbslen (PREFIX) characters with the character string PREFIX,
+ ignoring case, returning less than, equal to or greater than zero if this
+ initial segment is lexicographically less than, equal to or greater than
+ PREFIX.
+ Note: This function may, in multibyte locales, return 0 if STRING is of
+ smaller length than PREFIX!
+ Unlike strncasecmp(), this function works correctly in multibyte
+ locales. */
+extern char * mbspcasecmp (const char *string, const char *prefix)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCASESTR@
+/* Find the first occurrence of the character string NEEDLE in the character
+ string HAYSTACK, using case-insensitive comparison.
+ Note: This function may, in multibyte locales, return success even if
+ strlen (haystack) < strlen (needle) !
+ Unlike strcasestr(), this function works correctly in multibyte locales. */
+extern char * mbscasestr (const char *haystack, const char *needle)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSCSPN@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strcspn(), this function works correctly in multibyte locales. */
+extern size_t mbscspn (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSPBRK@
+/* Find the first occurrence in the character string STRING of any character
+ in the character string ACCEPT. Return the pointer to it, or NULL if none
+ exists.
+ Unlike strpbrk(), this function works correctly in multibyte locales. */
+# define mbspbrk rpl_mbspbrk /* avoid collision with HP-UX function */
+extern char * mbspbrk (const char *string, const char *accept)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSSPN@
+/* Find the first occurrence in the character string STRING of any character
+ not in the character string REJECT. Return the number of bytes from the
+ beginning of the string to this occurrence, or to the end of the string
+ if none exists.
+ Unlike strspn(), this function works correctly in multibyte locales. */
+extern size_t mbsspn (const char *string, const char *reject)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSSEP@
+/* Search the next delimiter (multibyte character listed in the character
+ string DELIM) starting at the character string *STRINGP.
+ If one is found, overwrite it with a NUL, and advance *STRINGP to point
+ to the next multibyte character after it. Otherwise, set *STRINGP to NULL.
+ If *STRINGP was already NULL, nothing happens.
+ Return the old value of *STRINGP.
+
+ This is a variant of mbstok_r() that supports empty fields.
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbstok_r(). */
+extern char * mbssep (char **stringp, const char *delim)
+ _GL_ARG_NONNULL ((1, 2));
+#endif
+
+#if @GNULIB_MBSTOK_R@
+/* Parse the character string STRING into tokens separated by characters in
+ the character string DELIM.
+ If STRING is NULL, the saved pointer in SAVE_PTR is used as
+ the next starting point. For example:
+ char s[] = "-abc-=-def";
+ char *sp;
+ x = mbstok_r(s, "-", &sp); // x = "abc", sp = "=-def"
+ x = mbstok_r(NULL, "-=", &sp); // x = "def", sp = NULL
+ x = mbstok_r(NULL, "=", &sp); // x = NULL
+ // s = "abc\0-def\0"
+
+ Caveat: It modifies the original string.
+ Caveat: These functions cannot be used on constant strings.
+ Caveat: The identity of the delimiting character is lost.
+
+ See also mbssep(). */
+extern char * mbstok_r (char *string, const char *delim, char **save_ptr)
+ _GL_ARG_NONNULL ((2, 3));
+#endif
+
+/* Map any int, typically from errno, into an error message. */
+#if @GNULIB_STRERROR@
+# if @REPLACE_STRERROR@
+# undef strerror
+# define strerror rpl_strerror
+extern char *strerror (int);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strerror
+/* Assume strerror is always declared. */
+_GL_WARN_ON_USE (strerror, "strerror is unportable - "
+ "use gnulib module strerror to guarantee non-NULL result");
+#endif
+
+#if @GNULIB_STRSIGNAL@
+# if @REPLACE_STRSIGNAL@
+# define strsignal rpl_strsignal
+# endif
+# if ! @HAVE_DECL_STRSIGNAL@ || @REPLACE_STRSIGNAL@
+extern char *strsignal (int __sig);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strsignal
+# if HAVE_RAW_DECL_STRSIGNAL
+_GL_WARN_ON_USE (strsignal, "strsignal is unportable - "
+ "use gnulib module strsignal for portability");
+# endif
+#endif
+
+#if @GNULIB_STRVERSCMP@
+# if !@HAVE_STRVERSCMP@
+extern int strverscmp (const char *, const char *) _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef strverscmp
+# if HAVE_RAW_DECL_STRVERSCMP
+_GL_WARN_ON_USE (strverscmp, "strverscmp is unportable - "
+ "use gnulib module strverscmp for portability");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_STRING_H */
+#endif /* _GL_STRING_H */
diff --git a/gnu/stripslash.c b/gnu/stripslash.c
new file mode 100755
index 00000000..3a5996fd
--- /dev/null
+++ b/gnu/stripslash.c
@@ -0,0 +1,45 @@
+/* stripslash.c -- remove redundant trailing slashes from a file name
+
+ Copyright (C) 1990, 2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+/* Remove trailing slashes from FILE. Return true if a trailing slash
+ was removed. This is useful when using file name completion from a
+ shell that adds a "/" after directory names (such as tcsh and
+ bash), because on symlinks to directories, several system calls
+ have different semantics according to whether a trailing slash is
+ present. */
+
+bool
+strip_trailing_slashes (char *file)
+{
+ char *base = last_component (file);
+ char *base_lim;
+ bool had_slash;
+
+ /* last_component returns "" for file system roots, but we need to turn
+ `///' into `/'. */
+ if (! *base)
+ base = file;
+ base_lim = base + base_len (base);
+ had_slash = (*base_lim != '\0');
+ *base_lim = '\0';
+ return had_slash;
+}
diff --git a/gnu/strndup.c b/gnu/strndup.c
new file mode 100755
index 00000000..3de3dbc5
--- /dev/null
+++ b/gnu/strndup.c
@@ -0,0 +1,37 @@
+/* A replacement function, for systems that lack strndup.
+
+ Copyright (C) 1996, 1997, 1998, 2001, 2002, 2003, 2005, 2006, 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 General Public License as published by the
+ Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+char *
+strndup (char const *s, size_t n)
+{
+ size_t len = strnlen (s, n);
+ char *new = malloc (len + 1);
+
+ if (new == NULL)
+ return NULL;
+
+ new[len] = '\0';
+ return memcpy (new, s, len);
+}
diff --git a/gnu/strnlen.c b/gnu/strnlen.c
new file mode 100755
index 00000000..f1ec356d
--- /dev/null
+++ b/gnu/strnlen.c
@@ -0,0 +1,31 @@
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ Copyright (C) 2005, 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Simon Josefsson.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <string.h>
+
+/* Find the length of STRING, but scan at most MAXLEN characters.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+
+size_t
+strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
diff --git a/gnu/strnlen1.c b/gnu/strnlen1.c
new file mode 100755
index 00000000..b8cd2bff
--- /dev/null
+++ b/gnu/strnlen1.c
@@ -0,0 +1,35 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "strnlen1.h"
+
+#include <string.h>
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+/* This is the same as strnlen (string, maxlen - 1) + 1. */
+size_t
+strnlen1 (const char *string, size_t maxlen)
+{
+ const char *end = (const char *) memchr (string, '\0', maxlen);
+ if (end != NULL)
+ return end - string + 1;
+ else
+ return maxlen;
+}
diff --git a/gnu/strnlen1.h b/gnu/strnlen1.h
new file mode 100755
index 00000000..dfaf62dc
--- /dev/null
+++ b/gnu/strnlen1.h
@@ -0,0 +1,39 @@
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ Copyright (C) 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _STRNLEN1_H
+#define _STRNLEN1_H
+
+#include <stddef.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Find the length of STRING + 1, but scan at most MAXLEN bytes.
+ If no '\0' terminator is found in that many characters, return MAXLEN. */
+/* This is the same as strnlen (string, maxlen - 1) + 1. */
+extern size_t strnlen1 (const char *string, size_t maxlen);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _STRNLEN1_H */
diff --git a/gnu/strtod.c b/gnu/strtod.c
new file mode 100755
index 00000000..371476ee
--- /dev/null
+++ b/gnu/strtod.c
@@ -0,0 +1,276 @@
+/* Copyright (C) 1991-1992, 1997, 1999, 2003, 2006, 2008-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the nptr == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
+#include <stdlib.h>
+
+#include <ctype.h>
+#include <errno.h>
+#include <float.h>
+#include <math.h>
+#include <stdbool.h>
+#include <string.h>
+
+#include "c-ctype.h"
+
+/* Convert NPTR to a double. If ENDPTR is not NULL, a pointer to the
+ character after the last one used in the number is put in *ENDPTR. */
+double
+strtod (const char *nptr, char **endptr)
+{
+ const unsigned char *s;
+ bool negative = false;
+
+ /* The number so far. */
+ double num;
+
+ bool got_dot; /* Found a decimal point. */
+ bool got_digit; /* Seen any digits. */
+ bool hex = false; /* Look for hex float exponent. */
+
+ /* The exponent of the number. */
+ long int exponent;
+
+ if (nptr == NULL)
+ {
+ errno = EINVAL;
+ goto noconv;
+ }
+
+ /* Use unsigned char for the ctype routines. */
+ s = (unsigned char *) nptr;
+
+ /* Eat whitespace. */
+ while (isspace (*s))
+ ++s;
+
+ /* Get the sign. */
+ negative = *s == '-';
+ if (*s == '-' || *s == '+')
+ ++s;
+
+ num = 0.0;
+ got_dot = false;
+ got_digit = false;
+ exponent = 0;
+
+ /* Check for hex float. */
+ if (*s == '0' && c_tolower (s[1]) == 'x'
+ && (c_isxdigit (s[2]) || ('.' == s[2] && c_isxdigit (s[3]))))
+ {
+ hex = true;
+ s += 2;
+ for (;; ++s)
+ {
+ if (c_isxdigit (*s))
+ {
+ got_digit = true;
+
+ /* Make sure that multiplication by 16 will not overflow. */
+ if (num > DBL_MAX / 16)
+ /* The value of the digit doesn't matter, since we have already
+ gotten as many digits as can be represented in a `double'.
+ This doesn't necessarily mean the result will overflow.
+ The exponent may reduce it to within range.
+
+ We just need to record that there was another
+ digit so that we can multiply by 16 later. */
+ ++exponent;
+ else
+ num = ((num * 16.0)
+ + (c_tolower (*s) - (c_isdigit (*s) ? '0' : 'a' - 10)));
+
+ /* Keep track of the number of digits after the decimal point.
+ If we just divided by 16 here, we would lose precision. */
+ if (got_dot)
+ --exponent;
+ }
+ else if (!got_dot && *s == '.')
+ /* Record that we have found the decimal point. */
+ got_dot = true;
+ else
+ /* Any other character terminates the number. */
+ break;
+ }
+ }
+
+ /* Not a hex float. */
+ else
+ {
+ for (;; ++s)
+ {
+ if (c_isdigit (*s))
+ {
+ got_digit = true;
+
+ /* Make sure that multiplication by 10 will not overflow. */
+ if (num > DBL_MAX * 0.1)
+ /* The value of the digit doesn't matter, since we have already
+ gotten as many digits as can be represented in a `double'.
+ This doesn't necessarily mean the result will overflow.
+ The exponent may reduce it to within range.
+
+ We just need to record that there was another
+ digit so that we can multiply by 10 later. */
+ ++exponent;
+ else
+ num = (num * 10.0) + (*s - '0');
+
+ /* Keep track of the number of digits after the decimal point.
+ If we just divided by 10 here, we would lose precision. */
+ if (got_dot)
+ --exponent;
+ }
+ else if (!got_dot && *s == '.')
+ /* Record that we have found the decimal point. */
+ got_dot = true;
+ else
+ /* Any other character terminates the number. */
+ break;
+ }
+ }
+
+ if (!got_digit)
+ {
+ /* Check for infinities and NaNs. */
+ if (c_tolower (*s) == 'i'
+ && c_tolower (s[1]) == 'n'
+ && c_tolower (s[2]) == 'f')
+ {
+ s += 3;
+ num = HUGE_VAL;
+ if (c_tolower (*s) == 'i'
+ && c_tolower (s[1]) == 'n'
+ && c_tolower (s[2]) == 'i'
+ && c_tolower (s[3]) == 't'
+ && c_tolower (s[4]) == 'y')
+ s += 5;
+ goto valid;
+ }
+#ifdef NAN
+ else if (c_tolower (*s) == 'n'
+ && c_tolower (s[1]) == 'a'
+ && c_tolower (s[2]) == 'n')
+ {
+ s += 3;
+ num = NAN;
+ /* Since nan(<n-char-sequence>) is implementation-defined,
+ we define it by ignoring <n-char-sequence>. A nicer
+ implementation would populate the bits of the NaN
+ according to interpreting n-char-sequence as a
+ hexadecimal number, but the result is still a NaN. */
+ if (*s == '(')
+ {
+ const unsigned char *p = s + 1;
+ while (c_isalnum (*p))
+ p++;
+ if (*p == ')')
+ s = p + 1;
+ }
+ goto valid;
+ }
+#endif
+ goto noconv;
+ }
+
+ if (c_tolower (*s) == (hex ? 'p' : 'e') && !isspace (s[1]))
+ {
+ /* Get the exponent specified after the `e' or `E'. */
+ int save = errno;
+ char *end;
+ long int value;
+
+ errno = 0;
+ ++s;
+ value = strtol ((char *) s, &end, 10);
+ if (errno == ERANGE && num)
+ {
+ /* The exponent overflowed a `long int'. It is probably a safe
+ assumption that an exponent that cannot be represented by
+ a `long int' exceeds the limits of a `double'. */
+ if (endptr != NULL)
+ *endptr = end;
+ if (value < 0)
+ goto underflow;
+ else
+ goto overflow;
+ }
+ else if (end == (char *) s)
+ /* There was no exponent. Reset END to point to
+ the 'e' or 'E', so *ENDPTR will be set there. */
+ end = (char *) s - 1;
+ errno = save;
+ s = (unsigned char *) end;
+ exponent += value;
+ }
+
+ if (num == 0.0)
+ goto valid;
+
+ if (hex)
+ {
+ /* ldexp takes care of range errors. */
+ num = ldexp (num, exponent);
+ goto valid;
+ }
+
+ /* Multiply NUM by 10 to the EXPONENT power,
+ checking for overflow and underflow. */
+
+ if (exponent < 0)
+ {
+ if (num < DBL_MIN * pow (10.0, (double) -exponent))
+ goto underflow;
+ }
+ else if (exponent > 0)
+ {
+ if (num > DBL_MAX * pow (10.0, (double) -exponent))
+ goto overflow;
+ }
+
+ num *= pow (10.0, (double) exponent);
+
+ valid:
+ if (endptr != NULL)
+ *endptr = (char *) s;
+ return negative ? -num : num;
+
+ overflow:
+ /* Return an overflow error. */
+ if (endptr != NULL)
+ *endptr = (char *) s;
+ errno = ERANGE;
+ return negative ? -HUGE_VAL : HUGE_VAL;
+
+ underflow:
+ /* Return an underflow error. */
+ if (endptr != NULL)
+ *endptr = (char *) s;
+ errno = ERANGE;
+ return negative ? -0.0 : 0.0;
+
+ noconv:
+ /* There was no number. */
+ if (endptr != NULL)
+ *endptr = (char *) nptr;
+ errno = EINVAL;
+ return 0.0;
+}
diff --git a/gnu/strtol.c b/gnu/strtol.c
new file mode 100755
index 00000000..d1b5bc0c
--- /dev/null
+++ b/gnu/strtol.c
@@ -0,0 +1,434 @@
+/* Convert string representation of a number into an integer value.
+
+ Copyright (C) 1991, 1992, 1994, 1995, 1996, 1997, 1998, 1999, 2003, 2005,
+ 2006, 2007, 2009, 2010 Free Software Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc@gnu.org.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3 of the License, or 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef _LIBC
+# define USE_NUMBER_GROUPING
+#else
+# include <config.h>
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#include <limits.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#ifdef USE_NUMBER_GROUPING
+# include "../locale/localeinfo.h"
+#endif
+
+/* Nonzero if we are defining `strtoul' or `strtoull', operating on
+ unsigned integers. */
+#ifndef UNSIGNED
+# define UNSIGNED 0
+# define INT LONG int
+#else
+# define INT unsigned LONG int
+#endif
+
+/* Determine the name. */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# if UNSIGNED
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol __wcstoull_l
+# else
+# define strtol __wcstoul_l
+# endif
+# else
+# ifdef QUAD
+# define strtol __strtoull_l
+# else
+# define strtol __strtoul_l
+# endif
+# endif
+# else
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol __wcstoll_l
+# else
+# define strtol __wcstol_l
+# endif
+# else
+# ifdef QUAD
+# define strtol __strtoll_l
+# else
+# define strtol __strtol_l
+# endif
+# endif
+# endif
+#else
+# if UNSIGNED
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstoull
+# else
+# define strtol wcstoul
+# endif
+# else
+# ifdef QUAD
+# define strtol strtoull
+# else
+# define strtol strtoul
+# endif
+# endif
+# else
+# ifdef USE_WIDE_CHAR
+# ifdef QUAD
+# define strtol wcstoll
+# else
+# define strtol wcstol
+# endif
+# else
+# ifdef QUAD
+# define strtol strtoll
+# endif
+# endif
+# endif
+#endif
+
+/* If QUAD is defined, we are defining `strtoll' or `strtoull',
+ operating on `long long int's. */
+#ifdef QUAD
+# define LONG long long
+# define STRTOL_LONG_MIN LONG_LONG_MIN
+# define STRTOL_LONG_MAX LONG_LONG_MAX
+# define STRTOL_ULONG_MAX ULONG_LONG_MAX
+
+/* The extra casts in the following macros work around compiler bugs,
+ e.g., in Cray C 5.0.3.0. */
+
+/* True if negative values of the signed integer type T use two's
+ complement, ones' complement, or signed magnitude representation,
+ respectively. Much GNU code assumes two's complement, but some
+ people like to be portable to all possible C hosts. */
+# define TYPE_TWOS_COMPLEMENT(t) ((t) ~ (t) 0 == (t) -1)
+# define TYPE_ONES_COMPLEMENT(t) ((t) ~ (t) 0 == 0)
+# define TYPE_SIGNED_MAGNITUDE(t) ((t) ~ (t) 0 < (t) -1)
+
+/* True if the arithmetic type T is signed. */
+# define TYPE_SIGNED(t) (! ((t) 0 < (t) -1))
+
+/* The maximum and minimum values for the integer type T. These
+ macros have undefined behavior if T is signed and has padding bits.
+ If this is a problem for you, please let us know how to fix it for
+ your host. */
+# define TYPE_MINIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) 0 \
+ : TYPE_SIGNED_MAGNITUDE (t) \
+ ? ~ (t) 0 \
+ : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+# define TYPE_MAXIMUM(t) \
+ ((t) (! TYPE_SIGNED (t) \
+ ? (t) -1 \
+ : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+
+# ifndef ULONG_LONG_MAX
+# define ULONG_LONG_MAX TYPE_MAXIMUM (unsigned long long)
+# endif
+# ifndef LONG_LONG_MAX
+# define LONG_LONG_MAX TYPE_MAXIMUM (long long int)
+# endif
+# ifndef LONG_LONG_MIN
+# define LONG_LONG_MIN TYPE_MINIMUM (long long int)
+# endif
+
+# if __GNUC__ == 2 && __GNUC_MINOR__ < 7
+ /* Work around gcc bug with using this constant. */
+ static const unsigned long long int maxquad = ULONG_LONG_MAX;
+# undef STRTOL_ULONG_MAX
+# define STRTOL_ULONG_MAX maxquad
+# endif
+#else
+# define LONG long
+# define STRTOL_LONG_MIN LONG_MIN
+# define STRTOL_LONG_MAX LONG_MAX
+# define STRTOL_ULONG_MAX ULONG_MAX
+#endif
+
+
+/* We use this code also for the extended locale handling where the
+ function gets as an additional argument the locale which has to be
+ used. To access the values we have to redefine the _NL_CURRENT
+ macro. */
+#ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# undef _NL_CURRENT
+# define _NL_CURRENT(category, item) \
+ (current->values[_NL_ITEM_INDEX (item)].string)
+# define LOCALE_PARAM , loc
+# define LOCALE_PARAM_PROTO , __locale_t loc
+#else
+# define LOCALE_PARAM
+# define LOCALE_PARAM_PROTO
+#endif
+
+#include <wchar.h>
+
+#ifdef USE_WIDE_CHAR
+# include <wctype.h>
+# define L_(Ch) L##Ch
+# define UCHAR_TYPE wint_t
+# define STRING_TYPE wchar_t
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define ISSPACE(Ch) __iswspace_l ((Ch), loc)
+# define ISALPHA(Ch) __iswalpha_l ((Ch), loc)
+# define TOUPPER(Ch) __towupper_l ((Ch), loc)
+# else
+# define ISSPACE(Ch) iswspace (Ch)
+# define ISALPHA(Ch) iswalpha (Ch)
+# define TOUPPER(Ch) towupper (Ch)
+# endif
+#else
+# define L_(Ch) Ch
+# define UCHAR_TYPE unsigned char
+# define STRING_TYPE char
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+# define ISSPACE(Ch) __isspace_l ((Ch), loc)
+# define ISALPHA(Ch) __isalpha_l ((Ch), loc)
+# define TOUPPER(Ch) __toupper_l ((Ch), loc)
+# else
+# define ISSPACE(Ch) isspace (Ch)
+# define ISALPHA(Ch) isalpha (Ch)
+# define TOUPPER(Ch) toupper (Ch)
+# endif
+#endif
+
+#define INTERNAL(X) INTERNAL1(X)
+#define INTERNAL1(X) __##X##_internal
+#define WEAKNAME(X) WEAKNAME1(X)
+
+#ifdef USE_NUMBER_GROUPING
+/* This file defines a function to check for correct grouping. */
+# include "grouping.h"
+#endif
+
+
+
+/* Convert NPTR to an `unsigned long int' or `long int' in base BASE.
+ If BASE is 0 the base is determined by the presence of a leading
+ zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal.
+ If BASE is < 2 or > 36, it is reset to 10.
+ If ENDPTR is not NULL, a pointer to the character after the last
+ one converted is stored in *ENDPTR. */
+
+INT
+INTERNAL (strtol) (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base, int group LOCALE_PARAM_PROTO)
+{
+ int negative;
+ register unsigned LONG int cutoff;
+ register unsigned int cutlim;
+ register unsigned LONG int i;
+ register const STRING_TYPE *s;
+ register UCHAR_TYPE c;
+ const STRING_TYPE *save, *end;
+ int overflow;
+
+#ifdef USE_NUMBER_GROUPING
+# ifdef USE_IN_EXTENDED_LOCALE_MODEL
+ struct locale_data *current = loc->__locales[LC_NUMERIC];
+# endif
+ /* The thousands character of the current locale. */
+ wchar_t thousands = L'\0';
+ /* The numeric grouping specification of the current locale,
+ in the format described in <locale.h>. */
+ const char *grouping;
+
+ if (group)
+ {
+ grouping = _NL_CURRENT (LC_NUMERIC, GROUPING);
+ if (*grouping <= 0 || *grouping == CHAR_MAX)
+ grouping = NULL;
+ else
+ {
+ /* Figure out the thousands separator character. */
+# if defined _LIBC || defined _HAVE_BTOWC
+ thousands = __btowc (*_NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP));
+ if (thousands == WEOF)
+ thousands = L'\0';
+# endif
+ if (thousands == L'\0')
+ grouping = NULL;
+ }
+ }
+ else
+ grouping = NULL;
+#endif
+
+ if (base < 0 || base == 1 || base > 36)
+ {
+ __set_errno (EINVAL);
+ return 0;
+ }
+
+ save = s = nptr;
+
+ /* Skip white space. */
+ while (ISSPACE (*s))
+ ++s;
+ if (*s == L_('\0'))
+ goto noconv;
+
+ /* Check for a sign. */
+ if (*s == L_('-'))
+ {
+ negative = 1;
+ ++s;
+ }
+ else if (*s == L_('+'))
+ {
+ negative = 0;
+ ++s;
+ }
+ else
+ negative = 0;
+
+ /* Recognize number prefix and if BASE is zero, figure it out ourselves. */
+ if (*s == L_('0'))
+ {
+ if ((base == 0 || base == 16) && TOUPPER (s[1]) == L_('X'))
+ {
+ s += 2;
+ base = 16;
+ }
+ else if (base == 0)
+ base = 8;
+ }
+ else if (base == 0)
+ base = 10;
+
+ /* Save the pointer so we can check later if anything happened. */
+ save = s;
+
+#ifdef USE_NUMBER_GROUPING
+ if (group)
+ {
+ /* Find the end of the digit string and check its grouping. */
+ end = s;
+ for (c = *end; c != L_('\0'); c = *++end)
+ if ((wchar_t) c != thousands
+ && ((wchar_t) c < L_('0') || (wchar_t) c > L_('9'))
+ && (!ISALPHA (c) || (int) (TOUPPER (c) - L_('A') + 10) >= base))
+ break;
+ if (*s == thousands)
+ end = s;
+ else
+ end = correctly_grouped_prefix (s, end, thousands, grouping);
+ }
+ else
+#endif
+ end = NULL;
+
+ cutoff = STRTOL_ULONG_MAX / (unsigned LONG int) base;
+ cutlim = STRTOL_ULONG_MAX % (unsigned LONG int) base;
+
+ overflow = 0;
+ i = 0;
+ for (c = *s; c != L_('\0'); c = *++s)
+ {
+ if (s == end)
+ break;
+ if (c >= L_('0') && c <= L_('9'))
+ c -= L_('0');
+ else if (ISALPHA (c))
+ c = TOUPPER (c) - L_('A') + 10;
+ else
+ break;
+ if ((int) c >= base)
+ break;
+ /* Check for overflow. */
+ if (i > cutoff || (i == cutoff && c > cutlim))
+ overflow = 1;
+ else
+ {
+ i *= (unsigned LONG int) base;
+ i += c;
+ }
+ }
+
+ /* Check if anything actually happened. */
+ if (s == save)
+ goto noconv;
+
+ /* Store in ENDPTR the address of one character
+ past the last character we converted. */
+ if (endptr != NULL)
+ *endptr = (STRING_TYPE *) s;
+
+#if !UNSIGNED
+ /* Check for a value that is within the range of
+ `unsigned LONG int', but outside the range of `LONG int'. */
+ if (overflow == 0
+ && i > (negative
+ ? -((unsigned LONG int) (STRTOL_LONG_MIN + 1)) + 1
+ : (unsigned LONG int) STRTOL_LONG_MAX))
+ overflow = 1;
+#endif
+
+ if (overflow)
+ {
+ __set_errno (ERANGE);
+#if UNSIGNED
+ return STRTOL_ULONG_MAX;
+#else
+ return negative ? STRTOL_LONG_MIN : STRTOL_LONG_MAX;
+#endif
+ }
+
+ /* Return the result of the appropriate sign. */
+ return negative ? -i : i;
+
+noconv:
+ /* We must handle a special case here: the base is 0 or 16 and the
+ first two characters are '0' and 'x', but the rest are no
+ hexadecimal digits. This is no error case. We return 0 and
+ ENDPTR points to the `x`. */
+ if (endptr != NULL)
+ {
+ if (save - nptr >= 2 && TOUPPER (save[-1]) == L_('X')
+ && save[-2] == L_('0'))
+ *endptr = (STRING_TYPE *) &save[-1];
+ else
+ /* There was no number to convert. */
+ *endptr = (STRING_TYPE *) nptr;
+ }
+
+ return 0L;
+}
+
+/* External user entry point. */
+
+
+INT
+#ifdef weak_function
+weak_function
+#endif
+strtol (const STRING_TYPE *nptr, STRING_TYPE **endptr,
+ int base LOCALE_PARAM_PROTO)
+{
+ return INTERNAL (strtol) (nptr, endptr, base, 0 LOCALE_PARAM);
+}
diff --git a/gnu/sys_stat.in.h b/gnu/sys_stat.in.h
new file mode 100755
index 00000000..8edf420f
--- /dev/null
+++ b/gnu/sys_stat.in.h
@@ -0,0 +1,548 @@
+/* Provide a more complete sys/stat header file.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake, Paul Eggert, and Jim Meyering. */
+
+/* This file is supposed to be used on platforms where <sys/stat.h> is
+ incomplete. It is intended to provide definitions and prototypes
+ needed by an application. Start with what the system provides. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_system_sys_stat_h
+/* Special invocation convention. */
+
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_SYS_STAT_H
+
+/* Get nlink_t. */
+#include <sys/types.h>
+
+/* Get struct timespec. */
+#include <time.h>
+
+/* The include_next requires a split double-inclusion guard. */
+#@INCLUDE_NEXT@ @NEXT_SYS_STAT_H@
+
+#ifndef _GL_SYS_STAT_H
+#define _GL_SYS_STAT_H
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+/* Before doing "#define mkdir rpl_mkdir" below, we need to include all
+ headers that may declare mkdir(). */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+#endif
+
+#ifndef S_IFMT
+# define S_IFMT 0170000
+#endif
+
+#if STAT_MACROS_BROKEN
+# undef S_ISBLK
+# undef S_ISCHR
+# undef S_ISDIR
+# undef S_ISFIFO
+# undef S_ISLNK
+# undef S_ISNAM
+# undef S_ISMPB
+# undef S_ISMPC
+# undef S_ISNWK
+# undef S_ISREG
+# undef S_ISSOCK
+#endif
+
+#ifndef S_ISBLK
+# ifdef S_IFBLK
+# define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK)
+# else
+# define S_ISBLK(m) 0
+# endif
+#endif
+
+#ifndef S_ISCHR
+# ifdef S_IFCHR
+# define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR)
+# else
+# define S_ISCHR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDIR
+# ifdef S_IFDIR
+# define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR)
+# else
+# define S_ISDIR(m) 0
+# endif
+#endif
+
+#ifndef S_ISDOOR /* Solaris 2.5 and up */
+# define S_ISDOOR(m) 0
+#endif
+
+#ifndef S_ISFIFO
+# ifdef S_IFIFO
+# define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO)
+# else
+# define S_ISFIFO(m) 0
+# endif
+#endif
+
+#ifndef S_ISLNK
+# ifdef S_IFLNK
+# define S_ISLNK(m) (((m) & S_IFMT) == S_IFLNK)
+# else
+# define S_ISLNK(m) 0
+# endif
+#endif
+
+#ifndef S_ISMPB /* V7 */
+# ifdef S_IFMPB
+# define S_ISMPB(m) (((m) & S_IFMT) == S_IFMPB)
+# define S_ISMPC(m) (((m) & S_IFMT) == S_IFMPC)
+# else
+# define S_ISMPB(m) 0
+# define S_ISMPC(m) 0
+# endif
+#endif
+
+#ifndef S_ISNAM /* Xenix */
+# ifdef S_IFNAM
+# define S_ISNAM(m) (((m) & S_IFMT) == S_IFNAM)
+# else
+# define S_ISNAM(m) 0
+# endif
+#endif
+
+#ifndef S_ISNWK /* HP/UX */
+# ifdef S_IFNWK
+# define S_ISNWK(m) (((m) & S_IFMT) == S_IFNWK)
+# else
+# define S_ISNWK(m) 0
+# endif
+#endif
+
+#ifndef S_ISPORT /* Solaris 10 and up */
+# define S_ISPORT(m) 0
+#endif
+
+#ifndef S_ISREG
+# ifdef S_IFREG
+# define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+# else
+# define S_ISREG(m) 0
+# endif
+#endif
+
+#ifndef S_ISSOCK
+# ifdef S_IFSOCK
+# define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK)
+# else
+# define S_ISSOCK(m) 0
+# endif
+#endif
+
+
+#ifndef S_TYPEISMQ
+# define S_TYPEISMQ(p) 0
+#endif
+
+#ifndef S_TYPEISTMO
+# define S_TYPEISTMO(p) 0
+#endif
+
+
+#ifndef S_TYPEISSEM
+# ifdef S_INSEM
+# define S_TYPEISSEM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSEM)
+# else
+# define S_TYPEISSEM(p) 0
+# endif
+#endif
+
+#ifndef S_TYPEISSHM
+# ifdef S_INSHD
+# define S_TYPEISSHM(p) (S_ISNAM ((p)->st_mode) && (p)->st_rdev == S_INSHD)
+# else
+# define S_TYPEISSHM(p) 0
+# endif
+#endif
+
+/* high performance ("contiguous data") */
+#ifndef S_ISCTG
+# define S_ISCTG(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with data */
+#ifndef S_ISOFD
+# define S_ISOFD(p) 0
+#endif
+
+/* Cray DMF (data migration facility): off line, with no data */
+#ifndef S_ISOFL
+# define S_ISOFL(p) 0
+#endif
+
+/* 4.4BSD whiteout */
+#ifndef S_ISWHT
+# define S_ISWHT(m) 0
+#endif
+
+/* If any of the following are undefined,
+ define them to their de facto standard values. */
+#if !S_ISUID
+# define S_ISUID 04000
+#endif
+#if !S_ISGID
+# define S_ISGID 02000
+#endif
+
+/* S_ISVTX is a common extension to POSIX. */
+#ifndef S_ISVTX
+# define S_ISVTX 01000
+#endif
+
+#if !S_IRUSR && S_IREAD
+# define S_IRUSR S_IREAD
+#endif
+#if !S_IRUSR
+# define S_IRUSR 00400
+#endif
+#if !S_IRGRP
+# define S_IRGRP (S_IRUSR >> 3)
+#endif
+#if !S_IROTH
+# define S_IROTH (S_IRUSR >> 6)
+#endif
+
+#if !S_IWUSR && S_IWRITE
+# define S_IWUSR S_IWRITE
+#endif
+#if !S_IWUSR
+# define S_IWUSR 00200
+#endif
+#if !S_IWGRP
+# define S_IWGRP (S_IWUSR >> 3)
+#endif
+#if !S_IWOTH
+# define S_IWOTH (S_IWUSR >> 6)
+#endif
+
+#if !S_IXUSR && S_IEXEC
+# define S_IXUSR S_IEXEC
+#endif
+#if !S_IXUSR
+# define S_IXUSR 00100
+#endif
+#if !S_IXGRP
+# define S_IXGRP (S_IXUSR >> 3)
+#endif
+#if !S_IXOTH
+# define S_IXOTH (S_IXUSR >> 6)
+#endif
+
+#if !S_IRWXU
+# define S_IRWXU (S_IRUSR | S_IWUSR | S_IXUSR)
+#endif
+#if !S_IRWXG
+# define S_IRWXG (S_IRGRP | S_IWGRP | S_IXGRP)
+#endif
+#if !S_IRWXO
+# define S_IRWXO (S_IROTH | S_IWOTH | S_IXOTH)
+#endif
+
+/* S_IXUGO is a common extension to POSIX. */
+#if !S_IXUGO
+# define S_IXUGO (S_IXUSR | S_IXGRP | S_IXOTH)
+#endif
+
+#ifndef S_IRWXUGO
+# define S_IRWXUGO (S_IRWXU | S_IRWXG | S_IRWXO)
+#endif
+
+/* Macros for futimens and utimensat. */
+#ifndef UTIME_NOW
+# define UTIME_NOW (-1)
+# define UTIME_OMIT (-2)
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_FCHMODAT@
+# if !@HAVE_FCHMODAT@
+extern int fchmodat (int fd, char const *file, mode_t mode, int flag)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchmodat
+# if HAVE_RAW_DECL_FCHMODAT
+_GL_WARN_ON_USE (fchmodat, "fchmodat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @REPLACE_FSTAT@
+# define fstat rpl_fstat
+extern int fstat (int fd, struct stat *buf) _GL_ARG_NONNULL ((2));
+#endif
+
+
+#if @GNULIB_FSTATAT@
+# if @REPLACE_FSTATAT@
+# undef fstatat
+# define fstatat rpl_fstatat
+# endif
+# if !@HAVE_FSTATAT@ || @REPLACE_FSTATAT@
+extern int fstatat (int fd, char const *name, struct stat *st, int flags)
+ _GL_ARG_NONNULL ((2, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fstatat
+# if HAVE_RAW_DECL_FSTATAT
+_GL_WARN_ON_USE (fstatat, "fstatat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FUTIMENS@
+# if @REPLACE_FUTIMENS@
+# undef futimens
+# define futimens rpl_futimens
+# endif
+# if !@HAVE_FUTIMENS@ || @REPLACE_FUTIMENS@
+extern int futimens (int fd, struct timespec const times[2]);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef futimens
+# if HAVE_RAW_DECL_FUTIMENS
+_GL_WARN_ON_USE (futimens, "futimens is not portable - "
+ "use gnulib module futimens for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHMOD@
+/* Change the mode of FILENAME to MODE, without dereferencing it if FILENAME
+ denotes a symbolic link. */
+# if !@HAVE_LCHMOD@
+/* The lchmod replacement follows symbolic links. Callers should take
+ this into account; lchmod should be applied only to arguments that
+ are known to not be symbolic links. On hosts that lack lchmod,
+ this can lead to race conditions between the check and the
+ invocation of lchmod, but we know of no workarounds that are
+ reliable in general. You might try requesting support for lchmod
+ from your operating system supplier. */
+# define lchmod chmod
+# endif
+# if 0 /* assume already declared */
+extern int lchmod (const char *filename, mode_t mode) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchmod
+# if HAVE_RAW_DECL_LCHMOD
+_GL_WARN_ON_USE (lchmod, "lchmod is unportable - "
+ "use gnulib module lchmod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LSTAT@
+# if ! @HAVE_LSTAT@
+/* mingw does not support symlinks, therefore it does not have lstat. But
+ without links, stat does just fine. */
+# define lstat stat
+# elif @REPLACE_LSTAT@
+# undef lstat
+# define lstat rpl_lstat
+extern int rpl_lstat (const char *name, struct stat *buf)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lstat
+# if HAVE_RAW_DECL_LSTAT
+_GL_WARN_ON_USE (lstat, "lstat is unportable - "
+ "use gnulib module lstat for portability");
+# endif
+#endif
+
+
+#if @REPLACE_MKDIR@
+# undef mkdir
+# define mkdir rpl_mkdir
+extern int mkdir (char const *name, mode_t mode) _GL_ARG_NONNULL ((1));
+#else
+/* mingw's _mkdir() function has 1 argument, but we pass 2 arguments.
+ Additionally, it declares _mkdir (and depending on compile flags, an
+ alias mkdir), only in the nonstandard <io.h>, which is included above. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+static inline int
+rpl_mkdir (char const *name, mode_t mode)
+{
+ return _mkdir (name);
+}
+
+# define mkdir rpl_mkdir
+# endif
+#endif
+
+
+#if @GNULIB_MKDIRAT@
+# if !@HAVE_MKDIRAT@
+extern int mkdirat (int fd, char const *file, mode_t mode)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkdirat
+# if HAVE_RAW_DECL_MKDIRAT
+_GL_WARN_ON_USE (mkdirat, "mkdirat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFO@
+# if @REPLACE_MKFIFO@
+# undef mkfifo
+# define mkfifo rpl_mkfifo
+# endif
+# if !@HAVE_MKFIFO@ || @REPLACE_MKFIFO@
+extern int mkfifo (char const *file, mode_t mode) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifo
+# if HAVE_RAW_DECL_MKFIFO
+_GL_WARN_ON_USE (mkfifo, "mkfifo is not portable - "
+ "use gnulib module mkfifo for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKFIFOAT@
+# if !@HAVE_MKFIFOAT@
+extern int mkfifoat (int fd, char const *file, mode_t mode)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mkfifoat
+# if HAVE_RAW_DECL_MKFIFOAT
+_GL_WARN_ON_USE (mkfifoat, "mkfifoat is not portable - "
+ "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNOD@
+# if @REPLACE_MKNOD@
+# undef mknod
+# define mknod rpl_mknod
+# endif
+# if !@HAVE_MKNOD@ || @REPLACE_MKNOD@
+extern int mknod (char const *file, mode_t mode, dev_t dev)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mknod
+# if HAVE_RAW_DECL_MKNOD
+_GL_WARN_ON_USE (mknod, "mknod is not portable - "
+ "use gnulib module mknod for portability");
+# endif
+#endif
+
+
+#if @GNULIB_MKNODAT@
+# if !@HAVE_MKNODAT@
+extern int mknodat (int fd, char const *file, mode_t mode, dev_t dev)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mknodat
+# if HAVE_RAW_DECL_MKNODAT
+_GL_WARN_ON_USE (mknodat, "mknodat is not portable - "
+ "use gnulib module mkfifoat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_STAT@
+# if @REPLACE_STAT@
+/* We can't use the object-like #define stat rpl_stat, because of
+ struct stat. This means that rpl_stat will not be used if the user
+ does (stat)(a,b). Oh well. */
+# undef stat
+# ifdef _LARGE_FILES
+ /* With _LARGE_FILES defined, AIX (only) defines stat to stat64,
+ so we have to replace stat64() instead of stat(). */
+# define stat stat64
+# undef stat64
+# define stat64(name, st) rpl_stat (name, st)
+# else /* !_LARGE_FILES */
+# define stat(name, st) rpl_stat (name, st)
+# endif /* !_LARGE_FILES */
+extern int stat (const char *name, struct stat *buf) _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef stat
+# if HAVE_RAW_DECL_STAT
+_GL_WARN_ON_USE (stat, "stat is unportable - "
+ "use gnulib module stat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UTIMENSAT@
+# if @REPLACE_UTIMENSAT@
+# undef utimensat
+# define utimensat rpl_utimensat
+# endif
+# if !@HAVE_UTIMENSAT@ || @REPLACE_UTIMENSAT@
+ extern int utimensat (int fd, char const *name,
+ struct timespec const times[2], int flag)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef utimensat
+# if HAVE_RAW_DECL_UTIMENSAT
+_GL_WARN_ON_USE (utimensat, "utimensat is not portable - "
+ "use gnulib module utimensat for portability");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_SYS_STAT_H */
+#endif /* _GL_SYS_STAT_H */
+#endif
diff --git a/gnu/sys_time.in.h b/gnu/sys_time.in.h
new file mode 100755
index 00000000..2a45a157
--- /dev/null
+++ b/gnu/sys_time.in.h
@@ -0,0 +1,79 @@
+/* Provide a more complete sys/time.h.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Paul Eggert. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined _GL_SYS_TIME_H
+
+/* Simply delegate to the system's header, without adding anything. */
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# endif
+
+#else
+
+# define _GL_SYS_TIME_H
+
+# if @HAVE_SYS_TIME_H@
+# @INCLUDE_NEXT@ @NEXT_SYS_TIME_H@
+# else
+# include <time.h>
+# endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if ! @HAVE_STRUCT_TIMEVAL@
+struct timeval
+{
+ time_t tv_sec;
+ long int tv_usec;
+};
+# endif
+
+# if @GNULIB_GETTIMEOFDAY@
+# if @REPLACE_GETTIMEOFDAY@
+# undef gettimeofday
+# define gettimeofday rpl_gettimeofday
+# endif
+# if @REPLACE_GETTIMEOFDAY@ || !@HAVE_GETTIMEOFDAY@
+extern int gettimeofday (struct timeval *restrict, void *restrict)
+ _GL_ARG_NONNULL ((1));
+# endif
+# elif defined GNULIB_POSIXCHECK
+# undef gettimeofday
+# if HAVE_RAW_DECL_GETTIMEOFDAY
+_GL_WARN_ON_USE (gettimeofday, "gettimeofday is unportable - "
+ "use gnulib module gettimeofday for portability");
+# endif
+# endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_SYS_TIME_H */
diff --git a/gnu/sys_wait.in.h b/gnu/sys_wait.in.h
new file mode 100755
index 00000000..009fa219
--- /dev/null
+++ b/gnu/sys_wait.in.h
@@ -0,0 +1,106 @@
+/* A POSIX-like <sys/wait.h>.
+ Copyright (C) 2001-2003, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+
+#ifndef _GL_SYS_WAIT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+# @INCLUDE_NEXT@ @NEXT_SYS_WAIT_H@
+#endif
+
+#ifndef _GL_SYS_WAIT_H
+#define _GL_SYS_WAIT_H
+
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+/* Unix API. */
+
+/* The following macros apply to an argument x, that is a status of a process,
+ as returned by waitpid().
+ On nearly all systems, including Linux/x86, WEXITSTATUS are bits 15..8 and
+ WTERMSIG are bits 7..0, while BeOS uses the opposite. Therefore programs
+ have to use the abstract macros. */
+
+/* For valid x, exactly one of WIFSIGNALED(x), WIFEXITED(x), WIFSTOPPED(x)
+ is true. */
+# ifndef WIFSIGNALED
+# define WIFSIGNALED(x) (WTERMSIG (x) != 0 && WTERMSIG(x) != 0x7f)
+# endif
+# ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+# endif
+# ifndef WIFSTOPPED
+# define WIFSTOPPED(x) (WTERMSIG (x) == 0x7f)
+# endif
+
+/* The termination signal. Only to be accessed if WIFSIGNALED(x) is true. */
+# ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+# endif
+
+/* The exit status. Only to be accessed if WIFEXITED(x) is true. */
+# ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+# endif
+
+/* True if the process dumped core. Not standardized by POSIX. */
+# ifndef WCOREDUMP
+# define WCOREDUMP(x) ((x) & 0x80)
+# endif
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* Declarations of functions. */
+
+# ifdef __cplusplus
+}
+# endif
+
+#else
+/* Native Windows API. */
+
+# include <process.h>
+
+# define waitpid(pid,statusp,options) _cwait (statusp, pid, WAIT_CHILD)
+
+/* The following macros apply to an argument x, that is a status of a process,
+ as returned by waitpid() or, equivalently, _cwait() or GetExitCodeProcess().
+ This value is simply an 'int', not composed of bit fields. */
+
+/* When an unhandled fatal signal terminates a process, the exit code is 3. */
+# define WIFSIGNALED(x) ((x) == 3)
+# define WIFEXITED(x) ((x) != 3)
+# define WIFSTOPPED(x) 0
+
+/* The signal that terminated a process is not known posthum. */
+# define WTERMSIG(x) SIGTERM
+
+# define WEXITSTATUS(x) (x)
+
+/* There are no core dumps. */
+# define WCOREDUMP(x) 0
+
+#endif
+
+#endif /* _GL_SYS_WAIT_H */
+#endif /* _GL_SYS_WAIT_H */
diff --git a/gnu/tempname.c b/gnu/tempname.c
new file mode 100755
index 00000000..134908b4
--- /dev/null
+++ b/gnu/tempname.c
@@ -0,0 +1,311 @@
+/* tempname.c - generate the name of a temporary file.
+
+ Copyright (C) 1991-2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Extracted from glibc sysdeps/posix/tempname.c. See also tmpdir.c. */
+
+#if !_LIBC
+# include <config.h>
+# include "tempname.h"
+#endif
+
+#include <sys/types.h>
+#include <assert.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#include <stdio.h>
+#ifndef P_tmpdir
+# define P_tmpdir "/tmp"
+#endif
+#ifndef TMP_MAX
+# define TMP_MAX 238328
+#endif
+#ifndef __GT_FILE
+# define __GT_FILE 0
+# define __GT_DIR 1
+# define __GT_NOCREATE 2
+#endif
+#if !_LIBC && (GT_FILE != __GT_FILE || GT_DIR != __GT_DIR \
+ || GT_NOCREATE != __GT_NOCREATE)
+# error report this to bug-gnulib@gnu.org
+#endif
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <fcntl.h>
+#include <sys/time.h>
+#include <stdint.h>
+#include <unistd.h>
+
+#include <sys/stat.h>
+
+#if _LIBC
+# define struct_stat64 struct stat64
+#else
+# define struct_stat64 struct stat
+# define __gen_tempname gen_tempname
+# define __getpid getpid
+# define __gettimeofday gettimeofday
+# define __mkdir mkdir
+# define __open open
+# define __open64 open
+# define __lxstat64(version, file, buf) lstat (file, buf)
+# define __xstat64(version, file, buf) stat (file, buf)
+#endif
+
+#if ! (HAVE___SECURE_GETENV || _LIBC)
+# define __secure_getenv getenv
+#endif
+
+#ifdef _LIBC
+# include <hp-timing.h>
+# if HP_TIMING_AVAIL
+# define RANDOM_BITS(Var) \
+ if (__builtin_expect (value == UINT64_C (0), 0)) \
+ { \
+ /* If this is the first time this function is used initialize \
+ the variable we accumulate the value in to some somewhat \
+ random value. If we'd not do this programs at startup time \
+ might have a reduced set of possible names, at least on slow \
+ machines. */ \
+ struct timeval tv; \
+ __gettimeofday (&tv, NULL); \
+ value = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec; \
+ } \
+ HP_TIMING_NOW (Var)
+# endif
+#endif
+
+/* Use the widest available unsigned type if uint64_t is not
+ available. The algorithm below extracts a number less than 62**6
+ (approximately 2**35.725) from uint64_t, so ancient hosts where
+ uintmax_t is only 32 bits lose about 3.725 bits of randomness,
+ which is better than not having mkstemp at all. */
+#if !defined UINT64_MAX && !defined uint64_t
+# define uint64_t uintmax_t
+#endif
+
+#if _LIBC
+/* Return nonzero if DIR is an existent directory. */
+static int
+direxists (const char *dir)
+{
+ struct_stat64 buf;
+ return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+}
+
+/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
+ non-null and exists, uses it; otherwise uses the first of $TMPDIR,
+ P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
+ for use with mk[s]temp. Will fail (-1) if DIR is non-null and
+ doesn't exist, none of the searched dirs exists, or there's not
+ enough space in TMPL. */
+int
+__path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
+ int try_tmpdir)
+{
+ const char *d;
+ size_t dlen, plen;
+
+ if (!pfx || !pfx[0])
+ {
+ pfx = "file";
+ plen = 4;
+ }
+ else
+ {
+ plen = strlen (pfx);
+ if (plen > 5)
+ plen = 5;
+ }
+
+ if (try_tmpdir)
+ {
+ d = __secure_getenv ("TMPDIR");
+ if (d != NULL && direxists (d))
+ dir = d;
+ else if (dir != NULL && direxists (dir))
+ /* nothing */ ;
+ else
+ dir = NULL;
+ }
+ if (dir == NULL)
+ {
+ if (direxists (P_tmpdir))
+ dir = P_tmpdir;
+ else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
+ dir = "/tmp";
+ else
+ {
+ __set_errno (ENOENT);
+ return -1;
+ }
+ }
+
+ dlen = strlen (dir);
+ while (dlen > 1 && dir[dlen - 1] == '/')
+ dlen--; /* remove trailing slashes */
+
+ /* check we have room for "${dir}/${pfx}XXXXXX\0" */
+ if (tmpl_len < dlen + 1 + plen + 6 + 1)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
+ return 0;
+}
+#endif /* _LIBC */
+
+/* These are the characters used in temporary file names. */
+static const char letters[] =
+"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
+ The name constructed does not exist at the time of the call to
+ __gen_tempname. TMPL is overwritten with the result.
+
+ KIND may be one of:
+ __GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ __GT_FILE: create the file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ __GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+int
+__gen_tempname (char *tmpl, int suffixlen, int flags, int kind)
+{
+ int len;
+ char *XXXXXX;
+ static uint64_t value;
+ uint64_t random_time_bits;
+ unsigned int count;
+ int fd = -1;
+ int save_errno = errno;
+ struct_stat64 st;
+
+ /* A lower bound on the number of temporary files to attempt to
+ generate. The maximum total number of temporary file names that
+ can exist for a given template is 62**6. It should never be
+ necessary to try all these combinations. Instead if a reasonable
+ number of names is tried (we define reasonable as 62**3) fail to
+ give the system administrator the chance to remove the problems. */
+#define ATTEMPTS_MIN (62 * 62 * 62)
+
+ /* The number of times to attempt to generate a temporary file. To
+ conform to POSIX, this must be no smaller than TMP_MAX. */
+#if ATTEMPTS_MIN < TMP_MAX
+ unsigned int attempts = TMP_MAX;
+#else
+ unsigned int attempts = ATTEMPTS_MIN;
+#endif
+
+ len = strlen (tmpl);
+ if (len < 6 + suffixlen || memcmp (&tmpl[len - 6 - suffixlen], "XXXXXX", 6))
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ /* This is where the Xs start. */
+ XXXXXX = &tmpl[len - 6 - suffixlen];
+
+ /* Get some more or less random data. */
+#ifdef RANDOM_BITS
+ RANDOM_BITS (random_time_bits);
+#else
+ {
+ struct timeval tv;
+ __gettimeofday (&tv, NULL);
+ random_time_bits = ((uint64_t) tv.tv_usec << 16) ^ tv.tv_sec;
+ }
+#endif
+ value += random_time_bits ^ __getpid ();
+
+ for (count = 0; count < attempts; value += 7777, ++count)
+ {
+ uint64_t v = value;
+
+ /* Fill in the random bits. */
+ XXXXXX[0] = letters[v % 62];
+ v /= 62;
+ XXXXXX[1] = letters[v % 62];
+ v /= 62;
+ XXXXXX[2] = letters[v % 62];
+ v /= 62;
+ XXXXXX[3] = letters[v % 62];
+ v /= 62;
+ XXXXXX[4] = letters[v % 62];
+ v /= 62;
+ XXXXXX[5] = letters[v % 62];
+
+ switch (kind)
+ {
+ case __GT_FILE:
+ fd = __open (tmpl,
+ (flags & ~O_ACCMODE)
+ | O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR);
+ break;
+
+ case __GT_DIR:
+ fd = __mkdir (tmpl, S_IRUSR | S_IWUSR | S_IXUSR);
+ break;
+
+ case __GT_NOCREATE:
+ /* This case is backward from the other three. __gen_tempname
+ succeeds if __xstat fails because the name does not exist.
+ Note the continue to bypass the common logic at the bottom
+ of the loop. */
+ if (__lxstat64 (_STAT_VER, tmpl, &st) < 0)
+ {
+ if (errno == ENOENT)
+ {
+ __set_errno (save_errno);
+ return 0;
+ }
+ else
+ /* Give up now. */
+ return -1;
+ }
+ continue;
+
+ default:
+ assert (! "invalid KIND in __gen_tempname");
+ abort ();
+ }
+
+ if (fd >= 0)
+ {
+ __set_errno (save_errno);
+ return fd;
+ }
+ else if (errno != EEXIST)
+ return -1;
+ }
+
+ /* We got out of the loop because we ran out of combinations to try. */
+ __set_errno (EEXIST);
+ return -1;
+}
diff --git a/gnu/tempname.h b/gnu/tempname.h
new file mode 100755
index 00000000..349bc362
--- /dev/null
+++ b/gnu/tempname.h
@@ -0,0 +1,50 @@
+/* Create a temporary file or directory.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* header written by Eric Blake */
+
+#ifndef GL_TEMPNAME_H
+# define GL_TEMPNAME_H
+
+# include <stdio.h>
+
+# ifdef __GT_FILE
+# define GT_FILE __GT_FILE
+# define GT_DIR __GT_DIR
+# define GT_NOCREATE __GT_NOCREATE
+# else
+# define GT_FILE 0
+# define GT_DIR 1
+# define GT_NOCREATE 2
+# endif
+
+/* Generate a temporary file name based on TMPL. TMPL must match the
+ rules for mk[s]temp (i.e. end in "XXXXXX", possibly with a suffix).
+ The name constructed does not exist at the time of the call to
+ gen_tempname. TMPL is overwritten with the result.
+
+ KIND may be one of:
+ GT_NOCREATE: simply verify that the name does not exist
+ at the time of the call.
+ GT_FILE: create a large file using open(O_CREAT|O_EXCL)
+ and return a read-write fd. The file is mode 0600.
+ GT_DIR: create a directory, which will be mode 0700.
+
+ We use a clever algorithm to get hard-to-predict names. */
+extern int gen_tempname (char *tmpl, int suffixlen, int flags, int kind);
+
+#endif /* GL_TEMPNAME_H */
diff --git a/gnu/time.in.h b/gnu/time.in.h
new file mode 100755
index 00000000..d0c9830e
--- /dev/null
+++ b/gnu/time.in.h
@@ -0,0 +1,134 @@
+/* A more-standard <time.h>.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* Don't get in the way of glibc when it includes time.h merely to
+ declare a few standard symbols, rather than to declare all the
+ symbols. Also, Solaris 8 <time.h> eventually includes itself
+ recursively; if that is happening, just include the system <time.h>
+ without adding our own declarations. */
+#if (defined __need_time_t || defined __need_clock_t \
+ || defined __need_timespec \
+ || defined _GL_TIME_H)
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+#else
+
+# define _GL_TIME_H
+
+# @INCLUDE_NEXT@ @NEXT_TIME_H@
+
+/* NetBSD 5.0 mis-defines NULL. */
+#include <stddef.h>
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/* Some systems don't define struct timespec (e.g., AIX 4.1, Ultrix 4.3).
+ Or they define it with the wrong member names or define it in <sys/time.h>
+ (e.g., FreeBSD circa 1997). */
+# if ! @TIME_H_DEFINES_STRUCT_TIMESPEC@
+# if @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+# include <sys/time.h>
+# else
+# undef timespec
+# define timespec rpl_timespec
+struct timespec
+{
+ time_t tv_sec;
+ long int tv_nsec;
+};
+# endif
+# endif
+
+/* Sleep for at least RQTP seconds unless interrupted, If interrupted,
+ return -1 and store the remaining time into RMTP. See
+ <http://www.opengroup.org/susv3xsh/nanosleep.html>. */
+# if @REPLACE_NANOSLEEP@
+# define nanosleep rpl_nanosleep
+extern int nanosleep (struct timespec const *__rqtp, struct timespec *__rmtp)
+ _GL_ARG_NONNULL ((1));
+# endif
+
+/* Return the 'time_t' representation of TP and normalize TP. */
+# if @REPLACE_MKTIME@
+# define mktime rpl_mktime
+extern time_t mktime (struct tm *__tp) _GL_ARG_NONNULL ((1));
+# endif
+
+/* Convert TIMER to RESULT, assuming local time and UTC respectively. See
+ <http://www.opengroup.org/susv3xsh/localtime_r.html> and
+ <http://www.opengroup.org/susv3xsh/gmtime_r.html>. */
+# if @REPLACE_LOCALTIME_R@
+# undef localtime_r
+# define localtime_r rpl_localtime_r
+# undef gmtime_r
+# define gmtime_r rpl_gmtime_r
+extern struct tm *localtime_r (time_t const *restrict __timer,
+ struct tm *restrict __result)
+ _GL_ARG_NONNULL ((1, 2));
+extern struct tm *gmtime_r (time_t const *restrict __timer,
+ struct tm *restrict __result)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+
+/* Parse BUF as a time stamp, assuming FORMAT specifies its layout, and store
+ the resulting broken-down time into TM. See
+ <http://www.opengroup.org/susv3xsh/strptime.html>. */
+# if @REPLACE_STRPTIME@
+# undef strptime
+# define strptime rpl_strptime
+extern char *strptime (char const *restrict __buf,
+ char const *restrict __format,
+ struct tm *restrict __tm)
+ _GL_ARG_NONNULL ((1, 2, 3));
+# endif
+
+/* Convert TM to a time_t value, assuming UTC. */
+# if @REPLACE_TIMEGM@
+# undef timegm
+# define timegm rpl_timegm
+extern time_t timegm (struct tm *__tm) _GL_ARG_NONNULL ((1));
+# endif
+
+/* Encourage applications to avoid unsafe functions that can overrun
+ buffers when given outlandish struct tm values. Portable
+ applications should use strftime (or even sprintf) instead. */
+# if GNULIB_PORTCHECK
+# undef asctime
+# define asctime eschew_asctime
+# undef asctime_r
+# define asctime_r eschew_asctime_r
+# undef ctime
+# define ctime eschew_ctime
+# undef ctime_r
+# define ctime_r eschew_ctime_r
+# endif
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/gnu/tmpdir.c b/gnu/tmpdir.c
new file mode 100755
index 00000000..0170d213
--- /dev/null
+++ b/gnu/tmpdir.c
@@ -0,0 +1,133 @@
+/* Copyright (C) 1999, 2001-2002, 2006, 2009-2010 Free Software Foundation,
+ Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Extracted from sysdeps/posix/tempname.c. */
+
+#include <config.h>
+
+/* Specification. */
+#include "tmpdir.h"
+
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+#include <stdio.h>
+#ifndef P_tmpdir
+# define P_tmpdir "/tmp"
+#endif
+
+#include <sys/stat.h>
+
+#if _LIBC
+# define struct_stat64 struct stat64
+#else
+# define struct_stat64 struct stat
+# define __xstat64(version, path, buf) stat (path, buf)
+#endif
+
+#if ! (HAVE___SECURE_GETENV || _LIBC)
+# define __secure_getenv getenv
+#endif
+
+/* Pathname support.
+ ISSLASH(C) tests whether C is a directory separator character.
+ */
+#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__
+ /* Win32, Cygwin, OS/2, DOS */
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+ /* Unix */
+# define ISSLASH(C) ((C) == '/')
+#endif
+
+
+/* Return nonzero if DIR is an existent directory. */
+static bool
+direxists (const char *dir)
+{
+ struct_stat64 buf;
+ return __xstat64 (_STAT_VER, dir, &buf) == 0 && S_ISDIR (buf.st_mode);
+}
+
+/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
+ non-null and exists, uses it; otherwise uses the first of $TMPDIR,
+ P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
+ for use with mk[s]temp. Will fail (-1) if DIR is non-null and
+ doesn't exist, none of the searched dirs exists, or there's not
+ enough space in TMPL. */
+int
+path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx,
+ bool try_tmpdir)
+{
+ const char *d;
+ size_t dlen, plen;
+
+ if (!pfx || !pfx[0])
+ {
+ pfx = "file";
+ plen = 4;
+ }
+ else
+ {
+ plen = strlen (pfx);
+ if (plen > 5)
+ plen = 5;
+ }
+
+ if (try_tmpdir)
+ {
+ d = __secure_getenv ("TMPDIR");
+ if (d != NULL && direxists (d))
+ dir = d;
+ else if (dir != NULL && direxists (dir))
+ /* nothing */ ;
+ else
+ dir = NULL;
+ }
+ if (dir == NULL)
+ {
+ if (direxists (P_tmpdir))
+ dir = P_tmpdir;
+ else if (strcmp (P_tmpdir, "/tmp") != 0 && direxists ("/tmp"))
+ dir = "/tmp";
+ else
+ {
+ __set_errno (ENOENT);
+ return -1;
+ }
+ }
+
+ dlen = strlen (dir);
+ while (dlen >= 1 && ISSLASH (dir[dlen - 1]))
+ dlen--; /* remove trailing slashes */
+
+ /* check we have room for "${dir}/${pfx}XXXXXX\0" */
+ if (tmpl_len < dlen + 1 + plen + 6 + 1)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ sprintf (tmpl, "%.*s/%.*sXXXXXX", (int) dlen, dir, (int) plen, pfx);
+ return 0;
+}
diff --git a/gnu/tmpdir.h b/gnu/tmpdir.h
new file mode 100755
index 00000000..0cafb5b3
--- /dev/null
+++ b/gnu/tmpdir.h
@@ -0,0 +1,26 @@
+/* Determine a temporary directory.
+ Copyright (C) 2001-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stdbool.h>
+#include <stddef.h>
+
+/* Path search algorithm, for tmpnam, tmpfile, etc. If DIR is
+ non-null and exists, uses it; otherwise uses the first of $TMPDIR,
+ P_tmpdir, /tmp that exists. Copies into TMPL a template suitable
+ for use with mk[s]temp. Will fail (-1) if DIR is non-null and
+ doesn't exist, none of the searched dirs exists, or there's not
+ enough space in TMPL. */
+extern int path_search (char *tmpl, size_t tmpl_len, const char *dir, const char *pfx, bool try_tmpdir);
diff --git a/gnu/trim.c b/gnu/trim.c
new file mode 100755
index 00000000..62f8ebff
--- /dev/null
+++ b/gnu/trim.c
@@ -0,0 +1,133 @@
+/* Removes leading and/or trailing whitespaces
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Davide Angelocola <davide.angelocola@gmail.com> */
+
+#include <config.h>
+
+/* Specification. */
+#include "trim.h"
+
+#include <ctype.h>
+#include <string.h>
+#include <stddef.h>
+#include <stdlib.h>
+
+#include "mbchar.h"
+#include "mbiter.h"
+#include "xalloc.h"
+
+/* Use this to suppress gcc's `...may be used before initialized' warnings. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
+char *
+trim2(const char *s, int how)
+{
+ char *d;
+
+ d = strdup(s);
+
+ if (!d)
+ xalloc_die();
+
+ if (MB_CUR_MAX > 1)
+ {
+ mbi_iterator_t i;
+
+ /* Trim leading whitespaces. */
+ if (how != TRIM_TRAILING)
+ {
+ mbi_init (i, d, strlen (d));
+
+ for (; mbi_avail (i) && mb_isspace (mbi_cur (i)); mbi_advance (i))
+ ;
+
+ memmove (d, mbi_cur_ptr (i), strlen (mbi_cur_ptr (i)) + 1);
+ }
+
+ /* Trim trailing whitespaces. */
+ if (how != TRIM_LEADING)
+ {
+ int state = 0;
+ char *r IF_LINT (= NULL); /* used only while state = 2 */
+
+ mbi_init (i, d, strlen (d));
+
+ for (; mbi_avail (i); mbi_advance (i))
+ {
+ if (state == 0 && mb_isspace (mbi_cur (i)))
+ {
+ state = 0;
+ continue;
+ }
+
+ if (state == 0 && !mb_isspace (mbi_cur (i)))
+ {
+ state = 1;
+ continue;
+ }
+
+ if (state == 1 && !mb_isspace (mbi_cur (i)))
+ {
+ state = 1;
+ continue;
+ }
+
+ if (state == 1 && mb_isspace (mbi_cur (i)))
+ {
+ state = 2;
+ r = (char *) mbi_cur_ptr (i);
+ }
+ else if (state == 2 && mb_isspace (mbi_cur (i)))
+ {
+ state = 2;
+ }
+ else
+ {
+ state = 1;
+ }
+ }
+
+ if (state == 2)
+ *r = '\0';
+ }
+ }
+ else
+ {
+ char *p;
+
+ /* Trim leading whitespaces. */
+ if (how != TRIM_TRAILING) {
+ for (p = d; *p && isspace ((unsigned char) *p); p++)
+ ;
+
+ memmove (d, p, strlen (p) + 1);
+ }
+
+ /* Trim trailing whitespaces. */
+ if (how != TRIM_LEADING) {
+ for (p = d + strlen (d) - 1; p >= d && isspace ((unsigned char) *p); p--)
+ *p = '\0';
+ }
+ }
+
+ return d;
+}
+
diff --git a/gnu/trim.h b/gnu/trim.h
new file mode 100755
index 00000000..c70a16fb
--- /dev/null
+++ b/gnu/trim.h
@@ -0,0 +1,33 @@
+/* Removes leading and/or trailing whitespaces
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Davide Angelocola <davide.angelocola@gmail.com> */
+
+/* Trim mode. */
+#define TRIM_TRAILING 0
+#define TRIM_LEADING 1
+#define TRIM_BOTH 2
+
+/* Removes trailing and leading whitespaces. */
+#define trim(s) trim2(s, TRIM_BOTH)
+
+/* Removes trailing whitespaces. */
+#define trim_trailing(s) trim2(s, TRIM_TRAILING)
+
+/* Removes leading whitespaces. */
+#define trim_leading(s) trim2(s, TRIM_LEADING)
+
+char *trim2(const char *, int);
diff --git a/gnu/unistd--.h b/gnu/unistd--.h
new file mode 100755
index 00000000..5283d2c5
--- /dev/null
+++ b/gnu/unistd--.h
@@ -0,0 +1,32 @@
+/* Like unistd.h, but redefine some names to avoid glitches.
+
+ Copyright (C) 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert. */
+
+#include <unistd.h>
+#include "unistd-safer.h"
+
+#undef dup
+#define dup dup_safer
+
+#undef pipe
+#define pipe pipe_safer
+
+#if GNULIB_PIPE2_SAFER
+# undef pipe2
+# define pipe2 pipe2_safer
+#endif
diff --git a/gnu/unistd-safer.h b/gnu/unistd-safer.h
new file mode 100755
index 00000000..190f1086
--- /dev/null
+++ b/gnu/unistd-safer.h
@@ -0,0 +1,31 @@
+/* Invoke unistd-like functions, but avoid some glitches.
+
+ Copyright (C) 2001, 2003, 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert and Eric Blake. */
+
+int dup_safer (int);
+int fd_safer (int);
+int pipe_safer (int[2]);
+
+#if GNULIB_FD_SAFER_FLAG
+int dup_safer_flag (int, int);
+int fd_safer_flag (int, int);
+#endif
+
+#if GNULIB_PIPE2_SAFER
+int pipe2_safer (int[2], int);
+#endif
diff --git a/gnu/unistd.in.h b/gnu/unistd.in.h
new file mode 100755
index 00000000..27c8b171
--- /dev/null
+++ b/gnu/unistd.in.h
@@ -0,0 +1,921 @@
+/* Substitute for and wrapper around <unistd.h>.
+ Copyright (C) 2003-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _GL_UNISTD_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_UNISTD_H@
+# @INCLUDE_NEXT@ @NEXT_UNISTD_H@
+#endif
+
+#ifndef _GL_UNISTD_H
+#define _GL_UNISTD_H
+
+/* NetBSD 5.0 mis-defines NULL. Also get size_t. */
+#include <stddef.h>
+
+/* mingw doesn't define the SEEK_* or *_FILENO macros in <unistd.h>. */
+/* Cygwin 1.7.1 declares symlinkat in <stdio.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (!(defined SEEK_CUR && defined SEEK_END && defined SEEK_SET) \
+ || (@GNULIB_SYMLINKAT@ || defined GNULIB_POSIXCHECK)) \
+ && ! defined __GLIBC__
+# include <stdio.h>
+#endif
+
+/* Cygwin 1.7.1 declares unlinkat in <fcntl.h>, not in <unistd.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#if (@GNULIB_UNLINKAT@ || defined GNULIB_POSIXCHECK) && ! defined __GLIBC__
+# include <fcntl.h>
+#endif
+
+/* mingw fails to declare _exit in <unistd.h>. */
+/* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
+/* Solaris declares getcwd not only in <unistd.h> but also in <stdlib.h>. */
+/* But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stdlib.h>
+#endif
+
+/* mingw declares getcwd in <io.h>, not in <unistd.h>. */
+#if ((@GNULIB_GETCWD@ || defined GNULIB_POSIXCHECK) \
+ && ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# include <io.h>
+#endif
+
+#if (@GNULIB_WRITE@ || @GNULIB_READLINK@ || @GNULIB_READLINKAT@ \
+ || @GNULIB_PREAD@ || defined GNULIB_POSIXCHECK)
+/* Get ssize_t. */
+# include <sys/types.h>
+#endif
+
+/* Get getopt(), optarg, optind, opterr, optopt.
+ But avoid namespace pollution on glibc systems. */
+#if @GNULIB_UNISTD_H_GETOPT@ && !defined __GLIBC__ && !defined _GL_SYSTEM_GETOPT
+# include <getopt.h>
+#endif
+
+#if @GNULIB_GETHOSTNAME@
+/* Get all possible declarations of gethostname(). */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# include <winsock2.h>
+# if !defined _GL_SYS_SOCKET_H
+# undef socket
+# define socket socket_used_without_including_sys_socket_h
+# undef connect
+# define connect connect_used_without_including_sys_socket_h
+# undef accept
+# define accept accept_used_without_including_sys_socket_h
+# undef bind
+# define bind bind_used_without_including_sys_socket_h
+# undef getpeername
+# define getpeername getpeername_used_without_including_sys_socket_h
+# undef getsockname
+# define getsockname getsockname_used_without_including_sys_socket_h
+# undef getsockopt
+# define getsockopt getsockopt_used_without_including_sys_socket_h
+# undef listen
+# define listen listen_used_without_including_sys_socket_h
+# undef recv
+# define recv recv_used_without_including_sys_socket_h
+# undef send
+# define send send_used_without_including_sys_socket_h
+# undef recvfrom
+# define recvfrom recvfrom_used_without_including_sys_socket_h
+# undef sendto
+# define sendto sendto_used_without_including_sys_socket_h
+# undef setsockopt
+# define setsockopt setsockopt_used_without_including_sys_socket_h
+# undef shutdown
+# define shutdown shutdown_used_without_including_sys_socket_h
+# endif
+# if !defined _GL_SYS_SELECT_H
+# undef select
+# define select select_used_without_including_sys_select_h
+# endif
+# endif
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+
+/* OS/2 EMX lacks these macros. */
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+/* Ensure *_OK macros exist. */
+#ifndef F_OK
+# define F_OK 0
+# define X_OK 1
+# define W_OK 2
+# define R_OK 4
+#endif
+
+
+/* Declare overridden functions. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if @GNULIB_CHOWN@
+# if @REPLACE_CHOWN@
+# undef chown
+# define chown rpl_chown
+# endif
+# if !@HAVE_CHOWN@ || @REPLACE_CHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/chown.html>. */
+extern int chown (const char *file, uid_t uid, gid_t gid)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef chown
+# if HAVE_RAW_DECL_CHOWN
+_GL_WARN_ON_USE (chown, "chown fails to follow symlinks on some systems and "
+ "doesn't treat a uid or gid of -1 on some systems - "
+ "use gnulib module chown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_CLOSE@
+# if @REPLACE_CLOSE@
+/* Automatically included by modules that need a replacement for close. */
+# undef close
+# define close rpl_close
+extern int close (int);
+# endif
+#elif @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+# undef close
+# define close close_used_without_requesting_gnulib_module_close
+#elif defined GNULIB_POSIXCHECK
+# undef close
+/* Assume close is always declared. */
+_GL_WARN_ON_USE (close, "close does not portably work on sockets - "
+ "use gnulib module close for portability");
+#endif
+
+
+#if @REPLACE_DUP@
+# define dup rpl_dup
+extern int dup (int);
+#endif
+
+
+#if @GNULIB_DUP2@
+# if @REPLACE_DUP2@
+# define dup2 rpl_dup2
+# endif
+# if !@HAVE_DUP2@ || @REPLACE_DUP2@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD. Do nothing if
+ NEWFD = OLDFD, otherwise close NEWFD first if it is open.
+ Return newfd if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/dup2.html>. */
+extern int dup2 (int oldfd, int newfd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef dup2
+# if HAVE_RAW_DECL_DUP2
+_GL_WARN_ON_USE (dup2, "dup2 is unportable - "
+ "use gnulib module dup2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_DUP3@
+/* Copy the file descriptor OLDFD into file descriptor NEWFD, with the
+ specified flags.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ Close NEWFD first if it is open.
+ Return newfd if successful, otherwise -1 and errno set.
+ See the Linux man page at
+ <http://www.kernel.org/doc/man-pages/online/pages/man2/dup3.2.html>. */
+# if @HAVE_DUP3@
+# define dup3 rpl_dup3
+# endif
+extern int dup3 (int oldfd, int newfd, int flags);
+#elif defined GNULIB_POSIXCHECK
+# undef dup3
+# if HAVE_RAW_DECL_DUP3
+_GL_WARN_ON_USE (dup3, "dup3 is unportable - "
+ "use gnulib module dup3 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_ENVIRON@
+# if !@HAVE_DECL_ENVIRON@
+/* Set of environment variables and values. An array of strings of the form
+ "VARIABLE=VALUE", terminated with a NULL. */
+# if defined __APPLE__ && defined __MACH__
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron ())
+# else
+extern char **environ;
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# if HAVE_RAW_DECL_ENVIRON
+static inline char ***
+rpl_environ (void)
+{
+ return &environ;
+}
+_GL_WARN_ON_USE (rpl_environ, "environ is unportable - "
+ "use gnulib module environ for portability");
+# undef environ
+# define environ (*rpl_environ ())
+# endif
+#endif
+
+
+#if @GNULIB_EUIDACCESS@
+# if !@HAVE_EUIDACCESS@
+/* Like access(), except that it uses the effective user id and group id of
+ the current process. */
+extern int euidaccess (const char *filename, int mode) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef euidaccess
+# if HAVE_RAW_DECL_EUIDACCESS
+_GL_WARN_ON_USE (euidaccess, "euidaccess is unportable - "
+ "use gnulib module euidaccess for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FACCESSAT@
+# if !@HAVE_FACCESSAT@
+extern int faccessat (int fd, char const *file, int mode, int flag)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef faccessat
+# if HAVE_RAW_DECL_FACCESSAT
+_GL_WARN_ON_USE (faccessat, "faccessat is not portable - "
+ "use gnulib module faccessat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHDIR@
+# if @REPLACE_FCHDIR@
+/* Change the process' current working directory to the directory on which
+ the given file descriptor is open.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fchdir.html>. */
+extern int fchdir (int /*fd*/);
+
+/* Gnulib internal hooks needed to maintain the fchdir metadata. */
+extern int _gl_register_fd (int fd, const char *filename)
+ _GL_ARG_NONNULL ((2));
+extern void _gl_unregister_fd (int fd);
+extern int _gl_register_dup (int oldfd, int newfd);
+extern const char *_gl_directory_name (int fd);
+
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchdir
+# if HAVE_RAW_DECL_FCHDIR
+_GL_WARN_ON_USE (fchdir, "fchdir is unportable - "
+ "use gnulib module fchdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FCHOWNAT@
+# if @REPLACE_FCHOWNAT@
+# undef fchownat
+# define fchownat rpl_fchownat
+# endif
+# if !@HAVE_FCHOWNAT@ || @REPLACE_FCHOWNAT@
+extern int fchownat (int fd, char const *file, uid_t owner, gid_t group, int flag)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fchownat
+# if HAVE_RAW_DECL_FCHOWNAT
+_GL_WARN_ON_USE (fchownat, "fchownat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FSYNC@
+/* Synchronize changes to a file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/fsync.html>. */
+# if !@HAVE_FSYNC@
+extern int fsync (int fd);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef fsync
+# if HAVE_RAW_DECL_FSYNC
+_GL_WARN_ON_USE (fsync, "fsync is unportable - "
+ "use gnulib module fsync for portability");
+# endif
+#endif
+
+
+#if @GNULIB_FTRUNCATE@
+# if !@HAVE_FTRUNCATE@
+/* Change the size of the file to which FD is opened to become equal to LENGTH.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/ftruncate.html>. */
+extern int ftruncate (int fd, off_t length);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef ftruncate
+# if HAVE_RAW_DECL_FTRUNCATE
+_GL_WARN_ON_USE (ftruncate, "ftruncate is unportable - "
+ "use gnulib module ftruncate for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETCWD@
+# if @REPLACE_GETCWD@
+/* Get the name of the current working directory, and put it in SIZE bytes
+ of BUF.
+ Return BUF if successful, or NULL if the directory couldn't be determined
+ or SIZE was too small.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/getcwd.html>.
+ Additionally, the gnulib module 'getcwd' guarantees the following GNU
+ extension: If BUF is NULL, an array is allocated with 'malloc'; the array
+ is SIZE bytes long, unless SIZE == 0, in which case it is as big as
+ necessary. */
+# define getcwd rpl_getcwd
+extern char * getcwd (char *buf, size_t size);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getcwd
+# if HAVE_RAW_DECL_GETCWD
+_GL_WARN_ON_USE (getcwd, "getcwd is unportable - "
+ "use gnulib module getcwd for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDOMAINNAME@
+/* Return the NIS domain name of the machine.
+ WARNING! The NIS domain name is unrelated to the fully qualified host name
+ of the machine. It is also unrelated to email addresses.
+ WARNING! The NIS domain name is usually the empty string or "(none)" when
+ not using NIS.
+
+ Put up to LEN bytes of the NIS domain name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the NIS domain name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if !@HAVE_GETDOMAINNAME@
+extern int getdomainname(char *name, size_t len) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdomainname
+# if HAVE_RAW_DECL_GETDOMAINNAME
+_GL_WARN_ON_USE (getdomainname, "getdomainname is unportable - "
+ "use gnulib module getdomainname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETDTABLESIZE@
+# if !@HAVE_GETDTABLESIZE@
+/* Return the maximum number of file descriptors in the current process.
+ In POSIX, this is same as sysconf (_SC_OPEN_MAX). */
+extern int getdtablesize (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getdtablesize
+# if HAVE_RAW_DECL_GETDTABLESIZE
+_GL_WARN_ON_USE (getdtablesize, "getdtablesize is unportable - "
+ "use gnulib module getdtablesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETGROUPS@
+# if @REPLACE_GETGROUPS@
+# undef getgroups
+# define getgroups rpl_getgroups
+# endif
+# if !@HAVE_GETGROUPS@ || @REPLACE_GETGROUPS@
+/* Return the supplemental groups that the current process belongs to.
+ It is unspecified whether the effective group id is in the list.
+ If N is 0, return the group count; otherwise, N describes how many
+ entries are available in GROUPS. Return -1 and set errno if N is
+ not 0 and not large enough. Fails with ENOSYS on some systems. */
+int getgroups (int n, gid_t *groups);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getgroups
+# if HAVE_RAW_DECL_GETGROUPS
+_GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
+ "use gnulib module getgroups for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETHOSTNAME@
+/* Return the standard host name of the machine.
+ WARNING! The host name may or may not be fully qualified.
+
+ Put up to LEN bytes of the host name into NAME.
+ Null terminate it if the name is shorter than LEN.
+ If the host name is longer than LEN, set errno = EINVAL and return -1.
+ Return 0 if successful, otherwise set errno and return -1. */
+# if @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname rpl_gethostname
+# endif
+# if @UNISTD_H_HAVE_WINSOCK2_H@ || !@HAVE_GETHOSTNAME@
+extern int gethostname(char *name, size_t len) _GL_ARG_NONNULL ((1));
+# endif
+#elif @UNISTD_H_HAVE_WINSOCK2_H@
+# undef gethostname
+# define gethostname gethostname_used_without_requesting_gnulib_module_gethostname
+#elif defined GNULIB_POSIXCHECK
+# undef gethostname
+# if HAVE_RAW_DECL_GETHOSTNAME
+_GL_WARN_ON_USE (gethostname, "gethostname is unportable - "
+ "use gnulib module gethostname for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN@
+/* Returns the user's login name, or NULL if it cannot be found. Upon error,
+ returns NULL with errno set.
+
+ See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+ Most programs don't need to use this function, because the information is
+ available through environment variables:
+ ${LOGNAME-$USER} on Unix platforms,
+ $USERNAME on native Windows platforms.
+ */
+# if !@HAVE_GETLOGIN@
+extern char *getlogin (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin
+# if HAVE_RAW_DECL_GETLOGIN
+_GL_WARN_ON_USE (getlogin, "getlogin is unportable - "
+ "use gnulib module getlogin for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETLOGIN_R@
+/* Copies the user's login name to NAME.
+ The array pointed to by NAME has room for SIZE bytes.
+
+ Returns 0 if successful. Upon error, an error number is returned, or -1 in
+ the case that the login name cannot be found but no specific error is
+ provided (this case is hopefully rare but is left open by the POSIX spec).
+
+ See <http://www.opengroup.org/susv3xsh/getlogin.html>.
+
+ Most programs don't need to use this function, because the information is
+ available through environment variables:
+ ${LOGNAME-$USER} on Unix platforms,
+ $USERNAME on native Windows platforms.
+ */
+# if !@HAVE_DECL_GETLOGIN_R@
+extern int getlogin_r (char *name, size_t size) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getlogin_r
+# if HAVE_RAW_DECL_GETLOGIN_R
+_GL_WARN_ON_USE (getlogin_r, "getlogin_r is unportable - "
+ "use gnulib module getlogin_r for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETPAGESIZE@
+# if @REPLACE_GETPAGESIZE@
+# define getpagesize rpl_getpagesize
+extern int getpagesize (void);
+# elif !@HAVE_GETPAGESIZE@
+/* This is for POSIX systems. */
+# if !defined getpagesize && defined _SC_PAGESIZE
+# if ! (defined __VMS && __VMS_VER < 70000000)
+# define getpagesize() sysconf (_SC_PAGESIZE)
+# endif
+# endif
+/* This is for older VMS. */
+# if !defined getpagesize && defined __VMS
+# ifdef __ALPHA
+# define getpagesize() 8192
+# else
+# define getpagesize() 512
+# endif
+# endif
+/* This is for BeOS. */
+# if !defined getpagesize && @HAVE_OS_H@
+# include <OS.h>
+# if defined B_PAGE_SIZE
+# define getpagesize() B_PAGE_SIZE
+# endif
+# endif
+/* This is for AmigaOS4.0. */
+# if !defined getpagesize && defined __amigaos4__
+# define getpagesize() 2048
+# endif
+/* This is for older Unix systems. */
+# if !defined getpagesize && @HAVE_SYS_PARAM_H@
+# include <sys/param.h>
+# ifdef EXEC_PAGESIZE
+# define getpagesize() EXEC_PAGESIZE
+# else
+# ifdef NBPG
+# ifndef CLSIZE
+# define CLSIZE 1
+# endif
+# define getpagesize() (NBPG * CLSIZE)
+# else
+# ifdef NBPC
+# define getpagesize() NBPC
+# endif
+# endif
+# endif
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getpagesize
+# if HAVE_RAW_DECL_GETPAGESIZE
+_GL_WARN_ON_USE (getpagesize, "getpagesize is unportable - "
+ "use gnulib module getpagesize for portability");
+# endif
+#endif
+
+
+#if @GNULIB_GETUSERSHELL@
+# if !@HAVE_GETUSERSHELL@
+/* Return the next valid login shell on the system, or NULL when the end of
+ the list has been reached. */
+extern char *getusershell (void);
+/* Rewind to pointer that is advanced at each getusershell() call. */
+extern void setusershell (void);
+/* Free the pointer that is advanced at each getusershell() call and
+ associated resources. */
+extern void endusershell (void);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef getusershell
+# if HAVE_RAW_DECL_GETUSERSHELL
+_GL_WARN_ON_USE (getusershell, "getusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+# undef setusershell
+# if HAVE_RAW_DECL_SETUSERSHELL
+_GL_WARN_ON_USE (setusershell, "setusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+# undef endusershell
+# if HAVE_RAW_DECL_ENDUSERSHELL
+_GL_WARN_ON_USE (endusershell, "endusershell is unportable - "
+ "use gnulib module getusershell for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LCHOWN@
+# if @REPLACE_LCHOWN@
+# undef lchown
+# define lchown rpl_lchown
+# endif
+# if !@HAVE_LCHOWN@ || @REPLACE_LCHOWN@
+/* Change the owner of FILE to UID (if UID is not -1) and the group of FILE
+ to GID (if GID is not -1). Do not follow symbolic links.
+ Return 0 if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lchown.html>. */
+extern int lchown (char const *file, uid_t owner, gid_t group)
+ _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lchown
+# if HAVE_RAW_DECL_LCHOWN
+_GL_WARN_ON_USE (lchown, "lchown is unportable to pre-POSIX.1-2001 systems - "
+ "use gnulib module lchown for portability");
+# endif
+#endif
+
+
+#if @GNULIB_LINK@
+# if @REPLACE_LINK@
+# define link rpl_link
+# endif
+/* Create a new hard link for an existing file.
+ Return 0 if successful, otherwise -1 and errno set.
+ See POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/link.html>. */
+# if !@HAVE_LINK@ || @REPLACE_LINK@
+extern int link (const char *path1, const char *path2)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef link
+# if HAVE_RAW_DECL_LINK
+_GL_WARN_ON_USE (link, "link is unportable - "
+ "use gnulib module link for portability");
+# endif
+#endif
+
+#if @GNULIB_LINKAT@
+# if @REPLACE_LINKAT@
+# undef linkat
+# define linkat rpl_linkat
+# endif
+/* Create a new hard link for an existing file, relative to two
+ directories. FLAG controls whether symlinks are followed.
+ Return 0 if successful, otherwise -1 and errno set. */
+# if !@HAVE_LINKAT@ || @REPLACE_LINKAT@
+extern int linkat (int fd1, const char *path1, int fd2, const char *path2,
+ int flag)
+ _GL_ARG_NONNULL ((2, 4));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef linkat
+# if HAVE_RAW_DECL_LINKAT
+_GL_WARN_ON_USE (linkat, "linkat is unportable - "
+ "use gnulib module linkat for portability");
+# endif
+#endif
+
+#if @GNULIB_LSEEK@
+# if @REPLACE_LSEEK@
+/* Set the offset of FD relative to SEEK_SET, SEEK_CUR, or SEEK_END.
+ Return the new offset if successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/lseek.html>. */
+# define lseek rpl_lseek
+ extern off_t lseek (int fd, off_t offset, int whence);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef lseek
+# if HAVE_RAW_DECL_LSEEK
+_GL_WARN_ON_USE (lseek, "lseek does not fail with ESPIPE on pipes on some "
+ "systems - use gnulib module lseek for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PIPE2@
+/* Create a pipe, applying the given flags when opening the read-end of the
+ pipe and the write-end of the pipe.
+ The flags are a bitmask, possibly including O_CLOEXEC (defined in <fcntl.h>)
+ and O_TEXT, O_BINARY (defined in "binary-io.h").
+ Store the read-end as fd[0] and the write-end as fd[1].
+ Return 0 upon success, or -1 with errno set upon failure.
+ See also the Linux man page at
+ <http://www.kernel.org/doc/man-pages/online/pages/man2/pipe2.2.html>. */
+# if @HAVE_PIPE2@
+# define pipe2 rpl_pipe2
+# endif
+extern int pipe2 (int fd[2], int flags) _GL_ARG_NONNULL ((1));
+#elif defined GNULIB_POSIXCHECK
+# undef pipe2
+# if HAVE_RAW_DECL_PIPE2
+_GL_WARN_ON_USE (pipe2, "pipe2 is unportable - "
+ "use gnulib module pipe2 for portability");
+# endif
+#endif
+
+
+#if @GNULIB_PREAD@
+# if @REPLACE_PREAD@
+# define pread rpl_pread
+# endif
+/* Read at most BUFSIZE bytes from FD into BUF, starting at OFFSET.
+ Return the number of bytes placed into BUF if successful, otherwise
+ set errno and return -1. 0 indicates EOF. See the POSIX:2001
+ specification <http://www.opengroup.org/susv3xsh/pread.html>. */
+# if !@HAVE_PREAD@ || @REPLACE_PREAD@
+ extern ssize_t pread (int fd, void *buf, size_t bufsize, off_t offset)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef pread
+# if HAVE_RAW_DECL_PREAD
+_GL_WARN_ON_USE (pread, "pread is unportable - "
+ "use gnulib module pread for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINK@
+# if @REPLACE_READLINK@
+# define readlink rpl_readlink
+# endif
+/* Read the contents of the symbolic link FILE and place the first BUFSIZE
+ bytes of it into BUF. Return the number of bytes placed into BUF if
+ successful, otherwise -1 and errno set.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/readlink.html>. */
+# if !@HAVE_READLINK@ || @REPLACE_READLINK@
+extern ssize_t readlink (const char *file, char *buf, size_t bufsize)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlink
+# if HAVE_RAW_DECL_READLINK
+_GL_WARN_ON_USE (readlink, "readlink is unportable - "
+ "use gnulib module readlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_READLINKAT@
+# if !@HAVE_READLINKAT@
+extern ssize_t readlinkat (int fd, char const *file, char *buf, size_t len)
+ _GL_ARG_NONNULL ((2, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef readlinkat
+# if HAVE_RAW_DECL_READLINKAT
+_GL_WARN_ON_USE (readlinkat, "readlinkat is not portable - "
+ "use gnulib module symlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_RMDIR@
+# if @REPLACE_RMDIR@
+# define rmdir rpl_rmdir
+/* Remove the directory DIR. */
+extern int rmdir (char const *name) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef rmdir
+# if HAVE_RAW_DECL_RMDIR
+_GL_WARN_ON_USE (rmdir, "rmdir is unportable - "
+ "use gnulib module rmdir for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SLEEP@
+# if @REPLACE_SLEEP@
+# undef sleep
+# define sleep rpl_sleep
+# endif
+/* Pause the execution of the current thread for N seconds.
+ Returns the number of seconds left to sleep.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+# if !@HAVE_SLEEP@ || @REPLACE_SLEEP@
+extern unsigned int sleep (unsigned int n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef sleep
+# if HAVE_RAW_DECL_SLEEP
+_GL_WARN_ON_USE (sleep, "sleep is unportable - "
+ "use gnulib module sleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINK@
+# if @REPLACE_SYMLINK@
+# undef symlink
+# define symlink rpl_symlink
+# endif
+# if !@HAVE_SYMLINK@ || @REPLACE_SYMLINK@
+extern int symlink (char const *contents, char const *file)
+ _GL_ARG_NONNULL ((1, 2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef symlink
+# if HAVE_RAW_DECL_SYMLINK
+_GL_WARN_ON_USE (symlink, "symlink is not portable - "
+ "use gnulib module symlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_SYMLINKAT@
+# if !@HAVE_SYMLINKAT@
+extern int symlinkat (char const *contents, int fd, char const *file)
+ _GL_ARG_NONNULL ((1, 3));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef symlinkat
+# if HAVE_RAW_DECL_SYMLINKAT
+_GL_WARN_ON_USE (symlinkat, "symlinkat is not portable - "
+ "use gnulib module symlinkat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINK@
+# if @REPLACE_UNLINK@
+# undef unlink
+# define unlink rpl_unlink
+extern int unlink (char const *file) _GL_ARG_NONNULL ((1));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unlink
+# if HAVE_RAW_DECL_UNLINK
+_GL_WARN_ON_USE (unlink, "unlink is not portable - "
+ "use gnulib module unlink for portability");
+# endif
+#endif
+
+
+#if @GNULIB_UNLINKAT@
+# if @REPLACE_UNLINKAT@
+# undef unlinkat
+# define unlinkat rpl_unlinkat
+# endif
+# if !@HAVE_UNLINKAT@ || @REPLACE_UNLINKAT@
+extern int unlinkat (int fd, char const *file, int flag) _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef unlinkat
+# if HAVE_RAW_DECL_UNLINKAT
+_GL_WARN_ON_USE (unlinkat, "unlinkat is not portable - "
+ "use gnulib module openat for portability");
+# endif
+#endif
+
+
+#if @GNULIB_USLEEP@
+# if @REPLACE_USLEEP@
+# undef usleep
+# define usleep rpl_usleep
+# endif
+# if !@HAVE_USLEEP@ || @REPLACE_USLEEP@
+/* Pause the execution of the current thread for N microseconds.
+ Returns 0 on completion, or -1 on range error.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/sleep.html>. */
+extern int usleep (useconds_t n);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef usleep
+# if HAVE_RAW_DECL_USLEEP
+_GL_WARN_ON_USE (usleep, "usleep is unportable - "
+ "use gnulib module usleep for portability");
+# endif
+#endif
+
+
+#if @GNULIB_WRITE@ && @REPLACE_WRITE@ && @GNULIB_UNISTD_H_SIGPIPE@
+/* Write up to COUNT bytes starting at BUF to file descriptor FD.
+ See the POSIX:2001 specification
+ <http://www.opengroup.org/susv3xsh/write.html>. */
+# undef write
+# define write rpl_write
+extern ssize_t write (int fd, const void *buf, size_t count)
+ _GL_ARG_NONNULL ((2));
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _GL_UNISTD_H */
+#endif /* _GL_UNISTD_H */
diff --git a/gnu/unitypes.h b/gnu/unitypes.h
new file mode 100755
index 00000000..3e4ab0fc
--- /dev/null
+++ b/gnu/unitypes.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 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 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 */
diff --git a/gnu/uniwidth.h b/gnu/uniwidth.h
new file mode 100755
index 00000000..9a52382c
--- /dev/null
+++ b/gnu/uniwidth.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 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 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 */
diff --git a/gnu/uniwidth/cjk.h b/gnu/uniwidth/cjk.h
new file mode 100755
index 00000000..ec130d71
--- /dev/null
+++ b/gnu/uniwidth/cjk.h
@@ -0,0 +1,37 @@
+/* Test for CJK encoding.
+ Copyright (C) 2001-2002, 2005-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include "streq.h"
+
+static int
+is_cjk_encoding (const char *encoding)
+{
+ if (0
+ /* Legacy Japanese encodings */
+ || STREQ (encoding, "EUC-JP", 'E', 'U', 'C', '-', 'J', 'P', 0, 0, 0)
+ /* Legacy Chinese encodings */
+ || STREQ (encoding, "GB2312", 'G', 'B', '2', '3', '1', '2', 0, 0, 0)
+ || STREQ (encoding, "GBK", 'G', 'B', 'K', 0, 0, 0, 0, 0, 0)
+ || STREQ (encoding, "EUC-TW", 'E', 'U', 'C', '-', 'T', 'W', 0, 0, 0)
+ || STREQ (encoding, "BIG5", 'B', 'I', 'G', '5', 0, 0, 0, 0, 0)
+ /* Legacy Korean encodings */
+ || STREQ (encoding, "EUC-KR", 'E', 'U', 'C', '-', 'K', 'R', 0, 0, 0)
+ || STREQ (encoding, "CP949", 'C', 'P', '9', '4', '9', 0, 0, 0, 0)
+ || STREQ (encoding, "JOHAB", 'J', 'O', 'H', 'A', 'B', 0, 0, 0, 0))
+ return 1;
+ return 0;
+}
diff --git a/gnu/uniwidth/width.c b/gnu/uniwidth/width.c
new file mode 100755
index 00000000..21c81350
--- /dev/null
+++ b/gnu/uniwidth/width.c
@@ -0,0 +1,359 @@
+/* Determine display width of Unicode character.
+ Copyright (C) 2001-2002, 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2002.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU 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 General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "uniwidth.h"
+
+#include "cjk.h"
+
+/*
+ * Non-spacing attribute table.
+ * Consists of:
+ * - Non-spacing characters; generated from PropList.txt or
+ * "grep '^[^;]*;[^;]*;[^;]*;[^;]*;NSM;' UnicodeData.txt"
+ * - Format control characters; generated from
+ * "grep '^[^;]*;[^;]*;Cf;' UnicodeData.txt"
+ * - Zero width characters; generated from
+ * "grep '^[^;]*;ZERO WIDTH ' UnicodeData.txt"
+ */
+static const unsigned char nonspacing_table_data[26*64] = {
+ /* 0x0000-0x01ff */
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, /* 0x0000-0x003f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0x0040-0x007f */
+ 0xff, 0xff, 0xff, 0xff, 0x00, 0x20, 0x00, 0x00, /* 0x0080-0x00bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x00c0-0x00ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0100-0x013f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0140-0x017f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0180-0x01bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x01c0-0x01ff */
+ /* 0x0200-0x03ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0200-0x023f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0240-0x027f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0280-0x02bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x02c0-0x02ff */
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, /* 0x0300-0x033f */
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, /* 0x0340-0x037f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0380-0x03bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x03c0-0x03ff */
+ /* 0x0400-0x05ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0400-0x043f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0440-0x047f */
+ 0xf8, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0480-0x04bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x04c0-0x04ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0500-0x053f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0540-0x057f */
+ 0x00, 0x00, 0xfe, 0xff, 0xff, 0xff, 0xff, 0xbf, /* 0x0580-0x05bf */
+ 0xb6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x05c0-0x05ff */
+ /* 0x0600-0x07ff */
+ 0x0f, 0x00, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, /* 0x0600-0x063f */
+ 0x00, 0xf8, 0xff, 0x7f, 0x00, 0x00, 0x01, 0x00, /* 0x0640-0x067f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0680-0x06bf */
+ 0x00, 0x00, 0xc0, 0xff, 0x9f, 0x3d, 0x00, 0x00, /* 0x06c0-0x06ff */
+ 0x00, 0x80, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, /* 0x0700-0x073f */
+ 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0740-0x077f */
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0xff, 0x01, 0x00, /* 0x0780-0x07bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x07c0-0x07ff */
+ /* 0x0800-0x09ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0800-0x083f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0840-0x087f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0880-0x08bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x08c0-0x08ff */
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0900-0x093f */
+ 0xfe, 0x21, 0x1e, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0940-0x097f */
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0980-0x09bf */
+ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x09c0-0x09ff */
+ /* 0x0a00-0x0bff */
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a00-0x0a3f */
+ 0x86, 0x39, 0x02, 0x00, 0x00, 0x00, 0x23, 0x00, /* 0x0a40-0x0a7f */
+ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0a80-0x0abf */
+ 0xbe, 0x21, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0ac0-0x0aff */
+ 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, /* 0x0b00-0x0b3f */
+ 0x1e, 0x20, 0x40, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0b40-0x0b7f */
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0b80-0x0bbf */
+ 0x01, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0bc0-0x0bff */
+ /* 0x0c00-0x0dff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, /* 0x0c00-0x0c3f */
+ 0xc1, 0x3d, 0x60, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0c40-0x0c7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, /* 0x0c80-0x0cbf */
+ 0x00, 0x30, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0cc0-0x0cff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d00-0x0d3f */
+ 0x1e, 0x20, 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, /* 0x0d40-0x0d7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0d80-0x0dbf */
+ 0x00, 0x04, 0x5c, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0dc0-0x0dff */
+ /* 0x0e00-0x0fff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x07, /* 0x0e00-0x0e3f */
+ 0x80, 0x7f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0e40-0x0e7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf2, 0x1b, /* 0x0e80-0x0ebf */
+ 0x00, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0ec0-0x0eff */
+ 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0xa0, 0x02, /* 0x0f00-0x0f3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x7f, /* 0x0f40-0x0f7f */
+ 0xdf, 0x00, 0xff, 0xfe, 0xff, 0xff, 0xff, 0x1f, /* 0x0f80-0x0fbf */
+ 0x40, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x0fc0-0x0fff */
+ /* 0x1000-0x11ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xe0, 0xfd, 0x66, /* 0x1000-0x103f */
+ 0x00, 0x00, 0x00, 0xc3, 0x01, 0x00, 0x1e, 0x00, /* 0x1040-0x107f */
+ 0x64, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1080-0x10bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10c0-0x10ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1100-0x113f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1140-0x117f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1180-0x11bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x11c0-0x11ff */
+ /* 0x1200-0x13ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1200-0x123f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1240-0x127f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1280-0x12bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x12c0-0x12ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1300-0x133f */
+ 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, /* 0x1340-0x137f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1380-0x13bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x13c0-0x13ff */
+ /* 0x1600-0x17ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1600-0x163f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1640-0x167f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1680-0x16bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x16c0-0x16ff */
+ 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x1c, 0x00, /* 0x1700-0x173f */
+ 0x00, 0x00, 0x0c, 0x00, 0x00, 0x00, 0x0c, 0x00, /* 0x1740-0x177f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb0, 0x3f, /* 0x1780-0x17bf */
+ 0x40, 0xfe, 0x0f, 0x20, 0x00, 0x00, 0x00, 0x00, /* 0x17c0-0x17ff */
+ /* 0x1800-0x19ff */
+ 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1800-0x183f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1840-0x187f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, /* 0x1880-0x18bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x18c0-0x18ff */
+ 0x00, 0x00, 0x00, 0x00, 0x87, 0x01, 0x04, 0x0e, /* 0x1900-0x193f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1940-0x197f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1980-0x19bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x19c0-0x19ff */
+ /* 0x1a00-0x1bff */
+ 0x00, 0x00, 0x80, 0x01, 0x00, 0x00, 0x00, 0x00, /* 0x1a00-0x1a3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a40-0x1a7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1a80-0x1abf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1ac0-0x1aff */
+ 0x0f, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x17, /* 0x1b00-0x1b3f */
+ 0x04, 0x00, 0x00, 0x00, 0x00, 0xf8, 0x0f, 0x00, /* 0x1b40-0x1b7f */
+ 0x03, 0x00, 0x00, 0x00, 0x3c, 0x03, 0x00, 0x00, /* 0x1b80-0x1bbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1bc0-0x1bff */
+ /* 0x1c00-0x1dff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0xcf, 0x00, /* 0x1c00-0x1c3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c40-0x1c7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1c80-0x1cbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1cc0-0x1cff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d00-0x1d3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d40-0x1d7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d80-0x1dbf */
+ 0xff, 0xff, 0xff, 0xff, 0x7f, 0x00, 0x00, 0xc0, /* 0x1dc0-0x1dff */
+ /* 0x2000-0x21ff */
+ 0x00, 0xf8, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, /* 0x2000-0x203f */
+ 0x00, 0x00, 0x00, 0x00, 0x1f, 0xfc, 0x00, 0x00, /* 0x2040-0x207f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2080-0x20bf */
+ 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x01, 0x00, /* 0x20c0-0x20ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2100-0x213f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2140-0x217f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2180-0x21bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x21c0-0x21ff */
+ /* 0x2c00-0x2dff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c00-0x2c3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c40-0x2c7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2c80-0x2cbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2cc0-0x2cff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d00-0x2d3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d40-0x2d7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x2d80-0x2dbf */
+ 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, /* 0x2dc0-0x2dff */
+ /* 0x3000-0x31ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfc, 0x00, 0x00, /* 0x3000-0x303f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3040-0x307f */
+ 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, /* 0x3080-0x30bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x30c0-0x30ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3100-0x313f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3140-0x317f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x3180-0x31bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x31c0-0x31ff */
+ /* 0xa600-0xa7ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa600-0xa63f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x07, 0x30, /* 0xa640-0xa67f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa680-0xa6bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa6c0-0xa6ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa700-0xa73f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa740-0xa77f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa780-0xa7bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa7c0-0xa7ff */
+ /* 0xa800-0xa9ff */
+ 0x44, 0x08, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, /* 0xa800-0xa83f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa840-0xa87f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa880-0xa8bf */
+ 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa8c0-0xa8ff */
+ 0x00, 0x00, 0x00, 0x00, 0xc0, 0x3f, 0x00, 0x00, /* 0xa900-0xa93f */
+ 0x80, 0xff, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa940-0xa97f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa980-0xa9bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xa9c0-0xa9ff */
+ /* 0xaa00-0xabff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x66, 0x00, /* 0xaa00-0xaa3f */
+ 0x08, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa40-0xaa7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaa80-0xaabf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xaac0-0xaaff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab00-0xab3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab40-0xab7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xab80-0xabbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xabc0-0xabff */
+ /* 0xfa00-0xfbff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa00-0xfa3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa40-0xfa7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfa80-0xfabf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfac0-0xfaff */
+ 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x00, /* 0xfb00-0xfb3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb40-0xfb7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfb80-0xfbbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfbc0-0xfbff */
+ /* 0xfe00-0xffff */
+ 0xff, 0xff, 0x00, 0x00, 0x7f, 0x00, 0x00, 0x00, /* 0xfe00-0xfe3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe40-0xfe7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xfe80-0xfebf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, /* 0xfec0-0xfeff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff00-0xff3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff40-0xff7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0xff80-0xffbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0e, /* 0xffc0-0xffff */
+ /* 0x10000-0x101ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10000-0x1003f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10040-0x1007f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10080-0x100bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x100c0-0x100ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10100-0x1013f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10140-0x1017f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10180-0x101bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, /* 0x101c0-0x101ff */
+ /* 0x10a00-0x10bff */
+ 0x6e, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x87, /* 0x10a00-0x10a3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a40-0x10a7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10a80-0x10abf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10ac0-0x10aff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b00-0x10b3f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b40-0x10b7f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10b80-0x10bbf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x10bc0-0x10bff */
+ /* 0x1d000-0x1d1ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d000-0x1d03f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d040-0x1d07f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d080-0x1d0bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d0c0-0x1d0ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d100-0x1d13f */
+ 0x00, 0x00, 0x00, 0x00, 0x80, 0x03, 0x00, 0xf8, /* 0x1d140-0x1d17f */
+ 0xe7, 0x0f, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, /* 0x1d180-0x1d1bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d1c0-0x1d1ff */
+ /* 0x1d200-0x1d3ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d200-0x1d23f */
+ 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d240-0x1d27f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d280-0x1d2bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d2c0-0x1d2ff */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d300-0x1d33f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d340-0x1d37f */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, /* 0x1d380-0x1d3bf */
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 /* 0x1d3c0-0x1d3ff */
+};
+static const signed char nonspacing_table_ind[240] = {
+ 0, 1, 2, 3, 4, 5, 6, 7, /* 0x0000-0x0fff */
+ 8, 9, -1, 10, 11, 12, 13, -1, /* 0x1000-0x1fff */
+ 14, -1, -1, -1, -1, -1, 15, -1, /* 0x2000-0x2fff */
+ 16, -1, -1, -1, -1, -1, -1, -1, /* 0x3000-0x3fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x4000-0x4fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x5000-0x5fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x6000-0x6fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x7000-0x7fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x8000-0x8fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x9000-0x9fff */
+ -1, -1, -1, 17, 18, 19, -1, -1, /* 0xa000-0xafff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xb000-0xbfff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xc000-0xcfff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xd000-0xdfff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0xe000-0xefff */
+ -1, -1, -1, -1, -1, 20, -1, 21, /* 0xf000-0xffff */
+ 22, -1, -1, -1, -1, 23, -1, -1, /* 0x10000-0x10fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x11000-0x11fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x12000-0x12fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x13000-0x13fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x14000-0x14fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x15000-0x15fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x16000-0x16fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x17000-0x17fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x18000-0x18fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x19000-0x19fff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1a000-0x1afff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1b000-0x1bfff */
+ -1, -1, -1, -1, -1, -1, -1, -1, /* 0x1c000-0x1cfff */
+ 24, 25, -1, -1, -1, -1, -1, -1 /* 0x1d000-0x1dfff */
+};
+
+/* Determine number of column positions required for UC. */
+int
+uc_width (ucs4_t uc, const char *encoding)
+{
+ /* Test for non-spacing or control character. */
+ if ((uc >> 9) < 240)
+ {
+ int ind = nonspacing_table_ind[uc >> 9];
+ if (ind >= 0)
+ if ((nonspacing_table_data[64*ind + ((uc >> 3) & 63)] >> (uc & 7)) & 1)
+ {
+ if (uc > 0 && uc < 0xa0)
+ return -1;
+ else
+ return 0;
+ }
+ }
+ else if ((uc >> 9) == (0xe0000 >> 9))
+ {
+ if (uc >= 0xe0100)
+ {
+ if (uc <= 0xe01ef)
+ return 0;
+ }
+ else
+ {
+ if (uc >= 0xe0020 ? uc <= 0xe007f : uc == 0xe0001)
+ return 0;
+ }
+ }
+ /* Test for double-width character.
+ * Generated from "grep '^....;[WF]' EastAsianWidth.txt"
+ * and "grep '^....;[^WF]' EastAsianWidth.txt"
+ */
+ if (uc >= 0x1100
+ && ((uc < 0x1160) /* Hangul Jamo */
+ || (uc >= 0x2329 && uc < 0x232b) /* Angle Brackets */
+ || (uc >= 0x2e80 && uc < 0xa4d0 /* CJK ... Yi */
+ && !(uc == 0x303f) && !(uc >= 0x4dc0 && uc < 0x4e00))
+ || (uc >= 0xac00 && uc < 0xd7a4) /* Hangul Syllables */
+ || (uc >= 0xf900 && uc < 0xfb00) /* CJK Compatibility Ideographs */
+ || (uc >= 0xfe10 && uc < 0xfe20) /* Presentation Forms for Vertical */
+ || (uc >= 0xfe30 && uc < 0xfe70) /* CJK Compatibility Forms */
+ || (uc >= 0xff00 && uc < 0xff61) /* Fullwidth Forms */
+ || (uc >= 0xffe0 && uc < 0xffe7) /* Fullwidth Signs */
+ || (uc >= 0x20000 && uc <= 0x2a6d6) /* CJK */
+ || (uc >= 0x2f800 && uc <= 0x2fa1d) /* CJK Compatibility Ideographs */
+ ) )
+ return 2;
+ /* In ancient CJK encodings, Cyrillic and most other characters are
+ double-width as well. */
+ if (uc >= 0x00A1 && uc < 0xFF61 && uc != 0x20A9
+ && is_cjk_encoding (encoding))
+ return 2;
+ return 1;
+}
diff --git a/gnu/unlocked-io.h b/gnu/unlocked-io.h
new file mode 100755
index 00000000..75bf89f6
--- /dev/null
+++ b/gnu/unlocked-io.h
@@ -0,0 +1,136 @@
+/* Prefer faster, non-thread-safe stdio functions if available.
+
+ Copyright (C) 2001-2004, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#ifndef UNLOCKED_IO_H
+# define UNLOCKED_IO_H 1
+
+/* These are wrappers for functions/macros from the GNU C library, and
+ from other C libraries supporting POSIX's optional thread-safe functions.
+
+ The standard I/O functions are thread-safe. These *_unlocked ones are
+ more efficient but not thread-safe. That they're not thread-safe is
+ fine since all of the applications in this package are single threaded.
+
+ Also, some code that is shared with the GNU C library may invoke
+ the *_unlocked functions directly. On hosts that lack those
+ functions, invoke the non-thread-safe versions instead. */
+
+# include <stdio.h>
+
+# if HAVE_DECL_CLEARERR_UNLOCKED
+# undef clearerr
+# define clearerr(x) clearerr_unlocked (x)
+# else
+# define clearerr_unlocked(x) clearerr (x)
+# endif
+
+# if HAVE_DECL_FEOF_UNLOCKED
+# undef feof
+# define feof(x) feof_unlocked (x)
+# else
+# define feof_unlocked(x) feof (x)
+# endif
+
+# if HAVE_DECL_FERROR_UNLOCKED
+# undef ferror
+# define ferror(x) ferror_unlocked (x)
+# else
+# define ferror_unlocked(x) ferror (x)
+# endif
+
+# if HAVE_DECL_FFLUSH_UNLOCKED
+# undef fflush
+# define fflush(x) fflush_unlocked (x)
+# else
+# define fflush_unlocked(x) fflush (x)
+# endif
+
+# if HAVE_DECL_FGETS_UNLOCKED
+# undef fgets
+# define fgets(x,y,z) fgets_unlocked (x,y,z)
+# else
+# define fgets_unlocked(x,y,z) fgets (x,y,z)
+# endif
+
+# if HAVE_DECL_FPUTC_UNLOCKED
+# undef fputc
+# define fputc(x,y) fputc_unlocked (x,y)
+# else
+# define fputc_unlocked(x,y) fputc (x,y)
+# endif
+
+# if HAVE_DECL_FPUTS_UNLOCKED
+# undef fputs
+# define fputs(x,y) fputs_unlocked (x,y)
+# else
+# define fputs_unlocked(x,y) fputs (x,y)
+# endif
+
+# if HAVE_DECL_FREAD_UNLOCKED
+# undef fread
+# define fread(w,x,y,z) fread_unlocked (w,x,y,z)
+# else
+# define fread_unlocked(w,x,y,z) fread (w,x,y,z)
+# endif
+
+# if HAVE_DECL_FWRITE_UNLOCKED
+# undef fwrite
+# define fwrite(w,x,y,z) fwrite_unlocked (w,x,y,z)
+# else
+# define fwrite_unlocked(w,x,y,z) fwrite (w,x,y,z)
+# endif
+
+# if HAVE_DECL_GETC_UNLOCKED
+# undef getc
+# define getc(x) getc_unlocked (x)
+# else
+# define getc_unlocked(x) getc (x)
+# endif
+
+# if HAVE_DECL_GETCHAR_UNLOCKED
+# undef getchar
+# define getchar() getchar_unlocked ()
+# else
+# define getchar_unlocked() getchar ()
+# endif
+
+# if HAVE_DECL_PUTC_UNLOCKED
+# undef putc
+# define putc(x,y) putc_unlocked (x,y)
+# else
+# define putc_unlocked(x,y) putc (x,y)
+# endif
+
+# if HAVE_DECL_PUTCHAR_UNLOCKED
+# undef putchar
+# define putchar(x) putchar_unlocked (x)
+# else
+# define putchar_unlocked(x) putchar (x)
+# endif
+
+# undef flockfile
+# define flockfile(x) ((void) 0)
+
+# undef ftrylockfile
+# define ftrylockfile(x) 0
+
+# undef funlockfile
+# define funlockfile(x) ((void) 0)
+
+#endif /* UNLOCKED_IO_H */
diff --git a/gnu/unsetenv.c b/gnu/unsetenv.c
new file mode 100755
index 00000000..65a19cca
--- /dev/null
+++ b/gnu/unsetenv.c
@@ -0,0 +1,120 @@
+/* Copyright (C) 1992, 1995-2002, 2005-2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Don't use __attribute__ __nonnull__ in this compilation unit. Otherwise gcc
+ optimizes away the name == NULL test below. */
+#define _GL_ARG_NONNULL(params)
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <errno.h>
+#if !_LIBC
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if !_LIBC
+# define __environ environ
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+/* In the GNU C library we must keep the namespace clean. */
+#ifdef _LIBC
+# define unsetenv __unsetenv
+#endif
+
+#if _LIBC || !HAVE_UNSETENV
+
+int
+unsetenv (const char *name)
+{
+ size_t len;
+ char **ep;
+
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ len = strlen (name);
+
+ LOCK;
+
+ ep = __environ;
+ while (*ep != NULL)
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones back. */
+ char **dp = ep;
+
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+ else
+ ++ep;
+
+ UNLOCK;
+
+ return 0;
+}
+
+#ifdef _LIBC
+# undef unsetenv
+weak_alias (__unsetenv, unsetenv)
+#endif
+
+#else /* HAVE_UNSETENV */
+
+# undef unsetenv
+
+/* Call the underlying unsetenv, in case there is hidden bookkeeping
+ that needs updating beyond just modifying environ. */
+int
+rpl_unsetenv (const char *name)
+{
+ int result = 0;
+ if (!name || !*name || strchr (name, '='))
+ {
+ errno = EINVAL;
+ return -1;
+ }
+ while (getenv (name))
+# if !VOID_UNSETENV
+ result =
+# endif
+ unsetenv (name);
+ return result;
+}
+
+#endif /* HAVE_UNSETENV */
diff --git a/gnu/vasnprintf.c b/gnu/vasnprintf.c
new file mode 100755
index 00000000..99d921e9
--- /dev/null
+++ b/gnu/vasnprintf.c
@@ -0,0 +1,5488 @@
+/* vsprintf with automatic memory allocation.
+ Copyright (C) 1999, 2002-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* This file can be parametrized with the following macros:
+ VASNPRINTF The name of the function being defined.
+ FCHAR_T The element type of the format string.
+ DCHAR_T The element type of the destination (result) string.
+ FCHAR_T_ONLY_ASCII Set to 1 to enable verification that all characters
+ in the format string are ASCII. MUST be set if
+ FCHAR_T and DCHAR_T are not the same type.
+ DIRECTIVE Structure denoting a format directive.
+ Depends on FCHAR_T.
+ DIRECTIVES Structure denoting the set of format directives of a
+ format string. Depends on FCHAR_T.
+ PRINTF_PARSE Function that parses a format string.
+ Depends on FCHAR_T.
+ DCHAR_CPY memcpy like function for DCHAR_T[] arrays.
+ DCHAR_SET memset like function for DCHAR_T[] arrays.
+ DCHAR_MBSNLEN mbsnlen like function for DCHAR_T[] arrays.
+ SNPRINTF The system's snprintf (or similar) function.
+ This may be either snprintf or swprintf.
+ TCHAR_T The element type of the argument and result string
+ of the said SNPRINTF function. This may be either
+ char or wchar_t. The code exploits that
+ sizeof (TCHAR_T) | sizeof (DCHAR_T) and
+ alignof (TCHAR_T) <= alignof (DCHAR_T).
+ DCHAR_IS_TCHAR Set to 1 if DCHAR_T and TCHAR_T are the same type.
+ DCHAR_CONV_FROM_ENCODING A function to convert from char[] to DCHAR[].
+ DCHAR_IS_UINT8_T Set to 1 if DCHAR_T is uint8_t.
+ DCHAR_IS_UINT16_T Set to 1 if DCHAR_T is uint16_t.
+ DCHAR_IS_UINT32_T Set to 1 if DCHAR_T is uint32_t. */
+
+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
+ This must come before <config.h> because <config.h> may include
+ <features.h>, and once <features.h> has been included, it's too late. */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE 1
+#endif
+
+#ifndef VASNPRINTF
+# include <config.h>
+#endif
+#ifndef IN_LIBINTL
+# include <alloca.h>
+#endif
+
+/* Specification. */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "vasnwprintf.h"
+# else
+# include "vasnprintf.h"
+# endif
+#endif
+
+#include <locale.h> /* localeconv() */
+#include <stdio.h> /* snprintf(), sprintf() */
+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
+#include <string.h> /* memcpy(), strlen() */
+#include <errno.h> /* errno */
+#include <limits.h> /* CHAR_BIT */
+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
+#if HAVE_NL_LANGINFO
+# include <langinfo.h>
+#endif
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# include "wprintf-parse.h"
+# else
+# include "printf-parse.h"
+# endif
+#endif
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "float+.h"
+#endif
+
+#if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "fpucw.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnand-nolibm.h"
+# include "printf-frexp.h"
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+# include <math.h>
+# include "isnanl-nolibm.h"
+# include "printf-frexpl.h"
+# include "fpucw.h"
+#endif
+
+/* Default parameters. */
+#ifndef VASNPRINTF
+# if WIDE_CHAR_VERSION
+# define VASNPRINTF vasnwprintf
+# define FCHAR_T wchar_t
+# define DCHAR_T wchar_t
+# define TCHAR_T wchar_t
+# define DCHAR_IS_TCHAR 1
+# define DIRECTIVE wchar_t_directive
+# define DIRECTIVES wchar_t_directives
+# define PRINTF_PARSE wprintf_parse
+# define DCHAR_CPY wmemcpy
+# define DCHAR_SET wmemset
+# else
+# define VASNPRINTF vasnprintf
+# define FCHAR_T char
+# define DCHAR_T char
+# define TCHAR_T char
+# define DCHAR_IS_TCHAR 1
+# define DIRECTIVE char_directive
+# define DIRECTIVES char_directives
+# define PRINTF_PARSE printf_parse
+# define DCHAR_CPY memcpy
+# define DCHAR_SET memset
+# endif
+#endif
+#if WIDE_CHAR_VERSION
+ /* TCHAR_T is wchar_t. */
+# define USE_SNPRINTF 1
+# if HAVE_DECL__SNWPRINTF
+ /* On Windows, the function swprintf() has a different signature than
+ on Unix; we use the _snwprintf() function instead. */
+# define SNPRINTF _snwprintf
+# else
+ /* Unix. */
+# define SNPRINTF swprintf
+# endif
+#else
+ /* TCHAR_T is char. */
+ /* Use snprintf if it exists under the name 'snprintf' or '_snprintf'.
+ But don't use it on BeOS, since BeOS snprintf produces no output if the
+ size argument is >= 0x3000000.
+ Also don't use it on Linux libc5, since there snprintf with size = 1
+ writes any output without bounds, like sprintf. */
+# if (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF) && !defined __BEOS__ && !(__GNU_LIBRARY__ == 1)
+# define USE_SNPRINTF 1
+# else
+# define USE_SNPRINTF 0
+# endif
+# if HAVE_DECL__SNPRINTF
+ /* Windows. */
+# define SNPRINTF _snprintf
+# else
+ /* Unix. */
+# define SNPRINTF snprintf
+ /* Here we need to call the native snprintf, not rpl_snprintf. */
+# undef snprintf
+# endif
+#endif
+/* Here we need to call the native sprintf, not rpl_sprintf. */
+#undef sprintf
+
+/* GCC >= 4.0 with -Wall emits unjustified "... may be used uninitialized"
+ warnings in this file. Use -Dlint to suppress them. */
+#ifdef lint
+# define IF_LINT(Code) Code
+#else
+# define IF_LINT(Code) /* empty */
+#endif
+
+/* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() and remainder() functions. */
+#undef exp
+#define exp expo
+#undef remainder
+#define remainder rem
+
+#if !USE_SNPRINTF && !WIDE_CHAR_VERSION
+# if (HAVE_STRNLEN && !defined _AIX)
+# define local_strnlen strnlen
+# else
+# ifndef local_strnlen_defined
+# define local_strnlen_defined 1
+static size_t
+local_strnlen (const char *string, size_t maxlen)
+{
+ const char *end = memchr (string, '\0', maxlen);
+ return end ? (size_t) (end - string) : maxlen;
+}
+# endif
+# endif
+#endif
+
+#if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T && (WIDE_CHAR_VERSION || DCHAR_IS_TCHAR)
+# if HAVE_WCSLEN
+# define local_wcslen wcslen
+# else
+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
+ a dependency towards this library, here is a local substitute.
+ Define this substitute only once, even if this file is included
+ twice in the same compilation unit. */
+# ifndef local_wcslen_defined
+# define local_wcslen_defined 1
+static size_t
+local_wcslen (const wchar_t *s)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
+ ;
+ return ptr - s;
+}
+# endif
+# endif
+#endif
+
+#if !USE_SNPRINTF && HAVE_WCHAR_T && WIDE_CHAR_VERSION
+# if HAVE_WCSNLEN
+# define local_wcsnlen wcsnlen
+# else
+# ifndef local_wcsnlen_defined
+# define local_wcsnlen_defined 1
+static size_t
+local_wcsnlen (const wchar_t *s, size_t maxlen)
+{
+ const wchar_t *ptr;
+
+ for (ptr = s; maxlen > 0 && *ptr != (wchar_t) 0; ptr++, maxlen--)
+ ;
+ return ptr - s;
+}
+# endif
+# endif
+#endif
+
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && !defined IN_LIBINTL
+/* Determine the decimal-point character according to the current locale. */
+# ifndef decimal_point_char_defined
+# define decimal_point_char_defined 1
+static char
+decimal_point_char (void)
+{
+ const char *point;
+ /* Determine it in a multithread-safe way. We know nl_langinfo is
+ multithread-safe on glibc systems and MacOS X systems, but is not required
+ to be multithread-safe by POSIX. sprintf(), however, is multithread-safe.
+ localeconv() is rarely multithread-safe. */
+# if HAVE_NL_LANGINFO && (__GLIBC__ || (defined __APPLE__ && defined __MACH__))
+ point = nl_langinfo (RADIXCHAR);
+# elif 1
+ char pointbuf[5];
+ sprintf (pointbuf, "%#.0f", 1.0);
+ point = &pointbuf[1];
+# else
+ point = localeconv () -> decimal_point;
+# endif
+ /* The decimal point is always a single byte: either '.' or ','. */
+ return (point[0] != '\0' ? point[0] : '.');
+}
+# endif
+#endif
+
+#if NEED_PRINTF_INFINITE_DOUBLE && !NEED_PRINTF_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
+static int
+is_infinite_or_zero (double x)
+{
+ return isnand (x) || x + x == x;
+}
+
+#endif
+
+#if NEED_PRINTF_INFINITE_LONG_DOUBLE && !NEED_PRINTF_LONG_DOUBLE && !defined IN_LIBINTL
+
+/* Equivalent to !isfinite(x) || x == 0, but does not require libm. */
+static int
+is_infinite_or_zerol (long double x)
+{
+ return isnanl (x) || x + x == x;
+}
+
+#endif
+
+#if (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+
+/* Converting 'long double' to decimal without rare rounding bugs requires
+ real bignums. We use the naming conventions of GNU gmp, but vastly simpler
+ (and slower) algorithms. */
+
+typedef unsigned int mp_limb_t;
+# define GMP_LIMB_BITS 32
+typedef int mp_limb_verify[2 * (sizeof (mp_limb_t) * CHAR_BIT == GMP_LIMB_BITS) - 1];
+
+typedef unsigned long long mp_twolimb_t;
+# define GMP_TWOLIMB_BITS 64
+typedef int mp_twolimb_verify[2 * (sizeof (mp_twolimb_t) * CHAR_BIT == GMP_TWOLIMB_BITS) - 1];
+
+/* Representation of a bignum >= 0. */
+typedef struct
+{
+ size_t nlimbs;
+ mp_limb_t *limbs; /* Bits in little-endian order, allocated with malloc(). */
+} mpn_t;
+
+/* Compute the product of two bignums >= 0.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+multiply (mpn_t src1, mpn_t src2, mpn_t *dest)
+{
+ const mp_limb_t *p1;
+ const mp_limb_t *p2;
+ size_t len1;
+ size_t len2;
+
+ if (src1.nlimbs <= src2.nlimbs)
+ {
+ len1 = src1.nlimbs;
+ p1 = src1.limbs;
+ len2 = src2.nlimbs;
+ p2 = src2.limbs;
+ }
+ else
+ {
+ len1 = src2.nlimbs;
+ p1 = src2.limbs;
+ len2 = src1.nlimbs;
+ p2 = src1.limbs;
+ }
+ /* Now 0 <= len1 <= len2. */
+ if (len1 == 0)
+ {
+ /* src1 or src2 is zero. */
+ dest->nlimbs = 0;
+ dest->limbs = (mp_limb_t *) malloc (1);
+ }
+ else
+ {
+ /* Here 1 <= len1 <= len2. */
+ size_t dlen;
+ mp_limb_t *dp;
+ size_t k, i, j;
+
+ dlen = len1 + len2;
+ dp = (mp_limb_t *) malloc (dlen * sizeof (mp_limb_t));
+ if (dp == NULL)
+ return NULL;
+ for (k = len2; k > 0; )
+ dp[--k] = 0;
+ for (i = 0; i < len1; i++)
+ {
+ mp_limb_t digit1 = p1[i];
+ mp_twolimb_t carry = 0;
+ for (j = 0; j < len2; j++)
+ {
+ mp_limb_t digit2 = p2[j];
+ carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+ carry += dp[i + j];
+ dp[i + j] = (mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS;
+ }
+ dp[i + len2] = (mp_limb_t) carry;
+ }
+ /* Normalise. */
+ while (dlen > 0 && dp[dlen - 1] == 0)
+ dlen--;
+ dest->nlimbs = dlen;
+ dest->limbs = dp;
+ }
+ return dest->limbs;
+}
+
+/* Compute the quotient of a bignum a >= 0 and a bignum b > 0.
+ a is written as a = q * b + r with 0 <= r < b. q is the quotient, r
+ the remainder.
+ Finally, round-to-even is performed: If r > b/2 or if r = b/2 and q is odd,
+ q is incremented.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+divide (mpn_t a, mpn_t b, mpn_t *q)
+{
+ /* Algorithm:
+ First normalise a and b: a=[a[m-1],...,a[0]], b=[b[n-1],...,b[0]]
+ with m>=0 and n>0 (in base beta = 2^GMP_LIMB_BITS).
+ If m<n, then q:=0 and r:=a.
+ If m>=n=1, perform a single-precision division:
+ r:=0, j:=m,
+ while j>0 do
+ {Here (q[m-1]*beta^(m-1)+...+q[j]*beta^j) * b[0] + r*beta^j =
+ = a[m-1]*beta^(m-1)+...+a[j]*beta^j und 0<=r<b[0]<beta}
+ j:=j-1, r:=r*beta+a[j], q[j]:=floor(r/b[0]), r:=r-b[0]*q[j].
+ Normalise [q[m-1],...,q[0]], yields q.
+ If m>=n>1, perform a multiple-precision division:
+ We have a/b < beta^(m-n+1).
+ s:=intDsize-1-(highest bit in b[n-1]), 0<=s<intDsize.
+ Shift a and b left by s bits, copying them. r:=a.
+ r=[r[m],...,r[0]], b=[b[n-1],...,b[0]] with b[n-1]>=beta/2.
+ For j=m-n,...,0: {Here 0 <= r < b*beta^(j+1).}
+ Compute q* :
+ q* := floor((r[j+n]*beta+r[j+n-1])/b[n-1]).
+ In case of overflow (q* >= beta) set q* := beta-1.
+ Compute c2 := ((r[j+n]*beta+r[j+n-1]) - q* * b[n-1])*beta + r[j+n-2]
+ and c3 := b[n-2] * q*.
+ {We have 0 <= c2 < 2*beta^2, even 0 <= c2 < beta^2 if no overflow
+ occurred. Furthermore 0 <= c3 < beta^2.
+ If there was overflow and
+ r[j+n]*beta+r[j+n-1] - q* * b[n-1] >= beta, i.e. c2 >= beta^2,
+ the next test can be skipped.}
+ While c3 > c2, {Here 0 <= c2 < c3 < beta^2}
+ Put q* := q* - 1, c2 := c2 + b[n-1]*beta, c3 := c3 - b[n-2].
+ If q* > 0:
+ Put r := r - b * q* * beta^j. In detail:
+ [r[n+j],...,r[j]] := [r[n+j],...,r[j]] - q* * [b[n-1],...,b[0]].
+ hence: u:=0, for i:=0 to n-1 do
+ u := u + q* * b[i],
+ r[j+i]:=r[j+i]-(u mod beta) (+ beta, if carry),
+ u:=u div beta (+ 1, if carry in subtraction)
+ r[n+j]:=r[n+j]-u.
+ {Since always u = (q* * [b[i-1],...,b[0]] div beta^i) + 1
+ < q* + 1 <= beta,
+ the carry u does not overflow.}
+ If a negative carry occurs, put q* := q* - 1
+ and [r[n+j],...,r[j]] := [r[n+j],...,r[j]] + [0,b[n-1],...,b[0]].
+ Set q[j] := q*.
+ Normalise [q[m-n],..,q[0]]; this yields the quotient q.
+ Shift [r[n-1],...,r[0]] right by s bits and normalise; this yields the
+ rest r.
+ The room for q[j] can be allocated at the memory location of r[n+j].
+ Finally, round-to-even:
+ Shift r left by 1 bit.
+ If r > b or if r = b and q[0] is odd, q := q+1.
+ */
+ const mp_limb_t *a_ptr = a.limbs;
+ size_t a_len = a.nlimbs;
+ const mp_limb_t *b_ptr = b.limbs;
+ size_t b_len = b.nlimbs;
+ mp_limb_t *roomptr;
+ mp_limb_t *tmp_roomptr = NULL;
+ mp_limb_t *q_ptr;
+ size_t q_len;
+ mp_limb_t *r_ptr;
+ size_t r_len;
+
+ /* Allocate room for a_len+2 digits.
+ (Need a_len+1 digits for the real division and 1 more digit for the
+ final rounding of q.) */
+ roomptr = (mp_limb_t *) malloc ((a_len + 2) * sizeof (mp_limb_t));
+ if (roomptr == NULL)
+ return NULL;
+
+ /* Normalise a. */
+ while (a_len > 0 && a_ptr[a_len - 1] == 0)
+ a_len--;
+
+ /* Normalise b. */
+ for (;;)
+ {
+ if (b_len == 0)
+ /* Division by zero. */
+ abort ();
+ if (b_ptr[b_len - 1] == 0)
+ b_len--;
+ else
+ break;
+ }
+
+ /* Here m = a_len >= 0 and n = b_len > 0. */
+
+ if (a_len < b_len)
+ {
+ /* m<n: trivial case. q=0, r := copy of a. */
+ r_ptr = roomptr;
+ r_len = a_len;
+ memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+ q_ptr = roomptr + a_len;
+ q_len = 0;
+ }
+ else if (b_len == 1)
+ {
+ /* n=1: single precision division.
+ beta^(m-1) <= a < beta^m ==> beta^(m-2) <= a/b < beta^m */
+ r_ptr = roomptr;
+ q_ptr = roomptr + 1;
+ {
+ mp_limb_t den = b_ptr[0];
+ mp_limb_t remainder = 0;
+ const mp_limb_t *sourceptr = a_ptr + a_len;
+ mp_limb_t *destptr = q_ptr + a_len;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ mp_twolimb_t num =
+ ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--sourceptr;
+ *--destptr = num / den;
+ remainder = num % den;
+ }
+ /* Normalise and store r. */
+ if (remainder > 0)
+ {
+ r_ptr[0] = remainder;
+ r_len = 1;
+ }
+ else
+ r_len = 0;
+ /* Normalise q. */
+ q_len = a_len;
+ if (q_ptr[q_len - 1] == 0)
+ q_len--;
+ }
+ }
+ else
+ {
+ /* n>1: multiple precision division.
+ beta^(m-1) <= a < beta^m, beta^(n-1) <= b < beta^n ==>
+ beta^(m-n-1) <= a/b < beta^(m-n+1). */
+ /* Determine s. */
+ size_t s;
+ {
+ mp_limb_t msd = b_ptr[b_len - 1]; /* = b[n-1], > 0 */
+ s = 31;
+ if (msd >= 0x10000)
+ {
+ msd = msd >> 16;
+ s -= 16;
+ }
+ if (msd >= 0x100)
+ {
+ msd = msd >> 8;
+ s -= 8;
+ }
+ if (msd >= 0x10)
+ {
+ msd = msd >> 4;
+ s -= 4;
+ }
+ if (msd >= 0x4)
+ {
+ msd = msd >> 2;
+ s -= 2;
+ }
+ if (msd >= 0x2)
+ {
+ msd = msd >> 1;
+ s -= 1;
+ }
+ }
+ /* 0 <= s < GMP_LIMB_BITS.
+ Copy b, shifting it left by s bits. */
+ if (s > 0)
+ {
+ tmp_roomptr = (mp_limb_t *) malloc (b_len * sizeof (mp_limb_t));
+ if (tmp_roomptr == NULL)
+ {
+ free (roomptr);
+ return NULL;
+ }
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = tmp_roomptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ /* accu must be zero, since that was how s was determined. */
+ if (accu != 0)
+ abort ();
+ }
+ b_ptr = tmp_roomptr;
+ }
+ /* Copy a, shifting it left by s bits, yields r.
+ Memory layout:
+ At the beginning: r = roomptr[0..a_len],
+ at the end: r = roomptr[0..b_len-1], q = roomptr[b_len..a_len] */
+ r_ptr = roomptr;
+ if (s == 0)
+ {
+ memcpy (r_ptr, a_ptr, a_len * sizeof (mp_limb_t));
+ r_ptr[a_len] = 0;
+ }
+ else
+ {
+ const mp_limb_t *sourceptr = a_ptr;
+ mp_limb_t *destptr = r_ptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ *destptr++ = (mp_limb_t) accu;
+ }
+ q_ptr = roomptr + b_len;
+ q_len = a_len - b_len + 1; /* q will have m-n+1 limbs */
+ {
+ size_t j = a_len - b_len; /* m-n */
+ mp_limb_t b_msd = b_ptr[b_len - 1]; /* b[n-1] */
+ mp_limb_t b_2msd = b_ptr[b_len - 2]; /* b[n-2] */
+ mp_twolimb_t b_msdd = /* b[n-1]*beta+b[n-2] */
+ ((mp_twolimb_t) b_msd << GMP_LIMB_BITS) | b_2msd;
+ /* Division loop, traversed m-n+1 times.
+ j counts down, b is unchanged, beta/2 <= b[n-1] < beta. */
+ for (;;)
+ {
+ mp_limb_t q_star;
+ mp_limb_t c1;
+ if (r_ptr[j + b_len] < b_msd) /* r[j+n] < b[n-1] ? */
+ {
+ /* Divide r[j+n]*beta+r[j+n-1] by b[n-1], no overflow. */
+ mp_twolimb_t num =
+ ((mp_twolimb_t) r_ptr[j + b_len] << GMP_LIMB_BITS)
+ | r_ptr[j + b_len - 1];
+ q_star = num / b_msd;
+ c1 = num % b_msd;
+ }
+ else
+ {
+ /* Overflow, hence r[j+n]*beta+r[j+n-1] >= beta*b[n-1]. */
+ q_star = (mp_limb_t)~(mp_limb_t)0; /* q* = beta-1 */
+ /* Test whether r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] >= beta
+ <==> r[j+n]*beta+r[j+n-1] + b[n-1] >= beta*b[n-1]+beta
+ <==> b[n-1] < floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta)
+ {<= beta !}.
+ If yes, jump directly to the subtraction loop.
+ (Otherwise, r[j+n]*beta+r[j+n-1] - (beta-1)*b[n-1] < beta
+ <==> floor((r[j+n]*beta+r[j+n-1]+b[n-1])/beta) = b[n-1] ) */
+ if (r_ptr[j + b_len] > b_msd
+ || (c1 = r_ptr[j + b_len - 1] + b_msd) < b_msd)
+ /* r[j+n] >= b[n-1]+1 or
+ r[j+n] = b[n-1] and the addition r[j+n-1]+b[n-1] gives a
+ carry. */
+ goto subtract;
+ }
+ /* q_star = q*,
+ c1 = (r[j+n]*beta+r[j+n-1]) - q* * b[n-1] (>=0, <beta). */
+ {
+ mp_twolimb_t c2 = /* c1*beta+r[j+n-2] */
+ ((mp_twolimb_t) c1 << GMP_LIMB_BITS) | r_ptr[j + b_len - 2];
+ mp_twolimb_t c3 = /* b[n-2] * q* */
+ (mp_twolimb_t) b_2msd * (mp_twolimb_t) q_star;
+ /* While c2 < c3, increase c2 and decrease c3.
+ Consider c3-c2. While it is > 0, decrease it by
+ b[n-1]*beta+b[n-2]. Because of b[n-1]*beta+b[n-2] >= beta^2/2
+ this can happen only twice. */
+ if (c3 > c2)
+ {
+ q_star = q_star - 1; /* q* := q* - 1 */
+ if (c3 - c2 > b_msdd)
+ q_star = q_star - 1; /* q* := q* - 1 */
+ }
+ }
+ if (q_star > 0)
+ subtract:
+ {
+ /* Subtract r := r - b * q* * beta^j. */
+ mp_limb_t cr;
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = r_ptr + j;
+ mp_twolimb_t carry = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ /* Here 0 <= carry <= q*. */
+ carry =
+ carry
+ + (mp_twolimb_t) q_star * (mp_twolimb_t) *sourceptr++
+ + (mp_limb_t) ~(*destptr);
+ /* Here 0 <= carry <= beta*q* + beta-1. */
+ *destptr++ = ~(mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS; /* <= q* */
+ }
+ cr = (mp_limb_t) carry;
+ }
+ /* Subtract cr from r_ptr[j + b_len], then forget about
+ r_ptr[j + b_len]. */
+ if (cr > r_ptr[j + b_len])
+ {
+ /* Subtraction gave a carry. */
+ q_star = q_star - 1; /* q* := q* - 1 */
+ /* Add b back. */
+ {
+ const mp_limb_t *sourceptr = b_ptr;
+ mp_limb_t *destptr = r_ptr + j;
+ mp_limb_t carry = 0;
+ size_t count;
+ for (count = b_len; count > 0; count--)
+ {
+ mp_limb_t source1 = *sourceptr++;
+ mp_limb_t source2 = *destptr;
+ *destptr++ = source1 + source2 + carry;
+ carry =
+ (carry
+ ? source1 >= (mp_limb_t) ~source2
+ : source1 > (mp_limb_t) ~source2);
+ }
+ }
+ /* Forget about the carry and about r[j+n]. */
+ }
+ }
+ /* q* is determined. Store it as q[j]. */
+ q_ptr[j] = q_star;
+ if (j == 0)
+ break;
+ j--;
+ }
+ }
+ r_len = b_len;
+ /* Normalise q. */
+ if (q_ptr[q_len - 1] == 0)
+ q_len--;
+# if 0 /* Not needed here, since we need r only to compare it with b/2, and
+ b is shifted left by s bits. */
+ /* Shift r right by s bits. */
+ if (s > 0)
+ {
+ mp_limb_t ptr = r_ptr + r_len;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = r_len; count > 0; count--)
+ {
+ accu = (mp_twolimb_t) (mp_limb_t) accu << GMP_LIMB_BITS;
+ accu += (mp_twolimb_t) *--ptr << (GMP_LIMB_BITS - s);
+ *ptr = (mp_limb_t) (accu >> GMP_LIMB_BITS);
+ }
+ }
+# endif
+ /* Normalise r. */
+ while (r_len > 0 && r_ptr[r_len - 1] == 0)
+ r_len--;
+ }
+ /* Compare r << 1 with b. */
+ if (r_len > b_len)
+ goto increment_q;
+ {
+ size_t i;
+ for (i = b_len;;)
+ {
+ mp_limb_t r_i =
+ (i <= r_len && i > 0 ? r_ptr[i - 1] >> (GMP_LIMB_BITS - 1) : 0)
+ | (i < r_len ? r_ptr[i] << 1 : 0);
+ mp_limb_t b_i = (i < b_len ? b_ptr[i] : 0);
+ if (r_i > b_i)
+ goto increment_q;
+ if (r_i < b_i)
+ goto keep_q;
+ if (i == 0)
+ break;
+ i--;
+ }
+ }
+ if (q_len > 0 && ((q_ptr[0] & 1) != 0))
+ /* q is odd. */
+ increment_q:
+ {
+ size_t i;
+ for (i = 0; i < q_len; i++)
+ if (++(q_ptr[i]) != 0)
+ goto keep_q;
+ q_ptr[q_len++] = 1;
+ }
+ keep_q:
+ if (tmp_roomptr != NULL)
+ free (tmp_roomptr);
+ q->limbs = q_ptr;
+ q->nlimbs = q_len;
+ return roomptr;
+}
+
+/* Convert a bignum a >= 0, multiplied with 10^extra_zeroes, to decimal
+ representation.
+ Destroys the contents of a.
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+convert_to_decimal (mpn_t a, size_t extra_zeroes)
+{
+ mp_limb_t *a_ptr = a.limbs;
+ size_t a_len = a.nlimbs;
+ /* 0.03345 is slightly larger than log(2)/(9*log(10)). */
+ size_t c_len = 9 * ((size_t)(a_len * (GMP_LIMB_BITS * 0.03345f)) + 1);
+ char *c_ptr = (char *) malloc (xsum (c_len, extra_zeroes));
+ if (c_ptr != NULL)
+ {
+ char *d_ptr = c_ptr;
+ for (; extra_zeroes > 0; extra_zeroes--)
+ *d_ptr++ = '0';
+ while (a_len > 0)
+ {
+ /* Divide a by 10^9, in-place. */
+ mp_limb_t remainder = 0;
+ mp_limb_t *ptr = a_ptr + a_len;
+ size_t count;
+ for (count = a_len; count > 0; count--)
+ {
+ mp_twolimb_t num =
+ ((mp_twolimb_t) remainder << GMP_LIMB_BITS) | *--ptr;
+ *ptr = num / 1000000000;
+ remainder = num % 1000000000;
+ }
+ /* Store the remainder as 9 decimal digits. */
+ for (count = 9; count > 0; count--)
+ {
+ *d_ptr++ = '0' + (remainder % 10);
+ remainder = remainder / 10;
+ }
+ /* Normalize a. */
+ if (a_ptr[a_len - 1] == 0)
+ a_len--;
+ }
+ /* Remove leading zeroes. */
+ while (d_ptr > c_ptr && d_ptr[-1] == '0')
+ d_ptr--;
+ /* But keep at least one zero. */
+ if (d_ptr == c_ptr)
+ *d_ptr++ = '0';
+ /* Terminate the string. */
+ *d_ptr = '\0';
+ }
+ return c_ptr;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0:
+ write x as x = 2^e * m, where m is a bignum.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+decode_long_double (long double x, int *ep, mpn_t *mp)
+{
+ mpn_t m;
+ int exp;
+ long double y;
+ size_t i;
+
+ /* Allocate memory for result. */
+ m.nlimbs = (LDBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+ m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+ if (m.limbs == NULL)
+ return NULL;
+ /* Split into exponential part and mantissa. */
+ y = frexpl (x, &exp);
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ /* x = 2^exp * y = 2^(exp - LDBL_MANT_BIT) * (y * LDBL_MANT_BIT), and the
+ latter is an integer. */
+ /* Convert the mantissa (y * LDBL_MANT_BIT) to a sequence of limbs.
+ I'm not sure whether it's safe to cast a 'long double' value between
+ 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+ 'long double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+ doesn't matter). */
+# if (LDBL_MANT_BIT % GMP_LIMB_BITS) != 0
+# if (LDBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+# else
+ {
+ mp_limb_t d;
+ y *= (mp_limb_t) 1 << (LDBL_MANT_BIT % GMP_LIMB_BITS);
+ d = (int) y;
+ y -= d;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[LDBL_MANT_BIT / GMP_LIMB_BITS] = d;
+ }
+# endif
+# endif
+ for (i = LDBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+#if 0 /* On FreeBSD 6.1/x86, 'long double' numbers sometimes have excess
+ precision. */
+ if (!(y == 0.0L))
+ abort ();
+#endif
+ /* Normalise. */
+ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+ m.nlimbs--;
+ *mp = m;
+ *ep = exp - LDBL_MANT_BIT;
+ return m.limbs;
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0:
+ write x as x = 2^e * m, where m is a bignum.
+ Return the allocated memory in case of success, NULL in case of memory
+ allocation failure. */
+static void *
+decode_double (double x, int *ep, mpn_t *mp)
+{
+ mpn_t m;
+ int exp;
+ double y;
+ size_t i;
+
+ /* Allocate memory for result. */
+ m.nlimbs = (DBL_MANT_BIT + GMP_LIMB_BITS - 1) / GMP_LIMB_BITS;
+ m.limbs = (mp_limb_t *) malloc (m.nlimbs * sizeof (mp_limb_t));
+ if (m.limbs == NULL)
+ return NULL;
+ /* Split into exponential part and mantissa. */
+ y = frexp (x, &exp);
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ /* x = 2^exp * y = 2^(exp - DBL_MANT_BIT) * (y * DBL_MANT_BIT), and the
+ latter is an integer. */
+ /* Convert the mantissa (y * DBL_MANT_BIT) to a sequence of limbs.
+ I'm not sure whether it's safe to cast a 'double' value between
+ 2^31 and 2^32 to 'unsigned int', therefore play safe and cast only
+ 'double' values between 0 and 2^16 (to 'unsigned int' or 'int',
+ doesn't matter). */
+# if (DBL_MANT_BIT % GMP_LIMB_BITS) != 0
+# if (DBL_MANT_BIT % GMP_LIMB_BITS) > GMP_LIMB_BITS / 2
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (DBL_MANT_BIT % (GMP_LIMB_BITS / 2));
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+# else
+ {
+ mp_limb_t d;
+ y *= (mp_limb_t) 1 << (DBL_MANT_BIT % GMP_LIMB_BITS);
+ d = (int) y;
+ y -= d;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[DBL_MANT_BIT / GMP_LIMB_BITS] = d;
+ }
+# endif
+# endif
+ for (i = DBL_MANT_BIT / GMP_LIMB_BITS; i > 0; )
+ {
+ mp_limb_t hi, lo;
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ hi = (int) y;
+ y -= hi;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ y *= (mp_limb_t) 1 << (GMP_LIMB_BITS / 2);
+ lo = (int) y;
+ y -= lo;
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ m.limbs[--i] = (hi << (GMP_LIMB_BITS / 2)) | lo;
+ }
+ if (!(y == 0.0))
+ abort ();
+ /* Normalise. */
+ while (m.nlimbs > 0 && m.limbs[m.nlimbs - 1] == 0)
+ m.nlimbs--;
+ *mp = m;
+ *ep = exp - DBL_MANT_BIT;
+ return m.limbs;
+}
+
+# endif
+
+/* Assuming x = 2^e * m is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_decoded (int e, mpn_t m, void *memory, int n)
+{
+ int s;
+ size_t extra_zeroes;
+ unsigned int abs_n;
+ unsigned int abs_s;
+ mp_limb_t *pow5_ptr;
+ size_t pow5_len;
+ unsigned int s_limbs;
+ unsigned int s_bits;
+ mpn_t pow5;
+ mpn_t z;
+ void *z_memory;
+ char *digits;
+
+ if (memory == NULL)
+ return NULL;
+ /* x = 2^e * m, hence
+ y = round (2^e * 10^n * m) = round (2^(e+n) * 5^n * m)
+ = round (2^s * 5^n * m). */
+ s = e + n;
+ extra_zeroes = 0;
+ /* Factor out a common power of 10 if possible. */
+ if (s > 0 && n > 0)
+ {
+ extra_zeroes = (s < n ? s : n);
+ s -= extra_zeroes;
+ n -= extra_zeroes;
+ }
+ /* Here y = round (2^s * 5^n * m) * 10^extra_zeroes.
+ Before converting to decimal, we need to compute
+ z = round (2^s * 5^n * m). */
+ /* Compute 5^|n|, possibly shifted by |s| bits if n and s have the same
+ sign. 2.322 is slightly larger than log(5)/log(2). */
+ abs_n = (n >= 0 ? n : -n);
+ abs_s = (s >= 0 ? s : -s);
+ pow5_ptr = (mp_limb_t *) malloc (((int)(abs_n * (2.322f / GMP_LIMB_BITS)) + 1
+ + abs_s / GMP_LIMB_BITS + 1)
+ * sizeof (mp_limb_t));
+ if (pow5_ptr == NULL)
+ {
+ free (memory);
+ return NULL;
+ }
+ /* Initialize with 1. */
+ pow5_ptr[0] = 1;
+ pow5_len = 1;
+ /* Multiply with 5^|n|. */
+ if (abs_n > 0)
+ {
+ static mp_limb_t const small_pow5[13 + 1] =
+ {
+ 1, 5, 25, 125, 625, 3125, 15625, 78125, 390625, 1953125, 9765625,
+ 48828125, 244140625, 1220703125
+ };
+ unsigned int n13;
+ for (n13 = 0; n13 <= abs_n; n13 += 13)
+ {
+ mp_limb_t digit1 = small_pow5[n13 + 13 <= abs_n ? 13 : abs_n - n13];
+ size_t j;
+ mp_twolimb_t carry = 0;
+ for (j = 0; j < pow5_len; j++)
+ {
+ mp_limb_t digit2 = pow5_ptr[j];
+ carry += (mp_twolimb_t) digit1 * (mp_twolimb_t) digit2;
+ pow5_ptr[j] = (mp_limb_t) carry;
+ carry = carry >> GMP_LIMB_BITS;
+ }
+ if (carry > 0)
+ pow5_ptr[pow5_len++] = (mp_limb_t) carry;
+ }
+ }
+ s_limbs = abs_s / GMP_LIMB_BITS;
+ s_bits = abs_s % GMP_LIMB_BITS;
+ if (n >= 0 ? s >= 0 : s <= 0)
+ {
+ /* Multiply with 2^|s|. */
+ if (s_bits > 0)
+ {
+ mp_limb_t *ptr = pow5_ptr;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = pow5_len; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *ptr << s_bits;
+ *ptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ if (accu > 0)
+ {
+ *ptr = (mp_limb_t) accu;
+ pow5_len++;
+ }
+ }
+ if (s_limbs > 0)
+ {
+ size_t count;
+ for (count = pow5_len; count > 0;)
+ {
+ count--;
+ pow5_ptr[s_limbs + count] = pow5_ptr[count];
+ }
+ for (count = s_limbs; count > 0;)
+ {
+ count--;
+ pow5_ptr[count] = 0;
+ }
+ pow5_len += s_limbs;
+ }
+ pow5.limbs = pow5_ptr;
+ pow5.nlimbs = pow5_len;
+ if (n >= 0)
+ {
+ /* Multiply m with pow5. No division needed. */
+ z_memory = multiply (m, pow5, &z);
+ }
+ else
+ {
+ /* Divide m by pow5 and round. */
+ z_memory = divide (m, pow5, &z);
+ }
+ }
+ else
+ {
+ pow5.limbs = pow5_ptr;
+ pow5.nlimbs = pow5_len;
+ if (n >= 0)
+ {
+ /* n >= 0, s < 0.
+ Multiply m with pow5, then divide by 2^|s|. */
+ mpn_t numerator;
+ mpn_t denominator;
+ void *tmp_memory;
+ tmp_memory = multiply (m, pow5, &numerator);
+ if (tmp_memory == NULL)
+ {
+ free (pow5_ptr);
+ free (memory);
+ return NULL;
+ }
+ /* Construct 2^|s|. */
+ {
+ mp_limb_t *ptr = pow5_ptr + pow5_len;
+ size_t i;
+ for (i = 0; i < s_limbs; i++)
+ ptr[i] = 0;
+ ptr[s_limbs] = (mp_limb_t) 1 << s_bits;
+ denominator.limbs = ptr;
+ denominator.nlimbs = s_limbs + 1;
+ }
+ z_memory = divide (numerator, denominator, &z);
+ free (tmp_memory);
+ }
+ else
+ {
+ /* n < 0, s > 0.
+ Multiply m with 2^s, then divide by pow5. */
+ mpn_t numerator;
+ mp_limb_t *num_ptr;
+ num_ptr = (mp_limb_t *) malloc ((m.nlimbs + s_limbs + 1)
+ * sizeof (mp_limb_t));
+ if (num_ptr == NULL)
+ {
+ free (pow5_ptr);
+ free (memory);
+ return NULL;
+ }
+ {
+ mp_limb_t *destptr = num_ptr;
+ {
+ size_t i;
+ for (i = 0; i < s_limbs; i++)
+ *destptr++ = 0;
+ }
+ if (s_bits > 0)
+ {
+ const mp_limb_t *sourceptr = m.limbs;
+ mp_twolimb_t accu = 0;
+ size_t count;
+ for (count = m.nlimbs; count > 0; count--)
+ {
+ accu += (mp_twolimb_t) *sourceptr++ << s_bits;
+ *destptr++ = (mp_limb_t) accu;
+ accu = accu >> GMP_LIMB_BITS;
+ }
+ if (accu > 0)
+ *destptr++ = (mp_limb_t) accu;
+ }
+ else
+ {
+ const mp_limb_t *sourceptr = m.limbs;
+ size_t count;
+ for (count = m.nlimbs; count > 0; count--)
+ *destptr++ = *sourceptr++;
+ }
+ numerator.limbs = num_ptr;
+ numerator.nlimbs = destptr - num_ptr;
+ }
+ z_memory = divide (numerator, pow5, &z);
+ free (num_ptr);
+ }
+ }
+ free (pow5_ptr);
+ free (memory);
+
+ /* Here y = round (x * 10^n) = z * 10^extra_zeroes. */
+
+ if (z_memory == NULL)
+ return NULL;
+ digits = convert_to_decimal (z, extra_zeroes);
+ free (z_memory);
+ return digits;
+}
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_long_double (long double x, int n)
+{
+ int e IF_LINT(= 0);
+ mpn_t m;
+ void *memory = decode_long_double (x, &e, &m);
+ return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and >= 0, and n is an integer:
+ Returns the decimal representation of round (x * 10^n).
+ Return the allocated memory - containing the decimal digits in low-to-high
+ order, terminated with a NUL character - in case of success, NULL in case
+ of memory allocation failure. */
+static char *
+scale10_round_decimal_double (double x, int n)
+{
+ int e IF_LINT(= 0);
+ mpn_t m;
+ void *memory = decode_double (x, &e, &m);
+ return scale10_round_decimal_decoded (e, m, memory, n);
+}
+
+# endif
+
+# if NEED_PRINTF_LONG_DOUBLE
+
+/* Assuming x is finite and > 0:
+ Return an approximation for n with 10^n <= x < 10^(n+1).
+ The approximation is usually the right n, but may be off by 1 sometimes. */
+static int
+floorlog10l (long double x)
+{
+ int exp;
+ long double y;
+ double z;
+ double l;
+
+ /* Split into exponential part and mantissa. */
+ y = frexpl (x, &exp);
+ if (!(y >= 0.0L && y < 1.0L))
+ abort ();
+ if (y == 0.0L)
+ return INT_MIN;
+ if (y < 0.5L)
+ {
+ while (y < (1.0L / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+ {
+ y *= 1.0L * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+ exp -= GMP_LIMB_BITS;
+ }
+ if (y < (1.0L / (1 << 16)))
+ {
+ y *= 1.0L * (1 << 16);
+ exp -= 16;
+ }
+ if (y < (1.0L / (1 << 8)))
+ {
+ y *= 1.0L * (1 << 8);
+ exp -= 8;
+ }
+ if (y < (1.0L / (1 << 4)))
+ {
+ y *= 1.0L * (1 << 4);
+ exp -= 4;
+ }
+ if (y < (1.0L / (1 << 2)))
+ {
+ y *= 1.0L * (1 << 2);
+ exp -= 2;
+ }
+ if (y < (1.0L / (1 << 1)))
+ {
+ y *= 1.0L * (1 << 1);
+ exp -= 1;
+ }
+ }
+ if (!(y >= 0.5L && y < 1.0L))
+ abort ();
+ /* Compute an approximation for l = log2(x) = exp + log2(y). */
+ l = exp;
+ z = y;
+ if (z < 0.70710678118654752444)
+ {
+ z *= 1.4142135623730950488;
+ l -= 0.5;
+ }
+ if (z < 0.8408964152537145431)
+ {
+ z *= 1.1892071150027210667;
+ l -= 0.25;
+ }
+ if (z < 0.91700404320467123175)
+ {
+ z *= 1.0905077326652576592;
+ l -= 0.125;
+ }
+ if (z < 0.9576032806985736469)
+ {
+ z *= 1.0442737824274138403;
+ l -= 0.0625;
+ }
+ /* Now 0.95 <= z <= 1.01. */
+ z = 1 - z;
+ /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+ Four terms are enough to get an approximation with error < 10^-7. */
+ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+ /* Finally multiply with log(2)/log(10), yields an approximation for
+ log10(x). */
+ l *= 0.30102999566398119523;
+ /* Round down to the next integer. */
+ return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+# if NEED_PRINTF_DOUBLE
+
+/* Assuming x is finite and > 0:
+ Return an approximation for n with 10^n <= x < 10^(n+1).
+ The approximation is usually the right n, but may be off by 1 sometimes. */
+static int
+floorlog10 (double x)
+{
+ int exp;
+ double y;
+ double z;
+ double l;
+
+ /* Split into exponential part and mantissa. */
+ y = frexp (x, &exp);
+ if (!(y >= 0.0 && y < 1.0))
+ abort ();
+ if (y == 0.0)
+ return INT_MIN;
+ if (y < 0.5)
+ {
+ while (y < (1.0 / (1 << (GMP_LIMB_BITS / 2)) / (1 << (GMP_LIMB_BITS / 2))))
+ {
+ y *= 1.0 * (1 << (GMP_LIMB_BITS / 2)) * (1 << (GMP_LIMB_BITS / 2));
+ exp -= GMP_LIMB_BITS;
+ }
+ if (y < (1.0 / (1 << 16)))
+ {
+ y *= 1.0 * (1 << 16);
+ exp -= 16;
+ }
+ if (y < (1.0 / (1 << 8)))
+ {
+ y *= 1.0 * (1 << 8);
+ exp -= 8;
+ }
+ if (y < (1.0 / (1 << 4)))
+ {
+ y *= 1.0 * (1 << 4);
+ exp -= 4;
+ }
+ if (y < (1.0 / (1 << 2)))
+ {
+ y *= 1.0 * (1 << 2);
+ exp -= 2;
+ }
+ if (y < (1.0 / (1 << 1)))
+ {
+ y *= 1.0 * (1 << 1);
+ exp -= 1;
+ }
+ }
+ if (!(y >= 0.5 && y < 1.0))
+ abort ();
+ /* Compute an approximation for l = log2(x) = exp + log2(y). */
+ l = exp;
+ z = y;
+ if (z < 0.70710678118654752444)
+ {
+ z *= 1.4142135623730950488;
+ l -= 0.5;
+ }
+ if (z < 0.8408964152537145431)
+ {
+ z *= 1.1892071150027210667;
+ l -= 0.25;
+ }
+ if (z < 0.91700404320467123175)
+ {
+ z *= 1.0905077326652576592;
+ l -= 0.125;
+ }
+ if (z < 0.9576032806985736469)
+ {
+ z *= 1.0442737824274138403;
+ l -= 0.0625;
+ }
+ /* Now 0.95 <= z <= 1.01. */
+ z = 1 - z;
+ /* log2(1-z) = 1/log(2) * (- z - z^2/2 - z^3/3 - z^4/4 - ...)
+ Four terms are enough to get an approximation with error < 10^-7. */
+ l -= 1.4426950408889634074 * z * (1.0 + z * (0.5 + z * ((1.0 / 3) + z * 0.25)));
+ /* Finally multiply with log(2)/log(10), yields an approximation for
+ log10(x). */
+ l *= 0.30102999566398119523;
+ /* Round down to the next integer. */
+ return (int) l + (l < 0 ? -1 : 0);
+}
+
+# endif
+
+/* Tests whether a string of digits consists of exactly PRECISION zeroes and
+ a single '1' digit. */
+static int
+is_borderline (const char *digits, size_t precision)
+{
+ for (; precision > 0; precision--, digits++)
+ if (*digits != '0')
+ return 0;
+ if (*digits != '1')
+ return 0;
+ digits++;
+ return *digits == '\0';
+}
+
+#endif
+
+DCHAR_T *
+VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
+ const FCHAR_T *format, va_list args)
+{
+ DIRECTIVES d;
+ arguments a;
+
+ if (PRINTF_PARSE (format, &d, &a) < 0)
+ /* errno is already set. */
+ return NULL;
+
+#define CLEANUP() \
+ free (d.dir); \
+ if (a.arg) \
+ free (a.arg);
+
+ if (PRINTF_FETCHARGS (args, &a) < 0)
+ {
+ CLEANUP ();
+ errno = EINVAL;
+ return NULL;
+ }
+
+ {
+ size_t buf_neededlength;
+ TCHAR_T *buf;
+ TCHAR_T *buf_malloced;
+ const FCHAR_T *cp;
+ size_t i;
+ DIRECTIVE *dp;
+ /* Output string accumulator. */
+ DCHAR_T *result;
+ size_t allocated;
+ size_t length;
+
+ /* Allocate a small buffer that will hold a directive passed to
+ sprintf or snprintf. */
+ buf_neededlength =
+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
+#if HAVE_ALLOCA
+ if (buf_neededlength < 4000 / sizeof (TCHAR_T))
+ {
+ buf = (TCHAR_T *) alloca (buf_neededlength * sizeof (TCHAR_T));
+ buf_malloced = NULL;
+ }
+ else
+#endif
+ {
+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (TCHAR_T));
+ if (size_overflow_p (buf_memsize))
+ goto out_of_memory_1;
+ buf = (TCHAR_T *) malloc (buf_memsize);
+ if (buf == NULL)
+ goto out_of_memory_1;
+ buf_malloced = buf;
+ }
+
+ if (resultbuf != NULL)
+ {
+ result = resultbuf;
+ allocated = *lengthp;
+ }
+ else
+ {
+ result = NULL;
+ allocated = 0;
+ }
+ length = 0;
+ /* Invariants:
+ result is either == resultbuf or == NULL or malloc-allocated.
+ If length > 0, then result != NULL. */
+
+ /* Ensures that allocated >= needed. Aborts through a jump to
+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
+#define ENSURE_ALLOCATION(needed) \
+ if ((needed) > allocated) \
+ { \
+ size_t memory_size; \
+ DCHAR_T *memory; \
+ \
+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
+ if ((needed) > allocated) \
+ allocated = (needed); \
+ memory_size = xtimes (allocated, sizeof (DCHAR_T)); \
+ if (size_overflow_p (memory_size)) \
+ goto out_of_memory; \
+ if (result == resultbuf || result == NULL) \
+ memory = (DCHAR_T *) malloc (memory_size); \
+ else \
+ memory = (DCHAR_T *) realloc (result, memory_size); \
+ if (memory == NULL) \
+ goto out_of_memory; \
+ if (result == resultbuf && length > 0) \
+ DCHAR_CPY (memory, result, length); \
+ result = memory; \
+ }
+
+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
+ {
+ if (cp != dp->dir_start)
+ {
+ size_t n = dp->dir_start - cp;
+ size_t augmented_length = xsum (length, n);
+
+ ENSURE_ALLOCATION (augmented_length);
+ /* This copies a piece of FCHAR_T[] into a DCHAR_T[]. Here we
+ need that the format string contains only ASCII characters
+ if FCHAR_T and DCHAR_T are not the same type. */
+ if (sizeof (FCHAR_T) == sizeof (DCHAR_T))
+ {
+ DCHAR_CPY (result + length, (const DCHAR_T *) cp, n);
+ length = augmented_length;
+ }
+ else
+ {
+ do
+ result[length++] = (unsigned char) *cp++;
+ while (--n > 0);
+ }
+ }
+ if (i == d.count)
+ break;
+
+ /* Execute a single directive. */
+ if (dp->conversion == '%')
+ {
+ size_t augmented_length;
+
+ if (!(dp->arg_index == ARG_NONE))
+ abort ();
+ augmented_length = xsum (length, 1);
+ ENSURE_ALLOCATION (augmented_length);
+ result[length] = '%';
+ length = augmented_length;
+ }
+ else
+ {
+ if (!(dp->arg_index != ARG_NONE))
+ abort ();
+
+ if (dp->conversion == 'n')
+ {
+ switch (a.arg[dp->arg_index].type)
+ {
+ case TYPE_COUNT_SCHAR_POINTER:
+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
+ break;
+ case TYPE_COUNT_SHORT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
+ break;
+ case TYPE_COUNT_INT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
+ break;
+ case TYPE_COUNT_LONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_COUNT_LONGLONGINT_POINTER:
+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
+ break;
+#endif
+ default:
+ abort ();
+ }
+ }
+#if ENABLE_UNISTDIO
+ /* The unistdio extensions. */
+ else if (dp->conversion == 'U')
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ switch (type)
+ {
+ case TYPE_U8_STRING:
+ {
+ const uint8_t *arg = a.arg[dp->arg_index].a.a_u8_string;
+ const uint8_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u8_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u8_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u8_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT8_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-8 to locale encoding. */
+ converted =
+ u8_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-8 to UTF-16/UTF-32. */
+ converted =
+ U8_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ case TYPE_U16_STRING:
+ {
+ const uint16_t *arg = a.arg[dp->arg_index].a.a_u16_string;
+ const uint16_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u16_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u16_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u16_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT16_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-16 to locale encoding. */
+ converted =
+ u16_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-16 to UTF-8/UTF-32. */
+ converted =
+ U16_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ case TYPE_U32_STRING:
+ {
+ const uint32_t *arg = a.arg[dp->arg_index].a.a_u32_string;
+ const uint32_t *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only PRECISION characters, from the left. */
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count = u32_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of
+ characters. */
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count = u32_strmblen (arg_end);
+ if (count == 0)
+ break;
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + u32_strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_UINT32_T
+ {
+ size_t n = arg_end - arg;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_CPY (result + length, arg, n);
+ length += n;
+ }
+# else
+ { /* Convert. */
+ DCHAR_T *converted = result + length;
+ size_t converted_len = allocated - length;
+# if DCHAR_IS_TCHAR
+ /* Convert from UTF-32 to locale encoding. */
+ converted =
+ u32_conv_to_encoding (locale_charset (),
+ iconveh_question_mark,
+ arg, arg_end - arg, NULL,
+ converted, &converted_len);
+# else
+ /* Convert from UTF-32 to UTF-8/UTF-16. */
+ converted =
+ U32_TO_DCHAR (arg, arg_end - arg,
+ converted, &converted_len);
+# endif
+ if (converted == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ if (converted != result + length)
+ {
+ ENSURE_ALLOCATION (xsum (length, converted_len));
+ DCHAR_CPY (result + length, converted, converted_len);
+ free (converted);
+ }
+ length += converted_len;
+ }
+# endif
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ break;
+
+ default:
+ abort ();
+ }
+ }
+#endif
+#if (!USE_SNPRINTF || (NEED_PRINTF_DIRECTIVE_LS && !defined IN_LIBINTL)) && HAVE_WCHAR_T
+ else if (dp->conversion == 's'
+# if WIDE_CHAR_VERSION
+ && a.arg[dp->arg_index].type != TYPE_WIDE_STRING
+# else
+ && a.arg[dp->arg_index].type == TYPE_WIDE_STRING
+# endif
+ )
+ {
+ /* The normal handling of the 's' directive below requires
+ allocating a temporary buffer. The determination of its
+ length (tmp_length), in the case when a precision is
+ specified, below requires a conversion between a char[]
+ string and a wchar_t[] wide string. It could be done, but
+ we have no guarantee that the implementation of sprintf will
+ use the exactly same algorithm. Without this guarantee, it
+ is possible to have buffer overrun bugs. In order to avoid
+ such bugs, we implement the entire processing of the 's'
+ directive ourselves. */
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 6;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+# if WIDE_CHAR_VERSION
+ /* %s in vasnwprintf. See the specification of fwprintf. */
+ {
+ const char *arg = a.arg[dp->arg_index].a.a_string;
+ const char *arg_end;
+ size_t characters;
+
+ if (has_precision)
+ {
+ /* Use only as many bytes as needed to produce PRECISION
+ wide characters, from the left. */
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (; precision > 0; precision--)
+ {
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrlen (arg_end, MB_CUR_MAX, &state);
+# else
+ count = mblen (arg_end, MB_CUR_MAX);
+# endif
+ if (count == 0)
+ /* Found the terminating NUL. */
+ break;
+ if (count < 0)
+ {
+ /* Invalid or incomplete multibyte character. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else if (has_width)
+ {
+ /* Use the entire string, and count the number of wide
+ characters. */
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrlen (arg_end, MB_CUR_MAX, &state);
+# else
+ count = mblen (arg_end, MB_CUR_MAX);
+# endif
+ if (count == 0)
+ /* Found the terminating NUL. */
+ break;
+ if (count < 0)
+ {
+ /* Invalid or incomplete multibyte character. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end += count;
+ characters++;
+ }
+ }
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + strlen (arg);
+ /* The number of characters doesn't matter. */
+ characters = 0;
+ }
+
+ if (has_width && width > characters
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+ if (has_precision || has_width)
+ {
+ /* We know the number of wide characters in advance. */
+ size_t remaining;
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ ENSURE_ALLOCATION (xsum (length, characters));
+ for (remaining = characters; remaining > 0; remaining--)
+ {
+ wchar_t wc;
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrtowc (&wc, arg, arg_end - arg, &state);
+# else
+ count = mbtowc (&wc, arg, arg_end - arg);
+# endif
+ if (count <= 0)
+ /* mbrtowc not consistent with mbrlen, or mbtowc
+ not consistent with mblen. */
+ abort ();
+ result[length++] = wc;
+ arg += count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+ else
+ {
+# if HAVE_MBRTOWC
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ while (arg < arg_end)
+ {
+ wchar_t wc;
+ int count;
+# if HAVE_MBRTOWC
+ count = mbrtowc (&wc, arg, arg_end - arg, &state);
+# else
+ count = mbtowc (&wc, arg, arg_end - arg);
+# endif
+ if (count <= 0)
+ /* mbrtowc not consistent with mbrlen, or mbtowc
+ not consistent with mblen. */
+ abort ();
+ ENSURE_ALLOCATION (xsum (length, 1));
+ result[length++] = wc;
+ arg += count;
+ }
+ }
+
+ if (has_width && width > characters
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - characters;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+# else
+ /* %ls in vasnprintf. See the specification of fprintf. */
+ {
+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+ const wchar_t *arg_end;
+ size_t characters;
+# if !DCHAR_IS_TCHAR
+ /* This code assumes that TCHAR_T is 'char'. */
+ typedef int TCHAR_T_verify[2 * (sizeof (TCHAR_T) == 1) - 1];
+ TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t tmpdst_len;
+# endif
+ size_t w;
+
+ if (has_precision)
+ {
+ /* Use only as many wide characters as needed to produce
+ at most PRECISION bytes, from the left. */
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ while (precision > 0)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg_end, &state);
+# else
+ count = wctomb (cbuf, *arg_end);
+# endif
+ if (count < 0)
+ {
+ /* Cannot convert. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ if (precision < count)
+ break;
+ arg_end++;
+ characters += count;
+ precision -= count;
+ }
+ }
+# if DCHAR_IS_TCHAR
+ else if (has_width)
+# else
+ else
+# endif
+ {
+ /* Use the entire string, and count the number of
+ bytes. */
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ arg_end = arg;
+ characters = 0;
+ for (;;)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg_end == 0)
+ /* Found the terminating null wide character. */
+ break;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg_end, &state);
+# else
+ count = wctomb (cbuf, *arg_end);
+# endif
+ if (count < 0)
+ {
+ /* Cannot convert. */
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EILSEQ;
+ return NULL;
+ }
+ arg_end++;
+ characters += count;
+ }
+ }
+# if DCHAR_IS_TCHAR
+ else
+ {
+ /* Use the entire string. */
+ arg_end = arg + local_wcslen (arg);
+ /* The number of bytes doesn't matter. */
+ characters = 0;
+ }
+# endif
+
+# if !DCHAR_IS_TCHAR
+ /* Convert the string into a piece of temporary memory. */
+ tmpsrc = (TCHAR_T *) malloc (characters * sizeof (TCHAR_T));
+ if (tmpsrc == NULL)
+ goto out_of_memory;
+ {
+ TCHAR_T *tmpptr = tmpsrc;
+ size_t remaining;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ for (remaining = characters; remaining > 0; )
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ memcpy (tmpptr, cbuf, count);
+ tmpptr += count;
+ arg++;
+ remaining -= count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+
+ /* Convert from TCHAR_T[] to DCHAR_T[]. */
+ tmpdst =
+ DCHAR_CONV_FROM_ENCODING (locale_charset (),
+ iconveh_question_mark,
+ tmpsrc, characters,
+ NULL,
+ NULL, &tmpdst_len);
+ if (tmpdst == NULL)
+ {
+ int saved_errno = errno;
+ free (tmpsrc);
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ free (tmpsrc);
+# endif
+
+ if (has_width)
+ {
+# if ENABLE_UNISTDIO
+ /* Outside POSIX, it's preferrable to compare the width
+ against the number of _characters_ of the converted
+ value. */
+ w = DCHAR_MBSNLEN (result + length, characters);
+# else
+ /* The width is compared against the number of _bytes_
+ of the converted value, says POSIX. */
+ w = characters;
+# endif
+ }
+ else
+ /* w doesn't matter. */
+ w = 0;
+
+ if (has_width && width > w
+ && !(dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - w;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+
+# if DCHAR_IS_TCHAR
+ if (has_precision || has_width)
+ {
+ /* We know the number of bytes in advance. */
+ size_t remaining;
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ ENSURE_ALLOCATION (xsum (length, characters));
+ for (remaining = characters; remaining > 0; )
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ remaining -= count;
+ }
+ if (!(arg == arg_end))
+ abort ();
+ }
+ else
+ {
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ mbstate_t state;
+ memset (&state, '\0', sizeof (mbstate_t));
+# endif
+ while (arg < arg_end)
+ {
+ char cbuf[64]; /* Assume MB_CUR_MAX <= 64. */
+ int count;
+
+ if (*arg == 0)
+ abort ();
+# if HAVE_WCRTOMB && !defined GNULIB_defined_mbstate_t
+ count = wcrtomb (cbuf, *arg, &state);
+# else
+ count = wctomb (cbuf, *arg);
+# endif
+ if (count <= 0)
+ /* Inconsistency. */
+ abort ();
+ ENSURE_ALLOCATION (xsum (length, count));
+ memcpy (result + length, cbuf, count);
+ length += count;
+ arg++;
+ }
+ }
+# else
+ ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+ DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+ free (tmpdst);
+ length += tmpdst_len;
+# endif
+
+ if (has_width && width > w
+ && (dp->flags & FLAG_LEFT))
+ {
+ size_t n = width - w;
+ ENSURE_ALLOCATION (xsum (length, n));
+ DCHAR_SET (result + length, ' ', n);
+ length += n;
+ }
+ }
+ }
+# endif
+#endif
+#if (NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_DOUBLE) && !defined IN_LIBINTL
+ else if ((dp->conversion == 'a' || dp->conversion == 'A')
+# if !(NEED_PRINTF_DIRECTIVE_A || (NEED_PRINTF_LONG_DOUBLE && NEED_PRINTF_DOUBLE))
+ && (0
+# if NEED_PRINTF_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_DOUBLE
+# endif
+# if NEED_PRINTF_LONG_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+# endif
+ )
+# endif
+ )
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+ size_t tmp_length;
+ DCHAR_T tmpbuf[700];
+ DCHAR_T *tmp;
+ DCHAR_T *pad_ptr;
+ DCHAR_T *p;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ /* Allocate a temporary buffer of sufficient size. */
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) ((LDBL_DIG + 1)
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) ((DBL_DIG + 1)
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+
+ if (tmp_length < width)
+ tmp_length = width;
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (DCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+
+ pad_ptr = NULL;
+ p = tmp;
+ if (type == TYPE_LONGDOUBLE)
+ {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_LONG_DOUBLE
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+ if (isnanl (arg))
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ if (signbit (arg)) /* arg < 0.0L or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0L && arg + arg == arg)
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+ int exponent;
+ long double mantissa;
+
+ if (arg > 0.0L)
+ mantissa = printf_frexpl (arg, &exponent);
+ else
+ {
+ exponent = 0;
+ mantissa = 0.0L;
+ }
+
+ if (has_precision
+ && precision < (unsigned int) ((LDBL_DIG + 1) * 0.831) + 1)
+ {
+ /* Round the mantissa. */
+ long double tail = mantissa;
+ size_t q;
+
+ for (q = precision; ; q--)
+ {
+ int digit = (int) tail;
+ tail -= digit;
+ if (q == 0)
+ {
+ if (digit & 1 ? tail >= 0.5L : tail > 0.5L)
+ tail = 1 - tail;
+ else
+ tail = - tail;
+ break;
+ }
+ tail *= 16.0L;
+ }
+ if (tail != 0.0L)
+ for (q = precision; q > 0; q--)
+ tail *= 0.0625L;
+ mantissa += tail;
+ }
+
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ {
+ int digit;
+
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = '0' + digit;
+ if ((flags & FLAG_ALT)
+ || mantissa > 0.0L || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ /* This loop terminates because we assume
+ that FLT_RADIX is a power of 2. */
+ while (mantissa > 0.0L)
+ {
+ mantissa *= 16.0L;
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = digit
+ + (digit < 10
+ ? '0'
+ : dp->conversion - 10);
+ if (precision > 0)
+ precision--;
+ }
+ while (precision > 0)
+ {
+ *p++ = '0';
+ precision--;
+ }
+ }
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+
+ END_LONG_DOUBLE_ROUNDING ();
+ }
+# else
+ abort ();
+# endif
+ }
+ else
+ {
+# if NEED_PRINTF_DIRECTIVE_A || NEED_PRINTF_DOUBLE
+ double arg = a.arg[dp->arg_index].a.a_double;
+
+ if (isnand (arg))
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+
+ if (signbit (arg)) /* arg < 0.0 or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0 && arg + arg == arg)
+ {
+ if (dp->conversion == 'A')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+ int exponent;
+ double mantissa;
+
+ if (arg > 0.0)
+ mantissa = printf_frexp (arg, &exponent);
+ else
+ {
+ exponent = 0;
+ mantissa = 0.0;
+ }
+
+ if (has_precision
+ && precision < (unsigned int) ((DBL_DIG + 1) * 0.831) + 1)
+ {
+ /* Round the mantissa. */
+ double tail = mantissa;
+ size_t q;
+
+ for (q = precision; ; q--)
+ {
+ int digit = (int) tail;
+ tail -= digit;
+ if (q == 0)
+ {
+ if (digit & 1 ? tail >= 0.5 : tail > 0.5)
+ tail = 1 - tail;
+ else
+ tail = - tail;
+ break;
+ }
+ tail *= 16.0;
+ }
+ if (tail != 0.0)
+ for (q = precision; q > 0; q--)
+ tail *= 0.0625;
+ mantissa += tail;
+ }
+
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ {
+ int digit;
+
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = '0' + digit;
+ if ((flags & FLAG_ALT)
+ || mantissa > 0.0 || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ /* This loop terminates because we assume
+ that FLT_RADIX is a power of 2. */
+ while (mantissa > 0.0)
+ {
+ mantissa *= 16.0;
+ digit = (int) mantissa;
+ mantissa -= digit;
+ *p++ = digit
+ + (digit < 10
+ ? '0'
+ : dp->conversion - 10);
+ if (precision > 0)
+ precision--;
+ }
+ while (precision > 0)
+ {
+ *p++ = '0';
+ precision--;
+ }
+ }
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+ }
+# else
+ abort ();
+# endif
+ }
+ /* The generated string now extends from tmp to p, with the
+ zero padding insertion point being at pad_ptr. */
+ if (has_width && p - tmp < width)
+ {
+ size_t pad = width - (p - tmp);
+ DCHAR_T *end = p + pad;
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > tmp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+
+ p = end;
+ }
+
+ {
+ size_t count = p - tmp;
+
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
+
+ ENSURE_ALLOCATION (n);
+ }
+
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
+ }
+ }
+#endif
+#if (NEED_PRINTF_INFINITE_DOUBLE || NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE || NEED_PRINTF_LONG_DOUBLE) && !defined IN_LIBINTL
+ else if ((dp->conversion == 'f' || dp->conversion == 'F'
+ || dp->conversion == 'e' || dp->conversion == 'E'
+ || dp->conversion == 'g' || dp->conversion == 'G'
+ || dp->conversion == 'a' || dp->conversion == 'A')
+ && (0
+# if NEED_PRINTF_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_DOUBLE
+# elif NEED_PRINTF_INFINITE_DOUBLE
+ || (a.arg[dp->arg_index].type == TYPE_DOUBLE
+ /* The systems (mingw) which produce wrong output
+ for Inf, -Inf, and NaN also do so for -0.0.
+ Therefore we treat this case here as well. */
+ && is_infinite_or_zero (a.arg[dp->arg_index].a.a_double))
+# endif
+# if NEED_PRINTF_LONG_DOUBLE
+ || a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+# elif NEED_PRINTF_INFINITE_LONG_DOUBLE
+ || (a.arg[dp->arg_index].type == TYPE_LONGDOUBLE
+ /* Some systems produce wrong output for Inf,
+ -Inf, and NaN. Some systems in this category
+ (IRIX 5.3) also do so for -0.0. Therefore we
+ treat this case here as well. */
+ && is_infinite_or_zerol (a.arg[dp->arg_index].a.a_longdouble))
+# endif
+ ))
+ {
+# if (NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE) && (NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE)
+ arg_type type = a.arg[dp->arg_index].type;
+# endif
+ int flags = dp->flags;
+ int has_width;
+ size_t width;
+ int has_precision;
+ size_t precision;
+ size_t tmp_length;
+ DCHAR_T tmpbuf[700];
+ DCHAR_T *tmp;
+ DCHAR_T *pad_ptr;
+ DCHAR_T *p;
+
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+
+ has_precision = 0;
+ precision = 0;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+
+ /* POSIX specifies the default precision to be 6 for %f, %F,
+ %e, %E, but not for %g, %G. Implementations appear to use
+ the same default precision also for %g, %G. But for %a, %A,
+ the default precision is 0. */
+ if (!has_precision)
+ if (!(dp->conversion == 'a' || dp->conversion == 'A'))
+ precision = 6;
+
+ /* Allocate a temporary buffer of sufficient size. */
+# if NEED_PRINTF_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+ tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : DBL_DIG + 1);
+# elif NEED_PRINTF_INFINITE_DOUBLE && NEED_PRINTF_LONG_DOUBLE
+ tmp_length = (type == TYPE_LONGDOUBLE ? LDBL_DIG + 1 : 0);
+# elif NEED_PRINTF_LONG_DOUBLE
+ tmp_length = LDBL_DIG + 1;
+# elif NEED_PRINTF_DOUBLE
+ tmp_length = DBL_DIG + 1;
+# else
+ tmp_length = 0;
+# endif
+ if (tmp_length < precision)
+ tmp_length = precision;
+# if NEED_PRINTF_LONG_DOUBLE
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ if (type == TYPE_LONGDOUBLE)
+# endif
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+ if (!(isnanl (arg) || arg + arg == arg))
+ {
+ /* arg is finite and nonzero. */
+ int exponent = floorlog10l (arg < 0 ? -arg : arg);
+ if (exponent >= 0 && tmp_length < exponent + precision)
+ tmp_length = exponent + precision;
+ }
+ }
+# endif
+# if NEED_PRINTF_DOUBLE
+# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+ if (type == TYPE_DOUBLE)
+# endif
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+ if (!(isnand (arg) || arg + arg == arg))
+ {
+ /* arg is finite and nonzero. */
+ int exponent = floorlog10 (arg < 0 ? -arg : arg);
+ if (exponent >= 0 && tmp_length < exponent + precision)
+ tmp_length = exponent + precision;
+ }
+ }
+# endif
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+
+ if (tmp_length < width)
+ tmp_length = width;
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (DCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (DCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (DCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+
+ pad_ptr = NULL;
+ p = tmp;
+
+# if NEED_PRINTF_LONG_DOUBLE || NEED_PRINTF_INFINITE_LONG_DOUBLE
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ if (type == TYPE_LONGDOUBLE)
+# endif
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+
+ if (isnanl (arg))
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ if (signbit (arg)) /* arg < 0.0L or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0L && arg + arg == arg)
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+# if NEED_PRINTF_LONG_DOUBLE
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ char *digits;
+ size_t ndigits;
+
+ digits =
+ scale10_round_decimal_long_double (arg, precision);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits > precision)
+ do
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ while (ndigits > precision);
+ else
+ *p++ = '0';
+ /* Here ndigits <= precision. */
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > ndigits; precision--)
+ *p++ = '0';
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ int exponent;
+
+ if (arg == 0.0L)
+ {
+ exponent = 0;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else
+ {
+ /* arg > 0.0L. */
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+
+ exponent = floorlog10l (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_long_double (arg,
+ (int)precision - exponent);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits == precision + 1)
+ break;
+ if (ndigits < precision
+ || ndigits > precision + 2)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits == precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision+1. */
+ if (is_borderline (digits, precision))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_long_double (arg,
+ (int)precision - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision + 1)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision+1. */
+
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+
+ *p++ = dp->conversion; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', '.', '2', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+.2d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+.2d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ if (precision == 0)
+ precision = 1;
+ /* precision >= 1. */
+
+ if (arg == 0.0L)
+ /* The exponent is 0, >= -4, < precision.
+ Use fixed-point notation. */
+ {
+ size_t ndigits = precision;
+ /* Number of trailing zeroes that have to be
+ dropped. */
+ size_t nzeroes =
+ (flags & FLAG_ALT ? 0 : precision - 1);
+
+ --ndigits;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = '0';
+ }
+ }
+ }
+ else
+ {
+ /* arg > 0.0L. */
+ int exponent;
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+ size_t nzeroes;
+
+ exponent = floorlog10l (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_long_double (arg,
+ (int)(precision - 1) - exponent);
+ if (digits == NULL)
+ {
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ ndigits = strlen (digits);
+
+ if (ndigits == precision)
+ break;
+ if (ndigits < precision - 1
+ || ndigits > precision + 1)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits < precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision. */
+ if (is_borderline (digits, precision - 1))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_long_double (arg,
+ (int)(precision - 1) - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ END_LONG_DOUBLE_ROUNDING ();
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision. */
+
+ /* Determine the number of trailing zeroes
+ that have to be dropped. */
+ nzeroes = 0;
+ if ((flags & FLAG_ALT) == 0)
+ while (nzeroes < ndigits
+ && digits[nzeroes] == '0')
+ nzeroes++;
+
+ /* The exponent is now determined. */
+ if (exponent >= -4
+ && exponent < (long)precision)
+ {
+ /* Fixed-point notation:
+ max(exponent,0)+1 digits, then the
+ decimal point, then the remaining
+ digits without trailing zeroes. */
+ if (exponent >= 0)
+ {
+ size_t count = exponent + 1;
+ /* Note: count <= precision = ndigits. */
+ for (; count > 0; count--)
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ size_t count = -exponent - 1;
+ *p++ = '0';
+ *p++ = decimal_point_char ();
+ for (; count > 0; count--)
+ *p++ = '0';
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ /* Exponential notation. */
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ { '%', '+', '.', '2', 'd', '\0' };
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, "%+.2d", exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, "%+.2d", exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+# endif
+ }
+
+ free (digits);
+ }
+ }
+ else
+ abort ();
+# else
+ /* arg is finite. */
+ if (!(arg == 0.0L))
+ abort ();
+
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion; /* 'e' or 'E' */
+ *p++ = '+';
+ *p++ = '0';
+ *p++ = '0';
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ *p++ = '0';
+ if (flags & FLAG_ALT)
+ {
+ size_t ndigits =
+ (precision > 0 ? precision - 1 : 0);
+ *p++ = decimal_point_char ();
+ for (; ndigits > 0; --ndigits)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'a' || dp->conversion == 'A')
+ {
+ *p++ = '0';
+ *p++ = dp->conversion - 'A' + 'X';
+ pad_ptr = p;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion - 'A' + 'P';
+ *p++ = '+';
+ *p++ = '0';
+ }
+ else
+ abort ();
+# endif
+ }
+
+ END_LONG_DOUBLE_ROUNDING ();
+ }
+ }
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ else
+# endif
+# endif
+# if NEED_PRINTF_DOUBLE || NEED_PRINTF_INFINITE_DOUBLE
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+
+ if (isnand (arg))
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'N'; *p++ = 'A'; *p++ = 'N';
+ }
+ else
+ {
+ *p++ = 'n'; *p++ = 'a'; *p++ = 'n';
+ }
+ }
+ else
+ {
+ int sign = 0;
+
+ if (signbit (arg)) /* arg < 0.0 or negative zero */
+ {
+ sign = -1;
+ arg = -arg;
+ }
+
+ if (sign < 0)
+ *p++ = '-';
+ else if (flags & FLAG_SHOWSIGN)
+ *p++ = '+';
+ else if (flags & FLAG_SPACE)
+ *p++ = ' ';
+
+ if (arg > 0.0 && arg + arg == arg)
+ {
+ if (dp->conversion >= 'A' && dp->conversion <= 'Z')
+ {
+ *p++ = 'I'; *p++ = 'N'; *p++ = 'F';
+ }
+ else
+ {
+ *p++ = 'i'; *p++ = 'n'; *p++ = 'f';
+ }
+ }
+ else
+ {
+# if NEED_PRINTF_DOUBLE
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ char *digits;
+ size_t ndigits;
+
+ digits =
+ scale10_round_decimal_double (arg, precision);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits > precision)
+ do
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ while (ndigits > precision);
+ else
+ *p++ = '0';
+ /* Here ndigits <= precision. */
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > ndigits; precision--)
+ *p++ = '0';
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ int exponent;
+
+ if (arg == 0.0)
+ {
+ exponent = 0;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else
+ {
+ /* arg > 0.0. */
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+
+ exponent = floorlog10 (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_double (arg,
+ (int)precision - exponent);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits == precision + 1)
+ break;
+ if (ndigits < precision
+ || ndigits > precision + 2)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits == precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision+1. */
+ if (is_borderline (digits, precision))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_double (arg,
+ (int)precision - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision + 1)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision+1. */
+
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > 0)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+
+ free (digits);
+ }
+
+ *p++ = dp->conversion; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+# else
+ { '%', '+', '.', '2', 'd', '\0' };
+# endif
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ {
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ "%+.3d";
+# else
+ "%+.2d";
+# endif
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, decimal_format, exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, decimal_format, exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+ }
+# endif
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ if (precision == 0)
+ precision = 1;
+ /* precision >= 1. */
+
+ if (arg == 0.0)
+ /* The exponent is 0, >= -4, < precision.
+ Use fixed-point notation. */
+ {
+ size_t ndigits = precision;
+ /* Number of trailing zeroes that have to be
+ dropped. */
+ size_t nzeroes =
+ (flags & FLAG_ALT ? 0 : precision - 1);
+
+ --ndigits;
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = '0';
+ }
+ }
+ }
+ else
+ {
+ /* arg > 0.0. */
+ int exponent;
+ int adjusted;
+ char *digits;
+ size_t ndigits;
+ size_t nzeroes;
+
+ exponent = floorlog10 (arg);
+ adjusted = 0;
+ for (;;)
+ {
+ digits =
+ scale10_round_decimal_double (arg,
+ (int)(precision - 1) - exponent);
+ if (digits == NULL)
+ goto out_of_memory;
+ ndigits = strlen (digits);
+
+ if (ndigits == precision)
+ break;
+ if (ndigits < precision - 1
+ || ndigits > precision + 1)
+ /* The exponent was not guessed
+ precisely enough. */
+ abort ();
+ if (adjusted)
+ /* None of two values of exponent is
+ the right one. Prevent an endless
+ loop. */
+ abort ();
+ free (digits);
+ if (ndigits < precision)
+ exponent -= 1;
+ else
+ exponent += 1;
+ adjusted = 1;
+ }
+ /* Here ndigits = precision. */
+ if (is_borderline (digits, precision - 1))
+ {
+ /* Maybe the exponent guess was too high
+ and a smaller exponent can be reached
+ by turning a 10...0 into 9...9x. */
+ char *digits2 =
+ scale10_round_decimal_double (arg,
+ (int)(precision - 1) - exponent + 1);
+ if (digits2 == NULL)
+ {
+ free (digits);
+ goto out_of_memory;
+ }
+ if (strlen (digits2) == precision)
+ {
+ free (digits);
+ digits = digits2;
+ exponent -= 1;
+ }
+ else
+ free (digits2);
+ }
+ /* Here ndigits = precision. */
+
+ /* Determine the number of trailing zeroes
+ that have to be dropped. */
+ nzeroes = 0;
+ if ((flags & FLAG_ALT) == 0)
+ while (nzeroes < ndigits
+ && digits[nzeroes] == '0')
+ nzeroes++;
+
+ /* The exponent is now determined. */
+ if (exponent >= -4
+ && exponent < (long)precision)
+ {
+ /* Fixed-point notation:
+ max(exponent,0)+1 digits, then the
+ decimal point, then the remaining
+ digits without trailing zeroes. */
+ if (exponent >= 0)
+ {
+ size_t count = exponent + 1;
+ /* Note: count <= precision = ndigits. */
+ for (; count > 0; count--)
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ size_t count = -exponent - 1;
+ *p++ = '0';
+ *p++ = decimal_point_char ();
+ for (; count > 0; count--)
+ *p++ = '0';
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ }
+ else
+ {
+ /* Exponential notation. */
+ *p++ = digits[--ndigits];
+ if ((flags & FLAG_ALT) || ndigits > nzeroes)
+ {
+ *p++ = decimal_point_char ();
+ while (ndigits > nzeroes)
+ {
+ --ndigits;
+ *p++ = digits[ndigits];
+ }
+ }
+ *p++ = dp->conversion - 'G' + 'E'; /* 'e' or 'E' */
+# if WIDE_CHAR_VERSION
+ {
+ static const wchar_t decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ { '%', '+', '.', '3', 'd', '\0' };
+# else
+ { '%', '+', '.', '2', 'd', '\0' };
+# endif
+ SNPRINTF (p, 6 + 1, decimal_format, exponent);
+ }
+ while (*p != '\0')
+ p++;
+# else
+ {
+ static const char decimal_format[] =
+ /* Produce the same number of exponent digits
+ as the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ "%+.3d";
+# else
+ "%+.2d";
+# endif
+ if (sizeof (DCHAR_T) == 1)
+ {
+ sprintf ((char *) p, decimal_format, exponent);
+ while (*p != '\0')
+ p++;
+ }
+ else
+ {
+ char expbuf[6 + 1];
+ const char *ep;
+ sprintf (expbuf, decimal_format, exponent);
+ for (ep = expbuf; (*p = *ep) != '\0'; ep++)
+ p++;
+ }
+ }
+# endif
+ }
+
+ free (digits);
+ }
+ }
+ else
+ abort ();
+# else
+ /* arg is finite. */
+ if (!(arg == 0.0))
+ abort ();
+
+ pad_ptr = p;
+
+ if (dp->conversion == 'f' || dp->conversion == 'F')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ }
+ else if (dp->conversion == 'e' || dp->conversion == 'E')
+ {
+ *p++ = '0';
+ if ((flags & FLAG_ALT) || precision > 0)
+ {
+ *p++ = decimal_point_char ();
+ for (; precision > 0; precision--)
+ *p++ = '0';
+ }
+ *p++ = dp->conversion; /* 'e' or 'E' */
+ *p++ = '+';
+ /* Produce the same number of exponent digits as
+ the native printf implementation. */
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ *p++ = '0';
+# endif
+ *p++ = '0';
+ *p++ = '0';
+ }
+ else if (dp->conversion == 'g' || dp->conversion == 'G')
+ {
+ *p++ = '0';
+ if (flags & FLAG_ALT)
+ {
+ size_t ndigits =
+ (precision > 0 ? precision - 1 : 0);
+ *p++ = decimal_point_char ();
+ for (; ndigits > 0; --ndigits)
+ *p++ = '0';
+ }
+ }
+ else
+ abort ();
+# endif
+ }
+ }
+ }
+# endif
+
+ /* The generated string now extends from tmp to p, with the
+ zero padding insertion point being at pad_ptr. */
+ if (has_width && p - tmp < width)
+ {
+ size_t pad = width - (p - tmp);
+ DCHAR_T *end = p + pad;
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > tmp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+
+ p = end;
+ }
+
+ {
+ size_t count = p - tmp;
+
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+
+ /* Make room for the result. */
+ if (count >= allocated - length)
+ {
+ size_t n = xsum (length, count);
+
+ ENSURE_ALLOCATION (n);
+ }
+
+ /* Append the result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+ if (tmp != tmpbuf)
+ free (tmp);
+ length += count;
+ }
+ }
+#endif
+ else
+ {
+ arg_type type = a.arg[dp->arg_index].type;
+ int flags = dp->flags;
+#if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ int has_width;
+ size_t width;
+#endif
+#if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+ int has_precision;
+ size_t precision;
+#endif
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ int prec_ourselves;
+#else
+# define prec_ourselves 0
+#endif
+#if NEED_PRINTF_FLAG_LEFTADJUST
+# define pad_ourselves 1
+#elif !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ int pad_ourselves;
+#else
+# define pad_ourselves 0
+#endif
+ TCHAR_T *fbp;
+ unsigned int prefix_count;
+ int prefixes[2] IF_LINT (= { 0 });
+#if !USE_SNPRINTF
+ size_t tmp_length;
+ TCHAR_T tmpbuf[700];
+ TCHAR_T *tmp;
+#endif
+
+#if !USE_SNPRINTF || !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ has_width = 0;
+ width = 0;
+ if (dp->width_start != dp->width_end)
+ {
+ if (dp->width_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->width_arg_index].a.a_int;
+ if (arg < 0)
+ {
+ /* "A negative field width is taken as a '-' flag
+ followed by a positive field width." */
+ flags |= FLAG_LEFT;
+ width = (unsigned int) (-arg);
+ }
+ else
+ width = arg;
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->width_start;
+
+ do
+ width = xsum (xtimes (width, 10), *digitp++ - '0');
+ while (digitp != dp->width_end);
+ }
+ has_width = 1;
+ }
+#endif
+
+#if !USE_SNPRINTF || NEED_PRINTF_UNBOUNDED_PRECISION
+ has_precision = 0;
+ precision = 6;
+ if (dp->precision_start != dp->precision_end)
+ {
+ if (dp->precision_arg_index != ARG_NONE)
+ {
+ int arg;
+
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ arg = a.arg[dp->precision_arg_index].a.a_int;
+ /* "A negative precision is taken as if the precision
+ were omitted." */
+ if (arg >= 0)
+ {
+ precision = arg;
+ has_precision = 1;
+ }
+ }
+ else
+ {
+ const FCHAR_T *digitp = dp->precision_start + 1;
+
+ precision = 0;
+ while (digitp != dp->precision_end)
+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
+ has_precision = 1;
+ }
+ }
+#endif
+
+ /* Decide whether to handle the precision ourselves. */
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ switch (dp->conversion)
+ {
+ case 'd': case 'i': case 'u':
+ case 'o':
+ case 'x': case 'X': case 'p':
+ prec_ourselves = has_precision && (precision > 0);
+ break;
+ default:
+ prec_ourselves = 0;
+ break;
+ }
+#endif
+
+ /* Decide whether to perform the padding ourselves. */
+#if !NEED_PRINTF_FLAG_LEFTADJUST && (!DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION)
+ switch (dp->conversion)
+ {
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+ /* If we need conversion from TCHAR_T[] to DCHAR_T[], we need
+ to perform the padding after this conversion. Functions
+ with unistdio extensions perform the padding based on
+ character count rather than element count. */
+ case 'c': case 's':
+# endif
+# if NEED_PRINTF_FLAG_ZERO
+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
+ case 'a': case 'A':
+# endif
+ pad_ourselves = 1;
+ break;
+ default:
+ pad_ourselves = prec_ourselves;
+ break;
+ }
+#endif
+
+#if !USE_SNPRINTF
+ /* Allocate a temporary buffer of sufficient size for calling
+ sprintf. */
+ {
+ switch (dp->conversion)
+ {
+
+ case 'd': case 'i': case 'u':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.30103 /* binary -> decimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Multiply by 2, as an estimate for FLAG_GROUP. */
+ tmp_length = xsum (tmp_length, tmp_length);
+ /* Add 1, to account for a leading sign. */
+ tmp_length = xsum (tmp_length, 1);
+ break;
+
+ case 'o':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.333334 /* binary -> octal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 1, to account for a leading sign. */
+ tmp_length = xsum (tmp_length, 1);
+ break;
+
+ case 'x': case 'X':
+# if HAVE_LONG_LONG_INT
+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+# endif
+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
+ tmp_length =
+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Add 2, to account for a leading sign or alternate form. */
+ tmp_length = xsum (tmp_length, 2);
+ break;
+
+ case 'f': case 'F':
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) (LDBL_MAX_EXP
+ * 0.30103 /* binary -> decimal */
+ * 2 /* estimate for FLAG_GROUP */
+ )
+ + 1 /* turn floor into ceil */
+ + 10; /* sign, decimal point etc. */
+ else
+ tmp_length =
+ (unsigned int) (DBL_MAX_EXP
+ * 0.30103 /* binary -> decimal */
+ * 2 /* estimate for FLAG_GROUP */
+ )
+ + 1 /* turn floor into ceil */
+ + 10; /* sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, precision);
+ break;
+
+ case 'e': case 'E': case 'g': case 'G':
+ tmp_length =
+ 12; /* sign, decimal point, exponent etc. */
+ tmp_length = xsum (tmp_length, precision);
+ break;
+
+ case 'a': case 'A':
+ if (type == TYPE_LONGDOUBLE)
+ tmp_length =
+ (unsigned int) (LDBL_DIG
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ else
+ tmp_length =
+ (unsigned int) (DBL_DIG
+ * 0.831 /* decimal -> hexadecimal */
+ )
+ + 1; /* turn floor into ceil */
+ if (tmp_length < precision)
+ tmp_length = precision;
+ /* Account for sign, decimal point etc. */
+ tmp_length = xsum (tmp_length, 12);
+ break;
+
+ case 'c':
+# if HAVE_WINT_T && !WIDE_CHAR_VERSION
+ if (type == TYPE_WIDE_CHAR)
+ tmp_length = MB_CUR_MAX;
+ else
+# endif
+ tmp_length = 1;
+ break;
+
+ case 's':
+# if HAVE_WCHAR_T
+ if (type == TYPE_WIDE_STRING)
+ {
+# if WIDE_CHAR_VERSION
+ /* ISO C says about %ls in fwprintf:
+ "If the precision is not specified or is greater
+ than the size of the array, the array shall
+ contain a null wide character."
+ So if there is a precision, we must not use
+ wcslen. */
+ const wchar_t *arg =
+ a.arg[dp->arg_index].a.a_wide_string;
+
+ if (has_precision)
+ tmp_length = local_wcsnlen (arg, precision);
+ else
+ tmp_length = local_wcslen (arg);
+# else
+ /* ISO C says about %ls in fprintf:
+ "If a precision is specified, no more than that
+ many bytes are written (including shift
+ sequences, if any), and the array shall contain
+ a null wide character if, to equal the
+ multibyte character sequence length given by
+ the precision, the function would need to
+ access a wide character one past the end of the
+ array."
+ So if there is a precision, we must not use
+ wcslen. */
+ /* This case has already been handled above. */
+ abort ();
+# endif
+ }
+ else
+# endif
+ {
+# if WIDE_CHAR_VERSION
+ /* ISO C says about %s in fwprintf:
+ "If the precision is not specified or is greater
+ than the size of the converted array, the
+ converted array shall contain a null wide
+ character."
+ So if there is a precision, we must not use
+ strlen. */
+ /* This case has already been handled above. */
+ abort ();
+# else
+ /* ISO C says about %s in fprintf:
+ "If the precision is not specified or greater
+ than the size of the array, the array shall
+ contain a null character."
+ So if there is a precision, we must not use
+ strlen. */
+ const char *arg = a.arg[dp->arg_index].a.a_string;
+
+ if (has_precision)
+ tmp_length = local_strnlen (arg, precision);
+ else
+ tmp_length = strlen (arg);
+# endif
+ }
+ break;
+
+ case 'p':
+ tmp_length =
+ (unsigned int) (sizeof (void *) * CHAR_BIT
+ * 0.25 /* binary -> hexadecimal */
+ )
+ + 1 /* turn floor into ceil */
+ + 2; /* account for leading 0x */
+ break;
+
+ default:
+ abort ();
+ }
+
+ if (!pad_ourselves)
+ {
+# if ENABLE_UNISTDIO
+ /* Padding considers the number of characters, therefore
+ the number of elements after padding may be
+ > max (tmp_length, width)
+ but is certainly
+ <= tmp_length + width. */
+ tmp_length = xsum (tmp_length, width);
+# else
+ /* Padding considers the number of elements,
+ says POSIX. */
+ if (tmp_length < width)
+ tmp_length = width;
+# endif
+ }
+
+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
+ }
+
+ if (tmp_length <= sizeof (tmpbuf) / sizeof (TCHAR_T))
+ tmp = tmpbuf;
+ else
+ {
+ size_t tmp_memsize = xtimes (tmp_length, sizeof (TCHAR_T));
+
+ if (size_overflow_p (tmp_memsize))
+ /* Overflow, would lead to out of memory. */
+ goto out_of_memory;
+ tmp = (TCHAR_T *) malloc (tmp_memsize);
+ if (tmp == NULL)
+ /* Out of memory. */
+ goto out_of_memory;
+ }
+#endif
+
+ /* Construct the format string for calling snprintf or
+ sprintf. */
+ fbp = buf;
+ *fbp++ = '%';
+#if NEED_PRINTF_FLAG_GROUPING
+ /* The underlying implementation doesn't support the ' flag.
+ Produce no grouping characters in this case; this is
+ acceptable because the grouping is locale dependent. */
+#else
+ if (flags & FLAG_GROUP)
+ *fbp++ = '\'';
+#endif
+ if (flags & FLAG_LEFT)
+ *fbp++ = '-';
+ if (flags & FLAG_SHOWSIGN)
+ *fbp++ = '+';
+ if (flags & FLAG_SPACE)
+ *fbp++ = ' ';
+ if (flags & FLAG_ALT)
+ *fbp++ = '#';
+ if (!pad_ourselves)
+ {
+ if (flags & FLAG_ZERO)
+ *fbp++ = '0';
+ if (dp->width_start != dp->width_end)
+ {
+ size_t n = dp->width_end - dp->width_start;
+ /* The width specification is known to consist only
+ of standard ASCII characters. */
+ if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+ {
+ memcpy (fbp, dp->width_start, n * sizeof (TCHAR_T));
+ fbp += n;
+ }
+ else
+ {
+ const FCHAR_T *mp = dp->width_start;
+ do
+ *fbp++ = (unsigned char) *mp++;
+ while (--n > 0);
+ }
+ }
+ }
+ if (!prec_ourselves)
+ {
+ if (dp->precision_start != dp->precision_end)
+ {
+ size_t n = dp->precision_end - dp->precision_start;
+ /* The precision specification is known to consist only
+ of standard ASCII characters. */
+ if (sizeof (FCHAR_T) == sizeof (TCHAR_T))
+ {
+ memcpy (fbp, dp->precision_start, n * sizeof (TCHAR_T));
+ fbp += n;
+ }
+ else
+ {
+ const FCHAR_T *mp = dp->precision_start;
+ do
+ *fbp++ = (unsigned char) *mp++;
+ while (--n > 0);
+ }
+ }
+ }
+
+ switch (type)
+ {
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ case TYPE_ULONGLONGINT:
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ *fbp++ = 'I';
+ *fbp++ = '6';
+ *fbp++ = '4';
+ break;
+# else
+ *fbp++ = 'l';
+ /*FALLTHROUGH*/
+# endif
+#endif
+ case TYPE_LONGINT:
+ case TYPE_ULONGINT:
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+#endif
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+#endif
+ *fbp++ = 'l';
+ break;
+ case TYPE_LONGDOUBLE:
+ *fbp++ = 'L';
+ break;
+ default:
+ break;
+ }
+#if NEED_PRINTF_DIRECTIVE_F
+ if (dp->conversion == 'F')
+ *fbp = 'f';
+ else
+#endif
+ *fbp = dp->conversion;
+#if USE_SNPRINTF
+# if !(__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+ fbp[1] = '%';
+ fbp[2] = 'n';
+ fbp[3] = '\0';
+# else
+ /* On glibc2 systems from glibc >= 2.3 - probably also older
+ ones - we know that snprintf's returns value conforms to
+ ISO C 99: the gl_SNPRINTF_DIRECTIVE_N test passes.
+ Therefore we can avoid using %n in this situation.
+ On glibc2 systems from 2004-10-18 or newer, the use of %n
+ in format strings in writable memory may crash the program
+ (if compiled with _FORTIFY_SOURCE=2), so we should avoid it
+ in this situation. */
+ /* On native Win32 systems (such as mingw), we can avoid using
+ %n because:
+ - Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
+ snprintf does not write more than the specified number
+ of bytes. (snprintf (buf, 3, "%d %d", 4567, 89) writes
+ '4', '5', '6' into buf, not '4', '5', '\0'.)
+ - Although the gl_SNPRINTF_RETVAL_C99 test fails, snprintf
+ allows us to recognize the case of an insufficient
+ buffer size: it returns -1 in this case.
+ On native Win32 systems (such as mingw) where the OS is
+ Windows Vista, the use of %n in format strings by default
+ crashes the program. See
+ <http://gcc.gnu.org/ml/gcc/2007-06/msg00122.html> and
+ <http://msdn2.microsoft.com/en-us/library/ms175782(VS.80).aspx>
+ So we should avoid %n in this situation. */
+ fbp[1] = '\0';
+# endif
+#else
+ fbp[1] = '\0';
+#endif
+
+ /* Construct the arguments for calling snprintf or sprintf. */
+ prefix_count = 0;
+ if (!pad_ourselves && dp->width_arg_index != ARG_NONE)
+ {
+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
+ abort ();
+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
+ }
+ if (!prec_ourselves && dp->precision_arg_index != ARG_NONE)
+ {
+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
+ abort ();
+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
+ }
+
+#if USE_SNPRINTF
+ /* The SNPRINTF result is appended after result[0..length].
+ The latter is an array of DCHAR_T; SNPRINTF appends an
+ array of TCHAR_T to it. This is possible because
+ sizeof (TCHAR_T) divides sizeof (DCHAR_T) and
+ alignof (TCHAR_T) <= alignof (DCHAR_T). */
+# define TCHARS_PER_DCHAR (sizeof (DCHAR_T) / sizeof (TCHAR_T))
+ /* Ensure that maxlen below will be >= 2. Needed on BeOS,
+ where an snprintf() with maxlen==1 acts like sprintf(). */
+ ENSURE_ALLOCATION (xsum (length,
+ (2 + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR));
+ /* Prepare checking whether snprintf returns the count
+ via %n. */
+ *(TCHAR_T *) (result + length) = '\0';
+#endif
+
+ for (;;)
+ {
+ int count = -1;
+
+#if USE_SNPRINTF
+ int retcount = 0;
+ size_t maxlen = allocated - length;
+ /* SNPRINTF can fail if its second argument is
+ > INT_MAX. */
+ if (maxlen > INT_MAX / TCHARS_PER_DCHAR)
+ maxlen = INT_MAX / TCHARS_PER_DCHAR;
+ maxlen = maxlen * TCHARS_PER_DCHAR;
+# define SNPRINTF_BUF(arg) \
+ switch (prefix_count) \
+ { \
+ case 0: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ arg, &count); \
+ break; \
+ case 1: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ prefixes[0], arg, &count); \
+ break; \
+ case 2: \
+ retcount = SNPRINTF ((TCHAR_T *) (result + length), \
+ maxlen, buf, \
+ prefixes[0], prefixes[1], arg, \
+ &count); \
+ break; \
+ default: \
+ abort (); \
+ }
+#else
+# define SNPRINTF_BUF(arg) \
+ switch (prefix_count) \
+ { \
+ case 0: \
+ count = sprintf (tmp, buf, arg); \
+ break; \
+ case 1: \
+ count = sprintf (tmp, buf, prefixes[0], arg); \
+ break; \
+ case 2: \
+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
+ arg); \
+ break; \
+ default: \
+ abort (); \
+ }
+#endif
+
+ switch (type)
+ {
+ case TYPE_SCHAR:
+ {
+ int arg = a.arg[dp->arg_index].a.a_schar;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UCHAR:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_SHORT:
+ {
+ int arg = a.arg[dp->arg_index].a.a_short;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_USHORT:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_INT:
+ {
+ int arg = a.arg[dp->arg_index].a.a_int;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_UINT:
+ {
+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_LONGINT:
+ {
+ long int arg = a.arg[dp->arg_index].a.a_longint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_ULONGINT:
+ {
+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_LONG_LONG_INT
+ case TYPE_LONGLONGINT:
+ {
+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_ULONGLONGINT:
+ {
+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_DOUBLE:
+ {
+ double arg = a.arg[dp->arg_index].a.a_double;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_LONGDOUBLE:
+ {
+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ case TYPE_CHAR:
+ {
+ int arg = a.arg[dp->arg_index].a.a_char;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_WINT_T
+ case TYPE_WIDE_CHAR:
+ {
+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_STRING:
+ {
+ const char *arg = a.arg[dp->arg_index].a.a_string;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#if HAVE_WCHAR_T
+ case TYPE_WIDE_STRING:
+ {
+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+#endif
+ case TYPE_POINTER:
+ {
+ void *arg = a.arg[dp->arg_index].a.a_pointer;
+ SNPRINTF_BUF (arg);
+ }
+ break;
+ default:
+ abort ();
+ }
+
+#if USE_SNPRINTF
+ /* Portability: Not all implementations of snprintf()
+ are ISO C 99 compliant. Determine the number of
+ bytes that snprintf() has produced or would have
+ produced. */
+ if (count >= 0)
+ {
+ /* Verify that snprintf() has NUL-terminated its
+ result. */
+ if (count < maxlen
+ && ((TCHAR_T *) (result + length)) [count] != '\0')
+ abort ();
+ /* Portability hack. */
+ if (retcount > count)
+ count = retcount;
+ }
+ else
+ {
+ /* snprintf() doesn't understand the '%n'
+ directive. */
+ if (fbp[1] != '\0')
+ {
+ /* Don't use the '%n' directive; instead, look
+ at the snprintf() return value. */
+ fbp[1] = '\0';
+ continue;
+ }
+ else
+ {
+ /* Look at the snprintf() return value. */
+ if (retcount < 0)
+ {
+ /* HP-UX 10.20 snprintf() is doubly deficient:
+ It doesn't understand the '%n' directive,
+ *and* it returns -1 (rather than the length
+ that would have been required) when the
+ buffer is too small. */
+ size_t bigger_need =
+ xsum (xtimes (allocated, 2), 12);
+ ENSURE_ALLOCATION (bigger_need);
+ continue;
+ }
+ else
+ count = retcount;
+ }
+ }
+#endif
+
+ /* Attempt to handle failure. */
+ if (count < 0)
+ {
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EINVAL;
+ return NULL;
+ }
+
+#if USE_SNPRINTF
+ /* Handle overflow of the allocated buffer.
+ If such an overflow occurs, a C99 compliant snprintf()
+ returns a count >= maxlen. However, a non-compliant
+ snprintf() function returns only count = maxlen - 1. To
+ cover both cases, test whether count >= maxlen - 1. */
+ if ((unsigned int) count + 1 >= maxlen)
+ {
+ /* If maxlen already has attained its allowed maximum,
+ allocating more memory will not increase maxlen.
+ Instead of looping, bail out. */
+ if (maxlen == INT_MAX / TCHARS_PER_DCHAR)
+ goto overflow;
+ else
+ {
+ /* Need at least (count + 1) * sizeof (TCHAR_T)
+ bytes. (The +1 is for the trailing NUL.)
+ But ask for (count + 2) * sizeof (TCHAR_T)
+ bytes, so that in the next round, we likely get
+ maxlen > (unsigned int) count + 1
+ and so we don't get here again.
+ And allocate proportionally, to avoid looping
+ eternally if snprintf() reports a too small
+ count. */
+ size_t n =
+ xmax (xsum (length,
+ ((unsigned int) count + 2
+ + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR),
+ xtimes (allocated, 2));
+
+ ENSURE_ALLOCATION (n);
+ continue;
+ }
+ }
+#endif
+
+#if NEED_PRINTF_UNBOUNDED_PRECISION
+ if (prec_ourselves)
+ {
+ /* Handle the precision. */
+ TCHAR_T *prec_ptr =
+# if USE_SNPRINTF
+ (TCHAR_T *) (result + length);
+# else
+ tmp;
+# endif
+ size_t prefix_count;
+ size_t move;
+
+ prefix_count = 0;
+ /* Put the additional zeroes after the sign. */
+ if (count >= 1
+ && (*prec_ptr == '-' || *prec_ptr == '+'
+ || *prec_ptr == ' '))
+ prefix_count = 1;
+ /* Put the additional zeroes after the 0x prefix if
+ (flags & FLAG_ALT) || (dp->conversion == 'p'). */
+ else if (count >= 2
+ && prec_ptr[0] == '0'
+ && (prec_ptr[1] == 'x' || prec_ptr[1] == 'X'))
+ prefix_count = 2;
+
+ move = count - prefix_count;
+ if (precision > move)
+ {
+ /* Insert zeroes. */
+ size_t insert = precision - move;
+ TCHAR_T *prec_end;
+
+# if USE_SNPRINTF
+ size_t n =
+ xsum (length,
+ (count + insert + TCHARS_PER_DCHAR - 1)
+ / TCHARS_PER_DCHAR);
+ length += (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+ ENSURE_ALLOCATION (n);
+ length -= (count + TCHARS_PER_DCHAR - 1) / TCHARS_PER_DCHAR;
+ prec_ptr = (TCHAR_T *) (result + length);
+# endif
+
+ prec_end = prec_ptr + count;
+ prec_ptr += prefix_count;
+
+ while (prec_end > prec_ptr)
+ {
+ prec_end--;
+ prec_end[insert] = prec_end[0];
+ }
+
+ prec_end += insert;
+ do
+ *--prec_end = '0';
+ while (prec_end > prec_ptr);
+
+ count += insert;
+ }
+ }
+#endif
+
+#if !USE_SNPRINTF
+ if (count >= tmp_length)
+ /* tmp_length was incorrectly calculated - fix the
+ code above! */
+ abort ();
+#endif
+
+#if !DCHAR_IS_TCHAR
+ /* Convert from TCHAR_T[] to DCHAR_T[]. */
+ if (dp->conversion == 'c' || dp->conversion == 's')
+ {
+ /* type = TYPE_CHAR or TYPE_WIDE_CHAR or TYPE_STRING
+ TYPE_WIDE_STRING.
+ The result string is not certainly ASCII. */
+ const TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t tmpdst_len;
+ /* This code assumes that TCHAR_T is 'char'. */
+ typedef int TCHAR_T_verify
+ [2 * (sizeof (TCHAR_T) == 1) - 1];
+# if USE_SNPRINTF
+ tmpsrc = (TCHAR_T *) (result + length);
+# else
+ tmpsrc = tmp;
+# endif
+ tmpdst =
+ DCHAR_CONV_FROM_ENCODING (locale_charset (),
+ iconveh_question_mark,
+ tmpsrc, count,
+ NULL,
+ NULL, &tmpdst_len);
+ if (tmpdst == NULL)
+ {
+ int saved_errno = errno;
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = saved_errno;
+ return NULL;
+ }
+ ENSURE_ALLOCATION (xsum (length, tmpdst_len));
+ DCHAR_CPY (result + length, tmpdst, tmpdst_len);
+ free (tmpdst);
+ count = tmpdst_len;
+ }
+ else
+ {
+ /* The result string is ASCII.
+ Simple 1:1 conversion. */
+# if USE_SNPRINTF
+ /* If sizeof (DCHAR_T) == sizeof (TCHAR_T), it's a
+ no-op conversion, in-place on the array starting
+ at (result + length). */
+ if (sizeof (DCHAR_T) != sizeof (TCHAR_T))
+# endif
+ {
+ const TCHAR_T *tmpsrc;
+ DCHAR_T *tmpdst;
+ size_t n;
+
+# if USE_SNPRINTF
+ if (result == resultbuf)
+ {
+ tmpsrc = (TCHAR_T *) (result + length);
+ /* ENSURE_ALLOCATION will not move tmpsrc
+ (because it's part of resultbuf). */
+ ENSURE_ALLOCATION (xsum (length, count));
+ }
+ else
+ {
+ /* ENSURE_ALLOCATION will move the array
+ (because it uses realloc(). */
+ ENSURE_ALLOCATION (xsum (length, count));
+ tmpsrc = (TCHAR_T *) (result + length);
+ }
+# else
+ tmpsrc = tmp;
+ ENSURE_ALLOCATION (xsum (length, count));
+# endif
+ tmpdst = result + length;
+ /* Copy backwards, because of overlapping. */
+ tmpsrc += count;
+ tmpdst += count;
+ for (n = count; n > 0; n--)
+ *--tmpdst = (unsigned char) *--tmpsrc;
+ }
+ }
+#endif
+
+#if DCHAR_IS_TCHAR && !USE_SNPRINTF
+ /* Make room for the result. */
+ if (count > allocated - length)
+ {
+ /* Need at least count elements. But allocate
+ proportionally. */
+ size_t n =
+ xmax (xsum (length, count), xtimes (allocated, 2));
+
+ ENSURE_ALLOCATION (n);
+ }
+#endif
+
+ /* Here count <= allocated - length. */
+
+ /* Perform padding. */
+#if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO || NEED_PRINTF_FLAG_LEFTADJUST || NEED_PRINTF_FLAG_ZERO || NEED_PRINTF_UNBOUNDED_PRECISION
+ if (pad_ourselves && has_width)
+ {
+ size_t w;
+# if ENABLE_UNISTDIO
+ /* Outside POSIX, it's preferrable to compare the width
+ against the number of _characters_ of the converted
+ value. */
+ w = DCHAR_MBSNLEN (result + length, count);
+# else
+ /* The width is compared against the number of _bytes_
+ of the converted value, says POSIX. */
+ w = count;
+# endif
+ if (w < width)
+ {
+ size_t pad = width - w;
+
+ /* Make room for the result. */
+ if (xsum (count, pad) > allocated - length)
+ {
+ /* Need at least count + pad elements. But
+ allocate proportionally. */
+ size_t n =
+ xmax (xsum3 (length, count, pad),
+ xtimes (allocated, 2));
+
+# if USE_SNPRINTF
+ length += count;
+ ENSURE_ALLOCATION (n);
+ length -= count;
+# else
+ ENSURE_ALLOCATION (n);
+# endif
+ }
+ /* Here count + pad <= allocated - length. */
+
+ {
+# if !DCHAR_IS_TCHAR || USE_SNPRINTF
+ DCHAR_T * const rp = result + length;
+# else
+ DCHAR_T * const rp = tmp;
+# endif
+ DCHAR_T *p = rp + count;
+ DCHAR_T *end = p + pad;
+ DCHAR_T *pad_ptr;
+# if !DCHAR_IS_TCHAR || ENABLE_UNISTDIO
+ if (dp->conversion == 'c'
+ || dp->conversion == 's')
+ /* No zero-padding for string directives. */
+ pad_ptr = NULL;
+ else
+# endif
+ {
+ pad_ptr = (*rp == '-' ? rp + 1 : rp);
+ /* No zero-padding of "inf" and "nan". */
+ if ((*pad_ptr >= 'A' && *pad_ptr <= 'Z')
+ || (*pad_ptr >= 'a' && *pad_ptr <= 'z'))
+ pad_ptr = NULL;
+ }
+ /* The generated string now extends from rp to p,
+ with the zero padding insertion point being at
+ pad_ptr. */
+
+ count = count + pad; /* = end - rp */
+
+ if (flags & FLAG_LEFT)
+ {
+ /* Pad with spaces on the right. */
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ else if ((flags & FLAG_ZERO) && pad_ptr != NULL)
+ {
+ /* Pad with zeroes. */
+ DCHAR_T *q = end;
+
+ while (p > pad_ptr)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = '0';
+ }
+ else
+ {
+ /* Pad with spaces on the left. */
+ DCHAR_T *q = end;
+
+ while (p > rp)
+ *--q = *--p;
+ for (; pad > 0; pad--)
+ *p++ = ' ';
+ }
+ }
+ }
+ }
+#endif
+
+ /* Here still count <= allocated - length. */
+
+#if !DCHAR_IS_TCHAR || USE_SNPRINTF
+ /* The snprintf() result did fit. */
+#else
+ /* Append the sprintf() result. */
+ memcpy (result + length, tmp, count * sizeof (DCHAR_T));
+#endif
+#if !USE_SNPRINTF
+ if (tmp != tmpbuf)
+ free (tmp);
+#endif
+
+#if NEED_PRINTF_DIRECTIVE_F
+ if (dp->conversion == 'F')
+ {
+ /* Convert the %f result to upper case for %F. */
+ DCHAR_T *rp = result + length;
+ size_t rc;
+ for (rc = count; rc > 0; rc--, rp++)
+ if (*rp >= 'a' && *rp <= 'z')
+ *rp = *rp - 'a' + 'A';
+ }
+#endif
+
+ length += count;
+ break;
+ }
+ }
+ }
+ }
+
+ /* Add the final NUL. */
+ ENSURE_ALLOCATION (xsum (length, 1));
+ result[length] = '\0';
+
+ if (result != resultbuf && length + 1 < allocated)
+ {
+ /* Shrink the allocated memory if possible. */
+ DCHAR_T *memory;
+
+ memory = (DCHAR_T *) realloc (result, (length + 1) * sizeof (DCHAR_T));
+ if (memory != NULL)
+ result = memory;
+ }
+
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ *lengthp = length;
+ /* Note that we can produce a big string of a length > INT_MAX. POSIX
+ says that snprintf() fails with errno = EOVERFLOW in this case, but
+ that's only because snprintf() returns an 'int'. This function does
+ not have this limitation. */
+ return result;
+
+#if USE_SNPRINTF
+ overflow:
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ CLEANUP ();
+ errno = EOVERFLOW;
+ return NULL;
+#endif
+
+ out_of_memory:
+ if (!(result == resultbuf || result == NULL))
+ free (result);
+ if (buf_malloced != NULL)
+ free (buf_malloced);
+ out_of_memory_1:
+ CLEANUP ();
+ errno = ENOMEM;
+ return NULL;
+ }
+}
+
+#undef TCHARS_PER_DCHAR
+#undef SNPRINTF
+#undef USE_SNPRINTF
+#undef DCHAR_SET
+#undef DCHAR_CPY
+#undef PRINTF_PARSE
+#undef DIRECTIVES
+#undef DIRECTIVE
+#undef DCHAR_IS_TCHAR
+#undef TCHAR_T
+#undef DCHAR_T
+#undef FCHAR_T
+#undef VASNPRINTF
diff --git a/gnu/vasnprintf.h b/gnu/vasnprintf.h
new file mode 100755
index 00000000..a689bad2
--- /dev/null
+++ b/gnu/vasnprintf.h
@@ -0,0 +1,80 @@
+/* vsprintf with automatic memory allocation.
+ Copyright (C) 2002-2004, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _VASNPRINTF_H
+#define _VASNPRINTF_H
+
+/* Get va_list. */
+#include <stdarg.h>
+
+/* Get size_t. */
+#include <stddef.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc().
+ You can pass a preallocated buffer for the result in RESULTBUF and its
+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
+ If successful, return the address of the string (this may be = RESULTBUF
+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
+ number of resulting bytes, excluding the trailing NUL. Upon error, set
+ errno and return NULL.
+
+ When dynamic memory allocation occurs, the preallocated buffer is left
+ alone (with possibly modified contents). This makes it possible to use
+ a statically allocated or stack-allocated buffer, like this:
+
+ char buf[100];
+ size_t len = sizeof (buf);
+ char *output = vasnprintf (buf, &len, format, args);
+ if (output == NULL)
+ ... error handling ...;
+ else
+ {
+ ... use the output string ...;
+ if (output != buf)
+ free (output);
+ }
+ */
+#if REPLACE_VASNPRINTF
+# define asnprintf rpl_asnprintf
+# define vasnprintf rpl_vasnprintf
+#endif
+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 3, 4)));
+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _VASNPRINTF_H */
diff --git a/gnu/vasprintf.c b/gnu/vasprintf.c
new file mode 100755
index 00000000..46486f3d
--- /dev/null
+++ b/gnu/vasprintf.c
@@ -0,0 +1,51 @@
+/* Formatted output to strings.
+ Copyright (C) 1999, 2002, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#ifdef IN_LIBASPRINTF
+# include "vasprintf.h"
+#else
+# include <stdio.h>
+#endif
+
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+
+#include "vasnprintf.h"
+
+int
+vasprintf (char **resultp, const char *format, va_list args)
+{
+ size_t length;
+ char *result = vasnprintf (NULL, &length, format, args);
+ if (result == NULL)
+ return -1;
+
+ if (length > INT_MAX)
+ {
+ free (result);
+ errno = EOVERFLOW;
+ return -1;
+ }
+
+ *resultp = result;
+ /* Return the number of resulting bytes, excluding the trailing NUL. */
+ return length;
+}
diff --git a/gnu/verify.h b/gnu/verify.h
new file mode 100755
index 00000000..bcd3f5a0
--- /dev/null
+++ b/gnu/verify.h
@@ -0,0 +1,140 @@
+/* Compile-time assert-like macros.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Paul Eggert, Bruno Haible, and Jim Meyering. */
+
+#ifndef VERIFY_H
+# define VERIFY_H 1
+
+/* Each of these macros verifies that its argument R is nonzero. To
+ be portable, R should be an integer constant expression. Unlike
+ assert (R), there is no run-time overhead.
+
+ There are two macros, since no single macro can be used in all
+ contexts in C. verify_true (R) is for scalar contexts, including
+ integer constant expression contexts. verify (R) is for declaration
+ contexts, e.g., the top level.
+
+ Symbols ending in "__" are private to this header.
+
+ The code below uses several ideas.
+
+ * The first step is ((R) ? 1 : -1). Given an expression R, of
+ integral or boolean or floating-point type, this yields an
+ expression of integral type, whose value is later verified to be
+ constant and nonnegative.
+
+ * Next this expression W is wrapped in a type
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: W; }.
+ If W is negative, this yields a compile-time error. No compiler can
+ deal with a bit-field of negative size.
+
+ One might think that an array size check would have the same
+ effect, that is, that the type struct { unsigned int dummy[W]; }
+ would work as well. However, inside a function, some compilers
+ (such as C++ compilers and GNU C) allow local parameters and
+ variables inside array size expressions. With these compilers,
+ an array size check would not properly diagnose this misuse of
+ the verify macro:
+
+ void function (int n) { verify (n < 0); }
+
+ * For the verify macro, the struct verify_type__ will need to
+ somehow be embedded into a declaration. To be portable, this
+ declaration must declare an object, a constant, a function, or a
+ typedef name. If the declared entity uses the type directly,
+ such as in
+
+ struct dummy {...};
+ typedef struct {...} dummy;
+ extern struct {...} *dummy;
+ extern void dummy (struct {...} *);
+ extern struct {...} *dummy (void);
+
+ two uses of the verify macro would yield colliding declarations
+ if the entity names are not disambiguated. A workaround is to
+ attach the current line number to the entity name:
+
+ #define GL_CONCAT0(x, y) x##y
+ #define GL_CONCAT(x, y) GL_CONCAT0 (x, y)
+ extern struct {...} * GL_CONCAT(dummy,__LINE__);
+
+ But this has the problem that two invocations of verify from
+ within the same macro would collide, since the __LINE__ value
+ would be the same for both invocations.
+
+ A solution is to use the sizeof operator. It yields a number,
+ getting rid of the identity of the type. Declarations like
+
+ extern int dummy [sizeof (struct {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ can be repeated.
+
+ * Should the implementation use a named struct or an unnamed struct?
+ Which of the following alternatives can be used?
+
+ extern int dummy [sizeof (struct {...})];
+ extern int dummy [sizeof (struct verify_type__ {...})];
+ extern void dummy (int [sizeof (struct {...})]);
+ extern void dummy (int [sizeof (struct verify_type__ {...})]);
+ extern int (*dummy (void)) [sizeof (struct {...})];
+ extern int (*dummy (void)) [sizeof (struct verify_type__ {...})];
+
+ In the second and sixth case, the struct type is exported to the
+ outer scope; two such declarations therefore collide. GCC warns
+ about the first, third, and fourth cases. So the only remaining
+ possibility is the fifth case:
+
+ extern int (*dummy (void)) [sizeof (struct {...})];
+
+ * This implementation exploits the fact that GCC does not warn about
+ the last declaration mentioned above. If a future version of GCC
+ introduces a warning for this, the problem could be worked around
+ by using code specialized to GCC, e.g.,:
+
+ #if 4 <= __GNUC__
+ # define verify(R) \
+ extern int (* verify_function__ (void)) \
+ [__builtin_constant_p (R) && (R) ? 1 : -1]
+ #endif
+
+ * In C++, any struct definition inside sizeof is invalid.
+ Use a template type to work around the problem. */
+
+
+/* Verify requirement R at compile-time, as an integer constant expression.
+ Return 1. */
+
+# ifdef __cplusplus
+template <int w>
+ struct verify_type__ { unsigned int verify_error_if_negative_size__: w; };
+# define verify_true(R) \
+ (!!sizeof (verify_type__<(R) ? 1 : -1>))
+# else
+# define verify_true(R) \
+ (!!sizeof \
+ (struct { unsigned int verify_error_if_negative_size__: (R) ? 1 : -1; }))
+# endif
+
+/* Verify requirement R at compile-time, as a declaration without a
+ trailing ';'. */
+
+# define verify(R) extern int (* verify_function__ (void)) [verify_true (R)]
+
+#endif
diff --git a/gnu/verror.c b/gnu/verror.c
new file mode 100755
index 00000000..62b7fc46
--- /dev/null
+++ b/gnu/verror.c
@@ -0,0 +1,77 @@
+/* va_list error handler for noninteractive utilities
+ Copyright (C) 2006-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+#include "verror.h"
+#include "xvasprintf.h"
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#if ENABLE_NLS
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#ifndef _
+# define _(String) String
+#endif
+
+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ Use the globals error_print_progname and error_message_count similarly
+ to error(). */
+void
+verror (int status, int errnum, const char *format, va_list args)
+{
+ verror_at_line (status, errnum, NULL, 0, format, args);
+}
+
+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ If FNAME is not NULL, prepend the message with `FNAME:LINENO:'.
+ Use the globals error_print_progname, error_message_count, and
+ error_one_per_line similarly to error_at_line(). */
+void
+verror_at_line (int status, int errnum, const char *file,
+ unsigned int line_number, const char *format, va_list args)
+{
+ char *message = xvasprintf (format, args);
+ if (message)
+ {
+ /* Until http://sourceware.org/bugzilla/show_bug.cgi?id=2997 is fixed,
+ glibc violates GNU Coding Standards when the file argument to
+ error_at_line is NULL. */
+ if (file)
+ error_at_line (status, errnum, file, line_number, "%s", message);
+ else
+ error (status, errnum, "%s", message);
+ }
+ else
+ {
+ /* EOVERFLOW, EINVAL, and EILSEQ from xvasprintf are signs of
+ serious programmer errors. */
+ error (0, errno, _("unable to display error message"));
+ abort ();
+ }
+ free (message);
+}
diff --git a/gnu/verror.h b/gnu/verror.h
new file mode 100755
index 00000000..f0553e86
--- /dev/null
+++ b/gnu/verror.h
@@ -0,0 +1,53 @@
+/* Declaration for va_list error-reporting function
+ Copyright (C) 2006-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _VERROR_H
+#define _VERROR_H 1
+
+#include "error.h"
+#include <stdarg.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ Use the globals error_print_progname and error_message_count similarly
+ to error(). */
+
+extern void verror (int __status, int __errnum, const char *__format,
+ va_list __args)
+ __attribute__ ((__format__ (__printf__, 3, 0)));
+
+/* Print a message with `vfprintf (stderr, FORMAT, ARGS)';
+ if ERRNUM is nonzero, follow it with ": " and strerror (ERRNUM).
+ If STATUS is nonzero, terminate the program with `exit (STATUS)'.
+ If FNAME is not NULL, prepend the message with `FNAME:LINENO:'.
+ Use the globals error_print_progname, error_message_count, and
+ error_one_per_line similarly to error_at_line(). */
+
+extern void verror_at_line (int __status, int __errnum, const char *__fname,
+ unsigned int __lineno, const char *__format,
+ va_list __args)
+ __attribute__ ((__format__ (__printf__, 5, 0)));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* verror.h */
diff --git a/gnu/vfprintf.c b/gnu/vfprintf.c
new file mode 100755
index 00000000..5aa42d4f
--- /dev/null
+++ b/gnu/vfprintf.c
@@ -0,0 +1,74 @@
+/* Formatted output to a stream.
+ Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if 1
+# include <config.h>
+#endif
+
+/* Specification. */
+#include <stdio.h>
+
+#include <errno.h>
+#include <limits.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+#include "fseterr.h"
+#include "vasnprintf.h"
+
+/* Print formatted output to the stream FP.
+ Return string length of formatted string. On error, return a negative
+ value. */
+int
+vfprintf (FILE *fp, const char *format, va_list args)
+{
+ char buf[2000];
+ char *output;
+ size_t len;
+ size_t lenbuf = sizeof (buf);
+
+ output = vasnprintf (buf, &lenbuf, format, args);
+ len = lenbuf;
+
+ if (!output)
+ {
+ fseterr (fp);
+ return -1;
+ }
+
+ if (fwrite (output, 1, len, fp) < len)
+ {
+ if (output != buf)
+ {
+ int saved_errno = errno;
+ free (output);
+ errno = saved_errno;
+ }
+ return -1;
+ }
+
+ if (output != buf)
+ free (output);
+
+ if (len > INT_MAX)
+ {
+ errno = EOVERFLOW;
+ fseterr (fp);
+ return -1;
+ }
+
+ return len;
+}
diff --git a/gnu/vprintf.c b/gnu/vprintf.c
new file mode 100755
index 00000000..fae6f537
--- /dev/null
+++ b/gnu/vprintf.c
@@ -0,0 +1,33 @@
+/* Formatted output to a stream.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#if 1
+# include <config.h>
+#endif
+
+/* Specification. */
+#include <stdio.h>
+
+#include <stdarg.h>
+
+/* Print formatted output to standard output.
+ Return string length of formatted string. On error, return a negative
+ value. */
+int
+vprintf (const char *format, va_list args)
+{
+ return vfprintf (stdout, format, args);
+}
diff --git a/gnu/w32spawn.h b/gnu/w32spawn.h
new file mode 100755
index 00000000..6c748d06
--- /dev/null
+++ b/gnu/w32spawn.h
@@ -0,0 +1,212 @@
+/* Auxiliary functions for the creation of subprocesses. Native Woe32 API.
+ Copyright (C) 2001, 2003-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Get declarations of the Win32 API functions. */
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+/* Get _get_osfhandle() and _open_osfhandle(). */
+#include <io.h>
+
+#include <stdbool.h>
+#include <string.h>
+#include <unistd.h>
+#include <errno.h>
+
+#include "cloexec.h"
+#include "xalloc.h"
+
+/* Duplicates a file handle, making the copy uninheritable.
+ Returns -1 for a file handle that is equivalent to closed. */
+static int
+dup_noinherit (int fd)
+{
+ fd = dup_cloexec (fd);
+ if (fd < 0 && errno == EMFILE)
+ error (EXIT_FAILURE, errno, _("_open_osfhandle failed"));
+
+ return fd;
+}
+
+/* Returns a file descriptor equivalent to FD, except that the resulting file
+ descriptor is none of STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO.
+ FD must be open and non-inheritable. The result will be non-inheritable as
+ well.
+ If FD < 0, FD itself is returned. */
+static int
+fd_safer_noinherit (int fd)
+{
+ if (STDIN_FILENO <= fd && fd <= STDERR_FILENO)
+ {
+ /* The recursion depth is at most 3. */
+ int nfd = fd_safer_noinherit (dup_noinherit (fd));
+ int saved_errno = errno;
+ close (fd);
+ errno = saved_errno;
+ return nfd;
+ }
+ return fd;
+}
+
+/* Duplicates a file handle, making the copy uninheritable and ensuring the
+ result is none of STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO.
+ Returns -1 for a file handle that is equivalent to closed. */
+static int
+dup_safer_noinherit (int fd)
+{
+ return fd_safer_noinherit (dup_noinherit (fd));
+}
+
+/* Undoes the effect of TEMPFD = dup_safer_noinherit (ORIGFD); */
+static void
+undup_safer_noinherit (int tempfd, int origfd)
+{
+ if (tempfd >= 0)
+ {
+ if (dup2 (tempfd, origfd) < 0)
+ error (EXIT_FAILURE, errno, _("cannot restore fd %d: dup2 failed"),
+ origfd);
+ close (tempfd);
+ }
+ else
+ {
+ /* origfd was closed or open to no handle at all. Set it to a closed
+ state. This is (nearly) equivalent to the original state. */
+ close (origfd);
+ }
+}
+
+/* Prepares an argument vector before calling spawn().
+ Note that spawn() does not by itself call the command interpreter
+ (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") :
+ ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
+ GetVersionEx(&v);
+ v.dwPlatformId == VER_PLATFORM_WIN32_NT;
+ }) ? "cmd.exe" : "command.com").
+ Instead it simply concatenates the arguments, separated by ' ', and calls
+ CreateProcess(). We must quote the arguments since Win32 CreateProcess()
+ interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a
+ special way:
+ - Space and tab are interpreted as delimiters. They are not treated as
+ delimiters if they are surrounded by double quotes: "...".
+ - Unescaped double quotes are removed from the input. Their only effect is
+ that within double quotes, space and tab are treated like normal
+ characters.
+ - Backslashes not followed by double quotes are not special.
+ - But 2*n+1 backslashes followed by a double quote become
+ n backslashes followed by a double quote (n >= 0):
+ \" -> "
+ \\\" -> \"
+ \\\\\" -> \\"
+ */
+#define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+#define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037"
+static char **
+prepare_spawn (char **argv)
+{
+ size_t argc;
+ char **new_argv;
+ size_t i;
+
+ /* Count number of arguments. */
+ for (argc = 0; argv[argc] != NULL; argc++)
+ ;
+
+ /* Allocate new argument vector. */
+ new_argv = XNMALLOC (1 + argc + 1, char *);
+
+ /* Add an element upfront that can be used when argv[0] turns out to be a
+ script, not a program.
+ On Unix, this would be "/bin/sh". On native Windows, "sh" is actually
+ "sh.exe". We have to omit the directory part and rely on the search in
+ PATH, because the mingw "mount points" are not visible inside Win32
+ CreateProcess(). */
+ *new_argv++ = "sh.exe";
+
+ /* Put quoted arguments into the new argument vector. */
+ for (i = 0; i < argc; i++)
+ {
+ const char *string = argv[i];
+
+ if (string[0] == '\0')
+ new_argv[i] = xstrdup ("\"\"");
+ else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL)
+ {
+ bool quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL);
+ size_t length;
+ unsigned int backslashes;
+ const char *s;
+ char *quoted_string;
+ char *p;
+
+ length = 0;
+ backslashes = 0;
+ if (quote_around)
+ length++;
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ length += backslashes + 1;
+ length++;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ length += backslashes + 1;
+
+ quoted_string = (char *) xmalloc (length + 1);
+
+ p = quoted_string;
+ backslashes = 0;
+ if (quote_around)
+ *p++ = '"';
+ for (s = string; *s != '\0'; s++)
+ {
+ char c = *s;
+ if (c == '"')
+ {
+ unsigned int j;
+ for (j = backslashes + 1; j > 0; j--)
+ *p++ = '\\';
+ }
+ *p++ = c;
+ if (c == '\\')
+ backslashes++;
+ else
+ backslashes = 0;
+ }
+ if (quote_around)
+ {
+ unsigned int j;
+ for (j = backslashes; j > 0; j--)
+ *p++ = '\\';
+ *p++ = '"';
+ }
+ *p = '\0';
+
+ new_argv[i] = quoted_string;
+ }
+ else
+ new_argv[i] = (char *) string;
+ }
+ new_argv[argc] = NULL;
+
+ return new_argv;
+}
diff --git a/gnu/wait-process.c b/gnu/wait-process.c
new file mode 100755
index 00000000..987b0439
--- /dev/null
+++ b/gnu/wait-process.c
@@ -0,0 +1,361 @@
+/* Waiting for a subprocess to finish.
+ Copyright (C) 2001-2003, 2005-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+#include <config.h>
+
+/* Specification. */
+#include "wait-process.h"
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <signal.h>
+
+#include <sys/types.h>
+#include <sys/wait.h>
+
+#include "error.h"
+#include "fatal-signal.h"
+#include "xalloc.h"
+#include "gettext.h"
+
+#define _(str) gettext (str)
+
+#define SIZEOF(a) (sizeof(a) / sizeof(a[0]))
+
+
+#if defined _MSC_VER || defined __MINGW32__
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+
+/* The return value of spawnvp() is really a process handle as returned
+ by CreateProcess(). Therefore we can kill it using TerminateProcess. */
+#define kill(pid,sig) TerminateProcess ((HANDLE) (pid), sig)
+
+#endif
+
+
+/* Type of an entry in the slaves array.
+ The 'used' bit determines whether this entry is currently in use.
+ (If pid_t was an atomic type like sig_atomic_t, we could just set the
+ 'child' field to 0 when unregistering a slave process, and wouldn't need
+ the 'used' field.)
+ The 'used' and 'child' fields are accessed from within the cleanup_slaves()
+ action, therefore we mark them as 'volatile'. */
+typedef struct
+{
+ volatile sig_atomic_t used;
+ volatile pid_t child;
+}
+slaves_entry_t;
+
+/* The registered slave subprocesses. */
+static slaves_entry_t static_slaves[32];
+static slaves_entry_t * volatile slaves = static_slaves;
+static sig_atomic_t volatile slaves_count = 0;
+static size_t slaves_allocated = SIZEOF (static_slaves);
+
+/* The termination signal for slave subprocesses.
+ 2003-10-07: Terminator becomes Governator. */
+#ifdef SIGHUP
+# define TERMINATOR SIGHUP
+#else
+# define TERMINATOR SIGTERM
+#endif
+
+/* The cleanup action. It gets called asynchronously. */
+static void
+cleanup_slaves (void)
+{
+ for (;;)
+ {
+ /* Get the last registered slave. */
+ size_t n = slaves_count;
+ if (n == 0)
+ break;
+ n--;
+ slaves_count = n;
+ /* Skip unused entries in the slaves array. */
+ if (slaves[n].used)
+ {
+ pid_t slave = slaves[n].child;
+
+ /* Kill the slave. */
+ kill (slave, TERMINATOR);
+ }
+ }
+}
+
+/* Register a subprocess as being a slave process. This means that the
+ subprocess will be terminated when its creator receives a catchable fatal
+ signal or exits normally. Registration ends when wait_subprocess()
+ notices that the subprocess has exited. */
+void
+register_slave_subprocess (pid_t child)
+{
+ static bool cleanup_slaves_registered = false;
+ if (!cleanup_slaves_registered)
+ {
+ atexit (cleanup_slaves);
+ at_fatal_signal (cleanup_slaves);
+ cleanup_slaves_registered = true;
+ }
+
+ /* Try to store the new slave in an unused entry of the slaves array. */
+ {
+ slaves_entry_t *s = slaves;
+ slaves_entry_t *s_end = s + slaves_count;
+
+ for (; s < s_end; s++)
+ if (!s->used)
+ {
+ /* The two uses of 'volatile' in the slaves_entry_t type above
+ (and ISO C 99 section 5.1.2.3.(5)) ensure that we mark the
+ entry as used only after the child pid has been written to the
+ memory location s->child. */
+ s->child = child;
+ s->used = 1;
+ return;
+ }
+ }
+
+ if (slaves_count == slaves_allocated)
+ {
+ /* Extend the slaves array. Note that we cannot use xrealloc(),
+ because then the cleanup_slaves() function could access an already
+ deallocated array. */
+ slaves_entry_t *old_slaves = slaves;
+ size_t new_slaves_allocated = 2 * slaves_allocated;
+ slaves_entry_t *new_slaves =
+ (slaves_entry_t *)
+ malloc (new_slaves_allocated * sizeof (slaves_entry_t));
+ if (new_slaves == NULL)
+ {
+ /* xalloc_die() will call exit() which will invoke cleanup_slaves().
+ Additionally we need to kill child, because it's not yet among
+ the slaves list. */
+ kill (child, TERMINATOR);
+ xalloc_die ();
+ }
+ memcpy (new_slaves, old_slaves,
+ slaves_allocated * sizeof (slaves_entry_t));
+ slaves = new_slaves;
+ slaves_allocated = new_slaves_allocated;
+ /* Now we can free the old slaves array. */
+ if (old_slaves != static_slaves)
+ free (old_slaves);
+ }
+ /* The three uses of 'volatile' in the types above (and ISO C 99 section
+ 5.1.2.3.(5)) ensure that we increment the slaves_count only after the
+ new slave and its 'used' bit have been written to the memory locations
+ that make up slaves[slaves_count]. */
+ slaves[slaves_count].child = child;
+ slaves[slaves_count].used = 1;
+ slaves_count++;
+}
+
+/* Unregister a child from the list of slave subprocesses. */
+static inline void
+unregister_slave_subprocess (pid_t child)
+{
+ /* The easiest way to remove an entry from a list that can be used by
+ an asynchronous signal handler is just to mark it as unused. For this,
+ we rely on sig_atomic_t. */
+ slaves_entry_t *s = slaves;
+ slaves_entry_t *s_end = s + slaves_count;
+
+ for (; s < s_end; s++)
+ if (s->used && s->child == child)
+ s->used = 0;
+}
+
+
+/* Wait for a subprocess to finish. Return its exit code.
+ If it didn't terminate correctly, exit if exit_on_error is true, otherwise
+ return 127. */
+int
+wait_subprocess (pid_t child, const char *progname,
+ bool ignore_sigpipe, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int *termsigp)
+{
+#if HAVE_WAITID && defined WNOWAIT && 0
+ /* Commented out because waitid() without WEXITED and with WNOWAIT doesn't
+ work: On Solaris 7 and OSF/1 4.0, it returns -1 and sets errno = ECHILD,
+ and on HP-UX 10.20 it just hangs. */
+ /* Use of waitid() with WNOWAIT avoids a race condition: If slave_process is
+ true, and this process sleeps a very long time between the return from
+ waitpid() and the execution of unregister_slave_subprocess(), and
+ meanwhile another process acquires the same PID as child, and then - still
+ before unregister_slave_subprocess() - this process gets a fatal signal,
+ it would kill the other totally unrelated process. */
+ siginfo_t info;
+
+ if (termsigp != NULL)
+ *termsigp = 0;
+ for (;;)
+ {
+ if (waitid (P_PID, child, &info, WEXITED | (slave_process ? WNOWAIT : 0))
+ < 0)
+ {
+# ifdef EINTR
+ if (errno == EINTR)
+ continue;
+# endif
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, errno,
+ _("%s subprocess"), progname);
+ return 127;
+ }
+
+ /* info.si_code is set to one of CLD_EXITED, CLD_KILLED, CLD_DUMPED,
+ CLD_TRAPPED, CLD_STOPPED, CLD_CONTINUED. Loop until the program
+ terminates. */
+ if (info.si_code == CLD_EXITED
+ || info.si_code == CLD_KILLED || info.si_code == CLD_DUMPED)
+ break;
+ }
+
+ /* The child process has exited or was signalled. */
+
+ if (slave_process)
+ {
+ /* Unregister the child from the list of slave subprocesses, so that
+ later, when we exit, we don't kill a totally unrelated process which
+ may have acquired the same pid. */
+ unregister_slave_subprocess (child);
+
+ /* Now remove the zombie from the process list. */
+ for (;;)
+ {
+ if (waitid (P_PID, child, &info, WEXITED) < 0)
+ {
+# ifdef EINTR
+ if (errno == EINTR)
+ continue;
+# endif
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, errno,
+ _("%s subprocess"), progname);
+ return 127;
+ }
+ break;
+ }
+ }
+
+ switch (info.si_code)
+ {
+ case CLD_KILLED:
+ case CLD_DUMPED:
+ if (termsigp != NULL)
+ *termsigp = info.si_status; /* TODO: or info.si_signo? */
+# ifdef SIGPIPE
+ if (info.si_status == SIGPIPE && ignore_sigpipe)
+ return 0;
+# endif
+ if (exit_on_error || (!null_stderr && termsigp == NULL))
+ error (exit_on_error ? EXIT_FAILURE : 0, 0,
+ _("%s subprocess got fatal signal %d"),
+ progname, info.si_status);
+ return 127;
+ case CLD_EXITED:
+ if (info.si_status == 127)
+ {
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, 0,
+ _("%s subprocess failed"), progname);
+ return 127;
+ }
+ return info.si_status;
+ default:
+ abort ();
+ }
+#else
+ /* waitpid() is just as portable as wait() nowadays. */
+ int status;
+
+ if (termsigp != NULL)
+ *termsigp = 0;
+ status = 0;
+ for (;;)
+ {
+ int result = waitpid (child, &status, 0);
+
+ if (result != child)
+ {
+# ifdef EINTR
+ if (errno == EINTR)
+ continue;
+# endif
+# if 0 /* defined ECHILD */
+ if (errno == ECHILD)
+ {
+ /* Child process nonexistent?! Assume it terminated
+ successfully. */
+ status = 0;
+ break;
+ }
+# endif
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, errno,
+ _("%s subprocess"), progname);
+ return 127;
+ }
+
+ /* One of WIFSIGNALED (status), WIFEXITED (status), WIFSTOPPED (status)
+ must always be true, since we did not specify WCONTINUED in the
+ waitpid() call. Loop until the program terminates. */
+ if (!WIFSTOPPED (status))
+ break;
+ }
+
+ /* The child process has exited or was signalled. */
+
+ if (slave_process)
+ /* Unregister the child from the list of slave subprocesses, so that
+ later, when we exit, we don't kill a totally unrelated process which
+ may have acquired the same pid. */
+ unregister_slave_subprocess (child);
+
+ if (WIFSIGNALED (status))
+ {
+ if (termsigp != NULL)
+ *termsigp = WTERMSIG (status);
+# ifdef SIGPIPE
+ if (WTERMSIG (status) == SIGPIPE && ignore_sigpipe)
+ return 0;
+# endif
+ if (exit_on_error || (!null_stderr && termsigp == NULL))
+ error (exit_on_error ? EXIT_FAILURE : 0, 0,
+ _("%s subprocess got fatal signal %d"),
+ progname, (int) WTERMSIG (status));
+ return 127;
+ }
+ if (!WIFEXITED (status))
+ abort ();
+ if (WEXITSTATUS (status) == 127)
+ {
+ if (exit_on_error || !null_stderr)
+ error (exit_on_error ? EXIT_FAILURE : 0, 0,
+ _("%s subprocess failed"), progname);
+ return 127;
+ }
+ return WEXITSTATUS (status);
+#endif
+}
diff --git a/gnu/wait-process.h b/gnu/wait-process.h
new file mode 100755
index 00000000..56984585
--- /dev/null
+++ b/gnu/wait-process.h
@@ -0,0 +1,74 @@
+/* Waiting for a subprocess to finish.
+ Copyright (C) 2001-2003, 2006, 2008-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <haible@clisp.cons.org>, 2001.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _WAIT_PROCESS_H
+#define _WAIT_PROCESS_H
+
+/* Get pid_t. */
+#include <stdlib.h>
+#include <unistd.h>
+#include <sys/types.h>
+
+#include <stdbool.h>
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Wait for a subprocess to finish. Return its exit code.
+ If it didn't terminate correctly, exit if exit_on_error is true, otherwise
+ return 127.
+ Arguments:
+ - child is the pid of the subprocess.
+ - progname is the name of the program executed by the subprocess, used for
+ error messages.
+ - If ignore_sigpipe is true, consider a subprocess termination due to
+ SIGPIPE as equivalent to a success. This is suitable for processes whose
+ only purpose is to write to standard output. This flag can be safely set
+ to false when the process' standard output is known to go to DEV_NULL.
+ - If null_stderr is true, the usual error message to stderr will be omitted.
+ This is suitable when the subprocess does not fulfill an important task.
+ - slave_process should be set to true if the process has been launched as a
+ slave process.
+ - If exit_on_error is true, any error will cause the main process to exit
+ with an error status.
+ - If termsigp is not NULL: *termsig will be set to the signal that
+ terminated the subprocess (if supported by the platform: not on native
+ Windows platforms), otherwise 0, and the error message about the signal
+ that terminated the subprocess will be omitted.
+ Prerequisites: The signal handler for SIGCHLD should not be set to SIG_IGN,
+ otherwise this function will not work. */
+extern int wait_subprocess (pid_t child, const char *progname,
+ bool ignore_sigpipe, bool null_stderr,
+ bool slave_process, bool exit_on_error,
+ int *termsigp);
+
+/* Register a subprocess as being a slave process. This means that the
+ subprocess will be terminated when its creator receives a catchable fatal
+ signal or exits normally. Registration ends when wait_subprocess()
+ notices that the subprocess has exited. */
+extern void register_slave_subprocess (pid_t child);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _WAIT_PROCESS_H */
diff --git a/gnu/wchar.in.h b/gnu/wchar.in.h
new file mode 100755
index 00000000..6342b4e1
--- /dev/null
+++ b/gnu/wchar.in.h
@@ -0,0 +1,319 @@
+/* A substitute for ISO C99 <wchar.h>, for platforms that have issues.
+
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+/*
+ * ISO C 99 <wchar.h> for platforms that have issues.
+ * <http://www.opengroup.org/susv3xbd/wchar.h.html>
+ *
+ * For now, this just ensures proper prerequisite inclusion order and
+ * the declaration of wcwidth().
+ */
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if defined __need_mbstate_t || defined __need_wint_t || (defined __hpux && ((defined _INTTYPES_INCLUDED && !defined strtoimax) || defined _GL_JUST_INCLUDE_SYSTEM_WCHAR_H)) || defined _GL_ALREADY_INCLUDING_WCHAR_H
+/* Special invocation convention:
+ - Inside glibc and uClibc header files.
+ - On HP-UX 11.00 we have a sequence of nested includes
+ <wchar.h> -> <stdlib.h> -> <stdint.h>, and the latter includes <wchar.h>,
+ once indirectly <stdint.h> -> <sys/types.h> -> <inttypes.h> -> <wchar.h>
+ and once directly. In both situations 'wint_t' is not yet defined,
+ therefore we cannot provide the function overrides; instead include only
+ the system's <wchar.h>.
+ - On IRIX 6.5, similarly, we have an include <wchar.h> -> <wctype.h>, and
+ the latter includes <wchar.h>. But here, we have no way to detect whether
+ <wctype.h> is completely included or is still being included. */
+
+#@INCLUDE_NEXT@ @NEXT_WCHAR_H@
+
+#else
+/* Normal invocation convention. */
+
+#ifndef _GL_WCHAR_H
+
+#define _GL_ALREADY_INCLUDING_WCHAR_H
+
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>.
+ But avoid namespace pollution on glibc systems. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+
+/* Include the original <wchar.h> if it exists.
+ Some builds of uClibc lack it. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCHAR_H@
+# @INCLUDE_NEXT@ @NEXT_WCHAR_H@
+#endif
+
+#undef _GL_ALREADY_INCLUDING_WCHAR_H
+
+#ifndef _GL_WCHAR_H
+#define _GL_WCHAR_H
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+/* The definition of _GL_WARN_ON_USE is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* Define wint_t. (Also done in wctype.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#endif
+
+
+/* Override mbstate_t if it is too small.
+ On IRIX 6.5, sizeof (mbstate_t) == 1, which is not sufficient for
+ implementing mbrtowc for encodings like UTF-8. */
+#if !(@HAVE_MBSINIT@ && @HAVE_MBRTOWC@) || @REPLACE_MBSTATE_T@
+typedef int rpl_mbstate_t;
+# undef mbstate_t
+# define mbstate_t rpl_mbstate_t
+# define GNULIB_defined_mbstate_t 1
+#endif
+
+
+/* Convert a single-byte character to a wide character. */
+#if @GNULIB_BTOWC@
+# if @REPLACE_BTOWC@
+# undef btowc
+# define btowc rpl_btowc
+# endif
+# if !@HAVE_BTOWC@ || @REPLACE_BTOWC@
+extern wint_t btowc (int c);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef btowc
+# if HAVE_RAW_DECL_BTOWC
+_GL_WARN_ON_USE (btowc, "btowc is unportable - "
+ "use gnulib module btowc for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a single-byte character. */
+#if @GNULIB_WCTOB@
+# if @REPLACE_WCTOB@
+# undef wctob
+# define wctob rpl_wctob
+# endif
+# if (!defined wctob && !@HAVE_DECL_WCTOB@) || @REPLACE_WCTOB@
+/* wctob is provided by gnulib, or wctob exists but is not declared. */
+extern int wctob (wint_t wc);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wctob
+# if HAVE_RAW_DECL_WCTOB
+_GL_WARN_ON_USE (wctob, "wctob is unportable - "
+ "use gnulib module wctob for portability");
+# endif
+#endif
+
+
+/* Test whether *PS is in the initial state. */
+#if @GNULIB_MBSINIT@
+# if @REPLACE_MBSINIT@
+# undef mbsinit
+# define mbsinit rpl_mbsinit
+# endif
+# if !@HAVE_MBSINIT@ || @REPLACE_MBSINIT@
+extern int mbsinit (const mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsinit
+# if HAVE_RAW_DECL_MBSINIT
+_GL_WARN_ON_USE (mbsinit, "mbsinit is unportable - "
+ "use gnulib module mbsinit for portability");
+# endif
+#endif
+
+
+/* Convert a multibyte character to a wide character. */
+#if @GNULIB_MBRTOWC@
+# if @REPLACE_MBRTOWC@
+# undef mbrtowc
+# define mbrtowc rpl_mbrtowc
+# endif
+# if !@HAVE_MBRTOWC@ || @REPLACE_MBRTOWC@
+extern size_t mbrtowc (wchar_t *pwc, const char *s, size_t n, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbrtowc
+# if HAVE_RAW_DECL_MBRTOWC
+_GL_WARN_ON_USE (mbrtowc, "mbrtowc is unportable - "
+ "use gnulib module mbrtowc for portability");
+# endif
+#endif
+
+
+/* Recognize a multibyte character. */
+#if @GNULIB_MBRLEN@
+# if @REPLACE_MBRLEN@
+# undef mbrlen
+# define mbrlen rpl_mbrlen
+# endif
+# if !@HAVE_MBRLEN@ || @REPLACE_MBRLEN@
+extern size_t mbrlen (const char *s, size_t n, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbrlen
+# if HAVE_RAW_DECL_MBRLEN
+_GL_WARN_ON_USE (mbrlen, "mbrlen is unportable - "
+ "use gnulib module mbrlen for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSRTOWCS@
+# if @REPLACE_MBSRTOWCS@
+# undef mbsrtowcs
+# define mbsrtowcs rpl_mbsrtowcs
+# endif
+# if !@HAVE_MBSRTOWCS@ || @REPLACE_MBSRTOWCS@
+extern size_t mbsrtowcs (wchar_t *dest, const char **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsrtowcs
+# if HAVE_RAW_DECL_MBSRTOWCS
+_GL_WARN_ON_USE (mbsrtowcs, "mbsrtowcs is unportable - "
+ "use gnulib module mbsrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a string to a wide string. */
+#if @GNULIB_MBSNRTOWCS@
+# if @REPLACE_MBSNRTOWCS@
+# undef mbsnrtowcs
+# define mbsnrtowcs rpl_mbsnrtowcs
+# endif
+# if !@HAVE_MBSNRTOWCS@ || @REPLACE_MBSNRTOWCS@
+extern size_t mbsnrtowcs (wchar_t *dest, const char **srcp, size_t srclen, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef mbsnrtowcs
+# if HAVE_RAW_DECL_MBSNRTOWCS
+_GL_WARN_ON_USE (mbsnrtowcs, "mbsnrtowcs is unportable - "
+ "use gnulib module mbsnrtowcs for portability");
+# endif
+#endif
+
+
+/* Convert a wide character to a multibyte character. */
+#if @GNULIB_WCRTOMB@
+# if @REPLACE_WCRTOMB@
+# undef wcrtomb
+# define wcrtomb rpl_wcrtomb
+# endif
+# if !@HAVE_WCRTOMB@ || @REPLACE_WCRTOMB@
+extern size_t wcrtomb (char *s, wchar_t wc, mbstate_t *ps);
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcrtomb
+# if HAVE_RAW_DECL_WCRTOMB
+_GL_WARN_ON_USE (wcrtomb, "wcrtomb is unportable - "
+ "use gnulib module wcrtomb for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSRTOMBS@
+# if @REPLACE_WCSRTOMBS@
+# undef wcsrtombs
+# define wcsrtombs rpl_wcsrtombs
+# endif
+# if !@HAVE_WCSRTOMBS@ || @REPLACE_WCSRTOMBS@
+extern size_t wcsrtombs (char *dest, const wchar_t **srcp, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsrtombs
+# if HAVE_RAW_DECL_WCSRTOMBS
+_GL_WARN_ON_USE (wcsrtombs, "wcsrtombs is unportable - "
+ "use gnulib module wcsrtombs for portability");
+# endif
+#endif
+
+
+/* Convert a wide string to a string. */
+#if @GNULIB_WCSNRTOMBS@
+# if @REPLACE_WCSNRTOMBS@
+# undef wcsnrtombs
+# define wcsnrtombs rpl_wcsnrtombs
+# endif
+# if !@HAVE_WCSNRTOMBS@ || @REPLACE_WCSNRTOMBS@
+extern size_t wcsnrtombs (char *dest, const wchar_t **srcp, size_t srclen, size_t len, mbstate_t *ps)
+ _GL_ARG_NONNULL ((2));
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcsnrtombs
+# if HAVE_RAW_DECL_WCSNRTOMBS
+_GL_WARN_ON_USE (wcsnrtombs, "wcsnrtombs is unportable - "
+ "use gnulib module wcsnrtombs for portability");
+# endif
+#endif
+
+
+/* Return the number of screen columns needed for WC. */
+#if @GNULIB_WCWIDTH@
+# if @REPLACE_WCWIDTH@
+# undef wcwidth
+# define wcwidth rpl_wcwidth
+extern int wcwidth (wchar_t);
+# else
+# if !defined wcwidth && !@HAVE_DECL_WCWIDTH@
+/* wcwidth exists but is not declared. */
+extern int wcwidth (int /* actually wchar_t */);
+# endif
+# endif
+#elif defined GNULIB_POSIXCHECK
+# undef wcwidth
+# if HAVE_RAW_DECL_WCWIDTH
+_GL_WARN_ON_USE (wcwidth, "wcwidth is unportable - "
+ "use gnulib module wcwidth for portability");
+# endif
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_WCHAR_H */
+#endif /* _GL_WCHAR_H */
+#endif
diff --git a/gnu/wcrtomb.c b/gnu/wcrtomb.c
new file mode 100755
index 00000000..e7345f69
--- /dev/null
+++ b/gnu/wcrtomb.c
@@ -0,0 +1,53 @@
+/* Convert wide character to multibyte character.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <errno.h>
+#include <stdlib.h>
+
+
+size_t
+wcrtomb (char *s, wchar_t wc, mbstate_t *ps)
+{
+ /* This implementation of wcrtomb on top of wctomb() supports only
+ stateless encodings. ps must be in the initial state. */
+ if (ps != NULL && !mbsinit (ps))
+ {
+ errno = EINVAL;
+ return (size_t)(-1);
+ }
+
+ if (s == NULL)
+ /* We know the NUL wide character corresponds to the NUL character. */
+ return 1;
+ else
+ {
+ int ret = wctomb (s, wc);
+
+ if (ret >= 0)
+ return ret;
+ else
+ {
+ errno = EILSEQ;
+ return (size_t)(-1);
+ }
+ }
+}
diff --git a/gnu/wctype.in.h b/gnu/wctype.in.h
new file mode 100755
index 00000000..92af9b40
--- /dev/null
+++ b/gnu/wctype.in.h
@@ -0,0 +1,239 @@
+/* A substitute for ISO C99 <wctype.h>, for platforms that lack it.
+
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Bruno Haible and Paul Eggert. */
+
+/*
+ * ISO C 99 <wctype.h> for platforms that lack it.
+ * <http://www.opengroup.org/susv3xbd/wctype.h.html>
+ *
+ * iswctype, towctrans, towlower, towupper, wctrans, wctype,
+ * wctrans_t, and wctype_t are not yet implemented.
+ */
+
+#ifndef _GL_WCTYPE_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+#if @HAVE_WINT_T@
+/* Solaris 2.5 has a bug: <wchar.h> must be included before <wctype.h>.
+ Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+# include <wchar.h>
+#endif
+
+/* Include the original <wctype.h> if it exists.
+ BeOS 5 has the functions but no <wctype.h>. */
+/* The include_next requires a split double-inclusion guard. */
+#if @HAVE_WCTYPE_H@
+# @INCLUDE_NEXT@ @NEXT_WCTYPE_H@
+#endif
+
+#ifndef _GL_WCTYPE_H
+#define _GL_WCTYPE_H
+
+/* Define wint_t. (Also done in wchar.in.h.) */
+#if !@HAVE_WINT_T@ && !defined wint_t
+# define wint_t int
+# ifndef WEOF
+# define WEOF -1
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* FreeBSD 4.4 to 4.11 has <wctype.h> but lacks the functions.
+ Linux libc5 has <wctype.h> and the functions but they are broken.
+ Assume all 12 functions are implemented the same way, or not at all. */
+#if ! @HAVE_ISWCNTRL@ || @REPLACE_ISWCNTRL@
+
+/* IRIX 5.3 has macros but no functions, its isw* macros refer to an
+ undefined variable _ctmp_ and to <ctype.h> macros like _P, and they
+ refer to system functions like _iswctype that are not in the
+ standard C library. Rather than try to get ancient buggy
+ implementations like this to work, just disable them. */
+# undef iswalnum
+# undef iswalpha
+# undef iswblank
+# undef iswcntrl
+# undef iswdigit
+# undef iswgraph
+# undef iswlower
+# undef iswprint
+# undef iswpunct
+# undef iswspace
+# undef iswupper
+# undef iswxdigit
+# undef towlower
+# undef towupper
+
+/* Linux libc5 has <wctype.h> and the functions but they are broken. */
+# if @REPLACE_ISWCNTRL@
+# define iswalnum rpl_iswalnum
+# define iswalpha rpl_iswalpha
+# define iswblank rpl_iswblank
+# define iswcntrl rpl_iswcntrl
+# define iswdigit rpl_iswdigit
+# define iswgraph rpl_iswgraph
+# define iswlower rpl_iswlower
+# define iswprint rpl_iswprint
+# define iswpunct rpl_iswpunct
+# define iswspace rpl_iswspace
+# define iswupper rpl_iswupper
+# define iswxdigit rpl_iswxdigit
+# define towlower rpl_towlower
+# define towupper rpl_towupper
+# endif
+
+static inline int
+iswalnum (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z'));
+}
+
+static inline int
+iswalpha (wint_t wc)
+{
+ return (wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z';
+}
+
+static inline int
+iswblank (wint_t wc)
+{
+ return wc == ' ' || wc == '\t';
+}
+
+static inline int
+iswcntrl (wint_t wc)
+{
+ return (wc & ~0x1f) == 0 || wc == 0x7f;
+}
+
+static inline int
+iswdigit (wint_t wc)
+{
+ return wc >= '0' && wc <= '9';
+}
+
+static inline int
+iswgraph (wint_t wc)
+{
+ return wc >= '!' && wc <= '~';
+}
+
+static inline int
+iswlower (wint_t wc)
+{
+ return wc >= 'a' && wc <= 'z';
+}
+
+static inline int
+iswprint (wint_t wc)
+{
+ return wc >= ' ' && wc <= '~';
+}
+
+static inline int
+iswpunct (wint_t wc)
+{
+ return (wc >= '!' && wc <= '~'
+ && !((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'Z')));
+}
+
+static inline int
+iswspace (wint_t wc)
+{
+ return (wc == ' ' || wc == '\t'
+ || wc == '\n' || wc == '\v' || wc == '\f' || wc == '\r');
+}
+
+static inline int
+iswupper (wint_t wc)
+{
+ return wc >= 'A' && wc <= 'Z';
+}
+
+static inline int
+iswxdigit (wint_t wc)
+{
+ return ((wc >= '0' && wc <= '9')
+ || ((wc & ~0x20) >= 'A' && (wc & ~0x20) <= 'F'));
+}
+
+static inline wint_t
+towlower (wint_t wc)
+{
+ return (wc >= 'A' && wc <= 'Z' ? wc - 'A' + 'a' : wc);
+}
+
+static inline wint_t
+towupper (wint_t wc)
+{
+ return (wc >= 'a' && wc <= 'z' ? wc - 'a' + 'A' : wc);
+}
+
+#endif /* ! HAVE_ISWCNTRL || REPLACE_ISWCNTRL */
+
+#if defined __MINGW32__
+
+/* On native Windows, wchar_t is uint16_t, and wint_t is uint32_t.
+ The functions towlower and towupper are implemented in the MSVCRT library
+ to take a wchar_t argument and return a wchar_t result. mingw declares
+ these functions to take a wint_t argument and return a wint_t result.
+ This means that:
+ 1. When the user passes an argument outside the range 0x0000..0xFFFF, the
+ function will look only at the lower 16 bits. This is allowed according
+ to POSIX.
+ 2. The return value is returned in the lower 16 bits of the result register.
+ The upper 16 bits are random: whatever happened to be in that part of the
+ result register. We need to fix this by adding a zero-extend from
+ wchar_t to wint_t after the call. */
+
+static inline wint_t
+rpl_towlower (wint_t wc)
+{
+ return (wint_t) (wchar_t) towlower (wc);
+}
+# define towlower rpl_towlower
+
+static inline wint_t
+rpl_towupper (wint_t wc)
+{
+ return (wint_t) (wchar_t) towupper (wc);
+}
+# define towupper rpl_towupper
+
+#endif /* __MINGW32__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_WCTYPE_H */
+#endif /* _GL_WCTYPE_H */
diff --git a/gnu/wcwidth.c b/gnu/wcwidth.c
new file mode 100755
index 00000000..7341b66c
--- /dev/null
+++ b/gnu/wcwidth.c
@@ -0,0 +1,51 @@
+/* Determine the number of screen columns needed for a character.
+ Copyright (C) 2006, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+/* Get iswprint. */
+#include <wctype.h>
+
+#include "localcharset.h"
+#include "streq.h"
+#include "uniwidth.h"
+
+#undef wcwidth
+
+int
+rpl_wcwidth (wchar_t wc)
+{
+ /* In UTF-8 locales, use a Unicode aware width function. */
+ const char *encoding = locale_charset ();
+ if (STREQ (encoding, "UTF-8", 'U', 'T', 'F', '-', '8', 0, 0, 0 ,0))
+ {
+ /* We assume that in a UTF-8 locale, a wide character is the same as a
+ Unicode character. */
+ return uc_width (wc, encoding);
+ }
+ else
+ {
+ /* Otherwise, fall back to the system's wcwidth function. */
+#if HAVE_WCWIDTH
+ return wcwidth (wc);
+#else
+ return wc == 0 ? 0 : iswprint (wc) ? 1 : -1;
+#endif
+ }
+}
diff --git a/gnu/xalloc-die.c b/gnu/xalloc-die.c
new file mode 100755
index 00000000..4b220403
--- /dev/null
+++ b/gnu/xalloc-die.c
@@ -0,0 +1,41 @@
+/* Report a memory allocation failure and exit.
+
+ Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003, 2004, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "xalloc.h"
+
+#include <stdlib.h>
+
+#include "error.h"
+#include "exitfail.h"
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+void
+xalloc_die (void)
+{
+ error (exit_failure, 0, "%s", _("memory exhausted"));
+
+ /* The `noreturn' cannot be given to error, since it may return if
+ its first argument is 0. To help compilers understand the
+ xalloc_die does not return, call abort. Also, the abort is a
+ safety feature if exit_failure is 0 (which shouldn't happen). */
+ abort ();
+}
diff --git a/gnu/xalloc.h b/gnu/xalloc.h
new file mode 100755
index 00000000..6122cc58
--- /dev/null
+++ b/gnu/xalloc.h
@@ -0,0 +1,281 @@
+/* xalloc.h -- malloc with out-of-memory checking
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2003, 2004, 2006, 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XALLOC_H_
+# define XALLOC_H_
+
+# include <stddef.h>
+
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+
+# ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+# endif
+
+# ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# endif
+
+# ifndef ATTRIBUTE_MALLOC
+# if __GNUC__ >= 3
+# define ATTRIBUTE_MALLOC __attribute__ ((__malloc__))
+# else
+# define ATTRIBUTE_MALLOC
+# endif
+# endif
+
+/* This function is always triggered when memory is exhausted.
+ It must be defined by the application, either explicitly
+ or by using gnulib's xalloc-die module. This is the
+ function to call when one wants the program to die because of a
+ memory allocation failure. */
+extern void xalloc_die (void) ATTRIBUTE_NORETURN;
+
+void *xmalloc (size_t s) ATTRIBUTE_MALLOC;
+void *xzalloc (size_t s) ATTRIBUTE_MALLOC;
+void *xcalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+void *xrealloc (void *p, size_t s);
+void *x2realloc (void *p, size_t *pn);
+void *xmemdup (void const *p, size_t s) ATTRIBUTE_MALLOC;
+char *xstrdup (char const *str) ATTRIBUTE_MALLOC;
+
+/* Return 1 if an array of N objects, each of size S, cannot exist due
+ to size arithmetic overflow. S must be positive and N must be
+ nonnegative. This is a macro, not an inline function, so that it
+ works correctly even when SIZE_MAX < N.
+
+ By gnulib convention, SIZE_MAX represents overflow in size
+ calculations, so the conservative dividend to use here is
+ SIZE_MAX - 1, since SIZE_MAX might represent an overflowed value.
+ However, malloc (SIZE_MAX) fails on all known hosts where
+ sizeof (ptrdiff_t) <= sizeof (size_t), so do not bother to test for
+ exactly-SIZE_MAX allocations on such hosts; this avoids a test and
+ branch when S is known to be 1. */
+# define xalloc_oversized(n, s) \
+ ((size_t) (sizeof (ptrdiff_t) <= sizeof (size_t) ? -1 : -2) / (s) < (n))
+
+
+/* In the following macros, T must be an elementary or structure/union or
+ typedef'ed type, or a pointer to such a type. To apply one of the
+ following macros to a function pointer or array type, you need to typedef
+ it first and use the typedef name. */
+
+/* Allocate an object of type T dynamically, with error checking. */
+/* extern t *XMALLOC (typename t); */
+# define XMALLOC(t) ((t *) xmalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking. */
+/* extern t *XNMALLOC (size_t n, typename t); */
+# define XNMALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xmalloc (n) : xnmalloc (n, sizeof (t))))
+
+/* Allocate an object of type T dynamically, with error checking,
+ and zero it. */
+/* extern t *XZALLOC (typename t); */
+# define XZALLOC(t) ((t *) xzalloc (sizeof (t)))
+
+/* Allocate memory for N elements of type T, with error checking,
+ and zero it. */
+/* extern t *XCALLOC (size_t n, typename t); */
+# define XCALLOC(n, t) \
+ ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+
+
+# if HAVE_INLINE
+# define static_inline static inline
+# else
+void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+void *xnrealloc (void *p, size_t n, size_t s);
+void *x2nrealloc (void *p, size_t *pn, size_t s);
+char *xcharalloc (size_t n) ATTRIBUTE_MALLOC;
+# endif
+
+# ifdef static_inline
+
+/* Allocate an array of N objects, each with S bytes of memory,
+ dynamically, with error checking. S must be nonzero. */
+
+static_inline void *xnmalloc (size_t n, size_t s) ATTRIBUTE_MALLOC;
+static_inline void *
+xnmalloc (size_t n, size_t s)
+{
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
+ return xmalloc (n * s);
+}
+
+/* Change the size of an allocated block of memory P to an array of N
+ objects each of S bytes, with error checking. S must be nonzero. */
+
+static_inline void *
+xnrealloc (void *p, size_t n, size_t s)
+{
+ if (xalloc_oversized (n, s))
+ xalloc_die ();
+ return xrealloc (p, n * s);
+}
+
+/* If P is null, allocate a block of at least *PN such objects;
+ otherwise, reallocate P so that it contains more than *PN objects
+ each of S bytes. *PN must be nonzero unless P is null, and S must
+ be nonzero. Set *PN to the new number of objects, and return the
+ pointer to the new block. *PN is never set to zero, and the
+ returned pointer is never null.
+
+ Repeated reallocations are guaranteed to make progress, either by
+ allocating an initial block with a nonzero size, or by allocating a
+ larger block.
+
+ In the following implementation, nonzero sizes are increased by a
+ factor of approximately 1.5 so that repeated reallocations have
+ O(N) overall cost rather than O(N**2) cost, but the
+ specification for this function does not guarantee that rate.
+
+ Here is an example of use:
+
+ int *p = NULL;
+ size_t used = 0;
+ size_t allocated = 0;
+
+ void
+ append_int (int value)
+ {
+ if (used == allocated)
+ p = x2nrealloc (p, &allocated, sizeof *p);
+ p[used++] = value;
+ }
+
+ This causes x2nrealloc to allocate a block of some nonzero size the
+ first time it is called.
+
+ To have finer-grained control over the initial size, set *PN to a
+ nonzero value before calling this function with P == NULL. For
+ example:
+
+ int *p = NULL;
+ size_t used = 0;
+ size_t allocated = 0;
+ size_t allocated1 = 1000;
+
+ void
+ append_int (int value)
+ {
+ if (used == allocated)
+ {
+ p = x2nrealloc (p, &allocated1, sizeof *p);
+ allocated = allocated1;
+ }
+ p[used++] = value;
+ }
+
+ */
+
+static_inline void *
+x2nrealloc (void *p, size_t *pn, size_t s)
+{
+ size_t n = *pn;
+
+ if (! p)
+ {
+ if (! n)
+ {
+ /* The approximate size to use for initial small allocation
+ requests, when the invoking code specifies an old size of
+ zero. 64 bytes is the largest "small" request for the
+ GNU C library malloc. */
+ enum { DEFAULT_MXFAST = 64 };
+
+ n = DEFAULT_MXFAST / s;
+ n += !n;
+ }
+ }
+ else
+ {
+ /* Set N = ceil (1.5 * N) so that progress is made if N == 1.
+ Check for overflow, so that N * S stays in size_t range.
+ The check is slightly conservative, but an exact check isn't
+ worth the trouble. */
+ if ((size_t) -1 / 3 * 2 / s <= n)
+ xalloc_die ();
+ n += (n + 1) / 2;
+ }
+
+ *pn = n;
+ return xrealloc (p, n * s);
+}
+
+/* Return a pointer to a new buffer of N bytes. This is like xmalloc,
+ except it returns char *. */
+
+static_inline char *xcharalloc (size_t n) ATTRIBUTE_MALLOC;
+static_inline char *
+xcharalloc (size_t n)
+{
+ return XNMALLOC (n, char);
+}
+
+# endif
+
+# ifdef __cplusplus
+}
+
+/* C++ does not allow conversions from void * to other pointer types
+ without a cast. Use templates to work around the problem when
+ possible. */
+
+template <typename T> inline T *
+xrealloc (T *p, size_t s)
+{
+ return (T *) xrealloc ((void *) p, s);
+}
+
+template <typename T> inline T *
+xnrealloc (T *p, size_t n, size_t s)
+{
+ return (T *) xnrealloc ((void *) p, n, s);
+}
+
+template <typename T> inline T *
+x2realloc (T *p, size_t *pn)
+{
+ return (T *) x2realloc ((void *) p, pn);
+}
+
+template <typename T> inline T *
+x2nrealloc (T *p, size_t *pn, size_t s)
+{
+ return (T *) x2nrealloc ((void *) p, pn, s);
+}
+
+template <typename T> inline T *
+xmemdup (T const *p, size_t s)
+{
+ return (T *) xmemdup ((void const *) p, s);
+}
+
+# endif
+
+
+#endif /* !XALLOC_H_ */
diff --git a/gnu/xasprintf.c b/gnu/xasprintf.c
new file mode 100755
index 00000000..0fcff254
--- /dev/null
+++ b/gnu/xasprintf.c
@@ -0,0 +1,34 @@
+/* vasprintf and asprintf with out-of-memory checking.
+ Copyright (C) 1999, 2002-2004, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "xvasprintf.h"
+
+char *
+xasprintf (const char *format, ...)
+{
+ va_list args;
+ char *result;
+
+ va_start (args, format);
+ result = xvasprintf (format, args);
+ va_end (args);
+
+ return result;
+}
diff --git a/gnu/xmalloc.c b/gnu/xmalloc.c
new file mode 100755
index 00000000..ecce5296
--- /dev/null
+++ b/gnu/xmalloc.c
@@ -0,0 +1,118 @@
+/* xmalloc.c -- malloc with out of memory checking
+
+ Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+ 2000, 2002, 2003, 2004, 2005, 2006, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#if ! HAVE_INLINE
+# define static_inline
+#endif
+#include "xalloc.h"
+#undef static_inline
+
+#include <stdlib.h>
+#include <string.h>
+
+/* 1 if calloc is known to be compatible with GNU calloc. This
+ matters if we are not also using the calloc module, which defines
+ HAVE_CALLOC and supports the GNU API even on non-GNU platforms. */
+#if defined HAVE_CALLOC || defined __GLIBC__
+enum { HAVE_GNU_CALLOC = 1 };
+#else
+enum { HAVE_GNU_CALLOC = 0 };
+#endif
+
+/* Allocate N bytes of memory dynamically, with error checking. */
+
+void *
+xmalloc (size_t n)
+{
+ void *p = malloc (n);
+ if (!p && n != 0)
+ xalloc_die ();
+ return p;
+}
+
+/* Change the size of an allocated block of memory P to N bytes,
+ with error checking. */
+
+void *
+xrealloc (void *p, size_t n)
+{
+ p = realloc (p, n);
+ if (!p && n != 0)
+ xalloc_die ();
+ return p;
+}
+
+/* If P is null, allocate a block of at least *PN bytes; otherwise,
+ reallocate P so that it contains more than *PN bytes. *PN must be
+ nonzero unless P is null. Set *PN to the new block's size, and
+ return the pointer to the new block. *PN is never set to zero, and
+ the returned pointer is never null. */
+
+void *
+x2realloc (void *p, size_t *pn)
+{
+ return x2nrealloc (p, pn, 1);
+}
+
+/* Allocate S bytes of zeroed memory dynamically, with error checking.
+ There's no need for xnzalloc (N, S), since it would be equivalent
+ to xcalloc (N, S). */
+
+void *
+xzalloc (size_t s)
+{
+ return memset (xmalloc (s), 0, s);
+}
+
+/* Allocate zeroed memory for N elements of S bytes, with error
+ checking. S must be nonzero. */
+
+void *
+xcalloc (size_t n, size_t s)
+{
+ void *p;
+ /* Test for overflow, since some calloc implementations don't have
+ proper overflow checks. But omit overflow and size-zero tests if
+ HAVE_GNU_CALLOC, since GNU calloc catches overflow and never
+ returns NULL if successful. */
+ if ((! HAVE_GNU_CALLOC && xalloc_oversized (n, s))
+ || (! (p = calloc (n, s)) && (HAVE_GNU_CALLOC || n != 0)))
+ xalloc_die ();
+ return p;
+}
+
+/* Clone an object P of size S, with error checking. There's no need
+ for xnmemdup (P, N, S), since xmemdup (P, N * S) works without any
+ need for an arithmetic overflow check. */
+
+void *
+xmemdup (void const *p, size_t s)
+{
+ return memcpy (xmalloc (s), p, s);
+}
+
+/* Clone STRING. */
+
+char *
+xstrdup (char const *string)
+{
+ return xmemdup (string, strlen (string) + 1);
+}
diff --git a/gnu/xmalloca.c b/gnu/xmalloca.c
new file mode 100755
index 00000000..6848a9b0
--- /dev/null
+++ b/gnu/xmalloca.c
@@ -0,0 +1,38 @@
+/* Safe automatic memory allocation with out of memory checking.
+ Copyright (C) 2003, 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "xmalloca.h"
+
+#include "xalloc.h"
+
+#if HAVE_ALLOCA
+
+void *
+xmmalloca (size_t n)
+{
+ void *p;
+
+ p = mmalloca (n);
+ if (p == NULL)
+ xalloc_die ();
+ return p;
+}
+
+#endif
diff --git a/gnu/xmalloca.h b/gnu/xmalloca.h
new file mode 100755
index 00000000..1a5fb6d0
--- /dev/null
+++ b/gnu/xmalloca.h
@@ -0,0 +1,64 @@
+/* Safe automatic memory allocation with out of memory checking.
+ Copyright (C) 2003, 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2003.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _XMALLOCA_H
+#define _XMALLOCA_H
+
+#include "malloca.h"
+#include "xalloc.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* xmalloca(N) is a checking safe variant of alloca(N). It allocates N bytes
+ of memory allocated on the stack, that must be freed using freea() before
+ the function returns. Upon failure, it exits with an error message. */
+#if HAVE_ALLOCA
+# define xmalloca(N) \
+ ((N) < 4032 - sa_increment \
+ ? (void *) ((char *) alloca ((N) + sa_increment) + sa_increment) \
+ : xmmalloca (N))
+extern void * xmmalloca (size_t n);
+#else
+# define xmalloca(N) \
+ xmalloc (N)
+#endif
+
+/* xnmalloca(N,S) is an overflow-safe variant of xmalloca (N * S).
+ It allocates an array of N objects, each with S bytes of memory,
+ on the stack. S must be positive and N must be nonnegative.
+ The array must be freed using freea() before the function returns.
+ Upon failure, it exits with an error message. */
+#if HAVE_ALLOCA
+/* Rely on xmalloca (SIZE_MAX) calling xalloc_die (). */
+# define xnmalloca(n, s) \
+ xmalloca (xalloc_oversized ((n), (s)) ? (size_t) (-1) : (n) * (s))
+#else
+# define xnmalloca(n, s) \
+ xnmalloc ((n), (s))
+#endif
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _XMALLOCA_H */
diff --git a/gnu/xmemdup0.c b/gnu/xmemdup0.c
new file mode 100755
index 00000000..feddccc1
--- /dev/null
+++ b/gnu/xmemdup0.c
@@ -0,0 +1,44 @@
+/* xmemdup0.c -- copy a block of arbitrary bytes, plus a trailing NUL
+
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "xmemdup0.h"
+#include "xalloc.h"
+
+#include <string.h>
+
+/* Clone an arbitrary block of bytes P of size S, with error checking,
+ and include a terminating NUL byte. P is of type `void const *',
+ to make it easier to use this with other mem* functions that return
+ `void *', but since appending a NUL byte only makes sense on bytes,
+ the return type is `char *'.
+
+ The terminating NUL makes it safe to use strlen or rawmemchr to
+ check for embedded NUL; it also speeds up algorithms such as escape
+ sequence processing on arbitrary memory, by making it always safe
+ to read the byte after the escape character rather than having to
+ check if each escape character is the last byte in the object. */
+
+char *
+xmemdup0 (void const *p, size_t s)
+{
+ char *result = xcharalloc (s + 1);
+ memcpy (result, p, s);
+ result[s] = 0;
+ return result;
+}
diff --git a/gnu/xmemdup0.h b/gnu/xmemdup0.h
new file mode 100755
index 00000000..d3557694
--- /dev/null
+++ b/gnu/xmemdup0.h
@@ -0,0 +1,51 @@
+/* xmemdup0.h -- copy a block of arbitrary bytes, plus a trailing NUL
+
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XMEMDUP_H_
+# define XMEMDUP_H_
+
+# include <stddef.h>
+
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+# ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+# endif
+
+# ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+# endif
+
+/* This function is always triggered when memory is exhausted.
+ It must be defined by the application, either explicitly
+ or by using gnulib's xalloc-die module. This is the
+ function to call when one wants the program to die because of a
+ memory allocation failure. */
+extern void xalloc_die (void) ATTRIBUTE_NORETURN;
+
+char *xmemdup0 (void const *p, size_t s);
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif /* !XMEMDUP0_H_ */
diff --git a/gnu/xprintf.c b/gnu/xprintf.c
new file mode 100755
index 00000000..f0450300
--- /dev/null
+++ b/gnu/xprintf.c
@@ -0,0 +1,79 @@
+/* printf wrappers that fail immediately for non-file-related errors
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "xprintf.h"
+
+#include <errno.h>
+
+#include "error.h"
+#include "exitfail.h"
+#include "gettext.h"
+
+/* written by Jim Meyering */
+
+/* Just like printf, but call error if it fails without setting the
+ stream's error indicator. */
+int
+xprintf (char const *restrict format, ...)
+{
+ va_list args;
+ int retval;
+ va_start (args, format);
+ retval = xvprintf (format, args);
+ va_end (args);
+
+ return retval;
+}
+
+/* Just like vprintf, but call error if it fails without setting the
+ stream's error indicator. */
+int
+xvprintf (char const *restrict format, va_list args)
+{
+ int retval = vprintf (format, args);
+ if (retval < 0 && ! ferror (stdout))
+ error (exit_failure, errno, gettext ("cannot perform formatted output"));
+
+ return retval;
+}
+
+/* Just like fprintf, but call error if it fails without setting the
+ stream's error indicator. */
+int
+xfprintf (FILE *restrict stream, char const *restrict format, ...)
+{
+ va_list args;
+ int retval;
+ va_start (args, format);
+ retval = xvfprintf (stream, format, args);
+ va_end (args);
+
+ return retval;
+}
+
+/* Just like vfprintf, but call error if it fails without setting the
+ stream's error indicator. */
+int
+xvfprintf (FILE *restrict stream, char const *restrict format, va_list args)
+{
+ int retval = vfprintf (stream, format, args);
+ if (retval < 0 && ! ferror (stream))
+ error (exit_failure, errno, gettext ("cannot perform formatted output"));
+
+ return retval;
+}
diff --git a/gnu/xprintf.h b/gnu/xprintf.h
new file mode 100755
index 00000000..91ba55da
--- /dev/null
+++ b/gnu/xprintf.h
@@ -0,0 +1,45 @@
+/* printf wrappers that fail immediately for non-file-related errors
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _XPRINTF_H
+#define _XPRINTF_H
+
+#include <stdarg.h>
+#include <stdio.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+extern int xprintf (char const *restrict format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+extern int xvprintf (char const *restrict format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)));
+extern int xfprintf (FILE *restrict stream, char const *restrict format, ...)
+ __attribute__ ((__format__ (__printf__, 2, 3)));
+extern int xvfprintf (FILE *restrict stream, char const *restrict format,
+ va_list args)
+ __attribute__ ((__format__ (__printf__, 2, 0)));
+
+#endif
diff --git a/gnu/xsize.h b/gnu/xsize.h
new file mode 100755
index 00000000..fbd63290
--- /dev/null
+++ b/gnu/xsize.h
@@ -0,0 +1,108 @@
+/* xsize.h -- Checked size_t computations.
+
+ Copyright (C) 2003, 2008, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _XSIZE_H
+#define _XSIZE_H
+
+/* Get size_t. */
+#include <stddef.h>
+
+/* Get SIZE_MAX. */
+#include <limits.h>
+#if HAVE_STDINT_H
+# include <stdint.h>
+#endif
+
+/* The size of memory objects is often computed through expressions of
+ type size_t. Example:
+ void* p = malloc (header_size + n * element_size).
+ These computations can lead to overflow. When this happens, malloc()
+ returns a piece of memory that is way too small, and the program then
+ crashes while attempting to fill the memory.
+ To avoid this, the functions and macros in this file check for overflow.
+ The convention is that SIZE_MAX represents overflow.
+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
+ implementation that uses mmap --, it's recommended to use size_overflow_p()
+ or size_in_bounds_p() before invoking malloc().
+ The example thus becomes:
+ size_t size = xsum (header_size, xtimes (n, element_size));
+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
+*/
+
+/* Convert an arbitrary value >= 0 to type size_t. */
+#define xcast_size_t(N) \
+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
+
+/* Sum of two sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum (size_t size1, size_t size2)
+{
+ size_t sum = size1 + size2;
+ return (sum >= size1 ? sum : SIZE_MAX);
+}
+
+/* Sum of three sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum3 (size_t size1, size_t size2, size_t size3)
+{
+ return xsum (xsum (size1, size2), size3);
+}
+
+/* Sum of four sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
+{
+ return xsum (xsum (xsum (size1, size2), size3), size4);
+}
+
+/* Maximum of two sizes, with overflow check. */
+static inline size_t
+#if __GNUC__ >= 3
+__attribute__ ((__pure__))
+#endif
+xmax (size_t size1, size_t size2)
+{
+ /* No explicit check is needed here, because for any n:
+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
+ return (size1 >= size2 ? size1 : size2);
+}
+
+/* Multiplication of a count with an element size, with overflow check.
+ The count must be >= 0 and the element size must be > 0.
+ This is a macro, not an inline function, so that it works correctly even
+ when N is of a wider type and N > SIZE_MAX. */
+#define xtimes(N, ELSIZE) \
+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
+
+/* Check for overflow. */
+#define size_overflow_p(SIZE) \
+ ((SIZE) == SIZE_MAX)
+/* Check against overflow. */
+#define size_in_bounds_p(SIZE) \
+ ((SIZE) != SIZE_MAX)
+
+#endif /* _XSIZE_H */
diff --git a/gnu/xstriconv.c b/gnu/xstriconv.c
new file mode 100755
index 00000000..7c8c1421
--- /dev/null
+++ b/gnu/xstriconv.c
@@ -0,0 +1,62 @@
+/* Charset conversion with out-of-memory checking.
+ Copyright (C) 2001-2004, 2006, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "xstriconv.h"
+
+#include <errno.h>
+
+#include "striconv.h"
+#include "xalloc.h"
+
+
+#if HAVE_ICONV
+
+int
+xmem_cd_iconv (const char *src, size_t srclen, iconv_t cd,
+ char **resultp, size_t *lengthp)
+{
+ int retval = mem_cd_iconv (src, srclen, cd, resultp, lengthp);
+
+ if (retval < 0 && errno == ENOMEM)
+ xalloc_die ();
+ return retval;
+}
+
+char *
+xstr_cd_iconv (const char *src, iconv_t cd)
+{
+ char *result = str_cd_iconv (src, cd);
+
+ if (result == NULL && errno == ENOMEM)
+ xalloc_die ();
+ return result;
+}
+
+#endif
+
+char *
+xstr_iconv (const char *src, const char *from_codeset, const char *to_codeset)
+{
+ char *result = str_iconv (src, from_codeset, to_codeset);
+
+ if (result == NULL && errno == ENOMEM)
+ xalloc_die ();
+ return result;
+}
diff --git a/gnu/xstriconv.h b/gnu/xstriconv.h
new file mode 100755
index 00000000..72b2aa37
--- /dev/null
+++ b/gnu/xstriconv.h
@@ -0,0 +1,78 @@
+/* Charset conversion with out-of-memory checking.
+ Copyright (C) 2001-2004, 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible and Simon Josefsson.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _XSTRICONV_H
+#define _XSTRICONV_H
+
+#include <stddef.h>
+#if HAVE_ICONV
+#include <iconv.h>
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#if HAVE_ICONV
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is at [SRC,...,SRC+SRCLEN-1].
+ The conversion descriptor is passed as CD.
+ *RESULTP and *LENGTH should initially be a scratch buffer and its size,
+ or *RESULTP can initially be NULL.
+ May erase the contents of the memory at *RESULTP.
+ Upon memory allocation failure, report the error and exit.
+ Return value: 0 if successful, otherwise -1 and errno set.
+ If successful: The resulting string is stored in *RESULTP and its length
+ in *LENGTHP. *RESULTP is set to a freshly allocated memory block, or is
+ unchanged if no dynamic memory allocation was necessary. */
+extern int xmem_cd_iconv (const char *src, size_t srclen, iconv_t cd,
+ char **resultp, size_t *lengthp);
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is the NUL-terminated string starting at SRC.
+ The conversion descriptor is passed as CD. Both the "from" and the "to"
+ encoding must use a single NUL byte at the end of the string (i.e. not
+ UCS-2, UCS-4, UTF-16, UTF-32).
+ Allocate a malloced memory block for the result.
+ Upon memory allocation failure, report the error and exit.
+ Return value: the freshly allocated resulting NUL-terminated string if
+ successful, otherwise NULL and errno set. */
+extern char * xstr_cd_iconv (const char *src, iconv_t cd);
+
+#endif
+
+/* Convert an entire string from one encoding to another, using iconv.
+ The original string is the NUL-terminated string starting at SRC.
+ Both the "from" and the "to" encoding must use a single NUL byte at the
+ end of the string (i.e. not UCS-2, UCS-4, UTF-16, UTF-32).
+ Allocate a malloced memory block for the result.
+ Upon memory allocation failure, report the error and exit.
+ Return value: the freshly allocated resulting NUL-terminated string if
+ successful, otherwise NULL and errno set. */
+extern char * xstr_iconv (const char *src,
+ const char *from_codeset, const char *to_codeset);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* _XSTRICONV_H */
diff --git a/gnu/xstrndup.c b/gnu/xstrndup.c
new file mode 100755
index 00000000..414f9f4f
--- /dev/null
+++ b/gnu/xstrndup.c
@@ -0,0 +1,36 @@
+/* Duplicate a bounded initial segment of a string, with out-of-memory
+ checking.
+ Copyright (C) 2003, 2006, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "xstrndup.h"
+
+#include <string.h>
+#include "xalloc.h"
+
+/* Return a newly allocated copy of at most N bytes of STRING.
+ In other words, return a copy of the initial segment of length N of
+ STRING. */
+char *
+xstrndup (const char *string, size_t n)
+{
+ char *s = strndup (string, n);
+ if (! s)
+ xalloc_die ();
+ return s;
+}
diff --git a/gnu/xstrndup.h b/gnu/xstrndup.h
new file mode 100755
index 00000000..009fdb08
--- /dev/null
+++ b/gnu/xstrndup.h
@@ -0,0 +1,23 @@
+/* Duplicate a bounded initial segment of a string, with out-of-memory
+ checking.
+ Copyright (C) 2003, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <stddef.h>
+
+/* Return a newly allocated copy of at most N bytes of STRING.
+ In other words, return a copy of the initial segment of length N of
+ STRING. */
+extern char *xstrndup (const char *string, size_t n);
diff --git a/gnu/xvasprintf.c b/gnu/xvasprintf.c
new file mode 100755
index 00000000..6a8bac4a
--- /dev/null
+++ b/gnu/xvasprintf.c
@@ -0,0 +1,110 @@
+/* vasprintf and asprintf with out-of-memory checking.
+ Copyright (C) 1999, 2002-2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "xvasprintf.h"
+
+#include <errno.h>
+#include <limits.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "xalloc.h"
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+static inline char *
+xstrcat (size_t argcount, va_list args)
+{
+ char *result;
+ va_list ap;
+ size_t totalsize;
+ size_t i;
+ char *p;
+
+ /* Determine the total size. */
+ totalsize = 0;
+ va_copy (ap, args);
+ for (i = argcount; i > 0; i--)
+ {
+ const char *next = va_arg (ap, const char *);
+ totalsize = xsum (totalsize, strlen (next));
+ }
+ va_end (ap);
+
+ /* Test for overflow in the summing pass above or in (totalsize + 1) below.
+ Also, don't return a string longer than INT_MAX, for consistency with
+ vasprintf(). */
+ if (totalsize == SIZE_MAX || totalsize > INT_MAX)
+ {
+ errno = EOVERFLOW;
+ return NULL;
+ }
+
+ /* Allocate and fill the result string. */
+ result = XNMALLOC (totalsize + 1, char);
+ p = result;
+ for (i = argcount; i > 0; i--)
+ {
+ const char *next = va_arg (args, const char *);
+ size_t len = strlen (next);
+ memcpy (p, next, len);
+ p += len;
+ }
+ *p = '\0';
+
+ return result;
+}
+
+char *
+xvasprintf (const char *format, va_list args)
+{
+ char *result;
+
+ /* Recognize the special case format = "%s...%s". It is a frequently used
+ idiom for string concatenation and needs to be fast. We don't want to
+ have a separate function xstrcat() for this purpose. */
+ {
+ size_t argcount = 0;
+ const char *f;
+
+ for (f = format;;)
+ {
+ if (*f == '\0')
+ /* Recognized the special case of string concatenation. */
+ return xstrcat (argcount, args);
+ if (*f != '%')
+ break;
+ f++;
+ if (*f != 's')
+ break;
+ f++;
+ argcount++;
+ }
+ }
+
+ if (vasprintf (&result, format, args) < 0)
+ {
+ if (errno == ENOMEM)
+ xalloc_die ();
+ return NULL;
+ }
+
+ return result;
+}
diff --git a/gnu/xvasprintf.h b/gnu/xvasprintf.h
new file mode 100755
index 00000000..4f3b1360
--- /dev/null
+++ b/gnu/xvasprintf.h
@@ -0,0 +1,55 @@
+/* vasprintf and asprintf with out-of-memory checking.
+ Copyright (C) 2002-2004, 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _XVASPRINTF_H
+#define _XVASPRINTF_H
+
+/* Get va_list. */
+#include <stdarg.h>
+
+#ifndef __attribute__
+/* The __attribute__ feature is available in gcc versions 2.5 and later.
+ The __-protected variants of the attributes 'format' and 'printf' are
+ accepted by gcc versions 2.6.4 (effectively 2.7) and later.
+ We enable __attribute__ only if these are supported too, because
+ gnulib and libintl do '#define printf __printf__' when they override
+ the 'printf' function. */
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
+# define __attribute__(Spec) /* empty */
+# endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* Write formatted output to a string dynamically allocated with malloc(),
+ and return it. Upon [ENOMEM] memory allocation error, call xalloc_die.
+ On some other error
+ - [EOVERFLOW] resulting string length is > INT_MAX,
+ - [EINVAL] invalid format string,
+ - [EILSEQ] error during conversion between wide and multibyte characters,
+ return NULL. */
+extern char *xasprintf (const char *format, ...)
+ __attribute__ ((__format__ (__printf__, 1, 2)));
+extern char *xvasprintf (const char *format, va_list args)
+ __attribute__ ((__format__ (__printf__, 1, 0)));
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _XVASPRINTF_H */
diff --git a/gnulib/Makefile b/gnulib/Makefile
new file mode 100644
index 00000000..d2878d64
--- /dev/null
+++ b/gnulib/Makefile
@@ -0,0 +1,30 @@
+# Makefile for gnulib central.
+# Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# in any medium, are permitted without royalty provided the copyright
+# notice and this notice are preserved.
+
+# Produce some files that are not stored in the repository.
+all:
+
+# Produce the documentation in readable form.
+info html dvi pdf:
+ cd doc && $(MAKE) $@ && $(MAKE) mostlyclean
+
+# Perform some platform independent checks on the gnulib code.
+check: sc_prefer_ac_check_funcs_once
+
+sc_prefer_ac_check_funcs_once:
+ git grep -w -l AC_CHECK_FUNCS modules && \
+ { echo use AC_CHECK_FUNCS_ONCE, not AC_CHECK_FUNCS in modules/ 1>&2; \
+ exit 1; } || :
+
+# Regenerate some files that are stored in the repository.
+regen: MODULES.html
+
+# MODULES.html is periodically being generated and copied to the web pages at
+# :ext:USER@cvs.savannah.gnu.org:/web/gnulib/gnulib/
+# where it then appears at <http://www.gnu.org/software/gnulib/MODULES.html>.
+MODULES.html: MODULES.html.sh
+ ./MODULES.html.sh > MODULES.html
diff --git a/gnulib/build-aux/po/remove-potcdate.sin b/gnulib/build-aux/po/remove-potcdate.sin
new file mode 100644
index 00000000..2436c49e
--- /dev/null
+++ b/gnulib/build-aux/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/gnulib/doc/Makefile b/gnulib/doc/Makefile
new file mode 100644
index 00000000..e131f1a9
--- /dev/null
+++ b/gnulib/doc/Makefile
@@ -0,0 +1,58 @@
+# Makefile for gnulib doc.
+# Copyright (C) 2004, 2006-2010 Free Software Foundation, Inc.
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+
+doc = gnulib
+
+MAKEINFO = env LANG= LC_MESSAGES= LC_ALL= LANGUAGE= makeinfo
+TEXI2HTML = $(MAKEINFO) --no-split --reference-limit=2000 --html
+
+%.info: %.texi
+ LANG= LC_MESSAGES= LC_ALL= LANGUAGE= makeinfo --no-split --reference-limit=2000 $<
+
+%.html: %.texi
+ $(TEXI2HTML) -o $@ $<
+
+%.dvi: %.texi
+ texi2dvi $< || { if texi2dvi $< 2>/dev/null | grep 'TeX capacity exceeded, sorry \[save size=' > /dev/null; then echo '*** You must increase the save_size in your texmf.cnf file, often located under /etc/texmf/.'; fi; exit 1; }
+
+%.pdf: %.texi
+ texi2pdf $< || { if texi2pdf $< 2>/dev/null | grep 'TeX capacity exceeded, sorry \[save size=' > /dev/null; then echo '*** You must increase the save_size in your texmf.cnf file, often located under /etc/texmf/.'; fi; exit 1; }
+
+all: info html dvi
+info: $(doc).info
+html: $(doc).html
+dvi: $(doc).dvi
+pdf: $(doc).pdf
+
+# INSTALL file with old ASCII quotation marks (looks ugly on modern machines).
+INSTALL: install.texi
+ $(MAKEINFO) --plaintext --no-validate $< > $@
+
+# INSTALL file with ISO 646 or ISO 8859 quotation marks.
+INSTALL.ISO: install.texi
+ $(MAKEINFO) --plaintext --no-validate $< | sed -e "s/\`\([^']*\)'/'\1'/g" > $@
+
+# INSTALL file wit ISO 10646 (Unicode) quotation marks.
+INSTALL.UTF-8: install.texi
+ $(MAKEINFO) --plaintext --no-validate $< | sed -e "s/\`\([^']*\)'/‘\1’/g" > $@
+
+GNULIB_TEXI_FILES = $(filter-out maintain.texi make-stds.texi standards.texi,$(wildcard *.texi)) $(wildcard posix-headers/*.texi) $(wildcard posix-functions/*.texi) $(wildcard glibc-headers/*.texi) $(wildcard glibc-functions/*.texi)
+
+# Date of last update. Requires GNU date.
+updated-stamp: $(GNULIB_TEXI_FILES)
+ date -u -r `ls -t $^ | sed 1q` +"@set UPDATED %F %T" > $@
+
+# Dependencies. Search for @include to find them all.
+gnulib.info gnulib.html gnulib.dvi gnulib.pdf: $(GNULIB_TEXI_FILES) updated-stamp
+standards.info standards.html standards.dvi: standards.texi make-stds.texi fdl.texi
+
+mostlyclean:
+ rm -f *.aux *.cp *.cps *.fn *.ky *.log *.pg *.toc *.tp *.vr *.vrs
+ rm -f updated-stamp
+
+clean: mostlyclean
+ rm -f *.info *.html *.dvi *.ps *.pdf
diff --git a/gnulib/lib/Makefile b/gnulib/lib/Makefile
new file mode 100644
index 00000000..2e102037
--- /dev/null
+++ b/gnulib/lib/Makefile
@@ -0,0 +1,6 @@
+# Run "make check" to ensure that the code passes some simple tests,
+# usually (always?) not involving compilation.
+all:
+
+check:
+ ./t-idcache
diff --git a/gnulib/lib/ref-add.sin b/gnulib/lib/ref-add.sin
new file mode 100644
index 00000000..f70fadc2
--- /dev/null
+++ b/gnulib/lib/ref-add.sin
@@ -0,0 +1,30 @@
+# Add this package to a list of references stored in a text file.
+#
+# Copyright (C) 2000, 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 General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ ta
+ :a
+ s/ @PACKAGE@ / @PACKAGE@ /
+ tb
+ s/ $/ @PACKAGE@ /
+ :b
+ s/^/# Packages using this file:/
+}
diff --git a/gnulib/lib/ref-del.sin b/gnulib/lib/ref-del.sin
new file mode 100644
index 00000000..76af5e00
--- /dev/null
+++ b/gnulib/lib/ref-del.sin
@@ -0,0 +1,25 @@
+# Remove this package from a list of references stored in a text file.
+#
+# Copyright (C) 2000, 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 General Public License as published by
+# the Free Software Foundation; either version 2, 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# Written by Bruno Haible <haible@clisp.cons.org>.
+#
+/^# Packages using this file: / {
+ s/# Packages using this file://
+ s/ @PACKAGE@ / /
+ s/^/# Packages using this file:/
+}
diff --git a/gnulib/lib/unictype/Makefile b/gnulib/lib/unictype/Makefile
new file mode 100644
index 00000000..d56ec316
--- /dev/null
+++ b/gnulib/lib/unictype/Makefile
@@ -0,0 +1,20 @@
+# Makefile for generating the table files from unicode.org data.
+
+ARCHIVE_DIR = /gfs/ibook/Volumes/ExtData/www-archive/software/i18n/unicode/ftp.unicode.org/ArchiveVersions
+VERSION = 5.0.0
+UCD_DIR = $(ARCHIVE_DIR)/$(VERSION)/ucd
+
+EXTRA_DIST = gen-ctype.c 3levelbit.h 3level.h
+
+all: force
+ gcc -g -Wall gen-ctype.c -o gen-ctype
+ ./gen-ctype $(UCD_DIR)/UnicodeData.txt \
+ $(UCD_DIR)/PropList.txt \
+ $(UCD_DIR)/DerivedCoreProperties.txt \
+ $(UCD_DIR)/Scripts.txt \
+ $(UCD_DIR)/Blocks.txt \
+ $(ARCHIVE_DIR)/3.0.1/PropList-3.0.1.txt \
+ $(VERSION)
+ mv test-* ../../tests/unictype/
+
+force:
diff --git a/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.mo b/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.mo
new file mode 100644
index 00000000..87e97e1e
--- /dev/null
+++ b/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.mo
Binary files differ
diff --git a/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.po b/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.po
new file mode 100644
index 00000000..1ea251f4
--- /dev/null
+++ b/gnulib/tests/locale/fr/LC_MESSAGES/test-quotearg.po
@@ -0,0 +1,20 @@
+# Message catalog that maps the ASCII replacements for single-quote characters
+# to real single-quote characters.
+# The header entry is commented out on purpose, so that gettext() performs no
+# no character set conversion from the PO file's encoding to the locale
+# encoding. This allows us to use the same PO file in various locales.
+#msgid ""
+#msgstr ""
+#"Project-Id-Version: GNU gnulib\n"
+#"PO-Revision-Date: 2009-01-26 01:02+01:00\n"
+#"Last-Translator: Eric Blake <ebb9@byu.net>\n"
+#"Language-Team: Undetermined <und@li.org>\n"
+#"MIME-Version: 1.0\n"
+#"Content-Type: text/plain; charset=UTF-8\n"
+#"Content-Transfer-Encoding: 8bit\n"
+
+msgid "`"
+msgstr "\302\253"
+
+msgid "'"
+msgstr "\302\273"
diff --git a/ltdl/COPYING.LIB b/ltdl/COPYING.LIB
new file mode 100644
index 00000000..ba2be481
--- /dev/null
+++ b/ltdl/COPYING.LIB
@@ -0,0 +1,515 @@
+
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 2.1, February 1999
+
+ Copyright (C) 1991, 1999 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+[This is the first released version of the Lesser GPL. It also counts
+ as the successor of the GNU Library Public License, version 2, hence
+ the version number 2.1.]
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+Licenses are intended to guarantee your freedom to share and change
+free software--to make sure the software is free for all its users.
+
+ This license, the Lesser General Public License, applies to some
+specially designated software packages--typically libraries--of the
+Free Software Foundation and other authors who decide to use it. You
+can use it too, but we suggest you first think carefully about whether
+this license or the ordinary General Public License is the better
+strategy to use in any particular case, based on the explanations
+below.
+
+ When we speak of free software, we are referring to freedom of use,
+not price. Our General Public Licenses are designed to make sure that
+you have the freedom to distribute copies of free software (and charge
+for this service if you wish); that you receive source code or can get
+it if you want it; that you can change the software and use pieces of
+it in new free programs; and that you are informed that you can do
+these things.
+
+ To protect your rights, we need to make restrictions that forbid
+distributors to deny you these rights or to ask you to surrender these
+rights. These restrictions translate to certain responsibilities for
+you if you distribute copies of the library or if you modify it.
+
+ For example, if you distribute copies of the library, whether gratis
+or for a fee, you must give the recipients all the rights that we gave
+you. You must make sure that they, too, receive or can get the source
+code. If you link other code with the library, you must provide
+complete object files to the recipients, so that they can relink them
+with the library after making changes to the library and recompiling
+it. And you must show them these terms so they know their rights.
+
+ We protect your rights with a two-step method: (1) we copyright the
+library, and (2) we offer you this license, which gives you legal
+permission to copy, distribute and/or modify the library.
+
+ To protect each distributor, we want to make it very clear that
+there is no warranty for the free library. Also, if the library is
+modified by someone else and passed on, the recipients should know
+that what they have is not the original version, so that the original
+author's reputation will not be affected by problems that might be
+introduced by others.
+^L
+ Finally, software patents pose a constant threat to the existence of
+any free program. We wish to make sure that a company cannot
+effectively restrict the users of a free program by obtaining a
+restrictive license from a patent holder. Therefore, we insist that
+any patent license obtained for a version of the library must be
+consistent with the full freedom of use specified in this license.
+
+ Most GNU software, including some libraries, is covered by the
+ordinary GNU General Public License. This license, the GNU Lesser
+General Public License, applies to certain designated libraries, and
+is quite different from the ordinary General Public License. We use
+this license for certain libraries in order to permit linking those
+libraries into non-free programs.
+
+ When a program is linked with a library, whether statically or using
+a shared library, the combination of the two is legally speaking a
+combined work, a derivative of the original library. The ordinary
+General Public License therefore permits such linking only if the
+entire combination fits its criteria of freedom. The Lesser General
+Public License permits more lax criteria for linking other code with
+the library.
+
+ We call this license the "Lesser" General Public License because it
+does Less to protect the user's freedom than the ordinary General
+Public License. It also provides other free software developers Less
+of an advantage over competing non-free programs. These disadvantages
+are the reason we use the ordinary General Public License for many
+libraries. However, the Lesser license provides advantages in certain
+special circumstances.
+
+ For example, on rare occasions, there may be a special need to
+encourage the widest possible use of a certain library, so that it
+becomes
+a de-facto standard. To achieve this, non-free programs must be
+allowed to use the library. A more frequent case is that a free
+library does the same job as widely used non-free libraries. In this
+case, there is little to gain by limiting the free library to free
+software only, so we use the Lesser General Public License.
+
+ In other cases, permission to use a particular library in non-free
+programs enables a greater number of people to use a large body of
+free software. For example, permission to use the GNU C Library in
+non-free programs enables many more people to use the whole GNU
+operating system, as well as its variant, the GNU/Linux operating
+system.
+
+ Although the Lesser General Public License is Less protective of the
+users' freedom, it does ensure that the user of a program that is
+linked with the Library has the freedom and the wherewithal to run
+that program using a modified version of the Library.
+
+ The precise terms and conditions for copying, distribution and
+modification follow. Pay close attention to the difference between a
+"work based on the library" and a "work that uses the library". The
+former contains code derived from the library, whereas the latter must
+be combined with the library in order to run.
+^L
+ GNU LESSER GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License Agreement applies to any software library or other
+program which contains a notice placed by the copyright holder or
+other authorized party saying it may be distributed under the terms of
+this Lesser General Public License (also called "this License").
+Each licensee is addressed as "you".
+
+ A "library" means a collection of software functions and/or data
+prepared so as to be conveniently linked with application programs
+(which use some of those functions and data) to form executables.
+
+ The "Library", below, refers to any such software library or work
+which has been distributed under these terms. A "work based on the
+Library" means either the Library or any derivative work under
+copyright law: that is to say, a work containing the Library or a
+portion of it, either verbatim or with modifications and/or translated
+straightforwardly into another language. (Hereinafter, translation is
+included without limitation in the term "modification".)
+
+ "Source code" for a work means the preferred form of the work for
+making modifications to it. For a library, complete source code means
+all the source code for all modules it contains, plus any associated
+interface definition files, plus the scripts used to control
+compilation
+and installation of the library.
+
+ Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running a program using the Library is not restricted, and output from
+such a program is covered only if its contents constitute a work based
+on the Library (independent of the use of the Library in a tool for
+writing it). Whether that is true depends on what the Library does
+and what the program that uses the Library does.
+
+ 1. You may copy and distribute verbatim copies of the Library's
+complete source code as you receive it, in any medium, provided that
+you conspicuously and appropriately publish on each copy an
+appropriate copyright notice and disclaimer of warranty; keep intact
+all the notices that refer to this License and to the absence of any
+warranty; and distribute a copy of this License along with the
+Library.
+
+ You may charge a fee for the physical act of transferring a copy,
+and you may at your option offer warranty protection in exchange for a
+fee.
+
+ 2. You may modify your copy or copies of the Library or any portion
+of it, thus forming a work based on the Library, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) The modified work must itself be a software library.
+
+ b) You must cause the files modified to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ c) You must cause the whole of the work to be licensed at no
+ charge to all third parties under the terms of this License.
+
+ d) If a facility in the modified Library refers to a function or a
+ table of data to be supplied by an application program that uses
+ the facility, other than as an argument passed when the facility
+ is invoked, then you must make a good faith effort to ensure that,
+ in the event an application does not supply such function or
+ table, the facility still operates, and performs whatever part of
+ its purpose remains meaningful.
+
+ (For example, a function in a library to compute square roots has
+ a purpose that is entirely well-defined independent of the
+ application. Therefore, Subsection 2d requires that any
+ application-supplied function or table used by this function must
+ be optional: if the application does not supply it, the square
+ root function must still compute square roots.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Library,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Library, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote
+it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Library.
+
+In addition, mere aggregation of another work not based on the Library
+with the Library (or with a work based on the Library) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may opt to apply the terms of the ordinary GNU General Public
+License instead of this License to a given copy of the Library. To do
+this, you must alter all the notices that refer to this License, so
+that they refer to the ordinary GNU General Public License, version 2,
+instead of to this License. (If a newer version than version 2 of the
+ordinary GNU General Public License has appeared, then you can specify
+that version instead if you wish.) Do not make any other change in
+these notices.
+^L
+ Once this change is made in a given copy, it is irreversible for
+that copy, so the ordinary GNU General Public License applies to all
+subsequent copies and derivative works made from that copy.
+
+ This option is useful when you wish to copy part of the code of
+the Library into a program that is not a library.
+
+ 4. You may copy and distribute the Library (or a portion or
+derivative of it, under Section 2) in object code or executable form
+under the terms of Sections 1 and 2 above provided that you accompany
+it with the complete corresponding machine-readable source code, which
+must be distributed under the terms of Sections 1 and 2 above on a
+medium customarily used for software interchange.
+
+ If distribution of object code is made by offering access to copy
+from a designated place, then offering equivalent access to copy the
+source code from the same place satisfies the requirement to
+distribute the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 5. A program that contains no derivative of any portion of the
+Library, but is designed to work with the Library by being compiled or
+linked with it, is called a "work that uses the Library". Such a
+work, in isolation, is not a derivative work of the Library, and
+therefore falls outside the scope of this License.
+
+ However, linking a "work that uses the Library" with the Library
+creates an executable that is a derivative of the Library (because it
+contains portions of the Library), rather than a "work that uses the
+library". The executable is therefore covered by this License.
+Section 6 states terms for distribution of such executables.
+
+ When a "work that uses the Library" uses material from a header file
+that is part of the Library, the object code for the work may be a
+derivative work of the Library even though the source code is not.
+Whether this is true is especially significant if the work can be
+linked without the Library, or if the work is itself a library. The
+threshold for this to be true is not precisely defined by law.
+
+ If such an object file uses only numerical parameters, data
+structure layouts and accessors, and small macros and small inline
+functions (ten lines or less in length), then the use of the object
+file is unrestricted, regardless of whether it is legally a derivative
+work. (Executables containing this object code plus portions of the
+Library will still fall under Section 6.)
+
+ Otherwise, if the work is a derivative of the Library, you may
+distribute the object code for the work under the terms of Section 6.
+Any executables containing that work also fall under Section 6,
+whether or not they are linked directly with the Library itself.
+^L
+ 6. As an exception to the Sections above, you may also combine or
+link a "work that uses the Library" with the Library to produce a
+work containing portions of the Library, and distribute that work
+under terms of your choice, provided that the terms permit
+modification of the work for the customer's own use and reverse
+engineering for debugging such modifications.
+
+ You must give prominent notice with each copy of the work that the
+Library is used in it and that the Library and its use are covered by
+this License. You must supply a copy of this License. If the work
+during execution displays copyright notices, you must include the
+copyright notice for the Library among them, as well as a reference
+directing the user to the copy of this License. Also, you must do one
+of these things:
+
+ a) Accompany the work with the complete corresponding
+ machine-readable source code for the Library including whatever
+ changes were used in the work (which must be distributed under
+ Sections 1 and 2 above); and, if the work is an executable linked
+ with the Library, with the complete machine-readable "work that
+ uses the Library", as object code and/or source code, so that the
+ user can modify the Library and then relink to produce a modified
+ executable containing the modified Library. (It is understood
+ that the user who changes the contents of definitions files in the
+ Library will not necessarily be able to recompile the application
+ to use the modified definitions.)
+
+ b) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (1) uses at run time a
+ copy of the library already present on the user's computer system,
+ rather than copying library functions into the executable, and (2)
+ will operate properly with a modified version of the library, if
+ the user installs one, as long as the modified version is
+ interface-compatible with the version that the work was made with.
+
+ c) Accompany the work with a written offer, valid for at
+ least three years, to give the same user the materials
+ specified in Subsection 6a, above, for a charge no more
+ than the cost of performing this distribution.
+
+ d) If distribution of the work is made by offering access to copy
+ from a designated place, offer equivalent access to copy the above
+ specified materials from the same place.
+
+ e) Verify that the user has already received a copy of these
+ materials or that you have already sent this user a copy.
+
+ For an executable, the required form of the "work that uses the
+Library" must include any data and utility programs needed for
+reproducing the executable from it. However, as a special exception,
+the materials to be distributed need not include anything that is
+normally distributed (in either source or binary form) with the major
+components (compiler, kernel, and so on) of the operating system on
+which the executable runs, unless that component itself accompanies
+the executable.
+
+ It may happen that this requirement contradicts the license
+restrictions of other proprietary libraries that do not normally
+accompany the operating system. Such a contradiction means you cannot
+use both them and the Library together in an executable that you
+distribute.
+^L
+ 7. You may place library facilities that are a work based on the
+Library side-by-side in a single library together with other library
+facilities not covered by this License, and distribute such a combined
+library, provided that the separate distribution of the work based on
+the Library and of the other library facilities is otherwise
+permitted, and provided that you do these two things:
+
+ a) Accompany the combined library with a copy of the same work
+ based on the Library, uncombined with any other library
+ facilities. This must be distributed under the terms of the
+ Sections above.
+
+ b) Give prominent notice with the combined library of the fact
+ that part of it is a work based on the Library, and explaining
+ where to find the accompanying uncombined form of the same work.
+
+ 8. You may not copy, modify, sublicense, link with, or distribute
+the Library except as expressly provided under this License. Any
+attempt otherwise to copy, modify, sublicense, link with, or
+distribute the Library is void, and will automatically terminate your
+rights under this License. However, parties who have received copies,
+or rights, from you under this License will not have their licenses
+terminated so long as such parties remain in full compliance.
+
+ 9. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Library or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Library (or any work based on the
+Library), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Library or works based on it.
+
+ 10. Each time you redistribute the Library (or any work based on the
+Library), the recipient automatically receives a license from the
+original licensor to copy, distribute, link with or modify the Library
+subject to these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties with
+this License.
+^L
+ 11. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Library at all. For example, if a patent
+license would not permit royalty-free redistribution of the Library by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Library.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply, and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 12. If the distribution and/or use of the Library is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Library under this License
+may add an explicit geographical distribution limitation excluding those
+countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 13. The Free Software Foundation may publish revised and/or new
+versions of the Lesser General Public License from time to time.
+Such new versions will be similar in spirit to the present version,
+but may differ in detail to address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Library
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation. If the Library does not specify a
+license version number, you may choose any version ever published by
+the Free Software Foundation.
+^L
+ 14. If you wish to incorporate parts of the Library into other free
+programs whose distribution conditions are incompatible with these,
+write to the author to ask for permission. For software which is
+copyrighted by the Free Software Foundation, write to the Free
+Software Foundation; we sometimes make exceptions for this. Our
+decision will be guided by the two goals of preserving the free status
+of all derivatives of our free software and of promoting the sharing
+and reuse of software generally.
+
+ NO WARRANTY
+
+ 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+^L
+ How to Apply These Terms to Your New Libraries
+
+ If you develop a new library, and you want it to be of the greatest
+possible use to the public, we recommend making it free software that
+everyone can redistribute and change. You can do so by permitting
+redistribution under these terms (or, alternatively, under the terms
+of the ordinary General Public License).
+
+ To apply these terms, attach the following notices to the library.
+It is safest to attach them to the start of each source file to most
+effectively convey the exclusion of warranty; and each file should
+have at least the "copyright" line and a pointer to where the full
+notice is found.
+
+
+ <one line to give the library's name and a brief idea of what it
+does.>
+ Copyright (C) <year> <name of author>
+
+ This library 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 2 of the License, or (at your option) any later version.
+
+ This library 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 library; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+
+Also add information on how to contact you by electronic and paper
+mail.
+
+You should also get your employer (if you work as a programmer) or
+your
+school, if any, to sign a "copyright disclaimer" for the library, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the
+ library `Frob' (a library for tweaking knobs) written by James
+Random Hacker.
+
+ <signature of Ty Coon>, 1 April 1990
+ Ty Coon, President of Vice
+
+That's all there is to it!
+
+
diff --git a/ltdl/Makefile.inc b/ltdl/Makefile.inc
new file mode 100644
index 00000000..8f86217b
--- /dev/null
+++ b/ltdl/Makefile.inc
@@ -0,0 +1,147 @@
+## Makefile.inc -- includable Makefile.am snippet
+##
+## Copyright (C) 2003, 2004, 2005, 2007 Free Software Foundation, Inc.
+## Written by Gary V. Vaughan, 2003
+##
+## NOTE: The canonical source of this file is maintained with the
+## GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+##
+## GNU Libltdl 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 2 of the License, or (at your option) any later version.
+##
+## As a special exception to the GNU Lesser General Public License,
+## if you distribute this file as part of a program or library that
+## is built using GNU libtool, you may include this file under the
+## same distribution terms that you use for the rest of that program.
+##
+## GNU Libltdl 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 LesserGeneral Public
+## License along with GNU Libltdl; see the file COPYING.LIB. If not, a
+## copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+## or obtained by writing to the Free Software Foundation, Inc.,
+## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#####
+
+## DO NOT REMOVE THIS LINE -- make depends on it
+
+# -I$(srcdir) is needed for user that built libltdl with a sub-Automake
+# (not as a sub-package!) using 'nostdinc':
+AM_CPPFLAGS += -DLT_CONFIG_H='<$(LT_CONFIG_H)>' \
+ -DLTDL -I. -I$(srcdir) -Iltdl \
+ -I$(srcdir)/ltdl -I$(srcdir)/ltdl/libltdl
+AM_LDFLAGS += -no-undefined
+LTDL_VERSION_INFO = -version-info 9:1:2
+
+noinst_LTLIBRARIES += $(LT_DLLOADERS)
+
+if INSTALL_LTDL
+ltdlincludedir = $(includedir)/libltdl
+ltdlinclude_HEADERS = ltdl/libltdl/lt_system.h \
+ ltdl/libltdl/lt_error.h \
+ ltdl/libltdl/lt_dlloader.h
+include_HEADERS += ltdl/ltdl.h
+lib_LTLIBRARIES += ltdl/libltdl.la
+endif
+
+if CONVENIENCE_LTDL
+noinst_LTLIBRARIES += ltdl/libltdlc.la
+endif
+
+ltdl_libltdl_la_SOURCES = ltdl/libltdl/lt__alloc.h \
+ ltdl/libltdl/lt__dirent.h \
+ ltdl/libltdl/lt__glibc.h \
+ ltdl/libltdl/lt__private.h \
+ ltdl/libltdl/lt__strl.h \
+ ltdl/libltdl/lt_dlloader.h \
+ ltdl/libltdl/lt_error.h \
+ ltdl/libltdl/lt_system.h \
+ ltdl/libltdl/slist.h \
+ ltdl/loaders/preopen.c \
+ ltdl/lt__alloc.c \
+ ltdl/lt_dlloader.c \
+ ltdl/lt_error.c \
+ ltdl/ltdl.c \
+ ltdl/ltdl.h \
+ ltdl/slist.c
+
+EXTRA_DIST += ltdl/lt__dirent.c \
+ ltdl/lt__strl.c
+
+ltdl_libltdl_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN) $(AM_CPPFLAGS)
+ltdl_libltdl_la_LDFLAGS = $(AM_LDFLAGS) $(LTDL_VERSION_INFO) $(LT_DLPREOPEN)
+ltdl_libltdl_la_LIBADD = $(ltdl_LTLIBOBJS)
+ltdl_libltdl_la_DEPENDENCIES = $(LT_DLLOADERS) $(ltdl_LTLIBOBJS)
+
+ltdl_libltdlc_la_SOURCES = $(ltdl_libltdl_la_SOURCES)
+ltdl_libltdlc_la_CPPFLAGS = -DLTDLOPEN=$(LTDLOPEN)c $(AM_CPPFLAGS)
+ltdl_libltdlc_la_LDFLAGS = $(AM_LDFLAGS) $(LT_DLPREOPEN)
+ltdl_libltdlc_la_LIBADD = $(ltdl_libltdl_la_LIBADD)
+ltdl_libltdlc_la_DEPENDENCIES= $(ltdl_libltdl_la_DEPENDENCIES)
+
+## The loaders are preopened by libltdl, itself always built from
+## pic-objects (either as a shared library, or a convenience library),
+## so the loaders themselves must be made from pic-objects too. We
+## use convenience libraries for that purpose:
+EXTRA_LTLIBRARIES += ltdl/dlopen.la \
+ ltdl/dld_link.la \
+ ltdl/dyld.la \
+ ltdl/load_add_on.la \
+ ltdl/loadlibrary.la \
+ ltdl/shl_load.la
+
+ltdl_dlopen_la_SOURCES = ltdl/loaders/dlopen.c
+ltdl_dlopen_la_LDFLAGS = -module -avoid-version
+ltdl_dlopen_la_LIBADD = $(LIBADD_DLOPEN)
+
+ltdl_dld_link_la_SOURCES = ltdl/loaders/dld_link.c
+ltdl_dld_link_la_LDFLAGS = -module -avoid-version
+ltdl_dld_link_la_LIBADD = -ldld
+
+ltdl_dyld_la_SOURCES = ltdl/loaders/dyld.c
+ltdl_dyld_la_LDFLAGS = -module -avoid-version
+
+ltdl_load_add_on_la_SOURCES = ltdl/loaders/load_add_on.c
+ltdl_load_add_on_la_LDFLAGS = -module -avoid-version
+
+ltdl_loadlibrary_la_SOURCES = ltdl/loaders/loadlibrary.c
+ltdl_loadlibrary_la_LDFLAGS = -module -avoid-version
+
+ltdl_shl_load_la_SOURCES = ltdl/loaders/shl_load.c
+ltdl_shl_load_la_LDFLAGS = -module -avoid-version
+ltdl_shl_load_la_LIBADD = $(LIBADD_SHL_LOAD)
+
+## Make sure these will be cleaned even when they're not built by default:
+CLEANFILES += ltdl/libltdl.la \
+ ltdl/libltdlc.la \
+ ltdl/libdlloader.la
+
+## Automake-1.9.6 doesn't clean subdir AC_LIBOBJ compiled objects
+## automatically:
+CLEANFILES += $(ltdl_LIBOBJS) $(ltdl_LTLIBOBJS)
+
+EXTRA_DIST += ltdl/COPYING.LIB \
+ ltdl/README
+
+## --------------------------- ##
+## Gnulib Makefile.am snippets ##
+## --------------------------- ##
+
+BUILT_SOURCES += ltdl/$(ARGZ_H)
+EXTRA_DIST += ltdl/argz_.h \
+ ltdl/argz.c
+
+# We need the following in order to create an <argz.h> when the system
+# doesn't have one that works with the given compiler.
+all-local $(lib_OBJECTS): ltdl/$(ARGZ_H)
+ltdl/argz.h: ltdl/argz_.h
+ $(mkinstalldirs) . ltdl/
+ cp $(srcdir)/ltdl/argz_.h $@-t
+ mv $@-t $@
+MOSTLYCLEANFILES += ltdl/argz.h \
+ ltdl/argz.h-t
diff --git a/ltdl/README b/ltdl/README
new file mode 100644
index 00000000..e533467a
--- /dev/null
+++ b/ltdl/README
@@ -0,0 +1,37 @@
+This is GNU libltdl, a system independent dlopen wrapper for GNU libtool.
+
+It supports the following dlopen interfaces:
+* dlopen (Solaris, Linux and various BSD flavors)
+* shl_load (HP-UX)
+* LoadLibrary (Win16 and Win32)
+* load_add_on (BeOS)
+* GNU DLD (emulates dynamic linking for static libraries)
+* dyld (darwin/Mac OS X)
+* libtool's dlpreopen
+--
+ Copyright (C) 1999, 2003 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1999
+
+ This file is part of GNU Libtool.
+
+GNU Libtool is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License as
+published by the Free Software Foundation; either version 2 of
+the License, or (at your option) any later version.
+
+As a special exception to the GNU General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libtool 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 General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU Libtool; see the file COPYING. If not, a copy
+can be downloaded from http://www.gnu.org/licenses/gpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
diff --git a/ltdl/argz.c b/ltdl/argz.c
new file mode 100644
index 00000000..8567723b
--- /dev/null
+++ b/ltdl/argz.c
@@ -0,0 +1,226 @@
+/* argz.c -- argz implementation for non-glibc systems
+
+ Copyright (C) 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#if defined(LTDL) && defined LT_CONFIG_H
+# include LT_CONFIG_H
+#else
+# include <config.h>
+#endif
+
+#include <argz.h>
+
+#include <assert.h>
+#include <stddef.h>
+#include <stdlib.h>
+#include <sys/types.h>
+#include <errno.h>
+#include <string.h>
+
+#define EOS_CHAR '\0'
+
+error_t
+argz_append (char **pargz, size_t *pargz_len, const char *buf, size_t buf_len)
+{
+ size_t argz_len;
+ char *argz;
+
+ assert (pargz);
+ assert (pargz_len);
+ assert ((*pargz && *pargz_len) || (!*pargz && !*pargz_len));
+
+ /* If nothing needs to be appended, no more work is required. */
+ if (buf_len == 0)
+ return 0;
+
+ /* Ensure there is enough room to append BUF_LEN. */
+ argz_len = *pargz_len + buf_len;
+ argz = (char *) realloc (*pargz, argz_len);
+ if (!argz)
+ return ENOMEM;
+
+ /* Copy characters from BUF after terminating '\0' in ARGZ. */
+ memcpy (argz + *pargz_len, buf, buf_len);
+
+ /* Assign new values. */
+ *pargz = argz;
+ *pargz_len = argz_len;
+
+ return 0;
+}
+
+
+error_t
+argz_create_sep (const char *str, int delim, char **pargz, size_t *pargz_len)
+{
+ size_t argz_len;
+ char *argz = 0;
+
+ assert (str);
+ assert (pargz);
+ assert (pargz_len);
+
+ /* Make a copy of STR, but replacing each occurrence of
+ DELIM with '\0'. */
+ argz_len = 1+ strlen (str);
+ if (argz_len)
+ {
+ const char *p;
+ char *q;
+
+ argz = (char *) malloc (argz_len);
+ if (!argz)
+ return ENOMEM;
+
+ for (p = str, q = argz; *p != EOS_CHAR; ++p)
+ {
+ if (*p == delim)
+ {
+ /* Ignore leading delimiters, and fold consecutive
+ delimiters in STR into a single '\0' in ARGZ. */
+ if ((q > argz) && (q[-1] != EOS_CHAR))
+ *q++ = EOS_CHAR;
+ else
+ --argz_len;
+ }
+ else
+ *q++ = *p;
+ }
+ /* Copy terminating EOS_CHAR. */
+ *q = *p;
+ }
+
+ /* If ARGZ_LEN has shrunk to nothing, release ARGZ's memory. */
+ if (!argz_len)
+ argz = (free (argz), (char *) 0);
+
+ /* Assign new values. */
+ *pargz = argz;
+ *pargz_len = argz_len;
+
+ return 0;
+}
+
+
+error_t
+argz_insert (char **pargz, size_t *pargz_len, char *before, const char *entry)
+{
+ assert (pargz);
+ assert (pargz_len);
+ assert (entry && *entry);
+
+ /* No BEFORE address indicates ENTRY should be inserted after the
+ current last element. */
+ if (!before)
+ return argz_append (pargz, pargz_len, entry, 1+ strlen (entry));
+
+ /* This probably indicates a programmer error, but to preserve
+ semantics, scan back to the start of an entry if BEFORE points
+ into the middle of it. */
+ while ((before > *pargz) && (before[-1] != EOS_CHAR))
+ --before;
+
+ {
+ size_t entry_len = 1+ strlen (entry);
+ size_t argz_len = *pargz_len + entry_len;
+ size_t offset = before - *pargz;
+ char *argz = (char *) realloc (*pargz, argz_len);
+
+ if (!argz)
+ return ENOMEM;
+
+ /* Make BEFORE point to the equivalent offset in ARGZ that it
+ used to have in *PARGZ incase realloc() moved the block. */
+ before = argz + offset;
+
+ /* Move the ARGZ entries starting at BEFORE up into the new
+ space at the end -- making room to copy ENTRY into the
+ resulting gap. */
+ memmove (before + entry_len, before, *pargz_len - offset);
+ memcpy (before, entry, entry_len);
+
+ /* Assign new values. */
+ *pargz = argz;
+ *pargz_len = argz_len;
+ }
+
+ return 0;
+}
+
+
+char *
+argz_next (char *argz, size_t argz_len, const char *entry)
+{
+ assert ((argz && argz_len) || (!argz && !argz_len));
+
+ if (entry)
+ {
+ /* Either ARGZ/ARGZ_LEN is empty, or ENTRY points into an address
+ within the ARGZ vector. */
+ assert ((!argz && !argz_len)
+ || ((argz <= entry) && (entry < (argz + argz_len))));
+
+ /* Move to the char immediately after the terminating
+ '\0' of ENTRY. */
+ entry = 1+ strchr (entry, EOS_CHAR);
+
+ /* Return either the new ENTRY, or else NULL if ARGZ is
+ exhausted. */
+ return (entry >= argz + argz_len) ? 0 : (char *) entry;
+ }
+ else
+ {
+ /* This should probably be flagged as a programmer error,
+ since starting an argz_next loop with the iterator set
+ to ARGZ is safer. To preserve semantics, handle the NULL
+ case by returning the start of ARGZ (if any). */
+ if (argz_len > 0)
+ return argz;
+ else
+ return 0;
+ }
+}
+
+
+void
+argz_stringify (char *argz, size_t argz_len, int sep)
+{
+ assert ((argz && argz_len) || (!argz && !argz_len));
+
+ if (sep)
+ {
+ --argz_len; /* don't stringify the terminating EOS */
+ while (--argz_len > 0)
+ {
+ if (argz[argz_len] == EOS_CHAR)
+ argz[argz_len] = sep;
+ }
+ }
+}
+
diff --git a/ltdl/argz_.h b/ltdl/argz_.h
new file mode 100644
index 00000000..05575753
--- /dev/null
+++ b/ltdl/argz_.h
@@ -0,0 +1,68 @@
+/* lt__argz.h -- internal argz interface for non-glibc systems
+
+ Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#if !defined(LT__ARGZ_H)
+#define LT__ARGZ_H 1
+
+#include <stdlib.h>
+#define __need_error_t
+#include <errno.h>
+#include <sys/types.h>
+
+#if defined(LTDL)
+# include "lt__glibc.h"
+# include "lt_system.h"
+#else
+# define LT_SCOPE
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+LT_SCOPE error_t argz_append (char **pargz, size_t *pargz_len,
+ const char *buf, size_t buf_len);
+LT_SCOPE error_t argz_create_sep(const char *str, int delim,
+ char **pargz, size_t *pargz_len);
+LT_SCOPE error_t argz_insert (char **pargz, size_t *pargz_len,
+ char *before, const char *entry);
+LT_SCOPE char * argz_next (char *argz, size_t argz_len,
+ const char *entry);
+LT_SCOPE void argz_stringify (char *argz, size_t argz_len, int sep);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#if !defined(LTDL)
+# undef LT_SCOPE
+#endif
+
+#endif /*!defined(LT__ARGZ_H)*/
diff --git a/ltdl/libltdl/lt__alloc.h b/ltdl/libltdl/lt__alloc.h
new file mode 100644
index 00000000..1ceddf00
--- /dev/null
+++ b/ltdl/libltdl/lt__alloc.h
@@ -0,0 +1,58 @@
+/* lt__alloc.h -- internal memory management interface
+
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#if !defined(LT__ALLOC_H)
+#define LT__ALLOC_H 1
+
+#include "lt_system.h"
+
+LT_BEGIN_C_DECLS
+
+#define MALLOC(tp, n) (tp*) lt__malloc((n) * sizeof(tp))
+#define REALLOC(tp, mem, n) (tp*) lt__realloc((mem), (n) * sizeof(tp))
+#define FREE(mem) LT_STMT_START { \
+ if (mem) { free ((void *)mem); mem = NULL; } } LT_STMT_END
+#define MEMREASSIGN(p, q) LT_STMT_START { \
+ if ((p) != (q)) { if (p) free (p); (p) = (q); (q) = 0; } \
+ } LT_STMT_END
+
+/* If set, this function is called when memory allocation has failed. */
+LT_SCOPE void (*lt__alloc_die) (void);
+
+LT_SCOPE void *lt__malloc (size_t n);
+LT_SCOPE void *lt__zalloc (size_t n);
+LT_SCOPE void *lt__realloc (void *mem, size_t n);
+LT_SCOPE void *lt__memdup (void const *mem, size_t n);
+
+LT_SCOPE char *lt__strdup (const char *string);
+
+LT_END_C_DECLS
+
+#endif /*!defined(LT__ALLOC_H)*/
diff --git a/ltdl/libltdl/lt__dirent.h b/ltdl/libltdl/lt__dirent.h
new file mode 100644
index 00000000..4f24f82a
--- /dev/null
+++ b/ltdl/libltdl/lt__dirent.h
@@ -0,0 +1,87 @@
+/* lt__dirent.h -- internal directory entry scanning interface
+
+ Copyright (C) 2001, 2004, 2006 Free Software Foundation, Inc.
+ Written by Bob Friesenhahn, 2001
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#if !defined(LT__DIRENT_H)
+#define LT__DIRENT_H 1
+
+#if defined(LT_CONFIG_H)
+# include LT_CONFIG_H
+#else
+# include <config.h>
+#endif
+
+#include "lt_system.h"
+
+#ifdef HAVE_DIRENT_H
+/* We have a fully operational dirent subsystem. */
+# include <dirent.h>
+# define D_NAMLEN(dirent) (strlen((dirent)->d_name))
+
+#elif defined __WINDOWS__
+/* Use some wrapper code to emulate dirent on windows.. */
+# define WINDOWS_DIRENT_EMULATION 1
+
+# include <windows.h>
+
+# define D_NAMLEN(dirent) (strlen((dirent)->d_name))
+# define dirent lt__dirent
+# define DIR lt__DIR
+# define opendir lt__opendir
+# define readdir lt__readdir
+# define closedir lt__closedir
+
+LT_BEGIN_C_DECLS
+
+struct dirent
+{
+ char d_name[LT_FILENAME_MAX];
+ int d_namlen;
+};
+
+typedef struct
+{
+ HANDLE hSearch;
+ WIN32_FIND_DATA Win32FindData;
+ BOOL firsttime;
+ struct dirent file_info;
+} DIR;
+
+
+LT_SCOPE DIR * opendir (const char *path);
+LT_SCOPE struct dirent *readdir (DIR *entry);
+LT_SCOPE void closedir (DIR *entry);
+
+LT_END_C_DECLS
+
+#else /* !defined(__WINDOWS__)*/
+ERROR - cannot find dirent
+#endif /*!defined(__WINDOWS__)*/
+
+#endif /*!defined(LT__DIRENT_H)*/
diff --git a/ltdl/libltdl/lt__glibc.h b/ltdl/libltdl/lt__glibc.h
new file mode 100644
index 00000000..f284773d
--- /dev/null
+++ b/ltdl/libltdl/lt__glibc.h
@@ -0,0 +1,83 @@
+/* lt__glibc.h -- support for non glibc environments
+
+ Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#if !defined(LT__GLIBC_H)
+#define LT__GLIBC_H 1
+
+#if defined(LT_CONFIG_H)
+# include LT_CONFIG_H
+#else
+# include <config.h>
+#endif
+
+#if !defined(HAVE_ARGZ_H) || !defined(HAVE_WORKING_ARGZ)
+/* Redefine any glibc symbols we reimplement to import the
+ implementations into our lt__ namespace so we don't ever
+ clash with the system library if our clients use argz_*
+ from there in addition to libltdl. */
+# undef argz_append
+# define argz_append lt__argz_append
+# undef argz_create_sep
+# define argz_create_sep lt__argz_create_sep
+# undef argz_insert
+# define argz_insert lt__argz_insert
+# undef argz_next
+# define argz_next lt__argz_next
+# undef argz_stringify
+# define argz_stringify lt__argz_stringify
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <argz.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+# define slist_concat lt__slist_concat
+# define slist_cons lt__slist_cons
+# define slist_delete lt__slist_delete
+# define slist_remove lt__slist_remove
+# define slist_reverse lt__slist_reverse
+# define slist_sort lt__slist_sort
+# define slist_tail lt__slist_tail
+# define slist_nth lt__slist_nth
+# define slist_find lt__slist_find
+# define slist_length lt__slist_length
+# define slist_foreach lt__slist_foreach
+# define slist_box lt__slist_box
+# define slist_unbox lt__slist_unbox
+
+#include <slist.h>
+
+#endif /*!defined(LT__GLIBC_H)*/
diff --git a/ltdl/libltdl/lt__private.h b/ltdl/libltdl/lt__private.h
new file mode 100644
index 00000000..f4c4a3d7
--- /dev/null
+++ b/ltdl/libltdl/lt__private.h
@@ -0,0 +1,149 @@
+/* lt__private.h -- internal apis for libltdl
+
+ Copyright (C) 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+This library 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy con be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
+*/
+
+#if !defined(LT__PRIVATE_H)
+#define LT__PRIVATE_H 1
+
+#if defined(LT_CONFIG_H)
+# include LT_CONFIG_H
+#else
+# include <config.h>
+#endif
+
+#include <stdio.h>
+#include <ctype.h>
+#include <assert.h>
+#include <errno.h>
+#include <string.h>
+
+#if defined(HAVE_UNISTD_H)
+# include <unistd.h>
+#endif
+
+/* Import internal interfaces... */
+#include "lt__alloc.h"
+#include "lt__dirent.h"
+#include "lt__strl.h"
+#include "lt__glibc.h"
+
+/* ...and all exported interfaces. */
+#include "ltdl.h"
+
+#if defined(WITH_DMALLOC)
+# include <dmalloc.h>
+#endif
+
+/* DLL building support on win32 hosts; mostly to workaround their
+ ridiculous implementation of data symbol exporting. */
+#ifndef LT_GLOBAL_DATA
+# if defined(__WINDOWS__) || defined(__CYGWIN__)
+# if defined(DLL_EXPORT) /* defined by libtool (if required) */
+# define LT_GLOBAL_DATA __declspec(dllexport)
+# endif
+# endif
+# ifndef LT_GLOBAL_DATA
+# define LT_GLOBAL_DATA /* static linking or !__WINDOWS__ */
+# endif
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8) || __STRICT_ANSI__
+# define __attribute__(x)
+# endif
+#endif
+
+#ifndef LT__UNUSED
+# define LT__UNUSED __attribute__ ((__unused__))
+#endif
+
+
+LT_BEGIN_C_DECLS
+
+#if !defined(errno)
+extern int errno;
+#endif
+
+LT_SCOPE void lt__alloc_die_callback (void);
+
+
+/* For readability: */
+#define strneq(s1, s2) (strcmp((s1), (s2)) != 0)
+#define streq(s1, s2) (!strcmp((s1), (s2)))
+
+
+
+/* --- OPAQUE STRUCTURES DECLARED IN LTDL.H --- */
+
+/* This type is used for the array of interface data sets in each handler. */
+typedef struct {
+ lt_dlinterface_id key;
+ void * data;
+} lt_interface_data;
+
+struct lt__handle {
+ lt_dlhandle next;
+ const lt_dlvtable * vtable; /* dlopening interface */
+ lt_dlinfo info; /* user visible fields */
+ int depcount; /* number of dependencies */
+ lt_dlhandle * deplibs; /* dependencies */
+ lt_module module; /* system module handle */
+ void * system; /* system specific data */
+ lt_interface_data * interface_data; /* per caller associated data */
+ int flags; /* various boolean stats */
+};
+
+struct lt__advise {
+ unsigned int try_ext:1; /* try system library extensions. */
+ unsigned int is_resident:1; /* module can't be unloaded. */
+ unsigned int is_symglobal:1; /* module symbols can satisfy
+ subsequently loaded modules. */
+ unsigned int is_symlocal:1; /* module symbols are only available
+ locally. */
+ unsigned int try_preload_only:1;/* only preloaded modules will be tried. */
+};
+
+/* --- ERROR HANDLING --- */
+
+/* Extract the diagnostic strings from the error table macro in the same
+ order as the enumerated indices in lt_error.h. */
+
+#define LT__STRERROR(name) lt__error_string(LT_CONC(LT_ERROR_,name))
+
+#define LT__GETERROR(lvalue) (lvalue) = lt__get_last_error()
+#define LT__SETERRORSTR(errormsg) lt__set_last_error(errormsg)
+#define LT__SETERROR(errorcode) LT__SETERRORSTR(LT__STRERROR(errorcode))
+
+LT_SCOPE const char *lt__error_string (int errorcode);
+LT_SCOPE const char *lt__get_last_error (void);
+LT_SCOPE const char *lt__set_last_error (const char *errormsg);
+
+LT_END_C_DECLS
+
+#endif /*!defined(LT__PRIVATE_H)*/
diff --git a/ltdl/libltdl/lt__strl.h b/ltdl/libltdl/lt__strl.h
new file mode 100644
index 00000000..5799dc8a
--- /dev/null
+++ b/ltdl/libltdl/lt__strl.h
@@ -0,0 +1,53 @@
+/* lt__strl.h -- size-bounded string copying and concatenation
+
+ Copyright (C) 2004, 2006 Free Software Foundation, Inc.
+ Written by Bob Friesenhahn, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#if !defined(LT__STRL_H)
+#define LT__STRL_H 1
+
+#if defined(LT_CONFIG_H)
+# include LT_CONFIG_H
+#else
+# include <config.h>
+#endif
+
+#include <string.h>
+#include "lt_system.h"
+
+#if !defined(HAVE_STRLCAT)
+# define strlcat(dst,src,dstsize) lt_strlcat(dst,src,dstsize)
+LT_SCOPE size_t lt_strlcat(char *dst, const char *src, const size_t dstsize);
+#endif /* !defined(HAVE_STRLCAT) */
+
+#if !defined(HAVE_STRLCPY)
+# define strlcpy(dst,src,dstsize) lt_strlcpy(dst,src,dstsize)
+LT_SCOPE size_t lt_strlcpy(char *dst, const char *src, const size_t dstsize);
+#endif /* !defined(HAVE_STRLCPY) */
+
+#endif /*!defined(LT__STRL_H)*/
diff --git a/ltdl/libltdl/lt_dlloader.h b/ltdl/libltdl/lt_dlloader.h
new file mode 100644
index 00000000..ae131fae
--- /dev/null
+++ b/ltdl/libltdl/lt_dlloader.h
@@ -0,0 +1,90 @@
+/* lt_dlloader.h -- dynamic library loader interface
+
+ Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#if !defined(LT_DLLOADER_H)
+#define LT_DLLOADER_H 1
+
+#include <libltdl/lt_system.h>
+
+LT_BEGIN_C_DECLS
+
+typedef void * lt_dlloader;
+typedef void * lt_module;
+typedef void * lt_user_data;
+typedef struct lt__advise * lt_dladvise;
+
+/* Function pointer types for module loader vtable entries: */
+typedef lt_module lt_module_open (lt_user_data data,
+ const char *filename,
+ lt_dladvise advise);
+typedef int lt_module_close (lt_user_data data,
+ lt_module module);
+typedef void * lt_find_sym (lt_user_data data, lt_module module,
+ const char *symbolname);
+typedef int lt_dlloader_init (lt_user_data data);
+typedef int lt_dlloader_exit (lt_user_data data);
+
+/* Default priority is LT_DLLOADER_PREPEND if none is explicitly given. */
+typedef enum {
+ LT_DLLOADER_PREPEND = 0, LT_DLLOADER_APPEND
+} lt_dlloader_priority;
+
+/* This structure defines a module loader, as populated by the get_vtable
+ entry point of each loader. */
+typedef struct {
+ const char * name;
+ const char * sym_prefix;
+ lt_module_open * module_open;
+ lt_module_close * module_close;
+ lt_find_sym * find_sym;
+ lt_dlloader_init * dlloader_init;
+ lt_dlloader_exit * dlloader_exit;
+ lt_user_data dlloader_data;
+ lt_dlloader_priority priority;
+} lt_dlvtable;
+
+LT_SCOPE int lt_dlloader_add (const lt_dlvtable *vtable);
+LT_SCOPE lt_dlloader lt_dlloader_next (const lt_dlloader loader);
+
+LT_SCOPE lt_dlvtable * lt_dlloader_remove (char *name);
+LT_SCOPE const lt_dlvtable *lt_dlloader_find (char *name);
+LT_SCOPE const lt_dlvtable *lt_dlloader_get (lt_dlloader loader);
+
+
+/* Type of a function to get a loader's vtable: */
+typedef const lt_dlvtable *lt_get_vtable (lt_user_data data);
+
+#ifdef LT_DEBUG_LOADERS
+LT_SCOPE void lt_dlloader_dump (void);
+#endif
+
+LT_END_C_DECLS
+
+#endif /*!defined(LT_DLLOADER_H)*/
diff --git a/ltdl/libltdl/lt_error.h b/ltdl/libltdl/lt_error.h
new file mode 100644
index 00000000..e789b3a4
--- /dev/null
+++ b/ltdl/libltdl/lt_error.h
@@ -0,0 +1,85 @@
+/* lt_error.h -- error propogation interface
+
+ Copyright (C) 1999, 2000, 2001, 2004, 2007 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1999
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/* Only include this header file once. */
+#if !defined(LT_ERROR_H)
+#define LT_ERROR_H 1
+
+#include <libltdl/lt_system.h>
+
+LT_BEGIN_C_DECLS
+
+/* Defining error strings alongside their symbolic names in a macro in
+ this way allows us to expand the macro in different contexts with
+ confidence that the enumeration of symbolic names will map correctly
+ onto the table of error strings. \0 is appended to the strings to
+ expilicitely initialize the string terminator. */
+#define lt_dlerror_table \
+ LT_ERROR(UNKNOWN, "unknown error\0") \
+ LT_ERROR(DLOPEN_NOT_SUPPORTED, "dlopen support not available\0") \
+ LT_ERROR(INVALID_LOADER, "invalid loader\0") \
+ LT_ERROR(INIT_LOADER, "loader initialization failed\0") \
+ LT_ERROR(REMOVE_LOADER, "loader removal failed\0") \
+ LT_ERROR(FILE_NOT_FOUND, "file not found\0") \
+ LT_ERROR(DEPLIB_NOT_FOUND, "dependency library not found\0") \
+ LT_ERROR(NO_SYMBOLS, "no symbols defined\0") \
+ LT_ERROR(CANNOT_OPEN, "can't open the module\0") \
+ LT_ERROR(CANNOT_CLOSE, "can't close the module\0") \
+ LT_ERROR(SYMBOL_NOT_FOUND, "symbol not found\0") \
+ LT_ERROR(NO_MEMORY, "not enough memory\0") \
+ LT_ERROR(INVALID_HANDLE, "invalid module handle\0") \
+ LT_ERROR(BUFFER_OVERFLOW, "internal buffer overflow\0") \
+ LT_ERROR(INVALID_ERRORCODE, "invalid errorcode\0") \
+ LT_ERROR(SHUTDOWN, "library already shutdown\0") \
+ LT_ERROR(CLOSE_RESIDENT_MODULE, "can't close resident module\0") \
+ LT_ERROR(INVALID_MUTEX_ARGS, "internal error (code withdrawn)\0")\
+ LT_ERROR(INVALID_POSITION, "invalid search path insert position\0")\
+ LT_ERROR(CONFLICTING_FLAGS, "symbol visibility can be global or local\0")
+
+/* Enumerate the symbolic error names. */
+enum {
+#define LT_ERROR(name, diagnostic) LT_CONC(LT_ERROR_, name),
+ lt_dlerror_table
+#undef LT_ERROR
+
+ LT_ERROR_MAX
+};
+
+/* Should be max of the error string lengths above (plus one for C++) */
+#define LT_ERROR_LEN_MAX (41)
+
+/* These functions are only useful from inside custom module loaders. */
+LT_SCOPE int lt_dladderror (const char *diagnostic);
+LT_SCOPE int lt_dlseterror (int errorcode);
+
+
+LT_END_C_DECLS
+
+#endif /*!defined(LT_ERROR_H)*/
diff --git a/ltdl/libltdl/lt_system.h b/ltdl/libltdl/lt_system.h
new file mode 100644
index 00000000..dab2ab6b
--- /dev/null
+++ b/ltdl/libltdl/lt_system.h
@@ -0,0 +1,154 @@
+/* lt_system.h -- system portability abstraction layer
+
+ Copyright (C) 2004, 2007 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#if !defined(LT_SYSTEM_H)
+#define LT_SYSTEM_H 1
+
+#include <stddef.h>
+#include <stdlib.h>
+#include <sys/types.h>
+
+/* Some systems do not define EXIT_*, even with STDC_HEADERS. */
+#if !defined(EXIT_SUCCESS)
+# define EXIT_SUCCESS 0
+#endif
+#if !defined(EXIT_FAILURE)
+# define EXIT_FAILURE 1
+#endif
+
+/* Just pick a big number... */
+#define LT_FILENAME_MAX 2048
+
+
+/* Saves on those hard to debug '\0' typos.... */
+#define LT_EOS_CHAR '\0'
+
+/* LTDL_BEGIN_C_DECLS should be used at the beginning of your declarations,
+ so that C++ compilers don't mangle their names. Use LTDL_END_C_DECLS at
+ the end of C declarations. */
+#if defined(__cplusplus)
+# define LT_BEGIN_C_DECLS extern "C" {
+# define LT_END_C_DECLS }
+#else
+# define LT_BEGIN_C_DECLS /* empty */
+# define LT_END_C_DECLS /* empty */
+#endif
+
+/* LT_STMT_START/END are used to create macros which expand to a
+ a single compound statement in a portable way. */
+#if defined (__GNUC__) && !defined (__STRICT_ANSI__) && !defined (__cplusplus)
+# define LT_STMT_START (void)(
+# define LT_STMT_END )
+#else
+# if (defined (sun) || defined (__sun__))
+# define LT_STMT_START if (1)
+# define LT_STMT_END else (void)0
+# else
+# define LT_STMT_START do
+# define LT_STMT_END while (0)
+# endif
+#endif
+
+/* Canonicalise Windows and Cygwin recognition macros.
+ To match the values set by recent Cygwin compilers, make sure that if
+ __CYGWIN__ is defined (after canonicalisation), __WINDOWS__ is NOT! */
+#if defined(__CYGWIN32__) && !defined(__CYGWIN__)
+# define __CYGWIN__ __CYGWIN32__
+#endif
+#if defined(__CYGWIN__)
+# if defined(__WINDOWS__)
+# undef __WINDOWS__
+# endif
+#elif defined(_WIN32)
+# define __WINDOWS__ _WIN32
+#elif defined(WIN32)
+# define __WINDOWS__ WIN32
+#endif
+#if defined(__CYGWIN__) && defined(__WINDOWS__)
+# undef __WINDOWS__
+#endif
+
+
+/* DLL building support on win32 hosts; mostly to workaround their
+ ridiculous implementation of data symbol exporting. */
+#if !defined(LT_SCOPE)
+# if defined(__WINDOWS__) || defined(__CYGWIN__)
+# if defined(DLL_EXPORT) /* defined by libtool (if required) */
+# define LT_SCOPE extern __declspec(dllexport)
+# endif
+# if defined(LIBLTDL_DLL_IMPORT) /* define if linking with this dll */
+ /* note: cygwin/mingw compilers can rely instead on auto-import */
+# define LT_SCOPE extern __declspec(dllimport)
+# endif
+# endif
+# if !defined(LT_SCOPE) /* static linking or !__WINDOWS__ */
+# define LT_SCOPE extern
+# endif
+#endif
+
+#if defined(__WINDOWS__)
+/* LT_DIRSEP_CHAR is accepted *in addition* to '/' as a directory
+ separator when it is set. */
+# define LT_DIRSEP_CHAR '\\'
+# define LT_PATHSEP_CHAR ';'
+#else
+# define LT_PATHSEP_CHAR ':'
+#endif
+
+#if defined(_MSC_VER) /* Visual Studio */
+# define R_OK 4
+#endif
+
+/* fopen() mode flags for reading a text file */
+#undef LT_READTEXT_MODE
+#if defined(__WINDOWS__) || defined(__CYGWIN__)
+# define LT_READTEXT_MODE "rt"
+#else
+# define LT_READTEXT_MODE "r"
+#endif
+
+/* The extra indirection to the LT__STR and LT__CONC macros is required so
+ that if the arguments to LT_STR() (or LT_CONC()) are themselves macros,
+ they will be expanded before being quoted. */
+#ifndef LT_STR
+# define LT__STR(arg) #arg
+# define LT_STR(arg) LT__STR(arg)
+#endif
+
+#ifndef LT_CONC
+# define LT__CONC(a, b) a##b
+# define LT_CONC(a, b) LT__CONC(a, b)
+#endif
+#ifndef LT_CONC3
+# define LT__CONC3(a, b, c) a##b##c
+# define LT_CONC3(a, b, c) LT__CONC3(a, b, c)
+#endif
+
+#endif /*!defined(LT_SYSTEM_H)*/
diff --git a/ltdl/libltdl/slist.h b/ltdl/libltdl/slist.h
new file mode 100644
index 00000000..e4b7ead8
--- /dev/null
+++ b/ltdl/libltdl/slist.h
@@ -0,0 +1,94 @@
+/* slist.h -- generalised singly linked lists
+
+ Copyright (C) 2000, 2004 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2000
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/* A generalised list. This is deliberately transparent so that you
+ can make the NEXT field of all your chained data structures first,
+ and then cast them to `(SList *)' so that they can be manipulated
+ by this API.
+
+ Alternatively, you can generate raw SList elements using slist_new(),
+ and put the element data in the USERDATA field. Either way you
+ get to manage the memory involved by yourself.
+*/
+
+#if !defined(SLIST_H)
+#define SLIST_H 1
+
+#if defined(LTDL)
+# include <libltdl/lt__glibc.h>
+# include <libltdl/lt_system.h>
+#else
+# define LT_SCOPE
+#endif
+
+#if defined(__cplusplus)
+extern "C" {
+#endif
+
+typedef struct slist {
+ struct slist *next; /* chain forward pointer*/
+ const void *userdata; /* for boxed `SList' item */
+} SList;
+
+typedef void * SListCallback (SList *item, void *userdata);
+typedef int SListCompare (const SList *item1, const SList *item2,
+ void *userdata);
+
+LT_SCOPE SList *slist_concat (SList *head, SList *tail);
+LT_SCOPE SList *slist_cons (SList *item, SList *slist);
+
+LT_SCOPE SList *slist_delete (SList *slist, void (*delete_fct) (void *item));
+LT_SCOPE void * slist_remove (SList **phead, SListCallback *find,
+ void *matchdata);
+LT_SCOPE SList *slist_reverse (SList *slist);
+LT_SCOPE SList *slist_sort (SList *slist, SListCompare *compare,
+ void *userdata);
+
+LT_SCOPE SList *slist_tail (SList *slist);
+LT_SCOPE SList *slist_nth (SList *slist, size_t n);
+LT_SCOPE void * slist_find (SList *slist, SListCallback *find,
+ void *matchdata);
+LT_SCOPE size_t slist_length (SList *slist);
+
+LT_SCOPE void * slist_foreach (SList *slist, SListCallback *foreach,
+ void *userdata);
+
+LT_SCOPE SList *slist_box (const void *userdata);
+LT_SCOPE void * slist_unbox (SList *item);
+
+#if defined(__cplusplus)
+}
+#endif
+
+#if !defined(LTDL)
+# undef LT_SCOPE
+#endif
+
+#endif /*!defined(SLIST_H)*/
diff --git a/ltdl/loaders/dld_link.c b/ltdl/loaders/dld_link.c
new file mode 100644
index 00000000..7e882c9e
--- /dev/null
+++ b/ltdl/loaders/dld_link.c
@@ -0,0 +1,158 @@
+/* loader-dld_link.c -- dynamic linking with dld
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable dld_link_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_dld_link";
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_APPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#if defined(HAVE_DLD_H)
+# include <dld.h>
+#endif
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ lt_module module = lt__strdup (filename);
+
+ if (dld_link (filename) != 0)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ FREE (module);
+ }
+
+ return module;
+}
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (dld_unlink_by_file ((char*)(module), 1) != 0)
+ {
+ LT__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+ else
+ {
+ FREE (module);
+ }
+
+ return errors;
+}
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module,
+ const char *name)
+{
+ void *address = dld_get_func (name);
+
+ if (!address)
+ {
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+ }
+
+ return address;
+}
diff --git a/ltdl/loaders/dlopen.c b/ltdl/loaders/dlopen.c
new file mode 100644
index 00000000..1d052b4f
--- /dev/null
+++ b/ltdl/loaders/dlopen.c
@@ -0,0 +1,235 @@
+/* loader-dlopen.c -- dynamic linking with dlopen/dlsym
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable dlopen_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_dlopen";
+#if defined(DLSYM_USCORE)
+ vtable->sym_prefix = "_";
+#endif
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_PREPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#if defined(HAVE_DLFCN_H)
+# include <dlfcn.h>
+#endif
+
+#if defined(HAVE_SYS_DL_H)
+# include <sys/dl.h>
+#endif
+
+
+/* We may have to define LT_LAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#if !defined(LT_LAZY_OR_NOW)
+# if defined(RTLD_LAZY)
+# define LT_LAZY_OR_NOW RTLD_LAZY
+# else
+# if defined(DL_LAZY)
+# define LT_LAZY_OR_NOW DL_LAZY
+# endif
+# endif /* !RTLD_LAZY */
+#endif
+#if !defined(LT_LAZY_OR_NOW)
+# if defined(RTLD_NOW)
+# define LT_LAZY_OR_NOW RTLD_NOW
+# else
+# if defined(DL_NOW)
+# define LT_LAZY_OR_NOW DL_NOW
+# endif
+# endif /* !RTLD_NOW */
+#endif
+#if !defined(LT_LAZY_OR_NOW)
+# define LT_LAZY_OR_NOW 0
+#endif /* !LT_LAZY_OR_NOW */
+
+/* We only support local and global symbols from modules for loaders
+ that provide such a thing, otherwise the system default is used. */
+#if !defined(RTLD_GLOBAL)
+# if defined(DL_GLOBAL)
+# define RTLD_GLOBAL DL_GLOBAL
+# endif
+#endif /* !RTLD_GLOBAL */
+#if !defined(RTLD_LOCAL)
+# if defined(DL_LOCAL)
+# define RTLD_LOCAL DL_LOCAL
+# endif
+#endif /* !RTLD_LOCAL */
+
+#if defined(HAVE_DLERROR)
+# define DLERROR(arg) dlerror ()
+#else
+# define DLERROR(arg) LT__STRERROR (arg)
+#endif
+
+#define DL__SETERROR(errorcode) \
+ LT__SETERRORSTR (DLERROR (errorcode))
+
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise advise)
+{
+ int module_flags = LT_LAZY_OR_NOW;
+ lt_module module;
+
+ if (advise)
+ {
+#ifdef RTLD_GLOBAL
+ /* If there is some means of asking for global symbol resolution,
+ do so. */
+ if (advise->is_symglobal)
+ module_flags |= RTLD_GLOBAL;
+#else
+ /* Otherwise, reset that bit so the caller can tell it wasn't
+ acted on. */
+ advise->is_symglobal = 0;
+#endif
+
+/* And similarly for local only symbol resolution. */
+#ifdef RTLD_LOCAL
+ if (advise->is_symlocal)
+ module_flags |= RTLD_LOCAL;
+#else
+ advise->is_symlocal = 0;
+#endif
+ }
+
+ module = dlopen (filename, module_flags);
+
+ if (!module)
+ {
+ DL__SETERROR (CANNOT_OPEN);
+ }
+
+ return module;
+}
+
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (dlclose (module) != 0)
+ {
+ DL__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
+{
+ void *address = dlsym (module, name);
+
+ if (!address)
+ {
+ DL__SETERROR (SYMBOL_NOT_FOUND);
+ }
+
+ return address;
+}
diff --git a/ltdl/loaders/dyld.c b/ltdl/loaders/dyld.c
new file mode 100644
index 00000000..b139d6c4
--- /dev/null
+++ b/ltdl/loaders/dyld.c
@@ -0,0 +1,511 @@
+/* loader-dyld.c -- dynamic linking on darwin and OS X
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Peter O'Gorman, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable dyld_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_init (lt_user_data loader_data);
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_dyld";
+ vtable->sym_prefix = "_";
+ vtable->dlloader_init = vl_init;
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_APPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#if defined(HAVE_MACH_O_DYLD_H)
+# if !defined(__APPLE_CC__) && !defined(__MWERKS__) && !defined(__private_extern__)
+ /* Is this correct? Does it still function properly? */
+# define __private_extern__ extern
+# endif
+# include <mach-o/dyld.h>
+#endif
+
+#include <mach-o/getsect.h>
+
+/* We have to put some stuff here that isn't in older dyld.h files */
+#if !defined(ENUM_DYLD_BOOL)
+# define ENUM_DYLD_BOOL
+# undef FALSE
+# undef TRUE
+ enum DYLD_BOOL {
+ FALSE,
+ TRUE
+ };
+#endif
+#if !defined(LC_REQ_DYLD)
+# define LC_REQ_DYLD 0x80000000
+#endif
+#if !defined(LC_LOAD_WEAK_DYLIB)
+# define LC_LOAD_WEAK_DYLIB (0x18 | LC_REQ_DYLD)
+#endif
+
+#if !defined(NSADDIMAGE_OPTION_NONE)
+# define NSADDIMAGE_OPTION_NONE 0x0
+#endif
+#if !defined(NSADDIMAGE_OPTION_RETURN_ON_ERROR)
+# define NSADDIMAGE_OPTION_RETURN_ON_ERROR 0x1
+#endif
+#if !defined(NSADDIMAGE_OPTION_WITH_SEARCHING)
+# define NSADDIMAGE_OPTION_WITH_SEARCHING 0x2
+#endif
+#if !defined(NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED)
+# define NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED 0x4
+#endif
+#if !defined(NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME)
+# define NSADDIMAGE_OPTION_MATCH_FILENAME_BY_INSTALLNAME 0x8
+#endif
+
+#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND)
+# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND 0x0
+#endif
+#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW)
+# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW 0x1
+#endif
+#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY)
+# define NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_FULLY 0x2
+#endif
+#if !defined(NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
+# define NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR 0x4
+#endif
+
+#define LT__SYMLOOKUP_OPTS (NSLOOKUPSYMBOLINIMAGE_OPTION_BIND_NOW \
+ | NSLOOKUPSYMBOLINIMAGE_OPTION_RETURN_ON_ERROR)
+
+#if defined(__BIG_ENDIAN__)
+# define LT__MAGIC MH_MAGIC
+#else
+# define LT__MAGIC MH_CIGAM
+#endif
+
+#define DYLD__SETMYERROR(errmsg) LT__SETERRORSTR (dylderror (errmsg))
+#define DYLD__SETERROR(errcode) DYLD__SETMYERROR (LT__STRERROR (errcode))
+
+typedef struct mach_header mach_header;
+typedef struct dylib_command dylib_command;
+
+static const char *dylderror (const char *errmsg);
+static const mach_header *lt__nsmodule_get_header (NSModule module);
+static const char *lt__header_get_instnam (const mach_header *mh);
+static const mach_header *lt__match_loadedlib (const char *name);
+static NSSymbol lt__linkedlib_symbol (const char *symname, const mach_header *mh);
+
+static const mach_header *(*lt__addimage) (const char *image_name,
+ unsigned long options) = 0;
+static NSSymbol (*lt__image_symbol) (const mach_header *image,
+ const char *symbolName,
+ unsigned long options) = 0;
+static enum DYLD_BOOL (*lt__image_symbol_p) (const mach_header *image,
+ const char *symbolName) = 0;
+static enum DYLD_BOOL (*lt__module_export) (NSModule module) = 0;
+
+static int dyld_cannot_close = 0;
+
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+/* A function called through the vtable to initialise this loader. */
+static int
+vl_init (lt_user_data loader_data)
+{
+ int errors = 0;
+
+ if (! dyld_cannot_close)
+ {
+ if (!_dyld_present ())
+ {
+ ++errors;
+ }
+ else
+ {
+ (void) _dyld_func_lookup ("__dyld_NSAddImage",
+ (unsigned long*) &lt__addimage);
+ (void) _dyld_func_lookup ("__dyld_NSLookupSymbolInImage",
+ (unsigned long*)&lt__image_symbol);
+ (void) _dyld_func_lookup ("__dyld_NSIsSymbolNameDefinedInImage",
+ (unsigned long*) &lt__image_symbol_p);
+ (void) _dyld_func_lookup ("__dyld_NSMakePrivateModulePublic",
+ (unsigned long*) &lt__module_export);
+ dyld_cannot_close = lt_dladderror ("can't close a dylib");
+ }
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ lt_module module = 0;
+ NSObjectFileImage ofi = 0;
+
+ if (!filename)
+ {
+ return (lt_module) -1;
+ }
+
+ switch (NSCreateObjectFileImageFromFile (filename, &ofi))
+ {
+ case NSObjectFileImageSuccess:
+ module = NSLinkModule (ofi, filename, NSLINKMODULE_OPTION_RETURN_ON_ERROR
+ | NSLINKMODULE_OPTION_PRIVATE
+ | NSLINKMODULE_OPTION_BINDNOW);
+ NSDestroyObjectFileImage (ofi);
+
+ if (module)
+ {
+ lt__module_export (module);
+ }
+ break;
+
+ case NSObjectFileImageInappropriateFile:
+ if (lt__image_symbol_p && lt__image_symbol)
+ {
+ module = (lt_module) lt__addimage(filename,
+ NSADDIMAGE_OPTION_RETURN_ON_ERROR);
+ }
+ break;
+
+ case NSObjectFileImageFailure:
+ case NSObjectFileImageArch:
+ case NSObjectFileImageFormat:
+ case NSObjectFileImageAccess:
+ /*NOWORK*/
+ break;
+ }
+
+ if (!module)
+ {
+ DYLD__SETERROR (CANNOT_OPEN);
+ }
+
+ return module;
+}
+
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (module != (lt_module) -1)
+ {
+ const mach_header *mh = (const mach_header *) module;
+ int flags = 0;
+ if (mh->magic == LT__MAGIC)
+ {
+ lt_dlseterror (dyld_cannot_close);
+ ++errors;
+ }
+ else
+ {
+ /* Currently, if a module contains c++ static destructors and it
+ is unloaded, we get a segfault in atexit(), due to compiler and
+ dynamic loader differences of opinion, this works around that. */
+ if ((const struct section *) NULL !=
+ getsectbynamefromheader (lt__nsmodule_get_header (module),
+ "__DATA", "__mod_term_func"))
+ {
+ flags |= NSUNLINKMODULE_OPTION_KEEP_MEMORY_MAPPED;
+ }
+#if defined(__ppc__)
+ flags |= NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES;
+#endif
+ if (!NSUnLinkModule (module, flags))
+ {
+ DYLD__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+ }
+ }
+
+ return errors;
+}
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data loader_data, lt_module module, const char *name)
+{
+ NSSymbol *nssym = 0;
+ const mach_header *mh = (const mach_header *) module;
+ char saveError[256] = "Symbol not found";
+
+ if (module == (lt_module) -1)
+ {
+ void *address, *unused;
+ _dyld_lookup_and_bind (name, (unsigned long*) &address, &unused);
+ return address;
+ }
+
+ if (mh->magic == LT__MAGIC)
+ {
+ if (lt__image_symbol_p && lt__image_symbol)
+ {
+ if (lt__image_symbol_p (mh, name))
+ {
+ nssym = lt__image_symbol (mh, name, LT__SYMLOOKUP_OPTS);
+ }
+ }
+
+ }
+ else
+ {
+ nssym = NSLookupSymbolInModule (module, name);
+ }
+
+ if (!nssym)
+ {
+ strncpy (saveError, dylderror (LT__STRERROR (SYMBOL_NOT_FOUND)), 255);
+ saveError[255] = 0;
+ if (!mh)
+ {
+ mh = (mach_header *)lt__nsmodule_get_header (module);
+ }
+ nssym = lt__linkedlib_symbol (name, mh);
+ }
+
+ if (!nssym)
+ {
+ LT__SETERRORSTR (saveError);
+ }
+
+ return nssym ? NSAddressOfSymbol (nssym) : 0;
+}
+
+
+
+
+/* --- HELPER FUNCTIONS --- */
+
+
+/* Return the dyld error string, or the passed in error string if none. */
+static const char *
+dylderror (const char *errmsg)
+{
+ NSLinkEditErrors ler;
+ int lerno;
+ const char *file;
+ const char *errstr;
+
+ NSLinkEditError (&ler, &lerno, &file, &errstr);
+
+ if (! (errstr && *errstr))
+ {
+ errstr = errmsg;
+ }
+
+ return errstr;
+}
+
+/* There should probably be an apple dyld api for this. */
+static const mach_header *
+lt__nsmodule_get_header (NSModule module)
+{
+ int i = _dyld_image_count();
+ const char *modname = NSNameOfModule (module);
+ const mach_header *mh = 0;
+
+ if (!modname)
+ return NULL;
+
+ while (i > 0)
+ {
+ --i;
+ if (strneq (_dyld_get_image_name (i), modname))
+ {
+ mh = _dyld_get_image_header (i);
+ break;
+ }
+ }
+
+ return mh;
+}
+
+/* NSAddImage is also used to get the loaded image, but it only works if
+ the lib is installed, for uninstalled libs we need to check the
+ install_names against each other. Note that this is still broken if
+ DYLD_IMAGE_SUFFIX is set and a different lib was loaded as a result. */
+static const char *
+lt__header_get_instnam (const mach_header *mh)
+{
+ unsigned long offset = sizeof(mach_header);
+ const char* result = 0;
+ int j;
+
+ for (j = 0; j < mh->ncmds; j++)
+ {
+ struct load_command *lc;
+
+ lc = (struct load_command*) (((unsigned long) mh) + offset);
+ if (LC_ID_DYLIB == lc->cmd)
+ {
+ result=(char*)(((dylib_command*) lc)->dylib.name.offset +
+ (unsigned long) lc);
+ }
+ offset += lc->cmdsize;
+ }
+
+ return result;
+}
+
+static const mach_header *
+lt__match_loadedlib (const char *name)
+{
+ const mach_header *mh = 0;
+ int i = _dyld_image_count();
+
+ while (i > 0)
+ {
+ const char *id;
+
+ --i;
+ id = lt__header_get_instnam (_dyld_get_image_header (i));
+ if (id && strneq (id, name))
+ {
+ mh = _dyld_get_image_header (i);
+ break;
+ }
+ }
+
+ return mh;
+}
+
+/* Safe to assume our mh is good. */
+static NSSymbol
+lt__linkedlib_symbol (const char *symname, const mach_header *mh)
+{
+ NSSymbol symbol = 0;
+
+ if (lt__image_symbol && NSIsSymbolNameDefined (symname))
+ {
+ unsigned long offset = sizeof(mach_header);
+ struct load_command *lc;
+ int j;
+
+ for (j = 0; j < mh->ncmds; j++)
+ {
+ lc = (struct load_command*) (((unsigned long) mh) + offset);
+ if ((LC_LOAD_DYLIB == lc->cmd) || (LC_LOAD_WEAK_DYLIB == lc->cmd))
+ {
+ unsigned long base = ((dylib_command *) lc)->dylib.name.offset;
+ char *name = (char *) (base + (unsigned long) lc);
+ const mach_header *mh1 = lt__match_loadedlib (name);
+
+ if (!mh1)
+ {
+ /* Maybe NSAddImage can find it */
+ mh1 = lt__addimage (name,
+ NSADDIMAGE_OPTION_RETURN_ONLY_IF_LOADED
+ | NSADDIMAGE_OPTION_WITH_SEARCHING
+ | NSADDIMAGE_OPTION_RETURN_ON_ERROR);
+ }
+
+ if (mh1)
+ {
+ symbol = lt__image_symbol (mh1, symname, LT__SYMLOOKUP_OPTS);
+ if (symbol)
+ break;
+ }
+ }
+
+ offset += lc->cmdsize;
+ }
+ }
+
+ return symbol;
+}
diff --git a/ltdl/loaders/load_add_on.c b/ltdl/loaders/load_add_on.c
new file mode 100644
index 00000000..379f9ba1
--- /dev/null
+++ b/ltdl/loaders/load_add_on.c
@@ -0,0 +1,167 @@
+/* loader-load_add_on.c -- dynamic linking for BeOS
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable load_add_on_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_load_add_on";
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_APPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#include <kernel/image.h>
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ image_id image = 0;
+
+ if (filename)
+ {
+ image = load_add_on (filename);
+ }
+ else
+ {
+ image_info info;
+ int32 cookie = 0;
+ if (get_next_image_info (0, &cookie, &info) == B_OK)
+ image = load_add_on (info.name);
+ }
+
+ if (image <= 0)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ image = 0;
+ }
+
+ return (lt_module) image;
+}
+
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (unload_add_on ((image_id) module) != B_OK)
+ {
+ LT__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
+{
+ void *address = 0;
+ image_id image = (image_id) module;
+
+ if (get_image_symbol (image, name, B_SYMBOL_TYPE_ANY, address) != B_OK)
+ {
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+ address = 0;
+ }
+
+ return address;
+}
diff --git a/ltdl/loaders/loadlibrary.c b/ltdl/loaders/loadlibrary.c
new file mode 100644
index 00000000..56446765
--- /dev/null
+++ b/ltdl/loaders/loadlibrary.c
@@ -0,0 +1,251 @@
+/* loader-loadlibrary.c -- dynamic linking for Win32
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+#if defined(__CYGWIN__)
+# include <sys/cygwin.h>
+#endif
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable loadlibrary_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlinterface_id iface_id = 0;
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
+ iface_id = lt_dlinterface_register ("ltdl loadlibrary", NULL);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_loadlibrary";
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_APPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#include <windows.h>
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ lt_module module = 0;
+ char *ext;
+ char wpath[MAX_PATH];
+ size_t len;
+
+ if (!filename)
+ {
+ /* Get the name of main module */
+ *wpath = 0;
+ GetModuleFileName (NULL, wpath, sizeof (wpath));
+ filename = wpath;
+ }
+ else
+ {
+ len = LT_STRLEN (filename);
+
+ if (len >= MAX_PATH)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ return 0;
+ }
+
+#if HAVE_DECL_CYGWIN_CONV_PATH
+ if (cygwin_conv_path (CCP_POSIX_TO_WIN_A, filename, wpath, MAX_PATH))
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ return 0;
+ }
+ len = 0;
+#elif defined(__CYGWIN__)
+ cygwin_conv_to_full_win32_path (filename, wpath);
+ len = 0;
+#else
+ strcpy(wpath, filename);
+#endif
+
+ ext = strrchr (wpath, '.');
+ if (!ext)
+ {
+ /* Append a `.' to stop Windows from adding an
+ implicit `.dll' extension. */
+ if (!len)
+ len = LT_STRLEN (wpath);
+
+ if (len + 1 >= MAX_PATH)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ return 0;
+ }
+
+ wpath[len] = '.';
+ wpath[len+1] = '\0';
+ }
+ }
+
+ {
+ /* Silence dialog from LoadLibrary on some failures.
+ No way to get the error mode, but to set it,
+ so set it twice to preserve any previous flags. */
+ UINT errormode = SetErrorMode(SEM_FAILCRITICALERRORS);
+ SetErrorMode(errormode | SEM_FAILCRITICALERRORS);
+
+ module = LoadLibrary (wpath);
+
+ /* Restore the error mode. */
+ SetErrorMode(errormode);
+ }
+
+ /* libltdl expects this function to fail if it is unable
+ to physically load the library. Sadly, LoadLibrary
+ will search the loaded libraries for a match and return
+ one of them if the path search load fails.
+
+ We check whether LoadLibrary is returning a handle to
+ an already loaded module, and simulate failure if we
+ find one. */
+ {
+ lt_dlhandle cur = 0;
+
+ while ((cur = lt_dlhandle_iterate (iface_id, cur)))
+ {
+ if (!cur->module)
+ {
+ cur = 0;
+ break;
+ }
+
+ if (cur->module == module)
+ {
+ break;
+ }
+ }
+
+ if (cur || !module)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ module = 0;
+ }
+ }
+
+ return module;
+}
+
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (FreeLibrary((HMODULE) module) == 0)
+ {
+ LT__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
+{
+ void *address = (void *) GetProcAddress ((HMODULE) module, name);
+
+ if (!address)
+ {
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+ }
+
+ return address;
+}
diff --git a/ltdl/loaders/preopen.c b/ltdl/loaders/preopen.c
new file mode 100644
index 00000000..7149287d
--- /dev/null
+++ b/ltdl/loaders/preopen.c
@@ -0,0 +1,375 @@
+/* loader-preopen.c -- emulate dynamic linking using preloaded_symbols
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable preopen_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_init (lt_user_data loader_data);
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = (lt_dlvtable *) lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_preopen";
+ vtable->sym_prefix = 0;
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_init = vl_init;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_PREPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+/* Wrapper type to chain together symbol lists of various origins. */
+typedef struct symlist_chain
+{
+ struct symlist_chain *next;
+ const lt_dlsymlist *symlist;
+} symlist_chain;
+
+
+static int add_symlist (const lt_dlsymlist *symlist);
+static int free_symlists (void);
+
+/* The start of the symbol lists chain. */
+static symlist_chain *preloaded_symlists = 0;
+
+/* A symbol list preloaded before lt_init() was called. */
+static const lt_dlsymlist *default_preloaded_symbols = 0;
+
+
+/* A function called through the vtable to initialise this loader. */
+static int
+vl_init (lt_user_data LT__UNUSED loader_data)
+{
+ int errors = 0;
+
+ preloaded_symlists = 0;
+ if (default_preloaded_symbols)
+ {
+ errors = lt_dlpreload (default_preloaded_symbols);
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ free_symlists ();
+ return 0;
+}
+
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ symlist_chain *lists;
+ lt_module module = 0;
+
+ if (!preloaded_symlists)
+ {
+ LT__SETERROR (NO_SYMBOLS);
+ goto done;
+ }
+
+ /* Can't use NULL as the reflective symbol header, as NULL is
+ used to mark the end of the entire symbol list. Self-dlpreopened
+ symbols follow this magic number, chosen to be an unlikely
+ clash with a real module name. */
+ if (!filename)
+ {
+ filename = "@PROGRAM@";
+ }
+
+ for (lists = preloaded_symlists; lists; lists = lists->next)
+ {
+ const lt_dlsymlist *symbol;
+ for (symbol= lists->symlist; symbol->name; ++symbol)
+ {
+ if (!symbol->address && streq (symbol->name, filename))
+ {
+ /* If the next symbol's name and address is 0, it means
+ the module just contains the originator and no symbols.
+ In this case we pretend that we never saw the module and
+ hope that some other loader will be able to load the module
+ and have access to its symbols */
+ const lt_dlsymlist *next_symbol = symbol +1;
+ if (next_symbol->address && next_symbol->name)
+ {
+ module = (lt_module) lists->symlist;
+ goto done;
+ }
+ }
+ }
+ }
+
+ LT__SETERROR (FILE_NOT_FOUND);
+
+ done:
+ return module;
+}
+
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module LT__UNUSED module)
+{
+ /* Just to silence gcc -Wall */
+ module = 0;
+ return 0;
+}
+
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
+{
+ lt_dlsymlist *symbol = (lt_dlsymlist*) module;
+
+ symbol +=2; /* Skip header (originator then libname). */
+
+ while (symbol->name)
+ {
+ if (streq (symbol->name, name))
+ {
+ return symbol->address;
+ }
+
+ ++symbol;
+ }
+
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+
+ return 0;
+}
+
+
+
+/* --- HELPER FUNCTIONS --- */
+
+
+/* The symbol lists themselves are not allocated from the heap, but
+ we can unhook them and free up the chain of links between them. */
+static int
+free_symlists (void)
+{
+ symlist_chain *lists;
+
+ lists = preloaded_symlists;
+ while (lists)
+ {
+ symlist_chain *next = lists->next;
+ FREE (lists);
+ lists = next;
+ }
+ preloaded_symlists = 0;
+
+ return 0;
+}
+
+/* Add a new symbol list to the global chain. */
+static int
+add_symlist (const lt_dlsymlist *symlist)
+{
+ symlist_chain *lists;
+ int errors = 0;
+
+ /* Search for duplicate entries: */
+ for (lists = preloaded_symlists;
+ lists && lists->symlist != symlist; lists = lists->next)
+ /*NOWORK*/;
+
+ /* Don't add the same list twice: */
+ if (!lists)
+ {
+ symlist_chain *tmp = (symlist_chain *) lt__zalloc (sizeof *tmp);
+
+ if (tmp)
+ {
+ tmp->symlist = symlist;
+ tmp->next = preloaded_symlists;
+ preloaded_symlists = tmp;
+ }
+ else
+ {
+ ++errors;
+ }
+ }
+
+ return errors;
+}
+
+
+
+/* --- PRELOADING API CALL IMPLEMENTATIONS --- */
+
+
+/* Save a default symbol list for later. */
+int
+lt_dlpreload_default (const lt_dlsymlist *preloaded)
+{
+ default_preloaded_symbols = preloaded;
+ return 0;
+}
+
+
+/* Add a symbol list to the global chain, or with a NULL argument,
+ revert to just the default list. */
+int
+lt_dlpreload (const lt_dlsymlist *preloaded)
+{
+ int errors = 0;
+
+ if (preloaded)
+ {
+ errors = add_symlist (preloaded);
+ }
+ else
+ {
+ free_symlists();
+
+ if (default_preloaded_symbols)
+ {
+ errors = lt_dlpreload (default_preloaded_symbols);
+ }
+ }
+
+ return errors;
+}
+
+
+/* Open all the preloaded modules from the named originator, executing
+ a callback for each one. If ORIGINATOR is NULL, then call FUNC for
+ each preloaded module from the program itself. */
+int
+lt_dlpreload_open (const char *originator, lt_dlpreload_callback_func *func)
+{
+ symlist_chain *list;
+ int errors = 0;
+ int found = 0;
+
+ /* For each symlist in the chain... */
+ for (list = preloaded_symlists; list; list = list->next)
+ {
+ /* ...that was preloaded by the requesting ORIGINATOR... */
+ if ((originator && streq (list->symlist->name, originator))
+ || (!originator && streq (list->symlist->name, "@PROGRAM@")))
+ {
+ const lt_dlsymlist *symbol;
+ unsigned int idx = 0;
+
+ ++found;
+
+ /* ...load the symbols per source compilation unit:
+ (we preincrement the index to skip over the originator entry) */
+ while ((symbol = &list->symlist[++idx])->name != 0)
+ {
+ if ((symbol->address == 0)
+ && (strneq (symbol->name, "@PROGRAM@")))
+ {
+ lt_dlhandle handle = lt_dlopen (symbol->name);
+ if (handle == 0)
+ {
+ ++errors;
+ }
+ else
+ {
+ errors += (*func) (handle);
+ }
+ }
+ }
+ }
+ }
+
+ if (!found)
+ {
+ LT__SETERROR(CANNOT_OPEN);
+ ++errors;
+ }
+
+ return errors;
+}
diff --git a/ltdl/loaders/shl_load.c b/ltdl/loaders/shl_load.c
new file mode 100644
index 00000000..5a09d872
--- /dev/null
+++ b/ltdl/loaders/shl_load.c
@@ -0,0 +1,222 @@
+/* loader-shl_load.c -- dynamic linking with shl_load (HP-UX)
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+/* Use the preprocessor to rename non-static symbols to avoid namespace
+ collisions when the loader code is statically linked into libltdl.
+ Use the "<module_name>_LTX_" prefix so that the symbol addresses can
+ be fetched from the preloaded symbol list by lt_dlsym(): */
+#define get_vtable shl_load_LTX_get_vtable
+
+LT_BEGIN_C_DECLS
+LT_SCOPE lt_dlvtable *get_vtable (lt_user_data loader_data);
+LT_END_C_DECLS
+
+
+/* Boilerplate code to set up the vtable for hooking this loader into
+ libltdl's loader list: */
+static int vl_exit (lt_user_data loader_data);
+static lt_module vm_open (lt_user_data loader_data, const char *filename,
+ lt_dladvise advise);
+static int vm_close (lt_user_data loader_data, lt_module module);
+static void * vm_sym (lt_user_data loader_data, lt_module module,
+ const char *symbolname);
+
+static lt_dlvtable *vtable = 0;
+
+/* Return the vtable for this loader, only the name and sym_prefix
+ attributes (plus the virtual function implementations, obviously)
+ change between loaders. */
+lt_dlvtable *
+get_vtable (lt_user_data loader_data)
+{
+ if (!vtable)
+ {
+ vtable = lt__zalloc (sizeof *vtable);
+ }
+
+ if (vtable && !vtable->name)
+ {
+ vtable->name = "lt_shl_load";
+ vtable->module_open = vm_open;
+ vtable->module_close = vm_close;
+ vtable->find_sym = vm_sym;
+ vtable->dlloader_exit = vl_exit;
+ vtable->dlloader_data = loader_data;
+ vtable->priority = LT_DLLOADER_APPEND;
+ }
+
+ if (vtable && (vtable->dlloader_data != loader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ return 0;
+ }
+
+ return vtable;
+}
+
+
+
+/* --- IMPLEMENTATION --- */
+
+
+#if defined(HAVE_DL_H)
+# include <dl.h>
+#endif
+
+/* some flags are missing on some systems, so we provide
+ * harmless defaults.
+ *
+ * Mandatory:
+ * BIND_IMMEDIATE - Resolve symbol references when the library is loaded.
+ * BIND_DEFERRED - Delay code symbol resolution until actual reference.
+ *
+ * Optionally:
+ * BIND_FIRST - Place the library at the head of the symbol search
+ * order.
+ * BIND_NONFATAL - The default BIND_IMMEDIATE behavior is to treat all
+ * unsatisfied symbols as fatal. This flag allows
+ * binding of unsatisfied code symbols to be deferred
+ * until use.
+ * [Perl: For certain libraries, like DCE, deferred
+ * binding often causes run time problems. Adding
+ * BIND_NONFATAL to BIND_IMMEDIATE still allows
+ * unresolved references in situations like this.]
+ * BIND_NOSTART - Do not call the initializer for the shared library
+ * when the library is loaded, nor on a future call to
+ * shl_unload().
+ * BIND_VERBOSE - Print verbose messages concerning possible
+ * unsatisfied symbols.
+ *
+ * hp9000s700/hp9000s800:
+ * BIND_RESTRICTED - Restrict symbols visible by the library to those
+ * present at library load time.
+ * DYNAMIC_PATH - Allow the loader to dynamically search for the
+ * library specified by the path argument.
+ */
+
+#if !defined(DYNAMIC_PATH)
+# define DYNAMIC_PATH 0
+#endif
+#if !defined(BIND_RESTRICTED)
+# define BIND_RESTRICTED 0
+#endif
+
+#define LT_BIND_FLAGS (BIND_IMMEDIATE | BIND_NONFATAL | DYNAMIC_PATH)
+
+
+/* A function called through the vtable when this loader is no
+ longer needed by the application. */
+static int
+vl_exit (lt_user_data LT__UNUSED loader_data)
+{
+ vtable = NULL;
+ return 0;
+}
+
+/* A function called through the vtable to open a module with this
+ loader. Returns an opaque representation of the newly opened
+ module for processing with this loader's other vtable functions. */
+static lt_module
+vm_open (lt_user_data LT__UNUSED loader_data, const char *filename,
+ lt_dladvise LT__UNUSED advise)
+{
+ static shl_t self = (shl_t) 0;
+ lt_module module = shl_load (filename, LT_BIND_FLAGS, 0L);
+
+ /* Since searching for a symbol against a NULL module handle will also
+ look in everything else that was already loaded and exported with
+ the -E compiler flag, we always cache a handle saved before any
+ modules are loaded. */
+ if (!self)
+ {
+ void *address;
+ shl_findsym (&self, "main", TYPE_UNDEFINED, &address);
+ }
+
+ if (!filename)
+ {
+ module = self;
+ }
+ else
+ {
+ module = shl_load (filename, LT_BIND_FLAGS, 0L);
+
+ if (!module)
+ {
+ LT__SETERROR (CANNOT_OPEN);
+ }
+ }
+
+ return module;
+}
+
+/* A function called through the vtable when a particular module
+ should be unloaded. */
+static int
+vm_close (lt_user_data LT__UNUSED loader_data, lt_module module)
+{
+ int errors = 0;
+
+ if (module && (shl_unload ((shl_t) (module)) != 0))
+ {
+ LT__SETERROR (CANNOT_CLOSE);
+ ++errors;
+ }
+
+ return errors;
+}
+
+
+/* A function called through the vtable to get the address of
+ a symbol loaded from a particular module. */
+static void *
+vm_sym (lt_user_data LT__UNUSED loader_data, lt_module module, const char *name)
+{
+ void *address = 0;
+
+ /* sys_shl_open should never return a NULL module handle */
+ if (module == (lt_module) 0)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ }
+ else if (!shl_findsym((shl_t*) &module, name, TYPE_UNDEFINED, &address))
+ {
+ if (!address)
+ {
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+ }
+ }
+
+ return address;
+}
diff --git a/ltdl/lt__alloc.c b/ltdl/lt__alloc.c
new file mode 100644
index 00000000..d39e17e7
--- /dev/null
+++ b/ltdl/lt__alloc.c
@@ -0,0 +1,95 @@
+/* lt__alloc.c -- internal memory management interface
+
+ Copyright (C) 2004, 2006, 2007 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+
+#include <stdio.h>
+
+#include "lt__alloc.h"
+
+static void alloc_die_default (void);
+
+void (*lt__alloc_die) (void) = alloc_die_default;
+
+/* Unless overridden, exit on memory failure. */
+static void
+alloc_die_default (void)
+{
+ fprintf (stderr, "Out of memory.\n");
+ exit (EXIT_FAILURE);
+}
+
+void *
+lt__malloc (size_t n)
+{
+ void *mem;
+
+ if (! (mem = malloc (n)))
+ (*lt__alloc_die) ();
+
+ return mem;
+}
+
+void *
+lt__zalloc (size_t n)
+{
+ void *mem;
+
+ if ((mem = lt__malloc (n)))
+ memset (mem, 0, n);
+
+ return mem;
+}
+
+void *
+lt__realloc (void *mem, size_t n)
+{
+ if (! (mem = realloc (mem, n)))
+ (*lt__alloc_die) ();
+
+ return mem;
+}
+
+void *
+lt__memdup (void const *mem, size_t n)
+{
+ void *newmem;
+
+ if ((newmem = lt__malloc (n)))
+ return memcpy (newmem, mem, n);
+
+ return 0;
+}
+
+char *
+lt__strdup (const char *string)
+{
+ return (char *) lt__memdup (string, strlen (string) +1);
+}
diff --git a/ltdl/lt__dirent.c b/ltdl/lt__dirent.c
new file mode 100644
index 00000000..30dc072c
--- /dev/null
+++ b/ltdl/lt__dirent.c
@@ -0,0 +1,107 @@
+/* lt__dirent.c -- internal directory entry scanning interface
+
+ Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+ Written by Bob Friesenhahn, 2001
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+
+#include <assert.h>
+#include <stddef.h>
+
+#include "lt__dirent.h"
+
+#if defined(__WINDOWS__)
+
+void
+closedir (DIR *entry)
+{
+ assert (entry != (DIR *) NULL);
+ FindClose (entry->hSearch);
+ free ((void *) entry);
+}
+
+
+DIR *
+opendir (const char *path)
+{
+ char file_spec[LT_FILENAME_MAX];
+ DIR *entry;
+
+ assert (path != (char *) 0);
+ if (lt_strlcpy (file_spec, path, sizeof file_spec) >= sizeof file_spec
+ || lt_strlcat (file_spec, "\\", sizeof file_spec) >= sizeof file_spec)
+ return (DIR *) 0;
+ entry = (DIR *) malloc (sizeof(DIR));
+ if (entry != (DIR *) 0)
+ {
+ entry->firsttime = TRUE;
+ entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData);
+
+ if (entry->hSearch == INVALID_HANDLE_VALUE)
+ {
+ if (lt_strlcat (file_spec, "\\*.*", sizeof file_spec) < sizeof file_spec)
+ {
+ entry->hSearch = FindFirstFile (file_spec, &entry->Win32FindData);
+ }
+
+ if (entry->hSearch == INVALID_HANDLE_VALUE)
+ {
+ entry = (free (entry), (DIR *) 0);
+ }
+ }
+ }
+
+ return entry;
+}
+
+
+struct dirent *
+readdir (DIR *entry)
+{
+ int status;
+
+ if (entry == (DIR *) 0)
+ return (struct dirent *) 0;
+
+ if (!entry->firsttime)
+ {
+ status = FindNextFile (entry->hSearch, &entry->Win32FindData);
+ if (status == 0)
+ return (struct dirent *) 0;
+ }
+
+ entry->firsttime = FALSE;
+ if (lt_strlcpy (entry->file_info.d_name, entry->Win32FindData.cFileName,
+ sizeof entry->file_info.d_name) >= sizeof entry->file_info.d_name)
+ return (struct dirent *) 0;
+ entry->file_info.d_namlen = strlen (entry->file_info.d_name);
+
+ return &entry->file_info;
+}
+
+#endif /*defined(__WINDOWS__)*/
diff --git a/ltdl/lt__strl.c b/ltdl/lt__strl.c
new file mode 100644
index 00000000..c2cee587
--- /dev/null
+++ b/ltdl/lt__strl.c
@@ -0,0 +1,127 @@
+/* lt__strl.c -- size-bounded string copying and concatenation
+
+ Copyright (C) 2004 Free Software Foundation, Inc.
+ Written by Bob Friesenhahn, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <assert.h>
+#include <string.h>
+
+#include "lt__strl.h"
+
+/*
+ lt_strlcat appends the NULL-terminated string src to the end of dst.
+ It will append at most dstsize - strlen(dst) - 1 bytes,
+ NULL-terminating the result. The total length of the string which
+ would have been created given sufficient buffer size (may be longer
+ than dstsize) is returned. This function substitutes for strlcat()
+ which is available under NetBSD, FreeBSD and Solaris 9.
+
+ Buffer overflow can be checked as follows:
+
+ if (lt_strlcat(dst, src, dstsize) >= dstsize)
+ return -1;
+*/
+#if !defined(HAVE_STRLCAT)
+size_t
+lt_strlcat(char *dst, const char *src, const size_t dstsize)
+{
+ size_t length;
+ char *p;
+ const char *q;
+
+ assert(dst != NULL);
+ assert(src != (const char *) NULL);
+ assert(dstsize >= 1);
+
+ length=strlen(dst);
+
+ /*
+ Copy remaining characters from src while constraining length to
+ size - 1.
+ */
+ for ( p = dst + length, q = src;
+ (*q != 0) && (length < dstsize - 1) ;
+ length++, p++, q++ )
+ *p = *q;
+
+ dst[length]='\0';
+
+ /*
+ Add remaining length of src to length.
+ */
+ while (*q++)
+ length++;
+
+ return length;
+}
+#endif /* !defined(HAVE_STRLCAT) */
+
+/*
+ lt_strlcpy copies up to dstsize - 1 characters from the NULL-terminated
+ string src to dst, NULL-terminating the result. The total length of
+ the string which would have been created given sufficient buffer
+ size (may be longer than dstsize) is returned. This function
+ substitutes for strlcpy() which is available under OpenBSD, FreeBSD
+ and Solaris 9.
+
+ Buffer overflow can be checked as follows:
+
+ if (lt_strlcpy(dst, src, dstsize) >= dstsize)
+ return -1;
+*/
+#if !defined(HAVE_STRLCPY)
+size_t
+lt_strlcpy(char *dst, const char *src, const size_t dstsize)
+{
+ size_t length=0;
+ char *p;
+ const char *q;
+
+ assert(dst != NULL);
+ assert(src != (const char *) NULL);
+ assert(dstsize >= 1);
+
+ /*
+ Copy src to dst within bounds of size-1.
+ */
+ for ( p=dst, q=src, length=0 ;
+ (*q != 0) && (length < dstsize-1) ;
+ length++, p++, q++ )
+ *p = *q;
+
+ dst[length]='\0';
+
+ /*
+ Add remaining length of src to length.
+ */
+ while (*q++)
+ length++;
+
+ return length;
+}
+#endif /* !defined(HAVE_STRLCPY) */
diff --git a/ltdl/lt_dlloader.c b/ltdl/lt_dlloader.c
new file mode 100644
index 00000000..4e66a6ca
--- /dev/null
+++ b/ltdl/lt_dlloader.c
@@ -0,0 +1,210 @@
+/* lt_dlloader.c -- dynamic library loader interface
+
+ Copyright (C) 2004, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2004
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_dlloader.h"
+
+#define RETURN_SUCCESS 0
+#define RETURN_FAILURE 1
+
+static void * loader_callback (SList *item, void *userdata);
+
+/* A list of all the dlloaders we know about, each stored as a boxed
+ SList item: */
+static SList *loaders = 0;
+
+
+/* Return NULL, unless the loader in this ITEM has a matching name,
+ in which case we return the matching item so that its address is
+ passed back out (for possible freeing) by slist_remove. */
+static void *
+loader_callback (SList *item, void *userdata)
+{
+ const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata;
+ const char * name = (const char *) userdata;
+
+ assert (vtable);
+
+ return streq (vtable->name, name) ? (void *) item : NULL;
+}
+
+
+/* Hook VTABLE into our global LOADERS list according to its own
+ PRIORITY field value. */
+int
+lt_dlloader_add (const lt_dlvtable *vtable)
+{
+ SList *item;
+
+ if ((vtable == 0) /* diagnose invalid vtable fields */
+ || (vtable->module_open == 0)
+ || (vtable->module_close == 0)
+ || (vtable->find_sym == 0)
+ || ((vtable->priority != LT_DLLOADER_PREPEND) &&
+ (vtable->priority != LT_DLLOADER_APPEND)))
+ {
+ LT__SETERROR (INVALID_LOADER);
+ return RETURN_FAILURE;
+ }
+
+ item = slist_box (vtable);
+ if (!item)
+ {
+ (*lt__alloc_die) ();
+
+ /* Let the caller know something went wrong if lt__alloc_die
+ doesn't abort. */
+ return RETURN_FAILURE;
+ }
+
+ if (vtable->priority == LT_DLLOADER_PREPEND)
+ {
+ loaders = slist_cons (item, loaders);
+ }
+ else
+ {
+ assert (vtable->priority == LT_DLLOADER_APPEND);
+ loaders = slist_concat (loaders, item);
+ }
+
+ return RETURN_SUCCESS;
+}
+
+#ifdef LT_DEBUG_LOADERS
+static void *
+loader_dump_callback (SList *item, void *userdata)
+{
+ const lt_dlvtable *vtable = (const lt_dlvtable *) item->userdata;
+ fprintf (stderr, ", %s", (vtable && vtable->name) ? vtable->name : "(null)");
+ return 0;
+}
+
+void
+lt_dlloader_dump (void)
+{
+ fprintf (stderr, "loaders: ");
+ if (!loaders)
+ {
+ fprintf (stderr, "(empty)");
+ }
+ else
+ {
+ const lt_dlvtable *head = (const lt_dlvtable *) loaders->userdata;
+ fprintf (stderr, "%s", (head && head->name) ? head->name : "(null)");
+ if (slist_tail (loaders))
+ slist_foreach (slist_tail (loaders), loader_dump_callback, NULL);
+ }
+ fprintf (stderr, "\n");
+}
+#endif
+
+/* An iterator for the global loader list: if LOADER is NULL, then
+ return the first element, otherwise the following element. */
+lt_dlloader
+lt_dlloader_next (lt_dlloader loader)
+{
+ SList *item = (SList *) loader;
+ return (lt_dlloader) (item ? item->next : loaders);
+}
+
+
+/* Non-destructive unboxing of a loader. */
+const lt_dlvtable *
+lt_dlloader_get (lt_dlloader loader)
+{
+ return (const lt_dlvtable *) (loader ? ((SList *) loader)->userdata : NULL);
+}
+
+
+/* Return the contents of the first item in the global loader list
+ with a matching NAME after removing it from that list. If there
+ was no match, return NULL; if there is an error, return NULL and
+ set an error for lt_dlerror; do not set an error if only resident
+ modules need this loader; in either case, the loader list is not
+ changed if NULL is returned. */
+lt_dlvtable *
+lt_dlloader_remove (char *name)
+{
+ const lt_dlvtable * vtable = lt_dlloader_find (name);
+ static const char id_string[] = "lt_dlloader_remove";
+ lt_dlinterface_id iface;
+ lt_dlhandle handle = 0;
+ int in_use = 0;
+ int in_use_by_resident = 0;
+
+ if (!vtable)
+ {
+ LT__SETERROR (INVALID_LOADER);
+ return 0;
+ }
+
+ /* Fail if there are any open modules which use this loader. */
+ iface = lt_dlinterface_register (id_string, NULL);
+ while ((handle = lt_dlhandle_iterate (iface, handle)))
+ {
+ lt_dlhandle cur = handle;
+ if (cur->vtable == vtable)
+ {
+ in_use = 1;
+ if (lt_dlisresident (handle))
+ in_use_by_resident = 1;
+ }
+ }
+ lt_dlinterface_free (iface);
+ if (in_use)
+ {
+ if (!in_use_by_resident)
+ LT__SETERROR (REMOVE_LOADER);
+ return 0;
+ }
+
+ /* Call the loader finalisation function. */
+ if (vtable && vtable->dlloader_exit)
+ {
+ if ((*vtable->dlloader_exit) (vtable->dlloader_data) != 0)
+ {
+ /* If there is an exit function, and it returns non-zero
+ then it must set an error, and we will not remove it
+ from the list. */
+ return 0;
+ }
+ }
+
+ /* If we got this far, remove the loader from our global list. */
+ return (lt_dlvtable *)
+ slist_unbox ((SList *) slist_remove (&loaders, loader_callback, name));
+}
+
+
+const lt_dlvtable *
+lt_dlloader_find (char *name)
+{
+ return lt_dlloader_get (slist_find (loaders, loader_callback, name));
+}
diff --git a/ltdl/lt_error.c b/ltdl/lt_error.c
new file mode 100644
index 00000000..d7af36dd
--- /dev/null
+++ b/ltdl/lt_error.c
@@ -0,0 +1,110 @@
+/* lt_error.c -- error propogation interface
+
+ Copyright (C) 1999, 2000, 2001, 2004, 2005, 2007 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1999
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_error.h"
+
+static const char *last_error = 0;
+static const char error_strings[LT_ERROR_MAX][LT_ERROR_LEN_MAX + 1] =
+ {
+#define LT_ERROR(name, diagnostic) diagnostic,
+ lt_dlerror_table
+#undef LT_ERROR
+ };
+
+static const char **user_error_strings = 0;
+static int errorcount = LT_ERROR_MAX;
+
+int
+lt_dladderror (const char *diagnostic)
+{
+ int errindex = 0;
+ int result = -1;
+ const char **temp = (const char **) 0;
+
+ assert (diagnostic);
+
+ errindex = errorcount - LT_ERROR_MAX;
+ temp = REALLOC (const char *, user_error_strings, 1 + errindex);
+ if (temp)
+ {
+ user_error_strings = temp;
+ user_error_strings[errindex] = diagnostic;
+ result = errorcount++;
+ }
+
+ return result;
+}
+
+int
+lt_dlseterror (int errindex)
+{
+ int errors = 0;
+
+ if (errindex >= errorcount || errindex < 0)
+ {
+ /* Ack! Error setting the error message! */
+ LT__SETERROR (INVALID_ERRORCODE);
+ ++errors;
+ }
+ else if (errindex < LT_ERROR_MAX)
+ {
+ /* No error setting the error message! */
+ LT__SETERRORSTR (error_strings[errindex]);
+ }
+ else
+ {
+ /* No error setting the error message! */
+ LT__SETERRORSTR (user_error_strings[errindex - LT_ERROR_MAX]);
+ }
+
+ return errors;
+}
+
+const char *
+lt__error_string (int errorcode)
+{
+ assert (errorcode >= 0);
+ assert (errorcode < LT_ERROR_MAX);
+
+ return error_strings[errorcode];
+}
+
+const char *
+lt__get_last_error (void)
+{
+ return last_error;
+}
+
+const char *
+lt__set_last_error (const char *errormsg)
+{
+ return last_error = errormsg;
+}
diff --git a/ltdl/ltdl.c b/ltdl/ltdl.c
new file mode 100644
index 00000000..905804d6
--- /dev/null
+++ b/ltdl/ltdl.c
@@ -0,0 +1,2425 @@
+/* ltdl.c -- system independent dlopen wrapper
+
+ Copyright (C) 1998, 1999, 2000, 2004, 2005, 2006,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include "lt__private.h"
+#include "lt_system.h"
+#include "lt_dlloader.h"
+
+
+/* --- MANIFEST CONSTANTS --- */
+
+
+/* Standard libltdl search path environment variable name */
+#undef LTDL_SEARCHPATH_VAR
+#define LTDL_SEARCHPATH_VAR "LTDL_LIBRARY_PATH"
+
+/* Standard libtool archive file extension. */
+#undef LT_ARCHIVE_EXT
+#define LT_ARCHIVE_EXT ".la"
+
+/* max. filename length */
+#if !defined(LT_FILENAME_MAX)
+# define LT_FILENAME_MAX 1024
+#endif
+
+#if !defined(LT_LIBEXT)
+# define LT_LIBEXT "a"
+#endif
+
+/* This is the maximum symbol size that won't require malloc/free */
+#undef LT_SYMBOL_LENGTH
+#define LT_SYMBOL_LENGTH 128
+
+/* This accounts for the _LTX_ separator */
+#undef LT_SYMBOL_OVERHEAD
+#define LT_SYMBOL_OVERHEAD 5
+
+/* Various boolean flags can be stored in the flags field of an
+ lt_dlhandle... */
+#define LT_DLIS_RESIDENT(handle) ((handle)->info.is_resident)
+#define LT_DLIS_SYMGLOBAL(handle) ((handle)->info.is_symglobal)
+#define LT_DLIS_SYMLOCAL(handle) ((handle)->info.is_symlocal)
+
+
+static const char objdir[] = LT_OBJDIR;
+static const char archive_ext[] = LT_ARCHIVE_EXT;
+static const char libext[] = LT_LIBEXT;
+#if defined(LT_MODULE_EXT)
+static const char shlib_ext[] = LT_MODULE_EXT;
+#endif
+#if defined(LT_DLSEARCH_PATH)
+static const char sys_dlsearch_path[] = LT_DLSEARCH_PATH;
+#endif
+
+
+
+
+/* --- DYNAMIC MODULE LOADING --- */
+
+
+/* The type of a function used at each iteration of foreach_dirinpath(). */
+typedef int foreach_callback_func (char *filename, void *data1,
+ void *data2);
+/* foreachfile_callback itself calls a function of this type: */
+typedef int file_worker_func (const char *filename, void *data);
+
+
+static int foreach_dirinpath (const char *search_path,
+ const char *base_name,
+ foreach_callback_func *func,
+ void *data1, void *data2);
+static int find_file_callback (char *filename, void *data1,
+ void *data2);
+static int find_handle_callback (char *filename, void *data,
+ void *ignored);
+static int foreachfile_callback (char *filename, void *data1,
+ void *data2);
+
+
+static int canonicalize_path (const char *path, char **pcanonical);
+static int argzize_path (const char *path,
+ char **pargz, size_t *pargz_len);
+static FILE *find_file (const char *search_path,
+ const char *base_name, char **pdir);
+static lt_dlhandle *find_handle (const char *search_path,
+ const char *base_name,
+ lt_dlhandle *handle,
+ lt_dladvise advise);
+static int find_module (lt_dlhandle *handle, const char *dir,
+ const char *libdir, const char *dlname,
+ const char *old_name, int installed,
+ lt_dladvise advise);
+static int has_library_ext (const char *filename);
+static int load_deplibs (lt_dlhandle handle, char *deplibs);
+static int trim (char **dest, const char *str);
+static int try_dlopen (lt_dlhandle *handle,
+ const char *filename, const char *ext,
+ lt_dladvise advise);
+static int tryall_dlopen (lt_dlhandle *handle,
+ const char *filename,
+ lt_dladvise padvise,
+ const lt_dlvtable *vtable);
+static int unload_deplibs (lt_dlhandle handle);
+static int lt_argz_insert (char **pargz, size_t *pargz_len,
+ char *before, const char *entry);
+static int lt_argz_insertinorder (char **pargz, size_t *pargz_len,
+ const char *entry);
+static int lt_argz_insertdir (char **pargz, size_t *pargz_len,
+ const char *dirnam, struct dirent *dp);
+static int lt_dlpath_insertdir (char **ppath, char *before,
+ const char *dir);
+static int list_files_by_dir (const char *dirnam,
+ char **pargz, size_t *pargz_len);
+static int file_not_found (void);
+
+#ifdef HAVE_LIBDLLOADER
+static int loader_init_callback (lt_dlhandle handle);
+#endif /* HAVE_LIBDLLOADER */
+
+static int loader_init (lt_get_vtable *vtable_func,
+ lt_user_data data);
+
+static char *user_search_path= 0;
+static lt_dlhandle handles = 0;
+static int initialized = 0;
+
+/* Our memory failure callback sets the error message to be passed back
+ up to the client, so we must be careful to return from mallocation
+ callers if allocation fails (as this callback returns!!). */
+void
+lt__alloc_die_callback (void)
+{
+ LT__SETERROR (NO_MEMORY);
+}
+
+#ifdef HAVE_LIBDLLOADER
+/* This function is called to initialise each preloaded module loader,
+ and hook it into the list of loaders to be used when attempting to
+ dlopen an application module. */
+static int
+loader_init_callback (lt_dlhandle handle)
+{
+ lt_get_vtable *vtable_func = (lt_get_vtable *) lt_dlsym (handle, "get_vtable");
+ return loader_init (vtable_func, 0);
+}
+#endif /* HAVE_LIBDLLOADER */
+
+static int
+loader_init (lt_get_vtable *vtable_func, lt_user_data data)
+{
+ const lt_dlvtable *vtable = 0;
+ int errors = 0;
+
+ if (vtable_func)
+ {
+ vtable = (*vtable_func) (data);
+ }
+
+ /* lt_dlloader_add will LT__SETERROR if it fails. */
+ errors += lt_dlloader_add (vtable);
+
+ assert (errors || vtable);
+
+ if ((!errors) && vtable->dlloader_init)
+ {
+ if ((*vtable->dlloader_init) (vtable->dlloader_data))
+ {
+ LT__SETERROR (INIT_LOADER);
+ ++errors;
+ }
+ }
+
+ return errors;
+}
+
+/* Bootstrap the loader loading with the preopening loader. */
+#define get_vtable preopen_LTX_get_vtable
+#define preloaded_symbols LT_CONC3(lt_, LTDLOPEN, _LTX_preloaded_symbols)
+
+LT_BEGIN_C_DECLS
+LT_SCOPE const lt_dlvtable * get_vtable (lt_user_data data);
+LT_END_C_DECLS
+#ifdef HAVE_LIBDLLOADER
+extern lt_dlsymlist preloaded_symbols;
+#endif
+
+/* Initialize libltdl. */
+int
+lt_dlinit (void)
+{
+ int errors = 0;
+
+ /* Initialize only at first call. */
+ if (++initialized == 1)
+ {
+ lt__alloc_die = lt__alloc_die_callback;
+ handles = 0;
+ user_search_path = 0; /* empty search path */
+
+ /* First set up the statically loaded preload module loader, so
+ we can use it to preopen the other loaders we linked in at
+ compile time. */
+ errors += loader_init (get_vtable, 0);
+
+ /* Now open all the preloaded module loaders, so the application
+ can use _them_ to lt_dlopen its own modules. */
+#ifdef HAVE_LIBDLLOADER
+ if (!errors)
+ {
+ errors += lt_dlpreload (&preloaded_symbols);
+ }
+
+ if (!errors)
+ {
+ errors += lt_dlpreload_open (LT_STR(LTDLOPEN), loader_init_callback);
+ }
+#endif /* HAVE_LIBDLLOADER */
+ }
+
+#ifdef LT_DEBUG_LOADERS
+ lt_dlloader_dump();
+#endif
+
+ return errors;
+}
+
+int
+lt_dlexit (void)
+{
+ /* shut down libltdl */
+ lt_dlloader *loader = 0;
+ lt_dlhandle handle = handles;
+ int errors = 0;
+
+ if (!initialized)
+ {
+ LT__SETERROR (SHUTDOWN);
+ ++errors;
+ goto done;
+ }
+
+ /* shut down only at last call. */
+ if (--initialized == 0)
+ {
+ int level;
+
+ while (handles && LT_DLIS_RESIDENT (handles))
+ {
+ handles = handles->next;
+ }
+
+ /* close all modules */
+ for (level = 1; handle; ++level)
+ {
+ lt_dlhandle cur = handles;
+ int saw_nonresident = 0;
+
+ while (cur)
+ {
+ lt_dlhandle tmp = cur;
+ cur = cur->next;
+ if (!LT_DLIS_RESIDENT (tmp))
+ {
+ saw_nonresident = 1;
+ if (tmp->info.ref_count <= level)
+ {
+ if (lt_dlclose (tmp))
+ {
+ ++errors;
+ }
+ /* Make sure that the handle pointed to by 'cur' still exists.
+ lt_dlclose recursively closes dependent libraries which removes
+ them from the linked list. One of these might be the one
+ pointed to by 'cur'. */
+ if (cur)
+ {
+ for (tmp = handles; tmp; tmp = tmp->next)
+ if (tmp == cur)
+ break;
+ if (! tmp)
+ cur = handles;
+ }
+ }
+ }
+ }
+ /* done if only resident modules are left */
+ if (!saw_nonresident)
+ break;
+ }
+
+ /* When removing loaders, we can only find out failure by testing
+ the error string, so avoid a spurious one from an earlier
+ failed command. */
+ if (!errors)
+ LT__SETERRORSTR (0);
+
+ /* close all loaders */
+ for (loader = (lt_dlloader *) lt_dlloader_next (NULL); loader;)
+ {
+ lt_dlloader *next = (lt_dlloader *) lt_dlloader_next (loader);
+ lt_dlvtable *vtable = (lt_dlvtable *) lt_dlloader_get (loader);
+
+ if ((vtable = lt_dlloader_remove ((char *) vtable->name)))
+ {
+ FREE (vtable);
+ }
+ else
+ {
+ /* ignore errors due to resident modules */
+ const char *err;
+ LT__GETERROR (err);
+ if (err)
+ ++errors;
+ }
+
+ loader = next;
+ }
+
+ FREE(user_search_path);
+ }
+
+ done:
+ return errors;
+}
+
+
+/* Try VTABLE or, if VTABLE is NULL, all available loaders for FILENAME.
+ If the library is not successfully loaded, return non-zero. Otherwise,
+ the dlhandle is stored at the address given in PHANDLE. */
+static int
+tryall_dlopen (lt_dlhandle *phandle, const char *filename,
+ lt_dladvise advise, const lt_dlvtable *vtable)
+{
+ lt_dlhandle handle = handles;
+ const char * saved_error = 0;
+ int errors = 0;
+
+#ifdef LT_DEBUG_LOADERS
+ fprintf (stderr, "tryall_dlopen (%s, %s)\n",
+ filename ? filename : "(null)",
+ vtable ? vtable->name : "(ALL)");
+#endif
+
+ LT__GETERROR (saved_error);
+
+ /* check whether the module was already opened */
+ for (;handle; handle = handle->next)
+ {
+ if ((handle->info.filename == filename) /* dlopen self: 0 == 0 */
+ || (handle->info.filename && filename
+ && streq (handle->info.filename, filename)))
+ {
+ break;
+ }
+ }
+
+ if (handle)
+ {
+ ++handle->info.ref_count;
+ *phandle = handle;
+ goto done;
+ }
+
+ handle = *phandle;
+ if (filename)
+ {
+ /* Comment out the check of file permissions using access.
+ This call seems to always return -1 with error EACCES.
+ */
+ /* We need to catch missing file errors early so that
+ file_not_found() can detect what happened.
+ if (access (filename, R_OK) != 0)
+ {
+ LT__SETERROR (FILE_NOT_FOUND);
+ ++errors;
+ goto done;
+ } */
+
+ handle->info.filename = lt__strdup (filename);
+ if (!handle->info.filename)
+ {
+ ++errors;
+ goto done;
+ }
+ }
+ else
+ {
+ handle->info.filename = 0;
+ }
+
+ {
+ lt_dlloader loader = lt_dlloader_next (0);
+ const lt_dlvtable *loader_vtable;
+
+ do
+ {
+ if (vtable)
+ loader_vtable = vtable;
+ else
+ loader_vtable = lt_dlloader_get (loader);
+
+#ifdef LT_DEBUG_LOADERS
+ fprintf (stderr, "Calling %s->module_open (%s)\n",
+ (loader_vtable && loader_vtable->name) ? loader_vtable->name : "(null)",
+ filename ? filename : "(null)");
+#endif
+ handle->module = (*loader_vtable->module_open) (loader_vtable->dlloader_data,
+ filename, advise);
+#ifdef LT_DEBUG_LOADERS
+ fprintf (stderr, " Result: %s\n",
+ handle->module ? "Success" : "Failed");
+#endif
+
+ if (handle->module != 0)
+ {
+ if (advise)
+ {
+ handle->info.is_resident = advise->is_resident;
+ handle->info.is_symglobal = advise->is_symglobal;
+ handle->info.is_symlocal = advise->is_symlocal;
+ }
+ break;
+ }
+ }
+ while (!vtable && (loader = lt_dlloader_next (loader)));
+
+ /* If VTABLE was given but couldn't open the module, or VTABLE wasn't
+ given but we exhausted all loaders without opening the module, bail
+ out! */
+ if ((vtable && !handle->module)
+ || (!vtable && !loader))
+ {
+ FREE (handle->info.filename);
+ ++errors;
+ goto done;
+ }
+
+ handle->vtable = loader_vtable;
+ }
+
+ LT__SETERRORSTR (saved_error);
+
+ done:
+ return errors;
+}
+
+
+static int
+tryall_dlopen_module (lt_dlhandle *handle, const char *prefix,
+ const char *dirname, const char *dlname,
+ lt_dladvise advise)
+{
+ int error = 0;
+ char *filename = 0;
+ size_t filename_len = 0;
+ size_t dirname_len = LT_STRLEN (dirname);
+
+ assert (handle);
+ assert (dirname);
+ assert (dlname);
+#if defined(LT_DIRSEP_CHAR)
+ /* Only canonicalized names (i.e. with DIRSEP chars already converted)
+ should make it into this function: */
+ assert (strchr (dirname, LT_DIRSEP_CHAR) == 0);
+#endif
+
+ if (dirname_len > 0)
+ if (dirname[dirname_len -1] == '/')
+ --dirname_len;
+ filename_len = dirname_len + 1 + LT_STRLEN (dlname);
+
+ /* Allocate memory, and combine DIRNAME and MODULENAME into it.
+ The PREFIX (if any) is handled below. */
+ filename = MALLOC (char, filename_len + 1);
+ if (!filename)
+ return 1;
+
+ sprintf (filename, "%.*s/%s", (int) dirname_len, dirname, dlname);
+
+ /* Now that we have combined DIRNAME and MODULENAME, if there is
+ also a PREFIX to contend with, simply recurse with the arguments
+ shuffled. Otherwise, attempt to open FILENAME as a module. */
+ if (prefix)
+ {
+ error += tryall_dlopen_module (handle, (const char *) 0,
+ prefix, filename, advise);
+ }
+ else if (tryall_dlopen (handle, filename, advise, 0) != 0)
+ {
+ ++error;
+ }
+
+ FREE (filename);
+ return error;
+}
+
+static int
+find_module (lt_dlhandle *handle, const char *dir, const char *libdir,
+ const char *dlname, const char *old_name, int installed,
+ lt_dladvise advise)
+{
+ /* Try to open the old library first; if it was dlpreopened,
+ we want the preopened version of it, even if a dlopenable
+ module is available. */
+ if (old_name && tryall_dlopen (handle, old_name,
+ advise, lt_dlloader_find ("lt_preopen") ) == 0)
+ {
+ return 0;
+ }
+
+ /* Try to open the dynamic library. */
+ if (dlname)
+ {
+ /* try to open the installed module */
+ if (installed && libdir)
+ {
+ if (tryall_dlopen_module (handle, (const char *) 0,
+ libdir, dlname, advise) == 0)
+ return 0;
+ }
+
+ /* try to open the not-installed module */
+ if (!installed)
+ {
+ if (tryall_dlopen_module (handle, dir, objdir,
+ dlname, advise) == 0)
+ return 0;
+ }
+
+ /* maybe it was moved to another directory */
+ {
+ if (dir && (tryall_dlopen_module (handle, (const char *) 0,
+ dir, dlname, advise) == 0))
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
+
+static int
+canonicalize_path (const char *path, char **pcanonical)
+{
+ char *canonical = 0;
+
+ assert (path && *path);
+ assert (pcanonical);
+
+ canonical = MALLOC (char, 1+ LT_STRLEN (path));
+ if (!canonical)
+ return 1;
+
+ {
+ size_t dest = 0;
+ size_t src;
+ for (src = 0; path[src] != LT_EOS_CHAR; ++src)
+ {
+ /* Path separators are not copied to the beginning or end of
+ the destination, or if another separator would follow
+ immediately. */
+ if (path[src] == LT_PATHSEP_CHAR)
+ {
+ if ((dest == 0)
+ || (path[1+ src] == LT_PATHSEP_CHAR)
+ || (path[1+ src] == LT_EOS_CHAR))
+ continue;
+ }
+
+ /* Anything other than a directory separator is copied verbatim. */
+ if ((path[src] != '/')
+#if defined(LT_DIRSEP_CHAR)
+ && (path[src] != LT_DIRSEP_CHAR)
+#endif
+ )
+ {
+ canonical[dest++] = path[src];
+ }
+ /* Directory separators are converted and copied only if they are
+ not at the end of a path -- i.e. before a path separator or
+ NULL terminator. */
+ else if ((path[1+ src] != LT_PATHSEP_CHAR)
+ && (path[1+ src] != LT_EOS_CHAR)
+#if defined(LT_DIRSEP_CHAR)
+ && (path[1+ src] != LT_DIRSEP_CHAR)
+#endif
+ && (path[1+ src] != '/'))
+ {
+ canonical[dest++] = '/';
+ }
+ }
+
+ /* Add an end-of-string marker at the end. */
+ canonical[dest] = LT_EOS_CHAR;
+ }
+
+ /* Assign new value. */
+ *pcanonical = canonical;
+
+ return 0;
+}
+
+static int
+argzize_path (const char *path, char **pargz, size_t *pargz_len)
+{
+ error_t error;
+
+ assert (path);
+ assert (pargz);
+ assert (pargz_len);
+
+ if ((error = argz_create_sep (path, LT_PATHSEP_CHAR, pargz, pargz_len)))
+ {
+ switch (error)
+ {
+ case ENOMEM:
+ LT__SETERROR (NO_MEMORY);
+ break;
+ default:
+ LT__SETERROR (UNKNOWN);
+ break;
+ }
+
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Repeatedly call FUNC with each LT_PATHSEP_CHAR delimited element
+ of SEARCH_PATH and references to DATA1 and DATA2, until FUNC returns
+ non-zero or all elements are exhausted. If BASE_NAME is non-NULL,
+ it is appended to each SEARCH_PATH element before FUNC is called. */
+static int
+foreach_dirinpath (const char *search_path, const char *base_name,
+ foreach_callback_func *func, void *data1, void *data2)
+{
+ int result = 0;
+ size_t filenamesize = 0;
+ size_t lenbase = LT_STRLEN (base_name);
+ size_t argz_len = 0;
+ char *argz = 0;
+ char *filename = 0;
+ char *canonical = 0;
+
+ if (!search_path || !*search_path)
+ {
+ LT__SETERROR (FILE_NOT_FOUND);
+ goto cleanup;
+ }
+
+ if (canonicalize_path (search_path, &canonical) != 0)
+ goto cleanup;
+
+ if (argzize_path (canonical, &argz, &argz_len) != 0)
+ goto cleanup;
+
+ {
+ char *dir_name = 0;
+ while ((dir_name = argz_next (argz, argz_len, dir_name)))
+ {
+ size_t lendir = LT_STRLEN (dir_name);
+
+ if (1+ lendir + lenbase >= filenamesize)
+ {
+ FREE (filename);
+ filenamesize = 1+ lendir + 1+ lenbase; /* "/d" + '/' + "f" + '\0' */
+ filename = MALLOC (char, filenamesize);
+ if (!filename)
+ goto cleanup;
+ }
+
+ assert (filenamesize > lendir);
+ strcpy (filename, dir_name);
+
+ if (base_name && *base_name)
+ {
+ if (filename[lendir -1] != '/')
+ filename[lendir++] = '/';
+ strcpy (filename +lendir, base_name);
+ }
+
+ if ((result = (*func) (filename, data1, data2)))
+ {
+ break;
+ }
+ }
+ }
+
+ cleanup:
+ FREE (argz);
+ FREE (canonical);
+ FREE (filename);
+
+ return result;
+}
+
+/* If FILEPATH can be opened, store the name of the directory component
+ in DATA1, and the opened FILE* structure address in DATA2. Otherwise
+ DATA1 is unchanged, but DATA2 is set to a pointer to NULL. */
+static int
+find_file_callback (char *filename, void *data1, void *data2)
+{
+ char **pdir = (char **) data1;
+ FILE **pfile = (FILE **) data2;
+ int is_done = 0;
+
+ assert (filename && *filename);
+ assert (pdir);
+ assert (pfile);
+
+ if ((*pfile = fopen (filename, LT_READTEXT_MODE)))
+ {
+ char *dirend = strrchr (filename, '/');
+
+ if (dirend > filename)
+ *dirend = LT_EOS_CHAR;
+
+ FREE (*pdir);
+ *pdir = lt__strdup (filename);
+ is_done = (*pdir == 0) ? -1 : 1;
+ }
+
+ return is_done;
+}
+
+static FILE *
+find_file (const char *search_path, const char *base_name, char **pdir)
+{
+ FILE *file = 0;
+
+ foreach_dirinpath (search_path, base_name, find_file_callback, pdir, &file);
+
+ return file;
+}
+
+static int
+find_handle_callback (char *filename, void *data, void *data2)
+{
+ lt_dlhandle *phandle = (lt_dlhandle *) data;
+ int notfound = access (filename, R_OK);
+ lt_dladvise advise = (lt_dladvise) data2;
+
+ /* Bail out if file cannot be read... */
+ if (notfound)
+ return 0;
+
+ /* Try to dlopen the file, but do not continue searching in any
+ case. */
+ if (tryall_dlopen (phandle, filename, advise, 0) != 0)
+ *phandle = 0;
+
+ return 1;
+}
+
+/* If HANDLE was found return it, otherwise return 0. If HANDLE was
+ found but could not be opened, *HANDLE will be set to 0. */
+static lt_dlhandle *
+find_handle (const char *search_path, const char *base_name,
+ lt_dlhandle *phandle, lt_dladvise advise)
+{
+ if (!search_path)
+ return 0;
+
+ if (!foreach_dirinpath (search_path, base_name, find_handle_callback,
+ phandle, advise))
+ return 0;
+
+ return phandle;
+}
+
+#if !defined(LTDL_DLOPEN_DEPLIBS)
+static int
+load_deplibs (lt_dlhandle handle, char * LT__UNUSED deplibs)
+{
+ handle->depcount = 0;
+ return 0;
+}
+
+#else /* defined(LTDL_DLOPEN_DEPLIBS) */
+static int
+load_deplibs (lt_dlhandle handle, char *deplibs)
+{
+ char *p, *save_search_path = 0;
+ int depcount = 0;
+ int i;
+ char **names = 0;
+ int errors = 0;
+
+ handle->depcount = 0;
+
+ if (!deplibs)
+ {
+ return errors;
+ }
+ ++errors;
+
+ if (user_search_path)
+ {
+ save_search_path = lt__strdup (user_search_path);
+ if (!save_search_path)
+ goto cleanup;
+ }
+
+ /* extract search paths and count deplibs */
+ p = deplibs;
+ while (*p)
+ {
+ if (!isspace ((unsigned char) *p))
+ {
+ char *end = p+1;
+ while (*end && !isspace((unsigned char) *end))
+ {
+ ++end;
+ }
+
+ if (strncmp(p, "-L", 2) == 0 || strncmp(p, "-R", 2) == 0)
+ {
+ char save = *end;
+ *end = 0; /* set a temporary string terminator */
+ if (lt_dladdsearchdir(p+2))
+ {
+ goto cleanup;
+ }
+ *end = save;
+ }
+ else
+ {
+ ++depcount;
+ }
+
+ p = end;
+ }
+ else
+ {
+ ++p;
+ }
+ }
+
+
+ if (!depcount)
+ {
+ errors = 0;
+ goto cleanup;
+ }
+
+ names = MALLOC (char *, depcount);
+ if (!names)
+ goto cleanup;
+
+ /* now only extract the actual deplibs */
+ depcount = 0;
+ p = deplibs;
+ while (*p)
+ {
+ if (isspace ((unsigned char) *p))
+ {
+ ++p;
+ }
+ else
+ {
+ char *end = p+1;
+ while (*end && !isspace ((unsigned char) *end))
+ {
+ ++end;
+ }
+
+ if (strncmp(p, "-L", 2) != 0 && strncmp(p, "-R", 2) != 0)
+ {
+ char *name;
+ char save = *end;
+ *end = 0; /* set a temporary string terminator */
+ if (strncmp(p, "-l", 2) == 0)
+ {
+ size_t name_len = 3+ /* "lib" */ LT_STRLEN (p + 2);
+ name = MALLOC (char, 1+ name_len);
+ if (name)
+ sprintf (name, "lib%s", p+2);
+ }
+ else
+ name = lt__strdup(p);
+
+ if (!name)
+ goto cleanup_names;
+
+ names[depcount++] = name;
+ *end = save;
+ }
+ p = end;
+ }
+ }
+
+ /* load the deplibs (in reverse order)
+ At this stage, don't worry if the deplibs do not load correctly,
+ they may already be statically linked into the loading application
+ for instance. There will be a more enlightening error message
+ later on if the loaded module cannot resolve all of its symbols. */
+ if (depcount)
+ {
+ lt_dlhandle cur = handle;
+ int j = 0;
+
+ cur->deplibs = MALLOC (lt_dlhandle, depcount);
+ if (!cur->deplibs)
+ goto cleanup_names;
+
+ for (i = 0; i < depcount; ++i)
+ {
+ cur->deplibs[j] = lt_dlopenext(names[depcount-1-i]);
+ if (cur->deplibs[j])
+ {
+ ++j;
+ }
+ }
+
+ cur->depcount = j; /* Number of successfully loaded deplibs */
+ errors = 0;
+ }
+
+ cleanup_names:
+ for (i = 0; i < depcount; ++i)
+ {
+ FREE (names[i]);
+ }
+
+ cleanup:
+ FREE (names);
+ /* restore the old search path */
+ if (save_search_path) {
+ MEMREASSIGN (user_search_path, save_search_path);
+ }
+
+ return errors;
+}
+#endif /* defined(LTDL_DLOPEN_DEPLIBS) */
+
+static int
+unload_deplibs (lt_dlhandle handle)
+{
+ int i;
+ int errors = 0;
+ lt_dlhandle cur = handle;
+
+ if (cur->depcount)
+ {
+ for (i = 0; i < cur->depcount; ++i)
+ {
+ if (!LT_DLIS_RESIDENT (cur->deplibs[i]))
+ {
+ errors += lt_dlclose (cur->deplibs[i]);
+ }
+ }
+ FREE (cur->deplibs);
+ }
+
+ return errors;
+}
+
+static int
+trim (char **dest, const char *str)
+{
+ /* remove the leading and trailing "'" from str
+ and store the result in dest */
+ const char *end = strrchr (str, '\'');
+ size_t len = LT_STRLEN (str);
+ char *tmp;
+
+ FREE (*dest);
+
+ if (!end)
+ return 1;
+
+ if (len > 3 && str[0] == '\'')
+ {
+ tmp = MALLOC (char, end - str);
+ if (!tmp)
+ return 1;
+
+ memcpy(tmp, &str[1], (end - str) - 1);
+ tmp[(end - str) - 1] = LT_EOS_CHAR;
+ *dest = tmp;
+ }
+ else
+ {
+ *dest = 0;
+ }
+
+ return 0;
+}
+
+/* Read the .la file FILE. */
+static int
+parse_dotla_file(FILE *file, char **dlname, char **libdir, char **deplibs,
+ char **old_name, int *installed)
+{
+ int errors = 0;
+ size_t line_len = LT_FILENAME_MAX;
+ char * line = MALLOC (char, line_len);
+
+ if (!line)
+ {
+ LT__SETERROR (FILE_NOT_FOUND);
+ return 1;
+ }
+
+ while (!feof (file))
+ {
+ line[line_len-2] = '\0';
+ if (!fgets (line, (int) line_len, file))
+ {
+ break;
+ }
+
+ /* Handle the case where we occasionally need to read a line
+ that is longer than the initial buffer size.
+ Behave even if the file contains NUL bytes due to corruption. */
+ while (line[line_len-2] != '\0' && line[line_len-2] != '\n' && !feof (file))
+ {
+ line = REALLOC (char, line, line_len *2);
+ if (!line)
+ {
+ ++errors;
+ goto cleanup;
+ }
+ line[line_len * 2 - 2] = '\0';
+ if (!fgets (&line[line_len -1], (int) line_len +1, file))
+ {
+ break;
+ }
+ line_len *= 2;
+ }
+
+ if (line[0] == '\n' || line[0] == '#')
+ {
+ continue;
+ }
+
+#undef STR_DLNAME
+#define STR_DLNAME "dlname="
+ if (strncmp (line, STR_DLNAME, sizeof (STR_DLNAME) - 1) == 0)
+ {
+ errors += trim (dlname, &line[sizeof (STR_DLNAME) - 1]);
+ }
+
+#undef STR_OLD_LIBRARY
+#define STR_OLD_LIBRARY "old_library="
+ else if (strncmp (line, STR_OLD_LIBRARY,
+ sizeof (STR_OLD_LIBRARY) - 1) == 0)
+ {
+ errors += trim (old_name, &line[sizeof (STR_OLD_LIBRARY) - 1]);
+ }
+#undef STR_LIBDIR
+#define STR_LIBDIR "libdir="
+ else if (strncmp (line, STR_LIBDIR, sizeof (STR_LIBDIR) - 1) == 0)
+ {
+ errors += trim (libdir, &line[sizeof(STR_LIBDIR) - 1]);
+ }
+
+#undef STR_DL_DEPLIBS
+#define STR_DL_DEPLIBS "dependency_libs="
+ else if (strncmp (line, STR_DL_DEPLIBS,
+ sizeof (STR_DL_DEPLIBS) - 1) == 0)
+ {
+ errors += trim (deplibs, &line[sizeof (STR_DL_DEPLIBS) - 1]);
+ }
+ else if (streq (line, "installed=yes\n"))
+ {
+ *installed = 1;
+ }
+ else if (streq (line, "installed=no\n"))
+ {
+ *installed = 0;
+ }
+
+#undef STR_LIBRARY_NAMES
+#define STR_LIBRARY_NAMES "library_names="
+ else if (!*dlname && strncmp (line, STR_LIBRARY_NAMES,
+ sizeof (STR_LIBRARY_NAMES) - 1) == 0)
+ {
+ char *last_libname;
+ errors += trim (dlname, &line[sizeof (STR_LIBRARY_NAMES) - 1]);
+ if (!errors
+ && *dlname
+ && (last_libname = strrchr (*dlname, ' ')) != 0)
+ {
+ last_libname = lt__strdup (last_libname + 1);
+ if (!last_libname)
+ {
+ ++errors;
+ goto cleanup;
+ }
+ MEMREASSIGN (*dlname, last_libname);
+ }
+ }
+
+ if (errors)
+ break;
+ }
+cleanup:
+ FREE (line);
+ return errors;
+}
+
+
+/* Try to open FILENAME as a module. */
+static int
+try_dlopen (lt_dlhandle *phandle, const char *filename, const char *ext,
+ lt_dladvise advise)
+{
+ const char * saved_error = 0;
+ char * archive_name = 0;
+ char * canonical = 0;
+ char * base_name = 0;
+ char * dir = 0;
+ char * name = 0;
+ char * attempt = 0;
+ int errors = 0;
+ lt_dlhandle newhandle;
+
+ assert (phandle);
+ assert (*phandle == 0);
+
+#ifdef LT_DEBUG_LOADERS
+ fprintf (stderr, "try_dlopen (%s, %s)\n",
+ filename ? filename : "(null)",
+ ext ? ext : "(null)");
+#endif
+
+ LT__GETERROR (saved_error);
+
+ /* dlopen self? */
+ if (!filename)
+ {
+ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
+ if (*phandle == 0)
+ return 1;
+
+ newhandle = *phandle;
+
+ /* lt_dlclose()ing yourself is very bad! Disallow it. */
+ newhandle->info.is_resident = 1;
+
+ if (tryall_dlopen (&newhandle, 0, advise, 0) != 0)
+ {
+ FREE (*phandle);
+ return 1;
+ }
+
+ goto register_handle;
+ }
+
+ assert (filename && *filename);
+
+ if (ext)
+ {
+ attempt = MALLOC (char, LT_STRLEN (filename) + LT_STRLEN (ext) + 1);
+ if (!attempt)
+ return 1;
+
+ sprintf(attempt, "%s%s", filename, ext);
+ }
+ else
+ {
+ attempt = lt__strdup (filename);
+ if (!attempt)
+ return 1;
+ }
+
+ /* Doing this immediately allows internal functions to safely
+ assume only canonicalized paths are passed. */
+ if (canonicalize_path (attempt, &canonical) != 0)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ /* If the canonical module name is a path (relative or absolute)
+ then split it into a directory part and a name part. */
+ base_name = strrchr (canonical, '/');
+ if (base_name)
+ {
+ size_t dirlen = (1+ base_name) - canonical;
+
+ dir = MALLOC (char, 1+ dirlen);
+ if (!dir)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ strncpy (dir, canonical, dirlen);
+ dir[dirlen] = LT_EOS_CHAR;
+
+ ++base_name;
+ }
+ else
+ MEMREASSIGN (base_name, canonical);
+
+ assert (base_name && *base_name);
+
+ ext = strrchr (base_name, '.');
+ if (!ext)
+ {
+ ext = base_name + LT_STRLEN (base_name);
+ }
+
+ /* extract the module name from the file name */
+ name = MALLOC (char, ext - base_name + 1);
+ if (!name)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ /* canonicalize the module name */
+ {
+ int i;
+ for (i = 0; i < ext - base_name; ++i)
+ {
+ if (isalnum ((unsigned char)(base_name[i])))
+ {
+ name[i] = base_name[i];
+ }
+ else
+ {
+ name[i] = '_';
+ }
+ }
+ name[ext - base_name] = LT_EOS_CHAR;
+ }
+
+ /* Before trawling through the filesystem in search of a module,
+ check whether we are opening a preloaded module. */
+ if (!dir)
+ {
+ const lt_dlvtable *vtable = lt_dlloader_find ("lt_preopen");
+
+ if (vtable)
+ {
+ /* name + "." + libext + NULL */
+ archive_name = MALLOC (char, LT_STRLEN (name) + LT_STRLEN (libext) + 2);
+ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
+
+ if ((*phandle == NULL) || (archive_name == NULL))
+ {
+ ++errors;
+ goto cleanup;
+ }
+ newhandle = *phandle;
+
+ /* Preloaded modules are always named according to their old
+ archive name. */
+ sprintf (archive_name, "%s.%s", name, libext);
+
+ if (tryall_dlopen (&newhandle, archive_name, advise, vtable) == 0)
+ {
+ goto register_handle;
+ }
+
+ /* If we're still here, there was no matching preloaded module,
+ so put things back as we found them, and continue searching. */
+ FREE (*phandle);
+ newhandle = NULL;
+ }
+ }
+
+ /* If we are allowing only preloaded modules, and we didn't find
+ anything yet, give up on the search here. */
+ if (advise && advise->try_preload_only)
+ {
+ goto cleanup;
+ }
+
+ /* Check whether we are opening a libtool module (.la extension). */
+ if (ext && streq (ext, archive_ext))
+ {
+ /* this seems to be a libtool module */
+ FILE * file = 0;
+ char * dlname = 0;
+ char * old_name = 0;
+ char * libdir = 0;
+ char * deplibs = 0;
+
+ /* if we can't find the installed flag, it is probably an
+ installed libtool archive, produced with an old version
+ of libtool */
+ int installed = 1;
+
+ /* Now try to open the .la file. If there is no directory name
+ component, try to find it first in user_search_path and then other
+ prescribed paths. Otherwise (or in any case if the module was not
+ yet found) try opening just the module name as passed. */
+ if (!dir)
+ {
+ const char *search_path = user_search_path;
+
+ if (search_path)
+ file = find_file (user_search_path, base_name, &dir);
+
+ if (!file)
+ {
+ search_path = getenv (LTDL_SEARCHPATH_VAR);
+ if (search_path)
+ file = find_file (search_path, base_name, &dir);
+ }
+
+#if defined(LT_MODULE_PATH_VAR)
+ if (!file)
+ {
+ search_path = getenv (LT_MODULE_PATH_VAR);
+ if (search_path)
+ file = find_file (search_path, base_name, &dir);
+ }
+#endif
+#if defined(LT_DLSEARCH_PATH)
+ if (!file && *sys_dlsearch_path)
+ {
+ file = find_file (sys_dlsearch_path, base_name, &dir);
+ }
+#endif
+ }
+ else
+ {
+ file = fopen (attempt, LT_READTEXT_MODE);
+ }
+
+ /* If we didn't find the file by now, it really isn't there. Set
+ the status flag, and bail out. */
+ if (!file)
+ {
+ LT__SETERROR (FILE_NOT_FOUND);
+ ++errors;
+ goto cleanup;
+ }
+
+ /* read the .la file */
+ if (parse_dotla_file(file, &dlname, &libdir, &deplibs,
+ &old_name, &installed) != 0)
+ ++errors;
+
+ fclose (file);
+
+ /* allocate the handle */
+ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
+ if (*phandle == 0)
+ ++errors;
+
+ if (errors)
+ {
+ FREE (dlname);
+ FREE (old_name);
+ FREE (libdir);
+ FREE (deplibs);
+ FREE (*phandle);
+ goto cleanup;
+ }
+
+ assert (*phandle);
+
+ if (load_deplibs (*phandle, deplibs) == 0)
+ {
+ newhandle = *phandle;
+ /* find_module may replace newhandle */
+ if (find_module (&newhandle, dir, libdir, dlname, old_name,
+ installed, advise))
+ {
+ unload_deplibs (*phandle);
+ ++errors;
+ }
+ }
+ else
+ {
+ ++errors;
+ }
+
+ FREE (dlname);
+ FREE (old_name);
+ FREE (libdir);
+ FREE (deplibs);
+
+ if (errors)
+ {
+ FREE (*phandle);
+ goto cleanup;
+ }
+
+ if (*phandle != newhandle)
+ {
+ unload_deplibs (*phandle);
+ }
+ }
+ else
+ {
+ /* not a libtool module */
+ *phandle = (lt_dlhandle) lt__zalloc (sizeof (struct lt__handle));
+ if (*phandle == 0)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ newhandle = *phandle;
+
+ /* If the module has no directory name component, try to find it
+ first in user_search_path and then other prescribed paths.
+ Otherwise (or in any case if the module was not yet found) try
+ opening just the module name as passed. */
+ if ((dir || (!find_handle (user_search_path, base_name,
+ &newhandle, advise)
+ && !find_handle (getenv (LTDL_SEARCHPATH_VAR), base_name,
+ &newhandle, advise)
+#if defined(LT_MODULE_PATH_VAR)
+ && !find_handle (getenv (LT_MODULE_PATH_VAR), base_name,
+ &newhandle, advise)
+#endif
+#if defined(LT_DLSEARCH_PATH)
+ && !find_handle (sys_dlsearch_path, base_name,
+ &newhandle, advise)
+#endif
+ )))
+ {
+ if (tryall_dlopen (&newhandle, attempt, advise, 0) != 0)
+ {
+ newhandle = NULL;
+ }
+ }
+
+ if (!newhandle)
+ {
+ FREE (*phandle);
+ ++errors;
+ goto cleanup;
+ }
+ }
+
+ register_handle:
+ MEMREASSIGN (*phandle, newhandle);
+
+ if ((*phandle)->info.ref_count == 0)
+ {
+ (*phandle)->info.ref_count = 1;
+ MEMREASSIGN ((*phandle)->info.name, name);
+
+ (*phandle)->next = handles;
+ handles = *phandle;
+ }
+
+ LT__SETERRORSTR (saved_error);
+
+ cleanup:
+ FREE (dir);
+ FREE (attempt);
+ FREE (name);
+ if (!canonical) /* was MEMREASSIGNed */
+ FREE (base_name);
+ FREE (canonical);
+ FREE (archive_name);
+
+ return errors;
+}
+
+
+/* If the last error messge store was `FILE_NOT_FOUND', then return
+ non-zero. */
+static int
+file_not_found (void)
+{
+ const char *error = 0;
+
+ LT__GETERROR (error);
+ if (error == LT__STRERROR (FILE_NOT_FOUND))
+ return 1;
+
+ return 0;
+}
+
+
+/* Unless FILENAME already bears a suitable library extension, then
+ return 0. */
+static int
+has_library_ext (const char *filename)
+{
+ char * ext = 0;
+
+ assert (filename);
+
+ ext = strrchr (filename, '.');
+
+ if (ext && ((streq (ext, archive_ext))
+#if defined(LT_MODULE_EXT)
+ || (streq (ext, shlib_ext))
+#endif
+ ))
+ {
+ return 1;
+ }
+
+ return 0;
+}
+
+
+/* Initialise and configure a user lt_dladvise opaque object. */
+
+int
+lt_dladvise_init (lt_dladvise *padvise)
+{
+ lt_dladvise advise = (lt_dladvise) lt__zalloc (sizeof (struct lt__advise));
+ *padvise = advise;
+ return (advise ? 0 : 1);
+}
+
+int
+lt_dladvise_destroy (lt_dladvise *padvise)
+{
+ if (padvise)
+ FREE(*padvise);
+ return 0;
+}
+
+int
+lt_dladvise_ext (lt_dladvise *padvise)
+{
+ assert (padvise && *padvise);
+ (*padvise)->try_ext = 1;
+ return 0;
+}
+
+int
+lt_dladvise_resident (lt_dladvise *padvise)
+{
+ assert (padvise && *padvise);
+ (*padvise)->is_resident = 1;
+ return 0;
+}
+
+int
+lt_dladvise_local (lt_dladvise *padvise)
+{
+ assert (padvise && *padvise);
+ (*padvise)->is_symlocal = 1;
+ return 0;
+}
+
+int
+lt_dladvise_global (lt_dladvise *padvise)
+{
+ assert (padvise && *padvise);
+ (*padvise)->is_symglobal = 1;
+ return 0;
+}
+
+int
+lt_dladvise_preload (lt_dladvise *padvise)
+{
+ assert (padvise && *padvise);
+ (*padvise)->try_preload_only = 1;
+ return 0;
+}
+
+/* Libtool-1.5.x interface for loading a new module named FILENAME. */
+lt_dlhandle
+lt_dlopen (const char *filename)
+{
+ return lt_dlopenadvise (filename, NULL);
+}
+
+
+/* If FILENAME has an ARCHIVE_EXT or MODULE_EXT extension, try to
+ open the FILENAME as passed. Otherwise try appending ARCHIVE_EXT,
+ and if a file is still not found try again with MODULE_EXT appended
+ instead. */
+lt_dlhandle
+lt_dlopenext (const char *filename)
+{
+ lt_dlhandle handle = 0;
+ lt_dladvise advise;
+
+ if (!lt_dladvise_init (&advise) && !lt_dladvise_ext (&advise))
+ handle = lt_dlopenadvise (filename, advise);
+
+ lt_dladvise_destroy (&advise);
+ return handle;
+}
+
+
+lt_dlhandle
+lt_dlopenadvise (const char *filename, lt_dladvise advise)
+{
+ lt_dlhandle handle = 0;
+ int errors = 0;
+ const char * saved_error = 0;
+
+ LT__GETERROR (saved_error);
+
+ /* Can't have symbols hidden and visible at the same time! */
+ if (advise && advise->is_symlocal && advise->is_symglobal)
+ {
+ LT__SETERROR (CONFLICTING_FLAGS);
+ return 0;
+ }
+
+ if (!filename
+ || !advise
+ || !advise->try_ext
+ || has_library_ext (filename))
+ {
+ /* Just incase we missed a code path in try_dlopen() that reports
+ an error, but forgot to reset handle... */
+ if (try_dlopen (&handle, filename, NULL, advise) != 0)
+ return 0;
+
+ return handle;
+ }
+ else if (filename && *filename)
+ {
+
+ /* First try appending ARCHIVE_EXT. */
+ errors += try_dlopen (&handle, filename, archive_ext, advise);
+
+ /* If we found FILENAME, stop searching -- whether we were able to
+ load the file as a module or not. If the file exists but loading
+ failed, it is better to return an error message here than to
+ report FILE_NOT_FOUND when the alternatives (foo.so etc) are not
+ in the module search path. */
+ if (handle || ((errors > 0) && !file_not_found ()))
+ return handle;
+
+#if defined(LT_MODULE_EXT)
+ /* Try appending SHLIB_EXT. */
+ LT__SETERRORSTR (saved_error);
+ errors = try_dlopen (&handle, filename, shlib_ext, advise);
+
+ /* As before, if the file was found but loading failed, return now
+ with the current error message. */
+ if (handle || ((errors > 0) && !file_not_found ()))
+ return handle;
+#endif
+ }
+
+ /* Still here? Then we really did fail to locate any of the file
+ names we tried. */
+ LT__SETERROR (FILE_NOT_FOUND);
+ return 0;
+}
+
+
+static int
+lt_argz_insert (char **pargz, size_t *pargz_len, char *before,
+ const char *entry)
+{
+ error_t error;
+
+ /* Prior to Sep 8, 2005, newlib had a bug where argz_insert(pargz,
+ pargz_len, NULL, entry) failed with EINVAL. */
+ if (before)
+ error = argz_insert (pargz, pargz_len, before, entry);
+ else
+ error = argz_append (pargz, pargz_len, entry, 1 + strlen (entry));
+
+ if (error)
+ {
+ switch (error)
+ {
+ case ENOMEM:
+ LT__SETERROR (NO_MEMORY);
+ break;
+ default:
+ LT__SETERROR (UNKNOWN);
+ break;
+ }
+ return 1;
+ }
+
+ return 0;
+}
+
+static int
+lt_argz_insertinorder (char **pargz, size_t *pargz_len, const char *entry)
+{
+ char *before = 0;
+
+ assert (pargz);
+ assert (pargz_len);
+ assert (entry && *entry);
+
+ if (*pargz)
+ while ((before = argz_next (*pargz, *pargz_len, before)))
+ {
+ int cmp = strcmp (entry, before);
+
+ if (cmp < 0) break;
+ if (cmp == 0) return 0; /* No duplicates! */
+ }
+
+ return lt_argz_insert (pargz, pargz_len, before, entry);
+}
+
+static int
+lt_argz_insertdir (char **pargz, size_t *pargz_len, const char *dirnam,
+ struct dirent *dp)
+{
+ char *buf = 0;
+ size_t buf_len = 0;
+ char *end = 0;
+ size_t end_offset = 0;
+ size_t dir_len = 0;
+ int errors = 0;
+
+ assert (pargz);
+ assert (pargz_len);
+ assert (dp);
+
+ dir_len = LT_STRLEN (dirnam);
+ end = dp->d_name + D_NAMLEN(dp);
+
+ /* Ignore version numbers. */
+ {
+ char *p;
+ for (p = end; p -1 > dp->d_name; --p)
+ if (strchr (".0123456789", p[-1]) == 0)
+ break;
+
+ if (*p == '.')
+ end = p;
+ }
+
+ /* Ignore filename extension. */
+ {
+ char *p;
+ for (p = end -1; p > dp->d_name; --p)
+ if (*p == '.')
+ {
+ end = p;
+ break;
+ }
+ }
+
+ /* Prepend the directory name. */
+ end_offset = end - dp->d_name;
+ buf_len = dir_len + 1+ end_offset;
+ buf = MALLOC (char, 1+ buf_len);
+ if (!buf)
+ return ++errors;
+
+ assert (buf);
+
+ strcpy (buf, dirnam);
+ strcat (buf, "/");
+ strncat (buf, dp->d_name, end_offset);
+ buf[buf_len] = LT_EOS_CHAR;
+
+ /* Try to insert (in order) into ARGZ/ARGZ_LEN. */
+ if (lt_argz_insertinorder (pargz, pargz_len, buf) != 0)
+ ++errors;
+
+ FREE (buf);
+
+ return errors;
+}
+
+static int
+list_files_by_dir (const char *dirnam, char **pargz, size_t *pargz_len)
+{
+ DIR *dirp = 0;
+ int errors = 0;
+
+ assert (dirnam && *dirnam);
+ assert (pargz);
+ assert (pargz_len);
+ assert (dirnam[LT_STRLEN(dirnam) -1] != '/');
+
+ dirp = opendir (dirnam);
+ if (dirp)
+ {
+ struct dirent *dp = 0;
+
+ while ((dp = readdir (dirp)))
+ if (dp->d_name[0] != '.')
+ if (lt_argz_insertdir (pargz, pargz_len, dirnam, dp))
+ {
+ ++errors;
+ break;
+ }
+
+ closedir (dirp);
+ }
+ else
+ ++errors;
+
+ return errors;
+}
+
+
+/* If there are any files in DIRNAME, call the function passed in
+ DATA1 (with the name of each file and DATA2 as arguments). */
+static int
+foreachfile_callback (char *dirname, void *data1, void *data2)
+{
+ file_worker_func *func = *(file_worker_func **) data1;
+
+ int is_done = 0;
+ char *argz = 0;
+ size_t argz_len = 0;
+
+ if (list_files_by_dir (dirname, &argz, &argz_len) != 0)
+ goto cleanup;
+ if (!argz)
+ goto cleanup;
+
+ {
+ char *filename = 0;
+ while ((filename = argz_next (argz, argz_len, filename)))
+ if ((is_done = (*func) (filename, data2)))
+ break;
+ }
+
+ cleanup:
+ FREE (argz);
+
+ return is_done;
+}
+
+
+/* Call FUNC for each unique extensionless file in SEARCH_PATH, along
+ with DATA. The filenames passed to FUNC would be suitable for
+ passing to lt_dlopenext. The extensions are stripped so that
+ individual modules do not generate several entries (e.g. libfoo.la,
+ libfoo.so, libfoo.so.1, libfoo.so.1.0.0). If SEARCH_PATH is NULL,
+ then the same directories that lt_dlopen would search are examined. */
+int
+lt_dlforeachfile (const char *search_path,
+ int (*func) (const char *filename, void *data),
+ void *data)
+{
+ int is_done = 0;
+ file_worker_func **fpptr = &func;
+
+ if (search_path)
+ {
+ /* If a specific path was passed, search only the directories
+ listed in it. */
+ is_done = foreach_dirinpath (search_path, 0,
+ foreachfile_callback, fpptr, data);
+ }
+ else
+ {
+ /* Otherwise search the default paths. */
+ is_done = foreach_dirinpath (user_search_path, 0,
+ foreachfile_callback, fpptr, data);
+ if (!is_done)
+ {
+ is_done = foreach_dirinpath (getenv(LTDL_SEARCHPATH_VAR), 0,
+ foreachfile_callback, fpptr, data);
+ }
+
+#if defined(LT_MODULE_PATH_VAR)
+ if (!is_done)
+ {
+ is_done = foreach_dirinpath (getenv(LT_MODULE_PATH_VAR), 0,
+ foreachfile_callback, fpptr, data);
+ }
+#endif
+#if defined(LT_DLSEARCH_PATH)
+ if (!is_done && *sys_dlsearch_path)
+ {
+ is_done = foreach_dirinpath (sys_dlsearch_path, 0,
+ foreachfile_callback, fpptr, data);
+ }
+#endif
+ }
+
+ return is_done;
+}
+
+int
+lt_dlclose (lt_dlhandle handle)
+{
+ lt_dlhandle cur, last;
+ int errors = 0;
+
+ /* check whether the handle is valid */
+ last = cur = handles;
+ while (cur && handle != cur)
+ {
+ last = cur;
+ cur = cur->next;
+ }
+
+ if (!cur)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ ++errors;
+ goto done;
+ }
+
+ cur = handle;
+ cur->info.ref_count--;
+
+ /* Note that even with resident modules, we must track the ref_count
+ correctly incase the user decides to reset the residency flag
+ later (even though the API makes no provision for that at the
+ moment). */
+ if (cur->info.ref_count <= 0 && !LT_DLIS_RESIDENT (cur))
+ {
+ lt_user_data data = cur->vtable->dlloader_data;
+
+ if (cur != handles)
+ {
+ last->next = cur->next;
+ }
+ else
+ {
+ handles = cur->next;
+ }
+
+ errors += cur->vtable->module_close (data, cur->module);
+ errors += unload_deplibs (handle);
+
+ /* It is up to the callers to free the data itself. */
+ FREE (cur->interface_data);
+
+ FREE (cur->info.filename);
+ FREE (cur->info.name);
+ FREE (cur);
+
+ goto done;
+ }
+
+ if (LT_DLIS_RESIDENT (handle))
+ {
+ LT__SETERROR (CLOSE_RESIDENT_MODULE);
+ ++errors;
+ }
+
+ done:
+ return errors;
+}
+
+void *
+lt_dlsym (lt_dlhandle place, const char *symbol)
+{
+ size_t lensym;
+ char lsym[LT_SYMBOL_LENGTH];
+ char *sym;
+ void *address;
+ lt_user_data data;
+ lt_dlhandle handle;
+
+ if (!place)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ return 0;
+ }
+
+ handle = place;
+
+ if (!symbol)
+ {
+ LT__SETERROR (SYMBOL_NOT_FOUND);
+ return 0;
+ }
+
+ lensym = LT_STRLEN (symbol) + LT_STRLEN (handle->vtable->sym_prefix)
+ + LT_STRLEN (handle->info.name);
+
+ if (lensym + LT_SYMBOL_OVERHEAD < LT_SYMBOL_LENGTH)
+ {
+ sym = lsym;
+ }
+ else
+ {
+ sym = MALLOC (char, lensym + LT_SYMBOL_OVERHEAD + 1);
+ if (!sym)
+ {
+ LT__SETERROR (BUFFER_OVERFLOW);
+ return 0;
+ }
+ }
+
+ data = handle->vtable->dlloader_data;
+ if (handle->info.name)
+ {
+ const char *saved_error;
+
+ LT__GETERROR (saved_error);
+
+ /* this is a libtool module */
+ if (handle->vtable->sym_prefix)
+ {
+ strcpy(sym, handle->vtable->sym_prefix);
+ strcat(sym, handle->info.name);
+ }
+ else
+ {
+ strcpy(sym, handle->info.name);
+ }
+
+ strcat(sym, "_LTX_");
+ strcat(sym, symbol);
+
+ /* try "modulename_LTX_symbol" */
+ address = handle->vtable->find_sym (data, handle->module, sym);
+ if (address)
+ {
+ if (sym != lsym)
+ {
+ FREE (sym);
+ }
+ return address;
+ }
+ LT__SETERRORSTR (saved_error);
+ }
+
+ /* otherwise try "symbol" */
+ if (handle->vtable->sym_prefix)
+ {
+ strcpy(sym, handle->vtable->sym_prefix);
+ strcat(sym, symbol);
+ }
+ else
+ {
+ strcpy(sym, symbol);
+ }
+
+ address = handle->vtable->find_sym (data, handle->module, sym);
+ if (sym != lsym)
+ {
+ FREE (sym);
+ }
+
+ return address;
+}
+
+const char *
+lt_dlerror (void)
+{
+ const char *error;
+
+ LT__GETERROR (error);
+ LT__SETERRORSTR (0);
+
+ return error ? error : NULL;
+}
+
+static int
+lt_dlpath_insertdir (char **ppath, char *before, const char *dir)
+{
+ int errors = 0;
+ char *canonical = 0;
+ char *argz = 0;
+ size_t argz_len = 0;
+
+ assert (ppath);
+ assert (dir && *dir);
+
+ if (canonicalize_path (dir, &canonical) != 0)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ assert (canonical && *canonical);
+
+ /* If *PPATH is empty, set it to DIR. */
+ if (*ppath == 0)
+ {
+ assert (!before); /* BEFORE cannot be set without PPATH. */
+ assert (dir); /* Without DIR, don't call this function! */
+
+ *ppath = lt__strdup (dir);
+ if (*ppath == 0)
+ ++errors;
+
+ goto cleanup;
+ }
+
+ assert (ppath && *ppath);
+
+ if (argzize_path (*ppath, &argz, &argz_len) != 0)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ /* Convert BEFORE into an equivalent offset into ARGZ. This only works
+ if *PPATH is already canonicalized, and hence does not change length
+ with respect to ARGZ. We canonicalize each entry as it is added to
+ the search path, and don't call this function with (uncanonicalized)
+ user paths, so this is a fair assumption. */
+ if (before)
+ {
+ assert (*ppath <= before);
+ assert ((int) (before - *ppath) <= (int) strlen (*ppath));
+
+ before = before - *ppath + argz;
+ }
+
+ if (lt_argz_insert (&argz, &argz_len, before, dir) != 0)
+ {
+ ++errors;
+ goto cleanup;
+ }
+
+ argz_stringify (argz, argz_len, LT_PATHSEP_CHAR);
+ MEMREASSIGN(*ppath, argz);
+
+ cleanup:
+ FREE (argz);
+ FREE (canonical);
+
+ return errors;
+}
+
+int
+lt_dladdsearchdir (const char *search_dir)
+{
+ int errors = 0;
+
+ if (search_dir && *search_dir)
+ {
+ if (lt_dlpath_insertdir (&user_search_path, 0, search_dir) != 0)
+ ++errors;
+ }
+
+ return errors;
+}
+
+int
+lt_dlinsertsearchdir (const char *before, const char *search_dir)
+{
+ int errors = 0;
+
+ if (before)
+ {
+ if ((before < user_search_path)
+ || (before >= user_search_path + LT_STRLEN (user_search_path)))
+ {
+ LT__SETERROR (INVALID_POSITION);
+ return 1;
+ }
+ }
+
+ if (search_dir && *search_dir)
+ {
+ if (lt_dlpath_insertdir (&user_search_path,
+ (char *) before, search_dir) != 0)
+ {
+ ++errors;
+ }
+ }
+
+ return errors;
+}
+
+int
+lt_dlsetsearchpath (const char *search_path)
+{
+ int errors = 0;
+
+ FREE (user_search_path);
+
+ if (!search_path || !LT_STRLEN (search_path))
+ {
+ return errors;
+ }
+
+ if (canonicalize_path (search_path, &user_search_path) != 0)
+ ++errors;
+
+ return errors;
+}
+
+const char *
+lt_dlgetsearchpath (void)
+{
+ const char *saved_path;
+
+ saved_path = user_search_path;
+
+ return saved_path;
+}
+
+int
+lt_dlmakeresident (lt_dlhandle handle)
+{
+ int errors = 0;
+
+ if (!handle)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ ++errors;
+ }
+ else
+ {
+ handle->info.is_resident = 1;
+ }
+
+ return errors;
+}
+
+int
+lt_dlisresident (lt_dlhandle handle)
+{
+ if (!handle)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ return -1;
+ }
+
+ return LT_DLIS_RESIDENT (handle);
+}
+
+
+
+/* --- MODULE INFORMATION --- */
+
+typedef struct {
+ const char *id_string;
+ lt_dlhandle_interface *iface;
+} lt__interface_id;
+
+lt_dlinterface_id
+lt_dlinterface_register (const char *id_string, lt_dlhandle_interface *iface)
+{
+ lt__interface_id *interface_id = (lt__interface_id *) lt__malloc (sizeof *interface_id);
+
+ /* If lt__malloc fails, it will LT__SETERROR (NO_MEMORY), which
+ can then be detected with lt_dlerror() if we return 0. */
+ if (interface_id)
+ {
+ interface_id->id_string = lt__strdup (id_string);
+ if (!interface_id->id_string)
+ FREE (interface_id);
+ else
+ interface_id->iface = iface;
+ }
+
+ return (lt_dlinterface_id) interface_id;
+}
+
+void lt_dlinterface_free (lt_dlinterface_id key)
+{
+ lt__interface_id *interface_id = (lt__interface_id *)key;
+ FREE (interface_id->id_string);
+ FREE (interface_id);
+}
+
+void *
+lt_dlcaller_set_data (lt_dlinterface_id key, lt_dlhandle handle, void *data)
+{
+ int n_elements = 0;
+ void *stale = (void *) 0;
+ lt_dlhandle cur = handle;
+ int i;
+
+ if (cur->interface_data)
+ while (cur->interface_data[n_elements].key)
+ ++n_elements;
+
+ for (i = 0; i < n_elements; ++i)
+ {
+ if (cur->interface_data[i].key == key)
+ {
+ stale = cur->interface_data[i].data;
+ break;
+ }
+ }
+
+ /* Ensure that there is enough room in this handle's interface_data
+ array to accept a new element (and an empty end marker). */
+ if (i == n_elements)
+ {
+ lt_interface_data *temp
+ = REALLOC (lt_interface_data, cur->interface_data, 2+ n_elements);
+
+ if (!temp)
+ {
+ stale = 0;
+ goto done;
+ }
+
+ cur->interface_data = temp;
+
+ /* We only need this if we needed to allocate a new interface_data. */
+ cur->interface_data[i].key = key;
+ cur->interface_data[1+ i].key = 0;
+ }
+
+ cur->interface_data[i].data = data;
+
+ done:
+ return stale;
+}
+
+void *
+lt_dlcaller_get_data (lt_dlinterface_id key, lt_dlhandle handle)
+{
+ void *result = (void *) 0;
+ lt_dlhandle cur = handle;
+
+ /* Locate the index of the element with a matching KEY. */
+ if (cur->interface_data)
+ {
+ int i;
+ for (i = 0; cur->interface_data[i].key; ++i)
+ {
+ if (cur->interface_data[i].key == key)
+ {
+ result = cur->interface_data[i].data;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+const lt_dlinfo *
+lt_dlgetinfo (lt_dlhandle handle)
+{
+ if (!handle)
+ {
+ LT__SETERROR (INVALID_HANDLE);
+ return 0;
+ }
+
+ return &(handle->info);
+}
+
+
+lt_dlhandle
+lt_dlhandle_iterate (lt_dlinterface_id iface, lt_dlhandle place)
+{
+ lt_dlhandle handle = place;
+ lt__interface_id *iterator = (lt__interface_id *) iface;
+
+ assert (iface); /* iface is a required argument */
+
+ if (!handle)
+ handle = handles;
+ else
+ handle = handle->next;
+
+ /* advance while the interface check fails */
+ while (handle && iterator->iface
+ && ((*iterator->iface) (handle, iterator->id_string) != 0))
+ {
+ handle = handle->next;
+ }
+
+ return handle;
+}
+
+
+lt_dlhandle
+lt_dlhandle_fetch (lt_dlinterface_id iface, const char *module_name)
+{
+ lt_dlhandle handle = 0;
+
+ assert (iface); /* iface is a required argument */
+
+ while ((handle = lt_dlhandle_iterate (iface, handle)))
+ {
+ lt_dlhandle cur = handle;
+ if (cur && cur->info.name && streq (cur->info.name, module_name))
+ break;
+ }
+
+ return handle;
+}
+
+
+int
+lt_dlhandle_map (lt_dlinterface_id iface,
+ int (*func) (lt_dlhandle handle, void *data), void *data)
+{
+ lt__interface_id *iterator = (lt__interface_id *) iface;
+ lt_dlhandle cur = handles;
+
+ assert (iface); /* iface is a required argument */
+
+ while (cur)
+ {
+ int errorcode = 0;
+
+ /* advance while the interface check fails */
+ while (cur && iterator->iface
+ && ((*iterator->iface) (cur, iterator->id_string) != 0))
+ {
+ cur = cur->next;
+ }
+
+ if ((errorcode = (*func) (cur, data)) != 0)
+ return errorcode;
+ }
+
+ return 0;
+}
diff --git a/ltdl/ltdl.h b/ltdl/ltdl.h
new file mode 100644
index 00000000..8b516ad6
--- /dev/null
+++ b/ltdl/ltdl.h
@@ -0,0 +1,162 @@
+/* ltdl.h -- generic dlopen functions
+
+ Copyright (C) 1998-2000, 2004, 2005,
+ 2007, 2008 Free Software Foundation, Inc.
+ Written by Thomas Tanner, 1998
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+/* Only include this header file once. */
+#if !defined(LTDL_H)
+#define LTDL_H 1
+
+#include <libltdl/lt_system.h>
+#include <libltdl/lt_error.h>
+#include <libltdl/lt_dlloader.h>
+
+LT_BEGIN_C_DECLS
+
+
+/* LT_STRLEN can be used safely on NULL pointers. */
+#define LT_STRLEN(s) (((s) && (s)[0]) ? strlen (s) : 0)
+
+
+/* --- DYNAMIC MODULE LOADING API --- */
+
+
+typedef struct lt__handle *lt_dlhandle; /* A loaded module. */
+
+/* Initialisation and finalisation functions for libltdl. */
+LT_SCOPE int lt_dlinit (void);
+LT_SCOPE int lt_dlexit (void);
+
+/* Module search path manipulation. */
+LT_SCOPE int lt_dladdsearchdir (const char *search_dir);
+LT_SCOPE int lt_dlinsertsearchdir (const char *before,
+ const char *search_dir);
+LT_SCOPE int lt_dlsetsearchpath (const char *search_path);
+LT_SCOPE const char *lt_dlgetsearchpath (void);
+LT_SCOPE int lt_dlforeachfile (
+ const char *search_path,
+ int (*func) (const char *filename, void *data),
+ void *data);
+
+/* User module loading advisors. */
+LT_SCOPE int lt_dladvise_init (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_destroy (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_ext (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_resident (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_local (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_global (lt_dladvise *advise);
+LT_SCOPE int lt_dladvise_preload (lt_dladvise *advise);
+
+/* Portable libltdl versions of the system dlopen() API. */
+LT_SCOPE lt_dlhandle lt_dlopen (const char *filename);
+LT_SCOPE lt_dlhandle lt_dlopenext (const char *filename);
+LT_SCOPE lt_dlhandle lt_dlopenadvise (const char *filename,
+ lt_dladvise advise);
+LT_SCOPE void * lt_dlsym (lt_dlhandle handle, const char *name);
+LT_SCOPE const char *lt_dlerror (void);
+LT_SCOPE int lt_dlclose (lt_dlhandle handle);
+
+
+
+/* --- PRELOADED MODULE SUPPORT --- */
+
+
+/* A preopened symbol. Arrays of this type comprise the exported
+ symbols for a dlpreopened module. */
+typedef struct {
+ const char *name;
+ void *address;
+} lt_dlsymlist;
+
+typedef int lt_dlpreload_callback_func (lt_dlhandle handle);
+
+LT_SCOPE int lt_dlpreload (const lt_dlsymlist *preloaded);
+LT_SCOPE int lt_dlpreload_default (const lt_dlsymlist *preloaded);
+LT_SCOPE int lt_dlpreload_open (const char *originator,
+ lt_dlpreload_callback_func *func);
+
+#define lt_preloaded_symbols lt__PROGRAM__LTX_preloaded_symbols
+#define LTDL_SET_PRELOADED_SYMBOLS() LT_STMT_START{ \
+ extern const lt_dlsymlist lt_preloaded_symbols[]; \
+ lt_dlpreload_default(lt_preloaded_symbols); \
+ }LT_STMT_END
+
+
+
+
+/* --- MODULE INFORMATION --- */
+
+
+/* Associating user data with loaded modules. */
+typedef void * lt_dlinterface_id;
+typedef int lt_dlhandle_interface (lt_dlhandle handle, const char *id_string);
+
+LT_SCOPE lt_dlinterface_id lt_dlinterface_register (const char *id_string,
+ lt_dlhandle_interface *iface);
+LT_SCOPE void lt_dlinterface_free (lt_dlinterface_id key);
+LT_SCOPE void * lt_dlcaller_set_data (lt_dlinterface_id key,
+ lt_dlhandle handle, void *data);
+LT_SCOPE void * lt_dlcaller_get_data (lt_dlinterface_id key,
+ lt_dlhandle handle);
+
+
+/* Read only information pertaining to a loaded module. */
+typedef struct {
+ char * filename; /* file name */
+ char * name; /* module name */
+ int ref_count; /* number of times lt_dlopened minus
+ number of times lt_dlclosed. */
+ unsigned int is_resident:1; /* module can't be unloaded. */
+ unsigned int is_symglobal:1; /* module symbols can satisfy
+ subsequently loaded modules. */
+ unsigned int is_symlocal:1; /* module symbols are only available
+ locally. */
+} lt_dlinfo;
+
+LT_SCOPE const lt_dlinfo *lt_dlgetinfo (lt_dlhandle handle);
+
+LT_SCOPE lt_dlhandle lt_dlhandle_iterate (lt_dlinterface_id iface,
+ lt_dlhandle place);
+LT_SCOPE lt_dlhandle lt_dlhandle_fetch (lt_dlinterface_id iface,
+ const char *module_name);
+LT_SCOPE int lt_dlhandle_map (lt_dlinterface_id iface,
+ int (*func) (lt_dlhandle handle, void *data),
+ void *data);
+
+
+
+/* Deprecated module residency management API. */
+LT_SCOPE int lt_dlmakeresident (lt_dlhandle handle);
+LT_SCOPE int lt_dlisresident (lt_dlhandle handle);
+
+#define lt_ptr void *
+
+LT_END_C_DECLS
+
+#endif /*!defined(LTDL_H)*/
diff --git a/ltdl/m4/00gnulib.m4 b/ltdl/m4/00gnulib.m4
new file mode 100755
index 00000000..301469b3
--- /dev/null
+++ b/ltdl/m4/00gnulib.m4
@@ -0,0 +1,30 @@
+# 00gnulib.m4 serial 2
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This file must be named something that sorts before all other
+dnl gnulib-provided .m4 files. It is needed until such time as we can
+dnl assume Autoconf 2.64, with its improved AC_DEFUN_ONCE semantics.
+
+# AC_DEFUN_ONCE([NAME], VALUE)
+# ----------------------------
+# Define NAME to expand to VALUE on the first use (whether by direct
+# expansion, or by AC_REQUIRE), and to nothing on all subsequent uses.
+# Avoid bugs in AC_REQUIRE in Autoconf 2.63 and earlier. This
+# definition is slower than the version in Autoconf 2.64, because it
+# can only use interfaces that existed since 2.59; but it achieves the
+# same effect. Quoting is necessary to avoid confusing Automake.
+m4_version_prereq([2.63.263], [],
+[m4_define([AC][_DEFUN_ONCE],
+ [AC][_DEFUN([$1],
+ [AC_REQUIRE([_gl_DEFUN_ONCE([$1])],
+ [m4_indir([_gl_DEFUN_ONCE([$1])])])])]dnl
+[AC][_DEFUN([_gl_DEFUN_ONCE([$1])], [$2])])])
+
+# gl_00GNULIB
+# -----------
+# Witness macro that this file has been included. Needed to force
+# Automake to include this file prior to all other gnulib .m4 files.
+AC_DEFUN([gl_00GNULIB])
diff --git a/ltdl/m4/alloca.m4 b/ltdl/m4/alloca.m4
new file mode 100755
index 00000000..f3ee3438
--- /dev/null
+++ b/ltdl/m4/alloca.m4
@@ -0,0 +1,47 @@
+# alloca.m4 serial 9
+dnl Copyright (C) 2002-2004, 2006-2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_FUNC_ALLOCA],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ if test $ac_cv_func_alloca_works = no; then
+ gl_PREREQ_ALLOCA
+ fi
+
+ # Define an additional variable used in the Makefile substitution.
+ if test $ac_cv_working_alloca_h = yes; then
+ AC_CACHE_CHECK([for alloca as a compiler built-in], [gl_cv_rpl_alloca], [
+ AC_EGREP_CPP([Need own alloca], [
+#if defined __GNUC__ || defined _AIX || defined _MSC_VER
+ Need own alloca
+#endif
+ ], [gl_cv_rpl_alloca=yes], [gl_cv_rpl_alloca=no])
+ ])
+ if test $gl_cv_rpl_alloca = yes; then
+ dnl OK, alloca can be implemented through a compiler built-in.
+ AC_DEFINE([HAVE_ALLOCA], [1],
+ [Define to 1 if you have 'alloca' after including <alloca.h>,
+ a header that may be supplied by this distribution.])
+ ALLOCA_H=alloca.h
+ else
+ dnl alloca exists as a library function, i.e. it is slow and probably
+ dnl a memory leak. Don't define HAVE_ALLOCA in this case.
+ ALLOCA_H=
+ fi
+ else
+ ALLOCA_H=alloca.h
+ fi
+ AC_SUBST([ALLOCA_H])
+])
+
+# Prerequisites of lib/alloca.c.
+# STACK_DIRECTION is already handled by AC_FUNC_ALLOCA.
+AC_DEFUN([gl_PREREQ_ALLOCA], [:])
diff --git a/ltdl/m4/argz.m4 b/ltdl/m4/argz.m4
new file mode 100644
index 00000000..37c1b11e
--- /dev/null
+++ b/ltdl/m4/argz.m4
@@ -0,0 +1,79 @@
+# Portability macros for glibc argz. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan <gary@gnu.org>
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 5 argz.m4
+
+AC_DEFUN([gl_FUNC_ARGZ],
+[gl_PREREQ_ARGZ
+
+AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_TYPES([error_t],
+ [],
+ [AC_DEFINE([error_t], [int],
+ [Define to a type to use for `error_t' if it is not otherwise available.])
+ AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
+ does not typedef error_t.])],
+ [#if defined(HAVE_ARGZ_H)
+# include <argz.h>
+#endif])
+
+ARGZ_H=
+AC_CHECK_FUNCS([argz_add argz_append argz_count argz_create_sep argz_insert \
+ argz_next argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
+
+dnl if have system argz functions, allow forced use of
+dnl libltdl-supplied implementation (and default to do so
+dnl on "known bad" systems). Could use a runtime check, but
+dnl (a) detecting malloc issues is notoriously unreliable
+dnl (b) only known system that declares argz functions,
+dnl provides them, yet they are broken, is cygwin
+dnl releases prior to 16-Mar-2007 (1.5.24 and earlier)
+dnl So, it's more straightforward simply to special case
+dnl this for known bad systems.
+AS_IF([test -z "$ARGZ_H"],
+ [AC_CACHE_CHECK(
+ [if argz actually works],
+ [lt_cv_sys_argz_works],
+ [[case $host_os in #(
+ *cygwin*)
+ lt_cv_sys_argz_works=no
+ if test "$cross_compiling" != no; then
+ lt_cv_sys_argz_works="guessing no"
+ else
+ lt_sed_extract_leading_digits='s/^\([0-9\.]*\).*/\1/'
+ save_IFS=$IFS
+ IFS=-.
+ set x `uname -r | sed -e "$lt_sed_extract_leading_digits"`
+ IFS=$save_IFS
+ lt_os_major=${2-0}
+ lt_os_minor=${3-0}
+ lt_os_micro=${4-0}
+ if test "$lt_os_major" -gt 1 \
+ || { test "$lt_os_major" -eq 1 \
+ && { test "$lt_os_minor" -gt 5 \
+ || { test "$lt_os_minor" -eq 5 \
+ && test "$lt_os_micro" -gt 24; }; }; }; then
+ lt_cv_sys_argz_works=yes
+ fi
+ fi
+ ;; #(
+ *) lt_cv_sys_argz_works=yes ;;
+ esac]])
+ AS_IF([test $lt_cv_sys_argz_works = yes],
+ [AC_DEFINE([HAVE_WORKING_ARGZ], 1,
+ [This value is set to 1 to indicate that the system argz facility works])],
+ [ARGZ_H=argz.h
+ AC_LIBOBJ([argz])])])
+
+AC_SUBST([ARGZ_H])
+])
+
+# Prerequisites of lib/argz.c.
+AC_DEFUN([gl_PREREQ_ARGZ], [:])
diff --git a/ltdl/m4/assert.m4 b/ltdl/m4/assert.m4
new file mode 100755
index 00000000..b5b90c0d
--- /dev/null
+++ b/ltdl/m4/assert.m4
@@ -0,0 +1,24 @@
+#serial 7
+
+# Copyright (C) 1998-1999, 2001, 2004, 2008-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl based on code from Eleftherios Gkioulekas
+dnl Autoconf 2.60 provides AC_HEADER_ASSERT for the same purpose, but
+dnl it has broken semantics for --enable-assert until 2.64.
+AC_DEFUN([gl_ASSERT],
+[
+ AC_MSG_CHECKING([whether to enable assertions])
+ AC_ARG_ENABLE([assert],
+ [AS_HELP_STRING([--disable-assert], [turn off assertions])],
+ [AS_IF([test "x$enableval" = xno],
+ [AC_DEFINE([NDEBUG], [1],
+ [Define to 1 if assertions should be disabled.])],
+ [test "x$enableval" != xyes],
+ [AC_MSG_WARN([invalid argument supplied to --enable-assert])
+ enable_assert=yes])],
+ [enable_assert=yes])
+ AC_MSG_RESULT([$enable_assert])
+])
diff --git a/ltdl/m4/autobuild.m4 b/ltdl/m4/autobuild.m4
new file mode 100755
index 00000000..93ccb546
--- /dev/null
+++ b/ltdl/m4/autobuild.m4
@@ -0,0 +1,40 @@
+# autobuild.m4 serial 7
+dnl Copyright (C) 2004, 2006, 2007, 2008, 2009, 2010 Free Software Foundation,
+dnl 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 Simon Josefsson
+
+# Usage: AB_INIT([MODE]).
+AC_DEFUN([AB_INIT],
+[
+ AC_REQUIRE([AC_CANONICAL_BUILD])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ if test -z "$AB_PACKAGE"; then
+ AB_PACKAGE=${PACKAGE_NAME:-$PACKAGE}
+ fi
+ AC_MSG_NOTICE([autobuild project... $AB_PACKAGE])
+
+ if test -z "$AB_VERSION"; then
+ AB_VERSION=${PACKAGE_VERSION:-$VERSION}
+ fi
+ AC_MSG_NOTICE([autobuild revision... $AB_VERSION])
+
+ hostname=`hostname`
+ if test "$hostname"; then
+ AC_MSG_NOTICE([autobuild hostname... $hostname])
+ fi
+
+ ifelse([$1],[],,[AC_MSG_NOTICE([autobuild mode... $1])])
+
+ date=`TZ=UTC0 date +%Y%m%dT%H%M%SZ`
+ if test "$?" != 0; then
+ date=`date`
+ fi
+ if test "$date"; then
+ AC_MSG_NOTICE([autobuild timestamp... $date])
+ fi
+])
diff --git a/ltdl/m4/btowc.m4 b/ltdl/m4/btowc.m4
new file mode 100755
index 00000000..2c75c8fb
--- /dev/null
+++ b/ltdl/m4/btowc.m4
@@ -0,0 +1,73 @@
+# btowc.m4 serial 5
+dnl Copyright (C) 2008-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.
+
+AC_DEFUN([gl_FUNC_BTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ dnl Check whether <wchar.h> is usable at all, first. Otherwise the test
+ dnl program below may lead to an endless loop. See
+ dnl <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>.
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+
+ AC_CHECK_FUNCS_ONCE([btowc])
+ if test $ac_cv_func_btowc = no; then
+ HAVE_BTOWC=0
+ else
+
+ dnl IRIX 6.5 btowc(EOF) is 0xFF, not WEOF.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether btowc(EOF) is correct],
+ [gl_cv_func_btowc_eof],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on IRIX.
+ irix*) gl_cv_func_btowc_eof="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_btowc_eof="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (btowc (EOF) != WEOF)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_btowc_eof=yes],
+ [gl_cv_func_btowc_eof=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_btowc_eof" in
+ *yes) ;;
+ *) REPLACE_BTOWC=1 ;;
+ esac
+ fi
+ if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([btowc])
+ gl_PREREQ_BTOWC
+ fi
+])
+
+# Prerequisites of lib/btowc.c.
+AC_DEFUN([gl_PREREQ_BTOWC], [
+ :
+])
diff --git a/ltdl/m4/canonicalize.m4 b/ltdl/m4/canonicalize.m4
new file mode 100755
index 00000000..d418de8f
--- /dev/null
+++ b/ltdl/m4/canonicalize.m4
@@ -0,0 +1,81 @@
+# canonicalize.m4 serial 16
+
+dnl Copyright (C) 2003-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Provides canonicalize_file_name and canonicalize_filename_mode, but does
+# not provide or fix realpath.
+AC_DEFUN([gl_FUNC_CANONICALIZE_FILENAME_MODE],
+[
+ AC_LIBOBJ([canonicalize])
+
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+])
+
+# Provides canonicalize_file_name and realpath.
+AC_DEFUN([gl_CANONICALIZE_LGPL],
+[
+ AC_REQUIRE([gl_CANONICALIZE_LGPL_SEPARATE])
+ if test $ac_cv_func_canonicalize_file_name = no; then
+ HAVE_CANONICALIZE_FILE_NAME=0
+ AC_LIBOBJ([canonicalize-lgpl])
+ if test $ac_cv_func_realpath = no; then
+ HAVE_REALPATH=0
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ REPLACE_REALPATH=1
+ fi
+ elif test "$gl_cv_func_realpath_works" != yes; then
+ AC_LIBOBJ([canonicalize-lgpl])
+ REPLACE_REALPATH=1
+ REPLACE_CANONICALIZE_FILE_NAME=1
+ fi
+])
+
+# Like gl_CANONICALIZE_LGPL, except prepare for separate compilation
+# (no AC_LIBOBJ).
+AC_DEFUN([gl_CANONICALIZE_LGPL_SEPARATE],
+[
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_CHECK_FUNCS_ONCE([canonicalize_file_name getcwd readlink])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+ AC_REQUIRE([gl_FUNC_REALPATH_WORKS])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
+
+# Check whether realpath works. Assume that if a platform has both
+# realpath and canonicalize_file_name, but the former is broken, then
+# so is the latter.
+AC_DEFUN([gl_FUNC_REALPATH_WORKS],
+[
+ AC_CHECK_FUNCS_ONCE([realpath])
+ AC_CACHE_CHECK([whether realpath works], [gl_cv_func_realpath_works], [
+ touch conftest.a
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ ]], [[
+ char *name1 = realpath ("conftest.a", NULL);
+ char *name2 = realpath ("conftest.b/../conftest.a", NULL);
+ char *name3 = realpath ("conftest.a/", NULL);
+ return !(name1 && *name1 == '/' && !name2 && !name3);
+ ]])
+ ], [gl_cv_func_realpath_works=yes], [gl_cv_func_realpath_works=no],
+ [gl_cv_func_realpath_works="guessing no"])
+ ])
+ if test "$gl_cv_func_realpath_works" = yes; then
+ AC_DEFINE([FUNC_REALPATH_WORKS], [1], [Define to 1 if realpath()
+ can malloc memory, always gives an absolute path, and handles
+ trailing slash correctly.])
+ fi
+])
diff --git a/ltdl/m4/cloexec.m4 b/ltdl/m4/cloexec.m4
new file mode 100755
index 00000000..c75595ca
--- /dev/null
+++ b/ltdl/m4/cloexec.m4
@@ -0,0 +1,10 @@
+#serial 6
+dnl Copyright (C) 2004-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOEXEC],
+[
+ AC_LIBOBJ([cloexec])
+])
diff --git a/ltdl/m4/close-stream.m4 b/ltdl/m4/close-stream.m4
new file mode 100755
index 00000000..40d999dc
--- /dev/null
+++ b/ltdl/m4/close-stream.m4
@@ -0,0 +1,13 @@
+#serial 3
+dnl Copyright (C) 2006-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSE_STREAM],
+[
+ AC_LIBOBJ([close-stream])
+
+ dnl Prerequisites of lib/close-stream.c.
+ :
+])
diff --git a/ltdl/m4/closein.m4 b/ltdl/m4/closein.m4
new file mode 100755
index 00000000..8bcf7c05
--- /dev/null
+++ b/ltdl/m4/closein.m4
@@ -0,0 +1,13 @@
+# closein.m4 serial 1
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_CLOSEIN],
+[
+ AC_LIBOBJ([closein])
+
+ dnl Prerequisites of lib/closein.c.
+ :
+])
diff --git a/ltdl/m4/closeout.m4 b/ltdl/m4/closeout.m4
new file mode 100755
index 00000000..946944ec
--- /dev/null
+++ b/ltdl/m4/closeout.m4
@@ -0,0 +1,14 @@
+# closeout.m4 serial 5
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_CLOSEOUT],
+[
+ AC_LIBOBJ([closeout])
+
+ dnl Prerequisites of lib/closeout.c.
+ :
+])
diff --git a/ltdl/m4/codeset.m4 b/ltdl/m4/codeset.m4
new file mode 100755
index 00000000..a53c0426
--- /dev/null
+++ b/ltdl/m4/codeset.m4
@@ -0,0 +1,21 @@
+# codeset.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2006, 2008-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 Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], [am_cv_langinfo_codeset],
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
+ [am_cv_langinfo_codeset=yes],
+ [am_cv_langinfo_codeset=no])
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE([HAVE_LANGINFO_CODESET], [1],
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/ltdl/m4/codeset.m4~ b/ltdl/m4/codeset.m4~
new file mode 100644
index 00000000..223955b4
--- /dev/null
+++ b/ltdl/m4/codeset.m4~
@@ -0,0 +1,21 @@
+# codeset.m4 serial 2 (gettext-0.16)
+dnl Copyright (C) 2000-2002, 2006 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 Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+ [AC_TRY_LINK([#include <langinfo.h>],
+ [char* cs = nl_langinfo(CODESET); return !cs;],
+ am_cv_langinfo_codeset=yes,
+ am_cv_langinfo_codeset=no)
+ ])
+ if test $am_cv_langinfo_codeset = yes; then
+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
+ fi
+])
diff --git a/ltdl/m4/config-h.m4 b/ltdl/m4/config-h.m4
new file mode 100755
index 00000000..319127d2
--- /dev/null
+++ b/ltdl/m4/config-h.m4
@@ -0,0 +1,13 @@
+# Say that -DHAVE_CONFIG_H is not needed.
+
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# This package's source files all include config.h unconditionally,
+# so there's no need to pass -DHAVE_CONFIG_H to the compiler.
+AC_DEFUN([gl_CONFIG_H],
+ [AC_CONFIG_COMMANDS_PRE([test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS=])])
diff --git a/ltdl/m4/dirname.m4 b/ltdl/m4/dirname.m4
new file mode 100755
index 00000000..576b5bea
--- /dev/null
+++ b/ltdl/m4/dirname.m4
@@ -0,0 +1,26 @@
+#serial 8 -*- autoconf -*-
+dnl Copyright (C) 2002-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_DIRNAME],
+[
+ AC_REQUIRE([gl_DIRNAME_LGPL])
+ AC_LIBOBJ([basename])
+ AC_LIBOBJ([dirname])
+])
+
+AC_DEFUN([gl_DIRNAME_LGPL],
+[
+ AC_LIBOBJ([basename-lgpl])
+ AC_LIBOBJ([dirname-lgpl])
+ AC_LIBOBJ([stripslash])
+
+ dnl Prerequisites of lib/dirname.h.
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_DOUBLE_SLASH_ROOT])
+
+ dnl No prerequisites of lib/basename-lgpl.c, lib/dirname-lgpl.c,
+ dnl lib/stripslash.c.
+])
diff --git a/ltdl/m4/dos.m4 b/ltdl/m4/dos.m4
new file mode 100755
index 00000000..5660542b
--- /dev/null
+++ b/ltdl/m4/dos.m4
@@ -0,0 +1,71 @@
+#serial 11 -*- autoconf -*-
+
+# Define some macros required for proper operation of code in lib/*.c
+# on MSDOS/Windows systems.
+
+# Copyright (C) 2000-2001, 2004-2006, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# From Jim Meyering.
+
+AC_DEFUN([gl_AC_DOS],
+ [
+ AC_CACHE_CHECK([whether system is Windows or MSDOS], [ac_cv_win_or_dos],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#if !defined _WIN32 && !defined __WIN32__ && !defined __MSDOS__ && !defined __CYGWIN__
+neither MSDOS nor Windows
+#endif]])],
+ [ac_cv_win_or_dos=yes],
+ [ac_cv_win_or_dos=no])
+ ])
+
+ if test x"$ac_cv_win_or_dos" = xyes; then
+ ac_fs_accepts_drive_letter_prefix=1
+ ac_fs_backslash_is_file_name_separator=1
+ AC_CACHE_CHECK([whether drive letter can start relative path],
+ [ac_cv_drive_letter_can_be_relative],
+ [
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
+#if defined __CYGWIN__
+drive letters are always absolute
+#endif]])],
+ [ac_cv_drive_letter_can_be_relative=yes],
+ [ac_cv_drive_letter_can_be_relative=no])
+ ])
+ if test x"$ac_cv_drive_letter_can_be_relative" = xyes; then
+ ac_fs_drive_letter_can_be_relative=1
+ else
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+ else
+ ac_fs_accepts_drive_letter_prefix=0
+ ac_fs_backslash_is_file_name_separator=0
+ ac_fs_drive_letter_can_be_relative=0
+ fi
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX],
+ $ac_fs_accepts_drive_letter_prefix,
+ [Define on systems for which file names may have a so-called
+ `drive letter' prefix, define this to compute the length of that
+ prefix, including the colon.])
+
+ AH_VERBATIM(ISSLASH,
+ [#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
+#else
+# define ISSLASH(C) ((C) == '/')
+#endif])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR],
+ $ac_fs_backslash_is_file_name_separator,
+ [Define if the backslash character may also serve as a file name
+ component separator.])
+
+ AC_DEFINE_UNQUOTED([FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE],
+ $ac_fs_drive_letter_can_be_relative,
+ [Define if a drive letter prefix denotes a relative path if it is
+ not followed by a file name component separator.])
+ ])
diff --git a/ltdl/m4/double-slash-root.m4 b/ltdl/m4/double-slash-root.m4
new file mode 100755
index 00000000..66a79c0f
--- /dev/null
+++ b/ltdl/m4/double-slash-root.m4
@@ -0,0 +1,38 @@
+# double-slash-root.m4 serial 4 -*- Autoconf -*-
+dnl Copyright (C) 2006, 2008-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.
+
+AC_DEFUN([gl_DOUBLE_SLASH_ROOT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CACHE_CHECK([whether // is distinct from /], [gl_cv_double_slash_root],
+ [ if test x"$cross_compiling" = xyes ; then
+ # When cross-compiling, there is no way to tell whether // is special
+ # short of a list of hosts. However, the only known hosts to date
+ # that have a distinct // are Apollo DomainOS (too old to port to),
+ # Cygwin, and z/OS. If anyone knows of another system for which // has
+ # special semantics and is distinct from /, please report it to
+ # <bug-gnulib@gnu.org>.
+ case $host in
+ *-cygwin | i370-ibm-openedition)
+ gl_cv_double_slash_root=yes ;;
+ *)
+ # Be optimistic and assume that / and // are the same when we
+ # don't know.
+ gl_cv_double_slash_root='unknown, assuming no' ;;
+ esac
+ else
+ set x `ls -di / // 2>/dev/null`
+ if test "$[2]" = "$[4]" && wc //dev/null >/dev/null 2>&1; then
+ gl_cv_double_slash_root=no
+ else
+ gl_cv_double_slash_root=yes
+ fi
+ fi])
+ if test "$gl_cv_double_slash_root" = yes; then
+ AC_DEFINE([DOUBLE_SLASH_IS_DISTINCT_ROOT], [1],
+ [Define to 1 if // is a file system root distinct from /.])
+ fi
+])
diff --git a/ltdl/m4/dup2.m4 b/ltdl/m4/dup2.m4
new file mode 100755
index 00000000..998d66f8
--- /dev/null
+++ b/ltdl/m4/dup2.m4
@@ -0,0 +1,58 @@
+#serial 10
+dnl Copyright (C) 2002, 2005, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_DUP2],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([dup2])
+ if test $ac_cv_func_dup2 = no; then
+ HAVE_DUP2=0
+ AC_LIBOBJ([dup2])
+ else
+ AC_CACHE_CHECK([whether dup2 works], [gl_cv_func_dup2_works],
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <unistd.h>
+#include <errno.h>]],
+ [if (dup2 (1, 1) == 0)
+ return 1;
+ close (0);
+ if (dup2 (0, 0) != -1)
+ return 2;
+ /* Many gnulib modules require POSIX conformance of EBADF. */
+ if (dup2 (1, 1000000) == -1 && errno != EBADF)
+ return 3;
+ return 0;
+ ])
+ ],
+ [gl_cv_func_dup2_works=yes], [gl_cv_func_dup2_works=no],
+ [case "$host_os" in
+ mingw*) # on this platform, dup2 always returns 0 for success
+ gl_cv_func_dup2_works=no;;
+ cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
+ gl_cv_func_dup2_works=no;;
+ linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
+ # closed fd may yield -EBADF instead of -1 / errno=EBADF.
+ gl_cv_func_dup2_works=no;;
+ freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
+ gl_cv_func_dup2_works=no;;
+ *) gl_cv_func_dup2_works=yes;;
+ esac])
+ ])
+ if test "$gl_cv_func_dup2_works" = no; then
+ gl_REPLACE_DUP2
+ fi
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_DUP2],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ if test $ac_cv_func_dup2 = yes; then
+ REPLACE_DUP2=1
+ fi
+ AC_LIBOBJ([dup2])
+])
diff --git a/ltdl/m4/eealloc.m4 b/ltdl/m4/eealloc.m4
new file mode 100755
index 00000000..63dd9202
--- /dev/null
+++ b/ltdl/m4/eealloc.m4
@@ -0,0 +1,32 @@
+# eealloc.m4 serial 2
+dnl Copyright (C) 2003, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EEALLOC],
+[
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([gl_EEREALLOC])
+ AC_REQUIRE([AC_C_INLINE])
+])
+
+AC_DEFUN([gl_EEMALLOC],
+[
+ _AC_FUNC_MALLOC_IF(
+ [gl_cv_func_malloc_0_nonnull=1],
+ [gl_cv_func_malloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([MALLOC_0_IS_NONNULL], [$gl_cv_func_malloc_0_nonnull],
+ [If malloc(0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
+
+AC_DEFUN([gl_EEREALLOC],
+[
+ _AC_FUNC_REALLOC_IF(
+ [gl_cv_func_realloc_0_nonnull=1],
+ [gl_cv_func_realloc_0_nonnull=0])
+ AC_DEFINE_UNQUOTED([REALLOC_0_IS_NONNULL], [$gl_cv_func_realloc_0_nonnull],
+ [If realloc(NULL,0) is != NULL, define this to 1. Otherwise define this
+ to 0.])
+])
diff --git a/ltdl/m4/environ.m4 b/ltdl/m4/environ.m4
new file mode 100755
index 00000000..5f50d6e3
--- /dev/null
+++ b/ltdl/m4/environ.m4
@@ -0,0 +1,36 @@
+# environ.m4 serial 3
+dnl Copyright (C) 2001-2004, 2006-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.
+
+AC_DEFUN_ONCE([gl_ENVIRON],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl Persuade glibc <unistd.h> to declare environ.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ gt_CHECK_VAR_DECL([#include <unistd.h>], environ)
+ if test $gt_cv_var_environ_declaration != yes; then
+ HAVE_DECL_ENVIRON=0
+ fi
+])
+
+# Check if a variable is properly declared.
+# gt_CHECK_VAR_DECL(includes,variable)
+AC_DEFUN([gt_CHECK_VAR_DECL],
+[
+ define([gt_cv_var], [gt_cv_var_]$2[_declaration])
+ AC_MSG_CHECKING([if $2 is properly declared])
+ AC_CACHE_VAL([gt_cv_var], [
+ AC_TRY_COMPILE([$1
+ extern struct { int foo; } $2;],
+ [$2.foo = 1;],
+ gt_cv_var=no,
+ gt_cv_var=yes)])
+ AC_MSG_RESULT([$gt_cv_var])
+ if test $gt_cv_var = yes; then
+ AC_DEFINE([HAVE_]translit($2, [a-z], [A-Z])[_DECL], 1,
+ [Define if you have the declaration of $2.])
+ fi
+ undefine([gt_cv_var])
+])
diff --git a/ltdl/m4/errno_h.m4 b/ltdl/m4/errno_h.m4
new file mode 100755
index 00000000..d02a0393
--- /dev/null
+++ b/ltdl/m4/errno_h.m4
@@ -0,0 +1,115 @@
+# errno_h.m4 serial 6
+dnl Copyright (C) 2004, 2006, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_HEADER_ERRNO_H],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([for complete errno.h], [gl_cv_header_errno_h_complete], [
+ AC_EGREP_CPP([booboo],[
+#include <errno.h>
+#if !defined ENOMSG
+booboo
+#endif
+#if !defined EIDRM
+booboo
+#endif
+#if !defined ENOLINK
+booboo
+#endif
+#if !defined EPROTO
+booboo
+#endif
+#if !defined EMULTIHOP
+booboo
+#endif
+#if !defined EBADMSG
+booboo
+#endif
+#if !defined EOVERFLOW
+booboo
+#endif
+#if !defined ENOTSUP
+booboo
+#endif
+#if !defined ESTALE
+booboo
+#endif
+#if !defined ECANCELED
+booboo
+#endif
+ ],
+ [gl_cv_header_errno_h_complete=no],
+ [gl_cv_header_errno_h_complete=yes])
+ ])
+ if test $gl_cv_header_errno_h_complete = yes; then
+ ERRNO_H=''
+ else
+ gl_CHECK_NEXT_HEADERS([errno.h])
+ ERRNO_H='errno.h'
+ fi
+ AC_SUBST([ERRNO_H])
+ gl_REPLACE_ERRNO_VALUE([EMULTIHOP])
+ gl_REPLACE_ERRNO_VALUE([ENOLINK])
+ gl_REPLACE_ERRNO_VALUE([EOVERFLOW])
+])
+
+# Assuming $1 = EOVERFLOW.
+# The EOVERFLOW errno value ought to be defined in <errno.h>, according to
+# POSIX. But some systems (like OpenBSD 4.0 or AIX 3) don't define it, and
+# some systems (like OSF/1) define it when _XOPEN_SOURCE_EXTENDED is defined.
+# Check for the value of EOVERFLOW.
+# Set the variables EOVERFLOW_HIDDEN and EOVERFLOW_VALUE.
+AC_DEFUN([gl_REPLACE_ERRNO_VALUE],
+[
+ if test -n "$ERRNO_H"; then
+ AC_CACHE_CHECK([for ]$1[ value], [gl_cv_header_errno_h_]$1, [
+ AC_EGREP_CPP([yes],[
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ],
+ [gl_cv_header_errno_h_]$1[=yes],
+ [gl_cv_header_errno_h_]$1[=no])
+ if test $gl_cv_header_errno_h_]$1[ = no; then
+ AC_EGREP_CPP([yes],[
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+#ifdef ]$1[
+yes
+#endif
+ ], [gl_cv_header_errno_h_]$1[=hidden])
+ if test $gl_cv_header_errno_h_]$1[ = hidden; then
+ dnl The macro exists but is hidden.
+ dnl Define it to the same value.
+ AC_COMPUTE_INT([gl_cv_header_errno_h_]$1, $1, [
+#define _XOPEN_SOURCE_EXTENDED 1
+#include <errno.h>
+/* The following two lines are a workaround against an autoconf-2.52 bug. */
+#include <stdio.h>
+#include <stdlib.h>
+])
+ fi
+ fi
+ ])
+ case $gl_cv_header_errno_h_]$1[ in
+ yes | no)
+ ]$1[_HIDDEN=0; ]$1[_VALUE=
+ ;;
+ *)
+ ]$1[_HIDDEN=1; ]$1[_VALUE="$gl_cv_header_errno_h_]$1["
+ ;;
+ esac
+ AC_SUBST($1[_HIDDEN])
+ AC_SUBST($1[_VALUE])
+ fi
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/ltdl/m4/error.m4 b/ltdl/m4/error.m4
new file mode 100755
index 00000000..9f1307a4
--- /dev/null
+++ b/ltdl/m4/error.m4
@@ -0,0 +1,22 @@
+#serial 12
+
+# Copyright (C) 1996-1998, 2001-2004, 2009-2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_ERROR],
+[
+ AC_FUNC_ERROR_AT_LINE
+ dnl Note: AC_FUNC_ERROR_AT_LINE does AC_LIBSOURCES([error.h, error.c]).
+ gl_PREREQ_ERROR
+])
+
+# Prerequisites of lib/error.c.
+AC_DEFUN([gl_PREREQ_ERROR],
+[
+ AC_REQUIRE([AC_FUNC_STRERROR_R])
+ AC_REQUIRE([AC_C_INLINE])
+ :
+])
diff --git a/ltdl/m4/execute.m4 b/ltdl/m4/execute.m4
new file mode 100755
index 00000000..42641d13
--- /dev/null
+++ b/ltdl/m4/execute.m4
@@ -0,0 +1,12 @@
+# execute.m4 serial 4
+dnl Copyright (C) 2003, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_EXECUTE],
+[
+ dnl Prerequisites of lib/execute.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+])
diff --git a/ltdl/m4/exitfail.m4 b/ltdl/m4/exitfail.m4
new file mode 100755
index 00000000..56e2ce0d
--- /dev/null
+++ b/ltdl/m4/exitfail.m4
@@ -0,0 +1,14 @@
+# exitfail.m4 serial 6
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_EXITFAIL],
+[
+ AC_LIBOBJ([exitfail])
+
+ dnl No prerequisites of lib/exitfail.c.
+ :
+])
diff --git a/ltdl/m4/exponentd.m4 b/ltdl/m4/exponentd.m4
new file mode 100755
index 00000000..5d44d0e0
--- /dev/null
+++ b/ltdl/m4/exponentd.m4
@@ -0,0 +1,114 @@
+# exponentd.m4 serial 1
+dnl Copyright (C) 2007-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.
+AC_DEFUN([gl_DOUBLE_EXPONENT_LOCATION],
+[
+ AC_CACHE_CHECK([where to find the exponent in a 'double'],
+ [gl_cv_cc_double_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (double x)
+{
+ memory_double m;
+ size_t i;
+ /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
+ memset (&m, 0, sizeof (memory_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25);
+ add_to_ored_words (0.5);
+ add_to_ored_words (1.0);
+ add_to_ored_words (2.0);
+ add_to_ored_words (4.0);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_double_expbit0=`cat conftest.out`],
+ [gl_cv_cc_double_expbit0="unknown"],
+ [
+ dnl On ARM, there are two 'double' floating-point formats, used by
+ dnl different sets of instructions: The older FPA instructions assume
+ dnl that they are stored in big-endian word order, while the words
+ dnl (like integer types) are stored in little-endian byte order.
+ dnl The newer VFP instructions assume little-endian order consistenly.
+ AC_EGREP_CPP([mixed_endianness], [
+#if defined arm || defined __arm || defined __arm__
+ mixed_endianness
+#endif
+ ],
+ [gl_cv_cc_double_expbit0="unknown"],
+ [
+ pushdef([AC_MSG_CHECKING],[:])dnl
+ pushdef([AC_MSG_RESULT],[:])dnl
+ pushdef([AC_MSG_RESULT_UNQUOTED],[:])dnl
+ AC_C_BIGENDIAN(
+ [gl_cv_cc_double_expbit0="word 0 bit 20"],
+ [gl_cv_cc_double_expbit0="word 1 bit 20"],
+ [gl_cv_cc_double_expbit0="unknown"])
+ popdef([AC_MSG_RESULT_UNQUOTED])dnl
+ popdef([AC_MSG_RESULT])dnl
+ popdef([AC_MSG_CHECKING])dnl
+ ])
+ ])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([DBL_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'double'.])
+ AC_DEFINE_UNQUOTED([DBL_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'double'.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/exponentf.m4 b/ltdl/m4/exponentf.m4
new file mode 100755
index 00000000..4d8063fa
--- /dev/null
+++ b/ltdl/m4/exponentf.m4
@@ -0,0 +1,91 @@
+# exponentf.m4 serial 1
+dnl Copyright (C) 2007-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.
+AC_DEFUN([gl_FLOAT_EXPONENT_LOCATION],
+[
+ AC_CACHE_CHECK([where to find the exponent in a 'float'],
+ [gl_cv_cc_float_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (float x)
+{
+ memory_float m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (float) < sizeof (memory_float). */
+ memset (&m, 0, sizeof (memory_float));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25f);
+ add_to_ored_words (0.5f);
+ add_to_ored_words (1.0f);
+ add_to_ored_words (2.0f);
+ add_to_ored_words (4.0f);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_float_expbit0=`cat conftest.out`],
+ [gl_cv_cc_float_expbit0="unknown"],
+ [gl_cv_cc_float_expbit0="word 0 bit 23"])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_float_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([FLT_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'float'.])
+ AC_DEFINE_UNQUOTED([FLT_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'float'.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/exponentl.m4 b/ltdl/m4/exponentl.m4
new file mode 100755
index 00000000..a700d3ba
--- /dev/null
+++ b/ltdl/m4/exponentl.m4
@@ -0,0 +1,97 @@
+# exponentl.m4 serial 2
+dnl Copyright (C) 2007-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.
+AC_DEFUN([gl_LONG_DOUBLE_EXPONENT_LOCATION],
+[
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_CACHE_CHECK([where to find the exponent in a 'long double'],
+ [gl_cv_cc_long_double_expbit0],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { long double value; unsigned int word[NWORDS]; }
+ memory_long_double;
+static unsigned int ored_words[NWORDS];
+static unsigned int anded_words[NWORDS];
+static void add_to_ored_words (long double x)
+{
+ memory_long_double m;
+ size_t i;
+ /* Clear it first, in case
+ sizeof (long double) < sizeof (memory_long_double). */
+ memset (&m, 0, sizeof (memory_long_double));
+ m.value = x;
+ for (i = 0; i < NWORDS; i++)
+ {
+ ored_words[i] |= m.word[i];
+ anded_words[i] &= m.word[i];
+ }
+}
+int main ()
+{
+ size_t j;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ for (j = 0; j < NWORDS; j++)
+ anded_words[j] = ~ (unsigned int) 0;
+ add_to_ored_words (0.25L);
+ add_to_ored_words (0.5L);
+ add_to_ored_words (1.0L);
+ add_to_ored_words (2.0L);
+ add_to_ored_words (4.0L);
+ /* Remove bits that are common (e.g. if representation of the first mantissa
+ bit is explicit). */
+ for (j = 0; j < NWORDS; j++)
+ ored_words[j] &= ~anded_words[j];
+ /* Now find the nonzero word. */
+ for (j = 0; j < NWORDS; j++)
+ if (ored_words[j] != 0)
+ break;
+ if (j < NWORDS)
+ {
+ size_t i;
+ for (i = j + 1; i < NWORDS; i++)
+ if (ored_words[i] != 0)
+ {
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+ }
+ for (i = 0; ; i++)
+ if ((ored_words[j] >> i) & 1)
+ {
+ fprintf (fp, "word %d bit %d", (int) j, (int) i);
+ return (fclose (fp) != 0);
+ }
+ }
+ fprintf (fp, "unknown");
+ return (fclose (fp) != 0);
+}
+ ],
+ [gl_cv_cc_long_double_expbit0=`cat conftest.out`],
+ [gl_cv_cc_long_double_expbit0="unknown"],
+ [
+ dnl When cross-compiling, we don't know. It depends on the
+ dnl ABI and compiler version. There are too many cases.
+ gl_cv_cc_long_double_expbit0="unknown"
+ ])
+ rm -f conftest.out
+ ])
+ case "$gl_cv_cc_long_double_expbit0" in
+ word*bit*)
+ word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_WORD], [$word],
+ [Define as the word index where to find the exponent of 'long double'.])
+ AC_DEFINE_UNQUOTED([LDBL_EXPBIT0_BIT], [$bit],
+ [Define as the bit index in the word where to find bit 0 of the exponent of 'long double'.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/extensions.m4 b/ltdl/m4/extensions.m4
new file mode 100755
index 00000000..7d9458a8
--- /dev/null
+++ b/ltdl/m4/extensions.m4
@@ -0,0 +1,118 @@
+# serial 9 -*- Autoconf -*-
+# Enable extensions on systems that normally disable them.
+
+# Copyright (C) 2003, 2006-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This definition of AC_USE_SYSTEM_EXTENSIONS is stolen from CVS
+# Autoconf. Perhaps we can remove this once we can assume Autoconf
+# 2.62 or later everywhere, but since CVS Autoconf mutates rapidly
+# enough in this area it's likely we'll need to redefine
+# AC_USE_SYSTEM_EXTENSIONS for quite some time.
+
+# If autoconf reports a warning
+# warning: AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# or warning: AC_RUN_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS
+# the fix is
+# 1) to ensure that AC_USE_SYSTEM_EXTENSIONS is never directly invoked
+# but always AC_REQUIREd,
+# 2) to ensure that for each occurrence of
+# AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+# or
+# AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+# the corresponding gnulib module description has 'extensions' among
+# its dependencies. This will ensure that the gl_USE_SYSTEM_EXTENSIONS
+# invocation occurs in gl_EARLY, not in gl_INIT.
+
+# AC_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+# Remember that #undef in AH_VERBATIM gets replaced with #define by
+# AC_DEFINE. The goal here is to define all known feature-enabling
+# macros, then, if reports of conflicts are made, disable macros that
+# cause problems on some platforms (such as __EXTENSIONS__).
+AC_DEFUN_ONCE([AC_USE_SYSTEM_EXTENSIONS],
+[AC_BEFORE([$0], [AC_COMPILE_IFELSE])dnl
+AC_BEFORE([$0], [AC_RUN_IFELSE])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+
+ AC_CHECK_HEADER([minix/config.h], [MINIX=yes], [MINIX=])
+ if test "$MINIX" = yes; then
+ AC_DEFINE([_POSIX_SOURCE], [1],
+ [Define to 1 if you need to in order for `stat' and other
+ things to work.])
+ AC_DEFINE([_POSIX_1_SOURCE], [2],
+ [Define to 2 if the system does not provide POSIX.1 features
+ except with this defined.])
+ AC_DEFINE([_MINIX], [1],
+ [Define to 1 if on MINIX.])
+ fi
+
+ dnl HP-UX 11.11 defines mbstate_t only if _XOPEN_SOURCE is defined to 500,
+ dnl regardless of whether the flags -Ae or _D_HPUX_SOURCE=1 are already
+ dnl provided.
+ case "$host_os" in
+ hpux*)
+ AC_DEFINE([_XOPEN_SOURCE], [500],
+ [Define to 500 only on HP-UX.])
+ ;;
+ esac
+
+ AH_VERBATIM([__EXTENSIONS__],
+[/* Enable extensions on AIX 3, Interix. */
+#ifndef _ALL_SOURCE
+# undef _ALL_SOURCE
+#endif
+/* Enable GNU extensions on systems that have them. */
+#ifndef _GNU_SOURCE
+# undef _GNU_SOURCE
+#endif
+/* Enable threading extensions on Solaris. */
+#ifndef _POSIX_PTHREAD_SEMANTICS
+# undef _POSIX_PTHREAD_SEMANTICS
+#endif
+/* Enable extensions on HP NonStop. */
+#ifndef _TANDEM_SOURCE
+# undef _TANDEM_SOURCE
+#endif
+/* Enable general extensions on Solaris. */
+#ifndef __EXTENSIONS__
+# undef __EXTENSIONS__
+#endif
+])
+ AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
+ [ac_cv_safe_to_define___extensions__],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+# define __EXTENSIONS__ 1
+ ]AC_INCLUDES_DEFAULT])],
+ [ac_cv_safe_to_define___extensions__=yes],
+ [ac_cv_safe_to_define___extensions__=no])])
+ test $ac_cv_safe_to_define___extensions__ = yes &&
+ AC_DEFINE([__EXTENSIONS__])
+ AC_DEFINE([_ALL_SOURCE])
+ AC_DEFINE([_GNU_SOURCE])
+ AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
+ AC_DEFINE([_TANDEM_SOURCE])
+])# AC_USE_SYSTEM_EXTENSIONS
+
+# gl_USE_SYSTEM_EXTENSIONS
+# ------------------------
+# Enable extensions on systems that normally disable them,
+# typically due to standards-conformance issues.
+AC_DEFUN_ONCE([gl_USE_SYSTEM_EXTENSIONS],
+[
+ dnl Require this macro before AC_USE_SYSTEM_EXTENSIONS.
+ dnl gnulib does not need it. But if it gets required by third-party macros
+ dnl after AC_USE_SYSTEM_EXTENSIONS is required, autoconf 2.62..2.63 emit a
+ dnl warning: "AC_COMPILE_IFELSE was called before AC_USE_SYSTEM_EXTENSIONS".
+ dnl Note: We can do this only for one of the macros AC_AIX, AC_GNU_SOURCE,
+ dnl AC_MINIX. If people still use AC_AIX or AC_MINIX, they are out of luck.
+ AC_REQUIRE([AC_GNU_SOURCE])
+
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
diff --git a/ltdl/m4/fatal-signal.m4 b/ltdl/m4/fatal-signal.m4
new file mode 100755
index 00000000..138e2a3a
--- /dev/null
+++ b/ltdl/m4/fatal-signal.m4
@@ -0,0 +1,13 @@
+# fatal-signal.m4 serial 8
+dnl Copyright (C) 2003-2004, 2006, 2008-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.
+
+AC_DEFUN([gl_FATAL_SIGNAL],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ gl_PREREQ_SIG_HANDLER_H
+])
diff --git a/ltdl/m4/fcntl-o.m4 b/ltdl/m4/fcntl-o.m4
new file mode 100755
index 00000000..67167cbd
--- /dev/null
+++ b/ltdl/m4/fcntl-o.m4
@@ -0,0 +1,81 @@
+# fcntl-o.m4 serial 1
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+# Test whether the flags O_NOATIME and O_NOFOLLOW actually work.
+# Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise.
+# Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise.
+AC_DEFUN([gl_FCNTL_O_FLAGS],
+[
+ dnl Persuade glibc <fcntl.h> to define O_NOATIME and O_NOFOLLOW.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_CACHE_CHECK([for working fcntl.h], [gl_cv_header_working_fcntl_h],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/types.h>
+ #include <sys/stat.h>
+ #include <unistd.h>
+ #include <fcntl.h>
+ #ifndef O_NOATIME
+ #define O_NOATIME 0
+ #endif
+ #ifndef O_NOFOLLOW
+ #define O_NOFOLLOW 0
+ #endif
+ static int const constants[] =
+ {
+ O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
+ O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
+ };
+ ]],
+ [[
+ int status = !constants;
+ {
+ static char const sym[] = "conftest.sym";
+ if (symlink (".", sym) != 0
+ || close (open (sym, O_RDONLY | O_NOFOLLOW)) == 0)
+ status |= 32;
+ unlink (sym);
+ }
+ {
+ static char const file[] = "confdefs.h";
+ int fd = open (file, O_RDONLY | O_NOATIME);
+ char c;
+ struct stat st0, st1;
+ if (fd < 0
+ || fstat (fd, &st0) != 0
+ || sleep (1) != 0
+ || read (fd, &c, 1) != 1
+ || close (fd) != 0
+ || stat (file, &st1) != 0
+ || st0.st_atime != st1.st_atime)
+ status |= 64;
+ }
+ return status;]])],
+ [gl_cv_header_working_fcntl_h=yes],
+ [case $? in #(
+ 32) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
+ 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
+ 96) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
+ *) gl_cv_header_working_fcntl_h='no';;
+ esac],
+ [gl_cv_header_working_fcntl_h=cross-compiling])])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOATIME], [$ac_val],
+ [Define to 1 if O_NOATIME works.])
+
+ case $gl_cv_header_working_fcntl_h in #(
+ *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
+ *) ac_val=1;;
+ esac
+ AC_DEFINE_UNQUOTED([HAVE_WORKING_O_NOFOLLOW], [$ac_val],
+ [Define to 1 if O_NOFOLLOW works.])
+])
diff --git a/ltdl/m4/fcntl.m4 b/ltdl/m4/fcntl.m4
new file mode 100755
index 00000000..fcb5f447
--- /dev/null
+++ b/ltdl/m4/fcntl.m4
@@ -0,0 +1,83 @@
+# fcntl.m4 serial 3
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For now, this module ensures that fcntl()
+# - supports F_DUPFD correctly
+# - supports or emulates F_DUPFD_CLOEXEC
+# - supports F_GETFD
+# Still to be ported to mingw:
+# - F_SETFD
+# - F_GETFL, F_SETFL
+# - F_GETOWN, F_SETOWN
+# - F_GETLK, F_SETLK, F_SETLKW
+AC_DEFUN([gl_FUNC_FCNTL],
+[
+ dnl Persuade glibc to expose F_DUPFD_CLOEXEC.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ gl_REPLACE_FCNTL
+ else
+ dnl cygwin 1.5.x F_DUPFD has wrong errno, and allows negative target
+ AC_CACHE_CHECK([whether fcntl handles F_DUPFD correctly],
+ [gl_cv_func_fcntl_f_dupfd_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+]], [[return fcntl (0, F_DUPFD, -1) != -1;
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_works=yes],
+ [gl_cv_func_fcntl_f_dupfd_works=no],
+ [# Guess that it works on glibc systems
+ case $host_os in #((
+ *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
+ *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
+ esac])])
+ case $gl_cv_func_fcntl_f_dupfd_works in
+ *yes) ;;
+ *) gl_REPLACE_FCNTL
+ AC_DEFINE([FCNTL_DUPFD_BUGGY], [1], [Define this to 1 if F_DUPFD
+ behavior does not match POSIX]) ;;
+ esac
+
+ dnl Many systems lack F_DUPFD_CLOEXEC
+ AC_CACHE_CHECK([whether fcntl understands F_DUPFD_CLOEXEC],
+ [gl_cv_func_fcntl_f_dupfd_cloexec],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#include <fcntl.h>
+#ifndef F_DUPFD_CLOEXEC
+choke me
+#endif
+ ]])],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
+#ifdef __linux__
+/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
+ it to support the semantics on older kernels that failed with EINVAL. */
+choke me
+#endif
+ ]])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=yes],
+ [gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"])],
+ [gl_cv_func_fcntl_f_dupfd_cloexec=no])])
+ if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
+ gl_REPLACE_FCNTL
+ dnl No witness macro needed for this bug.
+ fi
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_FCNTL],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fcntl])
+ if test $ac_cv_func_fcntl = no; then
+ HAVE_FCNTL=0
+ else
+ REPLACE_FCNTL=1
+ fi
+ AC_LIBOBJ([fcntl])
+])
diff --git a/ltdl/m4/fcntl_h.m4 b/ltdl/m4/fcntl_h.m4
new file mode 100755
index 00000000..ecd8fa33
--- /dev/null
+++ b/ltdl/m4/fcntl_h.m4
@@ -0,0 +1,41 @@
+# serial 10
+# Configure fcntl.h.
+dnl Copyright (C) 2006, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Paul Eggert.
+
+AC_DEFUN([gl_FCNTL_H],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])
+ gl_CHECK_NEXT_HEADERS([fcntl.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, if it is not common
+ dnl enough to be declared everywhere.
+ gl_WARN_ON_USE_PREPARE([[#include <fcntl.h>
+ ]], [fcntl openat])
+])
+
+AC_DEFUN([gl_FCNTL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_FCNTL_H_DEFAULTS],
+[
+ GNULIB_FCNTL=0; AC_SUBST([GNULIB_FCNTL])
+ GNULIB_OPEN=0; AC_SUBST([GNULIB_OPEN])
+ GNULIB_OPENAT=0; AC_SUBST([GNULIB_OPENAT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FCNTL=1; AC_SUBST([HAVE_FCNTL])
+ HAVE_OPENAT=1; AC_SUBST([HAVE_OPENAT])
+ REPLACE_FCNTL=0; AC_SUBST([REPLACE_FCNTL])
+ REPLACE_OPEN=0; AC_SUBST([REPLACE_OPEN])
+ REPLACE_OPENAT=0; AC_SUBST([REPLACE_OPENAT])
+])
diff --git a/ltdl/m4/fflush.m4 b/ltdl/m4/fflush.m4
new file mode 100755
index 00000000..56c0aedc
--- /dev/null
+++ b/ltdl/m4/fflush.m4
@@ -0,0 +1,82 @@
+# fflush.m4 serial 7
+
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake
+
+dnl Find out how to obey POSIX semantics of fflush(stdin) discarding
+dnl unread input on seekable streams, rather than C99 undefined semantics.
+
+AC_DEFUN([gl_FUNC_FFLUSH],
+[
+ AC_CACHE_CHECK([whether fflush works on input streams],
+ [gl_cv_func_fflush_stdin],
+ [echo hello world > conftest.txt
+ AC_RUN_IFELSE([AC_LANG_PROGRAM(
+ [[
+#include <stdio.h>
+#include <unistd.h>
+ ]], [[FILE *f = fopen ("conftest.txt", "r");
+ char buffer[10];
+ int fd;
+ int c;
+ if (f == NULL)
+ return 1;
+ fd = fileno (f);
+ if (fd < 0 || fread (buffer, 1, 5, f) != 5)
+ return 2;
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ return 3;
+ /* POSIX requires fflush-fseek to set file offset of fd. This fails
+ on BSD systems and on mingw. */
+ if (fflush (f) != 0 || fseek (f, 0, SEEK_CUR) != 0)
+ return 4;
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ return 5;
+ /* Verify behaviour of fflush after ungetc. See
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt> */
+ /* Verify behaviour of fflush after a backup ungetc. This fails on
+ mingw. */
+ c = fgetc (f);
+ ungetc (c, f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 6;
+ /* Verify behaviour of fflush after a non-backup ungetc. This fails
+ on glibc 2.8 and on BSD systems. */
+ c = fgetc (f);
+ ungetc ('@', f);
+ fflush (f);
+ if (fgetc (f) != c)
+ return 7;
+ return 0;
+ ]])], [gl_cv_func_fflush_stdin=yes], [gl_cv_func_fflush_stdin=no],
+ [dnl Pessimistically assume fflush is broken.
+ gl_cv_func_fflush_stdin=no])
+ rm conftest.txt
+ ])
+ if test $gl_cv_func_fflush_stdin = no; then
+ gl_REPLACE_FFLUSH
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_FFLUSH],
+[
+ AC_LIBOBJ([fflush])
+ AC_LIBOBJ([fseeko])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FFLUSH=1
+ REPLACE_FSEEKO=1
+ gl_PREREQ_FFLUSH
+])
+
+# Prerequisites of lib/fflush.c.
+AC_DEFUN([gl_PREREQ_FFLUSH],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ :
+])
diff --git a/ltdl/m4/filenamecat.m4 b/ltdl/m4/filenamecat.m4
new file mode 100755
index 00000000..236e5b05
--- /dev/null
+++ b/ltdl/m4/filenamecat.m4
@@ -0,0 +1,19 @@
+# filenamecat.m4 serial 10
+dnl Copyright (C) 2002-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FILE_NAME_CONCAT],
+[
+ AC_REQUIRE([gl_FILE_NAME_CONCAT_LGPL])
+ AC_LIBOBJ([filenamecat])
+])
+
+AC_DEFUN([gl_FILE_NAME_CONCAT_LGPL],
+[
+ AC_LIBOBJ([filenamecat-lgpl])
+
+ dnl Prerequisites of lib/filenamecat-lgpl.c.
+ AC_CHECK_FUNCS_ONCE([mempcpy])
+])
diff --git a/ltdl/m4/flexmember.m4 b/ltdl/m4/flexmember.m4
new file mode 100755
index 00000000..10462435
--- /dev/null
+++ b/ltdl/m4/flexmember.m4
@@ -0,0 +1,41 @@
+# serial 2
+# Check for flexible array member support.
+
+# Copyright (C) 2006, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert.
+
+AC_DEFUN([AC_C_FLEXIBLE_ARRAY_MEMBER],
+[
+ AC_CACHE_CHECK([for flexible array member],
+ ac_cv_c_flexmember,
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdlib.h>
+ #include <stdio.h>
+ #include <stddef.h>
+ struct s { int n; double d[]; };]],
+ [[int m = getchar ();
+ struct s *p = malloc (offsetof (struct s, d)
+ + m * sizeof (double));
+ p->d[0] = 0.0;
+ return p->d != (double *) NULL;]])],
+ [ac_cv_c_flexmember=yes],
+ [ac_cv_c_flexmember=no])])
+ if test $ac_cv_c_flexmember = yes; then
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [],
+ [Define to nothing if C supports flexible array members, and to
+ 1 if it does not. That way, with a declaration like `struct s
+ { int n; double d@<:@FLEXIBLE_ARRAY_MEMBER@:>@; };', the struct hack
+ can be used with pre-C99 compilers.
+ When computing the size of such an object, don't use 'sizeof (struct s)'
+ as it overestimates the size. Use 'offsetof (struct s, d)' instead.
+ Don't use 'offsetof (struct s, d@<:@0@:>@)', as this doesn't work with
+ MSVC and with C++ compilers.])
+ else
+ AC_DEFINE([FLEXIBLE_ARRAY_MEMBER], [1])
+ fi
+])
diff --git a/ltdl/m4/float_h.m4 b/ltdl/m4/float_h.m4
new file mode 100755
index 00000000..a74a0d95
--- /dev/null
+++ b/ltdl/m4/float_h.m4
@@ -0,0 +1,19 @@
+# float_h.m4 serial 3
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FLOAT_H],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ FLOAT_H=
+ case "$host_os" in
+ beos* | openbsd*)
+ FLOAT_H=float.h
+ gl_CHECK_NEXT_HEADERS([float.h])
+ ;;
+ esac
+ AC_SUBST([FLOAT_H])
+])
diff --git a/ltdl/m4/fopen.m4 b/ltdl/m4/fopen.m4
new file mode 100755
index 00000000..6d2b0948
--- /dev/null
+++ b/ltdl/m4/fopen.m4
@@ -0,0 +1,61 @@
+# fopen.m4 serial 5
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_FOPEN],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ dnl Replace fopen, for handling of "/dev/null".
+ REPLACE_FOPEN=1
+ dnl fopen on mingw also has the trailing slash bug.
+ gl_cv_func_fopen_slash="guessing no"
+ ;;
+ *)
+ dnl fopen("foo/", "w") should not create a file when the file name has a
+ dnl trailing slash.
+ AC_CACHE_CHECK([whether fopen recognizes a trailing slash],
+ [gl_cv_func_fopen_slash],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+int main ()
+{
+ return fopen ("conftest.sl/", "w") != NULL;
+}], [gl_cv_func_fopen_slash=yes], [gl_cv_func_fopen_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ solaris2.[0-9]*) gl_cv_func_fopen_slash="guessing no" ;;
+ hpux*) gl_cv_func_fopen_slash="guessing no" ;;
+ *) gl_cv_func_fopen_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl
+ ])
+ ;;
+ esac
+ case "$gl_cv_func_fopen_slash" in
+ *no)
+ AC_DEFINE([FOPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if fopen() fails to recognize a trailing slash.])
+ REPLACE_FOPEN=1
+ ;;
+ esac
+ if test $REPLACE_FOPEN = 1; then
+ AC_LIBOBJ([fopen])
+ gl_PREREQ_FOPEN
+ fi
+])
+
+# Prerequisites of lib/fopen.c.
+AC_DEFUN([gl_PREREQ_FOPEN],
+[
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/ltdl/m4/fpending.m4 b/ltdl/m4/fpending.m4
new file mode 100755
index 00000000..09ae7e3f
--- /dev/null
+++ b/ltdl/m4/fpending.m4
@@ -0,0 +1,83 @@
+# serial 15
+
+# Copyright (C) 2000-2001, 2004-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering
+dnl Using code from emacs, based on suggestions from Paul Eggert
+dnl and Ulrich Drepper.
+
+dnl Find out how to determine the number of pending output bytes on a stream.
+dnl glibc (2.1.93 and newer) and Solaris provide __fpending. On other systems,
+dnl we have to grub around in the FILE struct.
+
+AC_DEFUN([gl_FUNC_FPENDING],
+[
+ AC_CHECK_HEADERS_ONCE([stdio_ext.h])
+ AC_CHECK_FUNCS_ONCE([__fpending])
+ fp_headers='
+# include <stdio.h>
+# if HAVE_STDIO_EXT_H
+# include <stdio_ext.h>
+# endif
+'
+ AC_CHECK_DECLS([__fpending], , , $fp_headers)
+ if test $ac_cv_func___fpending = no; then
+ AC_CACHE_CHECK(
+ [how to determine the number of pending output bytes on a stream],
+ ac_cv_sys_pending_output_n_bytes,
+ [
+ for ac_expr in \
+ \
+ '# glibc2' \
+ 'fp->_IO_write_ptr - fp->_IO_write_base' \
+ \
+ '# traditional Unix' \
+ 'fp->_ptr - fp->_base' \
+ \
+ '# BSD' \
+ 'fp->_p - fp->_bf._base' \
+ \
+ '# SCO, Unixware' \
+ '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
+ \
+ '# QNX' \
+ '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
+ \
+ '# old glibc?' \
+ 'fp->__bufp - fp->__buffer' \
+ \
+ '# old glibc iostream?' \
+ 'fp->_pptr - fp->_pbase' \
+ \
+ '# emx+gcc' \
+ 'fp->_ptr - fp->_buffer' \
+ \
+ '# VMS' \
+ '(*fp)->_ptr - (*fp)->_base' \
+ \
+ '# e.g., DGUX R4.11; the info is not available' \
+ 1 \
+ ; do
+
+ # Skip each embedded comment.
+ case "$ac_expr" in '#'*) continue;; esac
+
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+ [[FILE *fp = stdin; (void) ($ac_expr);]])],
+ [fp_done=yes]
+ )
+ test "$fp_done" = yes && break
+ done
+
+ ac_cv_sys_pending_output_n_bytes=$ac_expr
+ ]
+ )
+ AC_DEFINE_UNQUOTED([PENDING_OUTPUT_N_BYTES],
+ $ac_cv_sys_pending_output_n_bytes,
+ [the number of pending output bytes on stream `fp'])
+ AC_LIBOBJ([fpending])
+ fi
+])
diff --git a/ltdl/m4/fpieee.m4 b/ltdl/m4/fpieee.m4
new file mode 100755
index 00000000..532802d7
--- /dev/null
+++ b/ltdl/m4/fpieee.m4
@@ -0,0 +1,52 @@
+# fpieee.m4 serial 1
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl IEEE 754 standardized three items:
+dnl - The formats of single-float and double-float - nowadays commonly
+dnl available as 'float' and 'double' in C and C++.
+dnl No autoconf test needed.
+dnl - The overflow and division by zero behaviour: The result are values
+dnl '±Inf' and 'NaN', rather than exceptions as it was before.
+dnl This file provides an autoconf macro for ensuring this behaviour of
+dnl floating-point operations.
+dnl - A set of conditions (overflow, underflow, inexact, etc.) which can
+dnl be configured to trigger an exception.
+dnl This cannot be done in a portable way: it depends on the compiler,
+dnl libc, kernel, and CPU. No autoconf macro is provided for this.
+
+dnl Ensure non-trapping behaviour of floating-point overflow and
+dnl floating-point division by zero.
+dnl (For integer overflow, see gcc's -ftrapv option; for integer division by
+dnl zero, see the autoconf macro in intdiv0.m4.)
+
+AC_DEFUN([gl_FP_IEEE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ # IEEE behaviour is the default on all CPUs except Alpha and SH
+ # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
+ # and the GCC 4.1.2 manual).
+ case "$host_cpu" in
+ alpha*)
+ # On Alpha systems, a compiler option provides the behaviour.
+ # See the ieee(3) manual page, also available at
+ # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM>
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ else
+ # Compaq (ex-DEC) C has the option -ieee.
+ CPPFLAGS="$CPPFLAGS -ieee"
+ fi
+ ;;
+ sh*)
+ if test -n "$GCC"; then
+ # GCC has the option -mieee.
+ CPPFLAGS="$CPPFLAGS -mieee"
+ fi
+ ;;
+ esac
+])
diff --git a/ltdl/m4/fpurge.m4 b/ltdl/m4/fpurge.m4
new file mode 100755
index 00000000..d97e8976
--- /dev/null
+++ b/ltdl/m4/fpurge.m4
@@ -0,0 +1,45 @@
+# fpurge.m4 serial 6
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FPURGE],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([fpurge])
+ AC_CHECK_FUNCS_ONCE([__fpurge])
+ AC_CHECK_DECLS([fpurge], , , [[#include <stdio.h>]])
+ if test "x$ac_cv_func_fpurge" = xyes; then
+ # Detect BSD bug. Only cygwin 1.7 is known to be immune.
+ AC_CACHE_CHECK([whether fpurge works], [gl_cv_func_fpurge_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [FILE *f = fopen ("conftest.txt", "w+");
+ if (!f) return 1;
+ if (fputc ('a', f) != 'a') return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != EOF) return 4;
+ if (fpurge (f) != 0) return 5;
+ if (putc ('b', f) != 'b') return 6;
+ if (fclose (f) != 0) return 7;
+ if ((f = fopen ("conftest.txt", "r")) == NULL) return 8;
+ if (fgetc (f) != 'a') return 9;
+ if (fgetc (f) != 'b') return 10;
+ if (fgetc (f) != EOF) return 11;
+ if (fclose (f) != 0) return 12;
+ if (remove ("conftest.txt") != 0) return 13;
+ return 0;])],
+ [gl_cv_func_fpurge_works=yes], [gl_cv_func_fpurge_works=no],
+ [gl_cv_func_fpurge_works='guessing no'])])
+ if test "x$gl_cv_func_fpurge_works" != xyes; then
+ REPLACE_FPURGE=1
+ AC_LIBOBJ([fpurge])
+ fi
+ else
+ AC_LIBOBJ([fpurge])
+ fi
+ if test "x$ac_cv_have_decl_fpurge" = xno; then
+ HAVE_DECL_FPURGE=0
+ fi
+])
diff --git a/ltdl/m4/freading.m4 b/ltdl/m4/freading.m4
new file mode 100755
index 00000000..051b95d3
--- /dev/null
+++ b/ltdl/m4/freading.m4
@@ -0,0 +1,10 @@
+# freading.m4 serial 1
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREADING],
+[
+ AC_CHECK_FUNCS_ONCE([__freading])
+])
diff --git a/ltdl/m4/frexp.m4 b/ltdl/m4/frexp.m4
new file mode 100755
index 00000000..3a450f65
--- /dev/null
+++ b/ltdl/m4/frexp.m4
@@ -0,0 +1,146 @@
+# frexp.m4 serial 7
+dnl Copyright (C) 2007, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FREXP],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ FREXP_LIBM=
+ AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = no; then
+ AC_CACHE_CHECK([whether frexp() can be used with libm],
+ [gl_cv_func_frexp_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_in_libm=yes],
+ [gl_cv_func_frexp_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_frexp_in_libm = yes; then
+ FREXP_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_frexp_no_libm = yes \
+ || test $gl_cv_func_frexp_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $FREXP_LIBM"
+ gl_FUNC_FREXP_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp=yes ;;
+ *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;;
+ esac
+ else
+ gl_func_frexp=no
+ fi
+ if test $gl_func_frexp = yes; then
+ AC_DEFINE([HAVE_FREXP], [1],
+ [Define if the frexp() function is available and works.])
+ else
+ AC_LIBOBJ([frexp])
+ fi
+ AC_SUBST([FREXP_LIBM])
+])
+
+AC_DEFUN([gl_FUNC_FREXP_NO_LIBM],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([whether frexp() can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;],
+ [int e; return frexp (x, &e) > 0;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = yes; then
+ gl_FUNC_FREXP_WORKS
+ case "$gl_cv_func_frexp_works" in
+ *yes) gl_func_frexp_no_libm=yes ;;
+ *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;;
+ esac
+ else
+ gl_func_frexp_no_libm=no
+ dnl Set REPLACE_FREXP here because the system may have frexp in libm.
+ REPLACE_FREXP=1
+ fi
+ if test $gl_func_frexp_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
+ [Define if the frexp() function is available in libc.])
+ else
+ AC_LIBOBJ([frexp])
+ fi
+])
+
+dnl Test whether frexp() works also on denormalized numbers (this fails e.g. on
+dnl NetBSD 3.0), on infinite numbers (this fails e.g. on IRIX 6.5 and mingw),
+dnl and on negative zero (this fails e.g. on NetBSD 4.99).
+AC_DEFUN([gl_FUNC_FREXP_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether frexp works], [gl_cv_func_frexp_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <math.h>
+#include <string.h>
+int main()
+{
+ int i;
+ volatile double x;
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+ double zero = 0.0;
+ /* Test on denormalized numbers. */
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ ;
+ if (x > 0.0)
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
+ On NetBSD: y = 0.75. Correct: y = 0.5. */
+ if (y != 0.5)
+ return 1;
+ }
+ /* Test on infinite numbers. */
+ x = 1.0 / 0.0;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ /* Test on negative zero. */
+ x = -zero;
+ {
+ int exp;
+ double y = frexp (x, &exp);
+ if (memcmp (&y, &x, sizeof x))
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_frexp_works=yes], [gl_cv_func_frexp_works=no],
+ [case "$host_os" in
+ netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";;
+ *) gl_cv_func_frexp_works="guessing yes";;
+ esac
+ ])
+ ])
+])
diff --git a/ltdl/m4/frexpl.m4 b/ltdl/m4/frexpl.m4
new file mode 100755
index 00000000..0fbc893a
--- /dev/null
+++ b/ltdl/m4/frexpl.m4
@@ -0,0 +1,186 @@
+# frexpl.m4 serial 9
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_FREXPL],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ FREXPL_LIBM=
+ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = no; then
+ AC_CACHE_CHECK([whether frexpl() can be used with libm],
+ [gl_cv_func_frexpl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_in_libm=yes],
+ [gl_cv_func_frexpl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_frexpl_in_libm = yes; then
+ FREXPL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_frexpl_no_libm = yes \
+ || test $gl_cv_func_frexpl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $FREXPL_LIBM"
+ gl_FUNC_FREXPL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl=yes ;;
+ *) gl_func_frexpl=no; REPLACE_FREXPL=1; FREXPL_LIBM= ;;
+ esac
+ else
+ gl_func_frexpl=no
+ fi
+ if test $gl_func_frexpl = yes; then
+ AC_DEFINE([HAVE_FREXPL], [1],
+ [Define if the frexpl() function is available.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_FREXPL=0
+ AC_LIBOBJ([frexpl])
+ fi
+ AC_SUBST([FREXPL_LIBM])
+])
+
+AC_DEFUN([gl_FUNC_FREXPL_NO_LIBM],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([whether frexpl() can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [int e; return frexpl (x, &e) > 0;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+ gl_FUNC_FREXPL_WORKS
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
+ [Define if the frexpl() function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_FREXPL=0
+ AC_LIBOBJ([frexpl])
+ fi
+])
+
+dnl Test whether frexpl() works on finite numbers (this fails on
+dnl MacOS X 10.4/PowerPC, on AIX 5.1, and on BeOS), on denormalized numbers
+dnl (this fails on MacOS X 10.5/i386), and also on infinite numbers (this
+dnl fails e.g. on IRIX 6.5 and mingw).
+AC_DEFUN([gl_FUNC_FREXPL_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether frexpl works], [gl_cv_func_frexpl_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <math.h>
+/* Override the values of <float.h>, like done in float.in.h. */
+#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP (-16381)
+#endif
+extern long double frexpl (long double, int *);
+int main()
+{
+ volatile long double x;
+ /* Test on finite numbers that fails on AIX 5.1. */
+ x = 16.0L;
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != 5)
+ return 1;
+ }
+ /* Test on finite numbers that fails on MacOS X 10.4, because its frexpl
+ function returns an invalid (incorrectly normalized) value: it returns
+ y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
+ but the correct result is
+ 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
+ x = 1.01L;
+ {
+ int exp = -9999;
+ long double y = frexpl (x, &exp);
+ if (!(exp == 1 && y == 0.505L))
+ return 1;
+ }
+ /* Test on large finite numbers. This fails on BeOS at i = 16322, while
+ LDBL_MAX_EXP = 16384.
+ In the loop end test, we test x against Infinity, rather than comparing
+ i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ frexpl (x, &exp);
+ if (exp != i)
+ return 1;
+ }
+ }
+ /* Test on denormalized numbers. */
+ {
+ int i;
+ for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
+ ;
+ if (x > 0.0L)
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
+ exp = -16382, y = 0.5. On MacOS X 10.5: exp = -16384, y = 0.5. */
+ if (exp != LDBL_MIN_EXP - 1)
+ return 1;
+ }
+ }
+ /* Test on infinite numbers. */
+ x = 1.0L / 0.0L;
+ {
+ int exp;
+ long double y = frexpl (x, &exp);
+ if (y != x)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_frexpl_works=yes], [gl_cv_func_frexpl_works=no],
+ [case "$host_os" in
+ aix* | beos* | darwin* | irix* | mingw* | pw*)
+ gl_cv_func_frexpl_works="guessing no";;
+ *) gl_cv_func_frexpl_works="guessing yes";;
+ esac
+ ])
+ ])
+])
diff --git a/ltdl/m4/fseeko.m4 b/ltdl/m4/fseeko.m4
new file mode 100755
index 00000000..5f7f9772
--- /dev/null
+++ b/ltdl/m4/fseeko.m4
@@ -0,0 +1,35 @@
+# fseeko.m4 serial 7
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_FSEEKO],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for fseeko], [gl_cv_func_fseeko],
+ [
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>
+]], [fseeko (stdin, 0, 0);])],
+ [gl_cv_func_fseeko=yes], [gl_cv_func_fseeko=no])
+ ])
+ if test $gl_cv_func_fseeko = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+ gl_REPLACE_FSEEKO
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_FSEEKO],
+[
+ AC_LIBOBJ([fseeko])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FSEEKO=1
+ dnl If we are also using the fseek module, then fseek needs replacing, too.
+ m4_ifdef([gl_REPLACE_FSEEK], [gl_REPLACE_FSEEK])
+])
diff --git a/ltdl/m4/ftello.m4 b/ltdl/m4/ftello.m4
new file mode 100755
index 00000000..2dff6ee9
--- /dev/null
+++ b/ltdl/m4/ftello.m4
@@ -0,0 +1,32 @@
+# ftello.m4 serial 5
+dnl Copyright (C) 2007, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_FTELLO],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_STDIN_LARGE_OFFSET])
+
+ dnl Persuade glibc <stdio.h> to declare fseeko().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CACHE_CHECK([for ftello], [gl_cv_func_ftello],
+ [
+ AC_TRY_LINK([#include <stdio.h>], [ftello (stdin);],
+ [gl_cv_func_ftello=yes], [gl_cv_func_ftello=no])
+ ])
+ if test $gl_cv_func_ftello = no \
+ || test $gl_cv_var_stdin_large_offset = no; then
+ gl_REPLACE_FTELLO
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_FTELLO],
+[
+ AC_LIBOBJ([ftello])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ REPLACE_FTELLO=1
+])
diff --git a/ltdl/m4/getdtablesize.m4 b/ltdl/m4/getdtablesize.m4
new file mode 100755
index 00000000..d2386284
--- /dev/null
+++ b/ltdl/m4/getdtablesize.m4
@@ -0,0 +1,15 @@
+# getdtablesize.m4 serial 1
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_GETDTABLESIZE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([getdtablesize])
+ if test $ac_cv_func_getdtablesize != yes; then
+ HAVE_GETDTABLESIZE=0
+ AC_LIBOBJ([getdtablesize])
+ fi
+])
diff --git a/ltdl/m4/getopt.m4 b/ltdl/m4/getopt.m4
new file mode 100755
index 00000000..a19805ea
--- /dev/null
+++ b/ltdl/m4/getopt.m4
@@ -0,0 +1,273 @@
+# getopt.m4 serial 24
+dnl Copyright (C) 2002-2006, 2008-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.
+
+# Request a POSIX compliant getopt function.
+AC_DEFUN([gl_FUNC_GETOPT_POSIX],
+[
+ m4_divert_text([DEFAULTS], [gl_getopt_required=POSIX])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ gl_GETOPT_IFELSE([
+ gl_REPLACE_GETOPT
+ ],
+ [])
+])
+
+# Request a POSIX compliant getopt function with GNU extensions (such as
+# options with optional arguments) and the functions getopt_long,
+# getopt_long_only.
+AC_DEFUN([gl_FUNC_GETOPT_GNU],
+[
+ m4_divert_text([INIT_PREPARE], [gl_getopt_required=GNU])
+
+ AC_REQUIRE([gl_FUNC_GETOPT_POSIX])
+])
+
+# Request the gnulib implementation of the getopt functions unconditionally.
+# argp.m4 uses this.
+AC_DEFUN([gl_REPLACE_GETOPT],
+[
+ dnl Arrange for getopt.h to be created.
+ gl_GETOPT_SUBSTITUTE_HEADER
+ dnl Arrange for unistd.h to include getopt.h.
+ GNULIB_UNISTD_H_GETOPT=1
+ dnl Arrange to compile the getopt implementation.
+ AC_LIBOBJ([getopt])
+ AC_LIBOBJ([getopt1])
+ gl_PREREQ_GETOPT
+])
+
+# emacs' configure.in uses this.
+AC_DEFUN([gl_GETOPT_IFELSE],
+[
+ AC_REQUIRE([gl_GETOPT_CHECK_HEADERS])
+ AS_IF([test -n "$gl_replace_getopt"], [$1], [$2])
+])
+
+# Determine whether to replace the entire getopt facility.
+AC_DEFUN([gl_GETOPT_CHECK_HEADERS],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade Solaris <unistd.h> to declare optarg, optind, opterr, optopt.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ gl_CHECK_NEXT_HEADERS([getopt.h])
+ AC_CHECK_HEADERS_ONCE([getopt.h])
+ if test $ac_cv_header_getopt_h = yes; then
+ HAVE_GETOPT_H=1
+ else
+ HAVE_GETOPT_H=0
+ fi
+ AC_SUBST([HAVE_GETOPT_H])
+
+ gl_replace_getopt=
+
+ dnl Test whether <getopt.h> is available.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_HEADERS([getopt.h], [], [gl_replace_getopt=yes])
+ fi
+
+ dnl Test whether the function getopt_long is available.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_FUNCS([getopt_long_only], [], [gl_replace_getopt=yes])
+ fi
+
+ dnl BSD getopt_long uses an incompatible method to reset option processing.
+ dnl Existence of the variable, in and of itself, is not a reason to replace
+ dnl getopt, but knowledge of the variable is needed to determine how to
+ dnl reset and whether a reset reparses the environment.
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CHECK_DECLS([optreset], [], [],
+ [[#include <getopt.h>]])
+ fi
+
+ dnl mingw's getopt (in libmingwex.a) does weird things when the options
+ dnl strings starts with '+' and it's not the first call. Some internal state
+ dnl is left over from earlier calls, and neither setting optind = 0 nor
+ dnl setting optreset = 1 get rid of this internal state.
+ dnl POSIX is silent on optind vs. optreset, so we allow either behavior.
+ if test -z "$gl_replace_getopt"; then
+ AC_CACHE_CHECK([whether getopt is POSIX compatible],
+ [gl_cv_func_getopt_posix],
+ [
+ dnl This test fails on mingw and succeeds on all other platforms.
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+#include <unistd.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if !HAVE_DECL_OPTRESET
+# define OPTIND_MIN 0
+#else
+# define OPTIND_MIN 1
+#endif
+
+int
+main ()
+{
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "-a";
+ argv[argc++] = "foo";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "ab");
+ if (!(c == 'a'))
+ return 1;
+ c = getopt (argc, argv, "ab");
+ if (!(c == -1))
+ return 2;
+ if (!(optind == 2))
+ return 3;
+ }
+ /* Some internal state exists at this point. */
+ {
+ int argc = 0;
+ char *argv[10];
+ int c;
+
+ argv[argc++] = "program";
+ argv[argc++] = "donald";
+ argv[argc++] = "-p";
+ argv[argc++] = "billy";
+ argv[argc++] = "duck";
+ argv[argc++] = "-a";
+ argv[argc++] = "bar";
+ argv[argc] = NULL;
+ optind = OPTIND_MIN;
+ opterr = 0;
+
+ c = getopt (argc, argv, "+abp:q:");
+ if (!(c == -1))
+ return 4;
+ if (!(strcmp (argv[0], "program") == 0))
+ return 5;
+ if (!(strcmp (argv[1], "donald") == 0))
+ return 6;
+ if (!(strcmp (argv[2], "-p") == 0))
+ return 7;
+ if (!(strcmp (argv[3], "billy") == 0))
+ return 8;
+ if (!(strcmp (argv[4], "duck") == 0))
+ return 9;
+ if (!(strcmp (argv[5], "-a") == 0))
+ return 10;
+ if (!(strcmp (argv[6], "bar") == 0))
+ return 11;
+ if (!(optind == 1))
+ return 12;
+ }
+
+ return 0;
+}
+]])],
+ [gl_cv_func_getopt_posix=yes], [gl_cv_func_getopt_posix=no],
+ [case "$host_os" in
+ mingw*) gl_cv_func_getopt_posix="guessing no";;
+ *) gl_cv_func_getopt_posix="guessing yes";;
+ esac
+ ])
+ ])
+ case "$gl_cv_func_getopt_posix" in
+ *no) gl_replace_getopt=yes ;;
+ esac
+ fi
+
+ if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
+ AC_CACHE_CHECK([for working GNU getopt function], [gl_cv_func_getopt_gnu],
+ [# Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
+ # optstring is necessary for programs like m4 that have POSIX-mandated
+ # semantics for supporting options interspersed with files.
+ # Also, since getopt_long is a GNU extension, we require optind=0.
+ gl_had_POSIXLY_CORRECT=${POSIXLY_CORRECT:+yes}
+ POSIXLY_CORRECT=1
+ export POSIXLY_CORRECT
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM([[#include <getopt.h>
+ #include <stddef.h>
+ #include <string.h>
+ ]], [[
+ /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
+ and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
+ OSF/1 5.1, Solaris 10. */
+ {
+ char *myargv[3];
+ myargv[0] = "conftest";
+ myargv[1] = "-+";
+ myargv[2] = 0;
+ opterr = 0;
+ if (getopt (2, myargv, "+a") != '?')
+ return 1;
+ }
+ /* This code succeeds on glibc 2.8, mingw,
+ and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
+ IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
+ {
+ char *argv[] = { "program", "-p", "foo", "bar", NULL };
+
+ optind = 1;
+ if (getopt (4, argv, "p::") != 'p')
+ return 2;
+ if (optarg != NULL)
+ return 3;
+ if (getopt (4, argv, "p::") != -1)
+ return 4;
+ if (optind != 2)
+ return 5;
+ }
+ /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
+ {
+ char *argv[] = { "program", "foo", "-p", NULL };
+ optind = 0;
+ if (getopt (3, argv, "-p") != 1)
+ return 6;
+ if (getopt (3, argv, "-p") != 'p')
+ return 7;
+ }
+ return 0;
+ ]])],
+ [gl_cv_func_getopt_gnu=yes],
+ [gl_cv_func_getopt_gnu=no],
+ [dnl Cross compiling. Guess based on host and declarations.
+ case $host_os:$ac_cv_have_decl_optreset in
+ *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
+ *:yes) gl_cv_func_getopt_gnu=no;;
+ *) gl_cv_func_getopt_gnu=yes;;
+ esac
+ ])
+ if test "$gl_had_POSIXLY_CORRECT" != yes; then
+ AS_UNSET([POSIXLY_CORRECT])
+ fi
+ ])
+ if test "$gl_cv_func_getopt_gnu" = "no"; then
+ gl_replace_getopt=yes
+ fi
+ fi
+])
+
+# emacs' configure.in uses this.
+AC_DEFUN([gl_GETOPT_SUBSTITUTE_HEADER],
+[
+ GETOPT_H=getopt.h
+ AC_DEFINE([__GETOPT_PREFIX], [[rpl_]],
+ [Define to rpl_ if the getopt replacement functions and variables
+ should be used.])
+ AC_SUBST([GETOPT_H])
+])
+
+# Prerequisites of lib/getopt*.
+# emacs' configure.in uses this.
+AC_DEFUN([gl_PREREQ_GETOPT],
+[
+ AC_CHECK_DECLS_ONCE([getenv])
+])
diff --git a/ltdl/m4/getpagesize.m4 b/ltdl/m4/getpagesize.m4
new file mode 100755
index 00000000..8968516e
--- /dev/null
+++ b/ltdl/m4/getpagesize.m4
@@ -0,0 +1,30 @@
+# getpagesize.m4 serial 7
+dnl Copyright (C) 2002, 2004-2005, 2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_FUNC_GETPAGESIZE],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS([getpagesize])
+ if test $ac_cv_func_getpagesize = no; then
+ HAVE_GETPAGESIZE=0
+ AC_CHECK_HEADERS([OS.h])
+ if test $ac_cv_header_OS_h = yes; then
+ HAVE_OS_H=1
+ fi
+ AC_CHECK_HEADERS([sys/param.h])
+ if test $ac_cv_header_sys_param_h = yes; then
+ HAVE_SYS_PARAM_H=1
+ fi
+ fi
+ case "$host_os" in
+ mingw*)
+ REPLACE_GETPAGESIZE=1
+ AC_LIBOBJ([getpagesize])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/gettext.m4 b/ltdl/m4/gettext.m4
new file mode 100755
index 00000000..d6dc3fe2
--- /dev/null
+++ b/ltdl/m4/gettext.m4
@@ -0,0 +1,381 @@
+# gettext.m4 serial 62 (gettext-0.18)
+dnl Copyright (C) 1995-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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH([included-gettext],
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT([$nls_cv_force_use_gnu_gettext])
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE([ENABLE_NLS], [1],
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE([HAVE_GETTEXT], [1],
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE([HAVE_DCGETTEXT], [1],
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST([BUILD_INCLUDED_LIBINTL])
+ AC_SUBST([USE_INCLUDED_LIBINTL])
+ AC_SUBST([CATOBJEXT])
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST([DATADIRNAME])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST([INSTOBJEXT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST([GENCAT])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST([INTLOBJS])
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST([INTL_LIBTOOL_SUFFIX_PREFIX])
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST([INTLLIBS])
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ AC_SUBST([POSUB])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/ltdl/m4/gettext.m4~ b/ltdl/m4/gettext.m4~
new file mode 100644
index 00000000..b5ce322f
--- /dev/null
+++ b/ltdl/m4/gettext.m4~
@@ -0,0 +1,417 @@
+# gettext.m4 serial 58 (gettext-0.16)
+dnl Copyright (C) 1995-2006 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='[[
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+]]'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST(INTLOBJS)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ gt_cv_func_CFPreferencesCopyAppValue,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
diff --git a/ltdl/m4/gettimeofday.m4 b/ltdl/m4/gettimeofday.m4
new file mode 100755
index 00000000..709a4d4f
--- /dev/null
+++ b/ltdl/m4/gettimeofday.m4
@@ -0,0 +1,120 @@
+# serial 15
+
+# Copyright (C) 2001-2003, 2005, 2007, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([gettimeofday])
+
+ gl_gettimeofday_timezone=void
+ if test $ac_cv_func_gettimeofday != yes; then
+ HAVE_GETTIMEOFDAY=0
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ else
+ gl_FUNC_GETTIMEOFDAY_CLOBBER
+ AC_CACHE_CHECK([for gettimeofday with POSIX signature],
+ [gl_cv_func_gettimeofday_posix_signature],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ struct timeval c;
+ int gettimeofday (struct timeval *restrict, void *restrict);
+ ]],
+ [[/* glibc uses struct timezone * rather than the POSIX void *
+ if _GNU_SOURCE is defined. However, since the only portable
+ use of gettimeofday uses NULL as the second parameter, and
+ since the glibc definition is actually more typesafe, it is
+ not worth wrapping this to get a compliant signature. */
+ int (*f) (struct timeval *restrict, void *restrict)
+ = gettimeofday;
+ int x = f (&c, 0);
+ return !(x | c.tv_sec | c.tv_usec);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=yes],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+int gettimeofday (struct timeval *restrict, struct timezone *restrict);
+ ]])],
+ [gl_cv_func_gettimeofday_posix_signature=almost],
+ [gl_cv_func_gettimeofday_posix_signature=no])])])
+ if test $gl_cv_func_gettimeofday_posix_signature = almost; then
+ gl_gettimeofday_timezone='struct timezone'
+ elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
+ REPLACE_GETTIMEOFDAY=1
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ fi
+ fi
+ AC_DEFINE_UNQUOTED([GETTIMEOFDAY_TIMEZONE], [$gl_gettimeofday_timezone],
+ [Define this to 'void' or 'struct timezone' to match the system's
+ declaration of the second argument to gettimeofday.])
+])
+
+
+dnl See if gettimeofday clobbers the static buffer that localtime uses
+dnl for its return value. The gettimeofday function from Mac OS X 10.0.4
+dnl (i.e., Darwin 1.3.7) has this problem.
+dnl
+dnl If it does, then arrange to use gettimeofday and localtime only via
+dnl the wrapper functions that work around the problem.
+
+AC_DEFUN([gl_FUNC_GETTIMEOFDAY_CLOBBER],
+[
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H])
+
+ AC_CACHE_CHECK([whether gettimeofday clobbers localtime buffer],
+ [gl_cv_func_gettimeofday_clobber],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ #include <sys/time.h>
+ #include <time.h>
+ #include <stdlib.h>
+ ]],
+ [[
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
+ ]])],
+ [gl_cv_func_gettimeofday_clobber=no],
+ [gl_cv_func_gettimeofday_clobber=yes],
+ dnl When crosscompiling, assume it is broken.
+ [gl_cv_func_gettimeofday_clobber=yes])])
+
+ if test $gl_cv_func_gettimeofday_clobber = yes; then
+ REPLACE_GETTIMEOFDAY=1
+ gl_GETTIMEOFDAY_REPLACE_LOCALTIME
+ AC_DEFINE([GETTIMEOFDAY_CLOBBERS_LOCALTIME], [1],
+ [Define if gettimeofday clobbers the localtime buffer.])
+ fi
+])
+
+AC_DEFUN([gl_GETTIMEOFDAY_REPLACE_LOCALTIME], [
+ AC_LIBOBJ([gettimeofday])
+ gl_PREREQ_GETTIMEOFDAY
+ AC_DEFINE([gmtime], [rpl_gmtime],
+ [Define to rpl_gmtime if the replacement function should be used.])
+ AC_DEFINE([localtime], [rpl_localtime],
+ [Define to rpl_localtime if the replacement function should be used.])
+])
+
+# Prerequisites of lib/gettimeofday.c.
+AC_DEFUN([gl_PREREQ_GETTIMEOFDAY], [
+ AC_CHECK_HEADERS([sys/timeb.h])
+ AC_CHECK_FUNCS([_ftime])
+])
diff --git a/ltdl/m4/gl_list.m4 b/ltdl/m4/gl_list.m4
new file mode 100755
index 00000000..d1306967
--- /dev/null
+++ b/ltdl/m4/gl_list.m4
@@ -0,0 +1,10 @@
+# gl_list.m4 serial 2
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LIST],
+[
+ AC_REQUIRE([gl_INLINE])
+])
diff --git a/ltdl/m4/glibc2.m4 b/ltdl/m4/glibc2.m4
new file mode 100755
index 00000000..f148c12c
--- /dev/null
+++ b/ltdl/m4/glibc2.m4
@@ -0,0 +1,30 @@
+# glibc2.m4 serial 2
+dnl Copyright (C) 2000-2002, 2004, 2008-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.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+ [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2 or newer],
+ [ac_cv_gnu_library_2],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2=yes],
+ [ac_cv_gnu_library_2=no])
+ ]
+ )
+ AC_SUBST([GLIBC2])
+ GLIBC2="$ac_cv_gnu_library_2"
+ ]
+)
diff --git a/ltdl/m4/glibc2.m4~ b/ltdl/m4/glibc2.m4~
new file mode 100644
index 00000000..e8f5bfe6
--- /dev/null
+++ b/ltdl/m4/glibc2.m4~
@@ -0,0 +1,30 @@
+# glibc2.m4 serial 1
+dnl Copyright (C) 2000-2002, 2004 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.
+
+# Test for the GNU C Library, version 2.0 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gt_GLIBC2],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2 or newer,
+ ac_cv_gnu_library_2,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ >= 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2=yes,
+ ac_cv_gnu_library_2=no)
+ ]
+ )
+ AC_SUBST(GLIBC2)
+ GLIBC2="$ac_cv_gnu_library_2"
+ ]
+)
diff --git a/ltdl/m4/glibc21.m4 b/ltdl/m4/glibc21.m4
new file mode 100755
index 00000000..68ada9d4
--- /dev/null
+++ b/ltdl/m4/glibc21.m4
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 4
+dnl Copyright (C) 2000-2002, 2004, 2008-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.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+ [
+ AC_CACHE_CHECK([whether we are using the GNU C Library 2.1 or newer],
+ [ac_cv_gnu_library_2_1],
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ [ac_cv_gnu_library_2_1=yes],
+ [ac_cv_gnu_library_2_1=no])
+ ]
+ )
+ AC_SUBST([GLIBC21])
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/ltdl/m4/glibc21.m4~ b/ltdl/m4/glibc21.m4~
new file mode 100644
index 00000000..d95fd986
--- /dev/null
+++ b/ltdl/m4/glibc21.m4~
@@ -0,0 +1,30 @@
+# glibc21.m4 serial 3
+dnl Copyright (C) 2000-2002, 2004 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.
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([gl_GLIBC21],
+ [
+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+ ac_cv_gnu_library_2_1,
+ [AC_EGREP_CPP([Lucky GNU user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+ Lucky GNU user
+ #endif
+#endif
+ ],
+ ac_cv_gnu_library_2_1=yes,
+ ac_cv_gnu_library_2_1=no)
+ ]
+ )
+ AC_SUBST(GLIBC21)
+ GLIBC21="$ac_cv_gnu_library_2_1"
+ ]
+)
diff --git a/ltdl/m4/gnulib-common.m4 b/ltdl/m4/gnulib-common.m4
new file mode 100755
index 00000000..80ba2633
--- /dev/null
+++ b/ltdl/m4/gnulib-common.m4
@@ -0,0 +1,142 @@
+# gnulib-common.m4 serial 13
+dnl Copyright (C) 2007-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.
+
+# gl_COMMON
+# is expanded unconditionally through gnulib-tool magic.
+AC_DEFUN([gl_COMMON], [
+ dnl Use AC_REQUIRE here, so that the code is expanded once only.
+ AC_REQUIRE([gl_00GNULIB])
+ AC_REQUIRE([gl_COMMON_BODY])
+])
+AC_DEFUN([gl_COMMON_BODY], [
+ AH_VERBATIM([isoc99_inline],
+[/* Work around a bug in Apple GCC 4.0.1 build 5465: In C99 mode, it supports
+ the ISO C 99 semantics of 'extern inline' (unlike the GNU C semantics of
+ earlier versions), but does not display it by setting __GNUC_STDC_INLINE__.
+ __APPLE__ && __MACH__ test for MacOS X.
+ __APPLE_CC__ tests for the Apple compiler and its version.
+ __STDC_VERSION__ tests for the C99 mode. */
+#if defined __APPLE__ && defined __MACH__ && __APPLE_CC__ >= 5465 && !defined __cplusplus && __STDC_VERSION__ >= 199901L && !defined __GNUC_STDC_INLINE__
+# define __GNUC_STDC_INLINE__ 1
+#endif])
+ AH_VERBATIM([unused_parameter],
+[/* Define as a marker that can be attached to declarations that might not
+ be used. This helps to reduce warnings, such as from
+ GCC -Wunused-parameter. */
+#if __GNUC__ >= 3 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7)
+# define _GL_UNUSED __attribute__ ((__unused__))
+#else
+# define _GL_UNUSED
+#endif
+/* The name _UNUSED_PARAMETER_ is an earlier spelling, although the name
+ is a misnomer outside of parameter lists. */
+#define _UNUSED_PARAMETER_ _GL_UNUSED
+])
+])
+
+# gl_MODULE_INDICATOR([modulename])
+# defines a C macro indicating the presence of the given module.
+AC_DEFUN([gl_MODULE_INDICATOR],
+[
+ AC_DEFINE([GNULIB_]translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___]), [1],
+ [Define to 1 when using the gnulib module ]$1[.])
+])
+
+# m4_foreach_w
+# is a backport of autoconf-2.59c's m4_foreach_w.
+# Remove this macro when we can assume autoconf >= 2.60.
+m4_ifndef([m4_foreach_w],
+ [m4_define([m4_foreach_w],
+ [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])])
+
+# AS_VAR_IF(VAR, VALUE, [IF-MATCH], [IF-NOT-MATCH])
+# ----------------------------------------------------
+# Backport of autoconf-2.63b's macro.
+# Remove this macro when we can assume autoconf >= 2.64.
+m4_ifndef([AS_VAR_IF],
+[m4_define([AS_VAR_IF],
+[AS_IF([test x"AS_VAR_GET([$1])" = x""$2], [$3], [$4])])])
+
+# AC_PROG_MKDIR_P
+# is a backport of autoconf-2.60's AC_PROG_MKDIR_P, with a fix
+# for interoperability with automake-1.9.6 from autoconf-2.62.
+# Remove this macro when we can assume autoconf >= 2.62 or
+# autoconf >= 2.60 && automake >= 1.10.
+m4_ifdef([AC_PROG_MKDIR_P], [
+ dnl For automake-1.9.6 && autoconf < 2.62: Ensure MKDIR_P is AC_SUBSTed.
+ m4_define([AC_PROG_MKDIR_P],
+ m4_defn([AC_PROG_MKDIR_P])[
+ AC_SUBST([MKDIR_P])])], [
+ dnl For autoconf < 2.60: Backport of AC_PROG_MKDIR_P.
+ AC_DEFUN_ONCE([AC_PROG_MKDIR_P],
+ [AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ MKDIR_P='$(mkdir_p)'
+ AC_SUBST([MKDIR_P])])])
+
+# AC_C_RESTRICT
+# This definition overrides the AC_C_RESTRICT macro from autoconf 2.60..2.61,
+# so that mixed use of GNU C and GNU C++ and mixed use of Sun C and Sun C++
+# works.
+# This definition can be removed once autoconf >= 2.62 can be assumed.
+AC_DEFUN([AC_C_RESTRICT],
+[AC_CACHE_CHECK([for C/C++ restrict keyword], [ac_cv_c_restrict],
+ [ac_cv_c_restrict=no
+ # The order here caters to the fact that C++ does not require restrict.
+ for ac_kw in __restrict __restrict__ _Restrict restrict; do
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
+ [[typedef int * int_ptr;
+ int foo (int_ptr $ac_kw ip) {
+ return ip[0];
+ }]],
+ [[int s[1];
+ int * $ac_kw t = s;
+ t[0] = 0;
+ return foo(t)]])],
+ [ac_cv_c_restrict=$ac_kw])
+ test "$ac_cv_c_restrict" != no && break
+ done
+ ])
+ AH_VERBATIM([restrict],
+[/* Define to the equivalent of the C99 'restrict' keyword, or to
+ nothing if this is not supported. Do not define if restrict is
+ supported directly. */
+#undef restrict
+/* Work around a bug in Sun C++: it does not support _Restrict, even
+ though the corresponding Sun C compiler does, which causes
+ "#define restrict _Restrict" in the previous line. Perhaps some future
+ version of Sun C++ will work with _Restrict; if so, it'll probably
+ define __RESTRICT, just as Sun C does. */
+#if defined __SUNPRO_CC && !defined __RESTRICT
+# define _Restrict
+#endif])
+ case $ac_cv_c_restrict in
+ restrict) ;;
+ no) AC_DEFINE([restrict], []) ;;
+ *) AC_DEFINE_UNQUOTED([restrict], [$ac_cv_c_restrict]) ;;
+ esac
+])
+
+# gl_BIGENDIAN
+# is like AC_C_BIGENDIAN, except that it can be AC_REQUIREd.
+# Note that AC_REQUIRE([AC_C_BIGENDIAN]) does not work reliably because some
+# macros invoke AC_C_BIGENDIAN with arguments.
+AC_DEFUN([gl_BIGENDIAN],
+[
+ AC_C_BIGENDIAN
+])
+
+# gl_CACHE_VAL_SILENT(cache-id, command-to-set-it)
+# is like AC_CACHE_VAL(cache-id, command-to-set-it), except that it does not
+# output a spurious "(cached)" mark in the midst of other configure output.
+# This macro should be used instead of AC_CACHE_VAL when it is not surrounded
+# by an AC_MSG_CHECKING/AC_MSG_RESULT pair.
+AC_DEFUN([gl_CACHE_VAL_SILENT],
+[
+ saved_as_echo_n="$as_echo_n"
+ as_echo_n=':'
+ AC_CACHE_VAL([$1], [$2])
+ as_echo_n="$saved_as_echo_n"
+])
diff --git a/ltdl/m4/gnulib-comp.m4 b/ltdl/m4/gnulib-comp.m4
new file mode 100755
index 00000000..5783c2ed
--- /dev/null
+++ b/ltdl/m4/gnulib-comp.m4
@@ -0,0 +1,1246 @@
+# DO NOT EDIT! GENERATED AUTOMATICALLY!
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+#
+# This file represents the compiled summary of the specification in
+# gnulib-cache.m4. It lists the computed macro invocations that need
+# to be invoked from configure.ac.
+# In projects using CVS, this file can be treated like other built files.
+
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Checks for programs", right after AC_PROG_CC, and certainly before
+# any checks for libraries, header files, types and library functions.
+AC_DEFUN([M4_EARLY],
+[
+ m4_pattern_forbid([^gl_[A-Z]])dnl the gnulib macro namespace
+ m4_pattern_allow([^gl_ES$])dnl a valid locale name
+ m4_pattern_allow([^gl_LIBOBJS$])dnl a variable
+ m4_pattern_allow([^gl_LTLIBOBJS$])dnl a variable
+ AC_REQUIRE([AC_PROG_RANLIB])
+ AC_REQUIRE([AM_PROG_CC_C_O])
+ AB_INIT
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ AC_REQUIRE([gl_FP_IEEE])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ AC_REQUIRE([AC_FUNC_FSEEKO])
+ dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
+ dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
+ dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
+ dnl shouldn't hurt, though installers are on their own to set c99 mode.
+ AC_REQUIRE([AC_PROG_CC_STDC])
+])
+
+# This macro should be invoked from ./configure.ac, in the section
+# "Check for header files, types and library functions".
+AC_DEFUN([M4_INIT],
+[
+ AM_CONDITIONAL([GL_COND_LIBTOOL], [true])
+ gl_cond_libtool=true
+ m4_pushdef([AC_LIBOBJ], m4_defn([M4_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([M4_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([M4_LIBSOURCES]))
+ m4_pushdef([M4_LIBSOURCES_LIST], [])
+ m4_pushdef([M4_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='gnu'
+changequote(,)dnl
+LTALLOCA=`echo "$ALLOCA" | sed -e 's/\.[^.]* /.lo /g;s/\.[^.]*$/.lo/'`
+changequote([, ])dnl
+AC_SUBST([LTALLOCA])
+ gl_FUNC_ALLOCA
+ gl_ASSERT
+ AC_REQUIRE([AC_C_INLINE])
+ gl_FUNC_BTOWC
+ gl_WCHAR_MODULE_INDICATOR([btowc])
+ gl_CANONICALIZE_LGPL
+ gl_MODULE_INDICATOR([canonicalize-lgpl])
+ gl_STDLIB_MODULE_INDICATOR([canonicalize_file_name])
+ gl_STDLIB_MODULE_INDICATOR([realpath])
+ AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.])
+ gl_CLOEXEC
+ gl_MODULE_INDICATOR([cloexec])
+ gl_CLOSE_STREAM
+ gl_MODULE_INDICATOR([close-stream])
+ gl_CLOSEIN
+ gl_CLOSEOUT
+ gl_CONFIG_H
+ gl_DIRNAME
+ gl_MODULE_INDICATOR([dirname])
+ gl_DIRNAME_LGPL
+ gl_DOUBLE_SLASH_ROOT
+ gl_FUNC_DUP2
+ gl_UNISTD_MODULE_INDICATOR([dup2])
+ gl_ENVIRON
+ gl_UNISTD_MODULE_INDICATOR([environ])
+ gl_HEADER_ERRNO_H
+ gl_ERROR
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=error:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=error_at_line:5:c-format])])
+ gl_EXECUTE
+ gl_EXITFAIL
+ gl_FATAL_SIGNAL
+ gl_FUNC_FCNTL
+ gl_FCNTL_MODULE_INDICATOR([fcntl])
+ gl_FCNTL_H
+ gl_MODULE_INDICATOR([fd-safer-flag])
+ gl_FUNC_FFLUSH
+ gl_STDIO_MODULE_INDICATOR([fflush])
+ gl_FILE_NAME_CONCAT
+ gl_MODULE_INDICATOR([filenamecat])
+ gl_FILE_NAME_CONCAT_LGPL
+ AC_C_FLEXIBLE_ARRAY_MEMBER
+ gl_FLOAT_H
+ gl_FUNC_FOPEN
+ gl_STDIO_MODULE_INDICATOR([fopen])
+ gl_FOPEN_SAFER
+ gl_MODULE_INDICATOR([fopen-safer])
+ gl_FUNC_FPENDING
+ gl_FUNC_FPURGE
+ gl_STDIO_MODULE_INDICATOR([fpurge])
+ gl_FUNC_FREADING
+ AC_REQUIRE([AC_C_INLINE])
+ gl_FUNC_FREXP_NO_LIBM
+ gl_MATH_MODULE_INDICATOR([frexp])
+ gl_FUNC_FREXPL_NO_LIBM
+ gl_MATH_MODULE_INDICATOR([frexpl])
+ gl_FUNC_FSEEKO
+ gl_STDIO_MODULE_INDICATOR([fseeko])
+ gl_FUNC_FTELLO
+ gl_STDIO_MODULE_INDICATOR([ftello])
+ gl_FUNC_GETDTABLESIZE
+ gl_UNISTD_MODULE_INDICATOR([getdtablesize])
+ dnl you must add AM_GNU_GETTEXT([external]) or similar to configure.ac.
+ AM_GNU_GETTEXT_VERSION([0.17])
+ AC_SUBST([LIBINTL])
+ AC_SUBST([LTLIBINTL])
+ gl_FUNC_GETTIMEOFDAY
+ gl_SYS_TIME_MODULE_INDICATOR([gettimeofday])
+ # Autoconf 2.61a.99 and earlier don't support linking a file only
+ # in VPATH builds. But since GNUmakefile is for maintainer use
+ # only, it does not matter if we skip the link with older autoconf.
+ # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
+ # builds, so use a shell variable to bypass this.
+ GNUmakefile=GNUmakefile
+ m4_if(m4_version_compare([2.61a.100],
+ m4_defn([m4_PACKAGE_VERSION])), [1], [],
+ [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+ [GNUmakefile=$GNUmakefile])])
+ AM_ICONV
+ gl_ICONV_H
+ gl_FUNC_ICONV_OPEN
+ gl_INLINE
+ gl_INTTYPES_H
+ gl_FUNC_ISNAND_NO_LIBM
+ gl_FUNC_ISNANF_NO_LIBM
+ gl_FUNC_ISNANL_NO_LIBM
+ gl_LANGINFO_H
+ gl_LIST
+ gl_LOCALCHARSET
+ LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(top_builddir)/$gl_source_base\""
+ AC_SUBST([LOCALCHARSET_TESTS_ENVIRONMENT])
+ gl_FUNC_LSEEK
+ gl_UNISTD_MODULE_INDICATOR([lseek])
+ gl_FUNC_LSTAT
+ gl_SYS_STAT_MODULE_INDICATOR([lstat])
+ AC_CONFIG_COMMANDS_PRE([m4_ifdef([AH_HEADER],
+ [AC_SUBST([CONFIG_INCLUDE], m4_defn([AH_HEADER]))])])
+ AC_FUNC_MALLOC
+ AC_DEFINE([GNULIB_MALLOC_GNU], 1, [Define to indicate the 'malloc' module.])
+ gl_FUNC_MALLOC_POSIX
+ gl_STDLIB_MODULE_INDICATOR([malloc-posix])
+ gl_MALLOCA
+ gl_MATH_H
+ gl_MBCHAR
+ gl_MBITER
+ gl_FUNC_MBRTOWC
+ gl_WCHAR_MODULE_INDICATOR([mbrtowc])
+ gl_FUNC_MBSINIT
+ gl_WCHAR_MODULE_INDICATOR([mbsinit])
+ gl_MBSLEN
+ gl_STRING_MODULE_INDICATOR([mbslen])
+ gl_STRING_MODULE_INDICATOR([mbsstr])
+ gl_MBITER
+ gl_FUNC_MEMCHR
+ gl_STRING_MODULE_INDICATOR([memchr])
+ gl_FUNC_MEMMEM
+ gl_FUNC_MEMMEM_SIMPLE
+ gl_STRING_MODULE_INDICATOR([memmem])
+ gt_FUNC_MKDTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkdtemp])
+ gl_FUNC_MKSTEMP
+ gl_STDLIB_MODULE_INDICATOR([mkstemp])
+ gl_MULTIARCH
+ gl_FUNC_NL_LANGINFO
+ gl_LANGINFO_MODULE_INDICATOR([nl_langinfo])
+ AC_FUNC_OBSTACK
+ dnl Note: AC_FUNC_OBSTACK does AC_LIBSOURCES([obstack.h, obstack.c]).
+ gl_FUNC_OBSTACK_PRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([obstack-printf-posix])
+ gl_FUNC_OPEN
+ gl_MODULE_INDICATOR([open])
+ gl_FCNTL_MODULE_INDICATOR([open])
+ gl_LIST
+ gl_PATHMAX
+ gl_PIPE
+ gl_FUNC_PIPE2
+ gl_UNISTD_MODULE_INDICATOR([pipe2])
+ gl_MODULE_INDICATOR([pipe2-safer])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_addclose])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addclose])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_adddup2])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_adddup2])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_addopen])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_addopen])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_destroy])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_destroy])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawn_faction_init])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawn_file_actions_init])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_destroy])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_destroy])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_init])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_init])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_setflags])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setflags])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnattr_setsigmask])
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnattr_setsigmask])
+ gl_POSIX_SPAWN
+ if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then
+ gl_REPLACE_SPAWN_H
+ AC_LIBOBJ([spawnp])
+ gl_POSIX_SPAWN_INTERNAL
+ fi
+ gl_SPAWN_MODULE_INDICATOR([posix_spawnp])
+ gl_FUNC_PRINTF_FREXP
+ gl_FUNC_PRINTF_FREXPL
+ m4_divert_text([INIT_PREPARE], [gl_printf_safe=yes])
+ AC_CHECK_DECLS([program_invocation_name], [], [], [#include <errno.h>])
+ AC_CHECK_DECLS([program_invocation_short_name], [], [], [#include <errno.h>])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--keyword='proper_name:1,\"This is a proper name. See the gettext manual, section Names.\"'])
+ AM_][XGETTEXT_OPTION([--keyword='proper_name_utf8:1,\"This is a proper name. See the gettext manual, section Names.\"'])])
+ gl_QUOTE
+ gl_QUOTEARG
+ gl_FUNC_RAWMEMCHR
+ gl_STRING_MODULE_INDICATOR([rawmemchr])
+ gl_FUNC_READLINK
+ gl_UNISTD_MODULE_INDICATOR([readlink])
+ gl_REGEX
+ gl_FUNC_RENAME
+ gl_STDIO_MODULE_INDICATOR([rename])
+ gl_FUNC_RMDIR
+ gl_UNISTD_MODULE_INDICATOR([rmdir])
+ gl_SCHED_H
+ gl_FUNC_SETENV
+ gl_STDLIB_MODULE_INDICATOR([setenv])
+ gl_SIGACTION
+ gl_SIGNAL_MODULE_INDICATOR([sigaction])
+ gl_SIGNAL_H
+ gl_SIGNBIT
+ gl_MATH_MODULE_INDICATOR([signbit])
+ gl_SIGNALBLOCKING
+ gl_SIGNAL_MODULE_INDICATOR([sigprocmask])
+ gl_SIZE_MAX
+ gl_FUNC_SNPRINTF
+ gl_STDIO_MODULE_INDICATOR([snprintf])
+ gl_FUNC_SNPRINTF_POSIX
+ gl_SPAWN_H
+ gl_FUNC_SPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([sprintf-posix])
+ gt_TYPE_SSIZE_T
+ gl_FUNC_STAT
+ gl_SYS_STAT_MODULE_INDICATOR([stat])
+ gl_STDARG_H
+ AM_STDBOOL_H
+ gl_STDDEF_H
+ gl_STDINT_H
+ gl_STDIO_H
+ gl_STDLIB_H
+ gl_STDLIB_SAFER
+ gl_MODULE_INDICATOR([stdlib-safer])
+ gl_FUNC_STRCHRNUL
+ gl_STRING_MODULE_INDICATOR([strchrnul])
+ gl_FUNC_STRERROR
+ gl_STRING_MODULE_INDICATOR([strerror])
+ if test $gl_cond_libtool = false; then
+ gl_ltlibdeps="$gl_ltlibdeps $LTLIBICONV"
+ gl_libdeps="$gl_libdeps $LIBICONV"
+ fi
+ gl_HEADER_STRING_H
+ gl_FUNC_STRNDUP
+ gl_STRING_MODULE_INDICATOR([strndup])
+ gl_FUNC_STRNLEN
+ gl_STRING_MODULE_INDICATOR([strnlen])
+ gl_FUNC_STRTOD
+ gl_STDLIB_MODULE_INDICATOR([strtod])
+ gl_FUNC_STRTOL
+ gl_HEADER_SYS_STAT_H
+ AC_PROG_MKDIR_P
+ gl_HEADER_SYS_TIME_H
+ AC_PROG_MKDIR_P
+ gl_SYS_WAIT_H
+ AC_PROG_MKDIR_P
+ gl_FUNC_GEN_TEMPNAME
+ gl_HEADER_TIME_H
+ gt_TMPDIR
+ gl_UNISTD_H
+ gl_UNISTD_SAFER
+ gl_FUNC_GLIBC_UNLOCKED_IO
+ gl_FUNC_UNSETENV
+ gl_STDLIB_MODULE_INDICATOR([unsetenv])
+ gl_FUNC_VASNPRINTF
+ gl_FUNC_VASNPRINTF_POSIX
+ gl_FUNC_VASPRINTF
+ gl_STDIO_MODULE_INDICATOR([vasprintf])
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=asprintf:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=vasprintf:2:c-format])])
+ gl_FUNC_VASPRINTF_POSIX
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=verror:3:c-format])
+ AM_][XGETTEXT_OPTION([--flag=verror_at_line:5:c-format])])
+ gl_FUNC_VFPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vfprintf-posix])
+ gl_FUNC_VPRINTF_POSIX
+ gl_STDIO_MODULE_INDICATOR([vprintf-posix])
+ gl_WAIT_PROCESS
+ gl_WCHAR_H
+ gl_FUNC_WCRTOMB
+ gl_WCHAR_MODULE_INDICATOR([wcrtomb])
+ gl_WCTYPE_H
+ gl_FUNC_WCWIDTH
+ gl_WCHAR_MODULE_INDICATOR([wcwidth])
+ gl_XALLOC
+ gl_LIST
+ AC_LIBOBJ([xmemdup0])
+ gl_LIST
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=xprintf:1:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xvprintf:1:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xfprintf:2:c-format])
+ AM_][XGETTEXT_OPTION([--flag=xvfprintf:2:c-format])])
+ gl_XSIZE
+ gl_XSTRNDUP
+ gl_XVASPRINTF
+ m4_ifdef([AM_XGETTEXT_OPTION],
+ [AM_][XGETTEXT_OPTION([--flag=xasprintf:1:c-format])])
+ m4_ifval(M4_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([M4_LIBSOURCES_DIR])[ ||
+ for gl_file in ]M4_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([M4_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([M4_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([M4_LIBSOURCES_DIR])
+ m4_popdef([M4_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ M4_libobjs=
+ M4_ltlibobjs=
+ if test -n "$M4_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4_libobjs="$M4_libobjs $i.$ac_objext"
+ M4_ltlibobjs="$M4_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([M4_LIBOBJS], [$M4_libobjs])
+ AC_SUBST([M4_LTLIBOBJS], [$M4_ltlibobjs])
+ ])
+ gltests_libdeps=
+ gltests_ltlibdeps=
+ m4_pushdef([AC_LIBOBJ], m4_defn([M4tests_LIBOBJ]))
+ m4_pushdef([AC_REPLACE_FUNCS], m4_defn([M4tests_REPLACE_FUNCS]))
+ m4_pushdef([AC_LIBSOURCES], m4_defn([M4tests_LIBSOURCES]))
+ m4_pushdef([M4tests_LIBSOURCES_LIST], [])
+ m4_pushdef([M4tests_LIBSOURCES_DIR], [])
+ gl_COMMON
+ gl_source_base='tests/gnu'
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_FR
+ gt_LOCALE_TR_UTF8
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_UNGETC_WORKS
+ gl_FUNC_GETPAGESIZE
+ gl_UNISTD_MODULE_INDICATOR([getpagesize])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_DOUBLE_EXPONENT_LOCATION
+ gl_FLOAT_EXPONENT_LOCATION
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+ gl_FUNC_LINK
+ gl_UNISTD_MODULE_INDICATOR([link])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_ZH_CN
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+ AC_CHECK_DECLS_ONCE([alarm])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gl_FUNC_OBSTACK_PRINTF
+ gl_STDIO_MODULE_INDICATOR([obstack-printf])
+ AC_EGREP_CPP([notposix], [[
+ #if defined _MSC_VER || defined __MINGW32__
+ notposix
+ #endif
+ ]],
+ [posix_spawn_ported=no],
+ [posix_spawn_ported=yes])
+ AM_CONDITIONAL([POSIX_SPAWN_PORTED], [test $posix_spawn_ported = yes])
+ gl_FUNC_PUTENV
+ gl_STDLIB_MODULE_INDICATOR([putenv])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_DOUBLE_EXPONENT_LOCATION])
+ AC_REQUIRE([gl_LONG_DOUBLE_EXPONENT_LOCATION])
+ AC_DEFINE([CHECK_SNPRINTF_POSIX], 1,
+ [Define to 1 for strict checking in test-snprintf.c.])
+ gt_TYPE_WCHAR_T
+ gt_TYPE_WINT_T
+ gl_FUNC_STRDUP_POSIX
+ gl_STRING_MODULE_INDICATOR([strdup])
+ gl_FUNC_SYMLINK
+ gl_UNISTD_MODULE_INDICATOR([symlink])
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ abs_aux_dir=`cd "$ac_aux_dir"; pwd`
+ AC_SUBST([abs_aux_dir])
+ gt_LOCALE_FR
+ gt_LOCALE_FR_UTF8
+ gt_LOCALE_JA
+ gt_LOCALE_ZH_CN
+ gl_FUNC_WCTOB
+ gl_WCHAR_MODULE_INDICATOR([wctob])
+ m4_ifval(M4tests_LIBSOURCES_LIST, [
+ m4_syscmd([test ! -d ]m4_defn([M4tests_LIBSOURCES_DIR])[ ||
+ for gl_file in ]M4tests_LIBSOURCES_LIST[ ; do
+ if test ! -r ]m4_defn([M4tests_LIBSOURCES_DIR])[/$gl_file ; then
+ echo "missing file ]m4_defn([M4tests_LIBSOURCES_DIR])[/$gl_file" >&2
+ exit 1
+ fi
+ done])dnl
+ m4_if(m4_sysval, [0], [],
+ [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])])
+ ])
+ m4_popdef([M4tests_LIBSOURCES_DIR])
+ m4_popdef([M4tests_LIBSOURCES_LIST])
+ m4_popdef([AC_LIBSOURCES])
+ m4_popdef([AC_REPLACE_FUNCS])
+ m4_popdef([AC_LIBOBJ])
+ AC_CONFIG_COMMANDS_PRE([
+ M4tests_libobjs=
+ M4tests_ltlibobjs=
+ if test -n "$M4tests_LIBOBJS"; then
+ # Remove the extension.
+ sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $M4tests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
+ M4tests_libobjs="$M4tests_libobjs $i.$ac_objext"
+ M4tests_ltlibobjs="$M4tests_ltlibobjs $i.lo"
+ done
+ fi
+ AC_SUBST([M4tests_LIBOBJS], [$M4tests_libobjs])
+ AC_SUBST([M4tests_LTLIBOBJS], [$M4tests_ltlibobjs])
+ ])
+ LIBTESTS_LIBDEPS="$gltests_libdeps"
+ AC_SUBST([LIBTESTS_LIBDEPS])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into M4_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([M4_LIBOBJ], [
+ AS_LITERAL_IF([$1], [M4_LIBSOURCES([$1.c])])dnl
+ M4_LIBOBJS="$M4_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into M4_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([M4_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [M4_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([M4_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([M4_LIBSOURCES_DIR], [gnu])
+ m4_append([M4_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+
+# Like AC_LIBOBJ, except that the module name goes
+# into M4tests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([M4tests_LIBOBJ], [
+ AS_LITERAL_IF([$1], [M4tests_LIBSOURCES([$1.c])])dnl
+ M4tests_LIBOBJS="$M4tests_LIBOBJS $1.$ac_objext"
+])
+
+# Like AC_REPLACE_FUNCS, except that the module name goes
+# into M4tests_LIBOBJS instead of into LIBOBJS.
+AC_DEFUN([M4tests_REPLACE_FUNCS], [
+ m4_foreach_w([gl_NAME], [$1], [AC_LIBSOURCES(gl_NAME[.c])])dnl
+ AC_CHECK_FUNCS([$1], , [M4tests_LIBOBJ($ac_func)])
+])
+
+# Like AC_LIBSOURCES, except the directory where the source file is
+# expected is derived from the gnulib-tool parameterization,
+# and alloca is special cased (for the alloca-opt module).
+# We could also entirely rely on EXTRA_lib..._SOURCES.
+AC_DEFUN([M4tests_LIBSOURCES], [
+ m4_foreach([_gl_NAME], [$1], [
+ m4_if(_gl_NAME, [alloca.c], [], [
+ m4_define([M4tests_LIBSOURCES_DIR], [tests/gnu])
+ m4_append([M4tests_LIBSOURCES_LIST], _gl_NAME, [ ])
+ ])
+ ])
+])
+
+# This macro records the list of files which have been installed by
+# gnulib-tool and may be removed by future gnulib-tool invocations.
+AC_DEFUN([M4_FILE_LIST], [
+ build-aux/arg-nonnull.h
+ build-aux/config.rpath
+ build-aux/gendocs.sh
+ build-aux/git-version-gen
+ build-aux/gnupload
+ build-aux/update-copyright
+ build-aux/useless-if-before-free
+ build-aux/vc-list-files
+ build-aux/warn-on-use.h
+ doc/fdl-1.3.texi
+ doc/gendocs_template
+ doc/gpl-3.0.texi
+ doc/regexprops-generic.texi
+ lib/alloca.c
+ lib/alloca.in.h
+ lib/asnprintf.c
+ lib/asprintf.c
+ lib/basename-lgpl.c
+ lib/basename.c
+ lib/binary-io.h
+ lib/bitrotate.h
+ lib/btowc.c
+ lib/c-ctype.c
+ lib/c-ctype.h
+ lib/c-strcase.h
+ lib/c-strcasecmp.c
+ lib/c-strncasecmp.c
+ lib/canonicalize-lgpl.c
+ lib/clean-temp.c
+ lib/clean-temp.h
+ lib/cloexec.c
+ lib/cloexec.h
+ lib/close-stream.c
+ lib/close-stream.h
+ lib/closein.c
+ lib/closein.h
+ lib/closeout.c
+ lib/closeout.h
+ lib/config.charset
+ lib/dirname-lgpl.c
+ lib/dirname.c
+ lib/dirname.h
+ lib/dup-safer-flag.c
+ lib/dup-safer.c
+ lib/dup2.c
+ lib/errno.in.h
+ lib/error.c
+ lib/error.h
+ lib/execute.c
+ lib/execute.h
+ lib/exitfail.c
+ lib/exitfail.h
+ lib/fatal-signal.c
+ lib/fatal-signal.h
+ lib/fcntl.c
+ lib/fcntl.in.h
+ lib/fd-safer-flag.c
+ lib/fd-safer.c
+ lib/fflush.c
+ lib/filenamecat-lgpl.c
+ lib/filenamecat.c
+ lib/filenamecat.h
+ lib/float+.h
+ lib/float.in.h
+ lib/fopen-safer.c
+ lib/fopen.c
+ lib/fpending.c
+ lib/fpending.h
+ lib/fpucw.h
+ lib/fpurge.c
+ lib/freadahead.c
+ lib/freadahead.h
+ lib/freading.c
+ lib/freading.h
+ lib/freadptr.c
+ lib/freadptr.h
+ lib/freadseek.c
+ lib/freadseek.h
+ lib/frexp.c
+ lib/frexpl.c
+ lib/fseeko.c
+ lib/fseterr.c
+ lib/fseterr.h
+ lib/ftello.c
+ lib/getdtablesize.c
+ lib/gettext.h
+ lib/gettimeofday.c
+ lib/gl_anyhash_list1.h
+ lib/gl_anyhash_list2.h
+ lib/gl_anylinked_list1.h
+ lib/gl_anylinked_list2.h
+ lib/gl_anytree_oset.h
+ lib/gl_avltree_oset.c
+ lib/gl_avltree_oset.h
+ lib/gl_linkedhash_list.c
+ lib/gl_linkedhash_list.h
+ lib/gl_list.c
+ lib/gl_list.h
+ lib/gl_oset.c
+ lib/gl_oset.h
+ lib/gl_xlist.c
+ lib/gl_xlist.h
+ lib/gl_xoset.c
+ lib/gl_xoset.h
+ lib/iconv.in.h
+ lib/iconv_open-aix.gperf
+ lib/iconv_open-hpux.gperf
+ lib/iconv_open-irix.gperf
+ lib/iconv_open-osf.gperf
+ lib/iconv_open-solaris.gperf
+ lib/iconv_open.c
+ lib/intprops.h
+ lib/inttypes.in.h
+ lib/isnan.c
+ lib/isnand-nolibm.h
+ lib/isnand.c
+ lib/isnanf-nolibm.h
+ lib/isnanf.c
+ lib/isnanl-nolibm.h
+ lib/isnanl.c
+ lib/langinfo.in.h
+ lib/localcharset.c
+ lib/localcharset.h
+ lib/lseek.c
+ lib/lstat.c
+ lib/malloc.c
+ lib/malloca.c
+ lib/malloca.h
+ lib/malloca.valgrind
+ lib/math.in.h
+ lib/mbchar.c
+ lib/mbchar.h
+ lib/mbiter.h
+ lib/mbrtowc.c
+ lib/mbsinit.c
+ lib/mbslen.c
+ lib/mbsstr.c
+ lib/mbuiter.h
+ lib/memchr.c
+ lib/memchr.valgrind
+ lib/memchr2.c
+ lib/memchr2.h
+ lib/memchr2.valgrind
+ lib/memcmp2.c
+ lib/memcmp2.h
+ lib/memmem.c
+ lib/mkdtemp.c
+ lib/mkstemp-safer.c
+ lib/mkstemp.c
+ lib/nl_langinfo.c
+ lib/obstack.c
+ lib/obstack.h
+ lib/obstack_printf.c
+ lib/open.c
+ lib/pathmax.h
+ lib/pipe-safer.c
+ lib/pipe.c
+ lib/pipe.h
+ lib/pipe2-safer.c
+ lib/pipe2.c
+ lib/printf-args.c
+ lib/printf-args.h
+ lib/printf-frexp.c
+ lib/printf-frexp.h
+ lib/printf-frexpl.c
+ lib/printf-frexpl.h
+ lib/printf-parse.c
+ lib/printf-parse.h
+ lib/progname.c
+ lib/progname.h
+ lib/propername.c
+ lib/propername.h
+ lib/quote.c
+ lib/quote.h
+ lib/quotearg.c
+ lib/quotearg.h
+ lib/rawmemchr.c
+ lib/rawmemchr.valgrind
+ lib/readlink.c
+ lib/ref-add.sin
+ lib/ref-del.sin
+ lib/regcomp.c
+ lib/regex.c
+ lib/regex.h
+ lib/regex_internal.c
+ lib/regex_internal.h
+ lib/regexec.c
+ lib/rename.c
+ lib/rmdir.c
+ lib/same-inode.h
+ lib/sched.in.h
+ lib/setenv.c
+ lib/sig-handler.h
+ lib/sigaction.c
+ lib/signal.in.h
+ lib/signbitd.c
+ lib/signbitf.c
+ lib/signbitl.c
+ lib/sigprocmask.c
+ lib/size_max.h
+ lib/snprintf.c
+ lib/spawn.in.h
+ lib/spawn_faction_addclose.c
+ lib/spawn_faction_adddup2.c
+ lib/spawn_faction_addopen.c
+ lib/spawn_faction_destroy.c
+ lib/spawn_faction_init.c
+ lib/spawn_int.h
+ lib/spawnattr_destroy.c
+ lib/spawnattr_init.c
+ lib/spawnattr_setflags.c
+ lib/spawnattr_setsigmask.c
+ lib/spawni.c
+ lib/spawnp.c
+ lib/sprintf.c
+ lib/stat.c
+ lib/stdarg.in.h
+ lib/stdbool.in.h
+ lib/stddef.in.h
+ lib/stdint.in.h
+ lib/stdio--.h
+ lib/stdio-impl.h
+ lib/stdio-safer.h
+ lib/stdio-write.c
+ lib/stdio.in.h
+ lib/stdlib--.h
+ lib/stdlib-safer.h
+ lib/stdlib.in.h
+ lib/str-kmp.h
+ lib/str-two-way.h
+ lib/strchrnul.c
+ lib/strchrnul.valgrind
+ lib/streq.h
+ lib/strerror.c
+ lib/striconv.c
+ lib/striconv.h
+ lib/string.in.h
+ lib/stripslash.c
+ lib/strndup.c
+ lib/strnlen.c
+ lib/strnlen1.c
+ lib/strnlen1.h
+ lib/strtod.c
+ lib/strtol.c
+ lib/sys_stat.in.h
+ lib/sys_time.in.h
+ lib/sys_wait.in.h
+ lib/tempname.c
+ lib/tempname.h
+ lib/time.in.h
+ lib/tmpdir.c
+ lib/tmpdir.h
+ lib/trim.c
+ lib/trim.h
+ lib/unistd--.h
+ lib/unistd-safer.h
+ lib/unistd.in.h
+ lib/unitypes.h
+ lib/uniwidth.h
+ lib/uniwidth/cjk.h
+ lib/uniwidth/width.c
+ lib/unlocked-io.h
+ lib/unsetenv.c
+ lib/vasnprintf.c
+ lib/vasnprintf.h
+ lib/vasprintf.c
+ lib/verify.h
+ lib/verror.c
+ lib/verror.h
+ lib/vfprintf.c
+ lib/vprintf.c
+ lib/w32spawn.h
+ lib/wait-process.c
+ lib/wait-process.h
+ lib/wchar.in.h
+ lib/wcrtomb.c
+ lib/wctype.in.h
+ lib/wcwidth.c
+ lib/xalloc-die.c
+ lib/xalloc.h
+ lib/xasprintf.c
+ lib/xmalloc.c
+ lib/xmalloca.c
+ lib/xmalloca.h
+ lib/xmemdup0.c
+ lib/xmemdup0.h
+ lib/xprintf.c
+ lib/xprintf.h
+ lib/xsize.h
+ lib/xstriconv.c
+ lib/xstriconv.h
+ lib/xstrndup.c
+ lib/xstrndup.h
+ lib/xvasprintf.c
+ lib/xvasprintf.h
+ m4/00gnulib.m4
+ m4/alloca.m4
+ m4/assert.m4
+ m4/autobuild.m4
+ m4/btowc.m4
+ m4/canonicalize.m4
+ m4/cloexec.m4
+ m4/close-stream.m4
+ m4/closein.m4
+ m4/closeout.m4
+ m4/codeset.m4
+ m4/config-h.m4
+ m4/dirname.m4
+ m4/dos.m4
+ m4/double-slash-root.m4
+ m4/dup2.m4
+ m4/eealloc.m4
+ m4/environ.m4
+ m4/errno_h.m4
+ m4/error.m4
+ m4/execute.m4
+ m4/exitfail.m4
+ m4/exponentd.m4
+ m4/exponentf.m4
+ m4/exponentl.m4
+ m4/extensions.m4
+ m4/fatal-signal.m4
+ m4/fcntl-o.m4
+ m4/fcntl.m4
+ m4/fcntl_h.m4
+ m4/fflush.m4
+ m4/filenamecat.m4
+ m4/flexmember.m4
+ m4/float_h.m4
+ m4/fopen.m4
+ m4/fpending.m4
+ m4/fpieee.m4
+ m4/fpurge.m4
+ m4/freading.m4
+ m4/frexp.m4
+ m4/frexpl.m4
+ m4/fseeko.m4
+ m4/ftello.m4
+ m4/getdtablesize.m4
+ m4/getpagesize.m4
+ m4/gettext.m4
+ m4/gettimeofday.m4
+ m4/gl_list.m4
+ m4/glibc2.m4
+ m4/glibc21.m4
+ m4/gnulib-common.m4
+ m4/iconv.m4
+ m4/iconv_h.m4
+ m4/iconv_open.m4
+ m4/include_next.m4
+ m4/inline.m4
+ m4/intdiv0.m4
+ m4/intl.m4
+ m4/intldir.m4
+ m4/intlmacosx.m4
+ m4/intmax.m4
+ m4/intmax_t.m4
+ m4/inttypes-pri.m4
+ m4/inttypes.m4
+ m4/inttypes_h.m4
+ m4/isnand.m4
+ m4/isnanf.m4
+ m4/isnanl.m4
+ m4/langinfo_h.m4
+ m4/lcmessage.m4
+ m4/ldexpl.m4
+ m4/lib-ld.m4
+ m4/lib-link.m4
+ m4/lib-prefix.m4
+ m4/link.m4
+ m4/localcharset.m4
+ m4/locale-fr.m4
+ m4/locale-ja.m4
+ m4/locale-tr.m4
+ m4/locale-zh.m4
+ m4/lock.m4
+ m4/longlong.m4
+ m4/lseek.m4
+ m4/lstat.m4
+ m4/malloc.m4
+ m4/malloca.m4
+ m4/math_h.m4
+ m4/mbchar.m4
+ m4/mbiter.m4
+ m4/mbrtowc.m4
+ m4/mbsinit.m4
+ m4/mbslen.m4
+ m4/mbstate_t.m4
+ m4/memchr.m4
+ m4/memmem.m4
+ m4/mkdtemp.m4
+ m4/mkstemp.m4
+ m4/mmap-anon.m4
+ m4/mode_t.m4
+ m4/multiarch.m4
+ m4/nl_langinfo.m4
+ m4/nls.m4
+ m4/nocrash.m4
+ m4/obstack-printf-posix.m4
+ m4/obstack-printf.m4
+ m4/open.m4
+ m4/pathmax.m4
+ m4/pipe.m4
+ m4/pipe2.m4
+ m4/po.m4
+ m4/posix_spawn.m4
+ m4/printf-frexp.m4
+ m4/printf-frexpl.m4
+ m4/printf-posix.m4
+ m4/printf.m4
+ m4/progtest.m4
+ m4/putenv.m4
+ m4/quote.m4
+ m4/quotearg.m4
+ m4/rawmemchr.m4
+ m4/readlink.m4
+ m4/regex.m4
+ m4/rename.m4
+ m4/rmdir.m4
+ m4/sched_h.m4
+ m4/setenv.m4
+ m4/sig_atomic_t.m4
+ m4/sigaction.m4
+ m4/signal_h.m4
+ m4/signalblocking.m4
+ m4/signbit.m4
+ m4/size_max.m4
+ m4/snprintf-posix.m4
+ m4/snprintf.m4
+ m4/spawn_h.m4
+ m4/sprintf-posix.m4
+ m4/ssize_t.m4
+ m4/stat.m4
+ m4/stdarg.m4
+ m4/stdbool.m4
+ m4/stddef_h.m4
+ m4/stdint.m4
+ m4/stdint_h.m4
+ m4/stdio-safer.m4
+ m4/stdio_h.m4
+ m4/stdlib-safer.m4
+ m4/stdlib_h.m4
+ m4/strchrnul.m4
+ m4/strdup.m4
+ m4/strerror.m4
+ m4/string_h.m4
+ m4/strndup.m4
+ m4/strnlen.m4
+ m4/strtod.m4
+ m4/strtol.m4
+ m4/symlink.m4
+ m4/sys_stat_h.m4
+ m4/sys_time_h.m4
+ m4/sys_wait_h.m4
+ m4/tempname.m4
+ m4/threadlib.m4
+ m4/time_h.m4
+ m4/tmpdir.m4
+ m4/uintmax_t.m4
+ m4/ungetc.m4
+ m4/unistd-safer.m4
+ m4/unistd_h.m4
+ m4/unlocked-io.m4
+ m4/vasnprintf-posix.m4
+ m4/vasnprintf.m4
+ m4/vasprintf-posix.m4
+ m4/vasprintf.m4
+ m4/vfprintf-posix.m4
+ m4/visibility.m4
+ m4/vprintf-posix.m4
+ m4/wait-process.m4
+ m4/warn-on-use.m4
+ m4/wchar.m4
+ m4/wchar_t.m4
+ m4/wcrtomb.m4
+ m4/wctob.m4
+ m4/wctype.m4
+ m4/wcwidth.m4
+ m4/wint_t.m4
+ m4/xalloc.m4
+ m4/xsize.m4
+ m4/xstrndup.m4
+ m4/xvasprintf.m4
+ tests/init.sh
+ tests/locale/fr/LC_MESSAGES/test-quotearg.mo
+ tests/locale/fr/LC_MESSAGES/test-quotearg.po
+ tests/macros.h
+ tests/nan.h
+ tests/signature.h
+ tests/test-alloca-opt.c
+ tests/test-array_list.c
+ tests/test-array_oset.c
+ tests/test-avltree_oset.c
+ tests/test-binary-io.c
+ tests/test-binary-io.sh
+ tests/test-bitrotate.c
+ tests/test-btowc.c
+ tests/test-btowc1.sh
+ tests/test-btowc2.sh
+ tests/test-c-ctype.c
+ tests/test-c-strcase.sh
+ tests/test-c-strcasecmp.c
+ tests/test-c-strncasecmp.c
+ tests/test-canonicalize-lgpl.c
+ tests/test-cloexec.c
+ tests/test-closein.c
+ tests/test-closein.sh
+ tests/test-dirname.c
+ tests/test-dup-safer.c
+ tests/test-dup2.c
+ tests/test-environ.c
+ tests/test-errno.c
+ tests/test-fcntl-h.c
+ tests/test-fcntl.c
+ tests/test-fflush.c
+ tests/test-fflush2.c
+ tests/test-fflush2.sh
+ tests/test-filenamecat.c
+ tests/test-fopen-safer.c
+ tests/test-fopen.c
+ tests/test-fopen.h
+ tests/test-fpending.c
+ tests/test-fpending.sh
+ tests/test-fprintf-posix.h
+ tests/test-fpurge.c
+ tests/test-freadahead.c
+ tests/test-freadahead.sh
+ tests/test-freading.c
+ tests/test-freadptr.c
+ tests/test-freadptr.sh
+ tests/test-freadptr2.c
+ tests/test-freadptr2.sh
+ tests/test-freadseek.c
+ tests/test-freadseek.sh
+ tests/test-frexp.c
+ tests/test-frexpl.c
+ tests/test-fseeko.c
+ tests/test-fseeko.sh
+ tests/test-fseeko2.sh
+ tests/test-fseterr.c
+ tests/test-ftello.c
+ tests/test-ftello.sh
+ tests/test-ftello2.sh
+ tests/test-getdtablesize.c
+ tests/test-gettimeofday.c
+ tests/test-iconv.c
+ tests/test-inttypes.c
+ tests/test-isnand-nolibm.c
+ tests/test-isnand.h
+ tests/test-isnanf-nolibm.c
+ tests/test-isnanf.h
+ tests/test-isnanl-nolibm.c
+ tests/test-isnanl.h
+ tests/test-langinfo.c
+ tests/test-link.c
+ tests/test-link.h
+ tests/test-linkedhash_list.c
+ tests/test-lseek.c
+ tests/test-lseek.sh
+ tests/test-lstat.c
+ tests/test-lstat.h
+ tests/test-malloca.c
+ tests/test-math.c
+ tests/test-mbrtowc.c
+ tests/test-mbrtowc1.sh
+ tests/test-mbrtowc2.sh
+ tests/test-mbrtowc3.sh
+ tests/test-mbrtowc4.sh
+ tests/test-mbsinit.c
+ tests/test-mbsinit.sh
+ tests/test-mbsstr1.c
+ tests/test-mbsstr2.c
+ tests/test-mbsstr2.sh
+ tests/test-mbsstr3.c
+ tests/test-mbsstr3.sh
+ tests/test-memchr.c
+ tests/test-memchr2.c
+ tests/test-memmem.c
+ tests/test-nl_langinfo.c
+ tests/test-nl_langinfo.sh
+ tests/test-obstack-printf.c
+ tests/test-open.c
+ tests/test-open.h
+ tests/test-pipe.c
+ tests/test-pipe.sh
+ tests/test-pipe2.c
+ tests/test-posix_spawn1.c
+ tests/test-posix_spawn1.in.sh
+ tests/test-posix_spawn2.c
+ tests/test-posix_spawn2.in.sh
+ tests/test-printf-frexp.c
+ tests/test-printf-frexpl.c
+ tests/test-printf-posix.h
+ tests/test-printf-posix.output
+ tests/test-quotearg.c
+ tests/test-quotearg.sh
+ tests/test-rawmemchr.c
+ tests/test-readlink.c
+ tests/test-readlink.h
+ tests/test-rename.c
+ tests/test-rename.h
+ tests/test-rmdir.c
+ tests/test-rmdir.h
+ tests/test-sched.c
+ tests/test-setenv.c
+ tests/test-sigaction.c
+ tests/test-signal.c
+ tests/test-signbit.c
+ tests/test-snprintf-posix.c
+ tests/test-snprintf-posix.h
+ tests/test-snprintf.c
+ tests/test-spawn.c
+ tests/test-sprintf-posix.c
+ tests/test-sprintf-posix.h
+ tests/test-stat.c
+ tests/test-stat.h
+ tests/test-stdbool.c
+ tests/test-stddef.c
+ tests/test-stdint.c
+ tests/test-stdio.c
+ tests/test-stdlib.c
+ tests/test-strchrnul.c
+ tests/test-strerror.c
+ tests/test-striconv.c
+ tests/test-string.c
+ tests/test-strtod.c
+ tests/test-symlink.c
+ tests/test-symlink.h
+ tests/test-sys_stat.c
+ tests/test-sys_time.c
+ tests/test-sys_wait.c
+ tests/test-time.c
+ tests/test-unistd.c
+ tests/test-unsetenv.c
+ tests/test-update-copyright.sh
+ tests/test-vasnprintf-posix.c
+ tests/test-vasnprintf-posix2.c
+ tests/test-vasnprintf-posix2.sh
+ tests/test-vasnprintf.c
+ tests/test-vasprintf-posix.c
+ tests/test-vasprintf.c
+ tests/test-vc-list-files-cvs.sh
+ tests/test-vc-list-files-git.sh
+ tests/test-vfprintf-posix.c
+ tests/test-vfprintf-posix.sh
+ tests/test-vprintf-posix.c
+ tests/test-vprintf-posix.sh
+ tests/test-wchar.c
+ tests/test-wcrtomb.c
+ tests/test-wcrtomb.sh
+ tests/test-wctype.c
+ tests/test-wcwidth.c
+ tests/test-xalloc-die.c
+ tests/test-xalloc-die.sh
+ tests/test-xfprintf-posix.c
+ tests/test-xmemdup0.c
+ tests/test-xprintf-posix.c
+ tests/test-xprintf-posix.sh
+ tests/test-xvasprintf.c
+ tests/uniwidth/test-uc_width.c
+ tests/uniwidth/test-uc_width2.c
+ tests/uniwidth/test-uc_width2.sh
+ tests/zerosize-ptr.h
+ tests=lib/getpagesize.c
+ tests=lib/gl_array_list.c
+ tests=lib/gl_array_list.h
+ tests=lib/gl_array_oset.c
+ tests=lib/gl_array_oset.h
+ tests=lib/ignore-value.h
+ tests=lib/link.c
+ tests=lib/obstack_printf.c
+ tests=lib/putenv.c
+ tests=lib/strdup.c
+ tests=lib/symlink.c
+ tests=lib/wctob.c
+ top/GNUmakefile
+ top/maint.mk
+])
diff --git a/ltdl/m4/gnulib-tool.m4 b/ltdl/m4/gnulib-tool.m4
new file mode 100755
index 00000000..69e7733b
--- /dev/null
+++ b/ltdl/m4/gnulib-tool.m4
@@ -0,0 +1,57 @@
+# gnulib-tool.m4 serial 2
+dnl Copyright (C) 2004-2005, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl The following macros need not be invoked explicitly.
+dnl Invoking them does nothing except to declare default arguments
+dnl for "gnulib-tool --import".
+
+dnl Usage: gl_LOCAL_DIR([DIR])
+AC_DEFUN([gl_LOCAL_DIR], [])
+
+dnl Usage: gl_MODULES([module1 module2 ...])
+AC_DEFUN([gl_MODULES], [])
+
+dnl Usage: gl_AVOID([module1 module2 ...])
+AC_DEFUN([gl_AVOID], [])
+
+dnl Usage: gl_SOURCE_BASE([DIR])
+AC_DEFUN([gl_SOURCE_BASE], [])
+
+dnl Usage: gl_M4_BASE([DIR])
+AC_DEFUN([gl_M4_BASE], [])
+
+dnl Usage: gl_PO_BASE([DIR])
+AC_DEFUN([gl_PO_BASE], [])
+
+dnl Usage: gl_DOC_BASE([DIR])
+AC_DEFUN([gl_DOC_BASE], [])
+
+dnl Usage: gl_TESTS_BASE([DIR])
+AC_DEFUN([gl_TESTS_BASE], [])
+
+dnl Usage: gl_WITH_TESTS
+AC_DEFUN([gl_WITH_TESTS], [])
+
+dnl Usage: gl_LIB([LIBNAME])
+AC_DEFUN([gl_LIB], [])
+
+dnl Usage: gl_LGPL or gl_LGPL([VERSION])
+AC_DEFUN([gl_LGPL], [])
+
+dnl Usage: gl_MAKEFILE_NAME([FILENAME])
+AC_DEFUN([gl_MAKEFILE_NAME], [])
+
+dnl Usage: gl_LIBTOOL
+AC_DEFUN([gl_LIBTOOL], [])
+
+dnl Usage: gl_MACRO_PREFIX([PREFIX])
+AC_DEFUN([gl_MACRO_PREFIX], [])
+
+dnl Usage: gl_PO_DOMAIN([DOMAIN])
+AC_DEFUN([gl_PO_DOMAIN], [])
+
+dnl Usage: gl_VC_FILES([BOOLEAN])
+AC_DEFUN([gl_VC_FILES], [])
diff --git a/ltdl/m4/iconv.m4 b/ltdl/m4/iconv.m4
new file mode 100755
index 00000000..f46ff142
--- /dev/null
+++ b/ltdl/m4/iconv.m4
@@ -0,0 +1,199 @@
+# iconv.m4 serial 9 (gettext-0.18)
+dnl Copyright (C) 2000-2002, 2007-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 Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_func_iconv=yes])
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ [am_cv_lib_iconv=yes]
+ [am_cv_func_iconv=yes])
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
+ dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+ /* Test against Solaris 10 bug: Failures are not distinguishable from
+ successful returns. */
+ {
+ iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
+ if (cd_ascii_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\263";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_ascii_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE([HAVE_ICONV], [1],
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST([LIBICONV])
+ AC_SUBST([LTLIBICONV])
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL([am_cv_proto_iconv], [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([
+ $am_cv_proto_iconv])
+ AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/ltdl/m4/iconv.m4~ b/ltdl/m4/iconv.m4~
new file mode 100644
index 00000000..654c4158
--- /dev/null
+++ b/ltdl/m4/iconv.m4~
@@ -0,0 +1,101 @@
+# iconv.m4 serial AM4 (gettext-0.11.3)
+dnl Copyright (C) 2000-2002 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 Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
diff --git a/ltdl/m4/iconv_h.m4 b/ltdl/m4/iconv_h.m4
new file mode 100755
index 00000000..8881473a
--- /dev/null
+++ b/ltdl/m4/iconv_h.m4
@@ -0,0 +1,37 @@
+# iconv_h.m4 serial 5
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_ICONV_H],
+[
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+
+ dnl Execute this unconditionally, because ICONV_H may be set by other
+ dnl modules, after this code is executed.
+ gl_CHECK_NEXT_HEADERS([iconv.h])
+])
+
+dnl Unconditionally enables the replacement of <iconv.h>.
+AC_DEFUN([gl_REPLACE_ICONV_H],
+[
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ ICONV_H='iconv.h'
+])
+
+AC_DEFUN([gl_ICONV_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_ICONV_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_ICONV=0; AC_SUBST([REPLACE_ICONV])
+ REPLACE_ICONV_OPEN=0; AC_SUBST([REPLACE_ICONV_OPEN])
+ REPLACE_ICONV_UTF=0; AC_SUBST([REPLACE_ICONV_UTF])
+ ICONV_H=''; AC_SUBST([ICONV_H])
+])
diff --git a/ltdl/m4/iconv_open.m4 b/ltdl/m4/iconv_open.m4
new file mode 100755
index 00000000..d6f44fb3
--- /dev/null
+++ b/ltdl/m4/iconv_open.m4
@@ -0,0 +1,238 @@
+# iconv_open.m4 serial 6
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_ICONV_OPEN],
+[
+ AC_REQUIRE([AM_ICONV])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test "$am_cv_func_iconv" = yes; then
+ dnl Test whether iconv_open accepts standardized encoding names.
+ dnl We know that GNU libiconv and GNU libc do.
+ AC_EGREP_CPP([gnu_iconv], [
+ #include <iconv.h>
+ #if defined _LIBICONV_VERSION || defined __GLIBC__
+ gnu_iconv
+ #endif
+ ], [gl_func_iconv_gnu=yes], [gl_func_iconv_gnu=no])
+ if test $gl_func_iconv_gnu = no; then
+ iconv_flavor=
+ case "$host_os" in
+ aix*) iconv_flavor=ICONV_FLAVOR_AIX ;;
+ irix*) iconv_flavor=ICONV_FLAVOR_IRIX ;;
+ hpux*) iconv_flavor=ICONV_FLAVOR_HPUX ;;
+ osf*) iconv_flavor=ICONV_FLAVOR_OSF ;;
+ solaris*) iconv_flavor=ICONV_FLAVOR_SOLARIS ;;
+ esac
+ if test -n "$iconv_flavor"; then
+ AC_DEFINE_UNQUOTED([ICONV_FLAVOR], [$iconv_flavor],
+ [Define to a symbolic name denoting the flavor of iconv_open()
+ implementation.])
+ gl_REPLACE_ICONV_OPEN
+ fi
+ fi
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_ICONV_OPEN],
+[
+ gl_REPLACE_ICONV_H
+ REPLACE_ICONV_OPEN=1
+ AC_LIBOBJ([iconv_open])
+])
+
+AC_DEFUN([gl_FUNC_ICONV_OPEN_UTF],
+[
+ AC_REQUIRE([gl_FUNC_ICONV_OPEN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_ICONV_H_DEFAULTS])
+ if test "$am_cv_func_iconv" = yes; then
+ if test -n "$am_cv_proto_iconv_arg1"; then
+ ICONV_CONST="const"
+ else
+ ICONV_CONST=
+ fi
+ AC_SUBST([ICONV_CONST])
+ AC_CACHE_CHECK([whether iconv supports conversion between UTF-8 and UTF-{16,32}{BE,LE}],
+ [gl_cv_func_iconv_supports_utf],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#define ASSERT(expr) if (!(expr)) return 1;
+int main ()
+{
+ /* Test conversion from UTF-8 to UTF-16BE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "\000J\000a\000p\000a\000n\000e\000s\000e\000 \000(\145\345\147\054\212\236\000)\000 \000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-16BE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-16LE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "J\000a\000p\000a\000n\000e\000s\000e\000 \000(\000\345\145\054\147\236\212)\000 \000[\000\065\330\015\335\065\330\036\335\065\330\055\335]\000";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-16LE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-32BE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "\000\000\000J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000 \000\000\000(\000\000\145\345\000\000\147\054\000\000\212\236\000\000\000)\000\000\000 \000\000\000[\000\001\325\015\000\001\325\036\000\001\325\055\000\000\000]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-32BE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-8 to UTF-32LE with no errors. */
+ {
+ static const char input[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ static const char expected[] =
+ "J\000\000\000a\000\000\000p\000\000\000a\000\000\000n\000\000\000e\000\000\000s\000\000\000e\000\000\000 \000\000\000(\000\000\000\345\145\000\000\054\147\000\000\236\212\000\000)\000\000\000 \000\000\000[\000\000\000\015\325\001\000\036\325\001\000\055\325\001\000]\000\000\000";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-32LE", "UTF-8");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ /* Test conversion from UTF-16BE to UTF-8 with no errors.
+ This test fails on NetBSD 3.0. */
+ {
+ static const char input[] =
+ "\000J\000a\000p\000a\000n\000e\000s\000e\000 \000(\145\345\147\054\212\236\000)\000 \000[\330\065\335\015\330\065\335\036\330\065\335\055\000]";
+ static const char expected[] =
+ "Japanese (\346\227\245\346\234\254\350\252\236) [\360\235\224\215\360\235\224\236\360\235\224\255]";
+ iconv_t cd;
+ char buf[100];
+ const char *inptr;
+ size_t inbytesleft;
+ char *outptr;
+ size_t outbytesleft;
+ size_t res;
+ cd = iconv_open ("UTF-8", "UTF-16BE");
+ ASSERT (cd != (iconv_t)(-1));
+ inptr = input;
+ inbytesleft = sizeof (input) - 1;
+ outptr = buf;
+ outbytesleft = sizeof (buf);
+ res = iconv (cd,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + (sizeof (expected) - 1));
+ ASSERT (memcmp (buf, expected, sizeof (expected) - 1) == 0);
+ ASSERT (iconv_close (cd) == 0);
+ }
+ return 0;
+}], [gl_cv_func_iconv_supports_utf=yes], [gl_cv_func_iconv_supports_utf=no],
+ [
+ dnl We know that GNU libiconv, GNU libc, and Solaris >= 9 do.
+ dnl OSF/1 5.1 has these encodings, but inserts a BOM in the "to"
+ dnl direction.
+ gl_cv_func_iconv_supports_utf=no
+ if test $gl_func_iconv_gnu = yes; then
+ gl_cv_func_iconv_supports_utf=yes
+ else
+changequote(,)dnl
+ case "$host_os" in
+ solaris2.9 | solaris2.1[0-9]) gl_cv_func_iconv_supports_utf=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_iconv_supports_utf = no; then
+ REPLACE_ICONV_UTF=1
+ AC_DEFINE([REPLACE_ICONV_UTF], [1],
+ [Define if the iconv() functions are enhanced to handle the UTF-{16,32}{BE,LE} encodings.])
+ REPLACE_ICONV=1
+ gl_REPLACE_ICONV_OPEN
+ AC_LIBOBJ([iconv])
+ AC_LIBOBJ([iconv_close])
+ fi
+ fi
+])
diff --git a/ltdl/m4/include_next.m4 b/ltdl/m4/include_next.m4
new file mode 100755
index 00000000..c7e0672f
--- /dev/null
+++ b/ltdl/m4/include_next.m4
@@ -0,0 +1,187 @@
+# include_next.m4 serial 14
+dnl Copyright (C) 2006-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 Paul Eggert and Derek Price.
+
+dnl Sets INCLUDE_NEXT and PRAGMA_SYSTEM_HEADER.
+dnl
+dnl INCLUDE_NEXT expands to 'include_next' if the compiler supports it, or to
+dnl 'include' otherwise.
+dnl
+dnl INCLUDE_NEXT_AS_FIRST_DIRECTIVE expands to 'include_next' if the compiler
+dnl supports it in the special case that it is the first include directive in
+dnl the given file, or to 'include' otherwise.
+dnl
+dnl PRAGMA_SYSTEM_HEADER can be used in files that contain #include_next,
+dnl so as to avoid GCC warnings when the gcc option -pedantic is used.
+dnl '#pragma GCC system_header' has the same effect as if the file was found
+dnl through the include search path specified with '-isystem' options (as
+dnl opposed to the search path specified with '-I' options). Namely, gcc
+dnl does not warn about some things, and on some systems (Solaris and Interix)
+dnl __STDC__ evaluates to 0 instead of to 1. The latter is an undesired side
+dnl effect; we are therefore careful to use 'defined __STDC__' or '1' instead
+dnl of plain '__STDC__'.
+
+AC_DEFUN([gl_INCLUDE_NEXT],
+[
+ AC_LANG_PREPROC_REQUIRE()
+ AC_CACHE_CHECK([whether the preprocessor supports include_next],
+ [gl_cv_have_include_next],
+ [rm -rf conftestd1a conftestd1b conftestd2
+ mkdir conftestd1a conftestd1b conftestd2
+ dnl IBM C 9.0, 10.1 (original versions, prior to the 2009-01 updates) on
+ dnl AIX 6.1 support include_next when used as first preprocessor directive
+ dnl in a file, but not when preceded by another include directive. Check
+ dnl for this bug by including <stdio.h>.
+ dnl Additionally, with this same compiler, include_next is a no-op when
+ dnl used in a header file that was included by specifying its absolute
+ dnl file name. Despite these two bugs, include_next is used in the
+ dnl compiler's <math.h>. By virtue of the second bug, we need to use
+ dnl include_next as well in this case.
+ cat <<EOF > conftestd1a/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd1b/conftest.h
+#define DEFINED_IN_CONFTESTD1
+#include <stdio.h>
+#include_next <conftest.h>
+#ifdef DEFINED_IN_CONFTESTD2
+int foo;
+#else
+#error "include_next doesn't work"
+#endif
+EOF
+ cat <<EOF > conftestd2/conftest.h
+#ifndef DEFINED_IN_CONFTESTD1
+#error "include_next test doesn't work"
+#endif
+#define DEFINED_IN_CONFTESTD2
+EOF
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=yes],
+ [CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
+ AC_COMPILE_IFELSE([#include <conftest.h>],
+ [gl_cv_have_include_next=buggy],
+ [gl_cv_have_include_next=no])
+ ])
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ rm -rf conftestd1a conftestd1b conftestd2
+ ])
+ PRAGMA_SYSTEM_HEADER=
+ if test $gl_cv_have_include_next = yes; then
+ INCLUDE_NEXT=include_next
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ if test -n "$GCC"; then
+ PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
+ fi
+ else
+ if test $gl_cv_have_include_next = buggy; then
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
+ else
+ INCLUDE_NEXT=include
+ INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
+ fi
+ fi
+ AC_SUBST([INCLUDE_NEXT])
+ AC_SUBST([INCLUDE_NEXT_AS_FIRST_DIRECTIVE])
+ AC_SUBST([PRAGMA_SYSTEM_HEADER])
+])
+
+# gl_CHECK_NEXT_HEADERS(HEADER1 HEADER2 ...)
+# ------------------------------------------
+# For each arg foo.h, if #include_next works, define NEXT_FOO_H to be
+# '<foo.h>'; otherwise define it to be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# Also, if #include_next works as first preprocessing directive in a file,
+# define NEXT_AS_FIRST_DIRECTIVE_FOO_H to be '<foo.h>'; otherwise define it to
+# be
+# '"///usr/include/foo.h"', or whatever other absolute file name is suitable.
+# That way, a header file with the following line:
+# #@INCLUDE_NEXT@ @NEXT_FOO_H@
+# or
+# #@INCLUDE_NEXT_AS_FIRST_DIRECTIVE@ @NEXT_AS_FIRST_DIRECTIVE_FOO_H@
+# behaves (after sed substitution) as if it contained
+# #include_next <foo.h>
+# even if the compiler does not support include_next.
+# The three "///" are to pacify Sun C 5.8, which otherwise would say
+# "warning: #include of /usr/include/... may be non-portable".
+# Use `""', not `<>', so that the /// cannot be confused with a C99 comment.
+# Note: This macro assumes that the header file is not empty after
+# preprocessing, i.e. it does not only define preprocessor macros but also
+# provides some type/enum definitions or function/variable declarations.
+AC_DEFUN([gl_CHECK_NEXT_HEADERS],
+[
+ AC_REQUIRE([gl_INCLUDE_NEXT])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_HEADERS_ONCE([$1])
+
+ m4_foreach_w([gl_HEADER_NAME], [$1],
+ [AS_VAR_PUSHDEF([gl_next_header],
+ [gl_cv_next_]m4_defn([gl_HEADER_NAME]))
+ if test $gl_cv_have_include_next = yes; then
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ else
+ AC_CACHE_CHECK(
+ [absolute name of <]m4_defn([gl_HEADER_NAME])[>],
+ m4_defn([gl_next_header]),
+ [AS_VAR_PUSHDEF([gl_header_exists],
+ [ac_cv_header_]m4_defn([gl_HEADER_NAME]))
+ if test AS_VAR_GET(gl_header_exists) = yes; then
+ AC_LANG_CONFTEST(
+ [AC_LANG_SOURCE(
+ [[#include <]]m4_dquote(m4_defn([gl_HEADER_NAME]))[[>]]
+ )])
+ dnl AIX "xlc -E" and "cc -E" omit #line directives for header files
+ dnl that contain only a #include of other header files and no
+ dnl non-comment tokens of their own. This leads to a failure to
+ dnl detect the absolute name of <dirent.h>, <signal.h>, <poll.h>
+ dnl and others. The workaround is to force preservation of comments
+ dnl through option -C. This ensures all necessary #line directives
+ dnl are present. GCC supports option -C as well.
+ case "$host_os" in
+ aix*) gl_absname_cpp="$ac_cpp -C" ;;
+ *) gl_absname_cpp="$ac_cpp" ;;
+ esac
+ dnl eval is necessary to expand gl_absname_cpp.
+ dnl Ultrix and Pyramid sh refuse to redirect output of eval,
+ dnl so use subshell.
+ AS_VAR_SET([gl_next_header],
+ ['"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&AS_MESSAGE_LOG_FD |
+ sed -n '\#/]m4_defn([gl_HEADER_NAME])[#{
+ s#.*"\(.*/]m4_defn([gl_HEADER_NAME])[\)".*#\1#
+ s#^/[^/]#//&#
+ p
+ q
+ }'`'"'])
+ else
+ AS_VAR_SET([gl_next_header], ['<'gl_HEADER_NAME'>'])
+ fi
+ AS_VAR_POPDEF([gl_header_exists])])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_]m4_defn([gl_HEADER_NAME])),
+ [AS_VAR_GET([gl_next_header])])
+ if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
+ gl_next_as_first_directive='<'gl_HEADER_NAME'>'
+ else
+ # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
+ gl_next_as_first_directive=AS_VAR_GET([gl_next_header])
+ fi
+ AC_SUBST(
+ AS_TR_CPP([NEXT_AS_FIRST_DIRECTIVE_]m4_defn([gl_HEADER_NAME])),
+ [$gl_next_as_first_directive])
+ AS_VAR_POPDEF([gl_next_header])])
+])
diff --git a/ltdl/m4/inline.m4 b/ltdl/m4/inline.m4
new file mode 100755
index 00000000..4ef768de
--- /dev/null
+++ b/ltdl/m4/inline.m4
@@ -0,0 +1,40 @@
+# inline.m4 serial 4
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Test for the 'inline' keyword or equivalent.
+dnl Define 'inline' to a supported equivalent, or to nothing if not supported,
+dnl like AC_C_INLINE does. Also, define HAVE_INLINE if 'inline' or an
+dnl equivalent is effectively supported, i.e. if the compiler is likely to
+dnl drop unused 'static inline' functions.
+AC_DEFUN([gl_INLINE],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CACHE_CHECK([whether the compiler generally respects inline],
+ [gl_cv_c_inline_effective],
+ [if test $ac_cv_c_inline = no; then
+ gl_cv_c_inline_effective=no
+ else
+ dnl GCC defines __NO_INLINE__ if not optimizing or if -fno-inline is
+ dnl specified.
+ dnl Use AC_COMPILE_IFELSE here, not AC_EGREP_CPP, because the result
+ dnl depends on optimization flags, which can be in CFLAGS.
+ dnl (AC_EGREP_CPP looks only at the CPPFLAGS.)
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[]],
+ [[#ifdef __NO_INLINE__
+ #error "inline is not effective"
+ #endif]])],
+ [gl_cv_c_inline_effective=yes],
+ [gl_cv_c_inline_effective=no])
+ fi
+ ])
+ if test $gl_cv_c_inline_effective = yes; then
+ AC_DEFINE([HAVE_INLINE], [1],
+ [Define to 1 if the compiler supports one of the keywords
+ 'inline', '__inline__', '__inline' and effectively inlines
+ functions marked as such.])
+ fi
+])
diff --git a/ltdl/m4/intdiv0.m4 b/ltdl/m4/intdiv0.m4
new file mode 100755
index 00000000..289c4df5
--- /dev/null
+++ b/ltdl/m4/intdiv0.m4
@@ -0,0 +1,84 @@
+# intdiv0.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2002, 2007-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 Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ gt_cv_int_divbyzero_sigfpe=
+changequote(,)dnl
+ case "$host_os" in
+ macos* | darwin[6-9]* | darwin[1-9][0-9]*)
+ # On MacOS X 10.2 or newer, just assume the same as when cross-
+ # compiling. If we were to perform the real test, 1 Crash Report
+ # dialog window would pop up.
+ case "$host_cpu" in
+ i[34567]86 | x86_64)
+ gt_cv_int_divbyzero_sigfpe="guessing yes" ;;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ if test -z "$gt_cv_int_divbyzero_sigfpe"; then
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+sigfpe_handler (int sig)
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], [gt_cv_int_divbyzero_sigfpe=yes], [gt_cv_int_divbyzero_sigfpe=no],
+ [
+ # Guess based on the CPU.
+changequote(,)dnl
+ case "$host_cpu" in
+ alpha* | i[34567]86 | x86_64 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ fi
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED([INTDIV0_RAISES_SIGFPE], [$value],
+ [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/ltdl/m4/intdiv0.m4~ b/ltdl/m4/intdiv0.m4~
new file mode 100644
index 00000000..b8d78176
--- /dev/null
+++ b/ltdl/m4/intdiv0.m4~
@@ -0,0 +1,70 @@
+# intdiv0.m4 serial 1 (gettext-0.11.3)
+dnl Copyright (C) 2002 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 Bruno Haible.
+
+AC_DEFUN([gt_INTDIV0],
+[
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+
+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
+ gt_cv_int_divbyzero_sigfpe,
+ [
+ AC_TRY_RUN([
+#include <stdlib.h>
+#include <signal.h>
+
+static void
+#ifdef __cplusplus
+sigfpe_handler (int sig)
+#else
+sigfpe_handler (sig) int sig;
+#endif
+{
+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
+ exit (sig != SIGFPE);
+}
+
+int x = 1;
+int y = 0;
+int z;
+int nan;
+
+int main ()
+{
+ signal (SIGFPE, sigfpe_handler);
+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
+ signal (SIGTRAP, sigfpe_handler);
+#endif
+/* Linux/SPARC yields signal SIGILL. */
+#if defined (__sparc__) && defined (__linux__)
+ signal (SIGILL, sigfpe_handler);
+#endif
+
+ z = x / y;
+ nan = y / y;
+ exit (1);
+}
+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
+ [
+ # Guess based on the CPU.
+ case "$host_cpu" in
+ alpha* | i[34567]86 | m68k | s390*)
+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
+ *)
+ gt_cv_int_divbyzero_sigfpe="guessing no";;
+ esac
+ ])
+ ])
+ case "$gt_cv_int_divbyzero_sigfpe" in
+ *yes) value=1;;
+ *) value=0;;
+ esac
+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
+ [Define if integer division by zero raises signal SIGFPE.])
+])
diff --git a/ltdl/m4/intl.m4 b/ltdl/m4/intl.m4
new file mode 100755
index 00000000..5e17fea9
--- /dev/null
+++ b/ltdl/m4/intl.m4
@@ -0,0 +1,285 @@
+# intl.m4 serial 8 (gettext-0.17)
+dnl Copyright (C) 1995-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+AC_PREREQ(2.52)
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([gt_GLIBC2])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([gl_VISIBILITY])dnl
+ AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gt_TYPE_INTMAX_T])
+ AC_REQUIRE([gt_PRINTF_POSIX])
+ AC_REQUIRE([gl_GLIBC21])dnl
+ AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+ AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+ case $gt_cv_func_printf_posix in
+ *yes) HAVE_POSIX_PRINTF=1 ;;
+ *) HAVE_POSIX_PRINTF=0 ;;
+ esac
+ AC_SUBST([HAVE_POSIX_PRINTF])
+ if test "$ac_cv_func_asprintf" = yes; then
+ HAVE_ASPRINTF=1
+ else
+ HAVE_ASPRINTF=0
+ fi
+ AC_SUBST([HAVE_ASPRINTF])
+ if test "$ac_cv_func_snprintf" = yes; then
+ HAVE_SNPRINTF=1
+ else
+ HAVE_SNPRINTF=0
+ fi
+ AC_SUBST([HAVE_SNPRINTF])
+ if test "$ac_cv_func_wprintf" = yes; then
+ HAVE_WPRINTF=1
+ else
+ HAVE_WPRINTF=0
+ fi
+ AC_SUBST([HAVE_WPRINTF])
+
+ AM_LANGINFO_CODESET
+ gt_LC_MESSAGES
+
+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+ dnl 1. when we install a shared library, we must arrange to export
+ dnl auxiliary pointer variables for every exported variable,
+ dnl 2. when we install a shared library and a static library simultaneously,
+ dnl the include file specifies __declspec(dllimport) and therefore we
+ dnl must arrange to define the auxiliary pointer variables for the
+ dnl exported variables _also_ in the static library.
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+ is_woe32dll=no
+ fi
+ WOE32DLL=$is_woe32dll
+ AC_SUBST([WOE32DLL])
+
+ dnl On mingw and Cygwin, we can activate special Makefile rules which add
+ dnl version information to the shared libraries and executables.
+ case "$host_os" in
+ mingw* | cygwin*) is_woe32=yes ;;
+ *) is_woe32=no ;;
+ esac
+ WOE32=$is_woe32
+ AC_SUBST([WOE32])
+ if test $WOE32 = yes; then
+ dnl Check for a program that compiles Windows resource files.
+ AC_CHECK_TOOL([WINDRES], [windres])
+ fi
+
+ dnl Determine whether when creating a library, "-lc" should be passed to
+ dnl libtool or not. On many platforms, it is required for the libtool option
+ dnl -no-undefined to work. On HP-UX, however, the -lc - stored by libtool
+ dnl in the *.la files - makes it impossible to create multithreaded programs,
+ dnl because libtool also reorders the -lc to come before the -pthread, and
+ dnl this disables pthread_create() <http://docs.hp.com/en/1896/pthreads.html>.
+ case "$host_os" in
+ hpux*) LTLIBC="" ;;
+ *) LTLIBC="-lc" ;;
+ esac
+ AC_SUBST([LTLIBC])
+
+ dnl Rename some macros and functions used for locking.
+ AH_BOTTOM([
+#define __libc_lock_t gl_lock_t
+#define __libc_lock_define gl_lock_define
+#define __libc_lock_define_initialized gl_lock_define_initialized
+#define __libc_lock_init gl_lock_init
+#define __libc_lock_lock gl_lock_lock
+#define __libc_lock_unlock gl_lock_unlock
+#define __libc_lock_recursive_t gl_recursive_lock_t
+#define __libc_lock_define_recursive gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive gl_recursive_lock_init
+#define __libc_lock_lock_recursive gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
+#define glthread_in_use libintl_thread_in_use
+#define glthread_lock_init libintl_lock_init
+#define glthread_lock_lock libintl_lock_lock
+#define glthread_lock_unlock libintl_lock_unlock
+#define glthread_lock_destroy libintl_lock_destroy
+#define glthread_rwlock_init libintl_rwlock_init
+#define glthread_rwlock_rdlock libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock libintl_rwlock_wrlock
+#define glthread_rwlock_unlock libintl_rwlock_unlock
+#define glthread_rwlock_destroy libintl_rwlock_destroy
+#define glthread_recursive_lock_init libintl_recursive_lock_init
+#define glthread_recursive_lock_lock libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
+#define glthread_once libintl_once
+#define glthread_once_call libintl_once_call
+#define glthread_once_singlethreaded libintl_once_singlethreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl dcigettext.c
+dnl eval-plural.h
+dnl explodename.c
+dnl finddomain.c
+dnl gettextP.h
+dnl gmo.h
+dnl hash-string.h hash-string.c
+dnl l10nflist.c
+dnl libgnuintl.h.in (except the *printf stuff)
+dnl loadinfo.h
+dnl loadmsgcat.c
+dnl localealias.c
+dnl log.c
+dnl plural-exp.h plural-exp.c
+dnl plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+ AC_REQUIRE([gl_LOCK])dnl
+
+ AC_TRY_LINK(
+ [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+ [],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
+ AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+ argz_next __fsetlocking])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+ AM_ICONV
+
+ dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+ dnl and a _NL_LOCALE_NAME macro always.
+ AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+ [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+ [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));
+ return !cs;
+ ],
+ gt_cv_nl_locale_name=yes,
+ gt_cv_nl_locale_name=no)
+ ])
+ if test $gt_cv_nl_locale_name = yes; then
+ AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+ [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+ [AC_TRY_COMPILE([$2], [
+#ifndef $1
+ char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+ if test $ac_cv_have_decl_$1 = yes; then
+ gt_value=1
+ else
+ gt_value=0
+ fi
+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
diff --git a/ltdl/m4/intl.m4~ b/ltdl/m4/intl.m4~
new file mode 100644
index 00000000..dcefb118
--- /dev/null
+++ b/ltdl/m4/intl.m4~
@@ -0,0 +1,259 @@
+# intl.m4 serial 3 (gettext-0.16)
+dnl Copyright (C) 1995-2006 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+AC_PREREQ(2.52)
+
+dnl Checks for all prerequisites of the intl subdirectory,
+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
+AC_DEFUN([AM_INTL_SUBDIR],
+[
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AC_PROG_CC])dnl
+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
+ AC_REQUIRE([gt_GLIBC2])dnl
+ AC_REQUIRE([AC_PROG_RANLIB])dnl
+ AC_REQUIRE([gl_VISIBILITY])dnl
+ AC_REQUIRE([gt_INTL_SUBDIR_CORE])dnl
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])dnl
+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gt_TYPE_INTMAX_T])
+ AC_REQUIRE([gt_PRINTF_POSIX])
+ AC_REQUIRE([gl_GLIBC21])dnl
+ AC_REQUIRE([gl_XSIZE])dnl
+ AC_REQUIRE([gt_INTL_MACOSX])dnl
+
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_CHECK_HEADERS([stddef.h stdlib.h string.h])
+ AC_CHECK_FUNCS([asprintf fwprintf putenv setenv setlocale snprintf wcslen])
+
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
+
+ case $gt_cv_func_printf_posix in
+ *yes) HAVE_POSIX_PRINTF=1 ;;
+ *) HAVE_POSIX_PRINTF=0 ;;
+ esac
+ AC_SUBST([HAVE_POSIX_PRINTF])
+ if test "$ac_cv_func_asprintf" = yes; then
+ HAVE_ASPRINTF=1
+ else
+ HAVE_ASPRINTF=0
+ fi
+ AC_SUBST([HAVE_ASPRINTF])
+ if test "$ac_cv_func_snprintf" = yes; then
+ HAVE_SNPRINTF=1
+ else
+ HAVE_SNPRINTF=0
+ fi
+ AC_SUBST([HAVE_SNPRINTF])
+ if test "$ac_cv_func_wprintf" = yes; then
+ HAVE_WPRINTF=1
+ else
+ HAVE_WPRINTF=0
+ fi
+ AC_SUBST([HAVE_WPRINTF])
+
+ AM_LANGINFO_CODESET
+ gt_LC_MESSAGES
+
+ dnl Compilation on mingw and Cygwin needs special Makefile rules, because
+ dnl 1. when we install a shared library, we must arrange to export
+ dnl auxiliary pointer variables for every exported variable,
+ dnl 2. when we install a shared library and a static library simultaneously,
+ dnl the include file specifies __declspec(dllimport) and therefore we
+ dnl must arrange to define the auxiliary pointer variables for the
+ dnl exported variables _also_ in the static library.
+ if test "$enable_shared" = yes; then
+ case "$host_os" in
+ cygwin*) is_woe32dll=yes ;;
+ *) is_woe32dll=no ;;
+ esac
+ else
+ is_woe32dll=no
+ fi
+ WOE32DLL=$is_woe32dll
+ AC_SUBST([WOE32DLL])
+
+ dnl Rename some macros and functions used for locking.
+ AH_BOTTOM([
+#define __libc_lock_t gl_lock_t
+#define __libc_lock_define gl_lock_define
+#define __libc_lock_define_initialized gl_lock_define_initialized
+#define __libc_lock_init gl_lock_init
+#define __libc_lock_lock gl_lock_lock
+#define __libc_lock_unlock gl_lock_unlock
+#define __libc_lock_recursive_t gl_recursive_lock_t
+#define __libc_lock_define_recursive gl_recursive_lock_define
+#define __libc_lock_define_initialized_recursive gl_recursive_lock_define_initialized
+#define __libc_lock_init_recursive gl_recursive_lock_init
+#define __libc_lock_lock_recursive gl_recursive_lock_lock
+#define __libc_lock_unlock_recursive gl_recursive_lock_unlock
+#define glthread_in_use libintl_thread_in_use
+#define glthread_lock_init libintl_lock_init
+#define glthread_lock_lock libintl_lock_lock
+#define glthread_lock_unlock libintl_lock_unlock
+#define glthread_lock_destroy libintl_lock_destroy
+#define glthread_rwlock_init libintl_rwlock_init
+#define glthread_rwlock_rdlock libintl_rwlock_rdlock
+#define glthread_rwlock_wrlock libintl_rwlock_wrlock
+#define glthread_rwlock_unlock libintl_rwlock_unlock
+#define glthread_rwlock_destroy libintl_rwlock_destroy
+#define glthread_recursive_lock_init libintl_recursive_lock_init
+#define glthread_recursive_lock_lock libintl_recursive_lock_lock
+#define glthread_recursive_lock_unlock libintl_recursive_lock_unlock
+#define glthread_recursive_lock_destroy libintl_recursive_lock_destroy
+#define glthread_once libintl_once
+#define glthread_once_call libintl_once_call
+#define glthread_once_singlethreaded libintl_once_singlethreaded
+])
+])
+
+
+dnl Checks for the core files of the intl subdirectory:
+dnl dcigettext.c
+dnl eval-plural.h
+dnl explodename.c
+dnl finddomain.c
+dnl gettextP.h
+dnl gmo.h
+dnl hash-string.h hash-string.c
+dnl l10nflist.c
+dnl libgnuintl.h.in (except the *printf stuff)
+dnl loadinfo.h
+dnl loadmsgcat.c
+dnl localealias.c
+dnl log.c
+dnl plural-exp.h plural-exp.c
+dnl plural.y
+dnl Used by libglocale.
+AC_DEFUN([gt_INTL_SUBDIR_CORE],
+[
+ AC_REQUIRE([AC_C_INLINE])dnl
+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+ AC_REQUIRE([AC_FUNC_MMAP])dnl
+ AC_REQUIRE([gt_INTDIV0])dnl
+ AC_REQUIRE([gl_AC_TYPE_UINTMAX_T])dnl
+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
+ AC_REQUIRE([gl_LOCK])dnl
+
+ AC_TRY_LINK(
+ [int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; }],
+ [],
+ [AC_DEFINE([HAVE_BUILTIN_EXPECT], 1,
+ [Define to 1 if the compiler understands __builtin_expect.])])
+
+ AC_CHECK_HEADERS([argz.h inttypes.h limits.h unistd.h sys/param.h])
+ AC_CHECK_FUNCS([getcwd getegid geteuid getgid getuid mempcpy munmap \
+ stpcpy strcasecmp strdup strtoul tsearch argz_count argz_stringify \
+ argz_next __fsetlocking])
+
+ dnl Use the *_unlocked functions only if they are declared.
+ dnl (because some of them were defined without being declared in Solaris
+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
+
+ AM_ICONV
+
+ dnl glibc >= 2.4 has a NL_LOCALE_NAME macro when _GNU_SOURCE is defined,
+ dnl and a _NL_LOCALE_NAME macro always.
+ AC_CACHE_CHECK([for NL_LOCALE_NAME macro], gt_cv_nl_locale_name,
+ [AC_TRY_LINK([#include <langinfo.h>
+#include <locale.h>],
+ [char* cs = nl_langinfo(_NL_LOCALE_NAME(LC_MESSAGES));],
+ gt_cv_nl_locale_name=yes,
+ gt_cv_nl_locale_name=no)
+ ])
+ if test $gt_cv_nl_locale_name = yes; then
+ AC_DEFINE(HAVE_NL_LOCALE_NAME, 1,
+ [Define if you have <langinfo.h> and it defines the NL_LOCALE_NAME macro if _GNU_SOURCE is defined.])
+ fi
+
+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+ dnl because plural.y uses bison specific features. It requires at least
+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+ dnl compile.
+ dnl bison is only needed for the maintainer (who touches plural.y). But in
+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+ dnl the rule in general Makefile. Now, some people carelessly touch the
+ dnl files or have a broken "make" program, hence the plural.c rule will
+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+ dnl present or too old.
+ AC_CHECK_PROGS([INTLBISON], [bison])
+ if test -z "$INTLBISON"; then
+ ac_verc_fail=yes
+ else
+ dnl Found it, now check the version.
+ AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+ case $ac_prog_version in
+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+ esac
+ AC_MSG_RESULT([$ac_prog_version])
+ fi
+ if test $ac_verc_fail = yes; then
+ INTLBISON=:
+ fi
+])
+
+
+dnl gt_CHECK_DECL(FUNC, INCLUDES)
+dnl Check whether a function is declared.
+AC_DEFUN([gt_CHECK_DECL],
+[
+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
+ [AC_TRY_COMPILE([$2], [
+#ifndef $1
+ char *p = (char *) $1;
+#endif
+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
+ if test $ac_cv_have_decl_$1 = yes; then
+ gt_value=1
+ else
+ gt_value=0
+ fi
+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
+])
diff --git a/ltdl/m4/intldir.m4 b/ltdl/m4/intldir.m4
new file mode 100755
index 00000000..744c0bc7
--- /dev/null
+++ b/ltdl/m4/intldir.m4
@@ -0,0 +1,19 @@
+# intldir.m4 serial 2 (gettext-0.18)
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+AC_PREREQ([2.52])
+
+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/ltdl/m4/intldir.m4~ b/ltdl/m4/intldir.m4~
new file mode 100644
index 00000000..7a28843f
--- /dev/null
+++ b/ltdl/m4/intldir.m4~
@@ -0,0 +1,19 @@
+# intldir.m4 serial 1 (gettext-0.16)
+dnl Copyright (C) 2006 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+AC_PREREQ(2.52)
+
+dnl Tells the AM_GNU_GETTEXT macro to consider an intl/ directory.
+AC_DEFUN([AM_GNU_GETTEXT_INTL_SUBDIR], [])
diff --git a/ltdl/m4/intlmacosx.m4 b/ltdl/m4/intlmacosx.m4
new file mode 100755
index 00000000..dd910259
--- /dev/null
+++ b/ltdl/m4/intlmacosx.m4
@@ -0,0 +1,51 @@
+# intlmacosx.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2004-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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ [gt_cv_func_CFPreferencesCopyAppValue],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], [1],
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], [gt_cv_func_CFLocaleCopyCurrent],
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], [1],
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
diff --git a/ltdl/m4/intmax.m4 b/ltdl/m4/intmax.m4
new file mode 100755
index 00000000..74aaaf5e
--- /dev/null
+++ b/ltdl/m4/intmax.m4
@@ -0,0 +1,33 @@
+# intmax.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 2002-2005, 2008-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 Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;
+ return !x;],
+ [gt_cv_c_intmax_t=yes],
+ [gt_cv_c_intmax_t=no])])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/ltdl/m4/intmax.m4~ b/ltdl/m4/intmax.m4~
new file mode 100644
index 00000000..ce7a8a49
--- /dev/null
+++ b/ltdl/m4/intmax.m4~
@@ -0,0 +1,33 @@
+# intmax.m4 serial 3 (gettext-0.16)
+dnl Copyright (C) 2002-2005 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 Bruno Haible.
+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
+dnl find a replacement if it is lacking.
+
+AC_DEFUN([gt_TYPE_INTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1;
+ return !x;],
+ gt_cv_c_intmax_t=yes,
+ gt_cv_c_intmax_t=no)])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE(HAVE_INTMAX_T, 1,
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/ltdl/m4/intmax_t.m4 b/ltdl/m4/intmax_t.m4
new file mode 100755
index 00000000..975caac5
--- /dev/null
+++ b/ltdl/m4/intmax_t.m4
@@ -0,0 +1,62 @@
+# intmax_t.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006-2007, 2009-2010 Free Software Foundation,
+dnl 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 Paul Eggert.
+
+AC_PREREQ([2.13])
+
+# Define intmax_t to 'long' or 'long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_INTMAX_T],
+[
+ dnl For simplicity, we assume that a header file defines 'intmax_t' if and
+ dnl only if it defines 'uintmax_t'.
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+ [Define to long or long long if <inttypes.h> and <stdint.h> don't define.])
+ else
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
+
+dnl An alternative would be to explicitly test for 'intmax_t'.
+
+AC_DEFUN([gt_AC_TYPE_INTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_CACHE_CHECK([for intmax_t], [gt_cv_c_intmax_t],
+ [AC_TRY_COMPILE([
+#include <stddef.h>
+#include <stdlib.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+#include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+#include <inttypes.h>
+#endif
+], [intmax_t x = -1; return !x;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
+ if test $gt_cv_c_intmax_t = yes; then
+ AC_DEFINE([HAVE_INTMAX_T], [1],
+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
+ else
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ test $ac_cv_type_long_long_int = yes \
+ && ac_type='long long' \
+ || ac_type='long'
+ AC_DEFINE_UNQUOTED([intmax_t], [$ac_type],
+ [Define to long or long long if <stdint.h> and <inttypes.h> don't define.])
+ fi
+])
diff --git a/ltdl/m4/inttypes-pri.m4 b/ltdl/m4/inttypes-pri.m4
new file mode 100755
index 00000000..718a4f4e
--- /dev/null
+++ b/ltdl/m4/inttypes-pri.m4
@@ -0,0 +1,36 @@
+# inttypes-pri.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1997-2002, 2006, 2008-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 Bruno Haible.
+
+AC_PREREQ([2.52])
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ [gt_cv_inttypes_pri_broken],
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], [gt_cv_inttypes_pri_broken=no], [gt_cv_inttypes_pri_broken=yes])
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED([PRI_MACROS_BROKEN], [1],
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/ltdl/m4/inttypes-pri.m4~ b/ltdl/m4/inttypes-pri.m4~
new file mode 100644
index 00000000..7c7f8940
--- /dev/null
+++ b/ltdl/m4/inttypes-pri.m4~
@@ -0,0 +1,36 @@
+# inttypes-pri.m4 serial 4 (gettext-0.16)
+dnl Copyright (C) 1997-2002, 2006 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 Bruno Haible.
+
+AC_PREREQ(2.52)
+
+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
+# macros to non-string values. This is the case on AIX 4.3.3.
+
+AC_DEFUN([gt_INTTYPES_PRI],
+[
+ AC_CHECK_HEADERS([inttypes.h])
+ if test $ac_cv_header_inttypes_h = yes; then
+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
+ gt_cv_inttypes_pri_broken,
+ [
+ AC_TRY_COMPILE([#include <inttypes.h>
+#ifdef PRId32
+char *p = PRId32;
+#endif
+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
+ ])
+ fi
+ if test "$gt_cv_inttypes_pri_broken" = yes; then
+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
+ PRI_MACROS_BROKEN=1
+ else
+ PRI_MACROS_BROKEN=0
+ fi
+ AC_SUBST([PRI_MACROS_BROKEN])
+])
diff --git a/ltdl/m4/inttypes.m4 b/ltdl/m4/inttypes.m4
new file mode 100755
index 00000000..3ee174dc
--- /dev/null
+++ b/ltdl/m4/inttypes.m4
@@ -0,0 +1,302 @@
+# inttypes.m4 serial 17
+dnl Copyright (C) 2006-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 Derek Price, Bruno Haible.
+dnl Test whether <inttypes.h> is supported or must be substituted.
+
+AC_DEFUN([gl_INTTYPES_H],
+[
+ AC_REQUIRE([gl_STDINT_H])
+ AC_REQUIRE([gt_INTTYPES_PRI])
+ AC_CHECK_HEADERS_ONCE([inttypes.h])
+ AC_CHECK_DECLS_ONCE([imaxabs])
+ AC_CHECK_DECLS_ONCE([imaxdiv])
+ AC_CHECK_DECLS_ONCE([strtoimax])
+ AC_CHECK_DECLS_ONCE([strtoumax])
+
+ dnl Now see if we need a substitute <inttypes.h>.
+ dnl A complete <inttypes.h> requires
+ dnl - a complete <stdint.h>,
+ dnl - the existence of an <inttypes.h>,
+ dnl - that imaxabs, imaxdiv, strtoimax, strtoumax are declared,
+ dnl - some additional tests.
+ AC_CACHE_CHECK([whether inttypes.h conforms to C99],
+ [gl_cv_header_working_inttypes_h],
+ [gl_cv_header_working_inttypes_h=no
+ if test "$gl_cv_header_working_stdint_h" = yes \
+ && test $ac_cv_header_inttypes_h = yes \
+ && test "$ac_cv_have_decl_imaxabs" = yes \
+ && test "$ac_cv_have_decl_imaxdiv" = yes \
+ && test "$ac_cv_have_decl_strtoimax" = yes \
+ && test "$ac_cv_have_decl_strtoumax" = yes; then
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#include <stddef.h>
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_INTTYPES_H /* work if build isn't clean */
+#include <inttypes.h>
+
+/* No need to duplicate the tests of stdint.m4; they are subsumed by
+ $gl_cv_header_working_stdint_h = yes. */
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+ ]])],
+ [gl_cv_header_working_inttypes_h=yes])
+ fi])
+
+ dnl Override <inttypes.h> always, so that the portability warnings work.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([inttypes.h])
+
+ AC_REQUIRE([gl_MULTIARCH])
+
+ dnl Ensure that <stdint.h> defines the limit macros, since gnulib's
+ dnl <inttypes.h> relies on them. This macro is only needed when a
+ dnl C++ compiler is in use; it has no effect for a C compiler.
+ dnl Also be careful to define __STDC_LIMIT_MACROS only when gnulib's
+ dnl <inttypes.h> is going to be created, and to avoid redefinition warnings
+ dnl if the __STDC_LIMIT_MACROS is already defined through the CPPFLAGS.
+ AC_DEFINE([GL_TRIGGER_STDC_LIMIT_MACROS], [1],
+ [Define to make the limit macros in <stdint.h> visible.])
+ AH_VERBATIM([__STDC_LIMIT_MACROS_ZZZ],
+[/* Ensure that <stdint.h> defines the limit macros, since gnulib's
+ <inttypes.h> relies on them. */
+#if defined __cplusplus && !defined __STDC_LIMIT_MACROS && GL_TRIGGER_STDC_LIMIT_MACROS
+# define __STDC_LIMIT_MACROS 1
+#endif
+])
+
+ PRIPTR_PREFIX=
+ if test -n "$STDINT_H"; then
+ dnl Using the gnulib <stdint.h>. It always defines intptr_t to 'long'.
+ PRIPTR_PREFIX='"l"'
+ else
+ dnl Using the system's <stdint.h>.
+ for glpfx in '' l ll I64; do
+ case $glpfx in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ I64) gltype1='__int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <stdint.h>
+ extern intptr_t foo;
+ extern $gltype1 foo;]])],
+ [PRIPTR_PREFIX='"'$glpfx'"'])
+ test -n "$PRIPTR_PREFIX" && break
+ done
+ fi
+ AC_SUBST([PRIPTR_PREFIX])
+
+ if test "$ac_cv_have_decl_imaxabs" = yes; then
+ HAVE_DECL_IMAXABS=1
+ else
+ HAVE_DECL_IMAXABS=0
+ fi
+
+ if test "$ac_cv_have_decl_imaxdiv" = yes; then
+ HAVE_DECL_IMAXDIV=1
+ else
+ HAVE_DECL_IMAXDIV=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoimax" = yes; then
+ HAVE_DECL_STRTOIMAX=1
+ else
+ HAVE_DECL_STRTOIMAX=0
+ fi
+
+ if test "$ac_cv_have_decl_strtoumax" = yes; then
+ HAVE_DECL_STRTOUMAX=1
+ else
+ HAVE_DECL_STRTOUMAX=0
+ fi
+
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT32_MAX_LT_INTMAX_MAX],
+ [defined INT32_MAX && defined INTMAX_MAX],
+ [INT32_MAX < INTMAX_MAX],
+ [sizeof (int) < sizeof (long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [INT64_MAX_EQ_LONG_MAX],
+ [defined INT64_MAX],
+ [INT64_MAX == LONG_MAX],
+ [sizeof (long long int) == sizeof (long int)])
+ else
+ INT64_MAX_EQ_LONG_MAX=-1
+ fi
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT32_MAX_LT_UINTMAX_MAX],
+ [defined UINT32_MAX && defined UINTMAX_MAX],
+ [UINT32_MAX < UINTMAX_MAX],
+ [sizeof (unsigned int) < sizeof (unsigned long long int)])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION(
+ [UINT64_MAX_EQ_ULONG_MAX],
+ [defined UINT64_MAX],
+ [UINT64_MAX == ULONG_MAX],
+ [sizeof (unsigned long long int) == sizeof (unsigned long int)])
+ else
+ UINT64_MAX_EQ_ULONG_MAX=-1
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <inttypes.h>
+ ]], [imaxabs imaxdiv strtoimax strtoumax])
+])
+
+# Define the symbol $1 to be 1 if the condition is true, 0 otherwise.
+# If $2 is true, the condition is $3; otherwise if long long int is supported
+# approximate the condition with $4; otherwise, assume the condition is false.
+# The condition should work on all C99 platforms; the approximations should be
+# good enough to work on all practical pre-C99 platforms.
+# $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants.
+AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION],
+[
+ AC_CACHE_CHECK([whether $3],
+ [gl_cv_test_$1],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[/* Work also in C++ mode. */
+ #define __STDC_LIMIT_MACROS 1
+
+ /* Work if build is not clean. */
+ #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
+
+ #include <limits.h>
+ #if HAVE_STDINT_H
+ #include <stdint.h>
+ #endif
+
+ #if $2
+ #define CONDITION ($3)
+ #elif HAVE_LONG_LONG_INT
+ #define CONDITION ($4)
+ #else
+ #define CONDITION 0
+ #endif
+ int test[CONDITION ? 1 : -1];]])],
+ [gl_cv_test_$1=yes],
+ [gl_cv_test_$1=no])])
+ if test $gl_cv_test_$1 = yes; then
+ $1=1;
+ else
+ $1=0;
+ fi
+ AC_SUBST([$1])
+])
+
+AC_DEFUN([gl_INTTYPES_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_INTTYPES_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_INTTYPES_H_DEFAULTS],
+[
+ GNULIB_IMAXABS=0; AC_SUBST([GNULIB_IMAXABS])
+ GNULIB_IMAXDIV=0; AC_SUBST([GNULIB_IMAXDIV])
+ GNULIB_STRTOIMAX=0; AC_SUBST([GNULIB_STRTOIMAX])
+ GNULIB_STRTOUMAX=0; AC_SUBST([GNULIB_STRTOUMAX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_IMAXABS=1; AC_SUBST([HAVE_DECL_IMAXABS])
+ HAVE_DECL_IMAXDIV=1; AC_SUBST([HAVE_DECL_IMAXDIV])
+ HAVE_DECL_STRTOIMAX=1; AC_SUBST([HAVE_DECL_STRTOIMAX])
+ HAVE_DECL_STRTOUMAX=1; AC_SUBST([HAVE_DECL_STRTOUMAX])
+])
diff --git a/ltdl/m4/inttypes_h.m4 b/ltdl/m4/inttypes_h.m4
new file mode 100755
index 00000000..782d77ed
--- /dev/null
+++ b/ltdl/m4/inttypes_h.m4
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 9
+dnl Copyright (C) 1997-2004, 2006, 2008-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 Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], [gl_cv_header_inttypes_h],
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ [gl_cv_header_inttypes_h=yes],
+ [gl_cv_header_inttypes_h=no])])
+ if test $gl_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_INTTYPES_H_WITH_UINTMAX], [1],
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/ltdl/m4/inttypes_h.m4~ b/ltdl/m4/inttypes_h.m4~
new file mode 100644
index 00000000..edc8ecb2
--- /dev/null
+++ b/ltdl/m4/inttypes_h.m4~
@@ -0,0 +1,26 @@
+# inttypes_h.m4 serial 7
+dnl Copyright (C) 1997-2004, 2006 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 Paul Eggert.
+
+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_INTTYPES_H],
+[
+ AC_CACHE_CHECK([for inttypes.h], gl_cv_header_inttypes_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <inttypes.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ gl_cv_header_inttypes_h=yes,
+ gl_cv_header_inttypes_h=no)])
+ if test $gl_cv_header_inttypes_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/ltdl/m4/isnand.m4 b/ltdl/m4/isnand.m4
new file mode 100755
index 00000000..cd916284
--- /dev/null
+++ b/ltdl/m4/isnand.m4
@@ -0,0 +1,95 @@
+# isnand.m4 serial 6
+dnl Copyright (C) 2007-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 Check how to get or define isnand().
+
+AC_DEFUN([gl_FUNC_ISNAND],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNAND_LIBM=
+ gl_HAVE_ISNAND_NO_LIBM
+ if test $gl_cv_func_isnand_no_libm = no; then
+ gl_HAVE_ISNAND_IN_LIBM
+ if test $gl_cv_func_isnand_in_libm = yes; then
+ ISNAND_LIBM=-lm
+ fi
+ fi
+ dnl The variable gl_func_isnand set here is used by isnan.m4.
+ if test $gl_cv_func_isnand_no_libm = yes \
+ || test $gl_cv_func_isnand_in_libm = yes; then
+ gl_func_isnand=yes
+ else
+ gl_func_isnand=no
+ HAVE_ISNAND=0
+ gl_BUILD_ISNAND
+ fi
+ AC_SUBST([ISNAND_LIBM])
+])
+
+dnl Check how to get or define isnand() without linking with libm.
+
+AC_DEFUN([gl_FUNC_ISNAND_NO_LIBM],
+[
+ gl_HAVE_ISNAND_NO_LIBM
+ if test $gl_cv_func_isnand_no_libm = yes; then
+ AC_DEFINE([HAVE_ISNAND_IN_LIBC], [1],
+ [Define if the isnan(double) function is available in libc.])
+ else
+ gl_BUILD_ISNAND
+ fi
+])
+
+dnl Pull in replacement isnand definition. It does not need -lm.
+AC_DEFUN([gl_BUILD_ISNAND],
+[
+ AC_LIBOBJ([isnand])
+ gl_DOUBLE_EXPONENT_LOCATION
+])
+
+dnl Test whether isnand() can be used with libm.
+
+AC_DEFUN([gl_HAVE_ISNAND_IN_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(double) can be used with libm],
+ [gl_cv_func_isnand_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnand ((double)(x))
+ #elif defined isnan
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;],
+ [return isnand (x);],
+ [gl_cv_func_isnand_in_libm=yes],
+ [gl_cv_func_isnand_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+
+AC_DEFUN([gl_HAVE_ISNAND_NO_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(double) can be used without linking with libm],
+ [gl_cv_func_isnand_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnand
+ # define isnand(x) __builtin_isnan ((double)(x))
+ #else
+ # undef isnand
+ # define isnand(x) isnan ((double)(x))
+ #endif
+ double x;],
+ [return isnand (x);],
+ [gl_cv_func_isnand_no_libm=yes],
+ [gl_cv_func_isnand_no_libm=no])
+ ])
+])
diff --git a/ltdl/m4/isnanf.m4 b/ltdl/m4/isnanf.m4
new file mode 100755
index 00000000..1509fb44
--- /dev/null
+++ b/ltdl/m4/isnanf.m4
@@ -0,0 +1,179 @@
+# isnanf.m4 serial 10
+dnl Copyright (C) 2007-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 Check how to get or define isnanf().
+
+AC_DEFUN([gl_FUNC_ISNANF],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNANF_LIBM=
+ gl_HAVE_ISNANF_NO_LIBM
+ if test $gl_cv_func_isnanf_no_libm = no; then
+ gl_HAVE_ISNANF_IN_LIBM
+ if test $gl_cv_func_isnanf_in_libm = yes; then
+ ISNANF_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ || test $gl_cv_func_isnanf_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ISNANF_LIBM"
+ gl_ISNANF_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_isnanf_works" in
+ *yes) gl_func_isnanf=yes ;;
+ *) gl_func_isnanf=no; ISNANF_LIBM= ;;
+ esac
+ else
+ gl_func_isnanf=no
+ fi
+ if test $gl_func_isnanf != yes; then
+ HAVE_ISNANF=0
+ gl_BUILD_ISNANF
+ fi
+ AC_SUBST([ISNANF_LIBM])
+])
+
+dnl Check how to get or define isnanf() without linking with libm.
+
+AC_DEFUN([gl_FUNC_ISNANF_NO_LIBM],
+[
+ gl_HAVE_ISNANF_NO_LIBM
+ if test $gl_cv_func_isnanf_no_libm = yes; then
+ gl_ISNANF_WORKS
+ fi
+ if test $gl_cv_func_isnanf_no_libm = yes \
+ && { case "$gl_cv_func_isnanf_works" in
+ *yes) true;;
+ *) false;;
+ esac
+ }; then
+ AC_DEFINE([HAVE_ISNANF_IN_LIBC], [1],
+ [Define if the isnan(float) function is available in libc.])
+ else
+ gl_BUILD_ISNANF
+ fi
+])
+
+dnl Pull in replacement isnanf definition. It does not need -lm.
+AC_DEFUN([gl_BUILD_ISNANF],
+[
+ AC_LIBOBJ([isnanf])
+ gl_FLOAT_EXPONENT_LOCATION
+])
+
+dnl Test whether isnanf() can be used without libm.
+AC_DEFUN([gl_HAVE_ISNANF_NO_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(float) can be used without linking with libm],
+ [gl_cv_func_isnanf_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;],
+ [return isnanf (x);],
+ [gl_cv_func_isnanf_no_libm=yes],
+ [gl_cv_func_isnanf_no_libm=no])
+ ])
+])
+
+dnl Test whether isnanf() can be used with libm.
+AC_DEFUN([gl_HAVE_ISNANF_IN_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(float) can be used with libm],
+ [gl_cv_func_isnanf_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanf
+ # define isnanf(x) __builtin_isnanf ((float)(x))
+ #elif defined isnan
+ # undef isnanf
+ # define isnanf(x) isnan ((float)(x))
+ #endif
+ float x;],
+ [return isnanf (x);],
+ [gl_cv_func_isnanf_in_libm=yes],
+ [gl_cv_func_isnanf_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+
+dnl Test whether isnanf() rejects Infinity (this fails on Solaris 2.5.1),
+dnl recognizes a NaN (this fails on IRIX 6.5 with cc), and recognizes a NaN
+dnl with in-memory representation 0x7fbfffff (this fails on IRIX 6.5).
+AC_DEFUN([gl_ISNANF_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_FLOAT_EXPONENT_LOCATION])
+ AC_CACHE_CHECK([whether isnan(float) works], [gl_cv_func_isnanf_works],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanf
+# define isnanf(x) __builtin_isnanf ((float)(x))
+#elif defined isnan
+# undef isnanf
+# define isnanf(x) isnan ((float)(x))
+#endif
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaN ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaN() (0.0f / 0.0f)
+#endif
+#define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; float value; } memory_float;
+int main()
+{
+ memory_float m;
+
+ if (isnanf (1.0f / 0.0f))
+ return 1;
+
+ if (!isnanf (NaN ()))
+ return 1;
+
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* The isnanf function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit. */
+ if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0)
+ {
+ m.value = NaN ();
+ /* Set the bits below the exponent to 01111...111. */
+ m.word[0] &= -1U << FLT_EXPBIT0_BIT;
+ m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1;
+ if (!isnanf (m.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}], [gl_cv_func_isnanf_works=yes], [gl_cv_func_isnanf_works=no],
+ [case "$host_os" in
+ irix* | solaris*) gl_cv_func_isnanf_works="guessing no";;
+ *) gl_cv_func_isnanf_works="guessing yes";;
+ esac
+ ])
+ ])
+])
diff --git a/ltdl/m4/isnanl.m4 b/ltdl/m4/isnanl.m4
new file mode 100755
index 00000000..25daecae
--- /dev/null
+++ b/ltdl/m4/isnanl.m4
@@ -0,0 +1,245 @@
+# isnanl.m4 serial 12
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_ISNANL],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ ISNANL_LIBM=
+ gl_HAVE_ISNANL_NO_LIBM
+ if test $gl_cv_func_isnanl_no_libm = no; then
+ gl_HAVE_ISNANL_IN_LIBM
+ if test $gl_cv_func_isnanl_in_libm = yes; then
+ ISNANL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_isnanl_no_libm = yes \
+ || test $gl_cv_func_isnanl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $ISNANL_LIBM"
+ gl_FUNC_ISNANL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_isnanl_works" in
+ *yes) gl_func_isnanl=yes ;;
+ *) gl_func_isnanl=no; ISNANL_LIBM= ;;
+ esac
+ else
+ gl_func_isnanl=no
+ fi
+ if test $gl_func_isnanl != yes; then
+ HAVE_ISNANL=0
+ gl_BUILD_ISNANL
+ fi
+ AC_SUBST([ISNANL_LIBM])
+])
+
+AC_DEFUN([gl_FUNC_ISNANL_NO_LIBM],
+[
+ gl_HAVE_ISNANL_NO_LIBM
+ gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm
+ if test $gl_func_isnanl_no_libm = yes; then
+ gl_FUNC_ISNANL_WORKS
+ case "$gl_cv_func_isnanl_works" in
+ *yes) ;;
+ *) gl_func_isnanl_no_libm=no ;;
+ esac
+ fi
+ if test $gl_func_isnanl_no_libm = yes; then
+ AC_DEFINE([HAVE_ISNANL_IN_LIBC], [1],
+ [Define if the isnan(long double) function is available in libc.])
+ else
+ gl_BUILD_ISNANL
+ fi
+])
+
+dnl Pull in replacement isnanl definition. It does not need -lm.
+AC_DEFUN([gl_BUILD_ISNANL],
+[
+ AC_LIBOBJ([isnanl])
+ gl_LONG_DOUBLE_EXPONENT_LOCATION
+])
+
+dnl Test whether isnanl() can be used without libm.
+AC_DEFUN([gl_HAVE_ISNANL_NO_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(long double) can be used without linking with libm],
+ [gl_cv_func_isnanl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;],
+ [return isnanl (x);],
+ [gl_cv_func_isnanl_no_libm=yes],
+ [gl_cv_func_isnanl_no_libm=no])
+ ])
+])
+
+dnl Test whether isnanl() can be used with libm.
+AC_DEFUN([gl_HAVE_ISNANL_IN_LIBM],
+[
+ AC_CACHE_CHECK([whether isnan(long double) can be used with libm],
+ [gl_cv_func_isnanl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ #if __GNUC__ >= 4
+ # undef isnanl
+ # define isnanl(x) __builtin_isnanl ((long double)(x))
+ #elif defined isnan
+ # undef isnanl
+ # define isnanl(x) isnan ((long double)(x))
+ #endif
+ long double x;],
+ [return isnanl (x);],
+ [gl_cv_func_isnanl_in_libm=yes],
+ [gl_cv_func_isnanl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+])
+
+dnl Test whether isnanl() recognizes all numbers which are neither finite nor
+dnl infinite. This test fails e.g. on NetBSD/i386 and on glibc/ia64.
+dnl Also, the GCC >= 4.0 built-in __builtin_isnanl does not pass the tests
+dnl - for pseudo-denormals on i686 and x86_64,
+dnl - for pseudo-zeroes, unnormalized numbers, and pseudo-denormals on ia64.
+AC_DEFUN([gl_FUNC_ISNANL_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether isnanl works], [gl_cv_func_isnanl_works],
+ [
+ AC_TRY_RUN([
+#include <float.h>
+#include <limits.h>
+#include <math.h>
+#if __GNUC__ >= 4
+# undef isnanl
+# define isnanl(x) __builtin_isnanl ((long double)(x))
+#elif defined isnan
+# undef isnanl
+# define isnanl(x) isnan ((long double)(x))
+#endif
+#define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
+int main ()
+{
+ memory_long_double m;
+ unsigned int i;
+
+ if (!isnanl (NaNl ()))
+ return 1;
+
+ /* The isnanl function should be immune against changes in the sign bit and
+ in the mantissa bits. The xor operation twiddles a bit that can only be
+ a sign bit or a mantissa bit (since the exponent never extends to
+ bit 31). */
+ m.value = NaNl ();
+ m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+ for (i = 0; i < NWORDS; i++)
+ m.word[i] |= 1;
+ if (!isnanl (m.value))
+ return 1;
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (!isnanl (x.value))
+ return 1;
+ }
+#endif
+
+ return 0;
+}], [gl_cv_func_isnanl_works=yes], [gl_cv_func_isnanl_works=no],
+ [case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";;
+ *)
+ case "$host_os" in
+ netbsd*) gl_cv_func_isnanl_works="guessing no";;
+ *) gl_cv_func_isnanl_works="guessing yes";;
+ esac
+ ;;
+ esac
+ ])
+ ])
+])
diff --git a/ltdl/m4/langinfo_h.m4 b/ltdl/m4/langinfo_h.m4
new file mode 100755
index 00000000..a4c5409d
--- /dev/null
+++ b/ltdl/m4/langinfo_h.m4
@@ -0,0 +1,74 @@
+# langinfo_h.m4 serial 3
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LANGINFO_H],
+[
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+
+ dnl Persuade glibc-2.0.6 <langinfo.h> to define CODESET.
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ gl_CHECK_NEXT_HEADERS([langinfo.h])
+
+ dnl Determine whether <langinfo.h> exists. It is missing on mingw and BeOS.
+ HAVE_LANGINFO_CODESET=0
+ HAVE_LANGINFO_ERA=0
+ AC_CHECK_HEADERS_ONCE([langinfo.h])
+ if test $ac_cv_header_langinfo_h = yes; then
+ HAVE_LANGINFO_H=1
+ dnl Determine what <langinfo.h> defines. CODESET and ERA etc. are missing
+ dnl on OpenBSD 3.8.
+ AC_CACHE_CHECK([whether langinfo.h defines CODESET],
+ [gl_cv_header_langinfo_codeset],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = CODESET;
+]])],
+ [gl_cv_header_langinfo_codeset=yes],
+ [gl_cv_header_langinfo_codeset=no])
+ ])
+ if test $gl_cv_header_langinfo_codeset = yes; then
+ HAVE_LANGINFO_CODESET=1
+ fi
+ AC_CACHE_CHECK([whether langinfo.h defines ERA],
+ [gl_cv_header_langinfo_era],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[#include <langinfo.h>
+int a = ERA;
+]])],
+ [gl_cv_header_langinfo_era=yes],
+ [gl_cv_header_langinfo_era=no])
+ ])
+ if test $gl_cv_header_langinfo_era = yes; then
+ HAVE_LANGINFO_ERA=1
+ fi
+ else
+ HAVE_LANGINFO_H=0
+ fi
+ AC_SUBST([HAVE_LANGINFO_H])
+ AC_SUBST([HAVE_LANGINFO_CODESET])
+ AC_SUBST([HAVE_LANGINFO_ERA])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <langinfo.h>
+ ]], [nl_langinfo])
+])
+
+AC_DEFUN([gl_LANGINFO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_LANGINFO_H_DEFAULTS],
+[
+ GNULIB_NL_LANGINFO=0; AC_SUBST([GNULIB_NL_LANGINFO])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_NL_LANGINFO=1; AC_SUBST([HAVE_NL_LANGINFO])
+ REPLACE_NL_LANGINFO=0; AC_SUBST([REPLACE_NL_LANGINFO])
+])
diff --git a/ltdl/m4/lcmessage.m4 b/ltdl/m4/lcmessage.m4
new file mode 100755
index 00000000..1a705431
--- /dev/null
+++ b/ltdl/m4/lcmessage.m4
@@ -0,0 +1,31 @@
+# lcmessage.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1995-2002, 2004-2005, 2008-2010 Free Software Foundation,
+dnl 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], [gt_cv_val_LC_MESSAGES],
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ [gt_cv_val_LC_MESSAGES=yes], [gt_cv_val_LC_MESSAGES=no])])
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE([HAVE_LC_MESSAGES], [1],
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
diff --git a/ltdl/m4/lcmessage.m4~ b/ltdl/m4/lcmessage.m4~
new file mode 100644
index 00000000..19aa77e4
--- /dev/null
+++ b/ltdl/m4/lcmessage.m4~
@@ -0,0 +1,30 @@
+# lcmessage.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1995-2002, 2004-2005 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
+
+# Check whether LC_MESSAGES is available in <locale.h>.
+
+AC_DEFUN([gt_LC_MESSAGES],
+[
+ AC_CACHE_CHECK([for LC_MESSAGES], gt_cv_val_LC_MESSAGES,
+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
+ gt_cv_val_LC_MESSAGES=yes, gt_cv_val_LC_MESSAGES=no)])
+ if test $gt_cv_val_LC_MESSAGES = yes; then
+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
+ [Define if your <locale.h> file defines LC_MESSAGES.])
+ fi
+])
diff --git a/ltdl/m4/ldexpl.m4 b/ltdl/m4/ldexpl.m4
new file mode 100755
index 00000000..bcc76b21
--- /dev/null
+++ b/ltdl/m4/ldexpl.m4
@@ -0,0 +1,88 @@
+# ldexpl.m4 serial 4
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_LDEXPL],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ LDEXPL_LIBM=
+ AC_CACHE_CHECK([whether ldexpl() can be used without linking with libm],
+ [gl_cv_func_ldexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [return ldexpl (x, -1) > 0;],
+ [gl_cv_func_ldexpl_no_libm=yes],
+ [gl_cv_func_ldexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexpl_no_libm = no; then
+ AC_CACHE_CHECK([whether ldexpl() can be used with libm],
+ [gl_cv_func_ldexpl_in_libm],
+ [
+ save_LIBS="$LIBS"
+ LIBS="$LIBS -lm"
+ AC_TRY_LINK([#include <math.h>
+ long double x;],
+ [return ldexpl (x, -1) > 0;],
+ [gl_cv_func_ldexpl_in_libm=yes],
+ [gl_cv_func_ldexpl_in_libm=no])
+ LIBS="$save_LIBS"
+ ])
+ if test $gl_cv_func_ldexpl_in_libm = yes; then
+ LDEXPL_LIBM=-lm
+ fi
+ fi
+ if test $gl_cv_func_ldexpl_no_libm = yes \
+ || test $gl_cv_func_ldexpl_in_libm = yes; then
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LDEXPL_LIBM"
+ gl_FUNC_LDEXPL_WORKS
+ LIBS="$save_LIBS"
+ case "$gl_cv_func_ldexpl_works" in
+ *yes) gl_func_ldexpl=yes ;;
+ *) gl_func_ldexpl=no; REPLACE_LDEXPL=1; LDEXPL_LIBM= ;;
+ esac
+ else
+ gl_func_ldexpl=no
+ fi
+ if test $gl_func_ldexpl = yes; then
+ AC_DEFINE([HAVE_LDEXPL], [1],
+ [Define if the ldexpl() function is available.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ else
+ HAVE_DECL_LDEXPL=0
+ AC_LIBOBJ([ldexpl])
+ fi
+ AC_SUBST([LDEXPL_LIBM])
+])
+
+dnl Test whether ldexpl() works on finite numbers (this fails on AIX 5.1
+dnl and MacOS X 10.4/PowerPC).
+AC_DEFUN([gl_FUNC_LDEXPL_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether ldexpl works], [gl_cv_func_ldexpl_works],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+extern long double ldexpl (long double, int);
+int main()
+{
+ volatile long double x1 = 1.0;
+ volatile long double y1 = ldexpl (x1, -1);
+ volatile long double x2 = 1.73205L;
+ volatile long double y2 = ldexpl (x2, 0);
+ return (y1 != 0.5L) || (y2 != x2);
+}], [gl_cv_func_ldexpl_works=yes], [gl_cv_func_ldexpl_works=no],
+ [case "$host_os" in
+ aix*) gl_cv_func_ldexpl_works="guessing no";;
+ *) gl_cv_func_ldexpl_works="guessing yes";;
+ esac
+ ])
+ ])
+])
diff --git a/ltdl/m4/lib-ld.m4 b/ltdl/m4/lib-ld.m4
new file mode 100755
index 00000000..ebb30528
--- /dev/null
+++ b/ltdl/m4/lib-ld.m4
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], [acl_cv_prog_gnu_ld],
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH([gnu-ld],
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL([acl_cv_path_LD],
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT([$LD])
+else
+ AC_MSG_RESULT([no])
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/ltdl/m4/lib-ld.m4~ b/ltdl/m4/lib-ld.m4~
new file mode 100644
index 00000000..96c4e2c3
--- /dev/null
+++ b/ltdl/m4/lib-ld.m4~
@@ -0,0 +1,110 @@
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 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 Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
diff --git a/ltdl/m4/lib-link.m4 b/ltdl/m4/lib-link.m4
new file mode 100755
index 00000000..90e1ac91
--- /dev/null
+++ b/ltdl/m4/lib-link.m4
@@ -0,0 +1,764 @@
+# lib-link.m4 serial 20 (gettext-0.18)
+dnl Copyright (C) 2001-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 Bruno Haible.
+
+AC_PREREQ([2.54])
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode, [missing-message])
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. The missing-message
+dnl defaults to 'no' and may contain additional hints for the user.
+dnl If found, it sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME}
+dnl and LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ pushdef([Name],[translit([$1],[./-], [___])])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4],
+ [ac_cv_lib[]Name=yes],
+ [ac_cv_lib[]Name='m4_if([$5], [], [no], [[$5]])'])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the lib][$1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ popdef([NAME])
+ popdef([Name])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], [acl_cv_rpath], [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE([rpath],
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_FROMPACKAGE(name, package)
+dnl declares that libname comes from the given package. The configure file
+dnl will then not have a --with-libname-prefix option but a
+dnl --with-package-prefix option. Several libraries can come from the same
+dnl package. This declaration must occur before an AC_LIB_LINKFLAGS or similar
+dnl macro call that searches for libname.
+AC_DEFUN([AC_LIB_FROMPACKAGE],
+[
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_frompackage_]NAME, [$2])
+ popdef([NAME])
+ pushdef([PACK],[$2])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ define([acl_libsinpackage_]PACKUP,
+ m4_ifdef([acl_libsinpackage_]PACKUP, [acl_libsinpackage_]PACKUP[[, ]],)[lib$1])
+ popdef([PACKUP])
+ popdef([PACK])
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ pushdef([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACK],[m4_ifdef([acl_frompackage_]NAME, [acl_frompackage_]NAME, lib[$1])])
+ pushdef([PACKUP],[translit(PACK,[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ pushdef([PACKLIBS],[m4_ifdef([acl_frompackage_]NAME, [acl_libsinpackage_]PACKUP, lib[$1])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ pushdef([P_A_C_K],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit(PACK,[.],[_])],PACK)])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_ARG_WITH(P_A_C_K[-prefix],
+[[ --with-]]P_A_C_K[[-prefix[=DIR] search for ]PACKLIBS[ in DIR/include and DIR/lib
+ --without-]]P_A_C_K[[-prefix don't search for ]PACKLIBS[ in includedir and libdir]],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ if test "$acl_libdirstem2" != "$acl_libdirstem" \
+ && ! test -d "$withval/$acl_libdirstem"; then
+ additional_libdir="$withval/$acl_libdirstem2"
+ fi
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ dnl HAVE_LIB${NAME} is an indicator that LIB${NAME}, LTLIB${NAME} have been
+ dnl computed. So it has to be reset here.
+ HAVE_LIB[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem" \
+ || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ */$acl_libdirstem2 | */$acl_libdirstem2/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
+ if test "$name" = '$1'; then
+ LIB[]NAME[]_PREFIX="$basedir"
+ fi
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
+ && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
+ || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+ popdef([P_A_C_K])
+ popdef([PACKLIBS])
+ popdef([PACKUP])
+ popdef([PACK])
+ popdef([NAME])
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem" \
+ && test "X$dir" != "X/usr/$acl_libdirstem2"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/ltdl/m4/lib-link.m4~ b/ltdl/m4/lib-link.m4~
new file mode 100644
index 00000000..f95b7ba8
--- /dev/null
+++ b/ltdl/m4/lib-link.m4~
@@ -0,0 +1,644 @@
+# lib-link.m4 serial 9 (gettext-0.16)
+dnl Copyright (C) 2001-2006 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 Bruno Haible.
+
+AC_PREREQ(2.50)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
+dnl hardcode_direct, hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ libext="$acl_cv_libext"
+ shlibext="$acl_cv_shlibext"
+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ hardcode_direct="$acl_cv_hardcode_direct"
+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib$1-prefix],
+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ if test $use_additional = yes; then
+ if test -n "$shlibext" \
+ && { test -f "$additional_libdir/lib$name.$shlibext" \
+ || { test "$shlibext" = dll \
+ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then
+ found_dir="$additional_libdir"
+ if test -f "$additional_libdir/lib$name.$shlibext"; then
+ found_so="$additional_libdir/lib$name.$shlibext"
+ else
+ found_so="$additional_libdir/lib$name.dll.a"
+ fi
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ else
+ if test -f "$additional_libdir/lib$name.$libext"; then
+ found_dir="$additional_libdir"
+ found_a="$additional_libdir/lib$name.$libext"
+ if test -f "$additional_libdir/lib$name.la"; then
+ found_la="$additional_libdir/lib$name.la"
+ fi
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$shlibext" \
+ && { test -f "$dir/lib$name.$shlibext" \
+ || { test "$shlibext" = dll \
+ && test -f "$dir/lib$name.dll.a"; }; }; then
+ found_dir="$dir"
+ if test -f "$dir/lib$name.$shlibext"; then
+ found_so="$dir/lib$name.$shlibext"
+ else
+ found_so="$dir/lib$name.dll.a"
+ fi
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ else
+ if test -f "$dir/lib$name.$libext"; then
+ found_dir="$dir"
+ found_a="$dir/lib$name.$libext"
+ if test -f "$dir/lib$name.la"; then
+ found_la="$dir/lib$name.la"
+ fi
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
diff --git a/ltdl/m4/lib-prefix.m4 b/ltdl/m4/lib-prefix.m4
new file mode 100755
index 00000000..1601ceae
--- /dev/null
+++ b/ltdl/m4/lib-prefix.m4
@@ -0,0 +1,224 @@
+# lib-prefix.m4 serial 7 (gettext-0.18)
+dnl Copyright (C) 2001-2005, 2008-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 Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates
+dnl - a variable acl_libdirstem, containing the basename of the libdir, either
+dnl "lib" or "lib64" or "lib/64",
+dnl - a variable acl_libdirstem2, as a secondary possible value for
+dnl acl_libdirstem, either the same as acl_libdirstem or "lib/sparcv9" or
+dnl "lib/amd64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64.
+ dnl On glibc systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib64 and 32-bit libraries go under $prefix/lib. We determine
+ dnl the compiler's default mode by looking at the compiler's library search
+ dnl path. If at least one of its elements ends in /lib64 or points to a
+ dnl directory whose absolute pathname ends in /lib64, we assume a 64-bit ABI.
+ dnl Otherwise we use the default, namely "lib".
+ dnl On Solaris systems, the current practice is that on a system supporting
+ dnl 32-bit and 64-bit instruction sets or ABIs, 64-bit libraries go under
+ dnl $prefix/lib/64 (which is a symlink to either $prefix/lib/sparcv9 or
+ dnl $prefix/lib/amd64) and 32-bit libraries go under $prefix/lib.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ acl_libdirstem=lib
+ acl_libdirstem2=
+ case "$host_os" in
+ solaris*)
+ dnl See Solaris 10 Software Developer Collection > Solaris 64-bit Developer's Guide > The Development Environment
+ dnl <http://docs.sun.com/app/docs/doc/816-5138/dev-env?l=en&a=view>.
+ dnl "Portable Makefiles should refer to any library directories using the 64 symbolic link."
+ dnl But we want to recognize the sparcv9 or amd64 subdirectory also if the
+ dnl symlink is missing, so we set acl_libdirstem2 too.
+ AC_CACHE_CHECK([for 64-bit host], [gl_cv_solaris_64bit],
+ [AC_EGREP_CPP([sixtyfour bits], [
+#ifdef _LP64
+sixtyfour bits
+#endif
+ ], [gl_cv_solaris_64bit=yes], [gl_cv_solaris_64bit=no])
+ ])
+ if test $gl_cv_solaris_64bit = yes; then
+ acl_libdirstem=lib/64
+ case "$host_cpu" in
+ sparc*) acl_libdirstem2=lib/sparcv9 ;;
+ i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
+ esac
+ fi
+ ;;
+ *)
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ */../ | */.. )
+ # Better ignore directories of this form. They are misleading.
+ ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+ ;;
+ esac
+ test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
+])
diff --git a/ltdl/m4/lib-prefix.m4~ b/ltdl/m4/lib-prefix.m4~
new file mode 100644
index 00000000..a8684e17
--- /dev/null
+++ b/ltdl/m4/lib-prefix.m4~
@@ -0,0 +1,185 @@
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 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 Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
diff --git a/ltdl/m4/libtool.m4 b/ltdl/m4/libtool.m4
new file mode 100644
index 00000000..a3fee536
--- /dev/null
+++ b/ltdl/m4/libtool.m4
@@ -0,0 +1,7377 @@
+# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*-
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+m4_define([_LT_COPYING], [dnl
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005,
+# 2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gordon Matzigkeit, 1996
+#
+# This file is part of GNU Libtool.
+#
+# GNU Libtool is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# As a special exception to the GNU General Public License,
+# if you distribute this file as part of a program or library that
+# is built using GNU Libtool, you may include this file under the
+# same distribution terms that you use for the rest of that program.
+#
+# GNU Libtool 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with GNU Libtool; see the file COPYING. If not, a copy
+# can be downloaded from http://www.gnu.org/licenses/gpl.html, or
+# obtained by writing to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+])
+
+# serial 56 LT_INIT
+
+
+# LT_PREREQ(VERSION)
+# ------------------
+# Complain and exit if this libtool version is less that VERSION.
+m4_defun([LT_PREREQ],
+[m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1,
+ [m4_default([$3],
+ [m4_fatal([Libtool version $1 or higher is required],
+ 63)])],
+ [$2])])
+
+
+# _LT_CHECK_BUILDDIR
+# ------------------
+# Complain if the absolute build directory name contains unusual characters
+m4_defun([_LT_CHECK_BUILDDIR],
+[case `pwd` in
+ *\ * | *\ *)
+ AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;;
+esac
+])
+
+
+# LT_INIT([OPTIONS])
+# ------------------
+AC_DEFUN([LT_INIT],
+[AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT
+AC_BEFORE([$0], [LT_LANG])dnl
+AC_BEFORE([$0], [LT_OUTPUT])dnl
+AC_BEFORE([$0], [LTDL_INIT])dnl
+m4_require([_LT_CHECK_BUILDDIR])dnl
+
+dnl Autoconf doesn't catch unexpanded LT_ macros by default:
+m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl
+m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl
+dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4
+dnl unless we require an AC_DEFUNed macro:
+AC_REQUIRE([LTOPTIONS_VERSION])dnl
+AC_REQUIRE([LTSUGAR_VERSION])dnl
+AC_REQUIRE([LTVERSION_VERSION])dnl
+AC_REQUIRE([LTOBSOLETE_VERSION])dnl
+m4_require([_LT_PROG_LTMAIN])dnl
+
+dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ltmain"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+AC_SUBST(LIBTOOL)dnl
+
+_LT_SETUP
+
+# Only expand once:
+m4_define([LT_INIT])
+])# LT_INIT
+
+# Old names:
+AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT])
+AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PROG_LIBTOOL], [])
+dnl AC_DEFUN([AM_PROG_LIBTOOL], [])
+
+
+# _LT_CC_BASENAME(CC)
+# -------------------
+# Calculate cc_basename. Skip known compiler wrappers and cross-prefix.
+m4_defun([_LT_CC_BASENAME],
+[for cc_temp in $1""; do
+ case $cc_temp in
+ compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;;
+ distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;;
+ \-*) ;;
+ *) break;;
+ esac
+done
+cc_basename=`$ECHO "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"`
+])
+
+
+# _LT_FILEUTILS_DEFAULTS
+# ----------------------
+# It is okay to use these file commands and assume they have been set
+# sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'.
+m4_defun([_LT_FILEUTILS_DEFAULTS],
+[: ${CP="cp -f"}
+: ${MV="mv -f"}
+: ${RM="rm -f"}
+])# _LT_FILEUTILS_DEFAULTS
+
+
+# _LT_SETUP
+# ---------
+m4_defun([_LT_SETUP],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+_LT_DECL([], [host_alias], [0], [The host system])dnl
+_LT_DECL([], [host], [0])dnl
+_LT_DECL([], [host_os], [0])dnl
+dnl
+_LT_DECL([], [build_alias], [0], [The build system])dnl
+_LT_DECL([], [build], [0])dnl
+_LT_DECL([], [build_os], [0])dnl
+dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+dnl
+AC_REQUIRE([AC_PROG_LN_S])dnl
+test -z "$LN_S" && LN_S="ln -s"
+_LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl
+dnl
+AC_REQUIRE([LT_CMD_MAX_LEN])dnl
+_LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl
+_LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl
+dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_CHECK_SHELL_FEATURES])dnl
+m4_require([_LT_CMD_RELOAD])dnl
+m4_require([_LT_CHECK_MAGIC_METHOD])dnl
+m4_require([_LT_CMD_OLD_ARCHIVE])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+
+_LT_CONFIG_LIBTOOL_INIT([
+# See if we are running on zsh, and set the options which allow our
+# commands through without removal of \ escapes INIT.
+if test -n "\${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+])
+if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+fi
+
+_LT_CHECK_OBJDIR
+
+m4_require([_LT_TAG_COMPILER])dnl
+_LT_PROG_ECHO_BACKSLASH
+
+case $host_os in
+aix3*)
+ # AIX sometimes has problems with the GCC collect2 program. For some
+ # reason, if we set the COLLECT_NAMES environment variable, the problems
+ # vanish in a puff of smoke.
+ if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+ fi
+ ;;
+esac
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+sed_quote_subst='s/\([["`$\\]]\)/\\\1/g'
+
+# Same as above, but do not quote variable references.
+double_quote_subst='s/\([["`\\]]\)/\\\1/g'
+
+# Sed substitution to delay expansion of an escaped shell variable in a
+# double_quote_subst'ed string.
+delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g'
+
+# Sed substitution to delay expansion of an escaped single quote.
+delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g'
+
+# Sed substitution to avoid accidental globbing in evaled expressions
+no_glob_subst='s/\*/\\\*/g'
+
+# Global variables:
+ofile=libtool
+can_build_shared=yes
+
+# All known linkers require a `.a' archive for static linking (except MSVC,
+# which needs '.lib').
+libext=a
+
+with_gnu_ld="$lt_cv_prog_gnu_ld"
+
+old_CC="$CC"
+old_CFLAGS="$CFLAGS"
+
+# Set sane defaults for various variables
+test -z "$CC" && CC=cc
+test -z "$LTCC" && LTCC=$CC
+test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS
+test -z "$LD" && LD=ld
+test -z "$ac_objext" && ac_objext=o
+
+_LT_CC_BASENAME([$compiler])
+
+# Only perform the check for file, if the check method requires it
+test -z "$MAGIC_CMD" && MAGIC_CMD=file
+case $deplibs_check_method in
+file_magic*)
+ if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+ _LT_PATH_MAGIC
+ fi
+ ;;
+esac
+
+# Use C for the default configuration in the libtool script
+LT_SUPPORTED_TAG([CC])
+_LT_LANG_C_CONFIG
+_LT_LANG_DEFAULT_CONFIG
+_LT_CONFIG_COMMANDS
+])# _LT_SETUP
+
+
+# _LT_PROG_LTMAIN
+# ---------------
+# Note that this code is called both from `configure', and `config.status'
+# now that we use AC_CONFIG_COMMANDS to generate libtool. Notably,
+# `config.status' has no value for ac_aux_dir unless we are using Automake,
+# so we pass a copy along to make sure it has a sensible value anyway.
+m4_defun([_LT_PROG_LTMAIN],
+[m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl
+_LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir'])
+ltmain="$ac_aux_dir/ltmain.sh"
+])# _LT_PROG_LTMAIN
+
+
+## ------------------------------------- ##
+## Accumulate code for creating libtool. ##
+## ------------------------------------- ##
+
+# So that we can recreate a full libtool script including additional
+# tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS
+# in macros and then make a single call at the end using the `libtool'
+# label.
+
+
+# _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS])
+# ----------------------------------------
+# Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL_INIT],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_INIT],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_INIT])
+
+
+# _LT_CONFIG_LIBTOOL([COMMANDS])
+# ------------------------------
+# Register COMMANDS to be passed to AC_CONFIG_COMMANDS later.
+m4_define([_LT_CONFIG_LIBTOOL],
+[m4_ifval([$1],
+ [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS],
+ [$1
+])])])
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS])
+
+
+# _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS])
+# -----------------------------------------------------
+m4_defun([_LT_CONFIG_SAVE_COMMANDS],
+[_LT_CONFIG_LIBTOOL([$1])
+_LT_CONFIG_LIBTOOL_INIT([$2])
+])
+
+
+# _LT_FORMAT_COMMENT([COMMENT])
+# -----------------------------
+# Add leading comment marks to the start of each line, and a trailing
+# full-stop to the whole comment if one is not present already.
+m4_define([_LT_FORMAT_COMMENT],
+[m4_ifval([$1], [
+m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])],
+ [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.])
+)])
+
+
+
+## ------------------------ ##
+## FIXME: Eliminate VARNAME ##
+## ------------------------ ##
+
+
+# _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?])
+# -------------------------------------------------------------------
+# CONFIGNAME is the name given to the value in the libtool script.
+# VARNAME is the (base) name used in the configure script.
+# VALUE may be 0, 1 or 2 for a computed quote escaped value based on
+# VARNAME. Any other value will be used directly.
+m4_define([_LT_DECL],
+[lt_if_append_uniq([lt_decl_varnames], [$2], [, ],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name],
+ [m4_ifval([$1], [$1], [$2])])
+ lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3])
+ m4_ifval([$4],
+ [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])])
+ lt_dict_add_subkey([lt_decl_dict], [$2],
+ [tagged?], [m4_ifval([$5], [yes], [no])])])
+])
+
+
+# _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION])
+# --------------------------------------------------------
+m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])])
+
+
+# lt_decl_tag_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_tag_varnames],
+[_lt_decl_filter([tagged?], [yes], $@)])
+
+
+# _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..])
+# ---------------------------------------------------------
+m4_define([_lt_decl_filter],
+[m4_case([$#],
+ [0], [m4_fatal([$0: too few arguments: $#])],
+ [1], [m4_fatal([$0: too few arguments: $#: $1])],
+ [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)],
+ [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)],
+ [lt_dict_filter([lt_decl_dict], $@)])[]dnl
+])
+
+
+# lt_decl_quote_varnames([SEPARATOR], [VARNAME1...])
+# --------------------------------------------------
+m4_define([lt_decl_quote_varnames],
+[_lt_decl_filter([value], [1], $@)])
+
+
+# lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_dquote_varnames],
+[_lt_decl_filter([value], [2], $@)])
+
+
+# lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...])
+# ---------------------------------------------------
+m4_define([lt_decl_varnames_tagged],
+[m4_assert([$# <= 2])dnl
+_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]),
+ m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))])
+m4_define([_lt_decl_varnames_tagged],
+[m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])])
+
+
+# lt_decl_all_varnames([SEPARATOR], [VARNAME1...])
+# ------------------------------------------------
+m4_define([lt_decl_all_varnames],
+[_$0(m4_quote(m4_default([$1], [[, ]])),
+ m4_if([$2], [],
+ m4_quote(lt_decl_varnames),
+ m4_quote(m4_shift($@))))[]dnl
+])
+m4_define([_lt_decl_all_varnames],
+[lt_join($@, lt_decl_varnames_tagged([$1],
+ lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl
+])
+
+
+# _LT_CONFIG_STATUS_DECLARE([VARNAME])
+# ------------------------------------
+# Quote a variable value, and forward it to `config.status' so that its
+# declaration there will have the same value as in `configure'. VARNAME
+# must have a single quote delimited value for this to work.
+m4_define([_LT_CONFIG_STATUS_DECLARE],
+[$1='`$ECHO "X$][$1" | $Xsed -e "$delay_single_quote_subst"`'])
+
+
+# _LT_CONFIG_STATUS_DECLARATIONS
+# ------------------------------
+# We delimit libtool config variables with single quotes, so when
+# we write them to config.status, we have to be sure to quote all
+# embedded single quotes properly. In configure, this macro expands
+# each variable declared with _LT_DECL (and _LT_TAGDECL) into:
+#
+# <var>='`$ECHO "X$<var>" | $Xsed -e "$delay_single_quote_subst"`'
+m4_defun([_LT_CONFIG_STATUS_DECLARATIONS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames),
+ [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAGS
+# ----------------
+# Output comment and list of tags supported by the script
+m4_defun([_LT_LIBTOOL_TAGS],
+[_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl
+available_tags="_LT_TAGS"dnl
+])
+
+
+# _LT_LIBTOOL_DECLARE(VARNAME, [TAG])
+# -----------------------------------
+# Extract the dictionary values for VARNAME (optionally with TAG) and
+# expand to a commented shell variable setting:
+#
+# # Some comment about what VAR is for.
+# visible_name=$lt_internal_name
+m4_define([_LT_LIBTOOL_DECLARE],
+[_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1],
+ [description])))[]dnl
+m4_pushdef([_libtool_name],
+ m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl
+m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])),
+ [0], [_libtool_name=[$]$1],
+ [1], [_libtool_name=$lt_[]$1],
+ [2], [_libtool_name=$lt_[]$1],
+ [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl
+m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl
+])
+
+
+# _LT_LIBTOOL_CONFIG_VARS
+# -----------------------
+# Produce commented declarations of non-tagged libtool config variables
+# suitable for insertion in the LIBTOOL CONFIG section of the `libtool'
+# script. Tagged libtool config variables (even for the LIBTOOL CONFIG
+# section) are produced by _LT_LIBTOOL_TAG_VARS.
+m4_defun([_LT_LIBTOOL_CONFIG_VARS],
+[m4_foreach([_lt_var],
+ m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])])
+
+
+# _LT_LIBTOOL_TAG_VARS(TAG)
+# -------------------------
+m4_define([_LT_LIBTOOL_TAG_VARS],
+[m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames),
+ [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])])
+
+
+# _LT_TAGVAR(VARNAME, [TAGNAME])
+# ------------------------------
+m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])])
+
+
+# _LT_CONFIG_COMMANDS
+# -------------------
+# Send accumulated output to $CONFIG_STATUS. Thanks to the lists of
+# variables for single and double quote escaping we saved from calls
+# to _LT_DECL, we can put quote escaped variables declarations
+# into `config.status', and then the shell code to quote escape them in
+# for loops in `config.status'. Finally, any additional code accumulated
+# from calls to _LT_CONFIG_LIBTOOL_INIT is expanded.
+m4_defun([_LT_CONFIG_COMMANDS],
+[AC_PROVIDE_IFELSE([LT_OUTPUT],
+ dnl If the libtool generation code has been placed in $CONFIG_LT,
+ dnl instead of duplicating it all over again into config.status,
+ dnl then we will have config.status run $CONFIG_LT later, so it
+ dnl needs to know what name is stored there:
+ [AC_CONFIG_COMMANDS([libtool],
+ [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])],
+ dnl If the libtool generation code is destined for config.status,
+ dnl expand the accumulated commands and init code now:
+ [AC_CONFIG_COMMANDS([libtool],
+ [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])])
+])#_LT_CONFIG_COMMANDS
+
+
+# Initialize.
+m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT],
+[
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+sed_quote_subst='$sed_quote_subst'
+double_quote_subst='$double_quote_subst'
+delay_variable_subst='$delay_variable_subst'
+_LT_CONFIG_STATUS_DECLARATIONS
+LTCC='$LTCC'
+LTCFLAGS='$LTCFLAGS'
+compiler='$compiler_DEFAULT'
+
+# Quote evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_quote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$sed_quote_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Double-quote double-evaled strings.
+for var in lt_decl_all_varnames([[ \
+]], lt_decl_dquote_varnames); do
+ case \`eval \\\\\$ECHO "X\\\\\$\$var"\` in
+ *[[\\\\\\\`\\"\\\$]]*)
+ eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"X\\\$\$var\\" | \\\$Xsed -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\""
+ ;;
+ *)
+ eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\""
+ ;;
+ esac
+done
+
+# Fix-up fallback echo if it was mangled by the above quoting rules.
+case \$lt_ECHO in
+*'\\\[$]0 --fallback-echo"')dnl "
+ lt_ECHO=\`\$ECHO "X\$lt_ECHO" | \$Xsed -e 's/\\\\\\\\\\\\\\\[$]0 --fallback-echo"\[$]/\[$]0 --fallback-echo"/'\`
+ ;;
+esac
+
+_LT_OUTPUT_LIBTOOL_INIT
+])
+
+
+# LT_OUTPUT
+# ---------
+# This macro allows early generation of the libtool script (before
+# AC_OUTPUT is called), incase it is used in configure for compilation
+# tests.
+AC_DEFUN([LT_OUTPUT],
+[: ${CONFIG_LT=./config.lt}
+AC_MSG_NOTICE([creating $CONFIG_LT])
+cat >"$CONFIG_LT" <<_LTEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate a libtool stub with the current configuration.
+
+lt_cl_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AS_SHELL_SANITIZE
+_AS_PREPARE
+
+exec AS_MESSAGE_FD>&1
+exec AS_MESSAGE_LOG_FD>>config.log
+{
+ echo
+ AS_BOX([Running $as_me.])
+} >&AS_MESSAGE_LOG_FD
+
+lt_cl_help="\
+\`$as_me' creates a local libtool stub from the current configuration,
+for use in further configure time tests before the real libtool is
+generated.
+
+Usage: $[0] [[OPTIONS]]
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -q, --quiet do not print progress messages
+ -d, --debug don't remove temporary files
+
+Report bugs to <bug-libtool@gnu.org>."
+
+lt_cl_version="\
+m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl
+m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION])
+configured by $[0], generated by m4_PACKAGE_STRING.
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.lt script is free software; the Free Software Foundation
+gives unlimited permision to copy, distribute and modify it."
+
+while test $[#] != 0
+do
+ case $[1] in
+ --version | --v* | -V )
+ echo "$lt_cl_version"; exit 0 ;;
+ --help | --h* | -h )
+ echo "$lt_cl_help"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --quiet | --q* | --silent | --s* | -q )
+ lt_cl_silent=: ;;
+
+ -*) AC_MSG_ERROR([unrecognized option: $[1]
+Try \`$[0] --help' for more information.]) ;;
+
+ *) AC_MSG_ERROR([unrecognized argument: $[1]
+Try \`$[0] --help' for more information.]) ;;
+ esac
+ shift
+done
+
+if $lt_cl_silent; then
+ exec AS_MESSAGE_FD>/dev/null
+fi
+_LTEOF
+
+cat >>"$CONFIG_LT" <<_LTEOF
+_LT_OUTPUT_LIBTOOL_COMMANDS_INIT
+_LTEOF
+
+cat >>"$CONFIG_LT" <<\_LTEOF
+AC_MSG_NOTICE([creating $ofile])
+_LT_OUTPUT_LIBTOOL_COMMANDS
+AS_EXIT(0)
+_LTEOF
+chmod +x "$CONFIG_LT"
+
+# configure is writing to config.log, but config.lt does its own redirection,
+# appending to config.log, which fails on DOS, as config.log is still kept
+# open by configure. Here we exec the FD to /dev/null, effectively closing
+# config.log, so it can be properly (re)opened and appended to by config.lt.
+if test "$no_create" != yes; then
+ lt_cl_success=:
+ test "$silent" = yes &&
+ lt_config_lt_args="$lt_config_lt_args --quiet"
+ exec AS_MESSAGE_LOG_FD>/dev/null
+ $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false
+ exec AS_MESSAGE_LOG_FD>>config.log
+ $lt_cl_success || AS_EXIT(1)
+fi
+])# LT_OUTPUT
+
+
+# _LT_CONFIG(TAG)
+# ---------------
+# If TAG is the built-in tag, create an initial libtool script with a
+# default configuration from the untagged config vars. Otherwise add code
+# to config.status for appending the configuration named by TAG from the
+# matching tagged config vars.
+m4_defun([_LT_CONFIG],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_CONFIG_SAVE_COMMANDS([
+ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl
+ m4_if(_LT_TAG, [C], [
+ # See if we are running on zsh, and set the options which allow our
+ # commands through without removal of \ escapes.
+ if test -n "${ZSH_VERSION+set}" ; then
+ setopt NO_GLOB_SUBST
+ fi
+
+ cfgfile="${ofile}T"
+ trap "$RM \"$cfgfile\"; exit 1" 1 2 15
+ $RM "$cfgfile"
+
+ cat <<_LT_EOF >> "$cfgfile"
+#! $SHELL
+
+# `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services.
+# Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION
+# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
+# NOTE: Changes made to this file will be lost: look at ltmain.sh.
+#
+_LT_COPYING
+_LT_LIBTOOL_TAGS
+
+# ### BEGIN LIBTOOL CONFIG
+_LT_LIBTOOL_CONFIG_VARS
+_LT_LIBTOOL_TAG_VARS
+# ### END LIBTOOL CONFIG
+
+_LT_EOF
+
+ case $host_os in
+ aix3*)
+ cat <<\_LT_EOF >> "$cfgfile"
+# AIX sometimes has problems with the GCC collect2 program. For some
+# reason, if we set the COLLECT_NAMES environment variable, the problems
+# vanish in a puff of smoke.
+if test "X${COLLECT_NAMES+set}" != Xset; then
+ COLLECT_NAMES=
+ export COLLECT_NAMES
+fi
+_LT_EOF
+ ;;
+ esac
+
+ _LT_PROG_LTMAIN
+
+ # We use sed instead of cat because bash on DJGPP gets confused if
+ # if finds mixed CR/LF and LF-only lines. Since sed operates in
+ # text mode, it properly converts lines to CR/LF. This bash problem
+ # is reportedly fixed, but why not run on old versions too?
+ sed '/^# Generated shell functions inserted here/q' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ _LT_PROG_XSI_SHELLFNS
+
+ sed -n '/^# Generated shell functions inserted here/,$p' "$ltmain" >> "$cfgfile" \
+ || (rm -f "$cfgfile"; exit 1)
+
+ mv -f "$cfgfile" "$ofile" ||
+ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile")
+ chmod +x "$ofile"
+],
+[cat <<_LT_EOF >> "$ofile"
+
+dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded
+dnl in a comment (ie after a #).
+# ### BEGIN LIBTOOL TAG CONFIG: $1
+_LT_LIBTOOL_TAG_VARS(_LT_TAG)
+# ### END LIBTOOL TAG CONFIG: $1
+_LT_EOF
+])dnl /m4_if
+],
+[m4_if([$1], [], [
+ PACKAGE='$PACKAGE'
+ VERSION='$VERSION'
+ TIMESTAMP='$TIMESTAMP'
+ RM='$RM'
+ ofile='$ofile'], [])
+])dnl /_LT_CONFIG_SAVE_COMMANDS
+])# _LT_CONFIG
+
+
+# LT_SUPPORTED_TAG(TAG)
+# ---------------------
+# Trace this macro to discover what tags are supported by the libtool
+# --tag option, using:
+# autoconf --trace 'LT_SUPPORTED_TAG:$1'
+AC_DEFUN([LT_SUPPORTED_TAG], [])
+
+
+# C support is built-in for now
+m4_define([_LT_LANG_C_enabled], [])
+m4_define([_LT_TAGS], [])
+
+
+# LT_LANG(LANG)
+# -------------
+# Enable libtool support for the given language if not already enabled.
+AC_DEFUN([LT_LANG],
+[AC_BEFORE([$0], [LT_OUTPUT])dnl
+m4_case([$1],
+ [C], [_LT_LANG(C)],
+ [C++], [_LT_LANG(CXX)],
+ [Java], [_LT_LANG(GCJ)],
+ [Fortran 77], [_LT_LANG(F77)],
+ [Fortran], [_LT_LANG(FC)],
+ [Windows Resource], [_LT_LANG(RC)],
+ [m4_ifdef([_LT_LANG_]$1[_CONFIG],
+ [_LT_LANG($1)],
+ [m4_fatal([$0: unsupported language: "$1"])])])dnl
+])# LT_LANG
+
+
+# _LT_LANG(LANGNAME)
+# ------------------
+m4_defun([_LT_LANG],
+[m4_ifdef([_LT_LANG_]$1[_enabled], [],
+ [LT_SUPPORTED_TAG([$1])dnl
+ m4_append([_LT_TAGS], [$1 ])dnl
+ m4_define([_LT_LANG_]$1[_enabled], [])dnl
+ _LT_LANG_$1_CONFIG($1)])dnl
+])# _LT_LANG
+
+
+# _LT_LANG_DEFAULT_CONFIG
+# -----------------------
+m4_defun([_LT_LANG_DEFAULT_CONFIG],
+[AC_PROVIDE_IFELSE([AC_PROG_CXX],
+ [LT_LANG(CXX)],
+ [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_F77],
+ [LT_LANG(F77)],
+ [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])])
+
+AC_PROVIDE_IFELSE([AC_PROG_FC],
+ [LT_LANG(FC)],
+ [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])])
+
+dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal
+dnl pulling things in needlessly.
+AC_PROVIDE_IFELSE([AC_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [AC_PROVIDE_IFELSE([LT_PROG_GCJ],
+ [LT_LANG(GCJ)],
+ [m4_ifdef([AC_PROG_GCJ],
+ [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([A][M_PROG_GCJ],
+ [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])])
+ m4_ifdef([LT_PROG_GCJ],
+ [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])])
+
+AC_PROVIDE_IFELSE([LT_PROG_RC],
+ [LT_LANG(RC)],
+ [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])])
+])# _LT_LANG_DEFAULT_CONFIG
+
+# Obsolete macros:
+AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)])
+AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)])
+AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)])
+AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_CXX], [])
+dnl AC_DEFUN([AC_LIBTOOL_F77], [])
+dnl AC_DEFUN([AC_LIBTOOL_FC], [])
+dnl AC_DEFUN([AC_LIBTOOL_GCJ], [])
+
+
+# _LT_TAG_COMPILER
+# ----------------
+m4_defun([_LT_TAG_COMPILER],
+[AC_REQUIRE([AC_PROG_CC])dnl
+
+_LT_DECL([LTCC], [CC], [1], [A C compiler])dnl
+_LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl
+_LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl
+_LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl
+
+# If no C compiler was specified, use CC.
+LTCC=${LTCC-"$CC"}
+
+# If no C compiler flags were specified, use CFLAGS.
+LTCFLAGS=${LTCFLAGS-"$CFLAGS"}
+
+# Allow CC to be a program name with arguments.
+compiler=$CC
+])# _LT_TAG_COMPILER
+
+
+# _LT_COMPILER_BOILERPLATE
+# ------------------------
+# Check for compiler boilerplate output or warnings with
+# the simple compiler test code.
+m4_defun([_LT_COMPILER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_compile_test_code" >conftest.$ac_ext
+eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_compiler_boilerplate=`cat conftest.err`
+$RM conftest*
+])# _LT_COMPILER_BOILERPLATE
+
+
+# _LT_LINKER_BOILERPLATE
+# ----------------------
+# Check for linker boilerplate output or warnings with
+# the simple link test code.
+m4_defun([_LT_LINKER_BOILERPLATE],
+[m4_require([_LT_DECL_SED])dnl
+ac_outfile=conftest.$ac_objext
+echo "$lt_simple_link_test_code" >conftest.$ac_ext
+eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err
+_lt_linker_boilerplate=`cat conftest.err`
+$RM -r conftest*
+])# _LT_LINKER_BOILERPLATE
+
+# _LT_REQUIRED_DARWIN_CHECKS
+# -------------------------
+m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
+ case $host_os in
+ rhapsody* | darwin*)
+ AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:])
+ AC_CHECK_TOOL([NMEDIT], [nmedit], [:])
+ AC_CHECK_TOOL([LIPO], [lipo], [:])
+ AC_CHECK_TOOL([OTOOL], [otool], [:])
+ AC_CHECK_TOOL([OTOOL64], [otool64], [:])
+ _LT_DECL([], [DSYMUTIL], [1],
+ [Tool to manipulate archived DWARF debug symbol files on Mac OS X])
+ _LT_DECL([], [NMEDIT], [1],
+ [Tool to change global to local symbols on Mac OS X])
+ _LT_DECL([], [LIPO], [1],
+ [Tool to manipulate fat objects and archives on Mac OS X])
+ _LT_DECL([], [OTOOL], [1],
+ [ldd/readelf like tool for Mach-O binaries on Mac OS X])
+ _LT_DECL([], [OTOOL64], [1],
+ [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4])
+
+ AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod],
+ [lt_cv_apple_cc_single_mod=no
+ if test -z "${LT_MULTI_MODULE}"; then
+ # By default we will add the -single_module flag. You can override
+ # by either setting the environment variable LT_MULTI_MODULE
+ # non-empty at configure time, or by adding -multi_module to the
+ # link flags.
+ rm -rf libconftest.dylib*
+ echo "int foo(void){return 1;}" > conftest.c
+ echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+-dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD
+ $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \
+ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err
+ _lt_result=$?
+ if test -f libconftest.dylib && test ! -s conftest.err && test $_lt_result = 0; then
+ lt_cv_apple_cc_single_mod=yes
+ else
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf libconftest.dylib*
+ rm -f conftest.*
+ fi])
+ AC_CACHE_CHECK([for -exported_symbols_list linker flag],
+ [lt_cv_ld_exported_symbols_list],
+ [lt_cv_ld_exported_symbols_list=no
+ save_LDFLAGS=$LDFLAGS
+ echo "_main" > conftest.sym
+ LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [lt_cv_ld_exported_symbols_list=yes],
+ [lt_cv_ld_exported_symbols_list=no])
+ LDFLAGS="$save_LDFLAGS"
+ ])
+ case $host_os in
+ rhapsody* | darwin1.[[012]])
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
+ darwin1.*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ darwin*) # darwin 5.x on
+ # if running on 10.5 or later, the deployment target defaults
+ # to the OS version, if on x86, and 10.4, the deployment
+ # target defaults to 10.4. Don't you love it?
+ case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
+ 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ 10.[[012]]*)
+ _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
+ 10.*)
+ _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
+ esac
+ ;;
+ esac
+ if test "$lt_cv_apple_cc_single_mod" = "yes"; then
+ _lt_dar_single_mod='$single_module'
+ fi
+ if test "$lt_cv_ld_exported_symbols_list" = "yes"; then
+ _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym'
+ else
+ _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}'
+ fi
+ if test "$DSYMUTIL" != ":"; then
+ _lt_dsymutil='~$DSYMUTIL $lib || :'
+ else
+ _lt_dsymutil=
+ fi
+ ;;
+ esac
+])
+
+
+# _LT_DARWIN_LINKER_FEATURES
+# --------------------------
+# Checks for linker and compiler features on darwin
+m4_defun([_LT_DARWIN_LINKER_FEATURES],
+[
+ m4_require([_LT_REQUIRED_DARWIN_CHECKS])
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_automatic, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=''
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined"
+ case $cc_basename in
+ ifort*) _lt_dar_can_shared=yes ;;
+ *) _lt_dar_can_shared=$GCC ;;
+ esac
+ if test "$_lt_dar_can_shared" = "yes"; then
+ output_verbose_link_cmd=echo
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}"
+ _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}"
+ _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
+ m4_if([$1], [CXX],
+[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
+ _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
+ fi
+],[])
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+])
+
+# _LT_SYS_MODULE_PATH_AIX
+# -----------------------
+# Links a minimal program and checks the executable
+# for the system default hardcoded library path. In most cases,
+# this is /usr/lib:/lib, but when the MPI compilers are used
+# the location of the communication and MPI libs are included too.
+# If we don't find anything, use the default library path according
+# to the aix ld manual.
+m4_defun([_LT_SYS_MODULE_PATH_AIX],
+[m4_require([_LT_DECL_SED])dnl
+AC_LINK_IFELSE(AC_LANG_PROGRAM,[
+lt_aix_libpath_sed='
+ /Import File Strings/,/^$/ {
+ /^0/ {
+ s/^0 *\(.*\)$/\1/
+ p
+ }
+ }'
+aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+# Check for a 64-bit object if we didn't find anything.
+if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"`
+fi],[])
+if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi
+])# _LT_SYS_MODULE_PATH_AIX
+
+
+# _LT_SHELL_INIT(ARG)
+# -------------------
+m4_define([_LT_SHELL_INIT],
+[ifdef([AC_DIVERSION_NOTICE],
+ [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)],
+ [AC_DIVERT_PUSH(NOTICE)])
+$1
+AC_DIVERT_POP
+])# _LT_SHELL_INIT
+
+
+# _LT_PROG_ECHO_BACKSLASH
+# -----------------------
+# Add some code to the start of the generated configure script which
+# will find an echo command which doesn't interpret backslashes.
+m4_defun([_LT_PROG_ECHO_BACKSLASH],
+[_LT_SHELL_INIT([
+# Check that we are running under the correct shell.
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+case X$lt_ECHO in
+X*--fallback-echo)
+ # Remove one level of quotation (which was required for Make).
+ ECHO=`echo "$lt_ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','`
+ ;;
+esac
+
+ECHO=${lt_ECHO-echo}
+if test "X[$]1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X[$]1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' ; then
+ # Yippee, $ECHO works!
+ :
+else
+ # Restart under the correct shell.
+ exec $SHELL "[$]0" --no-reexec ${1+"[$]@"}
+fi
+
+if test "X[$]1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<_LT_EOF
+[$]*
+_LT_EOF
+ exit 0
+fi
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
+
+if test -z "$lt_ECHO"; then
+ if test "X${echo_test_string+set}" != Xset; then
+ # find a string as large as possible, as long as the shell can cope with it
+ for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do
+ # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ...
+ if { echo_test_string=`eval $cmd`; } 2>/dev/null &&
+ { test "X$echo_test_string" = "X$echo_test_string"; } 2>/dev/null
+ then
+ break
+ fi
+ done
+ fi
+
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ :
+ else
+ # The Solaris, AIX, and Digital Unix default echo programs unquote
+ # backslashes. This makes it impossible to quote backslashes using
+ # echo "$something" | sed 's/\\/\\\\/g'
+ #
+ # So, first we look for a working echo in the user's PATH.
+
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for dir in $PATH /usr/ucb; do
+ IFS="$lt_save_ifs"
+ if (test -f $dir/echo || test -f $dir/echo$ac_exeext) &&
+ test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$dir/echo"
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+
+ if test "X$ECHO" = Xecho; then
+ # We didn't find a better echo, so look for alternatives.
+ if test "X`{ print -r '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ print -r "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # This shell has a builtin print -r that does the trick.
+ ECHO='print -r'
+ elif { test -f /bin/ksh || test -f /bin/ksh$ac_exeext; } &&
+ test "X$CONFIG_SHELL" != X/bin/ksh; then
+ # If we have ksh, try running configure again with it.
+ ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+ export ORIGINAL_CONFIG_SHELL
+ CONFIG_SHELL=/bin/ksh
+ export CONFIG_SHELL
+ exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"}
+ else
+ # Try using printf.
+ ECHO='printf %s\n'
+ if test "X`{ $ECHO '\t'; } 2>/dev/null`" = 'X\t' &&
+ echo_testing_string=`{ $ECHO "$echo_test_string"; } 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ # Cool, printf works
+ :
+ elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL
+ export CONFIG_SHELL
+ SHELL="$CONFIG_SHELL"
+ export SHELL
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` &&
+ test "X$echo_testing_string" = 'X\t' &&
+ echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` &&
+ test "X$echo_testing_string" = "X$echo_test_string"; then
+ ECHO="$CONFIG_SHELL [$]0 --fallback-echo"
+ else
+ # maybe with a smaller string...
+ prev=:
+
+ for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do
+ if { test "X$echo_test_string" = "X`eval $cmd`"; } 2>/dev/null
+ then
+ break
+ fi
+ prev="$cmd"
+ done
+
+ if test "$prev" != 'sed 50q "[$]0"'; then
+ echo_test_string=`eval $prev`
+ export echo_test_string
+ exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"}
+ else
+ # Oops. We lost completely, so just stick with echo.
+ ECHO=echo
+ fi
+ fi
+ fi
+ fi
+ fi
+fi
+
+# Copy echo and quote the copy suitably for passing to libtool from
+# the Makefile, instead of quoting the original, which is used later.
+lt_ECHO=$ECHO
+if test "X$lt_ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then
+ lt_ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo"
+fi
+
+AC_SUBST(lt_ECHO)
+])
+_LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts])
+_LT_DECL([], [ECHO], [1],
+ [An echo program that does not interpret backslashes])
+])# _LT_PROG_ECHO_BACKSLASH
+
+
+# _LT_ENABLE_LOCK
+# ---------------
+m4_defun([_LT_ENABLE_LOCK],
+[AC_ARG_ENABLE([libtool-lock],
+ [AS_HELP_STRING([--disable-libtool-lock],
+ [avoid locking (might break parallel builds)])])
+test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+ia64-*-hpux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *ELF-32*)
+ HPUX_IA64_MODE="32"
+ ;;
+ *ELF-64*)
+ HPUX_IA64_MODE="64"
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+*-*-irix6*)
+ # Find out which ABI we are using.
+ echo '[#]line __oline__ "configure"' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -melf32bsmip"
+ ;;
+ *N32*)
+ LD="${LD-ld} -melf32bmipn32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -melf64bmip"
+ ;;
+ esac
+ else
+ case `/usr/bin/file conftest.$ac_objext` in
+ *32-bit*)
+ LD="${LD-ld} -32"
+ ;;
+ *N32*)
+ LD="${LD-ld} -n32"
+ ;;
+ *64-bit*)
+ LD="${LD-ld} -64"
+ ;;
+ esac
+ fi
+ fi
+ rm -rf conftest*
+ ;;
+
+x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \
+s390*-*linux*|s390*-*tpf*|sparc*-*linux*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *32-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_i386_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_i386"
+ ;;
+ ppc64-*linux*|powerpc64-*linux*)
+ LD="${LD-ld} -m elf32ppclinux"
+ ;;
+ s390x-*linux*)
+ LD="${LD-ld} -m elf_s390"
+ ;;
+ sparc64-*linux*)
+ LD="${LD-ld} -m elf32_sparc"
+ ;;
+ esac
+ ;;
+ *64-bit*)
+ case $host in
+ x86_64-*kfreebsd*-gnu)
+ LD="${LD-ld} -m elf_x86_64_fbsd"
+ ;;
+ x86_64-*linux*)
+ LD="${LD-ld} -m elf_x86_64"
+ ;;
+ ppc*-*linux*|powerpc*-*linux*)
+ LD="${LD-ld} -m elf64ppc"
+ ;;
+ s390*-*linux*|s390*-*tpf*)
+ LD="${LD-ld} -m elf64_s390"
+ ;;
+ sparc*-*linux*)
+ LD="${LD-ld} -m elf64_sparc"
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+
+*-*-sco3.2v5*)
+ # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+ SAVE_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -belf"
+ AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf,
+ [AC_LANG_PUSH(C)
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no])
+ AC_LANG_POP])
+ if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+ # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+ CFLAGS="$SAVE_CFLAGS"
+ fi
+ ;;
+sparc*-*solaris*)
+ # Find out which ABI we are using.
+ echo 'int i;' > conftest.$ac_ext
+ if AC_TRY_EVAL(ac_compile); then
+ case `/usr/bin/file conftest.o` in
+ *64-bit*)
+ case $lt_cv_prog_gnu_ld in
+ yes*) LD="${LD-ld} -m elf64_sparc" ;;
+ *)
+ if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then
+ LD="${LD-ld} -64"
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ rm -rf conftest*
+ ;;
+esac
+
+need_locks="$enable_libtool_lock"
+])# _LT_ENABLE_LOCK
+
+
+# _LT_CMD_OLD_ARCHIVE
+# -------------------
+m4_defun([_LT_CMD_OLD_ARCHIVE],
+[AC_CHECK_TOOL(AR, ar, false)
+test -z "$AR" && AR=ar
+test -z "$AR_FLAGS" && AR_FLAGS=cru
+_LT_DECL([], [AR], [1], [The archiver])
+_LT_DECL([], [AR_FLAGS], [1])
+
+AC_CHECK_TOOL(STRIP, strip, :)
+test -z "$STRIP" && STRIP=:
+_LT_DECL([], [STRIP], [1], [A symbol stripping program])
+
+AC_CHECK_TOOL(RANLIB, ranlib, :)
+test -z "$RANLIB" && RANLIB=:
+_LT_DECL([], [RANLIB], [1],
+ [Commands used to install an old-style archive])
+
+# Determine commands to create old-style static archives.
+old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs'
+old_postinstall_cmds='chmod 644 $oldlib'
+old_postuninstall_cmds=
+
+if test -n "$RANLIB"; then
+ case $host_os in
+ openbsd*)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib"
+ ;;
+ *)
+ old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib"
+ ;;
+ esac
+ old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib"
+fi
+_LT_DECL([], [old_postinstall_cmds], [2])
+_LT_DECL([], [old_postuninstall_cmds], [2])
+_LT_TAGDECL([], [old_archive_cmds], [2],
+ [Commands used to build an old-style archive])
+])# _LT_CMD_OLD_ARCHIVE
+
+
+# _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------------------
+# Check whether the given compiler option works
+AC_DEFUN([_LT_COMPILER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4])
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+ lt_compiler_flag="$3"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ # The option is referenced via a variable to avoid confusing sed.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>conftest.err)
+ ac_status=$?
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s "$ac_outfile"; then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings other than the usual output.
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ fi
+ $RM conftest*
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$5], , :, [$5])
+else
+ m4_if([$6], , :, [$6])
+fi
+])# _LT_COMPILER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [])
+
+
+# _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS,
+# [ACTION-SUCCESS], [ACTION-FAILURE])
+# ----------------------------------------------------
+# Check whether the given linker option works
+AC_DEFUN([_LT_LINKER_OPTION],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_CACHE_CHECK([$1], [$2],
+ [$2=no
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS $3"
+ echo "$lt_simple_link_test_code" > conftest.$ac_ext
+ if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then
+ # The linker can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ if test -s conftest.err; then
+ # Append any errors to the config.log.
+ cat conftest.err 1>&AS_MESSAGE_LOG_FD
+ $ECHO "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp
+ $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2
+ if diff conftest.exp conftest.er2 >/dev/null; then
+ $2=yes
+ fi
+ else
+ $2=yes
+ fi
+ fi
+ $RM -r conftest*
+ LDFLAGS="$save_LDFLAGS"
+])
+
+if test x"[$]$2" = xyes; then
+ m4_if([$4], , :, [$4])
+else
+ m4_if([$5], , :, [$5])
+fi
+])# _LT_LINKER_OPTION
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [])
+
+
+# LT_CMD_MAX_LEN
+#---------------
+AC_DEFUN([LT_CMD_MAX_LEN],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# find the maximum length of command line arguments
+AC_MSG_CHECKING([the maximum length of command line arguments])
+AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl
+ i=0
+ teststring="ABCD"
+
+ case $build_os in
+ msdosdjgpp*)
+ # On DJGPP, this test can blow up pretty badly due to problems in libc
+ # (any single argument exceeding 2000 bytes causes a buffer overrun
+ # during glob expansion). Even if it were fixed, the result of this
+ # check would be larger than it should be.
+ lt_cv_sys_max_cmd_len=12288; # 12K is about right
+ ;;
+
+ gnu*)
+ # Under GNU Hurd, this test is not required because there is
+ # no limit to the length of command line arguments.
+ # Libtool will interpret -1 as no limit whatsoever
+ lt_cv_sys_max_cmd_len=-1;
+ ;;
+
+ cygwin* | mingw* | cegcc*)
+ # On Win9x/ME, this test blows up -- it succeeds, but takes
+ # about 5 minutes as the teststring grows exponentially.
+ # Worse, since 9x/ME are not pre-emptively multitasking,
+ # you end up with a "frozen" computer, even though with patience
+ # the test eventually succeeds (with a max line length of 256k).
+ # Instead, let's just punt: use the minimum linelength reported by
+ # all of the supported platforms: 8192 (on NT/2K/XP).
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ amigaos*)
+ # On AmigaOS with pdksh, this test takes hours, literally.
+ # So we just punt and use a minimum line length of 8192.
+ lt_cv_sys_max_cmd_len=8192;
+ ;;
+
+ netbsd* | freebsd* | openbsd* | darwin* | dragonfly*)
+ # This has been around since 386BSD, at least. Likely further.
+ if test -x /sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax`
+ elif test -x /usr/sbin/sysctl; then
+ lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax`
+ else
+ lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs
+ fi
+ # And add a safety zone
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ ;;
+
+ interix*)
+ # We know the value 262144 and hardcode it with a safety zone (like BSD)
+ lt_cv_sys_max_cmd_len=196608
+ ;;
+
+ osf*)
+ # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure
+ # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not
+ # nice to cause kernel panics so lets avoid the loop below.
+ # First set a reasonable default.
+ lt_cv_sys_max_cmd_len=16384
+ #
+ if test -x /sbin/sysconfig; then
+ case `/sbin/sysconfig -q proc exec_disable_arg_limit` in
+ *1*) lt_cv_sys_max_cmd_len=-1 ;;
+ esac
+ fi
+ ;;
+ sco3.2v5*)
+ lt_cv_sys_max_cmd_len=102400
+ ;;
+ sysv5* | sco5v6* | sysv4.2uw2*)
+ kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null`
+ if test -n "$kargmax"; then
+ lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'`
+ else
+ lt_cv_sys_max_cmd_len=32768
+ fi
+ ;;
+ *)
+ lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null`
+ if test -n "$lt_cv_sys_max_cmd_len"; then
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4`
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3`
+ else
+ # Make teststring a little bigger before we do anything with it.
+ # a 1K string should be a reasonable start.
+ for i in 1 2 3 4 5 6 7 8 ; do
+ teststring=$teststring$teststring
+ done
+ SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}}
+ # If test is not a shell built-in, we'll probably end up computing a
+ # maximum length that is only half of the actual maximum length, but
+ # we can't tell.
+ while { test "X"`$SHELL [$]0 --fallback-echo "X$teststring$teststring" 2>/dev/null` \
+ = "XX$teststring$teststring"; } >/dev/null 2>&1 &&
+ test $i != 17 # 1/2 MB should be enough
+ do
+ i=`expr $i + 1`
+ teststring=$teststring$teststring
+ done
+ # Only check the string length outside the loop.
+ lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1`
+ teststring=
+ # Add a significant safety factor because C++ compilers can tack on
+ # massive amounts of additional arguments before passing them to the
+ # linker. It appears as though 1/2 is a usable value.
+ lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2`
+ fi
+ ;;
+ esac
+])
+if test -n $lt_cv_sys_max_cmd_len ; then
+ AC_MSG_RESULT($lt_cv_sys_max_cmd_len)
+else
+ AC_MSG_RESULT(none)
+fi
+max_cmd_len=$lt_cv_sys_max_cmd_len
+_LT_DECL([], [max_cmd_len], [0],
+ [What is the maximum length of a command?])
+])# LT_CMD_MAX_LEN
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [])
+
+
+# _LT_HEADER_DLFCN
+# ----------------
+m4_defun([_LT_HEADER_DLFCN],
+[AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl
+])# _LT_HEADER_DLFCN
+
+
+# _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE,
+# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING)
+# ----------------------------------------------------------------
+m4_defun([_LT_TRY_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "$cross_compiling" = yes; then :
+ [$4]
+else
+ lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
+ lt_status=$lt_dlunknown
+ cat > conftest.$ac_ext <<_LT_EOF
+[#line __oline__ "configure"
+#include "confdefs.h"
+
+#if HAVE_DLFCN_H
+#include <dlfcn.h>
+#endif
+
+#include <stdio.h>
+
+#ifdef RTLD_GLOBAL
+# define LT_DLGLOBAL RTLD_GLOBAL
+#else
+# ifdef DL_GLOBAL
+# define LT_DLGLOBAL DL_GLOBAL
+# else
+# define LT_DLGLOBAL 0
+# endif
+#endif
+
+/* We may have to define LT_DLLAZY_OR_NOW in the command line if we
+ find out it does not work in some platform. */
+#ifndef LT_DLLAZY_OR_NOW
+# ifdef RTLD_LAZY
+# define LT_DLLAZY_OR_NOW RTLD_LAZY
+# else
+# ifdef DL_LAZY
+# define LT_DLLAZY_OR_NOW DL_LAZY
+# else
+# ifdef RTLD_NOW
+# define LT_DLLAZY_OR_NOW RTLD_NOW
+# else
+# ifdef DL_NOW
+# define LT_DLLAZY_OR_NOW DL_NOW
+# else
+# define LT_DLLAZY_OR_NOW 0
+# endif
+# endif
+# endif
+# endif
+#endif
+
+void fnord() { int i=42;}
+int main ()
+{
+ void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW);
+ int status = $lt_dlunknown;
+
+ if (self)
+ {
+ if (dlsym (self,"fnord")) status = $lt_dlno_uscore;
+ else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore;
+ /* dlclose (self); */
+ }
+ else
+ puts (dlerror ());
+
+ return status;
+}]
+_LT_EOF
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then
+ (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null
+ lt_status=$?
+ case x$lt_status in
+ x$lt_dlno_uscore) $1 ;;
+ x$lt_dlneed_uscore) $2 ;;
+ x$lt_dlunknown|x*) $3 ;;
+ esac
+ else :
+ # compilation failed
+ $3
+ fi
+fi
+rm -fr conftest*
+])# _LT_TRY_DLOPEN_SELF
+
+
+# LT_SYS_DLOPEN_SELF
+# ------------------
+AC_DEFUN([LT_SYS_DLOPEN_SELF],
+[m4_require([_LT_HEADER_DLFCN])dnl
+if test "x$enable_dlopen" != xyes; then
+ enable_dlopen=unknown
+ enable_dlopen_self=unknown
+ enable_dlopen_self_static=unknown
+else
+ lt_cv_dlopen=no
+ lt_cv_dlopen_libs=
+
+ case $host_os in
+ beos*)
+ lt_cv_dlopen="load_add_on"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ;;
+
+ mingw* | pw32* | cegcc*)
+ lt_cv_dlopen="LoadLibrary"
+ lt_cv_dlopen_libs=
+ ;;
+
+ cygwin*)
+ lt_cv_dlopen="dlopen"
+ lt_cv_dlopen_libs=
+ ;;
+
+ darwin*)
+ # if libdl is installed we need to link against it
+ AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[
+ lt_cv_dlopen="dyld"
+ lt_cv_dlopen_libs=
+ lt_cv_dlopen_self=yes
+ ])
+ ;;
+
+ *)
+ AC_CHECK_FUNC([shl_load],
+ [lt_cv_dlopen="shl_load"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"],
+ [AC_CHECK_FUNC([dlopen],
+ [lt_cv_dlopen="dlopen"],
+ [AC_CHECK_LIB([dl], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"],
+ [AC_CHECK_LIB([dld], [dld_link],
+ [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"])
+ ])
+ ])
+ ])
+ ])
+ ])
+ ;;
+ esac
+
+ if test "x$lt_cv_dlopen" != xno; then
+ enable_dlopen=yes
+ else
+ enable_dlopen=no
+ fi
+
+ case $lt_cv_dlopen in
+ dlopen)
+ save_CPPFLAGS="$CPPFLAGS"
+ test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H"
+
+ save_LDFLAGS="$LDFLAGS"
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\"
+
+ save_LIBS="$LIBS"
+ LIBS="$lt_cv_dlopen_libs $LIBS"
+
+ AC_CACHE_CHECK([whether a program can dlopen itself],
+ lt_cv_dlopen_self, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes,
+ lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross)
+ ])
+
+ if test "x$lt_cv_dlopen_self" = xyes; then
+ wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\"
+ AC_CACHE_CHECK([whether a statically linked program can dlopen itself],
+ lt_cv_dlopen_self_static, [dnl
+ _LT_TRY_DLOPEN_SELF(
+ lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes,
+ lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross)
+ ])
+ fi
+
+ CPPFLAGS="$save_CPPFLAGS"
+ LDFLAGS="$save_LDFLAGS"
+ LIBS="$save_LIBS"
+ ;;
+ esac
+
+ case $lt_cv_dlopen_self in
+ yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;;
+ *) enable_dlopen_self=unknown ;;
+ esac
+
+ case $lt_cv_dlopen_self_static in
+ yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;;
+ *) enable_dlopen_self_static=unknown ;;
+ esac
+fi
+_LT_DECL([dlopen_support], [enable_dlopen], [0],
+ [Whether dlopen is supported])
+_LT_DECL([dlopen_self], [enable_dlopen_self], [0],
+ [Whether dlopen of programs is supported])
+_LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0],
+ [Whether dlopen of statically linked programs is supported])
+])# LT_SYS_DLOPEN_SELF
+
+# Old name:
+AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [])
+
+
+# _LT_COMPILER_C_O([TAGNAME])
+# ---------------------------
+# Check to see if options -c and -o are simultaneously supported by compiler.
+# This macro does not hard code the compiler like AC_PROG_CC_C_O.
+m4_defun([_LT_COMPILER_C_O],
+[m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)],
+ [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no
+ $RM -r conftest 2>/dev/null
+ mkdir conftest
+ cd conftest
+ mkdir out
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ lt_compiler_flag="-o out/conftest2.$ac_objext"
+ # Insert the option either (1) after the last *FLAGS variable, or
+ # (2) before a word containing "conftest.", or (3) at the end.
+ # Note that $ac_compile itself does not contain backslashes and begins
+ # with a dollar sign (not a hyphen), so the echo should work correctly.
+ lt_compile=`echo "$ac_compile" | $SED \
+ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
+ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \
+ -e 's:$: $lt_compiler_flag:'`
+ (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$lt_compile" 2>out/conftest.err)
+ ac_status=$?
+ cat out/conftest.err >&AS_MESSAGE_LOG_FD
+ echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD
+ if (exit $ac_status) && test -s out/conftest2.$ac_objext
+ then
+ # The compiler can only warn and ignore the option if not recognized
+ # So say no if there are warnings
+ $ECHO "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp
+ $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2
+ if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then
+ _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+ fi
+ fi
+ chmod u+w . 2>&AS_MESSAGE_LOG_FD
+ $RM conftest*
+ # SGI C++ compiler will create directory out/ii_files/ for
+ # template instantiation
+ test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files
+ $RM out/* && rmdir out
+ cd ..
+ $RM -r conftest
+ $RM conftest*
+])
+_LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1],
+ [Does compiler simultaneously support -c and -o options?])
+])# _LT_COMPILER_C_O
+
+
+# _LT_COMPILER_FILE_LOCKS([TAGNAME])
+# ----------------------------------
+# Check to see if we can do hard links to lock some files if needed
+m4_defun([_LT_COMPILER_FILE_LOCKS],
+[m4_require([_LT_ENABLE_LOCK])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+_LT_COMPILER_C_O([$1])
+
+hard_links="nottested"
+if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then
+ # do not overwrite the value of need_locks provided by the user
+ AC_MSG_CHECKING([if we can lock with hard links])
+ hard_links=yes
+ $RM conftest*
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ touch conftest.a
+ ln conftest.a conftest.b 2>&5 || hard_links=no
+ ln conftest.a conftest.b 2>/dev/null && hard_links=no
+ AC_MSG_RESULT([$hard_links])
+ if test "$hard_links" = no; then
+ AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe])
+ need_locks=warn
+ fi
+else
+ need_locks=no
+fi
+_LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?])
+])# _LT_COMPILER_FILE_LOCKS
+
+
+# _LT_CHECK_OBJDIR
+# ----------------
+m4_defun([_LT_CHECK_OBJDIR],
+[AC_CACHE_CHECK([for objdir], [lt_cv_objdir],
+[rm -f .libs 2>/dev/null
+mkdir .libs 2>/dev/null
+if test -d .libs; then
+ lt_cv_objdir=.libs
+else
+ # MS-DOS does not allow filenames that begin with a dot.
+ lt_cv_objdir=_libs
+fi
+rmdir .libs 2>/dev/null])
+objdir=$lt_cv_objdir
+_LT_DECL([], [objdir], [0],
+ [The name of the directory that contains temporary libtool files])dnl
+m4_pattern_allow([LT_OBJDIR])dnl
+AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/",
+ [Define to the sub-directory in which libtool stores uninstalled libraries.])
+])# _LT_CHECK_OBJDIR
+
+
+# _LT_LINKER_HARDCODE_LIBPATH([TAGNAME])
+# --------------------------------------
+# Check hardcoding attributes.
+m4_defun([_LT_LINKER_HARDCODE_LIBPATH],
+[AC_MSG_CHECKING([how to hardcode library paths into programs])
+_LT_TAGVAR(hardcode_action, $1)=
+if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" ||
+ test -n "$_LT_TAGVAR(runpath_var, $1)" ||
+ test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then
+
+ # We can hardcode non-existent directories.
+ if test "$_LT_TAGVAR(hardcode_direct, $1)" != no &&
+ # If the only mechanism to avoid hardcoding is shlibpath_var, we
+ # have to relink, otherwise we might link with an installed library
+ # when we should be linking with a yet-to-be-installed one
+ ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no &&
+ test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then
+ # Linking always hardcodes the temporary library directory.
+ _LT_TAGVAR(hardcode_action, $1)=relink
+ else
+ # We can link without hardcoding, and we can hardcode nonexisting dirs.
+ _LT_TAGVAR(hardcode_action, $1)=immediate
+ fi
+else
+ # We cannot hardcode anything, or else we can only hardcode existing
+ # directories.
+ _LT_TAGVAR(hardcode_action, $1)=unsupported
+fi
+AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)])
+
+if test "$_LT_TAGVAR(hardcode_action, $1)" = relink ||
+ test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then
+ # Fast installation is not supported
+ enable_fast_install=no
+elif test "$shlibpath_overrides_runpath" = yes ||
+ test "$enable_shared" = no; then
+ # Fast installation is not necessary
+ enable_fast_install=needless
+fi
+_LT_TAGDECL([], [hardcode_action], [0],
+ [How to hardcode a shared library path into an executable])
+])# _LT_LINKER_HARDCODE_LIBPATH
+
+
+# _LT_CMD_STRIPLIB
+# ----------------
+m4_defun([_LT_CMD_STRIPLIB],
+[m4_require([_LT_DECL_EGREP])
+striplib=
+old_striplib=
+AC_MSG_CHECKING([whether stripping libraries is possible])
+if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then
+ test -z "$old_striplib" && old_striplib="$STRIP --strip-debug"
+ test -z "$striplib" && striplib="$STRIP --strip-unneeded"
+ AC_MSG_RESULT([yes])
+else
+# FIXME - insert some real tests, host_os isn't really good enough
+ case $host_os in
+ darwin*)
+ if test -n "$STRIP" ; then
+ striplib="$STRIP -x"
+ old_striplib="$STRIP -S"
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+ ;;
+ *)
+ AC_MSG_RESULT([no])
+ ;;
+ esac
+fi
+_LT_DECL([], [old_striplib], [1], [Commands to strip libraries])
+_LT_DECL([], [striplib], [1])
+])# _LT_CMD_STRIPLIB
+
+
+# _LT_SYS_DYNAMIC_LINKER([TAG])
+# -----------------------------
+# PORTME Fill in your ld.so characteristics
+m4_defun([_LT_SYS_DYNAMIC_LINKER],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_OBJDUMP])dnl
+m4_require([_LT_DECL_SED])dnl
+AC_MSG_CHECKING([dynamic linker characteristics])
+m4_if([$1],
+ [], [
+if test "$GCC" = yes; then
+ case $host_os in
+ darwin*) lt_awk_arg="/^libraries:/,/LR/" ;;
+ *) lt_awk_arg="/^libraries:/" ;;
+ esac
+ lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$lt_search_path_spec" | $GREP ';' >/dev/null ; then
+ # if the path contains ";" then we assume it to be the separator
+ # otherwise default to the standard path separator (i.e. ":") - it is
+ # assumed that no part of a normal pathname contains ";" but that should
+ # okay in the real world where ";" in dirpaths is itself problematic.
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ # Ok, now we have the path, separated by spaces, we can step through it
+ # and add multilib dir if necessary.
+ lt_tmp_lt_search_path_spec=
+ lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null`
+ for lt_sys_path in $lt_search_path_spec; do
+ if test -d "$lt_sys_path/$lt_multi_os_dir"; then
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir"
+ else
+ test -d "$lt_sys_path" && \
+ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path"
+ fi
+ done
+ lt_search_path_spec=`$ECHO $lt_tmp_lt_search_path_spec | awk '
+BEGIN {RS=" "; FS="/|\n";} {
+ lt_foo="";
+ lt_count=0;
+ for (lt_i = NF; lt_i > 0; lt_i--) {
+ if ($lt_i != "" && $lt_i != ".") {
+ if ($lt_i == "..") {
+ lt_count++;
+ } else {
+ if (lt_count == 0) {
+ lt_foo="/" $lt_i lt_foo;
+ } else {
+ lt_count--;
+ }
+ }
+ }
+ }
+ if (lt_foo != "") { lt_freq[[lt_foo]]++; }
+ if (lt_freq[[lt_foo]] == 1) { print lt_foo; }
+}'`
+ sys_lib_search_path_spec=`$ECHO $lt_search_path_spec`
+else
+ sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib"
+fi])
+library_names_spec=
+libname_spec='lib$name'
+soname_spec=
+shrext_cmds=".so"
+postinstall_cmds=
+postuninstall_cmds=
+finish_cmds=
+finish_eval=
+shlibpath_var=
+shlibpath_overrides_runpath=unknown
+version_type=none
+dynamic_linker="$host_os ld.so"
+sys_lib_dlsearch_path_spec="/lib /usr/lib"
+need_lib_prefix=unknown
+hardcode_into_libs=no
+
+# when you set need_version to no, make sure it does not cause -set_version
+# flags to be left without arguments
+need_version=unknown
+
+case $host_os in
+aix3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a'
+ shlibpath_var=LIBPATH
+
+ # AIX 3 has no versioning support, so we append a major version to the name.
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+
+aix[[4-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ hardcode_into_libs=yes
+ if test "$host_cpu" = ia64; then
+ # AIX 5 supports IA64
+ library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ else
+ # With GCC up to 2.95.x, collect2 would create an import file
+ # for dependence libraries. The import file would start with
+ # the line `#! .'. This would cause the generated library to
+ # depend on `.', always an invalid library. This was fixed in
+ # development snapshots of GCC prior to 3.0.
+ case $host_os in
+ aix4 | aix4.[[01]] | aix4.[[01]].*)
+ if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)'
+ echo ' yes '
+ echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then
+ :
+ else
+ can_build_shared=no
+ fi
+ ;;
+ esac
+ # AIX (on Power*) has no versioning support, so currently we can not hardcode correct
+ # soname into executable. Probably we can add versioning support to
+ # collect2, so additional links can be useful in future.
+ if test "$aix_use_runtimelinking" = yes; then
+ # If using run time linking (on AIX 4.2 or later) use lib<name>.so
+ # instead of lib<name>.a to let people know that these are not
+ # typical AIX shared libraries.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ else
+ # We preserve .a as extension for shared libraries through AIX4.2
+ # and later when we are not doing run time linking.
+ library_names_spec='${libname}${release}.a $libname.a'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ fi
+ shlibpath_var=LIBPATH
+ fi
+ ;;
+
+amigaos*)
+ case $host_cpu in
+ powerpc)
+ # Since July 2007 AmigaOS4 officially supports .so libraries.
+ # When compiling the executable, add -use-dynld -Lsobjs: to the compileline.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ ;;
+ m68k)
+ library_names_spec='$libname.ixlibrary $libname.a'
+ # Create ${libname}_ixlibrary.a entries in /sys/libs.
+ finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$ECHO "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done'
+ ;;
+ esac
+ ;;
+
+beos*)
+ library_names_spec='${libname}${shared_ext}'
+ dynamic_linker="$host_os ld.so"
+ shlibpath_var=LIBRARY_PATH
+ ;;
+
+bsdi[[45]]*)
+ version_type=linux
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib"
+ sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib"
+ # the default ld.so.conf also contains /usr/contrib/lib and
+ # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow
+ # libtool to hard-code these into programs
+ ;;
+
+cygwin* | mingw* | pw32* | cegcc*)
+ version_type=windows
+ shrext_cmds=".dll"
+ need_version=no
+ need_lib_prefix=no
+
+ case $GCC,$host_os in
+ yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ library_names_spec='$libname.dll.a'
+ # DLL is installed to $(libdir)/../bin by postinstall_cmds
+ postinstall_cmds='base_file=`basename \${file}`~
+ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~
+ dldir=$destdir/`dirname \$dlpath`~
+ test -d \$dldir || mkdir -p \$dldir~
+ $install_prog $dir/$dlname \$dldir/$dlname~
+ chmod a+x \$dldir/$dlname~
+ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then
+ eval '\''$striplib \$dldir/$dlname'\'' || exit \$?;
+ fi'
+ postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~
+ dlpath=$dir/\$dldll~
+ $RM \$dlpath'
+ shlibpath_overrides_runpath=yes
+
+ case $host_os in
+ cygwin*)
+ # Cygwin DLLs use 'cyg' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib"
+ ;;
+ mingw* | cegcc*)
+ # MinGW DLLs use traditional 'lib' prefix
+ soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ sys_lib_search_path_spec=`$CC -print-search-dirs | $GREP "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"`
+ if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then
+ # It is most probably a Windows format PATH printed by
+ # mingw gcc, but we are running on Cygwin. Gcc prints its search
+ # path with ; separators, and with drive letters. We can handle the
+ # drive letters (cygwin fileutils understands them), so leave them,
+ # especially as we might pass files found there to a mingw objdump,
+ # which wouldn't understand a cygwinified path. Ahh.
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'`
+ else
+ sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"`
+ fi
+ ;;
+ pw32*)
+ # pw32 DLLs use 'pw' prefix rather than 'lib'
+ library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
+ ;;
+ esac
+ ;;
+
+ *)
+ library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib'
+ ;;
+ esac
+ dynamic_linker='Win32 ld.exe'
+ # FIXME: first we should search . and the directory the executable is in
+ shlibpath_var=PATH
+ ;;
+
+darwin* | rhapsody*)
+ dynamic_linker="$host_os dyld"
+ version_type=darwin
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext'
+ soname_spec='${libname}${release}${major}$shared_ext'
+ shlibpath_overrides_runpath=yes
+ shlibpath_var=DYLD_LIBRARY_PATH
+ shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`'
+m4_if([$1], [],[
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"])
+ sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib'
+ ;;
+
+dgux*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+freebsd1*)
+ dynamic_linker=no
+ ;;
+
+freebsd* | dragonfly*)
+ # DragonFly does not have aout. When/if they implement a new
+ # versioning mechanism, adjust this.
+ if test -x /usr/bin/objformat; then
+ objformat=`/usr/bin/objformat`
+ else
+ case $host_os in
+ freebsd[[123]]*) objformat=aout ;;
+ *) objformat=elf ;;
+ esac
+ fi
+ version_type=freebsd-$objformat
+ case $version_type in
+ freebsd-elf*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ need_version=no
+ need_lib_prefix=no
+ ;;
+ freebsd-*)
+ library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix'
+ need_version=yes
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_os in
+ freebsd2*)
+ shlibpath_overrides_runpath=yes
+ ;;
+ freebsd3.[[01]]* | freebsdelf3.[[01]]*)
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \
+ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1)
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+ *) # from 4.6 on, and DragonFly
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+ esac
+ ;;
+
+gnu*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ hardcode_into_libs=yes
+ ;;
+
+hpux9* | hpux10* | hpux11*)
+ # Give a soname corresponding to the major version so that dld.sl refuses to
+ # link against other versions.
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ case $host_cpu in
+ ia64*)
+ shrext_cmds='.so'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.so"
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ if test "X$HPUX_IA64_MODE" = X32; then
+ sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib"
+ else
+ sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64"
+ fi
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ hppa*64*)
+ shrext_cmds='.sl'
+ hardcode_into_libs=yes
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH
+ shlibpath_overrides_runpath=yes # Unless +noenvvar is specified.
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64"
+ sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec
+ ;;
+ *)
+ shrext_cmds='.sl'
+ dynamic_linker="$host_os dld.sl"
+ shlibpath_var=SHLIB_PATH
+ shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ ;;
+ esac
+ # HP-UX runs *really* slowly unless shared libraries are mode 555.
+ postinstall_cmds='chmod 555 $lib'
+ ;;
+
+interix[[3-9]]*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $host_os in
+ nonstopux*) version_type=nonstopux ;;
+ *)
+ if test "$lt_cv_prog_gnu_ld" = yes; then
+ version_type=linux
+ else
+ version_type=irix
+ fi ;;
+ esac
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}'
+ case $host_os in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in # libtool.m4 will add one of these switches to LD
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ")
+ libsuff= shlibsuff= libmagic=32-bit;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ")
+ libsuff=32 shlibsuff=N32 libmagic=N32;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ")
+ libsuff=64 shlibsuff=64 libmagic=64-bit;;
+ *) libsuff= shlibsuff= libmagic=never-match;;
+ esac
+ ;;
+ esac
+ shlibpath_var=LD_LIBRARY${shlibsuff}_PATH
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}"
+ sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}"
+ hardcode_into_libs=yes
+ ;;
+
+# No shared lib support for Linux oldld, aout, or coff.
+linux*oldld* | linux*aout* | linux*coff*)
+ dynamic_linker=no
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ # Some binutils ld are patched to set DT_RUNPATH
+ save_LDFLAGS=$LDFLAGS
+ save_libdir=$libdir
+ eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \
+ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\""
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])],
+ [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null],
+ [shlibpath_overrides_runpath=yes])])
+ LDFLAGS=$save_LDFLAGS
+ libdir=$save_libdir
+
+ # This implies no fast_install, which is unacceptable.
+ # Some rework will be needed to allow for fast_install
+ # before this can be enabled.
+ hardcode_into_libs=yes
+
+ # Append ld.so.conf contents to the search path
+ if test -f /etc/ld.so.conf; then
+ lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '`
+ sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra"
+ fi
+
+ # We used to test for /lib/ld.so.1 and disable shared libraries on
+ # powerpc, because MkLinux only supported shared libraries with the
+ # GNU dynamic linker. Since this was broken with cross compilers,
+ # most powerpc-linux boxes support dynamic linking these days and
+ # people can always --disable-shared, the test was removed, and we
+ # assume the GNU/Linux dynamic linker is in use.
+ dynamic_linker='GNU/Linux ld.so'
+ ;;
+
+netbsdelf*-gnu)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='NetBSD ld.elf_so'
+ ;;
+
+netbsd*)
+ version_type=sunos
+ need_lib_prefix=no
+ need_version=no
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ dynamic_linker='NetBSD (a.out) ld.so'
+ else
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ dynamic_linker='NetBSD ld.elf_so'
+ fi
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ ;;
+
+newsos6)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ ;;
+
+*nto* | *qnx*)
+ version_type=qnx
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ dynamic_linker='ldqnx.so'
+ ;;
+
+openbsd*)
+ version_type=sunos
+ sys_lib_dlsearch_path_spec="/usr/lib"
+ need_lib_prefix=no
+ # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs.
+ case $host_os in
+ openbsd3.3 | openbsd3.3.*) need_version=yes ;;
+ *) need_version=no ;;
+ esac
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ case $host_os in
+ openbsd2.[[89]] | openbsd2.[[89]].*)
+ shlibpath_overrides_runpath=no
+ ;;
+ *)
+ shlibpath_overrides_runpath=yes
+ ;;
+ esac
+ else
+ shlibpath_overrides_runpath=yes
+ fi
+ ;;
+
+os2*)
+ libname_spec='$name'
+ shrext_cmds=".dll"
+ need_lib_prefix=no
+ library_names_spec='$libname${shared_ext} $libname.a'
+ dynamic_linker='OS/2 ld.exe'
+ shlibpath_var=LIBPATH
+ ;;
+
+osf3* | osf4* | osf5*)
+ version_type=osf
+ need_lib_prefix=no
+ need_version=no
+ soname_spec='${libname}${release}${shared_ext}$major'
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib"
+ sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec"
+ ;;
+
+rdos*)
+ dynamic_linker=no
+ ;;
+
+solaris*)
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ # ldd complains unless libraries are executable
+ postinstall_cmds='chmod +x $lib'
+ ;;
+
+sunos4*)
+ version_type=sunos
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix'
+ finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ if test "$with_gnu_ld" = yes; then
+ need_lib_prefix=no
+ fi
+ need_version=yes
+ ;;
+
+sysv4 | sysv4.3*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ case $host_vendor in
+ sni)
+ shlibpath_overrides_runpath=no
+ need_lib_prefix=no
+ runpath_var=LD_RUN_PATH
+ ;;
+ siemens)
+ need_lib_prefix=no
+ ;;
+ motorola)
+ need_lib_prefix=no
+ need_version=no
+ shlibpath_overrides_runpath=no
+ sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib'
+ ;;
+ esac
+ ;;
+
+sysv4*MP*)
+ if test -d /usr/nec ;then
+ version_type=linux
+ library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}'
+ soname_spec='$libname${shared_ext}.$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ fi
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ version_type=freebsd-elf
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=yes
+ hardcode_into_libs=yes
+ if test "$with_gnu_ld" = yes; then
+ sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib'
+ else
+ sys_lib_search_path_spec='/usr/ccs/lib /usr/lib'
+ case $host_os in
+ sco3.2v5*)
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /lib"
+ ;;
+ esac
+ fi
+ sys_lib_dlsearch_path_spec='/usr/lib'
+ ;;
+
+tpf*)
+ # TPF is a cross-target only. Preferred cross-host = GNU/Linux.
+ version_type=linux
+ need_lib_prefix=no
+ need_version=no
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ shlibpath_var=LD_LIBRARY_PATH
+ shlibpath_overrides_runpath=no
+ hardcode_into_libs=yes
+ ;;
+
+uts4*)
+ version_type=linux
+ library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
+ soname_spec='${libname}${release}${shared_ext}$major'
+ shlibpath_var=LD_LIBRARY_PATH
+ ;;
+
+*)
+ dynamic_linker=no
+ ;;
+esac
+AC_MSG_RESULT([$dynamic_linker])
+test "$dynamic_linker" = no && can_build_shared=no
+
+variables_saved_for_relink="PATH $shlibpath_var $runpath_var"
+if test "$GCC" = yes; then
+ variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH"
+fi
+
+if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then
+ sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec"
+fi
+if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then
+ sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec"
+fi
+
+_LT_DECL([], [variables_saved_for_relink], [1],
+ [Variables whose values should be saved in libtool wrapper scripts and
+ restored at link time])
+_LT_DECL([], [need_lib_prefix], [0],
+ [Do we need the "lib" prefix for modules?])
+_LT_DECL([], [need_version], [0], [Do we need a version for libraries?])
+_LT_DECL([], [version_type], [0], [Library versioning type])
+_LT_DECL([], [runpath_var], [0], [Shared library runtime path variable])
+_LT_DECL([], [shlibpath_var], [0],[Shared library path variable])
+_LT_DECL([], [shlibpath_overrides_runpath], [0],
+ [Is shlibpath searched before the hard-coded library search path?])
+_LT_DECL([], [libname_spec], [1], [Format of library name prefix])
+_LT_DECL([], [library_names_spec], [1],
+ [[List of archive names. First name is the real one, the rest are links.
+ The last name is the one that the linker finds with -lNAME]])
+_LT_DECL([], [soname_spec], [1],
+ [[The coded name of the library, if different from the real name]])
+_LT_DECL([], [postinstall_cmds], [2],
+ [Command to use after installation of a shared archive])
+_LT_DECL([], [postuninstall_cmds], [2],
+ [Command to use after uninstallation of a shared archive])
+_LT_DECL([], [finish_cmds], [2],
+ [Commands used to finish a libtool library installation in a directory])
+_LT_DECL([], [finish_eval], [1],
+ [[As "finish_cmds", except a single script fragment to be evaled but
+ not shown]])
+_LT_DECL([], [hardcode_into_libs], [0],
+ [Whether we should hardcode library paths into libraries])
+_LT_DECL([], [sys_lib_search_path_spec], [2],
+ [Compile-time system search path for libraries])
+_LT_DECL([], [sys_lib_dlsearch_path_spec], [2],
+ [Run-time system search path for libraries])
+])# _LT_SYS_DYNAMIC_LINKER
+
+
+# _LT_PATH_TOOL_PREFIX(TOOL)
+# --------------------------
+# find a file program which can recognize shared library
+AC_DEFUN([_LT_PATH_TOOL_PREFIX],
+[m4_require([_LT_DECL_EGREP])dnl
+AC_MSG_CHECKING([for $1])
+AC_CACHE_VAL(lt_cv_path_MAGIC_CMD,
+[case $MAGIC_CMD in
+[[\\/*] | ?:[\\/]*])
+ lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+ ;;
+*)
+ lt_save_MAGIC_CMD="$MAGIC_CMD"
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+dnl $ac_dummy forces splitting on constant user-supplied paths.
+dnl POSIX.2 word splitting is done only on the output of word expansions,
+dnl not every word. This closes a longstanding sh security hole.
+ ac_dummy="m4_if([$2], , $PATH, [$2])"
+ for ac_dir in $ac_dummy; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f $ac_dir/$1; then
+ lt_cv_path_MAGIC_CMD="$ac_dir/$1"
+ if test -n "$file_magic_test_file"; then
+ case $deplibs_check_method in
+ "file_magic "*)
+ file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"`
+ MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+ if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+ $EGREP "$file_magic_regex" > /dev/null; then
+ :
+ else
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such. This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem. Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+_LT_EOF
+ fi ;;
+ esac
+ fi
+ break
+ fi
+ done
+ IFS="$lt_save_ifs"
+ MAGIC_CMD="$lt_save_MAGIC_CMD"
+ ;;
+esac])
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+ AC_MSG_RESULT($MAGIC_CMD)
+else
+ AC_MSG_RESULT(no)
+fi
+_LT_DECL([], [MAGIC_CMD], [0],
+ [Used to examine libraries when file_magic_cmd begins with "file"])dnl
+])# _LT_PATH_TOOL_PREFIX
+
+# Old name:
+AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], [])
+
+
+# _LT_PATH_MAGIC
+# --------------
+# find a file program which can recognize a shared library
+m4_defun([_LT_PATH_MAGIC],
+[_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH)
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+ if test -n "$ac_tool_prefix"; then
+ _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH)
+ else
+ MAGIC_CMD=:
+ fi
+fi
+])# _LT_PATH_MAGIC
+
+
+# LT_PATH_LD
+# ----------
+# find the pathname to the GNU or non-GNU linker
+AC_DEFUN([LT_PATH_LD],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_CANONICAL_BUILD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_ARG_WITH([gnu-ld],
+ [AS_HELP_STRING([--with-gnu-ld],
+ [assume the C compiler uses GNU ld @<:@default=no@:>@])],
+ [test "$withval" = no || with_gnu_ld=yes],
+ [with_gnu_ld=no])dnl
+
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by $CC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]]* | ?:[[\\/]]*)
+ re_direlt='/[[^/]][[^/]]*/\.\./'
+ # Canonicalize the pathname of ld
+ ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'`
+ while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(lt_cv_path_LD,
+[if test -z "$LD"; then
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ lt_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some variants of GNU ld only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$lt_cv_path_LD" -v 2>&1 </dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break
+ ;;
+ *)
+ test "$with_gnu_ld" != yes && break
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+else
+ lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+_LT_PATH_LD_GNU
+AC_SUBST([LD])
+
+_LT_TAGDECL([], [LD], [1], [The linker used to build libraries])
+])# LT_PATH_LD
+
+# Old names:
+AU_ALIAS([AM_PROG_LD], [LT_PATH_LD])
+AU_ALIAS([AC_PROG_LD], [LT_PATH_LD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_LD], [])
+dnl AC_DEFUN([AC_PROG_LD], [])
+
+
+# _LT_PATH_LD_GNU
+#- --------------
+m4_defun([_LT_PATH_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], lt_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU lds only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ lt_cv_prog_gnu_ld=yes
+ ;;
+*)
+ lt_cv_prog_gnu_ld=no
+ ;;
+esac])
+with_gnu_ld=$lt_cv_prog_gnu_ld
+])# _LT_PATH_LD_GNU
+
+
+# _LT_CMD_RELOAD
+# --------------
+# find reload flag for linker
+# -- PORTME Some linkers may need a different reload flag.
+m4_defun([_LT_CMD_RELOAD],
+[AC_CACHE_CHECK([for $LD option to reload object files],
+ lt_cv_ld_reload_flag,
+ [lt_cv_ld_reload_flag='-r'])
+reload_flag=$lt_cv_ld_reload_flag
+case $reload_flag in
+"" | " "*) ;;
+*) reload_flag=" $reload_flag" ;;
+esac
+reload_cmds='$LD$reload_flag -o $output$reload_objs'
+case $host_os in
+ darwin*)
+ if test "$GCC" = yes; then
+ reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs'
+ else
+ reload_cmds='$LD$reload_flag -o $output$reload_objs'
+ fi
+ ;;
+esac
+_LT_DECL([], [reload_flag], [1], [How to create reloadable object files])dnl
+_LT_DECL([], [reload_cmds], [2])dnl
+])# _LT_CMD_RELOAD
+
+
+# _LT_CHECK_MAGIC_METHOD
+# ----------------------
+# how to check for library dependencies
+# -- PORTME fill in with the dynamic library characteristics
+m4_defun([_LT_CHECK_MAGIC_METHOD],
+[m4_require([_LT_DECL_EGREP])
+m4_require([_LT_DECL_OBJDUMP])
+AC_CACHE_CHECK([how to recognize dependent libraries],
+lt_cv_deplibs_check_method,
+[lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [[regex]]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given extended regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix[[4-9]]*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+beos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+bsdi[[45]]*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)'
+ lt_cv_file_magic_cmd='/usr/bin/file -L'
+ lt_cv_file_magic_test_file=/shlib/libc.so
+ ;;
+
+cygwin*)
+ # func_win32_libid is a shell function defined in ltmain.sh
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ ;;
+
+mingw* | pw32*)
+ # Base MSYS/MinGW do not provide the 'file' command needed by
+ # func_win32_libid shell function, so use a weaker test based on 'objdump',
+ # unless we find 'file', for example because we are cross-compiling.
+ if ( file / ) >/dev/null 2>&1; then
+ lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
+ lt_cv_file_magic_cmd='func_win32_libid'
+ else
+ lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ fi
+ ;;
+
+cegcc)
+ # use the weaker test based on 'objdump'. See mingw*.
+ lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?'
+ lt_cv_file_magic_cmd='$OBJDUMP -f'
+ ;;
+
+darwin* | rhapsody*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+freebsd* | dragonfly*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ case $host_cpu in
+ i*86 )
+ # Not sure whether the presence of OpenBSD here was a mistake.
+ # Let's accept both of them until this is cleared up.
+ lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+ ;;
+ esac
+ else
+ lt_cv_deplibs_check_method=pass_all
+ fi
+ ;;
+
+gnu*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+hpux10.20* | hpux11*)
+ lt_cv_file_magic_cmd=/usr/bin/file
+ case $host_cpu in
+ ia64*)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64'
+ lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so
+ ;;
+ hppa*64*)
+ [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]']
+ lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl
+ ;;
+ *)
+ lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library'
+ lt_cv_file_magic_test_file=/usr/lib/libc.sl
+ ;;
+ esac
+ ;;
+
+interix[[3-9]]*)
+ # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$'
+ ;;
+
+irix5* | irix6* | nonstopux*)
+ case $LD in
+ *-32|*"-32 ") libmagic=32-bit;;
+ *-n32|*"-n32 ") libmagic=N32;;
+ *-64|*"-64 ") libmagic=64-bit;;
+ *) libmagic=never-match;;
+ esac
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+# This must be Linux ELF.
+linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$'
+ fi
+ ;;
+
+newos6*)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)'
+ lt_cv_file_magic_cmd=/usr/bin/file
+ lt_cv_file_magic_test_file=/usr/lib/libnls.so
+ ;;
+
+*nto* | *qnx*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+openbsd*)
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$'
+ else
+ lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$'
+ fi
+ ;;
+
+osf3* | osf4* | osf5*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+rdos*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+solaris*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+
+sysv4 | sysv4.3*)
+ case $host_vendor in
+ motorola)
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]'
+ lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+ ;;
+ ncr)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ sequent)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )'
+ ;;
+ sni)
+ lt_cv_file_magic_cmd='/bin/file'
+ lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib"
+ lt_cv_file_magic_test_file=/lib/libc.so
+ ;;
+ siemens)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ pc)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+ esac
+ ;;
+
+tpf*)
+ lt_cv_deplibs_check_method=pass_all
+ ;;
+esac
+])
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+test -z "$deplibs_check_method" && deplibs_check_method=unknown
+
+_LT_DECL([], [deplibs_check_method], [1],
+ [Method to check whether dependent libraries are shared objects])
+_LT_DECL([], [file_magic_cmd], [1],
+ [Command to use when deplibs_check_method == "file_magic"])
+])# _LT_CHECK_MAGIC_METHOD
+
+
+# LT_PATH_NM
+# ----------
+# find the pathname to a BSD- or MS-compatible name lister
+AC_DEFUN([LT_PATH_NM],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
+[if test -n "$NM"; then
+ # Let the user override the test.
+ lt_cv_path_NM="$NM"
+else
+ lt_nm_to_check="${ac_tool_prefix}nm"
+ if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
+ lt_nm_to_check="$lt_nm_to_check nm"
+ fi
+ for lt_tmp_nm in $lt_nm_to_check; do
+ lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
+ IFS="$lt_save_ifs"
+ test -z "$ac_dir" && ac_dir=.
+ tmp_nm="$ac_dir/$lt_tmp_nm"
+ if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then
+ # Check to see if the nm accepts a BSD-compat flag.
+ # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+ # nm: unknown option "B" ignored
+ # Tru64's nm complains that /dev/null is an invalid object file
+ case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in
+ */dev/null* | *'Invalid file or object type'*)
+ lt_cv_path_NM="$tmp_nm -B"
+ break
+ ;;
+ *)
+ case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in
+ */dev/null*)
+ lt_cv_path_NM="$tmp_nm -p"
+ break
+ ;;
+ *)
+ lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+ continue # so that we can try to find one that supports BSD flags
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ done
+ IFS="$lt_save_ifs"
+ done
+ : ${lt_cv_path_NM=no}
+fi])
+if test "$lt_cv_path_NM" != "no"; then
+ NM="$lt_cv_path_NM"
+else
+ # Didn't find any BSD compatible name lister, look for dumpbin.
+ AC_CHECK_TOOLS(DUMPBIN, ["dumpbin -symbols" "link -dump -symbols"], :)
+ AC_SUBST([DUMPBIN])
+ if test "$DUMPBIN" != ":"; then
+ NM="$DUMPBIN"
+ fi
+fi
+test -z "$NM" && NM=nm
+AC_SUBST([NM])
+_LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl
+
+AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface],
+ [lt_cv_nm_interface="BSD nm"
+ echo "int some_variable = 0;" > conftest.$ac_ext
+ (eval echo "\"\$as_me:__oline__: $ac_compile\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$ac_compile" 2>conftest.err)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD)
+ (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
+ cat conftest.err >&AS_MESSAGE_LOG_FD
+ (eval echo "\"\$as_me:__oline__: output\"" >&AS_MESSAGE_LOG_FD)
+ cat conftest.out >&AS_MESSAGE_LOG_FD
+ if $GREP 'External.*some_variable' conftest.out > /dev/null; then
+ lt_cv_nm_interface="MS dumpbin"
+ fi
+ rm -f conftest*])
+])# LT_PATH_NM
+
+# Old names:
+AU_ALIAS([AM_PROG_NM], [LT_PATH_NM])
+AU_ALIAS([AC_PROG_NM], [LT_PATH_NM])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_PROG_NM], [])
+dnl AC_DEFUN([AC_PROG_NM], [])
+
+
+# LT_LIB_M
+# --------
+# check for math library
+AC_DEFUN([LT_LIB_M],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+LIBM=
+case $host in
+*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*)
+ # These system don't have libm, or don't need it
+ ;;
+*-ncr-sysv4.3*)
+ AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw")
+ AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm")
+ ;;
+*)
+ AC_CHECK_LIB(m, cos, LIBM="-lm")
+ ;;
+esac
+AC_SUBST([LIBM])
+])# LT_LIB_M
+
+# Old name:
+AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_CHECK_LIBM], [])
+
+
+# _LT_COMPILER_NO_RTTI([TAGNAME])
+# -------------------------------
+m4_defun([_LT_COMPILER_NO_RTTI],
+[m4_require([_LT_TAG_COMPILER])dnl
+
+_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+
+if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+
+ _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions],
+ lt_cv_prog_compiler_rtti_exceptions,
+ [-fno-rtti -fno-exceptions], [],
+ [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"])
+fi
+_LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1],
+ [Compiler flag to turn off builtin functions])
+])# _LT_COMPILER_NO_RTTI
+
+
+# _LT_CMD_GLOBAL_SYMBOLS
+# ----------------------
+m4_defun([_LT_CMD_GLOBAL_SYMBOLS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+AC_REQUIRE([LT_PATH_LD])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+
+# Check for command to grab the raw symbol name followed by C symbol from nm.
+AC_MSG_CHECKING([command to parse $NM output from $compiler object])
+AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe],
+[
+# These are sane defaults that work on at least a few old systems.
+# [They come from Ultrix. What could be older than Ultrix?!! ;)]
+
+# Character class describing NM global symbol codes.
+symcode='[[BCDEGRST]]'
+
+# Regexp to match symbols that can be accessed directly from C.
+sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)'
+
+# Define system-specific variables.
+case $host_os in
+aix*)
+ symcode='[[BCDT]]'
+ ;;
+cygwin* | mingw* | pw32* | cegcc*)
+ symcode='[[ABCDGISTW]]'
+ ;;
+hpux*)
+ if test "$host_cpu" = ia64; then
+ symcode='[[ABCDEGRST]]'
+ fi
+ ;;
+irix* | nonstopux*)
+ symcode='[[BCDEGRST]]'
+ ;;
+osf*)
+ symcode='[[BCDEGQRST]]'
+ ;;
+solaris*)
+ symcode='[[BDRT]]'
+ ;;
+sco3.2v5*)
+ symcode='[[DT]]'
+ ;;
+sysv4.2uw2*)
+ symcode='[[DT]]'
+ ;;
+sysv5* | sco5v6* | unixware* | OpenUNIX*)
+ symcode='[[ABDT]]'
+ ;;
+sysv4)
+ symcode='[[DFNSTU]]'
+ ;;
+esac
+
+# If we're using GNU nm, then use its standard symbol codes.
+case `$NM -V 2>&1` in
+*GNU* | *'with BFD'*)
+ symcode='[[ABCDGIRSTW]]' ;;
+esac
+
+# Transform an extracted symbol line into a proper C declaration.
+# Some systems (esp. on ia64) link data and code symbols differently,
+# so use this general approach.
+lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'"
+
+# Transform an extracted symbol line into symbol name and symbol address
+lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'"
+lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'"
+
+# Handle CRLF in mingw tool chain
+opt_cr=
+case $build_os in
+mingw*)
+ opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp
+ ;;
+esac
+
+# Try without a prefix underscore, then with it.
+for ac_symprfx in "" "_"; do
+
+ # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol.
+ symxfrm="\\1 $ac_symprfx\\2 \\2"
+
+ # Write the raw and C identifiers.
+ if test "$lt_cv_nm_interface" = "MS dumpbin"; then
+ # Fake it for dumpbin and say T for any non-static function
+ # and D for any global variable.
+ # Also find C++ and __fastcall symbols from MSVC++,
+ # which start with @ or ?.
+ lt_cv_sys_global_symbol_pipe="$AWK ['"\
+" {last_section=section; section=\$ 3};"\
+" /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\
+" \$ 0!~/External *\|/{next};"\
+" / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\
+" {if(hide[section]) next};"\
+" {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\
+" {split(\$ 0, a, /\||\r/); split(a[2], s)};"\
+" s[1]~/^[@?]/{print s[1], s[1]; next};"\
+" s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\
+" ' prfx=^$ac_symprfx]"
+ else
+ lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'"
+ fi
+
+ # Check to see that the pipe works correctly.
+ pipe_works=no
+
+ rm -f conftest*
+ cat > conftest.$ac_ext <<_LT_EOF
+#ifdef __cplusplus
+extern "C" {
+#endif
+char nm_test_var;
+void nm_test_func(void);
+void nm_test_func(void){}
+#ifdef __cplusplus
+}
+#endif
+int main(){nm_test_var='a';nm_test_func();return(0);}
+_LT_EOF
+
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) && test -s "$nlist"; then
+ # Try sorting and uniquifying the output.
+ if sort "$nlist" | uniq > "$nlist"T; then
+ mv -f "$nlist"T "$nlist"
+ else
+ rm -f "$nlist"T
+ fi
+
+ # Make sure that we snagged all the symbols we need.
+ if $GREP ' nm_test_var$' "$nlist" >/dev/null; then
+ if $GREP ' nm_test_func$' "$nlist" >/dev/null; then
+ cat <<_LT_EOF > conftest.$ac_ext
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+_LT_EOF
+ # Now generate the symbol file.
+ eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext'
+
+ cat <<_LT_EOF >> conftest.$ac_ext
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ void *address;
+}
+lt__PROGRAM__LTX_preloaded_symbols[[]] =
+{
+ { "@PROGRAM@", (void *) 0 },
+_LT_EOF
+ $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext
+ cat <<\_LT_EOF >> conftest.$ac_ext
+ {0, (void *) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt__PROGRAM__LTX_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+_LT_EOF
+ # Now try linking the two files.
+ mv conftest.$ac_objext conftstm.$ac_objext
+ lt_save_LIBS="$LIBS"
+ lt_save_CFLAGS="$CFLAGS"
+ LIBS="conftstm.$ac_objext"
+ CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)"
+ if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then
+ pipe_works=yes
+ fi
+ LIBS="$lt_save_LIBS"
+ CFLAGS="$lt_save_CFLAGS"
+ else
+ echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.$ac_ext >&5
+ fi
+ rm -rf conftest* conftst*
+
+ # Do not use the global_symbol_pipe unless it works.
+ if test "$pipe_works" = yes; then
+ break
+ else
+ lt_cv_sys_global_symbol_pipe=
+ fi
+done
+])
+if test -z "$lt_cv_sys_global_symbol_pipe"; then
+ lt_cv_sys_global_symbol_to_cdecl=
+fi
+if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then
+ AC_MSG_RESULT(failed)
+else
+ AC_MSG_RESULT(ok)
+fi
+
+_LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1],
+ [Take the output of nm and produce a listing of raw symbols and C names])
+_LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1],
+ [Transform the output of nm in a proper C declaration])
+_LT_DECL([global_symbol_to_c_name_address],
+ [lt_cv_sys_global_symbol_to_c_name_address], [1],
+ [Transform the output of nm in a C name address pair])
+_LT_DECL([global_symbol_to_c_name_address_lib_prefix],
+ [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1],
+ [Transform the output of nm in a C name address pair when lib prefix is needed])
+]) # _LT_CMD_GLOBAL_SYMBOLS
+
+
+# _LT_COMPILER_PIC([TAGNAME])
+# ---------------------------
+m4_defun([_LT_COMPILER_PIC],
+[m4_require([_LT_TAG_COMPILER])dnl
+_LT_TAGVAR(lt_prog_compiler_wl, $1)=
+_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+_LT_TAGVAR(lt_prog_compiler_static, $1)=
+
+AC_MSG_CHECKING([for $compiler option to produce PIC])
+m4_if([$1], [CXX], [
+ # C++ specific cases for pic, static, wl, etc.
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+ mingw* | cygwin* | os2* | pw32* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+ *djgpp*)
+ # DJGPP does not support shared libraries at all
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ case $host_os in
+ aix[[4-9]]*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+ chorus*)
+ case $cc_basename in
+ cxch68*)
+ # Green Hills C++ Compiler
+ # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a"
+ ;;
+ esac
+ ;;
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ freebsd* | dragonfly*)
+ # FreeBSD uses GNU C++
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ fi
+ ;;
+ aCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ interix*)
+ # This is c89, which is MS Visual C++ (no shared libs)
+ # Anyone wants to do a port?
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ # CC pic flag -KPIC is the default.
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # KAI C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ ecpc* )
+ # old Intel C++ for x86_64 which still supported -KPIC.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ icpc* )
+ # Intel C++, used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ cxx*)
+ # Compaq C++
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xlc* | xlC*)
+ # IBM XL 8.0 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ lynxos*)
+ ;;
+ m88k*)
+ ;;
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ ;;
+ *qnx* | *nto*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,'
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ cxx*)
+ # Digital/Compaq C++
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # Make sure the PIC flag is empty. It appears that all Alpha
+ # Linux and Compaq Tru64 Unix objects are PIC.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ psos*)
+ ;;
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ lcc*)
+ # Lucid
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ esac
+ ;;
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ vxworks*)
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+],
+[
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+
+ case $host_os in
+ aix*)
+ # All AIX code is PIC.
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ m68k)
+ # FIXME: we need at least 68020 code to build shared libraries, but
+ # adding the `-m68020' flag to GCC prevents building anything better,
+ # like `-m68040'.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4'
+ ;;
+ esac
+ ;;
+
+ beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
+ # PIC is the default for these OSes.
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ # Although the cygwin gcc ignores -fPIC, still need this for old-style
+ # (--disable-auto-import) libraries
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ darwin* | rhapsody*)
+ # PIC is the default on this platform
+ # Common symbols not allowed in MH_DYLIB files
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common'
+ ;;
+
+ hpux*)
+ # PIC is the default for 64-bit PA HP-UX, but not for 32-bit
+ # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag
+ # sets the default TLS model and affects inlining.
+ case $host_cpu in
+ hppa*64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ # Interix 3.x gcc -fpic/-fPIC options generate broken code.
+ # Instead, we relocate shared libraries at runtime.
+ ;;
+
+ msdosdjgpp*)
+ # Just because we use GCC doesn't mean we suddenly get shared libraries
+ # on systems that don't support them.
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ enable_shared=no
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic
+ fi
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ ;;
+ esac
+ else
+ # PORTME Check for flag to pass linker flags through the system compiler.
+ case $host_os in
+ aix*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ if test "$host_cpu" = ia64; then
+ # AIX 5 now supports IA64 processor
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ else
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp'
+ fi
+ ;;
+
+ mingw* | cygwin* | pw32* | os2* | cegcc*)
+ # This hack is so that the source file can tell whether it is being
+ # built for inclusion in a dll (and should export symbols for example).
+ m4_if([$1], [GCJ], [],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT'])
+ ;;
+
+ hpux9* | hpux10* | hpux11*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but
+ # not for PA HP-UX.
+ case $host_cpu in
+ hppa*64*|ia64*)
+ # +Z the default
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z'
+ ;;
+ esac
+ # Is there a better lt_prog_compiler_static that works with the bundled CC?
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive'
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # PIC (with -KPIC) is the default.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ # old Intel for x86_64 which still supported -KPIC.
+ ecc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # icc used to be incompatible with GCC.
+ # ICC 10 doesn't accept -KPIC any more.
+ icc* | ifort*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
+ ;;
+ # Lahey Fortran 8.1.
+ lf95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='--static'
+ ;;
+ pgcc* | pgf77* | pgf90* | pgf95*)
+ # Portland Group compilers (*not* the Pentium gcc compiler,
+ # which looks to be a dead project)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+ ccc*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All Alpha code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+ xl*)
+ # IBM XL C 8.0/Fortran 10.1 on PPC
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink'
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C 5.9
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ ;;
+ *Sun\ F*)
+ # Sun Fortran 8.3 passes all unrecognized flags to the linker
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)=''
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *nto* | *qnx*)
+ # QNX uses GNU C++, but need to define -shared option too, otherwise
+ # it will coredump.
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared'
+ ;;
+
+ osf3* | osf4* | osf5*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ # All OSF/1 code is PIC.
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ rdos*)
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared'
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ case $cc_basename in
+ f77* | f90* | f95*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld '
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4 | sysv4.2uw2* | sysv4.3*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec ;then
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ fi
+ ;;
+
+ sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ unicos*)
+ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic'
+ _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
+ ;;
+
+ *)
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no
+ ;;
+ esac
+ fi
+])
+case $host_os in
+ # For platforms which do not support PIC, -DPIC is meaningless:
+ *djgpp*)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ ;;
+ *)
+ _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])"
+ ;;
+esac
+AC_MSG_RESULT([$_LT_TAGVAR(lt_prog_compiler_pic, $1)])
+_LT_TAGDECL([wl], [lt_prog_compiler_wl], [1],
+ [How to pass a linker flag through the compiler])
+
+#
+# Check to make sure the PIC flag actually works.
+#
+if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then
+ _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works],
+ [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)],
+ [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [],
+ [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in
+ "" | " "*) ;;
+ *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;;
+ esac],
+ [_LT_TAGVAR(lt_prog_compiler_pic, $1)=
+ _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no])
+fi
+_LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1],
+ [Additional compiler flags for building library objects])
+
+#
+# Check to make sure the static flag actually works.
+#
+wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\"
+_LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works],
+ _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1),
+ $lt_tmp_static_flag,
+ [],
+ [_LT_TAGVAR(lt_prog_compiler_static, $1)=])
+_LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1],
+ [Compiler flag to prevent dynamic linking])
+])# _LT_COMPILER_PIC
+
+
+# _LT_LINKER_SHLIBS([TAGNAME])
+# ----------------------------
+# See if the linker supports building shared libraries.
+m4_defun([_LT_LINKER_SHLIBS],
+[AC_REQUIRE([LT_PATH_LD])dnl
+AC_REQUIRE([LT_PATH_NM])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+m4_require([_LT_DECL_SED])dnl
+m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+m4_require([_LT_TAG_COMPILER])dnl
+AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+m4_if([$1], [CXX], [
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ case $host_os in
+ aix[[4-9]]*)
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ ;;
+ pw32*)
+ _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds"
+ ;;
+ cygwin* | mingw* | cegcc*)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;/^.*[[ ]]__nm__/s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ ;;
+ esac
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+], [
+ runpath_var=
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(archive_cmds, $1)=
+ _LT_TAGVAR(archive_expsym_cmds, $1)=
+ _LT_TAGVAR(compiler_needs_object, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols'
+ _LT_TAGVAR(hardcode_automatic, $1)=no
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ _LT_TAGVAR(hardcode_minus_L, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+ _LT_TAGVAR(inherit_rpath, $1)=no
+ _LT_TAGVAR(link_all_deplibs, $1)=unknown
+ _LT_TAGVAR(module_cmds, $1)=
+ _LT_TAGVAR(module_expsym_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)=
+ _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)=
+ _LT_TAGVAR(thread_safe_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ # include_expsyms should be a list of space-separated symbols to be *always*
+ # included in the symbol list
+ _LT_TAGVAR(include_expsyms, $1)=
+ # exclude_expsyms can be an extended regexp of symbols to exclude
+ # it will be wrapped by ` (' and `)$', so one must not match beginning or
+ # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc',
+ # as well as any symbol that contains `d'.
+ _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*']
+ # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out
+ # platforms (ab)use it in PIC code, but their linkers get confused if
+ # the symbol is explicitly referenced. Since portable code cannot
+ # rely on this symbol name, it's probably fine to never include it in
+ # preloaded symbol tables.
+ # Exclude shared library initialization/finalization symbols.
+dnl Note also adjust exclude_expsyms for C++ above.
+ extract_expsyms_cmds=
+
+ case $host_os in
+ cygwin* | mingw* | pw32* | cegcc*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ interix*)
+ # we just hope/assume this is gcc and not c89 (= MSVC++)
+ with_gnu_ld=yes
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+ linux* | k*bsd*-gnu)
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ ;;
+ esac
+
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ if test "$with_gnu_ld" = yes; then
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ wlarc='${wl}'
+
+ # Set some defaults for GNU ld with shared library support. These
+ # are reset later if shared libraries are not supported. Putting them
+ # here allows them to be overridden if necessary.
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ supports_anon_versioning=no
+ case `$LD -v 2>&1` in
+ *GNU\ gold*) supports_anon_versioning=yes ;;
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11
+ *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ...
+ *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ...
+ *\ 2.11.*) ;; # other 2.11 versions
+ *) supports_anon_versioning=yes ;;
+ esac
+
+ # See if GNU ld supports shared libraries.
+ case $host_os in
+ aix[[3-9]]*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: the GNU linker, at least up to release 2.9.1, is reported
+*** to be unable to reliably create shared libraries on AIX.
+*** Therefore, libtool is disabling shared libraries support. If you
+*** really care for shared libraries, you may want to modify your PATH
+*** so that a non-GNU linker is found, and then restart.
+
+_LT_EOF
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols'
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+
+ gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu)
+ tmp_diet=no
+ if test "$host_os" = linux-dietlibc; then
+ case $cc_basename in
+ diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn)
+ esac
+ fi
+ if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \
+ && test "$tmp_diet" = no
+ then
+ tmp_addflag=
+ tmp_sharedflag='-shared'
+ case $cc_basename,$host_cpu in
+ pgcc*) # Portland Group C compiler
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag'
+ ;;
+ pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ tmp_addflag=' $pic_flag -Mnomain' ;;
+ ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64
+ tmp_addflag=' -i_dynamic' ;;
+ efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64
+ tmp_addflag=' -i_dynamic -nofor_main' ;;
+ ifc* | ifort*) # Intel Fortran compiler
+ tmp_addflag=' -nofor_main' ;;
+ lf95*) # Lahey Fortran 8.1
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ tmp_sharedflag='--shared' ;;
+ xl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below)
+ tmp_sharedflag='-qmkshrobj'
+ tmp_addflag= ;;
+ esac
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*) # Sun C 5.9
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+ tmp_sharedflag='-G' ;;
+ *Sun\ F*) # Sun Fortran 8.3
+ tmp_sharedflag='-G' ;;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+
+ case $cc_basename in
+ xlf*)
+ # IBM XL Fortran 10.1 on PPC cannot create shared libs itself
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $compiler_flags -soname $soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $LD -shared $libobjs $deplibs $compiler_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ esac
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib'
+ wlarc=
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ fi
+ ;;
+
+ solaris*)
+ if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: The releases 2.8.* of the GNU linker cannot reliably
+*** create shared libraries on Solaris systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.9.1 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*)
+ case `$LD -v 2>&1` in
+ *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ cat <<_LT_EOF 1>&2
+
+*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not
+*** reliably create shared libraries on SCO systems. Therefore, libtool
+*** is disabling shared libraries support. We urge you to upgrade GNU
+*** binutils to release 2.16.91.0.3 or newer. Another option is to modify
+*** your PATH or compiler configuration so that the native linker is
+*** used, and then restart.
+
+_LT_EOF
+ ;;
+ *)
+ # For security reasons, it is highly recommended that you always
+ # use absolute paths for naming shared libraries, and exclude the
+ # DT_RUNPATH tag from executables and libraries. But doing so
+ # requires that you compile everything twice, which is a pain.
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ sunos4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+
+ if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then
+ runpath_var=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ # PORTME fill in a description of your system's linker (not GNU ld)
+ case $host_os in
+ aix3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname'
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ # If we're using GNU nm, then we don't want the "-C" option.
+ # -C means demangle to AIX nm, but means don't demangle with GNU nm
+ if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ else
+ _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols'
+ fi
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ ;;
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=no
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ # see comment about AmigaOS4 .so support
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)=''
+ ;;
+ m68k)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ ;;
+
+ bsdi[[45]]*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' '
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Tell ltmain to make .lib files, not .a files.
+ libext=lib
+ # Tell ltmain to make .dll files, not .so files.
+ shrext_cmds=".dll"
+ # FIXME: Setting linknames here is a bad hack.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `$ECHO "X$deplibs" | $Xsed -e '\''s/ -lc$//'\''` -link -dll~linknames='
+ # The linker will automatically build a .lib file if we build a DLL.
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='true'
+ # FIXME: Should let the user specify the lib program.
+ _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs'
+ _LT_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`'
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+ ;;
+
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ freebsd1*)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor
+ # support. Future versions do this automatically, but an explicit c++rt0.o
+ # does not break anything, and helps significantly (at the cost of a little
+ # extra space).
+ freebsd2.2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # Unfortunately, older versions of FreeBSD 2 do not have this feature.
+ freebsd2*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ # FreeBSD 3 and greater uses gcc -shared to do shared libraries.
+ freebsd* | dragonfly*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ hpux9*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+
+ hpux10*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ fi
+ ;;
+
+ hpux11*)
+ if test "$GCC" = yes -a "$with_gnu_ld" = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ else
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ fi
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ ;;
+ esac
+ fi
+ ;;
+
+ irix5* | irix6* | nonstopux*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ # Try to use the -exported_symbol ld option, if it does not
+ # work, assume that -exports_file does not work either and
+ # implicitly export all symbols.
+ save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null"
+ AC_LINK_IFELSE(int foo(void) {},
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib'
+ )
+ LDFLAGS="$save_LDFLAGS"
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ netbsd* | netbsdelf*-gnu)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ newsos6)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *nto* | *qnx*)
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ else
+ case $host_os in
+ openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ os2*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$ECHO DATA >> $output_objdir/$libname.def~$ECHO " SINGLE NONSHARED" >> $output_objdir/$libname.def~$ECHO EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def'
+ _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def'
+ ;;
+
+ osf3*)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ osf4* | osf5*) # as osf3* with the addition of -msym flag
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ else
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~
+ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp'
+
+ # Both c and cxx compiler support -rpath directly
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ fi
+ _LT_TAGVAR(archive_cmds_need_lc, $1)='no'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ ;;
+
+ solaris*)
+ _LT_TAGVAR(no_undefined_flag, $1)=' -z defs'
+ if test "$GCC" = yes; then
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ else
+ case `$CC -V 2>&1` in
+ *"Compilers 5.0"*)
+ wlarc=''
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp'
+ ;;
+ *)
+ wlarc='${wl}'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp'
+ ;;
+ esac
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'. GCC discards it without `$wl',
+ # but is careful enough not to reorder.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ fi
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+
+ sunos4*)
+ if test "x$host_vendor" = xsequent; then
+ # Use $CC to link under sequent, because it throws in some extra .o
+ # files that make .init and .fini sections work.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags'
+ fi
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4)
+ case $host_vendor in
+ sni)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true???
+ ;;
+ siemens)
+ ## LD is ld it makes a PLAMLIB
+ ## CC just makes a GrossModule.
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs'
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ ;;
+ motorola)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ runpath_var='LD_RUN_PATH'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ sysv4.3*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport'
+ ;;
+
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var=LD_RUN_PATH
+ hardcode_runpath_var=yes
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ fi
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ if test "$GCC" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ fi
+ ;;
+
+ uts4*)
+ _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+
+ *)
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ if test x$host_vendor = xsni; then
+ case $host in
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym'
+ ;;
+ esac
+ fi
+ fi
+])
+AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+_LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld
+
+_LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl
+_LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl
+_LT_DECL([], [extract_expsyms_cmds], [2],
+ [The commands to extract the exported symbol list from a shared archive])
+
+#
+# Do we need to explicitly link libc?
+#
+case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in
+x|xyes)
+ # Assume -lc should be added
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+
+ if test "$enable_shared" = yes && test "$GCC" = yes; then
+ case $_LT_TAGVAR(archive_cmds, $1) in
+ *'~'*)
+ # FIXME: we may have to deal with multi-command sequences.
+ ;;
+ '$CC '*)
+ # Test whether the compiler implicitly links with -lc since on some
+ # systems, -lgcc has to come before -lc. If gcc already passes -lc
+ # to ld, don't add -lc before -lgcc.
+ AC_MSG_CHECKING([whether -lc should be explicitly linked in])
+ $RM conftest*
+ echo "$lt_simple_compile_test_code" > conftest.$ac_ext
+
+ if AC_TRY_EVAL(ac_compile) 2>conftest.err; then
+ soname=conftest
+ lib=conftest
+ libobjs=conftest.$ac_objext
+ deplibs=
+ wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1)
+ pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1)
+ compiler_flags=-v
+ linker_flags=-v
+ verstring=
+ output_objdir=.
+ libname=conftest
+ lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1)
+ _LT_TAGVAR(allow_undefined_flag, $1)=
+ if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1)
+ then
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ else
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ fi
+ _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag
+ else
+ cat conftest.err 1>&5
+ fi
+ $RM conftest*
+ AC_MSG_RESULT([$_LT_TAGVAR(archive_cmds_need_lc, $1)])
+ ;;
+ esac
+ fi
+ ;;
+esac
+
+_LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0],
+ [Whether or not to add -lc for building shared libraries])
+_LT_TAGDECL([allow_libtool_libs_with_static_runtimes],
+ [enable_shared_with_static_runtimes], [0],
+ [Whether or not to disallow shared libs when runtime libs are static])
+_LT_TAGDECL([], [export_dynamic_flag_spec], [1],
+ [Compiler flag to allow reflexive dlopens])
+_LT_TAGDECL([], [whole_archive_flag_spec], [1],
+ [Compiler flag to generate shared objects directly from archives])
+_LT_TAGDECL([], [compiler_needs_object], [1],
+ [Whether the compiler copes with passing no objects directly])
+_LT_TAGDECL([], [old_archive_from_new_cmds], [2],
+ [Create an old-style archive from a shared archive])
+_LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2],
+ [Create a temporary old-style archive to link instead of a shared archive])
+_LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive])
+_LT_TAGDECL([], [archive_expsym_cmds], [2])
+_LT_TAGDECL([], [module_cmds], [2],
+ [Commands used to build a loadable module if different from building
+ a shared archive.])
+_LT_TAGDECL([], [module_expsym_cmds], [2])
+_LT_TAGDECL([], [with_gnu_ld], [1],
+ [Whether we are building with GNU ld or not])
+_LT_TAGDECL([], [allow_undefined_flag], [1],
+ [Flag that allows shared libraries with undefined symbols to be built])
+_LT_TAGDECL([], [no_undefined_flag], [1],
+ [Flag that enforces no undefined symbols])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec], [1],
+ [Flag to hardcode $libdir into a binary during linking.
+ This must work even if $libdir does not exist])
+_LT_TAGDECL([], [hardcode_libdir_flag_spec_ld], [1],
+ [[If ld is used when linking, flag to hardcode $libdir into a binary
+ during linking. This must work even if $libdir does not exist]])
+_LT_TAGDECL([], [hardcode_libdir_separator], [1],
+ [Whether we need a single "-rpath" flag with a separated argument])
+_LT_TAGDECL([], [hardcode_direct], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary])
+_LT_TAGDECL([], [hardcode_direct_absolute], [0],
+ [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes
+ DIR into the resulting binary and the resulting library dependency is
+ "absolute", i.e impossible to change by setting ${shlibpath_var} if the
+ library is relocated])
+_LT_TAGDECL([], [hardcode_minus_L], [0],
+ [Set to "yes" if using the -LDIR flag during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_shlibpath_var], [0],
+ [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR
+ into the resulting binary])
+_LT_TAGDECL([], [hardcode_automatic], [0],
+ [Set to "yes" if building a shared library automatically hardcodes DIR
+ into the library and all subsequent libraries and executables linked
+ against it])
+_LT_TAGDECL([], [inherit_rpath], [0],
+ [Set to yes if linker adds runtime paths of dependent libraries
+ to runtime path list])
+_LT_TAGDECL([], [link_all_deplibs], [0],
+ [Whether libtool must link a program against all its dependency libraries])
+_LT_TAGDECL([], [fix_srcfile_path], [1],
+ [Fix the shell variable $srcfile for the compiler])
+_LT_TAGDECL([], [always_export_symbols], [0],
+ [Set to "yes" if exported symbols are required])
+_LT_TAGDECL([], [export_symbols_cmds], [2],
+ [The commands to list exported symbols])
+_LT_TAGDECL([], [exclude_expsyms], [1],
+ [Symbols that should not be listed in the preloaded symbols])
+_LT_TAGDECL([], [include_expsyms], [1],
+ [Symbols that must always be exported])
+_LT_TAGDECL([], [prelink_cmds], [2],
+ [Commands necessary for linking programs (against libraries) with templates])
+_LT_TAGDECL([], [file_list_spec], [1],
+ [Specify filename containing input files])
+dnl FIXME: Not yet implemented
+dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1],
+dnl [Compiler flag to generate thread safe objects])
+])# _LT_LINKER_SHLIBS
+
+
+# _LT_LANG_C_CONFIG([TAG])
+# ------------------------
+# Ensure that the configuration variables for a C compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_C_CONFIG],
+[m4_require([_LT_DECL_EGREP])dnl
+lt_save_CC="$CC"
+AC_LANG_PUSH(C)
+
+# Source file extension for C test sources.
+ac_ext=c
+
+# Object file extension for compiled C test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="int some_variable = 0;"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='int main(){return(0);}'
+
+_LT_TAG_COMPILER
+# Save the default compiler, since it gets overwritten when the other
+# tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP.
+compiler_DEFAULT=$CC
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+ LT_SYS_DLOPEN_SELF
+ _LT_CMD_STRIPLIB
+
+ # Report which library types will actually be built
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_CONFIG($1)
+fi
+AC_LANG_POP
+CC="$lt_save_CC"
+])# _LT_LANG_C_CONFIG
+
+
+# _LT_PROG_CXX
+# ------------
+# Since AC_PROG_CXX is broken, in that it returns g++ if there is no c++
+# compiler, we have our own version here.
+m4_defun([_LT_PROG_CXX],
+[
+pushdef([AC_MSG_ERROR], [_lt_caught_CXX_error=yes])
+AC_PROG_CXX
+if test -n "$CXX" && ( test "X$CXX" != "Xno" &&
+ ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) ||
+ (test "X$CXX" != "Xg++"))) ; then
+ AC_PROG_CXXCPP
+else
+ _lt_caught_CXX_error=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_CXX
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_CXX], [])
+
+
+# _LT_LANG_CXX_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a C++ compiler are suitably
+# defined. These variables are subsequently used by _LT_CONFIG to write
+# the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_CXX_CONFIG],
+[AC_REQUIRE([_LT_PROG_CXX])dnl
+m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+m4_require([_LT_DECL_EGREP])dnl
+
+AC_LANG_PUSH(C++)
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(compiler_needs_object, $1)=no
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for C++ test sources.
+ac_ext=cpp
+
+# Object file extension for compiled C++ test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the CXX compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_caught_CXX_error" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="int some_variable = 0;"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }'
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC=$CC
+ lt_save_LD=$LD
+ lt_save_GCC=$GCC
+ GCC=$GXX
+ lt_save_with_gnu_ld=$with_gnu_ld
+ lt_save_path_LD=$lt_cv_path_LD
+ if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then
+ lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx
+ else
+ $as_unset lt_cv_prog_gnu_ld
+ fi
+ if test -n "${lt_cv_path_LDCXX+set}"; then
+ lt_cv_path_LD=$lt_cv_path_LDCXX
+ else
+ $as_unset lt_cv_path_LD
+ fi
+ test -z "${LDCXX+set}" || LD=$LDCXX
+ CC=${CXX-"c++"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ # We don't want -fno-exception when compiling C++ code, so set the
+ # no_builtin_flag separately
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin'
+ else
+ _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=
+ fi
+
+ if test "$GXX" = yes; then
+ # Set up default GNU C++ configuration
+
+ LT_PATH_LD
+
+ # Check if GNU C++ uses GNU ld as the underlying linker, since the
+ # archiving commands below assume that GNU ld is being used.
+ if test "$with_gnu_ld" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # If archive_cmds runs LD, not CC, wlarc should be empty
+ # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to
+ # investigate it a little bit more. (MM)
+ wlarc='${wl}'
+
+ # ancient GNU ld didn't support --whole-archive et. al.
+ if eval "`$CC -print-prog-name=ld` --help 2>&1" |
+ $GREP 'no-whole-archive' > /dev/null; then
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ else
+ _LT_TAGVAR(whole_archive_flag_spec, $1)=
+ fi
+ else
+ with_gnu_ld=no
+ wlarc=
+
+ # A generic and very simple default shared library creation
+ # command for GNU C++ for the case where it uses the native
+ # linker, instead of GNU ld. If possible, this setting should
+ # overridden to take advantage of the native linker features on
+ # the platform it is being used on.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ fi
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ GXX=no
+ with_gnu_ld=no
+ wlarc=
+ fi
+
+ # PORTME: fill in a description of your system's C++ link characteristics
+ AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries])
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ case $host_os in
+ aix3*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ exp_sym_flag='-Bexport'
+ no_entry_flag=""
+ else
+ aix_use_runtimelinking=no
+
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*)
+ for ld_flag in $LDFLAGS; do
+ case $ld_flag in
+ *-brtl*)
+ aix_use_runtimelinking=yes
+ break
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ exp_sym_flag='-bexport'
+ no_entry_flag='-bnoentry'
+ fi
+
+ # When large executables or shared objects are built, AIX ld can
+ # have problems creating the table of contents. If linking a library
+ # or program results in "error TOC overflow" add -mminimal-toc to
+ # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not
+ # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS.
+
+ _LT_TAGVAR(archive_cmds, $1)=''
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(file_list_spec, $1)='${wl}-f,'
+
+ if test "$GXX" = yes; then
+ case $host_os in aix4.[[012]]|aix4.[[012]].*)
+ # We only want to do this on AIX 4.2 and lower, the check
+ # below for broken collect2 doesn't work under 4.3+
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" &&
+ strings "$collect2name" | $GREP resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ :
+ else
+ # We have old collect2
+ _LT_TAGVAR(hardcode_direct, $1)=unsupported
+ # It fails to find uninstalled libraries when the uninstalled
+ # path is not listed in the libpath. Setting hardcode_minus_L
+ # to unsupported forces relinking
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=
+ fi
+ esac
+ shared_flag='-shared'
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag="$shared_flag "'${wl}-G'
+ fi
+ else
+ # not using gcc
+ if test "$host_cpu" = ia64; then
+ # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release
+ # chokes on -Wl,-G. The following line is correct:
+ shared_flag='-G'
+ else
+ if test "$aix_use_runtimelinking" = yes; then
+ shared_flag='${wl}-G'
+ else
+ shared_flag='${wl}-bM:SRE'
+ fi
+ fi
+ fi
+
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall'
+ # It seems that -bexpall does not export symbols beginning with
+ # underscore (_), so it is better to generate a list of symbols to
+ # export.
+ _LT_TAGVAR(always_export_symbols, $1)=yes
+ if test "$aix_use_runtimelinking" = yes; then
+ # Warning - without using the other runtime loading flags (-brtl),
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(allow_undefined_flag, $1)='-berok'
+ # Determine the default libpath from the value encoded in an empty
+ # executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then $ECHO "X${wl}${allow_undefined_flag}" | $Xsed; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag"
+ else
+ if test "$host_cpu" = ia64; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib'
+ _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs"
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols"
+ else
+ # Determine the default libpath from the value encoded in an
+ # empty executable.
+ _LT_SYS_MODULE_PATH_AIX
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath"
+ # Warning - without using the other run time loading flags,
+ # -berok will link without error, but may produce a broken library.
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok'
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok'
+ # Exported symbols can be pulled into shared objects from archives
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=yes
+ # This is similar to how AIX traditionally builds its shared
+ # libraries.
+ _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname'
+ fi
+ fi
+ ;;
+
+ beos*)
+ if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ # Joseph Beckenbach <jrb3@best.com> says some releases of gcc
+ # support --undefined. This deserves some investigation. FIXME
+ _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ chorus*)
+ case $cc_basename in
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ cygwin* | mingw* | pw32* | cegcc*)
+ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless,
+ # as there is no search path for DLLs.
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
+ _LT_TAGVAR(allow_undefined_flag, $1)=unsupported
+ _LT_TAGVAR(always_export_symbols, $1)=no
+ _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes
+
+ if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ # If the export-symbols file already is a .def file (1st line
+ # is EXPORTS), use it as is; otherwise, prepend...
+ _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then
+ cp $export_symbols $output_objdir/$soname.def;
+ else
+ echo EXPORTS > $output_objdir/$soname.def;
+ cat $export_symbols >> $output_objdir/$soname.def;
+ fi~
+ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib'
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ darwin* | rhapsody*)
+ _LT_DARWIN_LINKER_FEATURES($1)
+ ;;
+
+ dgux*)
+ case $cc_basename in
+ ec++*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ ghcx*)
+ # Green Hills C++ Compiler
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ freebsd[[12]]*)
+ # C++ shared libraries reported to be fairly broken before
+ # switch to ELF
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ freebsd-elf*)
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ ;;
+
+ freebsd* | dragonfly*)
+ # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF
+ # conventions
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ gnu*)
+ ;;
+
+ hpux9*)
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib'
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ hpux10*|hpux11*)
+ if test $with_gnu_ld = no; then
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ case $host_cpu in
+ hppa*64*|ia64*)
+ ;;
+ *)
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ ;;
+ esac
+ fi
+ case $host_cpu in
+ hppa*64*|ia64*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ ;;
+ *)
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH,
+ # but as the default
+ # location of the library.
+ ;;
+ esac
+
+ case $cc_basename in
+ CC*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ aCC*)
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test $with_gnu_ld = no; then
+ case $host_cpu in
+ hppa*64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ ia64*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ ;;
+ esac
+ fi
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ interix[[3-9]]*)
+ _LT_TAGVAR(hardcode_direct, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc.
+ # Instead, shared libraries are loaded at an image base (0x10000000 by
+ # default) and relocated if they conflict, which is a slow very memory
+ # consuming and fragmenting process. To avoid this, we pick a random,
+ # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link
+ # time. Moving up from 0x10000000 also allows more sbrk(2) space.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib'
+ ;;
+ irix5* | irix6*)
+ case $cc_basename in
+ CC*)
+ # SGI C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+
+ # Archives containing C++ object files must be created using
+ # "CC -ar", where "CC" is the IRIX C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs'
+ ;;
+ *)
+ if test "$GXX" = yes; then
+ if test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ else
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` -o $lib'
+ fi
+ fi
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ ;;
+ esac
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+ _LT_TAGVAR(inherit_rpath, $1)=yes
+ ;;
+
+ linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib'
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+
+ # Archives containing C++ object files must be created using
+ # "CC -Bstatic", where "CC" is the KAI C++ compiler.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs'
+ ;;
+ icpc* | ecpc* )
+ # Intel C++
+ with_gnu_ld=yes
+ # version 8.0 and above of icpc choke on multiply defined symbols
+ # if we add $predep_objects and $postdep_objects, however 7.1 and
+ # earlier do not add the objects themselves.
+ case `$CC -V 2>&1` in
+ *"Version 7."*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ *) # Version 8.0 or newer
+ tmp_idyn=
+ case $host_cpu in
+ ia64*) tmp_idyn=' -i_dynamic';;
+ esac
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib'
+ ;;
+ esac
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive'
+ ;;
+ pgCC* | pgcpp*)
+ # Portland Group C++ compiler
+ case `$CC -V` in
+ *pgCC\ [[1-5]]* | *pgcpp\ [[1-5]]*)
+ _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~
+ compile_command="$compile_command `find $tpldir -name \*.o | $NL2SP`"'
+ _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~
+ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | $NL2SP`~
+ $RANLIB $oldlib'
+ _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~
+ rm -rf $tpldir~
+ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~
+ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ *) # Version 6 will use weak symbols
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ ;;
+ cxx*)
+ # Compaq C++
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols'
+
+ runpath_var=LD_RUN_PATH
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ xl*)
+ # IBM XL 8.0 on PPC, with GNU ld
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib'
+ if test "x$supports_anon_versioning" = xyes; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~
+ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~
+ echo "local: *; };" >> $output_objdir/$libname.ver~
+ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib'
+ fi
+ ;;
+ *)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; $ECHO \"$new_convenience\"` ${wl}--no-whole-archive'
+ _LT_TAGVAR(compiler_needs_object, $1)=yes
+
+ # Not sure whether something based on
+ # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1
+ # would be better.
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+
+ lynxos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ m88k*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ mvs*)
+ case $cc_basename in
+ cxx*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ netbsd*)
+ if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags'
+ wlarc=
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ fi
+ # Workaround some broken pre-1.5 toolchains
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"'
+ ;;
+
+ *nto* | *qnx*)
+ _LT_TAGVAR(ld_shlibs, $1)=yes
+ ;;
+
+ openbsd2*)
+ # C++ shared libraries are fairly broken
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ openbsd*)
+ if test -f /usr/libexec/ld.so; then
+ _LT_TAGVAR(hardcode_direct, $1)=yes
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_direct_absolute, $1)=yes
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib'
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E'
+ _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive'
+ fi
+ output_verbose_link_cmd=echo
+ else
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+
+ osf3* | osf4* | osf5*)
+ case $cc_basename in
+ KCC*)
+ # Kuck and Associates, Inc. (KAI) C++ Compiler
+
+ # KCC will only create a shared library if the output file
+ # ends with ".so" (or ".sl" for HP-UX), so rename the library
+ # to its proper name (with version) after linking.
+ _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Archives containing C++ object files must be created using
+ # the KAI C++ compiler.
+ case $host in
+ osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;;
+ *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;;
+ esac
+ ;;
+ RCC*)
+ # Rational C++ 2.4.1
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ cxx*)
+ case $host in
+ osf3*)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && $ECHO "X${wl}-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ ;;
+ *)
+ _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~
+ echo "-hidden">> $lib.exp~
+ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "X-set_version $verstring" | $Xsed` -update_registry ${output_objdir}/so_locations -o $lib~
+ $RM $lib.exp'
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ #
+ # There doesn't appear to be a way to prevent this compiler from
+ # explicitly linking system object files so we need to strip them
+ # from the output so that they don't get included in the library
+ # dependencies.
+ output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`$ECHO "X$templist" | $Xsed -e "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; $ECHO "X$list" | $Xsed'
+ ;;
+ *)
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*'
+ case $host in
+ osf3*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "X${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && $ECHO "${wl}-set_version ${wl}$verstring" | $Xsed` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib'
+ ;;
+ esac
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=:
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+
+ else
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ fi
+ ;;
+ esac
+ ;;
+
+ psos*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ sunos4*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.x
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ lcc*)
+ # Lucid
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ solaris*)
+ case $cc_basename in
+ CC*)
+ # Sun C++ 4.2, 5.x and Centerline C++
+ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes
+ _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ # The compiler driver will combine and reorder linker options,
+ # but understands `-z linker_flag'.
+ # Supported since Solaris 2.6 (maybe 2.5.1?)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract'
+ ;;
+ esac
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+
+ output_verbose_link_cmd='echo'
+
+ # Archives containing C++ object files must be created using
+ # "CC -xar", where "CC" is the Sun C++ compiler. This is
+ # necessary to make sure instantiated templates are included
+ # in the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs'
+ ;;
+ gcx*)
+ # Green Hills C++ Compiler
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+
+ # The C++ compiler must be used to create the archive.
+ _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs'
+ ;;
+ *)
+ # GNU C++ compiler with Solaris linker
+ if test "$GXX" = yes && test "$with_gnu_ld" = no; then
+ _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs'
+ if $CC --version | $GREP -v '^2\.7' > /dev/null; then
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ else
+ # g++ 2.7 appears to require `-G' NOT `-shared' on this
+ # platform.
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~
+ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp'
+
+ # Commands to make compiler produce verbose output that lists
+ # what "hidden" libraries, object files and flags are used when
+ # linking a shared library.
+ output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP "\-L"'
+ fi
+
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir'
+ case $host_os in
+ solaris2.[[0-5]] | solaris2.[[0-5]].*) ;;
+ *)
+ _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract'
+ ;;
+ esac
+ fi
+ ;;
+ esac
+ ;;
+
+ sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*)
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ sysv5* | sco3.2v5* | sco5v6*)
+ # Note: We can NOT use -z defs as we might desire, because we do not
+ # link with -lc, and that would cause any symbols used from libc to
+ # always be unresolved, which means just about no library would
+ # ever link correctly. If we're not using GNU ld we use -z text
+ # though, which does catch some bad symbols but isn't as heavy-handed
+ # as -z defs.
+ _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text'
+ _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs'
+ _LT_TAGVAR(archive_cmds_need_lc, $1)=no
+ _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
+ _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir'
+ _LT_TAGVAR(hardcode_libdir_separator, $1)=':'
+ _LT_TAGVAR(link_all_deplibs, $1)=yes
+ _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport'
+ runpath_var='LD_RUN_PATH'
+
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ *)
+ _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags'
+ ;;
+ esac
+ ;;
+
+ tandem*)
+ case $cc_basename in
+ NCC*)
+ # NonStop-UX NCC 3.20
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+ ;;
+
+ vxworks*)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+
+ *)
+ # FIXME: insert proper C++ library support
+ _LT_TAGVAR(ld_shlibs, $1)=no
+ ;;
+ esac
+
+ AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)])
+ test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no
+
+ _LT_TAGVAR(GCC, $1)="$GXX"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ CC=$lt_save_CC
+ LDCXX=$LD
+ LD=$lt_save_LD
+ GCC=$lt_save_GCC
+ with_gnu_ld=$lt_save_with_gnu_ld
+ lt_cv_path_LDCXX=$lt_cv_path_LD
+ lt_cv_path_LD=$lt_save_path_LD
+ lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld
+ lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld
+fi # test "$_lt_caught_CXX_error" != yes
+
+AC_LANG_POP
+])# _LT_LANG_CXX_CONFIG
+
+
+# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
+# ---------------------------------
+# Figure out "hidden" library dependencies from verbose
+# compiler output when linking a shared library.
+# Parse the compiler output and extract the necessary
+# objects, libraries and library flags.
+m4_defun([_LT_SYS_HIDDEN_LIBDEPS],
+[m4_require([_LT_FILEUTILS_DEFAULTS])dnl
+# Dependencies to place before and after the object being linked:
+_LT_TAGVAR(predep_objects, $1)=
+_LT_TAGVAR(postdep_objects, $1)=
+_LT_TAGVAR(predeps, $1)=
+_LT_TAGVAR(postdeps, $1)=
+_LT_TAGVAR(compiler_lib_search_path, $1)=
+
+dnl we can't use the lt_simple_compile_test_code here,
+dnl because it contains code intended for an executable,
+dnl not a library. It's possible we should let each
+dnl tag define a new lt_????_link_test_code variable,
+dnl but it's only used here...
+m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF
+int a;
+void foo (void) { a = 0; }
+_LT_EOF
+], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF
+class Foo
+{
+public:
+ Foo (void) { a = 0; }
+private:
+ int a;
+};
+_LT_EOF
+], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer*4 a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF
+ subroutine foo
+ implicit none
+ integer a
+ a=0
+ return
+ end
+_LT_EOF
+], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF
+public class foo {
+ private int a;
+ public void bar (void) {
+ a = 0;
+ }
+};
+_LT_EOF
+])
+dnl Parse the compiler output and extract the necessary
+dnl objects, libraries and library flags.
+if AC_TRY_EVAL(ac_compile); then
+ # Parse the compiler output and extract the necessary
+ # objects, libraries and library flags.
+
+ # Sentinel used to keep track of whether or not we are before
+ # the conftest object file.
+ pre_test_object_deps_done=no
+
+ for p in `eval "$output_verbose_link_cmd"`; do
+ case $p in
+
+ -L* | -R* | -l*)
+ # Some compilers place space between "-{L,R}" and the path.
+ # Remove the space.
+ if test $p = "-L" ||
+ test $p = "-R"; then
+ prev=$p
+ continue
+ else
+ prev=
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ case $p in
+ -L* | -R*)
+ # Internal compiler library paths should come after those
+ # provided the user. The postdeps already come after the
+ # user supplied libs so there is no need to process them.
+ if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}"
+ fi
+ ;;
+ # The "-l" case would never come before the object being
+ # linked, so don't bother handling this case.
+ esac
+ else
+ if test -z "$_LT_TAGVAR(postdeps, $1)"; then
+ _LT_TAGVAR(postdeps, $1)="${prev}${p}"
+ else
+ _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}"
+ fi
+ fi
+ ;;
+
+ *.$objext)
+ # This assumes that the test object file only shows up
+ # once in the compiler output.
+ if test "$p" = "conftest.$objext"; then
+ pre_test_object_deps_done=yes
+ continue
+ fi
+
+ if test "$pre_test_object_deps_done" = no; then
+ if test -z "$_LT_TAGVAR(predep_objects, $1)"; then
+ _LT_TAGVAR(predep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p"
+ fi
+ else
+ if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then
+ _LT_TAGVAR(postdep_objects, $1)="$p"
+ else
+ _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p"
+ fi
+ fi
+ ;;
+
+ *) ;; # Ignore the rest.
+
+ esac
+ done
+
+ # Clean up.
+ rm -f a.out a.exe
+else
+ echo "libtool.m4: error: problem compiling $1 test program"
+fi
+
+$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+interix[[3-9]]*)
+ # Interix 3.5 installs completely hosed .la files for C++, so rather than
+ # hack all around it, let's just trust "g++" to DTRT.
+ _LT_TAGVAR(predep_objects,$1)=
+ _LT_TAGVAR(postdep_objects,$1)=
+ _LT_TAGVAR(postdeps,$1)=
+ ;;
+
+linux*)
+ case `$CC -V 2>&1 | sed 5q` in
+ *Sun\ C*)
+ # Sun C++ 5.9
+
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+
+solaris*)
+ case $cc_basename in
+ CC*)
+ # The more standards-conforming stlport4 library is
+ # incompatible with the Cstd library. Avoid specifying
+ # it if it's in CXXFLAGS. Ignore libCrun as
+ # -library=stlport4 depends on it.
+ case " $CXX $CXXFLAGS " in
+ *" -library=stlport4 "*)
+ solaris_use_stlport4=yes
+ ;;
+ esac
+
+ # Adding this requires a known-good setup of shared libraries for
+ # Sun compiler versions before 5.6, else PIC objects from an old
+ # archive will be linked into the output, leading to subtle bugs.
+ if test "$solaris_use_stlport4" != yes; then
+ _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun'
+ fi
+ ;;
+ esac
+ ;;
+esac
+])
+
+case " $_LT_TAGVAR(postdeps, $1) " in
+*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
+esac
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=
+if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then
+ _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'`
+fi
+_LT_TAGDECL([], [compiler_lib_search_dirs], [1],
+ [The directories searched by this compiler when creating a shared library])
+_LT_TAGDECL([], [predep_objects], [1],
+ [Dependencies to place before and after the objects being linked to
+ create a shared library])
+_LT_TAGDECL([], [postdep_objects], [1])
+_LT_TAGDECL([], [predeps], [1])
+_LT_TAGDECL([], [postdeps], [1])
+_LT_TAGDECL([], [compiler_lib_search_path], [1],
+ [The library search path used internally by the compiler when linking
+ a shared library])
+])# _LT_SYS_HIDDEN_LIBDEPS
+
+
+# _LT_PROG_F77
+# ------------
+# Since AC_PROG_F77 is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_F77],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_F77=yes])
+AC_PROG_F77
+if test -z "$F77" || test "X$F77" = "Xno"; then
+ _lt_disable_F77=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_F77
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_F77], [])
+
+
+# _LT_LANG_F77_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for a Fortran 77 compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_F77_CONFIG],
+[AC_REQUIRE([_LT_PROG_F77])dnl
+AC_LANG_PUSH(Fortran 77)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for f77 test sources.
+ac_ext=f
+
+# Object file extension for compiled f77 test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the F77 compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_F77" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${F77-"f77"}
+ compiler=$CC
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+ GCC=$G77
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$G77"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_F77" != yes
+
+AC_LANG_POP
+])# _LT_LANG_F77_CONFIG
+
+
+# _LT_PROG_FC
+# -----------
+# Since AC_PROG_FC is broken, in that it returns the empty string
+# if there is no fortran compiler, we have our own version here.
+m4_defun([_LT_PROG_FC],
+[
+pushdef([AC_MSG_ERROR], [_lt_disable_FC=yes])
+AC_PROG_FC
+if test -z "$FC" || test "X$FC" = "Xno"; then
+ _lt_disable_FC=yes
+fi
+popdef([AC_MSG_ERROR])
+])# _LT_PROG_FC
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([_LT_PROG_FC], [])
+
+
+# _LT_LANG_FC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for a Fortran compiler are
+# suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_FC_CONFIG],
+[AC_REQUIRE([_LT_PROG_FC])dnl
+AC_LANG_PUSH(Fortran)
+
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+_LT_TAGVAR(allow_undefined_flag, $1)=
+_LT_TAGVAR(always_export_symbols, $1)=no
+_LT_TAGVAR(archive_expsym_cmds, $1)=
+_LT_TAGVAR(export_dynamic_flag_spec, $1)=
+_LT_TAGVAR(hardcode_direct, $1)=no
+_LT_TAGVAR(hardcode_direct_absolute, $1)=no
+_LT_TAGVAR(hardcode_libdir_flag_spec, $1)=
+_LT_TAGVAR(hardcode_libdir_flag_spec_ld, $1)=
+_LT_TAGVAR(hardcode_libdir_separator, $1)=
+_LT_TAGVAR(hardcode_minus_L, $1)=no
+_LT_TAGVAR(hardcode_automatic, $1)=no
+_LT_TAGVAR(inherit_rpath, $1)=no
+_LT_TAGVAR(module_cmds, $1)=
+_LT_TAGVAR(module_expsym_cmds, $1)=
+_LT_TAGVAR(link_all_deplibs, $1)=unknown
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+_LT_TAGVAR(no_undefined_flag, $1)=
+_LT_TAGVAR(whole_archive_flag_spec, $1)=
+_LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no
+
+# Source file extension for fc test sources.
+ac_ext=${ac_fc_srcext-f}
+
+# Object file extension for compiled fc test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# No sense in running all these tests if we already determined that
+# the FC compiler isn't working. Some variables (like enable_shared)
+# are currently assumed to apply to all compilers on this platform,
+# and will be corrupted by setting them based on a non-working compiler.
+if test "$_lt_disable_FC" != yes; then
+ # Code to be used in simple compile tests
+ lt_simple_compile_test_code="\
+ subroutine t
+ return
+ end
+"
+
+ # Code to be used in simple link tests
+ lt_simple_link_test_code="\
+ program t
+ end
+"
+
+ # ltmain only uses $CC for tagged configurations so make sure $CC is set.
+ _LT_TAG_COMPILER
+
+ # save warnings/boilerplate of simple test code
+ _LT_COMPILER_BOILERPLATE
+ _LT_LINKER_BOILERPLATE
+
+ # Allow CC to be a program name with arguments.
+ lt_save_CC="$CC"
+ lt_save_GCC=$GCC
+ CC=${FC-"f95"}
+ compiler=$CC
+ GCC=$ac_cv_fc_compiler_gnu
+
+ _LT_TAGVAR(compiler, $1)=$CC
+ _LT_CC_BASENAME([$compiler])
+
+ if test -n "$compiler"; then
+ AC_MSG_CHECKING([if libtool supports shared libraries])
+ AC_MSG_RESULT([$can_build_shared])
+
+ AC_MSG_CHECKING([whether to build shared libraries])
+ test "$can_build_shared" = "no" && enable_shared=no
+
+ # On AIX, shared libraries and static libraries use the same namespace, and
+ # are all built from PIC.
+ case $host_os in
+ aix3*)
+ test "$enable_shared" = yes && enable_static=no
+ if test -n "$RANLIB"; then
+ archive_cmds="$archive_cmds~\$RANLIB \$lib"
+ postinstall_cmds='$RANLIB $lib'
+ fi
+ ;;
+ aix[[4-9]]*)
+ if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
+ test "$enable_shared" = yes && enable_static=no
+ fi
+ ;;
+ esac
+ AC_MSG_RESULT([$enable_shared])
+
+ AC_MSG_CHECKING([whether to build static libraries])
+ # Make sure either enable_shared or enable_static is yes.
+ test "$enable_shared" = yes || enable_static=yes
+ AC_MSG_RESULT([$enable_static])
+
+ _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu"
+ _LT_TAGVAR(LD, $1)="$LD"
+
+ ## CAVEAT EMPTOR:
+ ## There is no encapsulation within the following macros, do not change
+ ## the running order or otherwise move them around unless you know exactly
+ ## what you are doing...
+ _LT_SYS_HIDDEN_LIBDEPS($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_SYS_DYNAMIC_LINKER($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+ fi # test -n "$compiler"
+
+ GCC=$lt_save_GCC
+ CC="$lt_save_CC"
+fi # test "$_lt_disable_FC" != yes
+
+AC_LANG_POP
+])# _LT_LANG_FC_CONFIG
+
+
+# _LT_LANG_GCJ_CONFIG([TAG])
+# --------------------------
+# Ensure that the configuration variables for the GNU Java Compiler compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_GCJ_CONFIG],
+[AC_REQUIRE([LT_PROG_GCJ])dnl
+AC_LANG_SAVE
+
+# Source file extension for Java test sources.
+ac_ext=java
+
+# Object file extension for compiled Java test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code="class foo {}"
+
+# Code to be used in simple link tests
+lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }'
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=yes
+CC=${GCJ-"gcj"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_TAGVAR(LD, $1)="$LD"
+_LT_CC_BASENAME([$compiler])
+
+# GCJ did not exist at the time GCC didn't implicitly link libc in.
+_LT_TAGVAR(archive_cmds_need_lc, $1)=no
+
+_LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds
+
+## CAVEAT EMPTOR:
+## There is no encapsulation within the following macros, do not change
+## the running order or otherwise move them around unless you know exactly
+## what you are doing...
+if test -n "$compiler"; then
+ _LT_COMPILER_NO_RTTI($1)
+ _LT_COMPILER_PIC($1)
+ _LT_COMPILER_C_O($1)
+ _LT_COMPILER_FILE_LOCKS($1)
+ _LT_LINKER_SHLIBS($1)
+ _LT_LINKER_HARDCODE_LIBPATH($1)
+
+ _LT_CONFIG($1)
+fi
+
+AC_LANG_RESTORE
+
+GCC=$lt_save_GCC
+CC="$lt_save_CC"
+])# _LT_LANG_GCJ_CONFIG
+
+
+# _LT_LANG_RC_CONFIG([TAG])
+# -------------------------
+# Ensure that the configuration variables for the Windows resource compiler
+# are suitably defined. These variables are subsequently used by _LT_CONFIG
+# to write the compiler configuration to `libtool'.
+m4_defun([_LT_LANG_RC_CONFIG],
+[AC_REQUIRE([LT_PROG_RC])dnl
+AC_LANG_SAVE
+
+# Source file extension for RC test sources.
+ac_ext=rc
+
+# Object file extension for compiled RC test sources.
+objext=o
+_LT_TAGVAR(objext, $1)=$objext
+
+# Code to be used in simple compile tests
+lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }'
+
+# Code to be used in simple link tests
+lt_simple_link_test_code="$lt_simple_compile_test_code"
+
+# ltmain only uses $CC for tagged configurations so make sure $CC is set.
+_LT_TAG_COMPILER
+
+# save warnings/boilerplate of simple test code
+_LT_COMPILER_BOILERPLATE
+_LT_LINKER_BOILERPLATE
+
+# Allow CC to be a program name with arguments.
+lt_save_CC="$CC"
+lt_save_GCC=$GCC
+GCC=
+CC=${RC-"windres"}
+compiler=$CC
+_LT_TAGVAR(compiler, $1)=$CC
+_LT_CC_BASENAME([$compiler])
+_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes
+
+if test -n "$compiler"; then
+ :
+ _LT_CONFIG($1)
+fi
+
+GCC=$lt_save_GCC
+AC_LANG_RESTORE
+CC="$lt_save_CC"
+])# _LT_LANG_RC_CONFIG
+
+
+# LT_PROG_GCJ
+# -----------
+AC_DEFUN([LT_PROG_GCJ],
+[m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ],
+ [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ],
+ [AC_CHECK_TOOL(GCJ, gcj,)
+ test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2"
+ AC_SUBST(GCJFLAGS)])])[]dnl
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_GCJ], [])
+
+
+# LT_PROG_RC
+# ----------
+AC_DEFUN([LT_PROG_RC],
+[AC_CHECK_TOOL(RC, windres,)
+])
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_RC], [])
+
+
+# _LT_DECL_EGREP
+# --------------
+# If we don't have a new enough Autoconf to choose the best grep
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_EGREP],
+[AC_REQUIRE([AC_PROG_EGREP])dnl
+AC_REQUIRE([AC_PROG_FGREP])dnl
+test -z "$GREP" && GREP=grep
+_LT_DECL([], [GREP], [1], [A grep program that handles long lines])
+_LT_DECL([], [EGREP], [1], [An ERE matcher])
+_LT_DECL([], [FGREP], [1], [A literal string matcher])
+dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too
+AC_SUBST([GREP])
+])
+
+
+# _LT_DECL_OBJDUMP
+# --------------
+# If we don't have a new enough Autoconf to choose the best objdump
+# available, choose the one first in the user's PATH.
+m4_defun([_LT_DECL_OBJDUMP],
+[AC_CHECK_TOOL(OBJDUMP, objdump, false)
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [1], [An object symbol dumper])
+AC_SUBST([OBJDUMP])
+])
+
+
+# _LT_DECL_SED
+# ------------
+# Check for a fully-functional sed program, that truncates
+# as few characters as possible. Prefer GNU sed if found.
+m4_defun([_LT_DECL_SED],
+[AC_PROG_SED
+test -z "$SED" && SED=sed
+Xsed="$SED -e 1s/^X//"
+_LT_DECL([], [SED], [1], [A sed program that does not truncate output])
+_LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"],
+ [Sed that helps us avoid accidentally triggering echo(1) options like -n])
+])# _LT_DECL_SED
+
+m4_ifndef([AC_PROG_SED], [
+############################################################
+# NOTE: This macro has been submitted for inclusion into #
+# GNU Autoconf as AC_PROG_SED. When it is available in #
+# a released version of Autoconf we should remove this #
+# macro and use it instead. #
+############################################################
+
+m4_defun([AC_PROG_SED],
+[AC_MSG_CHECKING([for a sed that does not truncate output])
+AC_CACHE_VAL(lt_cv_path_SED,
+[# Loop through the user's path and test for sed and gsed.
+# Then use that list of sed's as ones to test for truncation.
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for lt_ac_prog in sed gsed; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then
+ lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext"
+ fi
+ done
+ done
+done
+IFS=$as_save_IFS
+lt_ac_max=0
+lt_ac_count=0
+# Add /usr/xpg4/bin/sed as it is typically found on Solaris
+# along with /bin/sed that truncates output.
+for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do
+ test ! -f $lt_ac_sed && continue
+ cat /dev/null > conftest.in
+ lt_ac_count=0
+ echo $ECHO_N "0123456789$ECHO_C" >conftest.in
+ # Check for GNU sed and select it if it is found.
+ if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then
+ lt_cv_path_SED=$lt_ac_sed
+ break
+ fi
+ while true; do
+ cat conftest.in conftest.in >conftest.tmp
+ mv conftest.tmp conftest.in
+ cp conftest.in conftest.nl
+ echo >>conftest.nl
+ $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break
+ cmp -s conftest.out conftest.nl || break
+ # 10000 chars as input seems more than enough
+ test $lt_ac_count -gt 10 && break
+ lt_ac_count=`expr $lt_ac_count + 1`
+ if test $lt_ac_count -gt $lt_ac_max; then
+ lt_ac_max=$lt_ac_count
+ lt_cv_path_SED=$lt_ac_sed
+ fi
+ done
+done
+])
+SED=$lt_cv_path_SED
+AC_SUBST([SED])
+AC_MSG_RESULT([$SED])
+])#AC_PROG_SED
+])#m4_ifndef
+
+# Old name:
+AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([LT_AC_PROG_SED], [])
+
+
+# _LT_CHECK_SHELL_FEATURES
+# ------------------------
+# Find out whether the shell is Bourne or XSI compatible,
+# or has some other useful features.
+m4_defun([_LT_CHECK_SHELL_FEATURES],
+[AC_MSG_CHECKING([whether the shell understands some XSI constructs])
+# Try some XSI features
+xsi_shell=no
+( _lt_dummy="a/b/c"
+ test "${_lt_dummy##*/},${_lt_dummy%/*},"${_lt_dummy%"$_lt_dummy"}, \
+ = c,a/b,, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \
+ && xsi_shell=yes
+AC_MSG_RESULT([$xsi_shell])
+_LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell'])
+
+AC_MSG_CHECKING([whether the shell understands "+="])
+lt_shell_append=no
+( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \
+ >/dev/null 2>&1 \
+ && lt_shell_append=yes
+AC_MSG_RESULT([$lt_shell_append])
+_LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append'])
+
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ lt_unset=unset
+else
+ lt_unset=false
+fi
+_LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl
+
+# test EBCDIC or ASCII
+case `echo X|tr X '\101'` in
+ A) # ASCII based system
+ # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr
+ lt_SP2NL='tr \040 \012'
+ lt_NL2SP='tr \015\012 \040\040'
+ ;;
+ *) # EBCDIC based system
+ lt_SP2NL='tr \100 \n'
+ lt_NL2SP='tr \r\n \100\100'
+ ;;
+esac
+_LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl
+_LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl
+])# _LT_CHECK_SHELL_FEATURES
+
+
+# _LT_PROG_XSI_SHELLFNS
+# ---------------------
+# Bourne and XSI compatible variants of some useful shell functions.
+m4_defun([_LT_PROG_XSI_SHELLFNS],
+[case $xsi_shell in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result="${1##*/}"
+}
+
+# func_dirname_and_basename file append nondir_replacement
+# perform func_basename and func_dirname in a single function
+# call:
+# dirname: Compute the dirname of FILE. If nonempty,
+# add APPEND to the result, otherwise set result
+# to NONDIR_REPLACEMENT.
+# value returned in "$func_dirname_result"
+# basename: Compute filename of FILE.
+# value retuned in "$func_basename_result"
+# Implementation must be kept synchronized with func_dirname
+# and func_basename. For efficiency, we do not delegate to
+# those functions but instead duplicate the functionality here.
+func_dirname_and_basename ()
+{
+ case ${1} in
+ */*) func_dirname_result="${1%/*}${2}" ;;
+ * ) func_dirname_result="${3}" ;;
+ esac
+ func_basename_result="${1##*/}"
+}
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+func_stripname ()
+{
+ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are
+ # positional parameters, so assign one to ordinary parameter first.
+ func_stripname_result=${3}
+ func_stripname_result=${func_stripname_result#"${1}"}
+ func_stripname_result=${func_stripname_result%"${2}"}
+}
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=${1%%=*}
+ func_opt_split_arg=${1#*=}
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ case ${1} in
+ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;
+ *) func_lo2o_result=${1} ;;
+ esac
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=${1%.*}.lo
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=$(( $[*] ))
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=${#1}
+}
+
+_LT_EOF
+ ;;
+ *) # Bourne compatible functions.
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_dirname file append nondir_replacement
+# Compute the dirname of FILE. If nonempty, add APPEND to the result,
+# otherwise set result to NONDIR_REPLACEMENT.
+func_dirname ()
+{
+ # Extract subdirectory from the argument.
+ func_dirname_result=`$ECHO "X${1}" | $Xsed -e "$dirname"`
+ if test "X$func_dirname_result" = "X${1}"; then
+ func_dirname_result="${3}"
+ else
+ func_dirname_result="$func_dirname_result${2}"
+ fi
+}
+
+# func_basename file
+func_basename ()
+{
+ func_basename_result=`$ECHO "X${1}" | $Xsed -e "$basename"`
+}
+
+dnl func_dirname_and_basename
+dnl A portable version of this function is already defined in general.m4sh
+dnl so there is no need for it here.
+
+# func_stripname prefix suffix name
+# strip PREFIX and SUFFIX off of NAME.
+# PREFIX and SUFFIX must not contain globbing or regex special
+# characters, hashes, percent signs, but SUFFIX may contain a leading
+# dot (in which case that matches only a dot).
+# func_strip_suffix prefix name
+func_stripname ()
+{
+ case ${2} in
+ .*) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%\\\\${2}\$%%"`;;
+ *) func_stripname_result=`$ECHO "X${3}" \
+ | $Xsed -e "s%^${1}%%" -e "s%${2}\$%%"`;;
+ esac
+}
+
+# sed scripts:
+my_sed_long_opt='1s/^\(-[[^=]]*\)=.*/\1/;q'
+my_sed_long_arg='1s/^-[[^=]]*=//'
+
+# func_opt_split
+func_opt_split ()
+{
+ func_opt_split_opt=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_opt"`
+ func_opt_split_arg=`$ECHO "X${1}" | $Xsed -e "$my_sed_long_arg"`
+}
+
+# func_lo2o object
+func_lo2o ()
+{
+ func_lo2o_result=`$ECHO "X${1}" | $Xsed -e "$lo2o"`
+}
+
+# func_xform libobj-or-source
+func_xform ()
+{
+ func_xform_result=`$ECHO "X${1}" | $Xsed -e 's/\.[[^.]]*$/.lo/'`
+}
+
+# func_arith arithmetic-term...
+func_arith ()
+{
+ func_arith_result=`expr "$[@]"`
+}
+
+# func_len string
+# STRING may not start with a hyphen.
+func_len ()
+{
+ func_len_result=`expr "$[1]" : ".*" 2>/dev/null || echo $max_cmd_len`
+}
+
+_LT_EOF
+esac
+
+case $lt_shell_append in
+ yes)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]+=\$[2]"
+}
+_LT_EOF
+ ;;
+ *)
+ cat << \_LT_EOF >> "$cfgfile"
+
+# func_append var value
+# Append VALUE to the end of shell variable VAR.
+func_append ()
+{
+ eval "$[1]=\$$[1]\$[2]"
+}
+
+_LT_EOF
+ ;;
+ esac
+])
diff --git a/ltdl/m4/link.m4 b/ltdl/m4/link.m4
new file mode 100755
index 00000000..0ca85d3a
--- /dev/null
+++ b/ltdl/m4/link.m4
@@ -0,0 +1,38 @@
+# link.m4 serial 4
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([link])
+ if test $ac_cv_func_link = no; then
+ HAVE_LINK=0
+ AC_LIBOBJ([link])
+ else
+ AC_CACHE_CHECK([whether link handles trailing slash correctly],
+ [gl_cv_func_link_works],
+ [touch conftest.a
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.a conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[if (!link ("conftest.a", "conftest.b/")) return 1;
+#if HAVE_LSTAT
+ if (!link ("conftest.lnk/", "conftest.b")) return 2;
+#endif
+ ]])],
+ [gl_cv_func_link_works=yes], [gl_cv_func_link_works=no],
+ [gl_cv_func_link_works="guessing no"])
+ rm -f conftest.a conftest.b conftest.lnk])
+ if test "$gl_cv_func_link_works" != yes; then
+ REPLACE_LINK=1
+ AC_LIBOBJ([link])
+ fi
+ fi
+])
diff --git a/ltdl/m4/localcharset.m4 b/ltdl/m4/localcharset.m4
new file mode 100755
index 00000000..ee2e801b
--- /dev/null
+++ b/ltdl/m4/localcharset.m4
@@ -0,0 +1,17 @@
+# localcharset.m4 serial 7
+dnl Copyright (C) 2002, 2004, 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_LOCALCHARSET],
+[
+ dnl Prerequisites of lib/localcharset.c.
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_REQUIRE([gl_FCNTL_O_FLAGS])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+
+ dnl Prerequisites of the lib/Makefile.am snippet.
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_GLIBC21])
+])
diff --git a/ltdl/m4/locale-fr.m4 b/ltdl/m4/locale-fr.m4
new file mode 100755
index 00000000..001f5390
--- /dev/null
+++ b/ltdl/m4/locale-fr.m4
@@ -0,0 +1,185 @@
+# locale-fr.m4 serial 11
+dnl Copyright (C) 2003, 2005-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 Bruno Haible.
+
+dnl Determine the name of a french locale with traditional encoding.
+AC_DEFUN([gt_LOCALE_FR],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional french locale], [gt_cv_locale_fr], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
+ one byte long. This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO-8859-1
+ else
+ # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
+ if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.ISO8859-1
+ else
+ # Test for the HP-UX locale name.
+ if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr_FR.iso88591
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr=fr
+ else
+ # None found.
+ gt_cv_locale_fr=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR=$gt_cv_locale_fr
+ AC_SUBST([LOCALE_FR])
+])
+
+dnl Determine the name of a french locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_FR_UTF8],
+[
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a french Unicode locale], [gt_cv_locale_fr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. */
+#if !(defined __BEOS__ || defined __HAIKU__)
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+# if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+# endif
+# ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+# endif
+ /* Check whether in the abbreviation of the second month, the second
+ character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
+ return 1;
+#endif
+ /* Check whether the decimal separator is a comma.
+ On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
+ are nl_langinfo(RADIXCHAR) are both ".". */
+ if (localeconv () ->decimal_point[0] != ',') return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr_FR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_fr_utf8=fr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_fr_utf8=none
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
+ AC_SUBST([LOCALE_FR_UTF8])
+])
diff --git a/ltdl/m4/locale-ja.m4 b/ltdl/m4/locale-ja.m4
new file mode 100755
index 00000000..0eedaf14
--- /dev/null
+++ b/ltdl/m4/locale-ja.m4
@@ -0,0 +1,107 @@
+# locale-ja.m4 serial 7
+dnl Copyright (C) 2003, 2005-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 Bruno Haible.
+
+dnl Determine the name of a japanese locale with EUC-JP encoding.
+AC_DEFUN([gt_LOCALE_JA],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a traditional japanese locale], [gt_cv_locale_ja], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
+ on Cygwin 1.5.x. */
+ if (MB_CUR_MAX == 1)
+ return 1;
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the AIX locale name.
+ if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC-JP
+ else
+ # Test for the HP-UX, OSF/1, NetBSD locale name.
+ if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # Test for the IRIX, FreeBSD locale name.
+ if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja_JP.EUC
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_ja=ja
+ else
+ # Special test for NetBSD 1.6.
+ if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
+ gt_cv_locale_ja=ja_JP.eucJP
+ else
+ # None found.
+ gt_cv_locale_ja=none
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_JA=$gt_cv_locale_ja
+ AC_SUBST([LOCALE_JA])
+])
diff --git a/ltdl/m4/locale-tr.m4 b/ltdl/m4/locale-tr.m4
new file mode 100755
index 00000000..404c063c
--- /dev/null
+++ b/ltdl/m4/locale-tr.m4
@@ -0,0 +1,97 @@
+# locale-tr.m4 serial 6
+dnl Copyright (C) 2003, 2005-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 Bruno Haible.
+
+dnl Determine the name of a turkish locale with UTF-8 encoding.
+AC_DEFUN([gt_LOCALE_TR_UTF8],
+[
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a turkish Unicode locale], [gt_cv_locale_tr_utf8], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main () {
+ /* On BeOS, locales are not implemented in libc. Rather, libintl
+ imitates locale dependent behaviour by looking at the environment
+ variables, and all locales use the UTF-8 encoding. But BeOS does not
+ implement the Turkish upper-/lowercase mappings. Therefore, let this
+ program return 1 on BeOS. */
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the tr_TR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in the abbreviation of the eighth month, the second
+ character (should be U+011F: LATIN SMALL LETTER G WITH BREVE) is
+ two bytes long, with UTF-8 encoding. */
+ t.tm_year = 1992 - 1900; t.tm_mon = 8 - 1; t.tm_mday = 19;
+ if (strftime (buf, sizeof (buf), "%b", &t) < 4
+ || buf[1] != (char) 0xc4 || buf[2] != (char) 0x9f)
+ return 1;
+ /* Check whether the upper-/lowercase mappings are as expected for
+ Turkish. */
+ if (towupper ('i') != 0x0130 || towlower (0x0130) != 'i'
+ || towupper(0x0131) != 'I' || towlower ('I') != 0x0131)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the usual locale name.
+ if (LC_ALL=tr_TR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=tr_TR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr_TR.UTF-8
+ else
+ # Test for the Solaris 7 locale name.
+ if (LC_ALL=tr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_tr_utf8=tr.UTF-8
+ else
+ # None found.
+ gt_cv_locale_tr_utf8=none
+ fi
+ fi
+ fi
+ else
+ gt_cv_locale_tr_utf8=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_TR_UTF8=$gt_cv_locale_tr_utf8
+ AC_SUBST([LOCALE_TR_UTF8])
+])
diff --git a/ltdl/m4/locale-zh.m4 b/ltdl/m4/locale-zh.m4
new file mode 100755
index 00000000..777fd141
--- /dev/null
+++ b/ltdl/m4/locale-zh.m4
@@ -0,0 +1,92 @@
+# locale-zh.m4 serial 6
+dnl Copyright (C) 2003, 2005-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 Bruno Haible.
+
+dnl Determine the name of a chinese locale with GB18030 encoding.
+AC_DEFUN([gt_LOCALE_ZH_CN],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AM_LANGINFO_CODESET])
+ AC_CACHE_CHECK([for a transitional chinese locale], [gt_cv_locale_zh_CN], [
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+changequote(,)dnl
+#include <locale.h>
+#include <stdlib.h>
+#include <time.h>
+#if HAVE_LANGINFO_CODESET
+# include <langinfo.h>
+#endif
+#include <stdlib.h>
+#include <string.h>
+struct tm t;
+char buf[16];
+int main ()
+{
+ const char *p;
+ /* Check whether the given locale name is recognized by the system. */
+ if (setlocale (LC_ALL, "") == NULL) return 1;
+ /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
+ On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
+ is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
+ On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
+ succeeds but then nl_langinfo(CODESET) is "646". In this situation,
+ some unit tests fail. */
+#if HAVE_LANGINFO_CODESET
+ {
+ const char *cs = nl_langinfo (CODESET);
+ if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
+ return 1;
+ }
+#endif
+#ifdef __CYGWIN__
+ /* On Cygwin, avoid locale names without encoding suffix, because the
+ locale_charset() function relies on the encoding suffix. Note that
+ LC_ALL is set on the command line. */
+ if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
+#endif
+ /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
+ This excludes the UTF-8 encoding. */
+ t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
+ if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
+ for (p = buf; *p != '\0'; p++)
+ if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
+ return 1;
+ /* Check whether a typical GB18030 multibyte sequence is recognized as a
+ single wide character. This excludes the GB2312 and GBK encodings. */
+ if (mblen ("\203\062\332\066", 5) != 4)
+ return 1;
+ return 0;
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
+ # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
+ # configure script would override the LC_ALL setting. Likewise for
+ # LC_CTYPE, which is also set at the beginning of the configure script.
+ # Test for the locale name without encoding suffix.
+ if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN
+ else
+ # Test for the locale name with explicit encoding suffix.
+ if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
+ gt_cv_locale_zh_CN=zh_CN.GB18030
+ else
+ # None found.
+ gt_cv_locale_zh_CN=none
+ fi
+ fi
+ else
+ # If there was a link error, due to mblen(), the system is so old that
+ # it certainly doesn't have a chinese locale.
+ gt_cv_locale_zh_CN=none
+ fi
+ rm -fr conftest*
+ ])
+ LOCALE_ZH_CN=$gt_cv_locale_zh_CN
+ AC_SUBST([LOCALE_ZH_CN])
+])
diff --git a/ltdl/m4/lock.m4 b/ltdl/m4/lock.m4
new file mode 100755
index 00000000..9da8465e
--- /dev/null
+++ b/ltdl/m4/lock.m4
@@ -0,0 +1,37 @@
+# lock.m4 serial 10 (gettext-0.18)
+dnl Copyright (C) 2005-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 Bruno Haible.
+
+AC_DEFUN([gl_LOCK],
+[
+ AC_REQUIRE([gl_THREADLIB])
+ if test "$gl_threads_api" = posix; then
+ # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # pthread_rwlock_* functions.
+ AC_CHECK_TYPE([pthread_rwlock_t],
+ [AC_DEFINE([HAVE_PTHREAD_RWLOCK], [1],
+ [Define if the POSIX multithreading library has read/write locks.])],
+ [],
+ [#include <pthread.h>])
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], [1],
+ [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+ fi
+ gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/ltdl/m4/lock.m4~ b/ltdl/m4/lock.m4~
new file mode 100644
index 00000000..0224f2ff
--- /dev/null
+++ b/ltdl/m4/lock.m4~
@@ -0,0 +1,311 @@
+# lock.m4 serial 6 (gettext-0.16)
+dnl Copyright (C) 2005-2006 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 Bruno Haible.
+
+dnl Tests for a multithreading library to be used.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_LOCK_EARLY],
+[
+ AC_REQUIRE([gl_LOCK_EARLY_BODY])
+])
+
+dnl The guts of gl_LOCK_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_LOCK_EARLY_BODY],
+[
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_GNU_SOURCE]) dnl needed for pthread_rwlock_t on glibc systems
+ dnl Check for multithreading.
+ AC_ARG_ENABLE(threads,
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+ [gl_use_threads=$enableval],
+ [case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its child
+ dnl process gets an endless segmentation fault inside execvp().
+ osf*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # For using <pthread.h>:
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_TRY_LINK test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ fi
+])
+
+dnl The guts of gl_LOCK. Needs to be expanded only once.
+
+AC_DEFUN([gl_LOCK_BODY],
+[
+ AC_REQUIRE([gl_LOCK_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ AC_MSG_CHECKING([whether imported symbols can be declared weak])
+ gl_have_weak=no
+ AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+ AC_MSG_RESULT([$gl_have_weak])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+ # it groks <pthread.h>. It's added above, in gl_LOCK_EARLY_BODY.
+ AC_CHECK_HEADER(pthread.h, gl_have_pthread_h=yes, gl_have_pthread_h=no)
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ gl_have_pthread=
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_mutex_lock((pthread_mutex_t*)0);
+ pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+ [gl_have_pthread=yes])
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB(pthread, pthread_kill,
+ [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+ solaris* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], 1,
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ else
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB(pthread, pthread_kill,
+ [gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB(c_r, pthread_kill,
+ [gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], 1,
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], 1,
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ # OSF/1 4.0 and MacOS X 10.1 lack the pthread_rwlock_t type and the
+ # pthread_rwlock_* functions.
+ AC_CHECK_TYPE([pthread_rwlock_t],
+ [AC_DEFINE([HAVE_PTHREAD_RWLOCK], 1,
+ [Define if the POSIX multithreading library has read/write locks.])],
+ [],
+ [#include <pthread.h>])
+ # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
+ AC_TRY_COMPILE([#include <pthread.h>],
+ [#if __FreeBSD__ == 4
+error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
+#else
+int x = (int)PTHREAD_MUTEX_RECURSIVE;
+return !x;
+#endif],
+ [AC_DEFINE([HAVE_PTHREAD_MUTEX_RECURSIVE], 1,
+ [Define if the <pthread.h> defines PTHREAD_MUTEX_RECURSIVE.])])
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+ [thr_self();],
+ [gl_have_solaristhread=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_SOLARIS_THREADS], 1,
+ [Define if the old Solaris multithreading library can be used.])
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_SOLARIS_THREADS_WEAK], 1,
+ [Define if references to the old Solaris multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_LINKFLAGS(pth)
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lpth"
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], gl_have_pth=yes)
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_PTH_THREADS], 1,
+ [Define if the GNU Pth multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_PTH_THREADS_WEAK], 1,
+ [Define if references to the GNU Pth multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=win32
+ AC_DEFINE([USE_WIN32_THREADS], 1,
+ [Define if the Win32 multithreading API can be used.])
+ fi
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST(LIBTHREAD)
+ AC_SUBST(LTLIBTHREAD)
+ AC_SUBST(LIBMULTITHREAD)
+ AC_SUBST(LTLIBMULTITHREAD)
+])
+
+AC_DEFUN([gl_LOCK],
+[
+ AC_REQUIRE([gl_LOCK_EARLY])
+ AC_REQUIRE([gl_LOCK_BODY])
+ gl_PREREQ_LOCK
+])
+
+# Prerequisites of lib/lock.c.
+AC_DEFUN([gl_PREREQ_LOCK], [
+ AC_REQUIRE([AC_C_INLINE])
+])
+
+dnl Survey of platforms:
+dnl
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl
+dnl GNU Hurd/glibc posix
+dnl
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl
+dnl NetBSD 1.6 --
+dnl
+dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl
+dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl Y (gcc)
+dnl
+dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl -lpthread (gcc) Y
+dnl
+dnl Cygwin posix -lpthread Y OK
+dnl
+dnl Any of the above pth -lpth 0.0
+dnl
+dnl Mingw win32 N OK
+dnl
+dnl BeOS 5 --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl OK if all three tests terminate OK,
+dnl 0.5 if the first test terminates OK but the second one loops endlessly,
+dnl 0.0 if the first test already loops endlessly.
diff --git a/ltdl/m4/longdouble.m4 b/ltdl/m4/longdouble.m4
new file mode 100644
index 00000000..25590f47
--- /dev/null
+++ b/ltdl/m4/longdouble.m4
@@ -0,0 +1,31 @@
+# longdouble.m4 serial 2 (gettext-0.15)
+dnl Copyright (C) 2002-2003, 2006 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 Bruno Haible.
+dnl Test whether the compiler supports the 'long double' type.
+dnl Prerequisite: AC_PROG_CC
+
+dnl This file is only needed in autoconf <= 2.59. Newer versions of autoconf
+dnl have a macro AC_TYPE_LONG_DOUBLE with identical semantics.
+
+AC_DEFUN([gt_TYPE_LONGDOUBLE],
+[
+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
+ [if test "$GCC" = yes; then
+ gt_cv_c_long_double=yes
+ else
+ AC_TRY_COMPILE([
+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
+ long double foo = 0.0;
+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
+ ], ,
+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
+ fi])
+ if test $gt_cv_c_long_double = yes; then
+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
+ fi
+])
diff --git a/ltdl/m4/longlong.m4 b/ltdl/m4/longlong.m4
new file mode 100755
index 00000000..cca3c1a9
--- /dev/null
+++ b/ltdl/m4/longlong.m4
@@ -0,0 +1,106 @@
+# longlong.m4 serial 14
+dnl Copyright (C) 1999-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 everywhere.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), HAVE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [dnl This catches a bug in Tandem NonStop Kernel (OSS) cc -O circa 2004.
+ dnl If cross compiling, assume the bug isn't important, since
+ dnl nobody cross compiles for this platform as far as we know.
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[@%:@include <limits.h>
+ @%:@ifndef LLONG_MAX
+ @%:@ define HALF \
+ (1LL << (sizeof (long long int) * CHAR_BIT - 2))
+ @%:@ define LLONG_MAX (HALF - 1 + HALF)
+ @%:@endif]],
+ [[long long int n = 1;
+ int i;
+ for (i = 0; ; i++)
+ {
+ long long int m = n << i;
+ if (m >> i != n)
+ return 1;
+ if (LLONG_MAX / 2 < m)
+ break;
+ }
+ return 0;]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no],
+ [ac_cv_type_long_long_int=yes])],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.61, but can be removed once we
+# assume 2.62 everywhere.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [_AC_TYPE_LONG_LONG_SNIPPET],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], [1],
+ [Define to 1 if the system has the type `unsigned long long int'.])
+ fi
+])
+
+# Expands to a C program that can be used to test for simultaneous support
+# of 'long long' and 'unsigned long long'. We don't want to say that
+# 'long long' is available if 'unsigned long long' is not, or vice versa,
+# because too many programs rely on the symmetry between signed and unsigned
+# integer types (excluding 'bool').
+AC_DEFUN([_AC_TYPE_LONG_LONG_SNIPPET],
+[
+ AC_LANG_PROGRAM(
+ [[/* For now, do not test the preprocessor; as of 2007 there are too many
+ implementations with broken preprocessors. Perhaps this can
+ be revisited in 2012. In the meantime, code should not expect
+ #if to work with literals wider than 32 bits. */
+ /* Test literals. */
+ long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ unsigned long long int ull = 18446744073709551615ULL;
+ /* Test constant expressions. */
+ typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[/* Test availability of runtime routines for shift and division. */
+ long long int llmax = 9223372036854775807ll;
+ unsigned long long int ullmax = 18446744073709551615ull;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll)
+ | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
+ | (ullmax / ull) | (ullmax % ull));]])
+])
diff --git a/ltdl/m4/longlong.m4~ b/ltdl/m4/longlong.m4~
new file mode 100644
index 00000000..3716c09f
--- /dev/null
+++ b/ltdl/m4/longlong.m4~
@@ -0,0 +1,48 @@
+# longlong.m4 serial 8
+dnl Copyright (C) 1999-2006 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 Paul Eggert.
+
+# Define HAVE_LONG_LONG_INT if 'long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'long long int' exists but is only 32 bits large
+# (as on some very old compilers), AC_TYPE_LONG_LONG_INT will not be
+# defined. In this case you can treat 'long long int' like 'long int'.
+
+AC_DEFUN([AC_TYPE_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ typedef int a[((-9223372036854775807LL < 0
+ && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ int i = 63;]],
+ [[long long int llmax = 9223372036854775807ll;
+ return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
+ | (llmax / ll) | (llmax % ll));]])],
+ [ac_cv_type_long_long_int=yes],
+ [ac_cv_type_long_long_int=no])])
+ if test $ac_cv_type_long_long_int = yes; then
+ AC_DEFINE([HAVE_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `long long int'.])
+ fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_LONG_LONG],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ ac_cv_type_long_long=$ac_cv_type_long_long_int
+ if test $ac_cv_type_long_long = yes; then
+ AC_DEFINE(HAVE_LONG_LONG, 1,
+ [Define if you have the 'long long' type.])
+ fi
+])
diff --git a/ltdl/m4/lseek.m4 b/ltdl/m4/lseek.m4
new file mode 100755
index 00000000..9bf4dc2d
--- /dev/null
+++ b/ltdl/m4/lseek.m4
@@ -0,0 +1,51 @@
+# lseek.m4 serial 5
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_LSEEK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether lseek detects pipes], [gl_cv_func_lseek_pipe],
+ [if test $cross_compiling = no; then
+ AC_LINK_IFELSE([
+#include <sys/types.h> /* for off_t */
+#include <stdio.h> /* for SEEK_CUR */
+#include <unistd.h>
+int main ()
+{
+ /* Exit with success only if stdin is seekable. */
+ return lseek (0, (off_t)0, SEEK_CUR) < 0;
+}],
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext < conftest.$ac_ext \
+ && test 1 = "`echo hi \
+ | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
+ gl_cv_func_lseek_pipe=yes
+ else
+ gl_cv_func_lseek_pipe=no
+ fi],
+ [gl_cv_func_lseek_pipe=no])
+ else
+ AC_COMPILE_IFELSE([
+#if ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__) || defined __BEOS__
+/* mingw and BeOS mistakenly return 0 when trying to seek on pipes. */
+ Choke me.
+#endif],
+ [gl_cv_func_lseek_pipe=yes], [gl_cv_func_lseek_pipe=no])
+ fi])
+ if test $gl_cv_func_lseek_pipe = no; then
+ gl_REPLACE_LSEEK
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_LSEEK],
+[
+ AC_LIBOBJ([lseek])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ REPLACE_LSEEK=1
+ AC_DEFINE([LSEEK_PIPE_BROKEN], [1],
+ [Define to 1 if lseek does not detect pipes.])
+])
diff --git a/ltdl/m4/lstat.m4 b/ltdl/m4/lstat.m4
new file mode 100755
index 00000000..5dbd16e2
--- /dev/null
+++ b/ltdl/m4/lstat.m4
@@ -0,0 +1,28 @@
+# serial 20
+
+# Copyright (C) 1997-2001, 2003-2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+
+AC_DEFUN([gl_FUNC_LSTAT],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ dnl If lstat does not exist, the replacement <sys/stat.h> does
+ dnl "#define lstat stat", and lstat.c is a no-op.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ if test $ac_cv_func_lstat = yes; then
+ AC_REQUIRE([AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK])
+ if test $ac_cv_func_lstat_dereferences_slashed_symlink = no; then
+ dnl Note: AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK does AC_LIBOBJ([lstat]).
+ REPLACE_LSTAT=1
+ fi
+ # Prerequisites of lib/lstat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ else
+ HAVE_LSTAT=0
+ fi
+])
diff --git a/ltdl/m4/ltdl.m4 b/ltdl/m4/ltdl.m4
new file mode 100644
index 00000000..aeae7383
--- /dev/null
+++ b/ltdl/m4/ltdl.m4
@@ -0,0 +1,804 @@
+# ltdl.m4 - Configure ltdl for the target system. -*-Autoconf-*-
+#
+# Copyright (C) 1999-2006, 2007, 2008 Free Software Foundation, Inc.
+# Written by Thomas Tanner, 1999
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 17 LTDL_INIT
+
+# LT_CONFIG_LTDL_DIR(DIRECTORY, [LTDL-MODE])
+# ------------------------------------------
+# DIRECTORY contains the libltdl sources. It is okay to call this
+# function multiple times, as long as the same DIRECTORY is always given.
+AC_DEFUN([LT_CONFIG_LTDL_DIR],
+[AC_BEFORE([$0], [LTDL_INIT])
+_$0($*)
+])# LT_CONFIG_LTDL_DIR
+
+# We break this out into a separate macro, so that we can call it safely
+# internally without being caught accidentally by the sed scan in libtoolize.
+m4_defun([_LT_CONFIG_LTDL_DIR],
+[dnl remove trailing slashes
+m4_pushdef([_ARG_DIR], m4_bpatsubst([$1], [/*$]))
+m4_case(_LTDL_DIR,
+ [], [dnl only set lt_ltdl_dir if _ARG_DIR is not simply `.'
+ m4_if(_ARG_DIR, [.],
+ [],
+ [m4_define([_LTDL_DIR], _ARG_DIR)
+ _LT_SHELL_INIT([lt_ltdl_dir=']_ARG_DIR['])])],
+ [m4_if(_ARG_DIR, _LTDL_DIR,
+ [],
+ [m4_fatal([multiple libltdl directories: `]_LTDL_DIR[', `]_ARG_DIR['])])])
+m4_popdef([_ARG_DIR])
+])# _LT_CONFIG_LTDL_DIR
+
+# Initialise:
+m4_define([_LTDL_DIR], [])
+
+
+# _LT_BUILD_PREFIX
+# ----------------
+# If Autoconf is new enough, expand to `${top_build_prefix}', otherwise
+# to `${top_builddir}/'.
+m4_define([_LT_BUILD_PREFIX],
+[m4_ifdef([AC_AUTOCONF_VERSION],
+ [m4_if(m4_version_compare(m4_defn([AC_AUTOCONF_VERSION]), [2.62]),
+ [-1], [m4_ifdef([_AC_HAVE_TOP_BUILD_PREFIX],
+ [${top_build_prefix}],
+ [${top_builddir}/])],
+ [${top_build_prefix}])],
+ [${top_builddir}/])[]dnl
+])
+
+
+# LTDL_CONVENIENCE
+# ----------------
+# sets LIBLTDL to the link flags for the libltdl convenience library and
+# LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-convenience to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called here. LIBLTDL will be prefixed with
+# '${top_build_prefix}' if available, otherwise with '${top_builddir}/',
+# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single
+# quotes!). If your package is not flat and you're not using automake,
+# define top_build_prefix, top_builddir, and top_srcdir appropriately
+# in your Makefiles.
+AC_DEFUN([LTDL_CONVENIENCE],
+[AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_CONVENIENCE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])# LTDL_CONVENIENCE
+
+# AC_LIBLTDL_CONVENIENCE accepted a directory argument in older libtools,
+# now we have LT_CONFIG_LTDL_DIR:
+AU_DEFUN([AC_LIBLTDL_CONVENIENCE],
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_CONVENIENCE])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [])
+
+
+# _LTDL_CONVENIENCE
+# -----------------
+# Code shared by LTDL_CONVENIENCE and LTDL_INIT([convenience]).
+m4_defun([_LTDL_CONVENIENCE],
+[case $enable_ltdl_convenience in
+ no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;;
+ "") enable_ltdl_convenience=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;;
+esac
+LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdlc.la"
+LTDLDEPS=$LIBLTDL
+LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+
+AC_SUBST([LIBLTDL])
+AC_SUBST([LTDLDEPS])
+AC_SUBST([LTDLINCL])
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+AC_SUBST([INCLTDL])
+])# _LTDL_CONVENIENCE
+
+
+# LTDL_INSTALLABLE
+# ----------------
+# sets LIBLTDL to the link flags for the libltdl installable library
+# and LTDLINCL to the include flags for the libltdl header and adds
+# --enable-ltdl-install to the configure arguments. Note that
+# AC_CONFIG_SUBDIRS is not called from here. If an installed libltdl
+# is not found, LIBLTDL will be prefixed with '${top_build_prefix}' if
+# available, otherwise with '${top_builddir}/', and LTDLINCL will be
+# prefixed with '${top_srcdir}/' (note the single quotes!). If your
+# package is not flat and you're not using automake, define top_build_prefix,
+# top_builddir, and top_srcdir appropriately in your Makefiles.
+# In the future, this macro may have to be called after LT_INIT.
+AC_DEFUN([LTDL_INSTALLABLE],
+[AC_BEFORE([$0], [LTDL_INIT])dnl
+dnl Although the argument is deprecated and no longer documented,
+dnl LTDL_INSTALLABLE used to take a DIRECTORY orgument, if we have one
+dnl here make sure it is the same as any other declaration of libltdl's
+dnl location! This also ensures lt_ltdl_dir is set when configure.ac is
+dnl not yet using an explicit LT_CONFIG_LTDL_DIR.
+m4_ifval([$1], [_LT_CONFIG_LTDL_DIR([$1])])dnl
+_$0()
+])# LTDL_INSTALLABLE
+
+# AC_LIBLTDL_INSTALLABLE accepted a directory argument in older libtools,
+# now we have LT_CONFIG_LTDL_DIR:
+AU_DEFUN([AC_LIBLTDL_INSTALLABLE],
+[_LT_CONFIG_LTDL_DIR([m4_default([$1], [libltdl])])
+_LTDL_INSTALLABLE])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [])
+
+
+# _LTDL_INSTALLABLE
+# -----------------
+# Code shared by LTDL_INSTALLABLE and LTDL_INIT([installable]).
+m4_defun([_LTDL_INSTALLABLE],
+[if test -f $prefix/lib/libltdl.la; then
+ lt_save_LDFLAGS="$LDFLAGS"
+ LDFLAGS="-L$prefix/lib $LDFLAGS"
+ AC_CHECK_LIB([ltdl], [lt_dlinit], [lt_lib_ltdl=yes])
+ LDFLAGS="$lt_save_LDFLAGS"
+ if test x"${lt_lib_ltdl-no}" = xyes; then
+ if test x"$enable_ltdl_install" != xyes; then
+ # Don't overwrite $prefix/lib/libltdl.la without --enable-ltdl-install
+ AC_MSG_WARN([not overwriting libltdl at $prefix, force with `--enable-ltdl-install'])
+ enable_ltdl_install=no
+ fi
+ elif test x"$enable_ltdl_install" = xno; then
+ AC_MSG_WARN([libltdl not installed, but installation disabled])
+ fi
+fi
+
+# If configure.ac declared an installable ltdl, and the user didn't override
+# with --disable-ltdl-install, we will install the shipped libltdl.
+case $enable_ltdl_install in
+ no) ac_configure_args="$ac_configure_args --enable-ltdl-install=no"
+ LIBLTDL="-lltdl"
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ *) enable_ltdl_install=yes
+ ac_configure_args="$ac_configure_args --enable-ltdl-install"
+ LIBLTDL='_LT_BUILD_PREFIX'"${lt_ltdl_dir+$lt_ltdl_dir/}libltdl.la"
+ LTDLDEPS=$LIBLTDL
+ LTDLINCL='-I${top_srcdir}'"${lt_ltdl_dir+/$lt_ltdl_dir}"
+ ;;
+esac
+
+AC_SUBST([LIBLTDL])
+AC_SUBST([LTDLDEPS])
+AC_SUBST([LTDLINCL])
+
+# For backwards non-gettext consistent compatibility...
+INCLTDL="$LTDLINCL"
+AC_SUBST([INCLTDL])
+])# LTDL_INSTALLABLE
+
+
+# _LTDL_MODE_DISPATCH
+# -------------------
+m4_define([_LTDL_MODE_DISPATCH],
+[dnl If _LTDL_DIR is `.', then we are configuring libltdl itself:
+m4_if(_LTDL_DIR, [],
+ [],
+ dnl if _LTDL_MODE was not set already, the default value is `subproject':
+ [m4_case(m4_default(_LTDL_MODE, [subproject]),
+ [subproject], [AC_CONFIG_SUBDIRS(_LTDL_DIR)
+ _LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"])],
+ [nonrecursive], [_LT_SHELL_INIT([lt_dlopen_dir="$lt_ltdl_dir"; lt_libobj_prefix="$lt_ltdl_dir/"])],
+ [recursive], [],
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])dnl
+dnl Be careful not to expand twice:
+m4_define([$0], [])
+])# _LTDL_MODE_DISPATCH
+
+
+# _LT_LIBOBJ(MODULE_NAME)
+# -----------------------
+# Like AC_LIBOBJ, except that MODULE_NAME goes into _LT_LIBOBJS instead
+# of into LIBOBJS.
+AC_DEFUN([_LT_LIBOBJ], [
+ m4_pattern_allow([^_LT_LIBOBJS$])
+ _LT_LIBOBJS="$_LT_LIBOBJS $1.$ac_objext"
+])# _LT_LIBOBJS
+
+
+# LTDL_INIT([OPTIONS])
+# --------------------
+# Clients of libltdl can use this macro to allow the installer to
+# choose between a shipped copy of the ltdl sources or a preinstalled
+# version of the library. If the shipped ltdl sources are not in a
+# subdirectory named libltdl, the directory name must be given by
+# LT_CONFIG_LTDL_DIR.
+AC_DEFUN([LTDL_INIT],
+[dnl Parse OPTIONS
+_LT_SET_OPTIONS([$0], [$1])
+
+dnl We need to keep our own list of libobjs separate from our parent project,
+dnl and the easiest way to do that is redefine the AC_LIBOBJs macro while
+dnl we look for our own LIBOBJs.
+m4_pushdef([AC_LIBOBJ], m4_defn([_LT_LIBOBJ]))
+m4_pushdef([AC_LIBSOURCES])
+
+dnl If not otherwise defined, default to the 1.5.x compatible subproject mode:
+m4_if(_LTDL_MODE, [],
+ [m4_define([_LTDL_MODE], m4_default([$2], [subproject]))
+ m4_if([-1], [m4_bregexp(_LTDL_MODE, [\(subproject\|\(non\)?recursive\)])],
+ [m4_fatal([unknown libltdl mode: ]_LTDL_MODE)])])
+
+AC_ARG_WITH([included_ltdl],
+ [AS_HELP_STRING([--with-included-ltdl],
+ [use the GNU ltdl sources included here])])
+
+if test "x$with_included_ltdl" != xyes; then
+ # We are not being forced to use the included libltdl sources, so
+ # decide whether there is a useful installed version we can use.
+ AC_CHECK_HEADER([ltdl.h],
+ [AC_CHECK_DECL([lt_dlinterface_register],
+ [AC_CHECK_LIB([ltdl], [lt_dladvise_preload],
+ [with_included_ltdl=no],
+ [with_included_ltdl=yes])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT
+ #include <ltdl.h>])],
+ [with_included_ltdl=yes],
+ [AC_INCLUDES_DEFAULT]
+ )
+fi
+
+dnl If neither LT_CONFIG_LTDL_DIR, LTDL_CONVENIENCE nor LTDL_INSTALLABLE
+dnl was called yet, then for old times' sake, we assume libltdl is in an
+dnl eponymous directory:
+AC_PROVIDE_IFELSE([LT_CONFIG_LTDL_DIR], [], [_LT_CONFIG_LTDL_DIR([libltdl])])
+
+AC_ARG_WITH([ltdl_include],
+ [AS_HELP_STRING([--with-ltdl-include=DIR],
+ [use the ltdl headers installed in DIR])])
+
+if test -n "$with_ltdl_include"; then
+ if test -f "$with_ltdl_include/ltdl.h"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl include directory: `$with_ltdl_include'])
+ fi
+else
+ with_ltdl_include=no
+fi
+
+AC_ARG_WITH([ltdl_lib],
+ [AS_HELP_STRING([--with-ltdl-lib=DIR],
+ [use the libltdl.la installed in DIR])])
+
+if test -n "$with_ltdl_lib"; then
+ if test -f "$with_ltdl_lib/libltdl.la"; then :
+ else
+ AC_MSG_ERROR([invalid ltdl library directory: `$with_ltdl_lib'])
+ fi
+else
+ with_ltdl_lib=no
+fi
+
+case ,$with_included_ltdl,$with_ltdl_include,$with_ltdl_lib, in
+ ,yes,no,no,)
+ m4_case(m4_default(_LTDL_TYPE, [convenience]),
+ [convenience], [_LTDL_CONVENIENCE],
+ [installable], [_LTDL_INSTALLABLE],
+ [m4_fatal([unknown libltdl build type: ]_LTDL_TYPE)])
+ ;;
+ ,no,no,no,)
+ # If the included ltdl is not to be used, then use the
+ # preinstalled libltdl we found.
+ AC_DEFINE([HAVE_LTDL], [1],
+ [Define this if a modern libltdl is already installed])
+ LIBLTDL=-lltdl
+ LTDLDEPS=
+ LTDLINCL=
+ ;;
+ ,no*,no,*)
+ AC_MSG_ERROR([`--with-ltdl-include' and `--with-ltdl-lib' options must be used together])
+ ;;
+ *) with_included_ltdl=no
+ LIBLTDL="-L$with_ltdl_lib -lltdl"
+ LTDLDEPS=
+ LTDLINCL="-I$with_ltdl_include"
+ ;;
+esac
+INCLTDL="$LTDLINCL"
+
+# Report our decision...
+AC_MSG_CHECKING([where to find libltdl headers])
+AC_MSG_RESULT([$LTDLINCL])
+AC_MSG_CHECKING([where to find libltdl library])
+AC_MSG_RESULT([$LIBLTDL])
+
+_LTDL_SETUP
+
+dnl restore autoconf definition.
+m4_popdef([AC_LIBOBJ])
+m4_popdef([AC_LIBSOURCES])
+
+AC_CONFIG_COMMANDS_PRE([
+ _ltdl_libobjs=
+ _ltdl_ltlibobjs=
+ if test -n "$_LT_LIBOBJS"; then
+ # Remove the extension.
+ _lt_sed_drop_objext='s/\.o$//;s/\.obj$//'
+ for i in `for i in $_LT_LIBOBJS; do echo "$i"; done | sed "$_lt_sed_drop_objext" | sort -u`; do
+ _ltdl_libobjs="$_ltdl_libobjs $lt_libobj_prefix$i.$ac_objext"
+ _ltdl_ltlibobjs="$_ltdl_ltlibobjs $lt_libobj_prefix$i.lo"
+ done
+ fi
+ AC_SUBST([ltdl_LIBOBJS], [$_ltdl_libobjs])
+ AC_SUBST([ltdl_LTLIBOBJS], [$_ltdl_ltlibobjs])
+])
+
+# Only expand once:
+m4_define([LTDL_INIT])
+])# LTDL_INIT
+
+# Old names:
+AU_DEFUN([AC_LIB_LTDL], [LTDL_INIT($@)])
+AU_DEFUN([AC_WITH_LTDL], [LTDL_INIT($@)])
+AU_DEFUN([LT_WITH_LTDL], [LTDL_INIT($@)])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIB_LTDL], [])
+dnl AC_DEFUN([AC_WITH_LTDL], [])
+dnl AC_DEFUN([LT_WITH_LTDL], [])
+
+
+# _LTDL_SETUP
+# -----------
+# Perform all the checks necessary for compilation of the ltdl objects
+# -- including compiler checks and header checks. This is a public
+# interface mainly for the benefit of libltdl's own configure.ac, most
+# other users should call LTDL_INIT instead.
+AC_DEFUN([_LTDL_SETUP],
+[AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([LT_SYS_MODULE_EXT])dnl
+AC_REQUIRE([LT_SYS_MODULE_PATH])dnl
+AC_REQUIRE([LT_SYS_DLSEARCH_PATH])dnl
+AC_REQUIRE([LT_LIB_DLLOAD])dnl
+AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+AC_REQUIRE([LT_FUNC_DLSYM_USCORE])dnl
+AC_REQUIRE([LT_SYS_DLOPEN_DEPLIBS])dnl
+AC_REQUIRE([gl_FUNC_ARGZ])dnl
+
+m4_require([_LT_CHECK_OBJDIR])dnl
+m4_require([_LT_HEADER_DLFCN])dnl
+m4_require([_LT_CHECK_DLPREOPEN])dnl
+m4_require([_LT_DECL_SED])dnl
+
+dnl Don't require this, or it will be expanded earlier than the code
+dnl that sets the variables it relies on:
+_LT_ENABLE_INSTALL
+
+dnl _LTDL_MODE specific code must be called at least once:
+_LTDL_MODE_DISPATCH
+
+# In order that ltdl.c can compile, find out the first AC_CONFIG_HEADERS
+# the user used. This is so that ltdl.h can pick up the parent projects
+# config.h file, The first file in AC_CONFIG_HEADERS must contain the
+# definitions required by ltdl.c.
+# FIXME: Remove use of undocumented AC_LIST_HEADERS (2.59 compatibility).
+AC_CONFIG_COMMANDS_PRE([dnl
+m4_pattern_allow([^LT_CONFIG_H$])dnl
+m4_ifset([AH_HEADER],
+ [LT_CONFIG_H=AH_HEADER],
+ [m4_ifset([AC_LIST_HEADERS],
+ [LT_CONFIG_H=`echo "AC_LIST_HEADERS" | $SED 's,^[[ ]]*,,;s,[[ :]].*$,,'`],
+ [])])])
+AC_SUBST([LT_CONFIG_H])
+
+AC_CHECK_HEADERS([unistd.h dl.h sys/dl.h dld.h mach-o/dyld.h dirent.h],
+ [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_FUNCS([closedir opendir readdir], [], [AC_LIBOBJ([lt__dirent])])
+AC_CHECK_FUNCS([strlcat strlcpy], [], [AC_LIBOBJ([lt__strl])])
+
+AC_DEFINE_UNQUOTED([LT_LIBEXT],["$libext"],[The archive extension])
+
+name=ltdl
+LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
+AC_SUBST([LTDLOPEN])
+])# _LTDL_SETUP
+
+
+# _LT_ENABLE_INSTALL
+# ------------------
+m4_define([_LT_ENABLE_INSTALL],
+[AC_ARG_ENABLE([ltdl-install],
+ [AS_HELP_STRING([--enable-ltdl-install], [install libltdl])])
+
+case ,${enable_ltdl_install},${enable_ltdl_convenience} in
+ *yes*) ;;
+ *) enable_ltdl_convenience=yes ;;
+esac
+
+m4_ifdef([AM_CONDITIONAL],
+[AM_CONDITIONAL(INSTALL_LTDL, test x"${enable_ltdl_install-no}" != xno)
+ AM_CONDITIONAL(CONVENIENCE_LTDL, test x"${enable_ltdl_convenience-no}" != xno)])
+])# _LT_ENABLE_INSTALL
+
+
+# LT_SYS_DLOPEN_DEPLIBS
+# ---------------------
+AC_DEFUN([LT_SYS_DLOPEN_DEPLIBS],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+AC_CACHE_CHECK([whether deplibs are loaded by dlopen],
+ [lt_cv_sys_dlopen_deplibs],
+ [# PORTME does your system automatically load deplibs for dlopen?
+ # or its logical equivalent (e.g. shl_load for HP-UX < 11)
+ # For now, we just catch OSes we know something about -- in the
+ # future, we'll try test this programmatically.
+ lt_cv_sys_dlopen_deplibs=unknown
+ case $host_os in
+ aix3*|aix4.1.*|aix4.2.*)
+ # Unknown whether this is true for these versions of AIX, but
+ # we want this `case' here to explicitly catch those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ aix[[4-9]]*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ amigaos*)
+ case $host_cpu in
+ powerpc)
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ esac
+ ;;
+ darwin*)
+ # Assuming the user has installed a libdl from somewhere, this is true
+ # If you are looking for one http://www.opendarwin.org/projects/dlcompat
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ freebsd* | dragonfly*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ gnu* | linux* | k*bsd*-gnu | kopensolaris*-gnu)
+ # GNU and its variants, using gnu ld.so (Glibc)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ hpux10*|hpux11*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ interix*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ irix[[12345]]*|irix6.[[01]]*)
+ # Catch all versions of IRIX before 6.2, and indicate that we don't
+ # know how it worked for any of those versions.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ irix*)
+ # The case above catches anything before 6.2, and it's known that
+ # at 6.2 and later dlopen does load deplibs.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ netbsd* | netbsdelf*-gnu)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ openbsd*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ osf[[1234]]*)
+ # dlopen did load deplibs (at least at 4.x), but until the 5.x series,
+ # it did *not* use an RPATH in a shared library to find objects the
+ # library depends on, so we explicitly say `no'.
+ lt_cv_sys_dlopen_deplibs=no
+ ;;
+ osf5.0|osf5.0a|osf5.1)
+ # dlopen *does* load deplibs and with the right loader patch applied
+ # it even uses RPATH in a shared library to search for shared objects
+ # that the library depends on, but there's no easy way to know if that
+ # patch is installed. Since this is the case, all we can really
+ # say is unknown -- it depends on the patch being installed. If
+ # it is, this changes to `yes'. Without it, it would be `no'.
+ lt_cv_sys_dlopen_deplibs=unknown
+ ;;
+ osf*)
+ # the two cases above should catch all versions of osf <= 5.1. Read
+ # the comments above for what we know about them.
+ # At > 5.1, deplibs are loaded *and* any RPATH in a shared library
+ # is used to find them so we can finally say `yes'.
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ qnx*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ solaris*)
+ lt_cv_sys_dlopen_deplibs=yes
+ ;;
+ sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*)
+ libltdl_cv_sys_dlopen_deplibs=yes
+ ;;
+ esac
+ ])
+if test "$lt_cv_sys_dlopen_deplibs" != yes; then
+ AC_DEFINE([LTDL_DLOPEN_DEPLIBS], [1],
+ [Define if the OS needs help to load dependent libraries for dlopen().])
+fi
+])# LT_SYS_DLOPEN_DEPLIBS
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYS_DLOPEN_DEPLIBS], [LT_SYS_DLOPEN_DEPLIBS])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYS_DLOPEN_DEPLIBS], [])
+
+
+# LT_SYS_MODULE_EXT
+# -----------------
+AC_DEFUN([LT_SYS_MODULE_EXT],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which extension is used for runtime loadable modules],
+ [libltdl_cv_shlibext],
+[
+module=yes
+eval libltdl_cv_shlibext=$shrext_cmds
+ ])
+if test -n "$libltdl_cv_shlibext"; then
+ m4_pattern_allow([LT_MODULE_EXT])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_EXT], ["$libltdl_cv_shlibext"],
+ [Define to the extension used for runtime loadable modules, say, ".so".])
+fi
+])# LT_SYS_MODULE_EXT
+
+# Old name:
+AU_ALIAS([AC_LTDL_SHLIBEXT], [LT_SYS_MODULE_EXT])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SHLIBEXT], [])
+
+
+# LT_SYS_MODULE_PATH
+# ------------------
+AC_DEFUN([LT_SYS_MODULE_PATH],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([which variable specifies run-time module search path],
+ [lt_cv_module_path_var], [lt_cv_module_path_var="$shlibpath_var"])
+if test -n "$lt_cv_module_path_var"; then
+ m4_pattern_allow([LT_MODULE_PATH_VAR])dnl
+ AC_DEFINE_UNQUOTED([LT_MODULE_PATH_VAR], ["$lt_cv_module_path_var"],
+ [Define to the name of the environment variable that determines the run-time module search path.])
+fi
+])# LT_SYS_MODULE_PATH
+
+# Old name:
+AU_ALIAS([AC_LTDL_SHLIBPATH], [LT_SYS_MODULE_PATH])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SHLIBPATH], [])
+
+
+# LT_SYS_DLSEARCH_PATH
+# --------------------
+AC_DEFUN([LT_SYS_DLSEARCH_PATH],
+[m4_require([_LT_SYS_DYNAMIC_LINKER])dnl
+AC_CACHE_CHECK([for the default library search path],
+ [lt_cv_sys_dlsearch_path],
+ [lt_cv_sys_dlsearch_path="$sys_lib_dlsearch_path_spec"])
+if test -n "$lt_cv_sys_dlsearch_path"; then
+ sys_dlsearch_path=
+ for dir in $lt_cv_sys_dlsearch_path; do
+ if test -z "$sys_dlsearch_path"; then
+ sys_dlsearch_path="$dir"
+ else
+ sys_dlsearch_path="$sys_dlsearch_path$PATH_SEPARATOR$dir"
+ fi
+ done
+ m4_pattern_allow([LT_DLSEARCH_PATH])dnl
+ AC_DEFINE_UNQUOTED([LT_DLSEARCH_PATH], ["$sys_dlsearch_path"],
+ [Define to the system default library search path.])
+fi
+])# LT_SYS_DLSEARCH_PATH
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYSSEARCHPATH], [LT_SYS_DLSEARCH_PATH])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYSSEARCHPATH], [])
+
+
+# _LT_CHECK_DLPREOPEN
+# -------------------
+m4_defun([_LT_CHECK_DLPREOPEN],
+[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([whether libtool supports -dlopen/-dlpreopen],
+ [libltdl_cv_preloaded_symbols],
+ [if test -n "$lt_cv_sys_global_symbol_pipe"; then
+ libltdl_cv_preloaded_symbols=yes
+ else
+ libltdl_cv_preloaded_symbols=no
+ fi
+ ])
+if test x"$libltdl_cv_preloaded_symbols" = xyes; then
+ AC_DEFINE([HAVE_PRELOADED_SYMBOLS], [1],
+ [Define if libtool can extract symbol lists from object files.])
+fi
+])# _LT_CHECK_DLPREOPEN
+
+
+# LT_LIB_DLLOAD
+# -------------
+AC_DEFUN([LT_LIB_DLLOAD],
+[m4_pattern_allow([^LT_DLLOADERS$])
+LT_DLLOADERS=
+AC_SUBST([LT_DLLOADERS])
+
+AC_LANG_PUSH([C])
+
+LIBADD_DLOPEN=
+AC_SEARCH_LIBS([dlopen], [dl],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ if test "$ac_cv_search_dlopen" != "none required" ; then
+ LIBADD_DLOPEN="-ldl"
+ fi
+ libltdl_cv_lib_dl_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#if HAVE_DLFCN_H
+# include <dlfcn.h>
+#endif
+ ]], [[dlopen(0, 0);]])],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"],
+ [AC_CHECK_LIB([svld], [dlopen],
+ [AC_DEFINE([HAVE_LIBDL], [1],
+ [Define if you have the libdl library or equivalent.])
+ LIBADD_DLOPEN="-lsvld" libltdl_cv_func_dlopen="yes"
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dlopen.la"])])])
+if test x"$libltdl_cv_func_dlopen" = xyes || test x"$libltdl_cv_lib_dl_dlopen" = xyes
+then
+ lt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ AC_CHECK_FUNCS([dlerror])
+ LIBS="$lt_save_LIBS"
+fi
+AC_SUBST([LIBADD_DLOPEN])
+
+LIBADD_SHL_LOAD=
+AC_CHECK_FUNC([shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"],
+ [AC_CHECK_LIB([dld], [shl_load],
+ [AC_DEFINE([HAVE_SHL_LOAD], [1],
+ [Define if you have the shl_load function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}shl_load.la"
+ LIBADD_SHL_LOAD="-ldld"])])
+AC_SUBST([LIBADD_SHL_LOAD])
+
+case $host_os in
+darwin[[1567]].*)
+# We only want this for pre-Mac OS X 10.4.
+ AC_CHECK_FUNC([_dyld_func_lookup],
+ [AC_DEFINE([HAVE_DYLD], [1],
+ [Define if you have the _dyld_func_lookup function.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dyld.la"])
+ ;;
+beos*)
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}load_add_on.la"
+ ;;
+cygwin* | mingw* | os2* | pw32*)
+ AC_CHECK_DECLS([cygwin_conv_path], [], [], [[#include <sys/cygwin.h>]])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}loadlibrary.la"
+ ;;
+esac
+
+AC_CHECK_LIB([dld], [dld_link],
+ [AC_DEFINE([HAVE_DLD], [1],
+ [Define if you have the GNU dld library.])
+ LT_DLLOADERS="$LT_DLLOADERS ${lt_dlopen_dir+$lt_dlopen_dir/}dld_link.la"])
+AC_SUBST([LIBADD_DLD_LINK])
+
+m4_pattern_allow([^LT_DLPREOPEN$])
+LT_DLPREOPEN=
+if test -n "$LT_DLLOADERS"
+then
+ for lt_loader in $LT_DLLOADERS; do
+ LT_DLPREOPEN="$LT_DLPREOPEN-dlpreopen $lt_loader "
+ done
+ AC_DEFINE([HAVE_LIBDLLOADER], [1],
+ [Define if libdlloader will be built on this platform])
+fi
+AC_SUBST([LT_DLPREOPEN])
+
+dnl This isn't used anymore, but set it for backwards compatibility
+LIBADD_DL="$LIBADD_DLOPEN $LIBADD_SHL_LOAD"
+AC_SUBST([LIBADD_DL])
+
+AC_LANG_POP
+])# LT_LIB_DLLOAD
+
+# Old name:
+AU_ALIAS([AC_LTDL_DLLIB], [LT_LIB_DLLOAD])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_DLLIB], [])
+
+
+# LT_SYS_SYMBOL_USCORE
+# --------------------
+# does the compiler prefix global symbols with an underscore?
+AC_DEFUN([LT_SYS_SYMBOL_USCORE],
+[m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl
+AC_CACHE_CHECK([for _ prefix in compiled symbols],
+ [lt_cv_sys_symbol_underscore],
+ [lt_cv_sys_symbol_underscore=no
+ cat > conftest.$ac_ext <<_LT_EOF
+void nm_test_func(){}
+int main(){nm_test_func;return 0;}
+_LT_EOF
+ if AC_TRY_EVAL(ac_compile); then
+ # Now try to grab the symbols.
+ ac_nlist=conftest.nm
+ if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $ac_nlist) && test -s "$ac_nlist"; then
+ # See whether the symbols have a leading underscore.
+ if grep '^. _nm_test_func' "$ac_nlist" >/dev/null; then
+ lt_cv_sys_symbol_underscore=yes
+ else
+ if grep '^. nm_test_func ' "$ac_nlist" >/dev/null; then
+ :
+ else
+ echo "configure: cannot find nm_test_func in $ac_nlist" >&AS_MESSAGE_LOG_FD
+ fi
+ fi
+ else
+ echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD
+ fi
+ else
+ echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
+ cat conftest.c >&AS_MESSAGE_LOG_FD
+ fi
+ rm -rf conftest*
+ ])
+ sys_symbol_underscore=$lt_cv_sys_symbol_underscore
+ AC_SUBST([sys_symbol_underscore])
+])# LT_SYS_SYMBOL_USCORE
+
+# Old name:
+AU_ALIAS([AC_LTDL_SYMBOL_USCORE], [LT_SYS_SYMBOL_USCORE])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_SYMBOL_USCORE], [])
+
+
+# LT_FUNC_DLSYM_USCORE
+# --------------------
+AC_DEFUN([LT_FUNC_DLSYM_USCORE],
+[AC_REQUIRE([LT_SYS_SYMBOL_USCORE])dnl
+if test x"$lt_cv_sys_symbol_underscore" = xyes; then
+ if test x"$libltdl_cv_func_dlopen" = xyes ||
+ test x"$libltdl_cv_lib_dl_dlopen" = xyes ; then
+ AC_CACHE_CHECK([whether we have to add an underscore for dlsym],
+ [libltdl_cv_need_uscore],
+ [libltdl_cv_need_uscore=unknown
+ save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBADD_DLOPEN"
+ _LT_TRY_DLOPEN_SELF(
+ [libltdl_cv_need_uscore=no], [libltdl_cv_need_uscore=yes],
+ [], [libltdl_cv_need_uscore=cross])
+ LIBS="$save_LIBS"
+ ])
+ fi
+fi
+
+if test x"$libltdl_cv_need_uscore" = xyes; then
+ AC_DEFINE([NEED_USCORE], [1],
+ [Define if dlsym() requires a leading underscore in symbol names.])
+fi
+])# LT_FUNC_DLSYM_USCORE
+
+# Old name:
+AU_ALIAS([AC_LTDL_DLSYM_USCORE], [LT_FUNC_DLSYM_USCORE])
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LTDL_DLSYM_USCORE], [])
diff --git a/ltdl/m4/ltoptions.m4 b/ltdl/m4/ltoptions.m4
new file mode 100644
index 00000000..34151a3b
--- /dev/null
+++ b/ltdl/m4/ltoptions.m4
@@ -0,0 +1,368 @@
+# Helper functions for option handling. -*- Autoconf -*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME)
+# ------------------------------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(MACRO-NAME, OPTION-NAME)
+# ---------------------------------------
+# Set option OPTION-NAME for macro MACRO-NAME, and if there is a
+# matching handler defined, dispatch to it. Other OPTION-NAMEs are
+# saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]),
+ _LT_MANGLE_DEFUN([$1], [$2]),
+ [m4_warning([Unknown $1 option `$2'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET])
+# ------------------------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])])
+
+
+# _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET)
+# -------------------------------------------------------
+# Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME
+# are set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option),
+ [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST)
+# ----------------------------------------
+# OPTION-LIST is a space-separated list of Libtool options associated
+# with MACRO-NAME. If any OPTION has a matching handler declared with
+# LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about
+# the unknown option and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$2])),
+ [_LT_SET_OPTION([$1], _LT_Option)])
+
+m4_if([$1],[LT_INIT],[
+ dnl
+ dnl Simply set some default values (i.e off) if boolean options were not
+ dnl specified:
+ _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no
+ ])
+ _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no
+ ])
+ dnl
+ dnl If no reference was made to various pairs of opposing options, then
+ dnl we run the default mode handler for the pair. For example, if neither
+ dnl `shared' nor `disable-shared' was passed, we enable building of shared
+ dnl archives by default:
+ _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED])
+ _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC])
+ _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install],
+ [_LT_ENABLE_FAST_INSTALL])
+ ])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+# _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME)
+# -----------------------------------------
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE)
+# -----------------------------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([LT_INIT], [dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([LT_INIT], [win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-cegcc*)
+ AC_CHECK_TOOL(AS, as, false)
+ AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+ AC_CHECK_TOOL(OBJDUMP, objdump, false)
+ ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS], [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[AC_REQUIRE([AC_CANONICAL_HOST])dnl
+_LT_SET_OPTION([LT_INIT], [win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+ [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+ [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_shared=yes ;;
+ no) enable_shared=no ;;
+ *)
+ enable_shared=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_shared=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+ _LT_DECL([build_libtool_libs], [enable_shared], [0],
+ [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared])
+])
+
+AC_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([LT_INIT], [disable-shared])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)])
+AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+ [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+ [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_static=yes ;;
+ no) enable_static=no ;;
+ *)
+ enable_static=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_static=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+ _LT_DECL([build_old_libs], [enable_static], [0],
+ [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AC_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static])
+])
+
+AC_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([LT_INIT], [disable-static])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)])
+AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+ [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+ [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+ [p=${PACKAGE-default}
+ case $enableval in
+ yes) enable_fast_install=yes ;;
+ no) enable_fast_install=no ;;
+ *)
+ enable_fast_install=no
+ # Look at the argument we got. We use all the common list separators.
+ lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+ for pkg in $enableval; do
+ IFS="$lt_save_ifs"
+ if test "X$pkg" = "X$p"; then
+ enable_fast_install=yes
+ fi
+ done
+ IFS="$lt_save_ifs"
+ ;;
+ esac],
+ [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+ [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([LT_INIT], [disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'. If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+ [AS_HELP_STRING([--with-pic],
+ [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+ [pic_mode="$withval"],
+ [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([LT_INIT], [pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
+
+## ----------------- ##
+## LTDL_INIT Options ##
+## ----------------- ##
+
+m4_define([_LTDL_MODE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive],
+ [m4_define([_LTDL_MODE], [nonrecursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [recursive],
+ [m4_define([_LTDL_MODE], [recursive])])
+LT_OPTION_DEFINE([LTDL_INIT], [subproject],
+ [m4_define([_LTDL_MODE], [subproject])])
+
+m4_define([_LTDL_TYPE], [])
+LT_OPTION_DEFINE([LTDL_INIT], [installable],
+ [m4_define([_LTDL_TYPE], [installable])])
+LT_OPTION_DEFINE([LTDL_INIT], [convenience],
+ [m4_define([_LTDL_TYPE], [convenience])])
diff --git a/ltdl/m4/ltsugar.m4 b/ltdl/m4/ltsugar.m4
new file mode 100644
index 00000000..9000a057
--- /dev/null
+++ b/ltdl/m4/ltsugar.m4
@@ -0,0 +1,123 @@
+# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 6 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+# Needed until we can rely on m4_join from Autoconf 2.62, since all earlier
+# versions in m4sugar had bugs.
+m4_define([lt_join],
+[m4_if([$#], [1], [],
+ [$#], [2], [[$2]],
+ [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])])
+m4_define([_lt_join],
+[m4_if([$#$2], [2], [],
+ [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+ [$#], 1, [],
+ [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_append(MACRO-NAME, STRING, [SEPARATOR])
+# ------------------------------------------
+# Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'.
+# Note that neither SEPARATOR nor STRING are expanded; they are appended
+# to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked).
+# No SEPARATOR is output if MACRO-NAME was previously undefined (different
+# than defined and empty).
+#
+# This macro is needed until we can rely on Autoconf 2.62, since earlier
+# versions of m4sugar mistakenly expanded SEPARATOR but not STRING.
+m4_define([lt_append],
+[m4_define([$1],
+ m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])])
+
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+# Needed until we can rely on m4_combine added in Autoconf 2.62.
+m4_define([lt_combine],
+[m4_if(m4_eval([$# > 3]), [1],
+ [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl
+[[m4_foreach([_Lt_prefix], [$2],
+ [m4_foreach([_Lt_suffix],
+ ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[,
+ [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+ [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1],
+ [lt_append([$1], [$2], [$3])$4],
+ [$5])],
+ [lt_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$3])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+ m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+ m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+ [$5],
+ [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+ [lt_join(m4_quote(m4_default([$4], [[, ]])),
+ lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+ [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/ltdl/m4/ltversion.m4 b/ltdl/m4/ltversion.m4
new file mode 100644
index 00000000..f3c53098
--- /dev/null
+++ b/ltdl/m4/ltversion.m4
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in.
+
+# serial 3017 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.2.6b])
+m4_define([LT_PACKAGE_REVISION], [1.3017])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.2.6b'
+macro_revision='1.3017'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/ltdl/m4/lt~obsolete.m4 b/ltdl/m4/lt~obsolete.m4
new file mode 100644
index 00000000..637bb206
--- /dev/null
+++ b/ltdl/m4/lt~obsolete.m4
@@ -0,0 +1,92 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005, 2007 Free Software Foundation, Inc.
+# Written by Scott James Remnant, 2004.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 lt~obsolete.m4
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else. This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6.
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])])
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC], [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/ltdl/m4/malloc.m4 b/ltdl/m4/malloc.m4
new file mode 100755
index 00000000..910ac922
--- /dev/null
+++ b/ltdl/m4/malloc.m4
@@ -0,0 +1,41 @@
+# malloc.m4 serial 9
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# gl_FUNC_MALLOC_POSIX
+# --------------------
+# Test whether 'malloc' is POSIX compliant (sets errno to ENOMEM when it
+# fails), and replace malloc if it is not.
+AC_DEFUN([gl_FUNC_MALLOC_POSIX],
+[
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix = yes; then
+ HAVE_MALLOC_POSIX=1
+ AC_DEFINE([HAVE_MALLOC_POSIX], [1],
+ [Define if the 'malloc' function is POSIX compliant.])
+ else
+ AC_LIBOBJ([malloc])
+ HAVE_MALLOC_POSIX=0
+ fi
+ AC_SUBST([HAVE_MALLOC_POSIX])
+])
+
+# Test whether malloc, realloc, calloc are POSIX compliant,
+# Set gl_cv_func_malloc_posix to yes or no accordingly.
+AC_DEFUN([gl_CHECK_MALLOC_POSIX],
+[
+ AC_CACHE_CHECK([whether malloc, realloc, calloc are POSIX compliant],
+ [gl_cv_func_malloc_posix],
+ [
+ dnl It is too dangerous to try to allocate a large amount of memory:
+ dnl some systems go to their knees when you do that. So assume that
+ dnl all Unix implementations of the function are POSIX compliant.
+ AC_TRY_COMPILE([],
+ [#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ choke me
+ #endif
+ ], [gl_cv_func_malloc_posix=yes], [gl_cv_func_malloc_posix=no])
+ ])
+])
diff --git a/ltdl/m4/malloca.m4 b/ltdl/m4/malloca.m4
new file mode 100755
index 00000000..e07c6d93
--- /dev/null
+++ b/ltdl/m4/malloca.m4
@@ -0,0 +1,15 @@
+# malloca.m4 serial 1
+dnl Copyright (C) 2003-2004, 2006-2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_MALLOCA],
+[
+ dnl Use the autoconf tests for alloca(), but not the AC_SUBSTed variables
+ dnl @ALLOCA@ and @LTALLOCA@.
+ dnl gl_FUNC_ALLOCA dnl Already brought in by the module dependencies.
+ AC_REQUIRE([gl_EEMALLOC])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+])
diff --git a/ltdl/m4/math_h.m4 b/ltdl/m4/math_h.m4
new file mode 100755
index 00000000..e3b499e8
--- /dev/null
+++ b/ltdl/m4/math_h.m4
@@ -0,0 +1,128 @@
+# math_h.m4 serial 17
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_MATH_H],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([math.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_CACHE_CHECK([whether NAN macro works], [gl_cv_header_math_nan_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+ [[/* Solaris 10 has a broken definition of NAN. Other platforms
+ fail to provide NAN, or provide it only in C99 mode; this
+ test only needs to fail when NAN is provided but wrong. */
+ float f = 1.0f;
+#ifdef NAN
+ f = NAN;
+#endif
+ return f == 0;]])],
+ [gl_cv_header_math_nan_works=yes],
+ [gl_cv_header_math_nan_works=no])])
+ if test $gl_cv_header_math_nan_works = no; then
+ REPLACE_NAN=1
+ fi
+ AC_CACHE_CHECK([whether HUGE_VAL works], [gl_cv_header_math_huge_val_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <math.h>]],
+ [[/* Solaris 10 has a broken definition of HUGE_VAL. */
+ double d = HUGE_VAL;
+ return d == 0;]])],
+ [gl_cv_header_math_huge_val_works=yes],
+ [gl_cv_header_math_huge_val_works=no])])
+ if test $gl_cv_header_math_huge_val_works = no; then
+ REPLACE_HUGE_VAL=1
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <math.h>
+ ]], [acosl asinl atanl ceilf ceill cosl expl floorf floorl frexpl
+ ldexpl logl round roundf roundl sinl sqrtl tanl trunc truncf truncl])
+])
+
+AC_DEFUN([gl_MATH_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_MATH_H_DEFAULTS],
+[
+ GNULIB_ACOSL=0; AC_SUBST([GNULIB_ACOSL])
+ GNULIB_ASINL=0; AC_SUBST([GNULIB_ASINL])
+ GNULIB_ATANL=0; AC_SUBST([GNULIB_ATANL])
+ GNULIB_CEILF=0; AC_SUBST([GNULIB_CEILF])
+ GNULIB_CEILL=0; AC_SUBST([GNULIB_CEILL])
+ GNULIB_COSL=0; AC_SUBST([GNULIB_COSL])
+ GNULIB_EXPL=0; AC_SUBST([GNULIB_EXPL])
+ GNULIB_FLOORF=0; AC_SUBST([GNULIB_FLOORF])
+ GNULIB_FLOORL=0; AC_SUBST([GNULIB_FLOORL])
+ GNULIB_FREXP=0; AC_SUBST([GNULIB_FREXP])
+ GNULIB_FREXPL=0; AC_SUBST([GNULIB_FREXPL])
+ GNULIB_ISFINITE=0; AC_SUBST([GNULIB_ISFINITE])
+ GNULIB_ISINF=0; AC_SUBST([GNULIB_ISINF])
+ GNULIB_ISNAN=0; AC_SUBST([GNULIB_ISNAN])
+ GNULIB_ISNANF=0; AC_SUBST([GNULIB_ISNANF])
+ GNULIB_ISNAND=0; AC_SUBST([GNULIB_ISNAND])
+ GNULIB_ISNANL=0; AC_SUBST([GNULIB_ISNANL])
+ GNULIB_LDEXPL=0; AC_SUBST([GNULIB_LDEXPL])
+ GNULIB_LOGL=0; AC_SUBST([GNULIB_LOGL])
+ GNULIB_ROUND=0; AC_SUBST([GNULIB_ROUND])
+ GNULIB_ROUNDF=0; AC_SUBST([GNULIB_ROUNDF])
+ GNULIB_ROUNDL=0; AC_SUBST([GNULIB_ROUNDL])
+ GNULIB_SIGNBIT=0; AC_SUBST([GNULIB_SIGNBIT])
+ GNULIB_SINL=0; AC_SUBST([GNULIB_SINL])
+ GNULIB_SQRTL=0; AC_SUBST([GNULIB_SQRTL])
+ GNULIB_TANL=0; AC_SUBST([GNULIB_TANL])
+ GNULIB_TRUNC=0; AC_SUBST([GNULIB_TRUNC])
+ GNULIB_TRUNCF=0; AC_SUBST([GNULIB_TRUNCF])
+ GNULIB_TRUNCL=0; AC_SUBST([GNULIB_TRUNCL])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ACOSL=1; AC_SUBST([HAVE_ACOSL])
+ HAVE_ASINL=1; AC_SUBST([HAVE_ASINL])
+ HAVE_ATANL=1; AC_SUBST([HAVE_ATANL])
+ HAVE_COSL=1; AC_SUBST([HAVE_COSL])
+ HAVE_EXPL=1; AC_SUBST([HAVE_EXPL])
+ HAVE_ISNANF=1; AC_SUBST([HAVE_ISNANF])
+ HAVE_ISNAND=1; AC_SUBST([HAVE_ISNAND])
+ HAVE_ISNANL=1; AC_SUBST([HAVE_ISNANL])
+ HAVE_LOGL=1; AC_SUBST([HAVE_LOGL])
+ HAVE_SINL=1; AC_SUBST([HAVE_SINL])
+ HAVE_SQRTL=1; AC_SUBST([HAVE_SQRTL])
+ HAVE_TANL=1; AC_SUBST([HAVE_TANL])
+ HAVE_DECL_ACOSL=1; AC_SUBST([HAVE_DECL_ACOSL])
+ HAVE_DECL_ASINL=1; AC_SUBST([HAVE_DECL_ASINL])
+ HAVE_DECL_ATANL=1; AC_SUBST([HAVE_DECL_ATANL])
+ HAVE_DECL_COSL=1; AC_SUBST([HAVE_DECL_COSL])
+ HAVE_DECL_EXPL=1; AC_SUBST([HAVE_DECL_EXPL])
+ HAVE_DECL_FREXPL=1; AC_SUBST([HAVE_DECL_FREXPL])
+ HAVE_DECL_LDEXPL=1; AC_SUBST([HAVE_DECL_LDEXPL])
+ HAVE_DECL_LOGL=1; AC_SUBST([HAVE_DECL_LOGL])
+ HAVE_DECL_SINL=1; AC_SUBST([HAVE_DECL_SINL])
+ HAVE_DECL_SQRTL=1; AC_SUBST([HAVE_DECL_SQRTL])
+ HAVE_DECL_TANL=1; AC_SUBST([HAVE_DECL_TANL])
+ HAVE_DECL_TRUNC=1; AC_SUBST([HAVE_DECL_TRUNC])
+ HAVE_DECL_TRUNCF=1; AC_SUBST([HAVE_DECL_TRUNCF])
+ REPLACE_CEILF=0; AC_SUBST([REPLACE_CEILF])
+ REPLACE_CEILL=0; AC_SUBST([REPLACE_CEILL])
+ REPLACE_FLOORF=0; AC_SUBST([REPLACE_FLOORF])
+ REPLACE_FLOORL=0; AC_SUBST([REPLACE_FLOORL])
+ REPLACE_FREXP=0; AC_SUBST([REPLACE_FREXP])
+ REPLACE_FREXPL=0; AC_SUBST([REPLACE_FREXPL])
+ REPLACE_HUGE_VAL=0; AC_SUBST([REPLACE_HUGE_VAL])
+ REPLACE_ISFINITE=0; AC_SUBST([REPLACE_ISFINITE])
+ REPLACE_ISINF=0; AC_SUBST([REPLACE_ISINF])
+ REPLACE_ISNAN=0; AC_SUBST([REPLACE_ISNAN])
+ REPLACE_LDEXPL=0; AC_SUBST([REPLACE_LDEXPL])
+ REPLACE_NAN=0; AC_SUBST([REPLACE_NAN])
+ REPLACE_ROUND=0; AC_SUBST([REPLACE_ROUND])
+ REPLACE_ROUNDF=0; AC_SUBST([REPLACE_ROUNDF])
+ REPLACE_ROUNDL=0; AC_SUBST([REPLACE_ROUNDL])
+ REPLACE_SIGNBIT=0; AC_SUBST([REPLACE_SIGNBIT])
+ REPLACE_SIGNBIT_USING_GCC=0; AC_SUBST([REPLACE_SIGNBIT_USING_GCC])
+ REPLACE_TRUNCL=0; AC_SUBST([REPLACE_TRUNCL])
+])
diff --git a/ltdl/m4/mbchar.m4 b/ltdl/m4/mbchar.m4
new file mode 100755
index 00000000..116ce7e5
--- /dev/null
+++ b/ltdl/m4/mbchar.m4
@@ -0,0 +1,14 @@
+# mbchar.m4 serial 8
+dnl Copyright (C) 2005-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbchar.m4
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBCHAR],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/ltdl/m4/mbiter.m4 b/ltdl/m4/mbiter.m4
new file mode 100755
index 00000000..34810507
--- /dev/null
+++ b/ltdl/m4/mbiter.m4
@@ -0,0 +1,18 @@
+# mbiter.m4 serial 5
+dnl Copyright (C) 2005, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl autoconf tests required for use of mbiter.h
+dnl From Bruno Haible.
+
+AC_DEFUN([gl_MBITER],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ dnl The following line is that so the user can test HAVE_MBRTOWC before
+ dnl #include "mbiter.h" or "mbuiter.h". It can be removed in 2010.
+ AC_REQUIRE([AC_FUNC_MBRTOWC])
+ :
+])
diff --git a/ltdl/m4/mbrtowc.m4 b/ltdl/m4/mbrtowc.m4
new file mode 100755
index 00000000..9ec93f56
--- /dev/null
+++ b/ltdl/m4/mbrtowc.m4
@@ -0,0 +1,384 @@
+# mbrtowc.m4 serial 16
+dnl Copyright (C) 2001-2002, 2004-2005, 2008-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_FUNC_MBRTOWC],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBRTOWC=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbrtowc = no; then
+ HAVE_MBRTOWC=0
+ fi
+ if test $HAVE_MBRTOWC != 0 && test $REPLACE_MBRTOWC != 1; then
+ gl_MBRTOWC_NULL_ARG
+ gl_MBRTOWC_RETVAL
+ gl_MBRTOWC_NUL_RETVAL
+ case "$gl_cv_func_mbrtowc_null_arg" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NULL_ARG_BUG], [1],
+ [Define if the mbrtowc function has the NULL string argument bug.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_RETVAL_BUG], [1],
+ [Define if the mbrtowc function returns a wrong return value.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ case "$gl_cv_func_mbrtowc_nul_retval" in
+ *yes) ;;
+ *) AC_DEFINE([MBRTOWC_NUL_RETVAL_BUG], [1],
+ [Define if the mbrtowc function does not return 0 for a NUL character.])
+ REPLACE_MBRTOWC=1
+ ;;
+ esac
+ fi
+ if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbrtowc])
+ gl_PREREQ_MBRTOWC
+ fi
+])
+
+dnl Test whether mbsinit() and mbrtowc() need to be overridden in a way that
+dnl redefines the semantics of the given mbstate_t type.
+dnl Result is REPLACE_MBSTATE_T.
+dnl When this is set to 1, we replace both mbsinit() and mbrtowc(), in order to
+dnl avoid inconsistencies.
+
+AC_DEFUN([gl_MBSTATE_T_BROKEN],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ AC_CHECK_FUNCS_ONCE([mbrtowc])
+ if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
+ gl_MBRTOWC_INCOMPLETE_STATE
+ gl_MBRTOWC_SANITYCHECK
+ REPLACE_MBSTATE_T=0
+ case "$gl_cv_func_mbrtowc_incomplete_state" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ case "$gl_cv_func_mbrtowc_sanitycheck" in
+ *yes) ;;
+ *) REPLACE_MBSTATE_T=1 ;;
+ esac
+ else
+ REPLACE_MBSTATE_T=1
+ fi
+ if test $REPLACE_MBSTATE_T = 1; then
+ gl_REPLACE_WCHAR_H
+ fi
+])
+
+dnl Test whether mbrtowc puts the state into non-initial state when parsing an
+dnl incomplete multibyte character.
+dnl Result is gl_cv_func_mbrtowc_incomplete_state.
+
+AC_DEFUN([gl_MBRTOWC_INCOMPLETE_STATE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles incomplete characters],
+ [gl_cv_func_mbrtowc_incomplete_state],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX and OSF/1.
+ osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ if (mbsinit (&state))
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_incomplete_state=yes],
+ [gl_cv_func_mbrtowc_incomplete_state=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc works not worse than mbtowc.
+dnl Result is gl_cv_func_mbrtowc_sanitycheck.
+
+AC_DEFUN([gl_MBRTOWC_SANITYCHECK],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc works as well as mbtowc],
+ [gl_cv_func_mbrtowc_sanitycheck],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8.
+ solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8:
+ mbrtowc returns 2, and sets wc to 0x00F0.
+ mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 3, 6, &state) != 4
+ && mbtowc (&wc, input + 3, 6) == 4)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_sanitycheck=yes],
+ [gl_cv_func_mbrtowc_sanitycheck=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc supports a NULL string argument correctly.
+dnl Result is gl_cv_func_mbrtowc_null_arg.
+
+AC_DEFUN([gl_MBRTOWC_NULL_ARG],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc handles a NULL string argument],
+ [gl_cv_func_mbrtowc_null_arg],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on OSF/1.
+ osf*) gl_cv_func_mbrtowc_null_arg="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_null_arg="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+ int ret;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ mbrtowc (&wc, NULL, 5, &state);
+ /* Check that wc was not modified. */
+ if (wc != (wchar_t) 0xBADFACE)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_mbrtowc_null_arg=yes], [gl_cv_func_mbrtowc_null_arg=no], [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing the end of a multibyte character,
+dnl correctly returns the number of bytes that were needed to complete the
+dnl character (not the total number of bytes of the multibyte character).
+dnl Result is gl_cv_func_mbrtowc_retval.
+
+AC_DEFUN([gl_MBRTOWC_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc has a correct return value],
+ [gl_cv_func_mbrtowc_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on HP-UX and Solaris.
+ hpux* | solaris*) gl_cv_func_mbrtowc_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris. */
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 1)
+ return 1;
+ }
+ }
+ /* This fails on HP-UX 11.11. */
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
+ {
+ input[1] = '\0';
+ if (mbrtowc (&wc, input + 2, 5, &state) != 2)
+ return 1;
+ }
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_retval=yes],
+ [gl_cv_func_mbrtowc_retval=no],
+ [:])
+ fi
+ ])
+])
+
+dnl Test whether mbrtowc, when parsing a NUL character, correctly returns 0.
+dnl Result is gl_cv_func_mbrtowc_nul_retval.
+
+AC_DEFUN([gl_MBRTOWC_NUL_RETVAL],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether mbrtowc returns 0 when parsing a NUL character],
+ [gl_cv_func_mbrtowc_nul_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris 8 and 9.
+ solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ /* This fails on Solaris 8 and 9. */
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ mbstate_t state;
+ wchar_t wc;
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ if (mbrtowc (&wc, "", 1, &state) != 0)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_mbrtowc_nul_retval=yes],
+ [gl_cv_func_mbrtowc_nul_retval=no],
+ [:])
+ fi
+ ])
+])
+
+# Prerequisites of lib/mbrtowc.c.
+AC_DEFUN([gl_PREREQ_MBRTOWC], [
+ :
+])
+
+
+dnl From Paul Eggert
+
+dnl This override of an autoconf macro can be removed when autoconf 2.60 or
+dnl newer can be assumed everywhere.
+
+m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.60]),[-1],[
+AC_DEFUN([AC_FUNC_MBRTOWC],
+[
+ dnl Same as AC_FUNC_MBRTOWC in autoconf-2.60.
+ AC_CACHE_CHECK([whether mbrtowc and mbstate_t are properly declared],
+ gl_cv_func_mbrtowc,
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <wchar.h>]],
+ [[wchar_t wc;
+ char const s[] = "";
+ size_t n = 1;
+ mbstate_t state;
+ return ! (sizeof state && (mbrtowc) (&wc, s, n, &state));]])],
+ gl_cv_func_mbrtowc=yes,
+ gl_cv_func_mbrtowc=no)])
+ if test $gl_cv_func_mbrtowc = yes; then
+ AC_DEFINE([HAVE_MBRTOWC], [1],
+ [Define to 1 if mbrtowc and mbstate_t are properly declared.])
+ fi
+])
+])
diff --git a/ltdl/m4/mbsinit.m4 b/ltdl/m4/mbsinit.m4
new file mode 100755
index 00000000..13907a51
--- /dev/null
+++ b/ltdl/m4/mbsinit.m4
@@ -0,0 +1,30 @@
+# mbsinit.m4 serial 3
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_MBSINIT],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_MBSINIT=1
+ fi
+ AC_CHECK_FUNCS_ONCE([mbsinit])
+ if test $ac_cv_func_mbsinit = no; then
+ HAVE_MBSINIT=0
+ fi
+ if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([mbsinit])
+ gl_PREREQ_MBSINIT
+ fi
+])
+
+# Prerequisites of lib/mbsinit.c.
+AC_DEFUN([gl_PREREQ_MBSINIT], [
+ :
+])
diff --git a/ltdl/m4/mbslen.m4 b/ltdl/m4/mbslen.m4
new file mode 100755
index 00000000..3c44fa65
--- /dev/null
+++ b/ltdl/m4/mbslen.m4
@@ -0,0 +1,16 @@
+# mbslen.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.
+
+AC_DEFUN([gl_MBSLEN],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([mbslen])
+ if test $ac_cv_func_mbslen = yes; then
+ HAVE_MBSLEN=1
+ else
+ HAVE_MBSLEN=0
+ fi
+])
diff --git a/ltdl/m4/mbstate_t.m4 b/ltdl/m4/mbstate_t.m4
new file mode 100755
index 00000000..3e2df29f
--- /dev/null
+++ b/ltdl/m4/mbstate_t.m4
@@ -0,0 +1,34 @@
+# mbstate_t.m4 serial 12
+dnl Copyright (C) 2000-2002, 2008-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.
+
+# From Paul Eggert.
+
+# BeOS 5 has <wchar.h> but does not define mbstate_t,
+# so you can't declare an object of that type.
+# Check for this incompatibility with Standard C.
+
+# AC_TYPE_MBSTATE_T
+# -----------------
+AC_DEFUN([AC_TYPE_MBSTATE_T],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS]) dnl for HP-UX 11.11
+
+ AC_CACHE_CHECK([for mbstate_t], [ac_cv_type_mbstate_t],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+# include <wchar.h>]],
+ [[mbstate_t x; return sizeof x;]])],
+ [ac_cv_type_mbstate_t=yes],
+ [ac_cv_type_mbstate_t=no])])
+ if test $ac_cv_type_mbstate_t = yes; then
+ AC_DEFINE([HAVE_MBSTATE_T], [1],
+ [Define to 1 if <wchar.h> declares mbstate_t.])
+ else
+ AC_DEFINE([mbstate_t], [int],
+ [Define to a type if <wchar.h> does not define.])
+ fi
+])
diff --git a/ltdl/m4/memchr.m4 b/ltdl/m4/memchr.m4
new file mode 100755
index 00000000..94596ef9
--- /dev/null
+++ b/ltdl/m4/memchr.m4
@@ -0,0 +1,86 @@
+# memchr.m4 serial 7
+dnl Copyright (C) 2002-2004, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_FUNC_MEMCHR],
+[
+ dnl Check for prerequisites for memory fence checks.
+ gl_FUNC_MMAP_ANON
+ AC_CHECK_HEADERS_ONCE([sys/mman.h])
+ AC_CHECK_FUNCS_ONCE([mprotect])
+
+ dnl These days, we assume memchr is present. But just in case...
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([memchr])
+ if test $ac_cv_func_memchr = no; then
+ gl_PREREQ_MEMCHR
+ REPLACE_MEMCHR=1
+ fi
+
+ if test $ac_cv_func_memchr = yes; then
+ # Detect platform-specific bugs in some versions of glibc:
+ # memchr should not dereference anything with length 0
+ # http://bugzilla.redhat.com/499689
+ # memchr should not dereference overestimated length after a match
+ # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
+ # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
+ # Assume that memchr works on platforms that lack mprotect.
+ AC_CACHE_CHECK([whether memchr works], [gl_cv_func_memchr_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <string.h>
+#if HAVE_SYS_MMAN_H
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+]], [[
+ char *fence = NULL;
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ fence = two_pages + pagesize;
+ }
+#endif
+ if (fence)
+ {
+ if (memchr (fence, 0, 0))
+ return 1;
+ strcpy (fence - 9, "12345678");
+ if (memchr (fence - 9, 0, 79) != fence - 1)
+ return 2;
+ }
+ return 0;
+]])], [gl_cv_func_memchr_works=yes], [gl_cv_func_memchr_works=no],
+ [dnl Be pessimistic for now.
+ gl_cv_func_memchr_works="guessing no"])])
+ if test "$gl_cv_func_memchr_works" != yes; then
+ gl_PREREQ_MEMCHR
+ REPLACE_MEMCHR=1
+ AC_LIBOBJ([memchr])
+ fi
+ fi
+])
+
+# Prerequisites of lib/memchr.c.
+AC_DEFUN([gl_PREREQ_MEMCHR], [
+ AC_CHECK_HEADERS([bp-sym.h])
+])
diff --git a/ltdl/m4/memmem.m4 b/ltdl/m4/memmem.m4
new file mode 100755
index 00000000..c6506ee5
--- /dev/null
+++ b/ltdl/m4/memmem.m4
@@ -0,0 +1,84 @@
+# memmem.m4 serial 14
+dnl Copyright (C) 2002, 2003, 2004, 2007, 2008, 2009, 2010 Free Software
+dnl 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 Check that memmem is present.
+AC_DEFUN([gl_FUNC_MEMMEM_SIMPLE],
+[
+ dnl Persuade glibc <string.h> to declare memmem().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([memmem])
+ AC_CHECK_DECLS_ONCE([memmem])
+ if test $ac_cv_have_decl_memmem = no; then
+ HAVE_DECL_MEMMEM=0
+ fi
+ gl_PREREQ_MEMMEM
+]) # gl_FUNC_MEMMEM_SIMPLE
+
+dnl Additionally, check that memmem is efficient and handles empty needles.
+AC_DEFUN([gl_FUNC_MEMMEM],
+[
+ AC_REQUIRE([gl_FUNC_MEMMEM_SIMPLE])
+ if test $ac_cv_have_decl_memmem = yes; then
+ AC_CACHE_CHECK([whether memmem works in linear time],
+ [gl_cv_func_memmem_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <signal.h> /* for signal */
+#include <string.h> /* for memmem */
+#include <stdlib.h> /* for malloc */
+#include <unistd.h> /* for alarm */
+]], [[size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ void *result = 0;
+ /* Failure to compile this test due to missing alarm is okay,
+ since all such platforms (mingw) also lack memmem. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (5);
+ /* Check for quadratic performance. */
+ if (haystack && needle)
+ {
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ }
+ /* Check for empty needle behavior. */
+ return !result || !memmem ("a", 1, 0, 0);]])],
+ [gl_cv_func_memmem_works=yes], [gl_cv_func_memmem_works=no],
+ [dnl Only glibc >= 2.9 and cygwin >= 1.7.0 are known to have a
+ dnl memmem that works in linear time.
+ AC_EGREP_CPP([Lucky user],
+ [
+#include <features.h>
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)
+ Lucky user
+ #endif
+#endif
+#ifdef __CYGWIN__
+ #include <cygwin/version.h>
+ #if CYGWIN_VERSION_DLL_MAJOR >= 1007
+ Lucky user
+ #endif
+#endif
+ ],
+ [gl_cv_func_memmem_works=yes],
+ [gl_cv_func_memmem_works="guessing no"])
+ ])
+ ])
+ if test "$gl_cv_func_memmem_works" != yes; then
+ REPLACE_MEMMEM=1
+ AC_LIBOBJ([memmem])
+ fi
+ fi
+]) # gl_FUNC_MEMMEM
+
+# Prerequisites of lib/memmem.c.
+AC_DEFUN([gl_PREREQ_MEMMEM], [:])
diff --git a/ltdl/m4/mkdtemp.m4 b/ltdl/m4/mkdtemp.m4
new file mode 100755
index 00000000..6a07e029
--- /dev/null
+++ b/ltdl/m4/mkdtemp.m4
@@ -0,0 +1,21 @@
+# mkdtemp.m4 serial 6
+dnl Copyright (C) 2001-2003, 2006-2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gt_FUNC_MKDTEMP],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REPLACE_FUNCS([mkdtemp])
+ if test $ac_cv_func_mkdtemp = no; then
+ HAVE_MKDTEMP=0
+ gl_PREREQ_MKDTEMP
+ fi
+])
+
+# Prerequisites of lib/mkdtemp.c
+AC_DEFUN([gl_PREREQ_MKDTEMP],
+[:
+])
diff --git a/ltdl/m4/mkstemp.m4 b/ltdl/m4/mkstemp.m4
new file mode 100755
index 00000000..e4fee76d
--- /dev/null
+++ b/ltdl/m4/mkstemp.m4
@@ -0,0 +1,56 @@
+#serial 17
+
+# Copyright (C) 2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# On some hosts (e.g., HP-UX 10.20, SunOS 4.1.4, Solaris 2.5.1), mkstemp has a
+# silly limit that it can create no more than 26 files from a given template.
+# Other systems lack mkstemp altogether.
+# On OSF1/Tru64 V4.0F, the system-provided mkstemp function can create
+# only 32 files per process.
+# On systems like the above, arrange to use the replacement function.
+AC_DEFUN([gl_FUNC_MKSTEMP],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_CACHE_CHECK([for working mkstemp],
+ [gl_cv_func_working_mkstemp],
+ [
+ mkdir conftest.mkstemp
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT],
+ [[int i;
+ off_t large = (off_t) 4294967295u;
+ if (large < 0)
+ large = 2147483647;
+ for (i = 0; i < 70; i++)
+ {
+ char templ[] = "conftest.mkstemp/coXXXXXX";
+ int (*mkstemp_function) (char *) = mkstemp;
+ int fd = mkstemp_function (templ);
+ if (fd < 0 || lseek (fd, large, SEEK_SET) != large)
+ return 1;
+ close (fd);
+ }
+ return 0;]])],
+ [gl_cv_func_working_mkstemp=yes],
+ [gl_cv_func_working_mkstemp=no],
+ [gl_cv_func_working_mkstemp=no])
+ rm -rf conftest.mkstemp
+ ])
+
+ if test $gl_cv_func_working_mkstemp != yes; then
+ REPLACE_MKSTEMP=1
+ AC_LIBOBJ([mkstemp])
+ gl_PREREQ_MKSTEMP
+ fi
+])
+
+# Prerequisites of lib/mkstemp.c.
+AC_DEFUN([gl_PREREQ_MKSTEMP],
+[
+])
diff --git a/ltdl/m4/mmap-anon.m4 b/ltdl/m4/mmap-anon.m4
new file mode 100755
index 00000000..a6b7b9ac
--- /dev/null
+++ b/ltdl/m4/mmap-anon.m4
@@ -0,0 +1,59 @@
+# mmap-anon.m4 serial 8
+dnl Copyright (C) 2005, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Detect how mmap can be used to create anonymous (not file-backed) memory
+# mappings.
+# - On Linux, AIX, OSF/1, Solaris, Cygwin, Interix, Haiku, both MAP_ANONYMOUS
+# and MAP_ANON exist and have the same value.
+# - On HP-UX, only MAP_ANONYMOUS exists.
+# - On MacOS X, FreeBSD, NetBSD, OpenBSD, only MAP_ANON exists.
+# - On IRIX, neither exists, and a file descriptor opened to /dev/zero must be
+# used.
+
+AC_DEFUN([gl_FUNC_MMAP_ANON],
+[
+ dnl Work around a bug of AC_EGREP_CPP in autoconf-2.57.
+ AC_REQUIRE([AC_PROG_CPP])
+ AC_REQUIRE([AC_PROG_EGREP])
+
+ dnl Persuade glibc <sys/mman.h> to define MAP_ANONYMOUS.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
+ # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
+ # irrelevant for anonymous mappings.
+ AC_CHECK_FUNC([mmap], [gl_have_mmap=yes], [gl_have_mmap=no])
+
+ # Try to allow MAP_ANONYMOUS.
+ gl_have_mmap_anonymous=no
+ if test $gl_have_mmap = yes; then
+ AC_MSG_CHECKING([for MAP_ANONYMOUS])
+ AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANONYMOUS
+ I cant identify this map.
+#endif
+],
+ [gl_have_mmap_anonymous=yes])
+ if test $gl_have_mmap_anonymous != yes; then
+ AC_EGREP_CPP([I cant identify this map.], [
+#include <sys/mman.h>
+#ifdef MAP_ANON
+ I cant identify this map.
+#endif
+],
+ [AC_DEFINE([MAP_ANONYMOUS], [MAP_ANON],
+ [Define to a substitute value for mmap()'s MAP_ANONYMOUS flag.])
+ gl_have_mmap_anonymous=yes])
+ fi
+ AC_MSG_RESULT([$gl_have_mmap_anonymous])
+ if test $gl_have_mmap_anonymous = yes; then
+ AC_DEFINE([HAVE_MAP_ANONYMOUS], [1],
+ [Define to 1 if mmap()'s MAP_ANONYMOUS flag is available after including
+ config.h and <sys/mman.h>.])
+ fi
+ fi
+])
diff --git a/ltdl/m4/mode_t.m4 b/ltdl/m4/mode_t.m4
new file mode 100755
index 00000000..3178dfd3
--- /dev/null
+++ b/ltdl/m4/mode_t.m4
@@ -0,0 +1,26 @@
+# mode_t.m4 serial 2
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# For using mode_t, it's sufficient to use AC_TYPE_MODE_T and
+# include <sys/types.h>.
+
+# Define PROMOTED_MODE_T to the type that is the result of "default argument
+# promotion" (ISO C 6.5.2.2.(6)) of the type mode_t.
+AC_DEFUN([gl_PROMOTED_TYPE_MODE_T],
+[
+ AC_REQUIRE([AC_TYPE_MODE_T])
+ AC_CACHE_CHECK([for promoted mode_t type], [gl_cv_promoted_mode_t], [
+ dnl Assume mode_t promotes to 'int' if and only if it is smaller than 'int',
+ dnl and to itself otherwise. This assumption is not guaranteed by the ISO C
+ dnl standard, but we don't know of any real-world counterexamples.
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>]],
+ [[typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];]])],
+ [gl_cv_promoted_mode_t='int'],
+ [gl_cv_promoted_mode_t='mode_t'])
+ ])
+ AC_DEFINE_UNQUOTED([PROMOTED_MODE_T], [$gl_cv_promoted_mode_t],
+ [Define to the type that is the result of default argument promotions of type mode_t.])
+])
diff --git a/ltdl/m4/multiarch.m4 b/ltdl/m4/multiarch.m4
new file mode 100755
index 00000000..389bd2bb
--- /dev/null
+++ b/ltdl/m4/multiarch.m4
@@ -0,0 +1,65 @@
+# multiarch.m4 serial 5
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine whether the compiler is or may be producing universal binaries.
+#
+# On MacOS X 10.5 and later systems, the user can create libraries and
+# executables that work on multiple system types--known as "fat" or
+# "universal" binaries--by specifying multiple '-arch' options to the
+# compiler but only a single '-arch' option to the preprocessor. Like
+# this:
+#
+# ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+# CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+# CPP="gcc -E" CXXCPP="g++ -E"
+#
+# Detect this situation and set the macro AA_APPLE_UNIVERSAL_BUILD at the
+# beginning of config.h and set APPLE_UNIVERSAL_BUILD accordingly.
+
+AC_DEFUN_ONCE([gl_MULTIARCH],
+[
+ dnl Code similar to autoconf-2.63 AC_C_BIGENDIAN.
+ gl_cv_c_multiarch=no
+ AC_COMPILE_IFELSE(
+ [AC_LANG_SOURCE(
+ [[#ifndef __APPLE_CC__
+ not a universal capable compiler
+ #endif
+ typedef int dummy;
+ ]])],
+ [
+ dnl Check for potential -arch flags. It is not universal unless
+ dnl there are at least two -arch flags with different values.
+ arch=
+ prev=
+ for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
+ if test -n "$prev"; then
+ case $word in
+ i?86 | x86_64 | ppc | ppc64)
+ if test -z "$arch" || test "$arch" = "$word"; then
+ arch="$word"
+ else
+ gl_cv_c_multiarch=yes
+ fi
+ ;;
+ esac
+ prev=
+ else
+ if test "x$word" = "x-arch"; then
+ prev=arch
+ fi
+ fi
+ done
+ ])
+ if test $gl_cv_c_multiarch = yes; then
+ AC_DEFINE([AA_APPLE_UNIVERSAL_BUILD], [1],
+ [Define if the compiler is building for multiple architectures of Apple platforms at once.])
+ APPLE_UNIVERSAL_BUILD=1
+ else
+ APPLE_UNIVERSAL_BUILD=0
+ fi
+ AC_SUBST([APPLE_UNIVERSAL_BUILD])
+])
diff --git a/ltdl/m4/nl_langinfo.m4 b/ltdl/m4/nl_langinfo.m4
new file mode 100755
index 00000000..ad456a26
--- /dev/null
+++ b/ltdl/m4/nl_langinfo.m4
@@ -0,0 +1,25 @@
+# nl_langinfo.m4 serial 3
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_NL_LANGINFO],
+[
+ AC_REQUIRE([gl_LANGINFO_H_DEFAULTS])
+ AC_REQUIRE([gl_LANGINFO_H])
+ AC_CHECK_FUNCS_ONCE([nl_langinfo])
+ if test $ac_cv_func_nl_langinfo = yes; then
+ if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1; then
+ :
+ else
+ REPLACE_NL_LANGINFO=1
+ AC_DEFINE([REPLACE_NL_LANGINFO], [1],
+ [Define if nl_langinfo exists but is overridden by gnulib.])
+ AC_LIBOBJ([nl_langinfo])
+ fi
+ else
+ HAVE_NL_LANGINFO=0
+ AC_LIBOBJ([nl_langinfo])
+ fi
+])
diff --git a/ltdl/m4/nls.m4 b/ltdl/m4/nls.m4
new file mode 100755
index 00000000..003704c4
--- /dev/null
+++ b/ltdl/m4/nls.m4
@@ -0,0 +1,32 @@
+# nls.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 1995-2003, 2005-2006, 2008-2010 Free Software Foundation,
+dnl 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE([nls],
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT([$USE_NLS])
+ AC_SUBST([USE_NLS])
+])
diff --git a/ltdl/m4/nls.m4~ b/ltdl/m4/nls.m4~
new file mode 100644
index 00000000..7967cc2f
--- /dev/null
+++ b/ltdl/m4/nls.m4~
@@ -0,0 +1,31 @@
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
diff --git a/ltdl/m4/nocrash.m4 b/ltdl/m4/nocrash.m4
new file mode 100755
index 00000000..efbcfa6a
--- /dev/null
+++ b/ltdl/m4/nocrash.m4
@@ -0,0 +1,102 @@
+# nocrash.m4 serial 2
+dnl Copyright (C) 2005, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Based on libsigsegv, from Bruno Haible and Paolo Bonzini.
+
+AC_PREREQ([2.13])
+
+dnl Expands to some code for use in .c programs that will cause the configure
+dnl test to exit instead of crashing. This is useful to avoid triggering
+dnl action from a background debugger and to avoid core dumps.
+dnl Usage: ...
+dnl ]GL_NOCRASH[
+dnl ...
+dnl int main() { nocrash_init(); ... }
+AC_DEFUN([GL_NOCRASH],[[
+#include <stdlib.h>
+#if defined __MACH__ && defined __APPLE__
+/* Avoid a crash on MacOS X. */
+#include <mach/mach.h>
+#include <mach/mach_error.h>
+#include <mach/thread_status.h>
+#include <mach/exception.h>
+#include <mach/task.h>
+#include <pthread.h>
+/* The exception port on which our thread listens. */
+static mach_port_t our_exception_port;
+/* The main function of the thread listening for exceptions of type
+ EXC_BAD_ACCESS. */
+static void *
+mach_exception_thread (void *arg)
+{
+ /* Buffer for a message to be received. */
+ struct {
+ mach_msg_header_t head;
+ mach_msg_body_t msgh_body;
+ char data[1024];
+ } msg;
+ mach_msg_return_t retval;
+ /* Wait for a message on the exception port. */
+ retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
+ our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
+ if (retval != MACH_MSG_SUCCESS)
+ abort ();
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+ mach_port_t self = mach_task_self ();
+ /* Allocate a port on which the thread shall listen for exceptions. */
+ if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
+ == KERN_SUCCESS) {
+ /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
+ if (mach_port_insert_right (self, our_exception_port, our_exception_port,
+ MACH_MSG_TYPE_MAKE_SEND)
+ == KERN_SUCCESS) {
+ /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
+ for us. */
+ exception_mask_t mask = EXC_MASK_BAD_ACCESS;
+ /* Create the thread listening on the exception port. */
+ pthread_attr_t attr;
+ pthread_t thread;
+ if (pthread_attr_init (&attr) == 0
+ && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
+ && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
+ pthread_attr_destroy (&attr);
+ /* Replace the exception port info for these exceptions with our own.
+ Note that we replace the exception port for the entire task, not only
+ for a particular thread. This has the effect that when our exception
+ port gets the message, the thread specific exception port has already
+ been asked, and we don't need to bother about it.
+ See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
+ task_set_exception_ports (self, mask, our_exception_port,
+ EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
+ }
+ }
+ }
+}
+#else
+/* Avoid a crash on POSIX systems. */
+#include <signal.h>
+/* A POSIX signal handler. */
+static void
+exception_handler (int sig)
+{
+ exit (1);
+}
+static void
+nocrash_init (void)
+{
+#ifdef SIGSEGV
+ signal (SIGSEGV, exception_handler);
+#endif
+#ifdef SIGBUS
+ signal (SIGBUS, exception_handler);
+#endif
+}
+#endif
+]])
diff --git a/ltdl/m4/obstack-printf-posix.m4 b/ltdl/m4/obstack-printf-posix.m4
new file mode 100755
index 00000000..606aca13
--- /dev/null
+++ b/ltdl/m4/obstack-printf-posix.m4
@@ -0,0 +1,105 @@
+# obstack-printf-posix.m4 serial 4
+dnl Copyright (C) 2008-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.
+
+AC_DEFUN([gl_FUNC_OBSTACK_PRINTF_POSIX],
+[
+ dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_obstack_printf_posix=no
+ AC_CHECK_FUNCS_ONCE([obstack_printf])
+ if test $ac_cv_func_obstack_printf = yes ; then
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # obstack_printf exists and is
+ # already POSIX compliant.
+ gl_cv_func_obstack_printf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_obstack_printf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_OBSTACK_PRINTF
+ fi
+ gl_DECL_OBSTACK_PRINTF
+])
diff --git a/ltdl/m4/obstack-printf.m4 b/ltdl/m4/obstack-printf.m4
new file mode 100755
index 00000000..b74a46bf
--- /dev/null
+++ b/ltdl/m4/obstack-printf.m4
@@ -0,0 +1,42 @@
+# obstack-printf.m4 serial 3
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Eric Blake.
+dnl Test whether obstack_printf() exists. For now, we assume that
+dnl obstack_vprintf behaves identically, so we only test for one.
+
+AC_DEFUN([gl_FUNC_OBSTACK_PRINTF],
+[
+ dnl Persuade glibc <stdio.h> to declare obstack_printf(), obstack_vprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([obstack_printf])
+ if test $ac_cv_func_obstack_printf = no ; then
+ gl_REPLACE_OBSTACK_PRINTF
+ fi
+
+ gl_DECL_OBSTACK_PRINTF
+])
+
+AC_DEFUN([gl_REPLACE_OBSTACK_PRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([obstack_printf])
+ if test $ac_cv_func_obstack_printf = yes; then
+ REPLACE_OBSTACK_PRINTF=1
+ fi
+])
+
+dnl Ensure obstack_printf() and obstack_vprintf() are declared
+dnl (whether or not they are being replaced).
+AC_DEFUN([gl_DECL_OBSTACK_PRINTF],
+[
+ AC_CHECK_DECLS_ONCE([obstack_printf])
+ if test $ac_cv_have_decl_obstack_printf = no; then
+ HAVE_DECL_OBSTACK_PRINTF=0
+ fi
+])
diff --git a/ltdl/m4/open.m4 b/ltdl/m4/open.m4
new file mode 100755
index 00000000..d705b3a1
--- /dev/null
+++ b/ltdl/m4/open.m4
@@ -0,0 +1,74 @@
+# open.m4 serial 8
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_OPEN],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ case "$host_os" in
+ mingw* | pw*)
+ gl_REPLACE_OPEN
+ ;;
+ *)
+ dnl open("foo/") should not create a file when the file name has a
+ dnl trailing slash. FreeBSD only has the problem on symlinks.
+ AC_CHECK_FUNCS_ONCE([lstat])
+ AC_CACHE_CHECK([whether open recognizes a trailing slash],
+ [gl_cv_func_open_slash],
+ [# Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ touch conftest.tmp
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_TRY_RUN([
+#include <fcntl.h>
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif
+int main ()
+{
+#if HAVE_LSTAT
+ if (open ("conftest.lnk/", O_RDONLY) != -1) return 2;
+#endif
+ return open ("conftest.sl/", O_CREAT, 0600) >= 0;
+}], [gl_cv_func_open_slash=yes], [gl_cv_func_open_slash=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ freebsd*) gl_cv_func_open_slash="guessing no" ;;
+ solaris2.[0-9]*) gl_cv_func_open_slash="guessing no" ;;
+ hpux*) gl_cv_func_open_slash="guessing no" ;;
+ *) gl_cv_func_open_slash="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ rm -f conftest.sl conftest.tmp conftest.lnk
+ ])
+ case "$gl_cv_func_open_slash" in
+ *no)
+ AC_DEFINE([OPEN_TRAILING_SLASH_BUG], [1],
+ [Define to 1 if open() fails to recognize a trailing slash.])
+ gl_REPLACE_OPEN
+ ;;
+ esac
+ ;;
+ esac
+])
+
+AC_DEFUN([gl_REPLACE_OPEN],
+[
+ AC_REQUIRE([gl_FCNTL_H_DEFAULTS])
+ REPLACE_OPEN=1
+ AC_LIBOBJ([open])
+ gl_PREREQ_OPEN
+])
+
+# Prerequisites of lib/open.c.
+AC_DEFUN([gl_PREREQ_OPEN],
+[
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gl_PROMOTED_TYPE_MODE_T])
+ :
+])
diff --git a/ltdl/m4/pathmax.m4 b/ltdl/m4/pathmax.m4
new file mode 100755
index 00000000..6a3f857e
--- /dev/null
+++ b/ltdl/m4/pathmax.m4
@@ -0,0 +1,13 @@
+# pathmax.m4 serial 8
+dnl Copyright (C) 2002-2003, 2005-2006, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_PATHMAX],
+[
+ dnl Prerequisites of lib/pathmax.h.
+ AC_CHECK_FUNCS_ONCE([pathconf])
+ AC_CHECK_HEADERS_ONCE([sys/param.h])
+])
diff --git a/ltdl/m4/pipe.m4 b/ltdl/m4/pipe.m4
new file mode 100755
index 00000000..401881c8
--- /dev/null
+++ b/ltdl/m4/pipe.m4
@@ -0,0 +1,12 @@
+# pipe.m4 serial 4
+dnl Copyright (C) 2004, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_PIPE],
+[
+ dnl Prerequisites of lib/pipe.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_TYPE_MODE_T])
+])
diff --git a/ltdl/m4/pipe2.m4 b/ltdl/m4/pipe2.m4
new file mode 100755
index 00000000..c114af61
--- /dev/null
+++ b/ltdl/m4/pipe2.m4
@@ -0,0 +1,18 @@
+# pipe2.m4 serial 2
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_PIPE2],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+
+ dnl Persuade glibc <unistd.h> to declare pipe2().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_FUNCS_ONCE([pipe2])
+ if test $ac_cv_func_pipe2 != yes; then
+ HAVE_PIPE2=0
+ fi
+])
diff --git a/ltdl/m4/po.m4 b/ltdl/m4/po.m4
new file mode 100755
index 00000000..960efe15
--- /dev/null
+++ b/ltdl/m4/po.m4
@@ -0,0 +1,449 @@
+# po.m4 serial 17 (gettext-0.18)
+dnl Copyright (C) 1995-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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ([2.50])
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG([GMSGFMT], [gmsgfmt], [$MSGFMT])
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
diff --git a/ltdl/m4/po.m4~ b/ltdl/m4/po.m4~
new file mode 100644
index 00000000..00133ef3
--- /dev/null
+++ b/ltdl/m4/po.m4~
@@ -0,0 +1,428 @@
+# po.m4 serial 13 (gettext-0.15)
+dnl Copyright (C) 1995-2006 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
diff --git a/ltdl/m4/posix_spawn.m4 b/ltdl/m4/posix_spawn.m4
new file mode 100755
index 00000000..e8f12c40
--- /dev/null
+++ b/ltdl/m4/posix_spawn.m4
@@ -0,0 +1,375 @@
+# posix_spawn.m4 serial 4
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Tests whether the entire posix_spawn facility is available.
+AC_DEFUN([gl_POSIX_SPAWN],
+[
+ AC_REQUIRE([gl_POSIX_SPAWN_BODY])
+])
+
+AC_DEFUN([gl_POSIX_SPAWN_BODY],
+[
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([posix_spawn])
+ dnl Assume that when the main function exists, all the others are
+ dnl available as well.
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnp])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_init])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addclose])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_adddup2])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_addopen])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawn_file_actions_destroy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_init])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getflags])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setflags])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getpgroup])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setpgroup])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getschedparam])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setschedparam])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getschedpolicy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setschedpolicy])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getsigdefault])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setsigdefault])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_getsigmask])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_setsigmask])
+ dnl AC_CHECK_FUNCS_ONCE([posix_spawnattr_destroy])
+ if test $ac_cv_func_posix_spawn = yes; then
+ gl_POSIX_SPAWN_WORKS
+ case "$gl_cv_func_posix_spawn_works" in
+ *yes) ;;
+ *) REPLACE_POSIX_SPAWN=1 ;;
+ esac
+ else
+ HAVE_POSIX_SPAWN=0
+ fi
+])
+
+dnl Test whether posix_spawn actually works.
+dnl posix_spawn on AIX 5.3..6.1 has two bugs:
+dnl 1) When it fails to execute the program, the child process exits with
+dnl exit() rather than _exit(), which causes the stdio buffers to be
+dnl flushed. Reported by Rainer Tammer.
+dnl 2) The posix_spawn_file_actions_addopen function does not support file
+dnl names that contain a '*'.
+dnl posix_spawn on AIX 5.3..6.1 has also a third bug: It does not work
+dnl when POSIX threads are used. But we don't test against this bug here.
+AC_DEFUN([gl_POSIX_SPAWN_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether posix_spawn works], [gl_cv_func_posix_spawn_works],
+ [if test $cross_compiling = no; then
+ AC_LINK_IFELSE([AC_LANG_SOURCE([[
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "/non/exist/ent"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ setvbuf (stdout, NULL, _IOFBF, 0);
+ puts ("This should be seen only once.");
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ if (err == ENOENT)
+ return 0;
+ else
+ {
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ close (ofd[1]);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 127)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
+]])],
+ [if test -s conftest$ac_exeext \
+ && ./conftest$ac_exeext > conftest.out \
+ && echo 'This should be seen only once.' > conftest.ok \
+ && cmp conftest.out conftest.ok > /dev/null; then
+ gl_cv_func_posix_spawn_works=yes
+ else
+ gl_cv_func_posix_spawn_works=no
+ fi],
+ [gl_cv_func_posix_spawn_works=no])
+ if test $gl_cv_func_posix_spawn_works = yes; then
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+/* Test whether posix_spawn_file_actions_addopen supports filename arguments
+ that contain special characters such as '*'. */
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <spawn.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#ifndef STDIN_FILENO
+# define STDIN_FILENO 0
+#endif
+#ifndef STDOUT_FILENO
+# define STDOUT_FILENO 1
+#endif
+#ifndef STDERR_FILENO
+# define STDERR_FILENO 2
+#endif
+
+#ifndef WTERMSIG
+# define WTERMSIG(x) ((x) & 0x7f)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(x) (WTERMSIG (x) == 0)
+#endif
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(x) (((x) >> 8) & 0xff)
+#endif
+
+#define CHILD_PROGRAM_FILENAME "conftest"
+#define DATA_FILENAME "conftest%=*#?"
+
+static int
+parent_main (void)
+{
+ FILE *fp;
+ char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL };
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ int err;
+ pid_t child;
+ int status;
+ int exitstatus;
+
+ /* Create a data file with specific contents. */
+ fp = fopen (DATA_FILENAME, "wb");
+ if (fp == NULL)
+ {
+ perror ("cannot create data file");
+ return 1;
+ }
+ fwrite ("Halle Potta", 1, 11, fp);
+ if (fflush (fp) || fclose (fp))
+ {
+ perror ("cannot prepare data file");
+ return 1;
+ }
+
+ /* Avoid reading from our stdin, as it could block. */
+ freopen ("/dev/null", "rb", stdin);
+
+ /* Test whether posix_spawn_file_actions_addopen with this file name
+ actually works, but spawning a child that reads from this file. */
+ actions_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0
+ || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ errno = err;
+ perror ("subprocess failed");
+ return 1;
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ return 1;
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ return 1;
+ }
+ return 0;
+}
+
+static int
+child_main (void)
+{
+ char buf[1024];
+
+ /* See if reading from STDIN_FILENO yields the expected contents. */
+ if (fread (buf, 1, sizeof (buf), stdin) == 11
+ && memcmp (buf, "Halle Potta", 11) == 0)
+ return 0;
+ else
+ return 2;
+}
+
+static void
+cleanup_then_die (int sig)
+{
+ /* Clean up data file. */
+ unlink (DATA_FILENAME);
+
+ /* Re-raise the signal and die from it. */
+ signal (sig, SIG_DFL);
+ raise (sig);
+}
+
+int
+main (int argc, char *argv[])
+{
+ int exitstatus;
+
+ if (!(argc > 1 && strcmp (argv[1], "-child") == 0))
+ {
+ /* This is the parent process. */
+ signal (SIGINT, cleanup_then_die);
+ signal (SIGTERM, cleanup_then_die);
+ #ifdef SIGHUP
+ signal (SIGHUP, cleanup_then_die);
+ #endif
+
+ exitstatus = parent_main ();
+ }
+ else
+ {
+ /* This is the child process. */
+
+ exitstatus = child_main ();
+ }
+ unlink (DATA_FILENAME);
+ return exitstatus;
+}
+]])],
+ [],
+ [gl_cv_func_posix_spawn_works=no])
+ fi
+ else
+ case "$host_os" in
+ aix*) gl_cv_func_posix_spawn_works="guessing no";;
+ *) gl_cv_func_posix_spawn_works="guessing yes";;
+ esac
+ fi
+ ])
+])
+
+AC_DEFUN([gl_POSIX_SPAWN_INTERNAL],
+[
+ AC_LIBOBJ([spawni])
+ dnl Prerequisites of lib/spawni.c.
+ AC_CHECK_HEADERS([paths.h])
+ AC_CHECK_FUNCS([confstr sched_setparam sched_setscheduler setegid seteuid vfork])
+])
diff --git a/ltdl/m4/printf-frexp.m4 b/ltdl/m4/printf-frexp.m4
new file mode 100755
index 00000000..c42391a4
--- /dev/null
+++ b/ltdl/m4/printf-frexp.m4
@@ -0,0 +1,45 @@
+# printf-frexp.m4 serial 3
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check how to define printf_frexp() without linking with libm.
+
+AC_DEFUN([gl_FUNC_PRINTF_FREXP],
+[
+ AC_CACHE_CHECK([whether frexp can be used without linking with libm],
+ [gl_cv_func_frexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;
+ int y;],
+ [return frexp (x, &y) < 1;],
+ [gl_cv_func_frexp_no_libm=yes],
+ [gl_cv_func_frexp_no_libm=no])
+ ])
+ if test $gl_cv_func_frexp_no_libm = yes; then
+ gl_FUNC_FREXP_WORKS
+ case "$gl_cv_func_frexp_works" in
+ *yes)
+ AC_DEFINE([HAVE_FREXP_IN_LIBC], [1],
+ [Define if the frexp function is available in libc.])
+ ;;
+ esac
+ fi
+
+ AC_CACHE_CHECK([whether ldexp can be used without linking with libm],
+ [gl_cv_func_ldexp_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x;
+ int y;],
+ [return ldexp (x, y) < 1;],
+ [gl_cv_func_ldexp_no_libm=yes],
+ [gl_cv_func_ldexp_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexp_no_libm = yes; then
+ AC_DEFINE([HAVE_LDEXP_IN_LIBC], [1],
+ [Define if the ldexp function is available in libc.])
+ fi
+])
diff --git a/ltdl/m4/printf-frexpl.m4 b/ltdl/m4/printf-frexpl.m4
new file mode 100755
index 00000000..14ffe1fc
--- /dev/null
+++ b/ltdl/m4/printf-frexpl.m4
@@ -0,0 +1,64 @@
+# printf-frexpl.m4 serial 6
+dnl Copyright (C) 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Check how to define printf_frexpl() without linking with libm.
+
+AC_DEFUN([gl_FUNC_PRINTF_FREXPL],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ dnl Subset of gl_FUNC_FREXPL_NO_LIBM.
+ AC_CACHE_CHECK([whether frexpl can be used without linking with libm],
+ [gl_cv_func_frexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;
+ int y;],
+ [return frexpl (x, &y) < 1;],
+ [gl_cv_func_frexpl_no_libm=yes],
+ [gl_cv_func_frexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_frexpl_no_libm = yes; then
+ gl_FUNC_FREXPL_WORKS
+ case "$gl_cv_func_frexpl_works" in
+ *yes) gl_func_frexpl_no_libm=yes ;;
+ *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;;
+ esac
+ else
+ gl_func_frexpl_no_libm=no
+ dnl Set REPLACE_FREXPL here because the system may have frexpl in libm.
+ REPLACE_FREXPL=1
+ fi
+ if test $gl_func_frexpl_no_libm = yes; then
+ AC_DEFINE([HAVE_FREXPL_IN_LIBC], [1],
+ [Define if the frexpl function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has frexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([frexpl], , [HAVE_DECL_FREXPL=0], [#include <math.h>])
+ fi
+
+ AC_CACHE_CHECK([whether ldexpl can be used without linking with libm],
+ [gl_cv_func_ldexpl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x;
+ int y;],
+ [return ldexpl (x, y) < 1;],
+ [gl_cv_func_ldexpl_no_libm=yes],
+ [gl_cv_func_ldexpl_no_libm=no])
+ ])
+ if test $gl_cv_func_ldexpl_no_libm = yes; then
+ gl_FUNC_LDEXPL_WORKS
+ case "$gl_cv_func_ldexpl_works" in
+ *yes)
+ AC_DEFINE([HAVE_LDEXPL_IN_LIBC], [1],
+ [Define if the ldexpl function is available in libc.])
+ dnl Also check whether it's declared.
+ dnl MacOS X 10.3 has ldexpl() in libc but doesn't declare it in <math.h>.
+ AC_CHECK_DECL([ldexpl], , [HAVE_DECL_LDEXPL=0], [#include <math.h>])
+ ;;
+ esac
+ fi
+])
diff --git a/ltdl/m4/printf-posix.m4 b/ltdl/m4/printf-posix.m4
new file mode 100755
index 00000000..820ddf52
--- /dev/null
+++ b/ltdl/m4/printf-posix.m4
@@ -0,0 +1,45 @@
+# printf-posix.m4 serial 5 (gettext-0.18)
+dnl Copyright (C) 2003, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+ gt_cv_func_printf_posix,
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+ [
+ AC_EGREP_CPP([notposix], [
+#if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+ notposix
+#endif
+ ],
+ [gt_cv_func_printf_posix="guessing no"],
+ [gt_cv_func_printf_posix="guessing yes"])
+ ])
+ ])
+ case $gt_cv_func_printf_posix in
+ *yes)
+ AC_DEFINE([HAVE_POSIX_PRINTF], [1],
+ [Define if your printf() function supports format strings with positions.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/printf-posix.m4~ b/ltdl/m4/printf-posix.m4~
new file mode 100644
index 00000000..af10170a
--- /dev/null
+++ b/ltdl/m4/printf-posix.m4~
@@ -0,0 +1,44 @@
+# printf-posix.m4 serial 2 (gettext-0.13.1)
+dnl Copyright (C) 2003 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 Bruno Haible.
+dnl Test whether the printf() function supports POSIX/XSI format strings with
+dnl positions.
+
+AC_DEFUN([gt_PRINTF_POSIX],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
+ gt_cv_func_printf_posix,
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
+ [
+ AC_EGREP_CPP(notposix, [
+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
+ notposix
+#endif
+ ], gt_cv_func_printf_posix="guessing no",
+ gt_cv_func_printf_posix="guessing yes")
+ ])
+ ])
+ case $gt_cv_func_printf_posix in
+ *yes)
+ AC_DEFINE(HAVE_POSIX_PRINTF, 1,
+ [Define if your printf() function supports format strings with positions.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/printf.m4 b/ltdl/m4/printf.m4
new file mode 100755
index 00000000..ebca5364
--- /dev/null
+++ b/ltdl/m4/printf.m4
@@ -0,0 +1,1416 @@
+# printf.m4 serial 33
+dnl Copyright (C) 2003, 2007-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 Test whether the *printf family of functions supports the 'j', 'z', 't',
+dnl 'L' size specifiers. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_sizes_c99.
+
+AC_DEFUN([gl_PRINTF_SIZES_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports size specifiers as in C99],
+ [gl_cv_func_printf_sizes_c99],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/types.h>
+#if HAVE_STDINT_H_WITH_UINTMAX
+# include <stdint.h>
+#endif
+#if HAVE_INTTYPES_H_WITH_UINTMAX
+# include <inttypes.h>
+#endif
+static char buf[100];
+int main ()
+{
+#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX
+ buf[0] = '\0';
+ if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0
+ || strcmp (buf, "12345671 33") != 0)
+ return 1;
+#endif
+ buf[0] = '\0';
+ if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0
+ || strcmp (buf, "12345672 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0
+ || strcmp (buf, "12345673 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0
+ || strcmp (buf, "1.5 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_sizes_c99=yes], [gl_cv_func_printf_sizes_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";;
+ darwin*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_sizes_c99="guessing no";;
+ solaris*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_sizes_c99="guessing no";;
+ netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_sizes_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports 'long double'
+dnl arguments together with the 'L' size specifier. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_long_double.
+
+AC_DEFUN([gl_PRINTF_LONG_DOUBLE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports 'long double' arguments],
+ [gl_cv_func_printf_long_double],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[10000];
+int main ()
+{
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.750000e+00 33") != 0)
+ return 1;
+ buf[0] = '\0';
+ if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0
+ || strcmp (buf, "1.75 33") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_long_double=yes], [gl_cv_func_printf_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ beos*) gl_cv_func_printf_long_double="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_long_double="guessing no";;
+ *) gl_cv_func_printf_long_double="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'double' arguments and negative zero arguments in the %f, %e, %g
+dnl directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite.
+
+AC_DEFUN([gl_PRINTF_INFINITE],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports infinite 'double' arguments],
+ [gl_cv_func_printf_infinite],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+static char buf[10000];
+static double zero = 0.0;
+int main ()
+{
+ if (sprintf (buf, "%f", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%f", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%e", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%e", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%g", 1.0 / 0.0) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", -1.0 / 0.0) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%g", zero / zero) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ /* This test fails on HP-UX 10.20. */
+ if (have_minus_zero ())
+ if (sprintf (buf, "%g", - zero) < 0
+ || strcmp (buf, "-0") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_infinite=yes], [gl_cv_func_printf_infinite=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";;
+ darwin*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";;
+ hpux*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_infinite="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports infinite and NaN
+dnl 'long double' arguments in the %f, %e, %g directives. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_infinite_long_double.
+
+AC_DEFUN([gl_PRINTF_INFINITE_LONG_DOUBLE],
+[
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_BIGENDIAN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ dnl The user can set or unset the variable gl_printf_safe to indicate
+ dnl that he wishes a safe handling of non-IEEE-754 'long double' values.
+ if test -n "$gl_printf_safe"; then
+ AC_DEFINE([CHECK_PRINTF_SAFE], [1],
+ [Define if you wish *printf() functions that have a safe handling of
+ non-IEEE-754 'long double' values.])
+ fi
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ AC_CACHE_CHECK([whether printf supports infinite 'long double' arguments],
+ [gl_cv_func_printf_infinite_long_double],
+ [
+ AC_TRY_RUN([
+]GL_NOCRASH[
+#include <float.h>
+#include <stdio.h>
+#include <string.h>
+static int
+strisnan (const char *string, size_t start_index, size_t end_index)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+static char buf[10000];
+static long double zeroL = 0.0L;
+int main ()
+{
+ nocrash_init();
+ if (sprintf (buf, "%Lf", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lf", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Le", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", 1.0L / 0.0L) < 0
+ || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", -1.0L / 0.0L) < 0
+ || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0))
+ return 1;
+ if (sprintf (buf, "%Lg", zeroL / zeroL) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ if (sprintf (buf, "%Lf", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Le", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ if (sprintf (buf, "%Lg", x.value) < 0
+ || !strisnan (buf, 0, strlen (buf)))
+ return 1;
+ }
+#endif
+ return 0;
+}],
+ [gl_cv_func_printf_infinite_long_double=yes],
+ [gl_cv_func_printf_infinite_long_double=no],
+ [
+changequote(,)dnl
+ case "$host_cpu" in
+ # Guess no on ia64, x86_64, i386.
+ ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";;
+ *)
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ darwin*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";;
+ hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_printf_infinite_long_double="guessing no";;
+ netbsd*) gl_cv_func_printf_infinite_long_double="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_infinite_long_double="guessing no";;
+ esac
+ ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ ;;
+ *)
+ gl_cv_func_printf_infinite_long_double="irrelevant"
+ ;;
+ esac
+])
+
+dnl Test whether the *printf family of functions supports the 'a' and 'A'
+dnl conversion specifier for hexadecimal output of floating-point numbers.
+dnl (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_a.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_A],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'a' and 'A' directives],
+ [gl_cv_func_printf_directive_a],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.922p+1 33") != 0
+ && strcmp (buf, "0x3.244p+0 33") != 0
+ && strcmp (buf, "0x6.488p-1 33") != 0
+ && strcmp (buf, "0xc.91p-2 33") != 0))
+ return 1;
+ if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0
+ || (strcmp (buf, "-0X1.922P+1 33") != 0
+ && strcmp (buf, "-0X3.244P+0 33") != 0
+ && strcmp (buf, "-0X6.488P-1 33") != 0
+ && strcmp (buf, "-0XC.91P-2 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug: it doesn't round. */
+ if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
+ || (strcmp (buf, "0x1.83p+0 33") != 0
+ && strcmp (buf, "0x3.05p-1 33") != 0
+ && strcmp (buf, "0x6.0ap-2 33") != 0
+ && strcmp (buf, "0xc.14p-3 33") != 0))
+ return 1;
+ /* This catches a FreeBSD 6.1 bug. See
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
+ || buf[0] == '0')
+ return 1;
+ /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ if (sprintf (buf, "%.1a", 1.999) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ /* This catches the same MacOS X 10.3.9 (Darwin 7.9) bug and also a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ if (sprintf (buf, "%.1La", 1.999L) < 0
+ || (strcmp (buf, "0x1.0p+1") != 0
+ && strcmp (buf, "0x2.0p+0") != 0
+ && strcmp (buf, "0x4.0p-1") != 0
+ && strcmp (buf, "0x8.0p-2") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_a=yes], [gl_cv_func_printf_directive_a=no],
+ [
+ case "$host_os" in
+ # Guess yes on glibc >= 2.5 systems.
+ *-gnu*)
+ AC_EGREP_CPP([BZ2908], [
+ #include <features.h>
+ #ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)
+ BZ2908
+ #endif
+ #endif
+ ],
+ [gl_cv_func_printf_directive_a="guessing yes"],
+ [gl_cv_func_printf_directive_a="guessing no"])
+ ;;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_a="guessing no";;
+ esac
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %F format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_f.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_F],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'F' directive],
+ [gl_cv_func_printf_directive_f],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0
+ || strcmp (buf, "1234567.000000 33") != 0)
+ return 1;
+ if (sprintf (buf, "%F", 1.0 / 0.0) < 0
+ || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0))
+ return 1;
+ /* This catches a Cygwin 1.5.x bug. */
+ if (sprintf (buf, "%.F", 1234.0) < 0
+ || strcmp (buf, "1234") != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_f=yes], [gl_cv_func_printf_directive_f=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on FreeBSD >= 6.
+ freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";;
+ darwin*) gl_cv_func_printf_directive_f="guessing yes";;
+ # Guess yes on Solaris >= 2.10.
+ solaris2.[0-9]*) gl_cv_func_printf_directive_f="guessing no";;
+ solaris*) gl_cv_func_printf_directive_f="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_directive_f="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %n format
+dnl directive. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_printf_directive_n.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_N],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'n' directive],
+ [gl_cv_func_printf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0
+ || strcmp (buf, "123 ") != 0
+ || count != 4)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_directive_n=yes], [gl_cv_func_printf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ *) gl_cv_func_printf_directive_n="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the %ls format
+dnl directive and in particular, when a precision is specified, whether
+dnl the functions stop converting the wide string argument when the number
+dnl of bytes that have been produced by this conversion equals or exceeds
+dnl the precision.
+dnl Result is gl_cv_func_printf_directive_ls.
+
+AC_DEFUN([gl_PRINTF_DIRECTIVE_LS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the 'ls' directive],
+ [gl_cv_func_printf_directive_ls],
+ [
+ AC_TRY_RUN([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#include <string.h>
+int main ()
+{
+ char buf[100];
+ /* Test whether %ls works at all.
+ This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on
+ Cygwin 1.5. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', 'c', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "abc") != 0)
+ return 1;
+ }
+ /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an
+ assertion failure inside libc), but not on OpenBSD 4.0. */
+ {
+ static const wchar_t wstring[] = { 'a', 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%ls", wstring) < 0
+ || strcmp (buf, "a") != 0)
+ return 1;
+ }
+ /* Test whether precisions in %ls are supported as specified in ISO C 99
+ section 7.19.6.1:
+ "If a precision is specified, no more than that many bytes are written
+ (including shift sequences, if any), and the array shall contain a
+ null wide character if, to equal the multibyte character sequence
+ length given by the precision, the function would need to access a
+ wide character one past the end of the array."
+ This test fails on Solaris 10. */
+ {
+ static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 };
+ buf[0] = '\0';
+ if (sprintf (buf, "%.2ls", wstring) < 0
+ || strcmp (buf, "ab") != 0)
+ return 1;
+ }
+ return 0;
+}], [gl_cv_func_printf_directive_ls=yes], [gl_cv_func_printf_directive_ls=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ openbsd*) gl_cv_func_printf_directive_ls="guessing no";;
+ irix*) gl_cv_func_printf_directive_ls="guessing no";;
+ solaris*) gl_cv_func_printf_directive_ls="guessing no";;
+ cygwin*) gl_cv_func_printf_directive_ls="guessing no";;
+ beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";;
+ *) gl_cv_func_printf_directive_ls="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with positions. (POSIX:2001)
+dnl Result is gl_cv_func_printf_positions.
+
+AC_DEFUN([gl_PRINTF_POSITIONS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports POSIX/XSI format strings with positions],
+ [gl_cv_func_printf_positions],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+/* The string "%2$d %1$d", with dollar characters protected from the shell's
+ dollar expansion (possibly an autoconf bug). */
+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
+static char buf[100];
+int main ()
+{
+ sprintf (buf, format, 33, 55);
+ return (strcmp (buf, "55 33") != 0);
+}], [gl_cv_func_printf_positions=yes], [gl_cv_func_printf_positions=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
+ gl_cv_func_printf_positions="guessing no";;
+ beos*) gl_cv_func_printf_positions="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
+ *) gl_cv_func_printf_positions="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports POSIX/XSI format
+dnl strings with the ' flag for grouping of decimal digits. (POSIX:2001)
+dnl Result is gl_cv_func_printf_flag_grouping.
+
+AC_DEFUN([gl_PRINTF_FLAG_GROUPING],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the grouping flag],
+ [gl_cv_func_printf_flag_grouping],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%'d %d", 1234567, 99) < 0
+ || buf[strlen (buf) - 1] != '9')
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_grouping=yes], [gl_cv_func_printf_flag_grouping=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ cygwin*) gl_cv_func_printf_flag_grouping="guessing no";;
+ netbsd*) gl_cv_func_printf_flag_grouping="guessing no";;
+ mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";;
+ *) gl_cv_func_printf_flag_grouping="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports the - flag correctly.
+dnl (ISO C99.) See
+dnl <http://lists.gnu.org/archive/html/bug-coreutils/2008-02/msg00035.html>
+dnl Result is gl_cv_func_printf_flag_leftadjust.
+
+AC_DEFUN([gl_PRINTF_FLAG_LEFTADJUST],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the left-adjust flag correctly],
+ [gl_cv_func_printf_flag_leftadjust],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ /* Check that a '-' flag is not annihilated by a negative width. */
+ if (sprintf (buf, "a%-*sc", -3, "b") < 0
+ || strcmp (buf, "ab c") != 0)
+ return 1;
+ return 0;
+}],
+ [gl_cv_func_printf_flag_leftadjust=yes],
+ [gl_cv_func_printf_flag_leftadjust=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on HP-UX 11.
+ hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ # Guess no on HP-UX 10 and older.
+ hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";;
+ # Guess yes otherwise.
+ *) gl_cv_func_printf_flag_leftadjust="guessing yes";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports padding of non-finite
+dnl values with the 0 flag correctly. (ISO C99 + TC1 + TC2.) See
+dnl <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html>
+dnl Result is gl_cv_func_printf_flag_zero.
+
+AC_DEFUN([gl_PRINTF_FLAG_ZERO],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports the zero flag correctly],
+ [gl_cv_func_printf_flag_zero],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ if (sprintf (buf, "%010f", 1.0 / 0.0, 33, 44, 55) < 0
+ || (strcmp (buf, " inf") != 0
+ && strcmp (buf, " infinity") != 0))
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_flag_zero=yes], [gl_cv_func_printf_flag_zero=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_flag_zero="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_flag_zero="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions supports large precisions.
+dnl On mingw, precisions larger than 512 are treated like 512, in integer,
+dnl floating-point or pointer output. On BeOS, precisions larger than 1044
+dnl crash the program.
+dnl Result is gl_cv_func_printf_precision.
+
+AC_DEFUN([gl_PRINTF_PRECISION],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf supports large precisions],
+ [gl_cv_func_printf_precision],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[5000];
+int main ()
+{
+#ifdef __BEOS__
+ /* On BeOS, this would crash and show a dialog box. Avoid the crash. */
+ return 1;
+#endif
+ if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3)
+ return 1;
+ return 0;
+}], [gl_cv_func_printf_precision=yes], [gl_cv_func_printf_precision=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no only on native Win32 and BeOS systems.
+ mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;;
+ beos*) gl_cv_func_printf_precision="guessing no" ;;
+ *) gl_cv_func_printf_precision="guessing yes" ;;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the *printf family of functions recovers gracefully in case
+dnl of an out-of-memory condition, or whether it crashes the entire program.
+dnl Result is gl_cv_func_printf_enomem.
+
+AC_DEFUN([gl_PRINTF_ENOMEM],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gl_MULTIARCH])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether printf survives out-of-memory conditions],
+ [gl_cv_func_printf_enomem],
+ [
+ gl_cv_func_printf_enomem="guessing no"
+ if test "$cross_compiling" = no; then
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ AC_LANG_CONFTEST([AC_LANG_SOURCE([
+]GL_NOCRASH[
+changequote(,)dnl
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/time.h>
+#include <sys/resource.h>
+#include <errno.h>
+int main()
+{
+ struct rlimit limit;
+ int ret;
+ nocrash_init ();
+ /* Some printf implementations allocate temporary space with malloc. */
+ /* On BSD systems, malloc() is limited by RLIMIT_DATA. */
+#ifdef RLIMIT_DATA
+ if (getrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_DATA, &limit) < 0)
+ return 77;
+#endif
+ /* On Linux systems, malloc() is limited by RLIMIT_AS. */
+#ifdef RLIMIT_AS
+ if (getrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_AS, &limit) < 0)
+ return 77;
+#endif
+ /* Some printf implementations allocate temporary space on the stack. */
+#ifdef RLIMIT_STACK
+ if (getrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+ if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000)
+ limit.rlim_max = 5000000;
+ limit.rlim_cur = limit.rlim_max;
+ if (setrlimit (RLIMIT_STACK, &limit) < 0)
+ return 77;
+#endif
+ ret = printf ("%.5000000f", 1.0);
+ return !(ret == 5000002 || (ret < 0 && errno == ENOMEM));
+}
+changequote([,])dnl
+ ])])
+ if AC_TRY_EVAL([ac_link]) && test -s conftest$ac_exeext; then
+ (./conftest
+ result=$?
+ if test $result != 0 && test $result != 77; then result=1; fi
+ exit $result
+ ) >/dev/null 2>/dev/null
+ case $? in
+ 0) gl_cv_func_printf_enomem="yes" ;;
+ 77) gl_cv_func_printf_enomem="guessing no" ;;
+ *) gl_cv_func_printf_enomem="no" ;;
+ esac
+ else
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ rm -fr conftest*
+ else
+ dnl A universal build on Apple MacOS X platforms.
+ dnl The result would be 'no' in 32-bit mode and 'yes' in 64-bit mode.
+ dnl But we need a configuration result that is valid in both modes.
+ gl_cv_func_printf_enomem="guessing no"
+ fi
+ fi
+ if test "$gl_cv_func_printf_enomem" = "guessing no"; then
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Solaris.
+ solaris*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on AIX.
+ aix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on HP-UX/hppa.
+ hpux*) case "$host_cpu" in
+ hppa*) gl_cv_func_printf_enomem="guessing yes";;
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+ ;;
+ # Guess yes on IRIX.
+ irix*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on OSF/1.
+ osf*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_printf_enomem="guessing yes";;
+ # Guess yes on Haiku.
+ haiku*) gl_cv_func_printf_enomem="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_printf_enomem="guessing no";;
+ esac
+changequote([,])dnl
+ fi
+ ])
+])
+
+dnl Test whether the snprintf function exists. (ISO C99, POSIX:2001)
+dnl Result is ac_cv_func_snprintf.
+
+AC_DEFUN([gl_SNPRINTF_PRESENCE],
+[
+ AC_CHECK_FUNCS_ONCE([snprintf])
+])
+
+dnl Test whether the string produced by the snprintf function is always NUL
+dnl terminated. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_truncation_c99.
+
+AC_DEFUN([gl_SNPRINTF_TRUNCATION_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf truncates the result as in C99],
+ [gl_cv_func_snprintf_truncation_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ snprintf (buf, 3, "%d %d", 4567, 89);
+ if (memcmp (buf, "45\0DEF", 6) != 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_truncation_c99=yes], [gl_cv_func_snprintf_truncation_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on HP-UX >= 11.
+ hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_truncation_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_truncation_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the return value of the snprintf function is the number
+dnl of bytes (excluding the terminating NUL) that would have been produced
+dnl if the buffer had been large enough. (ISO C99, POSIX:2001)
+dnl For example, this test program fails on IRIX 6.5:
+dnl ---------------------------------------------------------------------
+dnl #include <stdio.h>
+dnl int main()
+dnl {
+dnl static char buf[8];
+dnl int retval = snprintf (buf, 3, "%d", 12345);
+dnl return retval >= 0 && retval < 3;
+dnl }
+dnl ---------------------------------------------------------------------
+dnl Result is gl_cv_func_snprintf_retval_c99.
+
+AC_DEFUN([gl_SNPRINTF_RETVAL_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf returns a byte count as in C99],
+ [gl_cv_func_snprintf_retval_c99],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char buf[100];
+int main ()
+{
+ strcpy (buf, "ABCDEF");
+ if (snprintf (buf, 3, "%d %d", 4567, 89) != 7)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_retval_c99=yes], [gl_cv_func_snprintf_retval_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on OpenBSD >= 3.9.
+ openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ solaris*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
+ aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_retval_c99="guessing no";;
+ netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_retval_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the snprintf function supports the %n format directive
+dnl also in truncated portions of the format string. (ISO C99, POSIX:2001)
+dnl Result is gl_cv_func_snprintf_directive_n.
+
+AC_DEFUN([gl_SNPRINTF_DIRECTIVE_N],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether snprintf fully supports the 'n' directive],
+ [gl_cv_func_snprintf_directive_n],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+#include <string.h>
+static char fmtstring[10];
+static char buf[100];
+int main ()
+{
+ int count = -1;
+ /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2)
+ support %n in format strings in read-only memory but not in writable
+ memory. */
+ strcpy (fmtstring, "%d %n");
+ snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55);
+ if (count != 6)
+ return 1;
+ return 0;
+}], [gl_cv_func_snprintf_directive_n=yes], [gl_cv_func_snprintf_directive_n=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";;
+ darwin*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ solaris*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ aix*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on OSF/1 >= 5.
+ osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";;
+ osf*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_snprintf_directive_n="guessing no";;
+ netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_snprintf_directive_n="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_snprintf_directive_n="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl Test whether the snprintf function, when passed a size = 1, writes any
+dnl output without bounds in this case, behaving like sprintf. This is the
+dnl case on Linux libc5.
+dnl Result is gl_cv_func_snprintf_size1.
+
+AC_DEFUN([gl_SNPRINTF_SIZE1],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_CACHE_CHECK([whether snprintf respects a size of 1],
+ [gl_cv_func_snprintf_size1],
+ [
+ AC_TRY_RUN([
+#include <stdio.h>
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ snprintf (buf, 1, "%d", 12345);
+ return buf[1] != 'E';
+}],
+ [gl_cv_func_snprintf_size1=yes],
+ [gl_cv_func_snprintf_size1=no],
+ [gl_cv_func_snprintf_size1="guessing yes"])
+ ])
+])
+
+dnl Test whether the vsnprintf function, when passed a zero size, produces no
+dnl output. (ISO C99, POSIX:2001)
+dnl For example, snprintf nevertheless writes a NUL byte in this case
+dnl on OSF/1 5.1:
+dnl ---------------------------------------------------------------------
+dnl #include <stdio.h>
+dnl int main()
+dnl {
+dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+dnl snprintf (buf, 0, "%d", 12345);
+dnl return buf[0] != 'D';
+dnl }
+dnl ---------------------------------------------------------------------
+dnl And vsnprintf writes any output without bounds in this case, behaving like
+dnl vsprintf, on HP-UX 11 and OSF/1 5.1:
+dnl ---------------------------------------------------------------------
+dnl #include <stdarg.h>
+dnl #include <stdio.h>
+dnl static int my_snprintf (char *buf, int size, const char *format, ...)
+dnl {
+dnl va_list args;
+dnl int ret;
+dnl va_start (args, format);
+dnl ret = vsnprintf (buf, size, format, args);
+dnl va_end (args);
+dnl return ret;
+dnl }
+dnl int main()
+dnl {
+dnl static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+dnl my_snprintf (buf, 0, "%d", 12345);
+dnl return buf[0] != 'D';
+dnl }
+dnl ---------------------------------------------------------------------
+dnl Result is gl_cv_func_vsnprintf_zerosize_c99.
+
+AC_DEFUN([gl_VSNPRINTF_ZEROSIZE_C99],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether vsnprintf respects a zero size as in C99],
+ [gl_cv_func_vsnprintf_zerosize_c99],
+ [
+ AC_TRY_RUN([
+#include <stdarg.h>
+#include <stdio.h>
+static int my_snprintf (char *buf, int size, const char *format, ...)
+{
+ va_list args;
+ int ret;
+ va_start (args, format);
+ ret = vsnprintf (buf, size, format, args);
+ va_end (args);
+ return ret;
+}
+int main()
+{
+ static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
+ my_snprintf (buf, 0, "%d", 12345);
+ return buf[0] != 'D';
+}],
+ [gl_cv_func_vsnprintf_zerosize_c99=yes],
+ [gl_cv_func_vsnprintf_zerosize_c99=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on FreeBSD >= 5.
+ freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on MacOS X >= 10.3.
+ darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Cygwin.
+ cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on Solaris >= 2.6.
+ solaris2.[0-5]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on AIX >= 4.
+ aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on IRIX >= 6.5.
+ irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on NetBSD >= 3.
+ netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
+ gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on BeOS.
+ beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # Guess yes on mingw.
+ mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";;
+ # If we don't know, assume the worst.
+ *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+])
+
+dnl The results of these tests on various platforms are:
+dnl
+dnl 1 = gl_PRINTF_SIZES_C99
+dnl 2 = gl_PRINTF_LONG_DOUBLE
+dnl 3 = gl_PRINTF_INFINITE
+dnl 4 = gl_PRINTF_INFINITE_LONG_DOUBLE
+dnl 5 = gl_PRINTF_DIRECTIVE_A
+dnl 6 = gl_PRINTF_DIRECTIVE_F
+dnl 7 = gl_PRINTF_DIRECTIVE_N
+dnl 8 = gl_PRINTF_DIRECTIVE_LS
+dnl 9 = gl_PRINTF_POSITIONS
+dnl 10 = gl_PRINTF_FLAG_GROUPING
+dnl 11 = gl_PRINTF_FLAG_LEFTADJUST
+dnl 12 = gl_PRINTF_FLAG_ZERO
+dnl 13 = gl_PRINTF_PRECISION
+dnl 14 = gl_PRINTF_ENOMEM
+dnl 15 = gl_SNPRINTF_PRESENCE
+dnl 16 = gl_SNPRINTF_TRUNCATION_C99
+dnl 17 = gl_SNPRINTF_RETVAL_C99
+dnl 18 = gl_SNPRINTF_DIRECTIVE_N
+dnl 19 = gl_SNPRINTF_SIZE1
+dnl 20 = gl_VSNPRINTF_ZEROSIZE_C99
+dnl
+dnl 1 = checking whether printf supports size specifiers as in C99...
+dnl 2 = checking whether printf supports 'long double' arguments...
+dnl 3 = checking whether printf supports infinite 'double' arguments...
+dnl 4 = checking whether printf supports infinite 'long double' arguments...
+dnl 5 = checking whether printf supports the 'a' and 'A' directives...
+dnl 6 = checking whether printf supports the 'F' directive...
+dnl 7 = checking whether printf supports the 'n' directive...
+dnl 8 = checking whether printf supports the 'ls' directive...
+dnl 9 = checking whether printf supports POSIX/XSI format strings with positions...
+dnl 10 = checking whether printf supports the grouping flag...
+dnl 11 = checking whether printf supports the left-adjust flag correctly...
+dnl 12 = checking whether printf supports the zero flag correctly...
+dnl 13 = checking whether printf supports large precisions...
+dnl 14 = checking whether printf survives out-of-memory conditions...
+dnl 15 = checking for snprintf...
+dnl 16 = checking whether snprintf truncates the result as in C99...
+dnl 17 = checking whether snprintf returns a byte count as in C99...
+dnl 18 = checking whether snprintf fully supports the 'n' directive...
+dnl 19 = checking whether snprintf respects a size of 1...
+dnl 20 = checking whether vsnprintf respects a zero size as in C99...
+dnl
+dnl . = yes, # = no.
+dnl
+dnl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
+dnl glibc 2.5 . . . . . . . . . . . . . . . . . . . .
+dnl glibc 2.3.6 . . . . # . . . . . . . . . . . . . . .
+dnl FreeBSD 5.4, 6.1 . . . . # . . . . . . # . # . . . . . .
+dnl MacOS X 10.3.9 . . . . # . . . . . . # . # . . . . . .
+dnl OpenBSD 3.9, 4.0 . . # # # # . # . # . # . # . . . . . .
+dnl Cygwin 1.7.0 (2009) . . . # . . . ? . . . . . ? . . . . . .
+dnl Cygwin 1.5.25 (2008) . . . # # . . # . . . . . # . . . . . .
+dnl Cygwin 1.5.19 (2006) # . . # # # . # . # . # # # . . . . . .
+dnl Solaris 10 . . # # # . . # . . . # . . . . . . . .
+dnl Solaris 2.6 ... 9 # . # # # # . # . . . # . . . . . . . .
+dnl Solaris 2.5.1 # . # # # # . # . . . # . . # # # # # #
+dnl AIX 5.2 . . # # # . . . . . . # . . . . . . . .
+dnl AIX 4.3.2, 5.1 # . # # # # . . . . . # . . . . . . . .
+dnl HP-UX 11.31 . . . . # . . . . . . # . . . . # # . .
+dnl HP-UX 11.{00,11,23} # . . . # # . . . . . # . . . . # # . #
+dnl HP-UX 10.20 # . # . # # . ? . . # # . . . . # # ? #
+dnl IRIX 6.5 # . # # # # . # . . . # . . . . # . . .
+dnl OSF/1 5.1 # . # # # # . . . . . # . . . . # . . #
+dnl OSF/1 4.0d # . # # # # . . . . . # . . # # # # # #
+dnl NetBSD 4.0 . ? ? ? ? ? . ? . ? ? ? ? ? . . . ? ? ?
+dnl NetBSD 3.0 . . . . # # . ? # # ? # . # . . . . . .
+dnl Haiku . . . # # # . # . . . . . ? . . . . . .
+dnl BeOS # # . # # # . ? # . ? . # ? . . . . . .
+dnl mingw # # # # # # . . # # . # # ? . # # # . .
diff --git a/ltdl/m4/progtest.m4 b/ltdl/m4/progtest.m4
new file mode 100755
index 00000000..2d804ac9
--- /dev/null
+++ b/ltdl/m4/progtest.m4
@@ -0,0 +1,92 @@
+# progtest.m4 serial 6 (gettext-0.18)
+dnl Copyright (C) 1996-2003, 2005, 2008-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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ([2.50])
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL([ac_cv_path_$1],
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$][$1])
+else
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST([$1])dnl
+])
diff --git a/ltdl/m4/progtest.m4~ b/ltdl/m4/progtest.m4~
new file mode 100644
index 00000000..a56365cd
--- /dev/null
+++ b/ltdl/m4/progtest.m4~
@@ -0,0 +1,92 @@
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 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
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
diff --git a/ltdl/m4/putenv.m4 b/ltdl/m4/putenv.m4
new file mode 100755
index 00000000..dd9140c0
--- /dev/null
+++ b/ltdl/m4/putenv.m4
@@ -0,0 +1,41 @@
+# putenv.m4 serial 16
+dnl Copyright (C) 2002-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 Jim Meyering.
+dnl
+dnl Check whether putenv ("FOO") removes FOO from the environment.
+dnl The putenv in libc on at least SunOS 4.1.4 does *not* do that.
+
+AC_DEFUN([gl_FUNC_PUTENV],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CACHE_CHECK([for putenv compatible with GNU and SVID],
+ [gl_cv_func_svid_putenv],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([AC_INCLUDES_DEFAULT],[[
+ /* Put it in env. */
+ if (putenv ("CONFTEST_putenv=val"))
+ return 1;
+
+ /* Try to remove it. */
+ if (putenv ("CONFTEST_putenv"))
+ return 1;
+
+ /* Make sure it was deleted. */
+ if (getenv ("CONFTEST_putenv") != 0)
+ return 1;
+
+ return 0;
+ ]])],
+ gl_cv_func_svid_putenv=yes,
+ gl_cv_func_svid_putenv=no,
+ dnl When crosscompiling, assume putenv is broken.
+ gl_cv_func_svid_putenv=no)
+ ])
+ if test $gl_cv_func_svid_putenv = no; then
+ REPLACE_PUTENV=1
+ AC_LIBOBJ([putenv])
+ fi
+])
diff --git a/ltdl/m4/quote.m4 b/ltdl/m4/quote.m4
new file mode 100755
index 00000000..e0755426
--- /dev/null
+++ b/ltdl/m4/quote.m4
@@ -0,0 +1,14 @@
+# quote.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2005, 2006, 2009, 2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_QUOTE],
+[
+ AC_LIBOBJ([quote])
+
+ dnl Prerequisites of lib/quote.c.
+ dnl (none)
+])
diff --git a/ltdl/m4/quotearg.m4 b/ltdl/m4/quotearg.m4
new file mode 100755
index 00000000..f72fd621
--- /dev/null
+++ b/ltdl/m4/quotearg.m4
@@ -0,0 +1,10 @@
+# quotearg.m4 serial 8
+dnl Copyright (C) 2002, 2004-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.
+
+AC_DEFUN([gl_QUOTEARG],
+[
+ AC_LIBOBJ([quotearg])
+])
diff --git a/ltdl/m4/rawmemchr.m4 b/ltdl/m4/rawmemchr.m4
new file mode 100755
index 00000000..2a25a490
--- /dev/null
+++ b/ltdl/m4/rawmemchr.m4
@@ -0,0 +1,21 @@
+# rawmemchr.m4 serial 1
+dnl Copyright (C) 2003, 2007, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RAWMEMCHR],
+[
+ dnl Persuade glibc <string.h> to declare rawmemchr().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([rawmemchr])
+ if test $ac_cv_func_rawmemchr = no; then
+ HAVE_RAWMEMCHR=0
+ gl_PREREQ_RAWMEMCHR
+ fi
+])
+
+# Prerequisites of lib/strchrnul.c.
+AC_DEFUN([gl_PREREQ_RAWMEMCHR], [:])
diff --git a/ltdl/m4/readlink.m4 b/ltdl/m4/readlink.m4
new file mode 100755
index 00000000..36cd41f9
--- /dev/null
+++ b/ltdl/m4/readlink.m4
@@ -0,0 +1,62 @@
+# readlink.m4 serial 9
+dnl Copyright (C) 2003, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_READLINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([readlink])
+ if test $ac_cv_func_readlink = no; then
+ HAVE_READLINK=0
+ AC_LIBOBJ([readlink])
+ gl_PREREQ_READLINK
+ else
+ AC_CACHE_CHECK([whether readlink signature is correct],
+ [gl_cv_decl_readlink_works],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+ /* Cause compilation failure if original declaration has wrong type. */
+ ssize_t readlink (const char *, char *, size_t);]])],
+ [gl_cv_decl_readlink_works=yes], [gl_cv_decl_readlink_works=no])])
+ dnl Solaris 9 ignores trailing slash.
+ dnl FreeBSD 7.2 dereferences only one level of links with trailing slash.
+ AC_CACHE_CHECK([whether readlink handles trailing slash correctly],
+ [gl_cv_func_readlink_works],
+ [# We have readlink, so assume ln -s works.
+ ln -s conftest.no-such conftest.link
+ ln -s conftest.link conftest.lnk2
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[char buf[20];
+ return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;]])],
+ [gl_cv_func_readlink_works=yes], [gl_cv_func_readlink_works=no],
+ [gl_cv_func_readlink_works="guessing no"])
+ rm -f conftest.link conftest.lnk2])
+ if test "$gl_cv_func_readlink_works" != yes; then
+ AC_DEFINE([READLINK_TRAILING_SLASH_BUG], [1], [Define to 1 if readlink
+ fails to recognize a trailing slash.])
+ REPLACE_READLINK=1
+ AC_LIBOBJ([readlink])
+ elif test "$gl_cv_decl_readlink_works" != yes; then
+ REPLACE_READLINK=1
+ AC_LIBOBJ([readlink])
+ fi
+ fi
+])
+
+# Like gl_FUNC_READLINK, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_READLINK_SEPARATE],
+[
+ AC_CHECK_FUNCS_ONCE([readlink])
+ gl_PREREQ_READLINK
+])
+
+# Prerequisites of lib/readlink.c.
+AC_DEFUN([gl_PREREQ_READLINK],
+[
+ :
+])
diff --git a/ltdl/m4/regex.m4 b/ltdl/m4/regex.m4
new file mode 100755
index 00000000..6bd6b8f7
--- /dev/null
+++ b/ltdl/m4/regex.m4
@@ -0,0 +1,229 @@
+# serial 55
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006,
+# 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl Initially derived from code in GNU grep.
+dnl Mostly written by Jim Meyering.
+
+AC_PREREQ([2.50])
+
+AC_DEFUN([gl_REGEX],
+[
+ AC_CHECK_HEADERS_ONCE([locale.h])
+
+ AC_ARG_WITH([included-regex],
+ [AS_HELP_STRING([--without-included-regex],
+ [don't compile regex; this is the default on systems
+ with recent-enough versions of the GNU C Library
+ (use with caution on other systems).])])
+
+ case $with_included_regex in #(
+ yes|no) ac_use_included_regex=$with_included_regex
+ ;;
+ '')
+ # If the system regex support is good enough that it passes the
+ # following run test, then default to *not* using the included regex.c.
+ # If cross compiling, assume the test would fail and use the included
+ # regex.c.
+ AC_CACHE_CHECK([for working re_compile_pattern],
+ [gl_cv_func_re_compile_pattern_working],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [AC_INCLUDES_DEFAULT[
+ #if HAVE_LOCALE_H
+ #include <locale.h>
+ #endif
+ #include <limits.h>
+ #include <regex.h>
+ ]],
+ [[static struct re_pattern_buffer regex;
+ unsigned char folded_chars[UCHAR_MAX + 1];
+ int i;
+ const char *s;
+ struct re_registers regs;
+
+ #if HAVE_LOCALE_H
+ /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
+ This test needs valgrind to catch the bug on Debian
+ GNU/Linux 3.1 x86, but it might catch the bug better
+ on other platforms and it shouldn't hurt to try the
+ test here. */
+ if (setlocale (LC_ALL, "en_US.UTF-8"))
+ {
+ static char const pat[] = "insert into";
+ static char const data[] =
+ "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
+ re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
+ | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern (pat, sizeof pat - 1, &regex);
+ if (s)
+ return 1;
+ if (re_search (&regex, data, sizeof data - 1,
+ 0, sizeof data - 1, &regs)
+ != -1)
+ return 1;
+ if (! setlocale (LC_ALL, "C"))
+ return 1;
+ }
+ #endif
+
+ /* This test is from glibc bug 3957, reported by Andrew Mackey. */
+ re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[^x]b", 6, &regex);
+ if (s)
+ return 1;
+
+ /* This should fail, but succeeds for glibc-2.5. */
+ if (re_search (&regex, "a\nb", 3, 0, 3, &regs) != -1)
+ return 1;
+
+ /* This regular expression is from Spencer ere test number 75
+ in grep-2.3. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ for (i = 0; i <= UCHAR_MAX; i++)
+ folded_chars[i] = i;
+ regex.translate = folded_chars;
+ s = re_compile_pattern ("a[[:@:>@:]]b\n", 11, &regex);
+ /* This should fail with _Invalid character class name_ error. */
+ if (!s)
+ return 1;
+
+ /* Ensure that [b-a] is diagnosed as invalid. */
+ re_set_syntax (RE_SYNTAX_POSIX_EGREP);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("a[b-a]", 6, &regex);
+ if (s == 0)
+ return 1;
+
+ /* This should succeed, but does not for glibc-2.1.3. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("{1", 2, &regex);
+
+ if (s)
+ return 1;
+
+ /* The following example is derived from a problem report
+ against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[an\371]*n", 7, &regex);
+ if (s)
+ return 1;
+
+ /* This should match, but does not for glibc-2.2.1. */
+ if (re_match (&regex, "an", 2, 0, &regs) != 2)
+ return 1;
+
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ /* glibc-2.2.93 does not work with a negative RANGE argument. */
+ if (re_search (&regex, "wxy", 3, 2, -2, &regs) != 1)
+ return 1;
+
+ /* The version of regex.c in older versions of gnulib
+ ignored RE_ICASE. Detect that problem too. */
+ re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("x", 1, &regex);
+ if (s)
+ return 1;
+
+ if (re_search (&regex, "WXY", 3, 0, 3, &regs) < 0)
+ return 1;
+
+ /* Catch a bug reported by Vin Shelton in
+ http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
+ */
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC
+ & ~RE_CONTEXT_INVALID_DUP
+ & ~RE_NO_EMPTY_RANGES);
+ memset (&regex, 0, sizeof regex);
+ s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, &regex);
+ if (s)
+ return 1;
+
+ /* REG_STARTEND was added to glibc on 2004-01-15.
+ Reject older versions. */
+ if (! REG_STARTEND)
+ return 1;
+
+ /* Reject hosts whose regoff_t values are too narrow.
+ These include glibc 2.3.5 on hosts with 64-bit ptrdiff_t
+ and 32-bit int. */
+ if (sizeof (regoff_t) < sizeof (ptrdiff_t)
+ || sizeof (regoff_t) < sizeof (ssize_t))
+ return 1;
+
+ return 0;]])],
+ [gl_cv_func_re_compile_pattern_working=yes],
+ [gl_cv_func_re_compile_pattern_working=no],
+ dnl When crosscompiling, assume it is not working.
+ [gl_cv_func_re_compile_pattern_working=no])])
+ case $gl_cv_func_re_compile_pattern_working in #(
+ yes) ac_use_included_regex=no;; #(
+ no) ac_use_included_regex=yes;;
+ esac
+ ;;
+ *) AC_MSG_ERROR([Invalid value for --with-included-regex: $with_included_regex])
+ ;;
+ esac
+
+ if test $ac_use_included_regex = yes; then
+ AC_DEFINE([_REGEX_LARGE_OFFSETS], [1],
+ [Define if you want regoff_t to be at least as wide POSIX requires.])
+ AC_DEFINE([re_syntax_options], [rpl_re_syntax_options],
+ [Define to rpl_re_syntax_options if the replacement should be used.])
+ AC_DEFINE([re_set_syntax], [rpl_re_set_syntax],
+ [Define to rpl_re_set_syntax if the replacement should be used.])
+ AC_DEFINE([re_compile_pattern], [rpl_re_compile_pattern],
+ [Define to rpl_re_compile_pattern if the replacement should be used.])
+ AC_DEFINE([re_compile_fastmap], [rpl_re_compile_fastmap],
+ [Define to rpl_re_compile_fastmap if the replacement should be used.])
+ AC_DEFINE([re_search], [rpl_re_search],
+ [Define to rpl_re_search if the replacement should be used.])
+ AC_DEFINE([re_search_2], [rpl_re_search_2],
+ [Define to rpl_re_search_2 if the replacement should be used.])
+ AC_DEFINE([re_match], [rpl_re_match],
+ [Define to rpl_re_match if the replacement should be used.])
+ AC_DEFINE([re_match_2], [rpl_re_match_2],
+ [Define to rpl_re_match_2 if the replacement should be used.])
+ AC_DEFINE([re_set_registers], [rpl_re_set_registers],
+ [Define to rpl_re_set_registers if the replacement should be used.])
+ AC_DEFINE([re_comp], [rpl_re_comp],
+ [Define to rpl_re_comp if the replacement should be used.])
+ AC_DEFINE([re_exec], [rpl_re_exec],
+ [Define to rpl_re_exec if the replacement should be used.])
+ AC_DEFINE([regcomp], [rpl_regcomp],
+ [Define to rpl_regcomp if the replacement should be used.])
+ AC_DEFINE([regexec], [rpl_regexec],
+ [Define to rpl_regexec if the replacement should be used.])
+ AC_DEFINE([regerror], [rpl_regerror],
+ [Define to rpl_regerror if the replacement should be used.])
+ AC_DEFINE([regfree], [rpl_regfree],
+ [Define to rpl_regfree if the replacement should be used.])
+ AC_LIBOBJ([regex])
+ gl_PREREQ_REGEX
+ fi
+])
+
+# Prerequisites of lib/regex.c and lib/regex_internal.c.
+AC_DEFUN([gl_PREREQ_REGEX],
+[
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ AC_CHECK_HEADERS([libintl.h])
+ AC_CHECK_FUNCS_ONCE([isblank iswctype wcscoll])
+ AC_CHECK_DECLS([isblank], [], [], [#include <ctype.h>])
+])
diff --git a/ltdl/m4/rename.m4 b/ltdl/m4/rename.m4
new file mode 100755
index 00000000..41e70610
--- /dev/null
+++ b/ltdl/m4/rename.m4
@@ -0,0 +1,158 @@
+# serial 21
+
+# Copyright (C) 2001, 2003, 2005-2006, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Volker Borchert.
+dnl Determine whether rename works for source file names with a trailing slash.
+dnl The rename from SunOS 4.1.1_U1 doesn't.
+dnl
+dnl If it doesn't, then define RENAME_TRAILING_SLASH_BUG and arrange
+dnl to compile the wrapper function.
+dnl
+
+AC_DEFUN([gl_FUNC_RENAME],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([lstat])
+
+ dnl Solaris 10 mistakenly allows rename("file","name/").
+ dnl NetBSD 1.6 mistakenly forbids rename("dir","name/").
+ dnl FreeBSD 7.2 mistakenly allows rename("file","link-to-file/").
+ dnl The Solaris bug can be worked around without stripping
+ dnl trailing slash, while the NetBSD bug requires stripping;
+ dnl the two conditions can be distinguished by whether hard
+ dnl links are also broken.
+ AC_CACHE_CHECK([whether rename honors trailing slash on destination],
+ [gl_cv_func_rename_slash_dst_works],
+ [rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.f", "conftest.f1/") == 0) return 1;
+ if (rename ("conftest.d1", "conftest.d2/") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.f", "conftest.lnk/") == 0) return 3;
+#endif
+ ])],
+ [gl_cv_func_rename_slash_dst_works=yes],
+ [gl_cv_func_rename_slash_dst_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_slash_dst_works="guessing no"])
+ rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.lnk
+ ])
+ if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_DEST_BUG], [1],
+ [Define if rename does not correctly handle slashes on the destination
+ argument, such as on Solaris 10 or NetBSD 1.6.])
+ fi
+
+ dnl SunOS 4.1.1_U1 mistakenly forbids rename("dir/","name").
+ dnl Solaris 9 mistakenly allows rename("file/","name").
+ dnl FreeBSD 7.2 mistakenly allows rename("link-to-file/","name").
+ dnl These bugs require stripping trailing slash to avoid corrupting
+ dnl symlinks with a trailing slash.
+ AC_CACHE_CHECK([whether rename honors trailing slash on source],
+ [gl_cv_func_rename_slash_src_works],
+ [rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ touch conftest.f && mkdir conftest.d1 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.f conftest.lnk
+ fi
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.f/", "conftest.d2") == 0) return 1;
+ if (rename ("conftest.d1/", "conftest.d2") != 0) return 2;
+#if HAVE_LSTAT
+ if (rename ("conftest.lnk/", "conftest.f") == 0) return 3;
+#endif
+ ])],
+ [gl_cv_func_rename_slash_src_works=yes],
+ [gl_cv_func_rename_slash_src_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_slash_src_works="guessing no"])
+ rm -rf conftest.f conftest.d1 conftest.d2 conftest.lnk
+ ])
+ if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_TRAILING_SLASH_SOURCE_BUG], [1],
+ [Define if rename does not correctly handle slashes on the source
+ argument, such as on Solaris 9 or cygwin 1.5.])
+ fi
+
+ dnl NetBSD 1.6 and cygwin 1.5.x mistakenly reduce hard link count
+ dnl on rename("h1","h2").
+ dnl This bug requires stat'ting targets prior to attempting rename.
+ AC_CACHE_CHECK([whether rename manages hard links correctly],
+ [gl_cv_func_rename_link_works],
+ [rm -rf conftest.f conftest.f1
+ if touch conftest.f && ln conftest.f conftest.f1 &&
+ set x `ls -i conftest.f conftest.f1` && test "$2" = "$4"; then
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+# include <unistd.h>
+]], [if (rename ("conftest.f", "conftest.f1")) return 1;
+ if (unlink ("conftest.f1")) return 2;
+ if (rename ("conftest.f", "conftest.f")) return 3;
+ if (rename ("conftest.f1", "conftest.f1") == 0) return 4;])],
+ [gl_cv_func_rename_link_works=yes],
+ [gl_cv_func_rename_link_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_link_works="guessing no"])
+ else
+ gl_cv_func_rename_link_works="guessing no"
+ fi
+ rm -rf conftest.f conftest.f1
+ ])
+ if test "x$gl_cv_func_rename_link_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_HARD_LINK_BUG], [1],
+ [Define if rename fails to leave hard links alone, as on NetBSD 1.6
+ or Cygwin 1.5.])
+ fi
+
+ dnl Cygwin 1.5.x mistakenly allows rename("dir","file").
+ dnl mingw mistakenly forbids rename("dir1","dir2").
+ dnl These bugs require stripping trailing slash to avoid corrupting
+ dnl symlinks with a trailing slash.
+ AC_CACHE_CHECK([whether rename manages existing destinations correctly],
+ [gl_cv_func_rename_dest_works],
+ [rm -rf conftest.f conftest.d1 conftest.d2
+ touch conftest.f && mkdir conftest.d1 conftest.d2 ||
+ AC_MSG_ERROR([cannot create temporary files])
+ AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+# include <stdio.h>
+# include <stdlib.h>
+]], [if (rename ("conftest.d1", "conftest.d2") != 0) return 1;
+ if (rename ("conftest.d2", "conftest.f") == 0) return 2;])],
+ [gl_cv_func_rename_dest_works=yes],
+ [gl_cv_func_rename_dest_works=no],
+ dnl When crosscompiling, assume rename is broken.
+ [gl_cv_func_rename_dest_works="guessing no"])
+ rm -rf conftest.f conftest.d1 conftest.d2
+ ])
+ if test "x$gl_cv_func_rename_dest_works" != xyes; then
+ AC_LIBOBJ([rename])
+ REPLACE_RENAME=1
+ AC_DEFINE([RENAME_DEST_EXISTS_BUG], [1],
+ [Define if rename does not work when the destination file exists,
+ as on Cygwin 1.5 or Windows.])
+ fi
+])
diff --git a/ltdl/m4/rmdir.m4 b/ltdl/m4/rmdir.m4
new file mode 100755
index 00000000..8d6bee8b
--- /dev/null
+++ b/ltdl/m4/rmdir.m4
@@ -0,0 +1,44 @@
+# rmdir.m4 serial 7
+dnl Copyright (C) 2002, 2005, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_RMDIR],
+[
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ dnl FIXME: simplify this module in 2010 if no one reports a missing rmdir
+ AC_REPLACE_FUNCS([rmdir])
+ if test $ac_cv_func_rmdir = no; then
+ REPLACE_RMDIR=1
+ # If someone lacks rmdir, make configure fail, and request
+ # a bug report to inform us about it.
+ if test x"$SKIP_RMDIR_CHECK" != xyes; then
+ AC_MSG_FAILURE([Your system lacks the rmdir function.
+ Please report this, along with the output of "uname -a", to the
+ bug-coreutils@gnu.org mailing list. To continue past this point,
+ rerun configure with SKIP_RMDIR_CHECK=yes.
+ E.g., ./configure SKIP_RMDIR_CHECK=yes])
+ fi
+ else
+ dnl Detect cygwin 1.5.x bug.
+ AC_CACHE_CHECK([whether rmdir works], [gl_cv_func_rmdir_works],
+ [mkdir conftest.dir
+ touch conftest.file
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <stdio.h>
+ #include <errno.h>
+ #include <unistd.h>
+]], [[return !rmdir ("conftest.file/") || errno != ENOTDIR
+ || !rmdir ("conftest.dir/./");]])],
+ [gl_cv_func_rmdir_works=yes], [gl_cv_func_rmdir_works=no],
+ [gl_cv_func_rmdir_works="guessing no"])
+ rm -rf conftest.dir conftest.file])
+ if test x"$gl_cv_func_rmdir_works" != xyes; then
+ REPLACE_RMDIR=1
+ AC_LIBOBJ([rmdir])
+ fi
+ fi
+])
diff --git a/ltdl/m4/sched_h.m4 b/ltdl/m4/sched_h.m4
new file mode 100755
index 00000000..b137c1ce
--- /dev/null
+++ b/ltdl/m4/sched_h.m4
@@ -0,0 +1,36 @@
+# sched_h.m4 serial 2
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Written by Bruno Haible.
+
+AC_DEFUN([gl_SCHED_H],
+[
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([[
+ #include <sched.h>
+ struct sched_param a;
+ int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+ ]])],
+ [SCHED_H=''],
+ [SCHED_H='sched.h'
+
+ gl_CHECK_NEXT_HEADERS([sched.h])
+
+ AC_CHECK_HEADERS_ONCE([sched.h])
+ if test $ac_cv_header_sched_h = yes; then
+ HAVE_SCHED_H=1
+ else
+ HAVE_SCHED_H=0
+ fi
+ AC_SUBST([HAVE_SCHED_H])
+
+ AC_CHECK_TYPE([struct sched_param],
+ [HAVE_STRUCT_SCHED_PARAM=1], [HAVE_STRUCT_SCHED_PARAM=0],
+ [#include <sched.h>])
+ AC_SUBST([HAVE_STRUCT_SCHED_PARAM])
+ ])
+ AC_SUBST([SCHED_H])
+])
diff --git a/ltdl/m4/setenv.m4 b/ltdl/m4/setenv.m4
new file mode 100755
index 00000000..ae4dd863
--- /dev/null
+++ b/ltdl/m4/setenv.m4
@@ -0,0 +1,110 @@
+# setenv.m4 serial 15
+dnl Copyright (C) 2001-2004, 2006-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.
+
+AC_DEFUN([gl_FUNC_SETENV],
+[
+ AC_REQUIRE([gl_FUNC_SETENV_SEPARATE])
+ if test $HAVE_SETENV$REPLACE_SETENV != 10; then
+ AC_LIBOBJ([setenv])
+ fi
+])
+
+# Like gl_FUNC_SETENV, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_SETENV_SEPARATE],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([setenv])
+ if test $ac_cv_func_setenv = no; then
+ HAVE_SETENV=0
+ else
+ AC_CACHE_CHECK([whether setenv validates arguments],
+ [gl_cv_func_setenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ #include <errno.h>
+ ]], [[
+ if (setenv ("", "", 0) != -1) return 1;
+ if (errno != EINVAL) return 2;
+ if (setenv ("a", "=", 1) != 0) return 3;
+ if (strcmp (getenv ("a"), "=") != 0) return 4;
+ ]])],
+ [gl_cv_func_setenv_works=yes], [gl_cv_func_setenv_works=no],
+ [gl_cv_func_setenv_works="guessing no"])])
+ if test "$gl_cv_func_setenv_works" != yes; then
+ REPLACE_SETENV=1
+ AC_LIBOBJ([setenv])
+ fi
+ fi
+ gl_PREREQ_SETENV
+])
+
+AC_DEFUN([gl_FUNC_UNSETENV],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_CHECK_FUNCS([unsetenv])
+ if test $ac_cv_func_unsetenv = no; then
+ HAVE_UNSETENV=0
+ AC_LIBOBJ([unsetenv])
+ gl_PREREQ_UNSETENV
+ else
+ dnl Some BSDs return void, failing to do error checking.
+ AC_CACHE_CHECK([for unsetenv() return type], [gt_cv_func_unsetenv_ret],
+ [AC_TRY_COMPILE([#include <stdlib.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+int unsetenv (const char *name);
+#else
+int unsetenv();
+#endif
+], , gt_cv_func_unsetenv_ret='int', gt_cv_func_unsetenv_ret='void')])
+ if test $gt_cv_func_unsetenv_ret = 'void'; then
+ AC_DEFINE([VOID_UNSETENV], [1], [Define to 1 if unsetenv returns void
+ instead of int.])
+ REPLACE_UNSETENV=1
+ AC_LIBOBJ([unsetenv])
+ fi
+
+ dnl Solaris 10 unsetenv does not remove all copies of a name.
+ AC_CACHE_CHECK([whether unsetenv works on duplicates],
+ [gl_cv_func_unsetenv_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+ #include <stdlib.h>
+ ]], [[
+ char entry[] = "b=2";
+ if (putenv ((char *) "a=1")) return 1;
+ if (putenv (entry)) return 2;
+ entry[0] = 'a';
+ unsetenv ("a");
+ if (getenv ("a")) return 3;
+ ]])],
+ [gl_cv_func_unsetenv_works=yes], [gl_cv_func_unsetenv_works=no],
+ [gl_cv_func_unsetenv_works="guessing no"])])
+ if test "$gl_cv_func_unsetenv_works" != yes; then
+ REPLACE_UNSETENV=1
+ AC_LIBOBJ([unsetenv])
+ fi
+ fi
+])
+
+# Prerequisites of lib/setenv.c.
+AC_DEFUN([gl_PREREQ_SETENV],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ AC_CHECK_HEADERS([search.h])
+ AC_CHECK_FUNCS([tsearch])
+])
+
+# Prerequisites of lib/unsetenv.c.
+AC_DEFUN([gl_PREREQ_UNSETENV],
+[
+ AC_REQUIRE([gl_ENVIRON])
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+])
diff --git a/ltdl/m4/sig_atomic_t.m4 b/ltdl/m4/sig_atomic_t.m4
new file mode 100755
index 00000000..d50e427c
--- /dev/null
+++ b/ltdl/m4/sig_atomic_t.m4
@@ -0,0 +1,14 @@
+# sig_atomic_t.m4 serial 2
+dnl Copyright (C) 2003, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gt_TYPE_SIG_ATOMIC_T],
+[
+ AC_CHECK_TYPES([sig_atomic_t], ,
+ [AC_DEFINE([sig_atomic_t], [int],
+ [Define as an integer type suitable for memory locations that can be
+ accessed atomically even in the presence of asynchnonous signals.])],
+ [#include <signal.h>])
+])
diff --git a/ltdl/m4/sigaction.m4 b/ltdl/m4/sigaction.m4
new file mode 100755
index 00000000..8f0d450c
--- /dev/null
+++ b/ltdl/m4/sigaction.m4
@@ -0,0 +1,45 @@
+# sigaction.m4 serial 5
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Determine if sigaction interface is present.
+AC_DEFUN([gl_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([sigaction])
+ if test $ac_cv_func_sigaction = yes; then
+ AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , ,
+ [[#include <signal.h>]])
+ if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=0
+ fi
+ else
+ HAVE_SIGACTION=0
+ AC_LIBOBJ([sigaction])
+ gl_PREREQ_SIGACTION
+ fi
+])
+
+# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c.
+AC_DEFUN([gl_PREREQ_SIGACTION],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([AC_TYPE_UID_T])
+ AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H])
+ AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt])
+ AC_CHECK_TYPES([siginfo_t], [], [], [[
+#include <signal.h>
+ ]])
+ if test $ac_cv_type_siginfo_t = no; then
+ HAVE_SIGINFO_T=0
+ fi
+])
+
+# Prerequisites of lib/sig-handler.h.
+AC_DEFUN([gl_PREREQ_SIG_HANDLER_H],
+[
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/ltdl/m4/signal_h.m4 b/ltdl/m4/signal_h.m4
new file mode 100755
index 00000000..7f61e0b4
--- /dev/null
+++ b/ltdl/m4/signal_h.m4
@@ -0,0 +1,47 @@
+# signal_h.m4 serial 9
+dnl Copyright (C) 2007, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SIGNAL_H],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([signal.h])
+# AIX declares sig_atomic_t to already include volatile, and C89 compilers
+# then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
+ AC_CHECK_TYPE([volatile sig_atomic_t], [],
+ [HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0], [[
+#include <signal.h>
+ ]])
+ AC_REQUIRE([AC_TYPE_UID_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <signal.h>
+ ]], [sigaction sigaddset sigdelset sigemptyset sigfillset sigismember
+ sigpending sigprocmask])
+])
+
+AC_DEFUN([gl_SIGNAL_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SIGNAL_H_DEFAULTS],
+[
+ GNULIB_SIGNAL_H_SIGPIPE=0; AC_SUBST([GNULIB_SIGNAL_H_SIGPIPE])
+ GNULIB_SIGPROCMASK=0; AC_SUBST([GNULIB_SIGPROCMASK])
+ GNULIB_SIGACTION=0; AC_SUBST([GNULIB_SIGACTION])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SIGNALBLOCKING=1; AC_SUBST([HAVE_POSIX_SIGNALBLOCKING])
+ HAVE_SIGSET_T=1; AC_SUBST([HAVE_SIGSET_T])
+ HAVE_SIGINFO_T=1; AC_SUBST([HAVE_SIGINFO_T])
+ HAVE_SIGACTION=1; AC_SUBST([HAVE_SIGACTION])
+ HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
+ AC_SUBST([HAVE_STRUCT_SIGACTION_SA_SIGACTION])
+ HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
+ AC_SUBST([HAVE_TYPE_VOLATILE_SIG_ATOMIC_T])
+])
diff --git a/ltdl/m4/signalblocking.m4 b/ltdl/m4/signalblocking.m4
new file mode 100755
index 00000000..4459815a
--- /dev/null
+++ b/ltdl/m4/signalblocking.m4
@@ -0,0 +1,42 @@
+# signalblocking.m4 serial 10
+dnl Copyright (C) 2001-2002, 2006-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.
+
+# Determine available signal blocking primitives. Three different APIs exist:
+# 1) POSIX: sigemptyset, sigaddset, sigprocmask
+# 2) SYSV: sighold, sigrelse
+# 3) BSD: sigblock, sigsetmask
+# For simplicity, here we check only for the POSIX signal blocking.
+AC_DEFUN([gl_SIGNALBLOCKING],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ signals_not_posix=
+ AC_EGREP_HEADER([sigset_t], [signal.h], , [signals_not_posix=1])
+ if test -z "$signals_not_posix"; then
+ AC_CHECK_FUNC([sigprocmask], [gl_cv_func_sigprocmask=1])
+ fi
+ if test -z "$gl_cv_func_sigprocmask"; then
+ HAVE_POSIX_SIGNALBLOCKING=0
+ AC_LIBOBJ([sigprocmask])
+ gl_PREREQ_SIGPROCMASK
+ fi
+])
+
+# Prerequisites of the part of lib/signal.in.h and of lib/sigprocmask.c.
+AC_DEFUN([gl_PREREQ_SIGPROCMASK],
+[
+ AC_REQUIRE([gl_SIGNAL_H_DEFAULTS])
+ AC_CHECK_TYPES([sigset_t],
+ [gl_cv_type_sigset_t=yes], [gl_cv_type_sigset_t=no],
+ [#include <signal.h>
+/* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
+#include <sys/types.h>])
+ if test $gl_cv_type_sigset_t != yes; then
+ HAVE_SIGSET_T=0
+ fi
+ dnl HAVE_SIGSET_T is 1 if the system lacks the sigprocmask function but has
+ dnl the sigset_t type.
+ AC_SUBST([HAVE_SIGSET_T])
+])
diff --git a/ltdl/m4/signbit.m4 b/ltdl/m4/signbit.m4
new file mode 100755
index 00000000..56ff825f
--- /dev/null
+++ b/ltdl/m4/signbit.m4
@@ -0,0 +1,287 @@
+# signbit.m4 serial 6
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_SIGNBIT],
+[
+ AC_REQUIRE([gl_MATH_H_DEFAULTS])
+ AC_CACHE_CHECK([for signbit macro], [gl_cv_func_signbit],
+ [
+ AC_TRY_RUN([
+#include <math.h>
+/* If signbit is defined as a function, don't use it, since calling it for
+ 'float' or 'long double' arguments would involve conversions.
+ If signbit is not declared at all but exists as a library function, don't
+ use it, since the prototype may not match.
+ If signbit is not declared at all but exists as a compiler built-in, don't
+ use it, since it's preferable to use __builtin_signbit* (no warnings,
+ no conversions). */
+#ifndef signbit
+# error "signbit should be a macro"
+#endif
+#include <string.h>
+]gl_SIGNBIT_TEST_PROGRAM
+, [gl_cv_func_signbit=yes], [gl_cv_func_signbit=no],
+ [gl_cv_func_signbit="guessing no"])
+ ])
+ dnl GCC 4.0 and newer provides three built-ins for signbit.
+ dnl They can be used without warnings, also in C++, regardless of <math.h>.
+ dnl But they may expand to calls to functions, which may or may not be in
+ dnl libc.
+ AC_CACHE_CHECK([for signbit compiler built-ins], [gl_cv_func_signbit_gcc],
+ [
+ AC_TRY_RUN([
+#if __GNUC__ >= 4
+# define signbit(x) \
+ (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \
+ sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \
+ __builtin_signbitf (x))
+#else
+# error "signbit should be three compiler built-ins"
+#endif
+#include <string.h>
+]gl_SIGNBIT_TEST_PROGRAM
+, [gl_cv_func_signbit_gcc=yes], [gl_cv_func_signbit_gcc=no],
+ [gl_cv_func_signbit_gcc="guessing no"])
+ ])
+ dnl Use the compiler built-ins whenever possible, because they are more
+ dnl efficient than the system library functions (if they exist).
+ if test "$gl_cv_func_signbit_gcc" = yes; then
+ REPLACE_SIGNBIT_USING_GCC=1
+ else
+ if test "$gl_cv_func_signbit" != yes; then
+ REPLACE_SIGNBIT=1
+ AC_LIBOBJ([signbitf])
+ AC_LIBOBJ([signbitd])
+ AC_LIBOBJ([signbitl])
+ gl_FLOAT_SIGN_LOCATION
+ gl_DOUBLE_SIGN_LOCATION
+ gl_LONG_DOUBLE_SIGN_LOCATION
+ if test "$gl_cv_cc_float_signbit" = unknown; then
+ dnl Test whether copysignf() is declared.
+ AC_CHECK_DECLS([copysignf], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysignf" = yes; then
+ dnl Test whether copysignf() can be used without libm.
+ AC_CACHE_CHECK([whether copysignf can be used without linking with libm],
+ [gl_cv_func_copysignf_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ float x, y;],
+ [return copysignf (x, y) < 0;],
+ [gl_cv_func_copysignf_no_libm=yes],
+ [gl_cv_func_copysignf_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignf_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNF_IN_LIBC], [1],
+ [Define if the copysignf function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_double_signbit" = unknown; then
+ dnl Test whether copysign() is declared.
+ AC_CHECK_DECLS([copysign], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysign" = yes; then
+ dnl Test whether copysign() can be used without libm.
+ AC_CACHE_CHECK([whether copysign can be used without linking with libm],
+ [gl_cv_func_copysign_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ double x, y;],
+ [return copysign (x, y) < 0;],
+ [gl_cv_func_copysign_no_libm=yes],
+ [gl_cv_func_copysign_no_libm=no])
+ ])
+ if test $gl_cv_func_copysign_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGN_IN_LIBC], [1],
+ [Define if the copysign function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ if test "$gl_cv_cc_long_double_signbit" = unknown; then
+ dnl Test whether copysignl() is declared.
+ AC_CHECK_DECLS([copysignl], , , [#include <math.h>])
+ if test "$ac_cv_have_decl_copysignl" = yes; then
+ dnl Test whether copysignl() can be used without libm.
+ AC_CACHE_CHECK([whether copysignl can be used without linking with libm],
+ [gl_cv_func_copysignl_no_libm],
+ [
+ AC_TRY_LINK([#include <math.h>
+ long double x, y;],
+ [return copysignl (x, y) < 0;],
+ [gl_cv_func_copysignl_no_libm=yes],
+ [gl_cv_func_copysignl_no_libm=no])
+ ])
+ if test $gl_cv_func_copysignl_no_libm = yes; then
+ AC_DEFINE([HAVE_COPYSIGNL_IN_LIBC], [1],
+ [Define if the copysignl function is declared in <math.h> and available in libc.])
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+AC_DEFUN([gl_SIGNBIT_TEST_PROGRAM], [[
+/* Global variables.
+ Needed because GCC 4 constant-folds __builtin_signbitl (literal)
+ but cannot constant-fold __builtin_signbitl (variable). */
+float vf;
+double vd;
+long double vl;
+int main ()
+{
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -p0f and -p0d instead. */
+float p0f = 0.0f;
+float m0f = -p0f;
+double p0d = 0.0;
+double m0d = -p0d;
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use another constant expression instead.
+ But that expression does not work on other platforms, such as when
+ cross-compiling to PowerPC on MacOS X 10.5. */
+long double p0l = 0.0L;
+#if defined __hpux || defined __sgi
+long double m0l = -LDBL_MIN * LDBL_MIN;
+#else
+long double m0l = -p0l;
+#endif
+ if (signbit (vf))
+ vf++;
+ {
+ float plus_inf = 1.0f / p0f;
+ float minus_inf = -1.0f / p0f;
+ if (!(!signbit (255.0f)
+ && signbit (-255.0f)
+ && !signbit (p0f)
+ && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vd))
+ vd++;
+ {
+ double plus_inf = 1.0 / p0d;
+ double minus_inf = -1.0 / p0d;
+ if (!(!signbit (255.0)
+ && signbit (-255.0)
+ && !signbit (p0d)
+ && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ if (signbit (vl))
+ vl++;
+ {
+ long double plus_inf = 1.0L / p0l;
+ long double minus_inf = -1.0L / p0l;
+ if (!(!signbit (255.0L)
+ && signbit (-255.0L)
+ && !signbit (p0l)
+ && (memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))
+ && !signbit (plus_inf)
+ && signbit (minus_inf)))
+ return 1;
+ }
+ return 0;
+}
+]])
+
+AC_DEFUN([gl_FLOAT_SIGN_LOCATION],
+[
+ gl_FLOATTYPE_SIGN_LOCATION([float], [gl_cv_cc_float_signbit], [f], [FLT])
+])
+
+AC_DEFUN([gl_DOUBLE_SIGN_LOCATION],
+[
+ gl_FLOATTYPE_SIGN_LOCATION([double], [gl_cv_cc_double_signbit], [], [DBL])
+])
+
+AC_DEFUN([gl_LONG_DOUBLE_SIGN_LOCATION],
+[
+ gl_FLOATTYPE_SIGN_LOCATION([long double], [gl_cv_cc_long_double_signbit], [L], [LDBL])
+])
+
+AC_DEFUN([gl_FLOATTYPE_SIGN_LOCATION],
+[
+ AC_CACHE_CHECK([where to find the sign bit in a '$1'],
+ [$2],
+ [
+ AC_TRY_RUN([
+#include <stddef.h>
+#include <stdio.h>
+#define NWORDS \
+ ((sizeof ($1) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+typedef union { $1 value; unsigned int word[NWORDS]; }
+ memory_float;
+static memory_float plus = { 1.0$3 };
+static memory_float minus = { -1.0$3 };
+int main ()
+{
+ size_t j, k, i;
+ unsigned int m;
+ FILE *fp = fopen ("conftest.out", "w");
+ if (fp == NULL)
+ return 1;
+ /* Find the different bit. */
+ k = 0; m = 0;
+ for (j = 0; j < NWORDS; j++)
+ {
+ unsigned int x = plus.word[j] ^ minus.word[j];
+ if ((x & (x - 1)) || (x && m))
+ {
+ /* More than one bit difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ if (x)
+ {
+ k = j;
+ m = x;
+ }
+ }
+ if (m == 0)
+ {
+ /* No difference. */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ /* Now m = plus.word[k] ^ ~minus.word[k]. */
+ if (plus.word[k] & ~minus.word[k])
+ {
+ /* Oh? The sign bit is set in the positive and cleared in the negative
+ numbers? */
+ fprintf (fp, "unknown");
+ return 1;
+ }
+ for (i = 0; ; i++)
+ if ((m >> i) & 1)
+ break;
+ fprintf (fp, "word %d bit %d", (int) k, (int) i);
+ return (fclose (fp) != 0);
+}
+ ],
+ [$2=`cat conftest.out`],
+ [$2="unknown"],
+ [
+ dnl When cross-compiling, we don't know. It depends on the
+ dnl ABI and compiler version. There are too many cases.
+ $2="unknown"
+ ])
+ rm -f conftest.out
+ ])
+ case "$]$2[" in
+ word*bit*)
+ word=`echo "$]$2[" | sed -e 's/word //' -e 's/ bit.*//'`
+ bit=`echo "$]$2[" | sed -e 's/word.*bit //'`
+ AC_DEFINE_UNQUOTED([$4][_SIGNBIT_WORD], [$word],
+ [Define as the word index where to find the sign of '$1'.])
+ AC_DEFINE_UNQUOTED([$4][_SIGNBIT_BIT], [$bit],
+ [Define as the bit index in the word where to find the sign of '$1'.])
+ ;;
+ esac
+])
diff --git a/ltdl/m4/size_max.m4 b/ltdl/m4/size_max.m4
new file mode 100755
index 00000000..ce992db1
--- /dev/null
+++ b/ltdl/m4/size_max.m4
@@ -0,0 +1,75 @@
+# size_max.m4 serial 9
+dnl Copyright (C) 2003, 2005-2006, 2008-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 Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+ AC_CHECK_HEADERS([stdint.h])
+ dnl First test whether the system already has SIZE_MAX.
+ AC_CACHE_CHECK([for SIZE_MAX], [gl_cv_size_max], [
+ gl_cv_size_max=
+ AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], [gl_cv_size_max=yes])
+ if test -z "$gl_cv_size_max"; then
+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+ dnl than the type 'unsigned long'. Try hard to find a definition that can
+ dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+ AC_COMPUTE_INT([size_t_bits_minus_1], [sizeof (size_t) * CHAR_BIT - 1],
+ [#include <stddef.h>
+#include <limits.h>], [size_t_bits_minus_1=])
+ AC_COMPUTE_INT([fits_in_uint], [sizeof (size_t) <= sizeof (unsigned int)],
+ [#include <stddef.h>], [fits_in_uint=])
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+ AC_TRY_COMPILE([#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+ ], [], [fits_in_uint=0])
+ fi
+ dnl We cannot use 'expr' to simplify this expression, because 'expr'
+ dnl works only with 'long' integers in the host environment, while we
+ dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ dnl Shouldn't happen, but who knows...
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+ ])
+ if test "$gl_cv_size_max" != yes; then
+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+ fi
+ dnl Don't redefine SIZE_MAX in config.h if config.h is re-included after
+ dnl <stdint.h>. Remember that the #undef in AH_VERBATIM gets replaced with
+ dnl #define by AC_DEFINE_UNQUOTED.
+ AH_VERBATIM([SIZE_MAX],
+[/* Define as the maximum value of type 'size_t', if the system doesn't define
+ it. */
+#ifndef SIZE_MAX
+# undef SIZE_MAX
+#endif])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
diff --git a/ltdl/m4/size_max.m4~ b/ltdl/m4/size_max.m4~
new file mode 100644
index 00000000..bfba811e
--- /dev/null
+++ b/ltdl/m4/size_max.m4~
@@ -0,0 +1,62 @@
+# size_max.m4 serial 5
+dnl Copyright (C) 2003, 2005-2006 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 Bruno Haible.
+
+AC_DEFUN([gl_SIZE_MAX],
+[
+ AC_CHECK_HEADERS(stdint.h)
+ dnl First test whether the system already has SIZE_MAX.
+ AC_MSG_CHECKING([for SIZE_MAX])
+ AC_CACHE_VAL([gl_cv_size_max], [
+ gl_cv_size_max=
+ AC_EGREP_CPP([Found it], [
+#include <limits.h>
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef SIZE_MAX
+Found it
+#endif
+], gl_cv_size_max=yes)
+ if test -z "$gl_cv_size_max"; then
+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
+ dnl than the type 'unsigned long'. Try hard to find a definition that can
+ dnl be used in a preprocessor #if, i.e. doesn't contain a cast.
+ _AC_COMPUTE_INT([sizeof (size_t) * CHAR_BIT - 1], size_t_bits_minus_1,
+ [#include <stddef.h>
+#include <limits.h>], size_t_bits_minus_1=)
+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
+ [#include <stddef.h>], fits_in_uint=)
+ if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
+ if test $fits_in_uint = 1; then
+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
+ AC_TRY_COMPILE([#include <stddef.h>
+ extern size_t foo;
+ extern unsigned long foo;
+ ], [], fits_in_uint=0)
+ fi
+ dnl We cannot use 'expr' to simplify this expression, because 'expr'
+ dnl works only with 'long' integers in the host environment, while we
+ dnl might be cross-compiling from a 32-bit platform to a 64-bit platform.
+ if test $fits_in_uint = 1; then
+ gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ else
+ gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
+ fi
+ else
+ dnl Shouldn't happen, but who knows...
+ gl_cv_size_max='((size_t)~(size_t)0)'
+ fi
+ fi
+ ])
+ AC_MSG_RESULT([$gl_cv_size_max])
+ if test "$gl_cv_size_max" != yes; then
+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$gl_cv_size_max],
+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
+ fi
+])
diff --git a/ltdl/m4/snprintf-posix.m4 b/ltdl/m4/snprintf-posix.m4
new file mode 100755
index 00000000..77a2481c
--- /dev/null
+++ b/ltdl/m4/snprintf-posix.m4
@@ -0,0 +1,126 @@
+# snprintf-posix.m4 serial 14
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_SNPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_snprintf_posix=no
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_TRUNCATION_C99
+ gl_SNPRINTF_RETVAL_C99
+ gl_SNPRINTF_DIRECTIVE_N
+ gl_SNPRINTF_SIZE1
+ gl_VSNPRINTF_ZEROSIZE_C99
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ case "$gl_cv_func_snprintf_truncation_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_retval_c99" in
+ *yes)
+ case "$gl_cv_func_snprintf_directive_n" in
+ *yes)
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ case "$gl_cv_func_vsnprintf_zerosize_c99" in
+ *yes)
+ # snprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_snprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_SNPRINTF
+ fi
+])
diff --git a/ltdl/m4/snprintf.m4 b/ltdl/m4/snprintf.m4
new file mode 100755
index 00000000..522b107b
--- /dev/null
+++ b/ltdl/m4/snprintf.m4
@@ -0,0 +1,40 @@
+# snprintf.m4 serial 5
+dnl Copyright (C) 2002-2004, 2007-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.
+
+AC_DEFUN([gl_FUNC_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ gl_cv_func_snprintf_usable=no
+ AC_CHECK_FUNCS([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ gl_SNPRINTF_SIZE1
+ case "$gl_cv_func_snprintf_size1" in
+ *yes)
+ gl_cv_func_snprintf_usable=yes
+ ;;
+ esac
+ fi
+ if test $gl_cv_func_snprintf_usable = no; then
+ gl_REPLACE_SNPRINTF
+ fi
+ AC_CHECK_DECLS_ONCE([snprintf])
+ if test $ac_cv_have_decl_snprintf = no; then
+ HAVE_DECL_SNPRINTF=0
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_SNPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([snprintf])
+ if test $ac_cv_func_snprintf = yes; then
+ REPLACE_SNPRINTF=1
+ fi
+ gl_PREREQ_SNPRINTF
+])
+
+# Prerequisites of lib/snprintf.c.
+AC_DEFUN([gl_PREREQ_SNPRINTF], [:])
diff --git a/ltdl/m4/spawn_h.m4 b/ltdl/m4/spawn_h.m4
new file mode 100755
index 00000000..a9bd1614
--- /dev/null
+++ b/ltdl/m4/spawn_h.m4
@@ -0,0 +1,96 @@
+# spawn_h.m4 serial 6
+dnl Copyright (C) 2008-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 Written by Bruno Haible.
+
+AC_DEFUN([gl_SPAWN_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+
+ dnl <spawn.h> is always overridden, because of GNULIB_POSIXCHECK.
+ gl_CHECK_NEXT_HEADERS([spawn.h])
+
+ AC_CHECK_HEADERS_ONCE([spawn.h])
+ if test $ac_cv_header_spawn_h = yes; then
+ HAVE_SPAWN_H=1
+ AC_CHECK_TYPES([posix_spawnattr_t], [], [HAVE_POSIX_SPAWNATTR_T=0], [[
+#include <spawn.h>
+ ]])
+ AC_CHECK_TYPES([posix_spawn_file_actions_t], [],
+ [HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0], [[
+#include <spawn.h>
+ ]])
+ else
+ HAVE_SPAWN_H=0
+ HAVE_POSIX_SPAWNATTR_T=0
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0
+ gl_REPLACE_SPAWN_H
+ fi
+ AC_SUBST([HAVE_SPAWN_H])
+
+ AC_REQUIRE([AC_C_RESTRICT])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <spawn.h>
+ ]], [posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy
+ posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault
+ posix_spawnattr_getsigmask posix_spawnattr_setsigmask
+ posix_spawnattr_getflags posix_spawnattr_setflags
+ posix_spawnattr_getpgroup posix_spawnattr_setpgroup
+ posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy
+ posix_spawnattr_getschedparam posix_spawnattr_setschedparam
+ posix_spawn_file_actions_init posix_spawn_file_actions_destroy
+ posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose
+ posix_spawwn_file_actions_adddup2])
+])
+
+dnl Unconditionally enables the replacement of <spawn.h>.
+AC_DEFUN([gl_REPLACE_SPAWN_H],
+[
+ dnl This is a no-op, because <spawn.h> is always overridden.
+ :
+])
+
+AC_DEFUN([gl_SPAWN_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SPAWN_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SPAWN_H_DEFAULTS],
+[
+ GNULIB_POSIX_SPAWN=0; AC_SUBST([GNULIB_POSIX_SPAWN])
+ GNULIB_POSIX_SPAWNP=0; AC_SUBST([GNULIB_POSIX_SPAWNP])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN])
+ GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0; AC_SUBST([GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY])
+ GNULIB_POSIX_SPAWNATTR_INIT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_INIT])
+ GNULIB_POSIX_SPAWNATTR_GETFLAGS=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETFLAGS])
+ GNULIB_POSIX_SPAWNATTR_SETFLAGS=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETFLAGS])
+ GNULIB_POSIX_SPAWNATTR_GETPGROUP=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETPGROUP])
+ GNULIB_POSIX_SPAWNATTR_SETPGROUP=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETPGROUP])
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM])
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM])
+ GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY])
+ GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY])
+ GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT])
+ GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT])
+ GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_GETSIGMASK])
+ GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_SETSIGMASK])
+ GNULIB_POSIX_SPAWNATTR_DESTROY=0; AC_SUBST([GNULIB_POSIX_SPAWNATTR_DESTROY])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_POSIX_SPAWN=1; AC_SUBST([HAVE_POSIX_SPAWN])
+ HAVE_POSIX_SPAWNATTR_T=1; AC_SUBST([HAVE_POSIX_SPAWNATTR_T])
+ HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1;
+ AC_SUBST([HAVE_POSIX_SPAWN_FILE_ACTIONS_T])
+ REPLACE_POSIX_SPAWN=0; AC_SUBST([REPLACE_POSIX_SPAWN])
+])
diff --git a/ltdl/m4/sprintf-posix.m4 b/ltdl/m4/sprintf-posix.m4
new file mode 100755
index 00000000..08d0810b
--- /dev/null
+++ b/ltdl/m4/sprintf-posix.m4
@@ -0,0 +1,108 @@
+# sprintf-posix.m4 serial 12
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_SPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_sprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # sprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_sprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_sprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_SPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_SPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([sprintf])
+ REPLACE_SPRINTF=1
+ gl_PREREQ_SPRINTF
+])
+
+AC_DEFUN([gl_PREREQ_SPRINTF], [:])
diff --git a/ltdl/m4/ssize_t.m4 b/ltdl/m4/ssize_t.m4
new file mode 100755
index 00000000..e0ccee3a
--- /dev/null
+++ b/ltdl/m4/ssize_t.m4
@@ -0,0 +1,21 @@
+# ssize_t.m4 serial 4 (gettext-0.15)
+dnl Copyright (C) 2001-2003, 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+dnl Test whether ssize_t is defined.
+
+AC_DEFUN([gt_TYPE_SSIZE_T],
+[
+ AC_CACHE_CHECK([for ssize_t], [gt_cv_ssize_t],
+ [AC_TRY_COMPILE([#include <sys/types.h>],
+ [int x = sizeof (ssize_t *) + sizeof (ssize_t);
+ return !x;],
+ [gt_cv_ssize_t=yes], [gt_cv_ssize_t=no])])
+ if test $gt_cv_ssize_t = no; then
+ AC_DEFINE([ssize_t], [int],
+ [Define as a signed type of the same size as size_t.])
+ fi
+])
diff --git a/ltdl/m4/stat.m4 b/ltdl/m4/stat.m4
new file mode 100755
index 00000000..acd32d86
--- /dev/null
+++ b/ltdl/m4/stat.m4
@@ -0,0 +1,63 @@
+# serial 4
+
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STAT],
+[
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_AC_DOS])
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([lstat])
+ dnl mingw is the only known platform where stat(".") and stat("./") differ
+ AC_CACHE_CHECK([whether stat handles trailing slashes on directories],
+ [gl_cv_func_stat_dir_slash],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
+]], [[struct stat st; return stat (".", &st) != stat ("./", &st);]])],
+ [gl_cv_func_stat_dir_slash=yes], [gl_cv_func_stat_dir_slash=no],
+ [case $host_os in
+ mingw*) gl_cv_func_stat_dir_slash="guessing no";;
+ *) gl_cv_func_stat_dir_slash="guessing yes";;
+ esac])])
+ dnl Solaris 9 mistakenly succeeds on stat("file/")
+ dnl FreeBSD 7.2 mistakenly succeeds on stat("link-to-file/")
+ AC_CACHE_CHECK([whether stat handles trailing slashes on files],
+ [gl_cv_func_stat_file_slash],
+ [touch conftest.tmp
+ # Assume that if we have lstat, we can also check symlinks.
+ if test $ac_cv_func_lstat = yes; then
+ ln -s conftest.tmp conftest.lnk
+ fi
+ AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/stat.h>
+]], [[struct stat st;
+ if (!stat ("conftest.tmp/", &st)) return 1;
+#if HAVE_LSTAT
+ if (!stat ("conftest.lnk/", &st)) return 2;
+#endif
+ ]])],
+ [gl_cv_func_stat_file_slash=yes], [gl_cv_func_stat_file_slash=no],
+ [gl_cv_func_stat_file_slash="guessing no"])
+ rm -f conftest.tmp conftest.lnk])
+ case $gl_cv_func_stat_dir_slash in
+ *no) REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_DIR], [1], [Define to 1 if stat needs
+ help when passed a directory name with a trailing slash]);;
+ esac
+ case $gl_cv_func_stat_file_slash in
+ *no) REPLACE_STAT=1
+ AC_DEFINE([REPLACE_FUNC_STAT_FILE], [1], [Define to 1 if stat needs
+ help when passed a file name with a trailing slash]);;
+ esac
+ if test $REPLACE_STAT = 1; then
+ AC_LIBOBJ([stat])
+ dnl Prerequisites of lib/stat.c.
+ AC_REQUIRE([AC_C_INLINE])
+ fi
+])
diff --git a/ltdl/m4/stdarg.m4 b/ltdl/m4/stdarg.m4
new file mode 100755
index 00000000..5c87bd8b
--- /dev/null
+++ b/ltdl/m4/stdarg.m4
@@ -0,0 +1,67 @@
+# stdarg.m4 serial 3
+dnl Copyright (C) 2006, 2008-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 Bruno Haible.
+dnl Provide a working va_copy in combination with <stdarg.h>.
+
+AC_DEFUN([gl_STDARG_H],
+[
+ STDARG_H=''; AC_SUBST([STDARG_H])
+ NEXT_STDARG_H='<stdarg.h>'; AC_SUBST([NEXT_STDARG_H])
+ AC_MSG_CHECKING([for va_copy])
+ AC_CACHE_VAL([gl_cv_func_va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef va_copy
+void (*func) (va_list, va_list) = va_copy;
+#endif
+],
+ [gl_cv_func_va_copy=yes], [gl_cv_func_va_copy=no])])
+ AC_MSG_RESULT([$gl_cv_func_va_copy])
+ if test $gl_cv_func_va_copy = no; then
+ dnl Provide a substitute.
+ dnl Usually a simple definition in <config.h> is enough. Not so on AIX 5
+ dnl with some versions of the /usr/vac/bin/cc compiler. It has an <stdarg.h>
+ dnl which does '#undef va_copy', leading to a missing va_copy symbol. For
+ dnl this platform, we use an <stdarg.h> substitute. But we cannot use this
+ dnl approach on other platforms, because <stdarg.h> often defines only
+ dnl preprocessor macros and gl_ABSOLUTE_HEADER, gl_CHECK_NEXT_HEADERS do
+ dnl not work in this situation.
+ AC_EGREP_CPP([vaccine],
+ [#if defined _AIX && !defined __GNUC__
+ AIX vaccine
+ #endif
+ ], [gl_aixcc=yes], [gl_aixcc=no])
+ if test $gl_aixcc = yes; then
+ dnl Provide a substitute <stdarg.h> file.
+ STDARG_H=stdarg.h
+ gl_CHECK_NEXT_HEADERS([stdarg.h])
+ dnl Fallback for the case when <stdarg.h> contains only macro definitions.
+ if test "$gl_cv_next_stdarg_h" = '""'; then
+ gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
+ NEXT_STDARG_H="$gl_cv_next_stdarg_h"
+ fi
+ else
+ dnl Provide a substitute in <config.h>, either __va_copy or as a simple
+ dnl assignment.
+ gl_CACHE_VAL_SILENT([gl_cv_func___va_copy], [
+ AC_TRY_COMPILE([#include <stdarg.h>], [
+#ifndef __va_copy
+error, bail out
+#endif
+],
+ [gl_cv_func___va_copy=yes], [gl_cv_func___va_copy=no])])
+ if test $gl_cv_func___va_copy = yes; then
+ AC_DEFINE([va_copy], [__va_copy],
+ [Define as a macro for copying va_list variables.])
+ else
+ AH_VERBATIM([gl_VA_COPY], [/* A replacement for va_copy, if needed. */
+#define gl_va_copy(a,b) ((a) = (b))])
+ AC_DEFINE([va_copy], [gl_va_copy],
+ [Define as a macro for copying va_list variables.])
+ fi
+ fi
+ fi
+])
diff --git a/ltdl/m4/stdbool.m4 b/ltdl/m4/stdbool.m4
new file mode 100755
index 00000000..3d672d74
--- /dev/null
+++ b/ltdl/m4/stdbool.m4
@@ -0,0 +1,115 @@
+# Check for stdbool.h that conforms to C99.
+
+dnl Copyright (C) 2002-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prepare for substituting <stdbool.h> if it is not supported.
+
+AC_DEFUN([AM_STDBOOL_H],
+[
+ AC_REQUIRE([AC_HEADER_STDBOOL])
+
+ # Define two additional variables used in the Makefile substitution.
+
+ if test "$ac_cv_header_stdbool_h" = yes; then
+ STDBOOL_H=''
+ else
+ STDBOOL_H='stdbool.h'
+ fi
+ AC_SUBST([STDBOOL_H])
+
+ if test "$ac_cv_type__Bool" = yes; then
+ HAVE__BOOL=1
+ else
+ HAVE__BOOL=0
+ fi
+ AC_SUBST([HAVE__BOOL])
+])
+
+# AM_STDBOOL_H will be renamed to gl_STDBOOL_H in the future.
+AC_DEFUN([gl_STDBOOL_H], [AM_STDBOOL_H])
+
+# This macro is only needed in autoconf <= 2.59. Newer versions of autoconf
+# have this macro built-in.
+
+AC_DEFUN([AC_HEADER_STDBOOL],
+ [AC_CACHE_CHECK([for stdbool.h that conforms to C99],
+ [ac_cv_header_stdbool_h],
+ [AC_TRY_COMPILE(
+ [
+ #include <stdbool.h>
+ #ifndef bool
+ "error: bool is not defined"
+ #endif
+ #ifndef false
+ "error: false is not defined"
+ #endif
+ #if false
+ "error: false is not 0"
+ #endif
+ #ifndef true
+ "error: true is not defined"
+ #endif
+ #if true != 1
+ "error: true is not 1"
+ #endif
+ #ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+ #endif
+
+ struct s { _Bool s: 1; _Bool t; } s;
+
+ char a[true == 1 ? 1 : -1];
+ char b[false == 0 ? 1 : -1];
+ char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+ char d[(bool) 0.5 == true ? 1 : -1];
+ bool e = &s;
+ char f[(_Bool) 0.0 == false ? 1 : -1];
+ char g[true];
+ char h[sizeof (_Bool)];
+ char i[sizeof s.t];
+ enum { j = false, k = true, l = false * true, m = true * 256 };
+ _Bool n[m];
+ char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+ char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+ #if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+ #endif
+ /* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+ _Bool q = true;
+ _Bool *pq = &q;
+ ],
+ [
+ *pq |= q;
+ *pq |= ! q;
+ /* Refer to every declared value, to avoid compiler optimizations. */
+ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
+ + !m + !n + !o + !p + !q + !pq);
+ ],
+ [ac_cv_header_stdbool_h=yes],
+ [ac_cv_header_stdbool_h=no])])
+ AC_CHECK_TYPES([_Bool])
+ if test $ac_cv_header_stdbool_h = yes; then
+ AC_DEFINE([HAVE_STDBOOL_H], [1], [Define to 1 if stdbool.h conforms to C99.])
+ fi])
diff --git a/ltdl/m4/stddef_h.m4 b/ltdl/m4/stddef_h.m4
new file mode 100755
index 00000000..c8572de9
--- /dev/null
+++ b/ltdl/m4/stddef_h.m4
@@ -0,0 +1,45 @@
+dnl A placeholder for POSIX 2008 <stddef.h>, for platforms that have issues.
+# stddef_h.m4 serial 1
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDDEF_H],
+[
+ AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ if test $gt_cv_c_wchar_t = no; then
+ HAVE_WCHAR_T=0
+ STDDEF_H=stddef.h
+ fi
+ AC_CACHE_CHECK([whether NULL can be used in arbitrary expressions],
+ [gl_cv_decl_null_works],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stddef.h>
+ int test[2 * (sizeof NULL == sizeof (void *)) -1];
+]])],
+ [gl_cv_decl_null_works=yes],
+ [gl_cv_decl_null_works=no])])
+ if test $gl_cv_decl_null_works = no; then
+ REPLACE_NULL=1
+ STDDEF_H=stddef.h
+ fi
+ if test -n "$STDDEF_H"; then
+ gl_CHECK_NEXT_HEADERS([stddef.h])
+ fi
+])
+
+AC_DEFUN([gl_STDDEF_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDDEF_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDDEF_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ REPLACE_NULL=0; AC_SUBST([REPLACE_NULL])
+ HAVE_WCHAR_T=1; AC_SUBST([HAVE_WCHAR_T])
+ STDDEF_H=''; AC_SUBST([STDDEF_H])
+])
diff --git a/ltdl/m4/stdint.m4 b/ltdl/m4/stdint.m4
new file mode 100755
index 00000000..1cc57e6e
--- /dev/null
+++ b/ltdl/m4/stdint.m4
@@ -0,0 +1,472 @@
+# stdint.m4 serial 34
+dnl Copyright (C) 2001-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 Paul Eggert and Bruno Haible.
+dnl Test whether <stdint.h> is supported or must be substituted.
+
+AC_DEFUN([gl_STDINT_H],
+[
+ AC_PREREQ([2.59])dnl
+
+ dnl Check for long long int and unsigned long long int.
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ if test $ac_cv_type_long_long_int = yes; then
+ HAVE_LONG_LONG_INT=1
+ else
+ HAVE_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_LONG_LONG_INT])
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ HAVE_UNSIGNED_LONG_LONG_INT=1
+ else
+ HAVE_UNSIGNED_LONG_LONG_INT=0
+ fi
+ AC_SUBST([HAVE_UNSIGNED_LONG_LONG_INT])
+
+ dnl Check for <inttypes.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_inttypes_h.
+ if test $ac_cv_header_inttypes_h = yes; then
+ HAVE_INTTYPES_H=1
+ else
+ HAVE_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_INTTYPES_H])
+
+ dnl Check for <sys/types.h>.
+ dnl AC_INCLUDES_DEFAULT defines $ac_cv_header_sys_types_h.
+ if test $ac_cv_header_sys_types_h = yes; then
+ HAVE_SYS_TYPES_H=1
+ else
+ HAVE_SYS_TYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_TYPES_H])
+
+ gl_CHECK_NEXT_HEADERS([stdint.h])
+ if test $ac_cv_header_stdint_h = yes; then
+ HAVE_STDINT_H=1
+ else
+ HAVE_STDINT_H=0
+ fi
+ AC_SUBST([HAVE_STDINT_H])
+
+ dnl Now see whether we need a substitute <stdint.h>.
+ if test $ac_cv_header_stdint_h = yes; then
+ AC_CACHE_CHECK([whether stdint.h conforms to C99],
+ [gl_cv_header_working_stdint_h],
+ [gl_cv_header_working_stdint_h=no
+ AC_COMPILE_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
+#if !(defined WCHAR_MIN && defined WCHAR_MAX)
+#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
+#endif
+]
+gl_STDINT_INCLUDES
+[
+#ifdef INT8_MAX
+int8_t a1 = INT8_MAX;
+int8_t a1min = INT8_MIN;
+#endif
+#ifdef INT16_MAX
+int16_t a2 = INT16_MAX;
+int16_t a2min = INT16_MIN;
+#endif
+#ifdef INT32_MAX
+int32_t a3 = INT32_MAX;
+int32_t a3min = INT32_MIN;
+#endif
+#ifdef INT64_MAX
+int64_t a4 = INT64_MAX;
+int64_t a4min = INT64_MIN;
+#endif
+#ifdef UINT8_MAX
+uint8_t b1 = UINT8_MAX;
+#else
+typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
+#endif
+#ifdef UINT16_MAX
+uint16_t b2 = UINT16_MAX;
+#endif
+#ifdef UINT32_MAX
+uint32_t b3 = UINT32_MAX;
+#endif
+#ifdef UINT64_MAX
+uint64_t b4 = UINT64_MAX;
+#endif
+int_least8_t c1 = INT8_C (0x7f);
+int_least8_t c1max = INT_LEAST8_MAX;
+int_least8_t c1min = INT_LEAST8_MIN;
+int_least16_t c2 = INT16_C (0x7fff);
+int_least16_t c2max = INT_LEAST16_MAX;
+int_least16_t c2min = INT_LEAST16_MIN;
+int_least32_t c3 = INT32_C (0x7fffffff);
+int_least32_t c3max = INT_LEAST32_MAX;
+int_least32_t c3min = INT_LEAST32_MIN;
+int_least64_t c4 = INT64_C (0x7fffffffffffffff);
+int_least64_t c4max = INT_LEAST64_MAX;
+int_least64_t c4min = INT_LEAST64_MIN;
+uint_least8_t d1 = UINT8_C (0xff);
+uint_least8_t d1max = UINT_LEAST8_MAX;
+uint_least16_t d2 = UINT16_C (0xffff);
+uint_least16_t d2max = UINT_LEAST16_MAX;
+uint_least32_t d3 = UINT32_C (0xffffffff);
+uint_least32_t d3max = UINT_LEAST32_MAX;
+uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
+uint_least64_t d4max = UINT_LEAST64_MAX;
+int_fast8_t e1 = INT_FAST8_MAX;
+int_fast8_t e1min = INT_FAST8_MIN;
+int_fast16_t e2 = INT_FAST16_MAX;
+int_fast16_t e2min = INT_FAST16_MIN;
+int_fast32_t e3 = INT_FAST32_MAX;
+int_fast32_t e3min = INT_FAST32_MIN;
+int_fast64_t e4 = INT_FAST64_MAX;
+int_fast64_t e4min = INT_FAST64_MIN;
+uint_fast8_t f1 = UINT_FAST8_MAX;
+uint_fast16_t f2 = UINT_FAST16_MAX;
+uint_fast32_t f3 = UINT_FAST32_MAX;
+uint_fast64_t f4 = UINT_FAST64_MAX;
+#ifdef INTPTR_MAX
+intptr_t g = INTPTR_MAX;
+intptr_t gmin = INTPTR_MIN;
+#endif
+#ifdef UINTPTR_MAX
+uintptr_t h = UINTPTR_MAX;
+#endif
+intmax_t i = INTMAX_MAX;
+uintmax_t j = UINTMAX_MAX;
+
+#include <limits.h> /* for CHAR_BIT */
+#define TYPE_MINIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ (t) 0 << (sizeof (t) * CHAR_BIT - 1)))
+#define TYPE_MAXIMUM(t) \
+ ((t) ((t) 0 < (t) -1 ? (t) -1 : ~ (~ (t) 0 << (sizeof (t) * CHAR_BIT - 1))))
+struct s {
+ int check_PTRDIFF:
+ PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
+ && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
+ ? 1 : -1;
+ /* Detect bug in FreeBSD 6.0 / ia64. */
+ int check_SIG_ATOMIC:
+ SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
+ && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
+ ? 1 : -1;
+ int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
+ int check_WCHAR:
+ WCHAR_MIN == TYPE_MINIMUM (wchar_t)
+ && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
+ ? 1 : -1;
+ /* Detect bug in mingw. */
+ int check_WINT:
+ WINT_MIN == TYPE_MINIMUM (wint_t)
+ && WINT_MAX == TYPE_MAXIMUM (wint_t)
+ ? 1 : -1;
+
+ /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
+ int check_UINT8_C:
+ (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
+ int check_UINT16_C:
+ (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
+
+ /* Detect bugs in OpenBSD 3.9 stdint.h. */
+#ifdef UINT8_MAX
+ int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
+#endif
+#ifdef UINT16_MAX
+ int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
+#endif
+#ifdef UINT32_MAX
+ int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
+#endif
+#ifdef UINT64_MAX
+ int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
+#endif
+ int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
+ int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
+ int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
+ int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
+ int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
+ int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
+ int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
+ int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
+ int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
+ int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
+ int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
+};
+ ]])],
+ [dnl Determine whether the various *_MIN, *_MAX macros are usable
+ dnl in preprocessor expression. We could do it by compiling a test
+ dnl program for each of these macros. It is faster to run a program
+ dnl that inspects the macro expansion.
+ dnl This detects a bug on HP-UX 11.23/ia64.
+ AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
+#include <stdint.h>
+]
+gl_STDINT_INCLUDES
+[
+#include <stdio.h>
+#include <string.h>
+#define MVAL(macro) MVAL1(macro)
+#define MVAL1(expression) #expression
+static const char *macro_values[] =
+ {
+#ifdef INT8_MAX
+ MVAL (INT8_MAX),
+#endif
+#ifdef INT16_MAX
+ MVAL (INT16_MAX),
+#endif
+#ifdef INT32_MAX
+ MVAL (INT32_MAX),
+#endif
+#ifdef INT64_MAX
+ MVAL (INT64_MAX),
+#endif
+#ifdef UINT8_MAX
+ MVAL (UINT8_MAX),
+#endif
+#ifdef UINT16_MAX
+ MVAL (UINT16_MAX),
+#endif
+#ifdef UINT32_MAX
+ MVAL (UINT32_MAX),
+#endif
+#ifdef UINT64_MAX
+ MVAL (UINT64_MAX),
+#endif
+ NULL
+ };
+]], [[
+ const char **mv;
+ for (mv = macro_values; *mv != NULL; mv++)
+ {
+ const char *value = *mv;
+ /* Test whether it looks like a cast expression. */
+ if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
+ || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
+ || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
+ || strncmp (value, "((int)"/*)*/, 6) == 0
+ || strncmp (value, "((signed short)"/*)*/, 15) == 0
+ || strncmp (value, "((signed char)"/*)*/, 14) == 0)
+ return 1;
+ }
+ return 0;
+]])],
+ [gl_cv_header_working_stdint_h=yes],
+ [],
+ [dnl When cross-compiling, assume it works.
+ gl_cv_header_working_stdint_h=yes
+ ])
+ ])
+ ])
+ fi
+ if test "$gl_cv_header_working_stdint_h" = yes; then
+ STDINT_H=
+ else
+ dnl Check for <sys/inttypes.h>, and for
+ dnl <sys/bitypes.h> (used in Linux libc4 >= 4.6.7 and libc5).
+ AC_CHECK_HEADERS([sys/inttypes.h sys/bitypes.h])
+ if test $ac_cv_header_sys_inttypes_h = yes; then
+ HAVE_SYS_INTTYPES_H=1
+ else
+ HAVE_SYS_INTTYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_INTTYPES_H])
+ if test $ac_cv_header_sys_bitypes_h = yes; then
+ HAVE_SYS_BITYPES_H=1
+ else
+ HAVE_SYS_BITYPES_H=0
+ fi
+ AC_SUBST([HAVE_SYS_BITYPES_H])
+
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+
+ gl_STDINT_TYPE_PROPERTIES
+ STDINT_H=stdint.h
+ fi
+ AC_SUBST([STDINT_H])
+])
+
+dnl gl_STDINT_BITSIZEOF(TYPES, INCLUDES)
+dnl Determine the size of each of the given types in bits.
+AC_DEFUN([gl_STDINT_BITSIZEOF],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to the number of bits in type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for bit size of $gltype], [gl_cv_bitsizeof_${gltype}],
+ [AC_COMPUTE_INT([result], [sizeof ($gltype) * CHAR_BIT],
+ [$2
+#include <limits.h>], [result=unknown])
+ eval gl_cv_bitsizeof_${gltype}=\$result
+ ])
+ eval result=\$gl_cv_bitsizeof_${gltype}
+ if test $result = unknown; then
+ dnl Use a nonempty default, because some compilers, such as IRIX 5 cc,
+ dnl do a syntax check even on unused #if conditions and give an error
+ dnl on valid C code like this:
+ dnl #if 0
+ dnl # if > 32
+ dnl # endif
+ dnl #endif
+ result=0
+ fi
+ GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ AC_DEFINE_UNQUOTED([BITSIZEOF_${GLTYPE}], [$result])
+ eval BITSIZEOF_${GLTYPE}=\$result
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([BITSIZEOF_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_CHECK_TYPES_SIGNED(TYPES, INCLUDES)
+dnl Determine the signedness of each of the given types.
+dnl Define HAVE_SIGNED_TYPE if type is signed.
+AC_DEFUN([gl_CHECK_TYPES_SIGNED],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]),
+ [Define to 1 if ']gltype[' is a signed integer type.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([whether $gltype is signed], [gl_cv_type_${gltype}_signed],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];]])],
+ result=yes, result=no)
+ eval gl_cv_type_${gltype}_signed=\$result
+ ])
+ eval result=\$gl_cv_type_${gltype}_signed
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ if test "$result" = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_SIGNED_${GLTYPE}], [1])
+ eval HAVE_SIGNED_${GLTYPE}=1
+ else
+ eval HAVE_SIGNED_${GLTYPE}=0
+ fi
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST([HAVE_SIGNED_]translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_]))])
+])
+
+dnl gl_INTEGER_TYPE_SUFFIX(TYPES, INCLUDES)
+dnl Determine the suffix to use for integer constants of the given types.
+dnl Define t_SUFFIX for each such type.
+AC_DEFUN([gl_INTEGER_TYPE_SUFFIX],
+[
+ dnl Use a shell loop, to avoid bloating configure, and
+ dnl - extra AH_TEMPLATE calls, so that autoheader knows what to put into
+ dnl config.h.in,
+ dnl - extra AC_SUBST calls, so that the right substitutions are made.
+ m4_foreach_w([gltype], [$1],
+ [AH_TEMPLATE(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX],
+ [Define to l, ll, u, ul, ull, etc., as suitable for
+ constants of type ']gltype['.])])
+ for gltype in $1 ; do
+ AC_CACHE_CHECK([for $gltype integer literal suffix],
+ [gl_cv_type_${gltype}_suffix],
+ [eval gl_cv_type_${gltype}_suffix=no
+ eval result=\$gl_cv_type_${gltype}_signed
+ if test "$result" = yes; then
+ glsufu=
+ else
+ glsufu=u
+ fi
+ for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
+ case $glsuf in
+ '') gltype1='int';;
+ l) gltype1='long int';;
+ ll) gltype1='long long int';;
+ i64) gltype1='__int64';;
+ u) gltype1='unsigned int';;
+ ul) gltype1='unsigned long int';;
+ ull) gltype1='unsigned long long int';;
+ ui64)gltype1='unsigned __int64';;
+ esac
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM([$2[
+ extern $gltype foo;
+ extern $gltype1 foo;]])],
+ [eval gl_cv_type_${gltype}_suffix=\$glsuf])
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" != no && break
+ done])
+ GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
+ eval result=\$gl_cv_type_${gltype}_suffix
+ test "$result" = no && result=
+ eval ${GLTYPE}_SUFFIX=\$result
+ AC_DEFINE_UNQUOTED([${GLTYPE}_SUFFIX], [$result])
+ done
+ m4_foreach_w([gltype], [$1],
+ [AC_SUBST(translit(gltype,[abcdefghijklmnopqrstuvwxyz ],[ABCDEFGHIJKLMNOPQRSTUVWXYZ_])[_SUFFIX])])
+])
+
+dnl gl_STDINT_INCLUDES
+AC_DEFUN([gl_STDINT_INCLUDES],
+[[
+ /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
+ included before <wchar.h>. */
+ #include <stddef.h>
+ #include <signal.h>
+ #if HAVE_WCHAR_H
+ # include <stdio.h>
+ # include <time.h>
+ # include <wchar.h>
+ #endif
+]])
+
+dnl gl_STDINT_TYPE_PROPERTIES
+dnl Compute HAVE_SIGNED_t, BITSIZEOF_t and t_SUFFIX, for all the types t
+dnl of interest to stdint.in.h.
+AC_DEFUN([gl_STDINT_TYPE_PROPERTIES],
+[
+ AC_REQUIRE([gl_MULTIARCH])
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_STDINT_BITSIZEOF([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_STDINT_BITSIZEOF([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_CHECK_TYPES_SIGNED([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+ gl_cv_type_ptrdiff_t_signed=yes
+ gl_cv_type_size_t_signed=no
+ if test $APPLE_UNIVERSAL_BUILD = 0; then
+ gl_INTEGER_TYPE_SUFFIX([ptrdiff_t size_t],
+ [gl_STDINT_INCLUDES])
+ fi
+ gl_INTEGER_TYPE_SUFFIX([sig_atomic_t wchar_t wint_t],
+ [gl_STDINT_INCLUDES])
+])
+
+dnl Autoconf >= 2.61 has AC_COMPUTE_INT built-in.
+dnl Remove this when we can assume autoconf >= 2.61.
+m4_ifdef([AC_COMPUTE_INT], [], [
+ AC_DEFUN([AC_COMPUTE_INT], [_AC_COMPUTE_INT([$2],[$1],[$3],[$4])])
+])
+
+# Hey Emacs!
+# Local Variables:
+# indent-tabs-mode: nil
+# End:
diff --git a/ltdl/m4/stdint_h.m4 b/ltdl/m4/stdint_h.m4
new file mode 100755
index 00000000..b8e3c6cc
--- /dev/null
+++ b/ltdl/m4/stdint_h.m4
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 8
+dnl Copyright (C) 1997-2004, 2006, 2008-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 Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], [gl_cv_header_stdint_h],
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ [gl_cv_header_stdint_h=yes],
+ [gl_cv_header_stdint_h=no])])
+ if test $gl_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED([HAVE_STDINT_H_WITH_UINTMAX], [1],
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/ltdl/m4/stdint_h.m4~ b/ltdl/m4/stdint_h.m4~
new file mode 100644
index 00000000..db9a8ac4
--- /dev/null
+++ b/ltdl/m4/stdint_h.m4~
@@ -0,0 +1,26 @@
+# stdint_h.m4 serial 6
+dnl Copyright (C) 1997-2004, 2006 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 Paul Eggert.
+
+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
+# doesn't clash with <sys/types.h>, and declares uintmax_t.
+
+AC_DEFUN([gl_AC_HEADER_STDINT_H],
+[
+ AC_CACHE_CHECK([for stdint.h], gl_cv_header_stdint_h,
+ [AC_TRY_COMPILE(
+ [#include <sys/types.h>
+#include <stdint.h>],
+ [uintmax_t i = (uintmax_t) -1; return !i;],
+ gl_cv_header_stdint_h=yes,
+ gl_cv_header_stdint_h=no)])
+ if test $gl_cv_header_stdint_h = yes; then
+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
+ and declares uintmax_t. ])
+ fi
+])
diff --git a/ltdl/m4/stdio-safer.m4 b/ltdl/m4/stdio-safer.m4
new file mode 100755
index 00000000..cecc14a5
--- /dev/null
+++ b/ltdl/m4/stdio-safer.m4
@@ -0,0 +1,25 @@
+#serial 12
+dnl Copyright (C) 2002, 2005-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FOPEN_SAFER],
+[
+ AC_LIBOBJ([fopen-safer])
+])
+
+AC_DEFUN([gl_FREOPEN_SAFER],
+[
+ AC_LIBOBJ([freopen-safer])
+])
+
+AC_DEFUN([gl_POPEN_SAFER],
+[
+ AC_LIBOBJ([popen-safer])
+])
+
+AC_DEFUN([gl_TMPFILE_SAFER],
+[
+ AC_LIBOBJ([tmpfile-safer])
+])
diff --git a/ltdl/m4/stdio_h.m4 b/ltdl/m4/stdio_h.m4
new file mode 100755
index 00000000..781fa8d3
--- /dev/null
+++ b/ltdl/m4/stdio_h.m4
@@ -0,0 +1,152 @@
+# stdio_h.m4 serial 25
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_STDIO_H],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
+ gl_CHECK_NEXT_HEADERS([stdio.h])
+ dnl No need to create extra modules for these functions. Everyone who uses
+ dnl <stdio.h> likely needs them.
+ GNULIB_FPRINTF=1
+ GNULIB_PRINTF=1
+ GNULIB_VFPRINTF=1
+ GNULIB_VPRINTF=1
+ GNULIB_FPUTC=1
+ GNULIB_PUTC=1
+ GNULIB_PUTCHAR=1
+ GNULIB_FPUTS=1
+ GNULIB_PUTS=1
+ GNULIB_FWRITE=1
+ dnl This ifdef is just an optimization, to avoid performing a configure
+ dnl check whose result is not used. It does not make the test of
+ dnl GNULIB_STDIO_H_SIGPIPE or GNULIB_SIGPIPE redundant.
+ m4_ifdef([gl_SIGNAL_SIGPIPE], [
+ gl_SIGNAL_SIGPIPE
+ if test $gl_cv_header_signal_h_SIGPIPE != yes; then
+ REPLACE_STDIO_WRITE_FUNCS=1
+ AC_LIBOBJ([stdio-write])
+ fi
+ ])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdio.h>
+ ]], [dprintf fpurge fseeko ftello getdelim getline popen renameat
+ snprintf vdprintf vsnprintf])
+])
+
+AC_DEFUN([gl_STDIO_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDIO_H_DEFAULTS],
+[
+ GNULIB_DPRINTF=0; AC_SUBST([GNULIB_DPRINTF])
+ GNULIB_FCLOSE=0; AC_SUBST([GNULIB_FCLOSE])
+ GNULIB_FFLUSH=0; AC_SUBST([GNULIB_FFLUSH])
+ GNULIB_FOPEN=0; AC_SUBST([GNULIB_FOPEN])
+ GNULIB_FPRINTF=0; AC_SUBST([GNULIB_FPRINTF])
+ GNULIB_FPRINTF_POSIX=0; AC_SUBST([GNULIB_FPRINTF_POSIX])
+ GNULIB_FPURGE=0; AC_SUBST([GNULIB_FPURGE])
+ GNULIB_FPUTC=0; AC_SUBST([GNULIB_FPUTC])
+ GNULIB_FPUTS=0; AC_SUBST([GNULIB_FPUTS])
+ GNULIB_FREOPEN=0; AC_SUBST([GNULIB_FREOPEN])
+ GNULIB_FSEEK=0; AC_SUBST([GNULIB_FSEEK])
+ GNULIB_FSEEKO=0; AC_SUBST([GNULIB_FSEEKO])
+ GNULIB_FTELL=0; AC_SUBST([GNULIB_FTELL])
+ GNULIB_FTELLO=0; AC_SUBST([GNULIB_FTELLO])
+ GNULIB_FWRITE=0; AC_SUBST([GNULIB_FWRITE])
+ GNULIB_GETDELIM=0; AC_SUBST([GNULIB_GETDELIM])
+ GNULIB_GETLINE=0; AC_SUBST([GNULIB_GETLINE])
+ GNULIB_OBSTACK_PRINTF=0; AC_SUBST([GNULIB_OBSTACK_PRINTF])
+ GNULIB_OBSTACK_PRINTF_POSIX=0; AC_SUBST([GNULIB_OBSTACK_PRINTF_POSIX])
+ GNULIB_PERROR=0; AC_SUBST([GNULIB_PERROR])
+ GNULIB_POPEN=0; AC_SUBST([GNULIB_POPEN])
+ GNULIB_PRINTF=0; AC_SUBST([GNULIB_PRINTF])
+ GNULIB_PRINTF_POSIX=0; AC_SUBST([GNULIB_PRINTF_POSIX])
+ GNULIB_PUTC=0; AC_SUBST([GNULIB_PUTC])
+ GNULIB_PUTCHAR=0; AC_SUBST([GNULIB_PUTCHAR])
+ GNULIB_PUTS=0; AC_SUBST([GNULIB_PUTS])
+ GNULIB_REMOVE=0; AC_SUBST([GNULIB_REMOVE])
+ GNULIB_RENAME=0; AC_SUBST([GNULIB_RENAME])
+ GNULIB_RENAMEAT=0; AC_SUBST([GNULIB_RENAMEAT])
+ GNULIB_SNPRINTF=0; AC_SUBST([GNULIB_SNPRINTF])
+ GNULIB_SPRINTF_POSIX=0; AC_SUBST([GNULIB_SPRINTF_POSIX])
+ GNULIB_STDIO_H_SIGPIPE=0; AC_SUBST([GNULIB_STDIO_H_SIGPIPE])
+ GNULIB_VASPRINTF=0; AC_SUBST([GNULIB_VASPRINTF])
+ GNULIB_VDPRINTF=0; AC_SUBST([GNULIB_VDPRINTF])
+ GNULIB_VFPRINTF=0; AC_SUBST([GNULIB_VFPRINTF])
+ GNULIB_VFPRINTF_POSIX=0; AC_SUBST([GNULIB_VFPRINTF_POSIX])
+ GNULIB_VPRINTF=0; AC_SUBST([GNULIB_VPRINTF])
+ GNULIB_VPRINTF_POSIX=0; AC_SUBST([GNULIB_VPRINTF_POSIX])
+ GNULIB_VSNPRINTF=0; AC_SUBST([GNULIB_VSNPRINTF])
+ GNULIB_VSPRINTF_POSIX=0; AC_SUBST([GNULIB_VSPRINTF_POSIX])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_FPURGE=1; AC_SUBST([HAVE_DECL_FPURGE])
+ HAVE_DECL_GETDELIM=1; AC_SUBST([HAVE_DECL_GETDELIM])
+ HAVE_DECL_GETLINE=1; AC_SUBST([HAVE_DECL_GETLINE])
+ HAVE_DECL_OBSTACK_PRINTF=1; AC_SUBST([HAVE_DECL_OBSTACK_PRINTF])
+ HAVE_DECL_SNPRINTF=1; AC_SUBST([HAVE_DECL_SNPRINTF])
+ HAVE_DECL_VSNPRINTF=1; AC_SUBST([HAVE_DECL_VSNPRINTF])
+ HAVE_DPRINTF=1; AC_SUBST([HAVE_DPRINTF])
+ HAVE_RENAMEAT=1; AC_SUBST([HAVE_RENAMEAT])
+ HAVE_VASPRINTF=1; AC_SUBST([HAVE_VASPRINTF])
+ HAVE_VDPRINTF=1; AC_SUBST([HAVE_VDPRINTF])
+ REPLACE_DPRINTF=0; AC_SUBST([REPLACE_DPRINTF])
+ REPLACE_FCLOSE=0; AC_SUBST([REPLACE_FCLOSE])
+ REPLACE_FFLUSH=0; AC_SUBST([REPLACE_FFLUSH])
+ REPLACE_FOPEN=0; AC_SUBST([REPLACE_FOPEN])
+ REPLACE_FPRINTF=0; AC_SUBST([REPLACE_FPRINTF])
+ REPLACE_FPURGE=0; AC_SUBST([REPLACE_FPURGE])
+ REPLACE_FREOPEN=0; AC_SUBST([REPLACE_FREOPEN])
+ REPLACE_FSEEK=0; AC_SUBST([REPLACE_FSEEK])
+ REPLACE_FSEEKO=0; AC_SUBST([REPLACE_FSEEKO])
+ REPLACE_FTELL=0; AC_SUBST([REPLACE_FTELL])
+ REPLACE_FTELLO=0; AC_SUBST([REPLACE_FTELLO])
+ REPLACE_GETDELIM=0; AC_SUBST([REPLACE_GETDELIM])
+ REPLACE_GETLINE=0; AC_SUBST([REPLACE_GETLINE])
+ REPLACE_OBSTACK_PRINTF=0; AC_SUBST([REPLACE_OBSTACK_PRINTF])
+ REPLACE_PERROR=0; AC_SUBST([REPLACE_PERROR])
+ REPLACE_POPEN=0; AC_SUBST([REPLACE_POPEN])
+ REPLACE_PRINTF=0; AC_SUBST([REPLACE_PRINTF])
+ REPLACE_REMOVE=0; AC_SUBST([REPLACE_REMOVE])
+ REPLACE_RENAME=0; AC_SUBST([REPLACE_RENAME])
+ REPLACE_RENAMEAT=0; AC_SUBST([REPLACE_RENAMEAT])
+ REPLACE_SNPRINTF=0; AC_SUBST([REPLACE_SNPRINTF])
+ REPLACE_SPRINTF=0; AC_SUBST([REPLACE_SPRINTF])
+ REPLACE_STDIO_WRITE_FUNCS=0; AC_SUBST([REPLACE_STDIO_WRITE_FUNCS])
+ REPLACE_VASPRINTF=0; AC_SUBST([REPLACE_VASPRINTF])
+ REPLACE_VDPRINTF=0; AC_SUBST([REPLACE_VDPRINTF])
+ REPLACE_VFPRINTF=0; AC_SUBST([REPLACE_VFPRINTF])
+ REPLACE_VPRINTF=0; AC_SUBST([REPLACE_VPRINTF])
+ REPLACE_VSNPRINTF=0; AC_SUBST([REPLACE_VSNPRINTF])
+ REPLACE_VSPRINTF=0; AC_SUBST([REPLACE_VSPRINTF])
+])
+
+dnl Code shared by fseeko and ftello. Determine if large files are supported,
+dnl but stdin does not start as a large file by default.
+AC_DEFUN([gl_STDIN_LARGE_OFFSET],
+ [
+ AC_CACHE_CHECK([whether stdin defaults to large file offsets],
+ [gl_cv_var_stdin_large_offset],
+ [AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <stdio.h>]],
+[[#if defined __SL64 && defined __SCLE /* cygwin */
+ /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
+ fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
+ it is easier to do a version check than building a runtime test. */
+# include <cygwin/version.h>
+# if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
+ choke me
+# endif
+#endif]])],
+ [gl_cv_var_stdin_large_offset=yes],
+ [gl_cv_var_stdin_large_offset=no])])
+])
diff --git a/ltdl/m4/stdlib-safer.m4 b/ltdl/m4/stdlib-safer.m4
new file mode 100755
index 00000000..2d55a660
--- /dev/null
+++ b/ltdl/m4/stdlib-safer.m4
@@ -0,0 +1,10 @@
+# stdlib-safer.m4 serial 2
+dnl Copyright (C) 2005-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_STDLIB_SAFER],
+[
+ AC_LIBOBJ([mkstemp-safer])
+])
diff --git a/ltdl/m4/stdlib_h.m4 b/ltdl/m4/stdlib_h.m4
new file mode 100755
index 00000000..0693d1a5
--- /dev/null
+++ b/ltdl/m4/stdlib_h.m4
@@ -0,0 +1,100 @@
+# stdlib_h.m4 serial 22
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_STDLIB_H],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([stdlib.h])
+ AC_CHECK_HEADERS([random.h], [], [], [AC_INCLUDES_DEFAULT])
+ if test $ac_cv_header_random_h = yes; then
+ HAVE_RANDOM_H=1
+ else
+ HAVE_RANDOM_H=0
+ fi
+ AC_SUBST([HAVE_RANDOM_H])
+ AC_CHECK_TYPES([struct random_data],
+ [], [HAVE_STRUCT_RANDOM_DATA=0],
+ [[#include <stdlib.h>
+ #if HAVE_RANDOM_H
+ # include <random.h>
+ #endif
+ ]])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <stdlib.h>
+#if HAVE_SYS_LOADAVG_H
+# include <sys/loadavg.h>
+#endif
+#if HAVE_RANDOM_H
+# include <random.h>
+#endif
+ ]], [atoll canonicalize_file_name getloadavg getsubopt mkdtemp
+ mkostemp mkostemps mkstemp mkstemps random_r initstat_r srandom_r
+ setstate_r realpath rpmatch setenv strtod strtoll strtoull unsetenv])
+])
+
+AC_DEFUN([gl_STDLIB_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_STDLIB_H_DEFAULTS],
+[
+ GNULIB_ATOLL=0; AC_SUBST([GNULIB_ATOLL])
+ GNULIB_CALLOC_POSIX=0; AC_SUBST([GNULIB_CALLOC_POSIX])
+ GNULIB_CANONICALIZE_FILE_NAME=0; AC_SUBST([GNULIB_CANONICALIZE_FILE_NAME])
+ GNULIB_GETLOADAVG=0; AC_SUBST([GNULIB_GETLOADAVG])
+ GNULIB_GETSUBOPT=0; AC_SUBST([GNULIB_GETSUBOPT])
+ GNULIB_MALLOC_POSIX=0; AC_SUBST([GNULIB_MALLOC_POSIX])
+ GNULIB_MKDTEMP=0; AC_SUBST([GNULIB_MKDTEMP])
+ GNULIB_MKOSTEMP=0; AC_SUBST([GNULIB_MKOSTEMP])
+ GNULIB_MKOSTEMPS=0; AC_SUBST([GNULIB_MKOSTEMPS])
+ GNULIB_MKSTEMP=0; AC_SUBST([GNULIB_MKSTEMP])
+ GNULIB_MKSTEMPS=0; AC_SUBST([GNULIB_MKSTEMPS])
+ GNULIB_PUTENV=0; AC_SUBST([GNULIB_PUTENV])
+ GNULIB_RANDOM_R=0; AC_SUBST([GNULIB_RANDOM_R])
+ GNULIB_REALLOC_POSIX=0; AC_SUBST([GNULIB_REALLOC_POSIX])
+ GNULIB_REALPATH=0; AC_SUBST([GNULIB_REALPATH])
+ GNULIB_RPMATCH=0; AC_SUBST([GNULIB_RPMATCH])
+ GNULIB_SETENV=0; AC_SUBST([GNULIB_SETENV])
+ GNULIB_STRTOD=0; AC_SUBST([GNULIB_STRTOD])
+ GNULIB_STRTOLL=0; AC_SUBST([GNULIB_STRTOLL])
+ GNULIB_STRTOULL=0; AC_SUBST([GNULIB_STRTOULL])
+ GNULIB_UNSETENV=0; AC_SUBST([GNULIB_UNSETENV])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_ATOLL=1; AC_SUBST([HAVE_ATOLL])
+ HAVE_CALLOC_POSIX=1; AC_SUBST([HAVE_CALLOC_POSIX])
+ HAVE_CANONICALIZE_FILE_NAME=1; AC_SUBST([HAVE_CANONICALIZE_FILE_NAME])
+ HAVE_DECL_GETLOADAVG=1; AC_SUBST([HAVE_DECL_GETLOADAVG])
+ HAVE_GETSUBOPT=1; AC_SUBST([HAVE_GETSUBOPT])
+ HAVE_MALLOC_POSIX=1; AC_SUBST([HAVE_MALLOC_POSIX])
+ HAVE_MKDTEMP=1; AC_SUBST([HAVE_MKDTEMP])
+ HAVE_MKOSTEMP=1; AC_SUBST([HAVE_MKOSTEMP])
+ HAVE_MKOSTEMPS=1; AC_SUBST([HAVE_MKOSTEMPS])
+ HAVE_MKSTEMPS=1; AC_SUBST([HAVE_MKSTEMPS])
+ HAVE_RANDOM_R=1; AC_SUBST([HAVE_RANDOM_R])
+ HAVE_REALLOC_POSIX=1; AC_SUBST([HAVE_REALLOC_POSIX])
+ HAVE_REALPATH=1; AC_SUBST([HAVE_REALPATH])
+ HAVE_RPMATCH=1; AC_SUBST([HAVE_RPMATCH])
+ HAVE_SETENV=1; AC_SUBST([HAVE_SETENV])
+ HAVE_STRTOD=1; AC_SUBST([HAVE_STRTOD])
+ HAVE_STRTOLL=1; AC_SUBST([HAVE_STRTOLL])
+ HAVE_STRTOULL=1; AC_SUBST([HAVE_STRTOULL])
+ HAVE_STRUCT_RANDOM_DATA=1; AC_SUBST([HAVE_STRUCT_RANDOM_DATA])
+ HAVE_SYS_LOADAVG_H=0; AC_SUBST([HAVE_SYS_LOADAVG_H])
+ HAVE_UNSETENV=1; AC_SUBST([HAVE_UNSETENV])
+ REPLACE_CANONICALIZE_FILE_NAME=0; AC_SUBST([REPLACE_CANONICALIZE_FILE_NAME])
+ REPLACE_MKSTEMP=0; AC_SUBST([REPLACE_MKSTEMP])
+ REPLACE_PUTENV=0; AC_SUBST([REPLACE_PUTENV])
+ REPLACE_REALPATH=0; AC_SUBST([REPLACE_REALPATH])
+ REPLACE_SETENV=0; AC_SUBST([REPLACE_SETENV])
+ REPLACE_STRTOD=0; AC_SUBST([REPLACE_STRTOD])
+ REPLACE_UNSETENV=0; AC_SUBST([REPLACE_UNSETENV])
+])
diff --git a/ltdl/m4/strchrnul.m4 b/ltdl/m4/strchrnul.m4
new file mode 100755
index 00000000..0072e60e
--- /dev/null
+++ b/ltdl/m4/strchrnul.m4
@@ -0,0 +1,21 @@
+# strchrnul.m4 serial 7
+dnl Copyright (C) 2003, 2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRCHRNUL],
+[
+ dnl Persuade glibc <string.h> to declare strchrnul().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([strchrnul])
+ if test $ac_cv_func_strchrnul = no; then
+ HAVE_STRCHRNUL=0
+ gl_PREREQ_STRCHRNUL
+ fi
+])
+
+# Prerequisites of lib/strchrnul.c.
+AC_DEFUN([gl_PREREQ_STRCHRNUL], [:])
diff --git a/ltdl/m4/strdup.m4 b/ltdl/m4/strdup.m4
new file mode 100755
index 00000000..3a3b07dd
--- /dev/null
+++ b/ltdl/m4/strdup.m4
@@ -0,0 +1,38 @@
+# strdup.m4 serial 11
+
+dnl Copyright (C) 2002-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.
+
+AC_DEFUN([gl_FUNC_STRDUP],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REPLACE_FUNCS([strdup])
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+
+AC_DEFUN([gl_FUNC_STRDUP_POSIX],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_CHECK_MALLOC_POSIX])
+ if test $gl_cv_func_malloc_posix != yes; then
+ REPLACE_STRDUP=1
+ AC_LIBOBJ([strdup])
+ else
+ AC_REPLACE_FUNCS([strdup])
+ fi
+ AC_CHECK_DECLS_ONCE([strdup])
+ if test $ac_cv_have_decl_strdup = no; then
+ HAVE_DECL_STRDUP=0
+ fi
+ gl_PREREQ_STRDUP
+])
+
+# Prerequisites of lib/strdup.c.
+AC_DEFUN([gl_PREREQ_STRDUP], [:])
diff --git a/ltdl/m4/strerror.m4 b/ltdl/m4/strerror.m4
new file mode 100755
index 00000000..1649b245
--- /dev/null
+++ b/ltdl/m4/strerror.m4
@@ -0,0 +1,68 @@
+# strerror.m4 serial 9
+dnl Copyright (C) 2002, 2007-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.
+
+AC_DEFUN([gl_FUNC_STRERROR],
+[
+ AC_REQUIRE([gl_FUNC_STRERROR_SEPARATE])
+ if test $REPLACE_STRERROR = 1; then
+ AC_LIBOBJ([strerror])
+ AC_DEFINE_UNQUOTED([REPLACE_STRERROR], [$REPLACE_STRERROR],
+ [Define this to 1 if strerror is broken.])
+ fi
+])
+
+# Like gl_FUNC_STRERROR, except prepare for separate compilation (no AC_LIBOBJ).
+AC_DEFUN([gl_FUNC_STRERROR_SEPARATE],
+[
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_REQUIRE([gl_HEADER_ERRNO_H])
+ if test -z "$ERRNO_H"; then
+ AC_CACHE_CHECK([for working strerror function],
+ [gl_cv_func_working_strerror],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no],
+ [dnl Assume crossbuild works if it compiles.
+ AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <string.h>
+ ]],
+ [[return !*strerror (-2);]])],
+ [gl_cv_func_working_strerror=yes],
+ [gl_cv_func_working_strerror=no])
+ ])
+ ])
+ if test $gl_cv_func_working_strerror = no; then
+ dnl The system's strerror() fails to return a string for out-of-range
+ dnl integers. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ else
+ dnl The system's strerror() cannot know about the new errno values we add
+ dnl to <errno.h>. Replace it.
+ REPLACE_STRERROR=1
+ fi
+ if test $REPLACE_STRERROR = 1; then
+ gl_PREREQ_STRERROR
+ fi
+])
+
+# Prerequisites of lib/strerror.c.
+AC_DEFUN([gl_PREREQ_STRERROR], [
+ AC_CHECK_DECLS([strerror])
+ AC_CHECK_HEADERS_ONCE([sys/socket.h])
+ if test $ac_cv_header_sys_socket_h != yes; then
+ dnl We cannot use AC_CHECK_HEADERS_ONCE here, because that would make
+ dnl the check for those headers unconditional; yet cygwin reports
+ dnl that the headers are present but cannot be compiled (since on
+ dnl cygwin, all socket information should come from sys/socket.h).
+ AC_CHECK_HEADERS([winsock2.h])
+ fi
+])
diff --git a/ltdl/m4/string_h.m4 b/ltdl/m4/string_h.m4
new file mode 100755
index 00000000..73c6d833
--- /dev/null
+++ b/ltdl/m4/string_h.m4
@@ -0,0 +1,104 @@
+# Configure a GNU-like replacement for <string.h>.
+
+# Copyright (C) 2007-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# serial 11
+
+# Written by Paul Eggert.
+
+AC_DEFUN([gl_HEADER_STRING_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_STRING_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([string.h])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use, and which is not
+ dnl guaranteed by C89.
+ gl_WARN_ON_USE_PREPARE([[#include <string.h>
+ ]], [memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup
+ strndup strnlen strpbrk strsep strcasestr strtok_r strsignal strverscmp])
+])
+
+AC_DEFUN([gl_STRING_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_HEADER_STRING_H_DEFAULTS],
+[
+ GNULIB_MEMCHR=0; AC_SUBST([GNULIB_MEMCHR])
+ GNULIB_MEMMEM=0; AC_SUBST([GNULIB_MEMMEM])
+ GNULIB_MEMPCPY=0; AC_SUBST([GNULIB_MEMPCPY])
+ GNULIB_MEMRCHR=0; AC_SUBST([GNULIB_MEMRCHR])
+ GNULIB_RAWMEMCHR=0; AC_SUBST([GNULIB_RAWMEMCHR])
+ GNULIB_STPCPY=0; AC_SUBST([GNULIB_STPCPY])
+ GNULIB_STPNCPY=0; AC_SUBST([GNULIB_STPNCPY])
+ GNULIB_STRCHRNUL=0; AC_SUBST([GNULIB_STRCHRNUL])
+ GNULIB_STRDUP=0; AC_SUBST([GNULIB_STRDUP])
+ GNULIB_STRNDUP=0; AC_SUBST([GNULIB_STRNDUP])
+ GNULIB_STRNLEN=0; AC_SUBST([GNULIB_STRNLEN])
+ GNULIB_STRPBRK=0; AC_SUBST([GNULIB_STRPBRK])
+ GNULIB_STRSEP=0; AC_SUBST([GNULIB_STRSEP])
+ GNULIB_STRSTR=0; AC_SUBST([GNULIB_STRSTR])
+ GNULIB_STRCASESTR=0; AC_SUBST([GNULIB_STRCASESTR])
+ GNULIB_STRTOK_R=0; AC_SUBST([GNULIB_STRTOK_R])
+ GNULIB_MBSLEN=0; AC_SUBST([GNULIB_MBSLEN])
+ GNULIB_MBSNLEN=0; AC_SUBST([GNULIB_MBSNLEN])
+ GNULIB_MBSCHR=0; AC_SUBST([GNULIB_MBSCHR])
+ GNULIB_MBSRCHR=0; AC_SUBST([GNULIB_MBSRCHR])
+ GNULIB_MBSSTR=0; AC_SUBST([GNULIB_MBSSTR])
+ GNULIB_MBSCASECMP=0; AC_SUBST([GNULIB_MBSCASECMP])
+ GNULIB_MBSNCASECMP=0; AC_SUBST([GNULIB_MBSNCASECMP])
+ GNULIB_MBSPCASECMP=0; AC_SUBST([GNULIB_MBSPCASECMP])
+ GNULIB_MBSCASESTR=0; AC_SUBST([GNULIB_MBSCASESTR])
+ GNULIB_MBSCSPN=0; AC_SUBST([GNULIB_MBSCSPN])
+ GNULIB_MBSPBRK=0; AC_SUBST([GNULIB_MBSPBRK])
+ GNULIB_MBSSPN=0; AC_SUBST([GNULIB_MBSSPN])
+ GNULIB_MBSSEP=0; AC_SUBST([GNULIB_MBSSEP])
+ GNULIB_MBSTOK_R=0; AC_SUBST([GNULIB_MBSTOK_R])
+ GNULIB_STRERROR=0; AC_SUBST([GNULIB_STRERROR])
+ GNULIB_STRSIGNAL=0; AC_SUBST([GNULIB_STRSIGNAL])
+ GNULIB_STRVERSCMP=0; AC_SUBST([GNULIB_STRVERSCMP])
+ HAVE_MBSLEN=0; AC_SUBST([HAVE_MBSLEN])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_DECL_MEMMEM=1; AC_SUBST([HAVE_DECL_MEMMEM])
+ HAVE_MEMPCPY=1; AC_SUBST([HAVE_MEMPCPY])
+ HAVE_DECL_MEMRCHR=1; AC_SUBST([HAVE_DECL_MEMRCHR])
+ HAVE_RAWMEMCHR=1; AC_SUBST([HAVE_RAWMEMCHR])
+ HAVE_STPCPY=1; AC_SUBST([HAVE_STPCPY])
+ HAVE_STPNCPY=1; AC_SUBST([HAVE_STPNCPY])
+ HAVE_STRCHRNUL=1; AC_SUBST([HAVE_STRCHRNUL])
+ HAVE_DECL_STRDUP=1; AC_SUBST([HAVE_DECL_STRDUP])
+ HAVE_DECL_STRNDUP=1; AC_SUBST([HAVE_DECL_STRNDUP])
+ HAVE_DECL_STRNLEN=1; AC_SUBST([HAVE_DECL_STRNLEN])
+ HAVE_STRPBRK=1; AC_SUBST([HAVE_STRPBRK])
+ HAVE_STRSEP=1; AC_SUBST([HAVE_STRSEP])
+ HAVE_STRCASESTR=1; AC_SUBST([HAVE_STRCASESTR])
+ HAVE_DECL_STRTOK_R=1; AC_SUBST([HAVE_DECL_STRTOK_R])
+ HAVE_DECL_STRERROR=1; AC_SUBST([HAVE_DECL_STRERROR])
+ HAVE_DECL_STRSIGNAL=1; AC_SUBST([HAVE_DECL_STRSIGNAL])
+ HAVE_STRVERSCMP=1; AC_SUBST([HAVE_STRVERSCMP])
+ REPLACE_MEMCHR=0; AC_SUBST([REPLACE_MEMCHR])
+ REPLACE_MEMMEM=0; AC_SUBST([REPLACE_MEMMEM])
+ REPLACE_STRDUP=0; AC_SUBST([REPLACE_STRDUP])
+ REPLACE_STRSTR=0; AC_SUBST([REPLACE_STRSTR])
+ REPLACE_STRCASESTR=0; AC_SUBST([REPLACE_STRCASESTR])
+ REPLACE_STRERROR=0; AC_SUBST([REPLACE_STRERROR])
+ REPLACE_STRNDUP=0; AC_SUBST([REPLACE_STRNDUP])
+ REPLACE_STRSIGNAL=0; AC_SUBST([REPLACE_STRSIGNAL])
+ REPLACE_STRTOK_R=0; AC_SUBST([REPLACE_STRTOK_R])
+ UNDEFINE_STRTOK_R=0; AC_SUBST([UNDEFINE_STRTOK_R])
+])
diff --git a/ltdl/m4/strndup.m4 b/ltdl/m4/strndup.m4
new file mode 100755
index 00000000..810313cd
--- /dev/null
+++ b/ltdl/m4/strndup.m4
@@ -0,0 +1,49 @@
+# strndup.m4 serial 17
+dnl Copyright (C) 2002-2003, 2005-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.
+
+AC_DEFUN([gl_FUNC_STRNDUP],
+[
+ dnl Persuade glibc <string.h> to declare strndup().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strndup])
+ AC_CHECK_FUNCS_ONCE([strndup])
+ if test $ac_cv_have_decl_strndup = no; then
+ HAVE_DECL_STRNDUP=0
+ fi
+
+ if test $ac_cv_func_strndup = yes; then
+ # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
+ AC_CACHE_CHECK([for working strndup], [gl_cv_func_strndup_works],
+ [AC_RUN_IFELSE([
+ AC_LANG_PROGRAM([[#include <string.h>
+ #include <stdlib.h>]], [[
+#ifndef HAVE_DECL_STRNDUP
+ extern char *strndup (const char *, size_t);
+#endif
+ char *s;
+ s = strndup ("some longer string", 15);
+ free (s);
+ s = strndup ("shorter string", 13);
+ return s[13] != '\0';]])],
+ [gl_cv_func_strndup_works=yes],
+ [gl_cv_func_strndup_works=no],
+ [case $host_os in
+ aix*) gl_cv_func_strndup_works="guessing no";;
+ *) gl_cv_func_strndup_works="guessing yes";;
+ esac])])
+ case $gl_cv_func_strndup_works in
+ *no)
+ REPLACE_STRNDUP=1
+ AC_LIBOBJ([strndup])
+ ;;
+ esac
+ else
+ AC_LIBOBJ([strndup])
+ fi
+])
diff --git a/ltdl/m4/strnlen.m4 b/ltdl/m4/strnlen.m4
new file mode 100755
index 00000000..cd48948f
--- /dev/null
+++ b/ltdl/m4/strnlen.m4
@@ -0,0 +1,32 @@
+# strnlen.m4 serial 10
+dnl Copyright (C) 2002-2003, 2005-2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_FUNC_STRNLEN],
+[
+ dnl Persuade glibc <string.h> to declare strnlen().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gl_HEADER_STRING_H_DEFAULTS])
+ AC_CHECK_DECLS_ONCE([strnlen])
+ if test $ac_cv_have_decl_strnlen = no; then
+ HAVE_DECL_STRNLEN=0
+ fi
+
+ AC_FUNC_STRNLEN
+ if test $ac_cv_func_strnlen_working = no; then
+ # This is necessary because automake-1.6.1 doesn't understand
+ # that the above use of AC_FUNC_STRNLEN means we may have to use
+ # lib/strnlen.c.
+ #AC_LIBOBJ([strnlen])
+ AC_DEFINE([strnlen], [rpl_strnlen],
+ [Define to rpl_strnlen if the replacement function should be used.])
+ gl_PREREQ_STRNLEN
+ fi
+])
+
+# Prerequisites of lib/strnlen.c.
+AC_DEFUN([gl_PREREQ_STRNLEN], [:])
diff --git a/ltdl/m4/strtod.m4 b/ltdl/m4/strtod.m4
new file mode 100755
index 00000000..6b2d7317
--- /dev/null
+++ b/ltdl/m4/strtod.m4
@@ -0,0 +1,90 @@
+# strtod.m4 serial 13
+dnl Copyright (C) 2002-2003, 2006-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.
+
+AC_DEFUN([gl_FUNC_STRTOD],
+[
+ AC_REQUIRE([gl_STDLIB_H_DEFAULTS])
+ AC_FUNC_STRTOD
+ dnl Note: AC_FUNC_STRTOD does AC_LIBOBJ([strtod]).
+ if test $ac_cv_func_strtod = no; then
+ HAVE_STRTOD=0
+ REPLACE_STRTOD=1
+ gl_PREREQ_STRTOD
+ else
+ AC_CACHE_CHECK([whether strtod obeys C99], [gl_cv_func_strtod_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdlib.h>
+#include <math.h>
+#include <errno.h>
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+]], [[
+ {
+ /* Older glibc and Cygwin mis-parse "-0x". */
+ const char *string = "-0x";
+ char *term;
+ double value = strtod (string, &term);
+ double zero = 0.0;
+ if (1.0 / value != -1.0 / zero || term != (string + 2))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse hex floats. */
+ const char *string = "0XaP+1";
+ char *term;
+ double value = strtod (string, &term);
+ if (value != 20.0 || term != (string + 6))
+ return 1;
+ }
+ {
+ /* Many platforms do not parse infinities. HP-UX 11.31 parses inf,
+ but mistakenly sets errno. */
+ const char *string = "inf";
+ char *term;
+ double value;
+ errno = 0;
+ value = strtod (string, &term);
+ if (value != HUGE_VAL || term != (string + 3) || errno)
+ return 1;
+ }
+ {
+ /* glibc 2.7 and cygwin 1.5.24 misparse "nan()". */
+ const char *string = "nan()";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 5))
+ return 1;
+ }
+ {
+ /* darwin 10.6.1 misparses "nan(". */
+ const char *string = "nan(";
+ char *term;
+ double value = strtod (string, &term);
+ if (numeric_equal (value, value) || term != (string + 3))
+ return 1;
+ }
+]])],
+ [gl_cv_func_strtod_works=yes],
+ [gl_cv_func_strtod_works=no],
+ [gl_cv_func_strtod_works="guessing no"])])
+ if test "$gl_cv_func_strtod_works" != yes; then
+ REPLACE_STRTOD=1
+ gl_PREREQ_STRTOD
+ dnl Use undocumented macro to set POW_LIB correctly.
+ _AC_LIBOBJ_STRTOD
+ fi
+ fi
+])
+
+# Prerequisites of lib/strtod.c.
+# The need for pow() is already handled by AC_FUNC_STRTOD.
+AC_DEFUN([gl_PREREQ_STRTOD], [:])
diff --git a/ltdl/m4/strtol.m4 b/ltdl/m4/strtol.m4
new file mode 100755
index 00000000..2f27ce88
--- /dev/null
+++ b/ltdl/m4/strtol.m4
@@ -0,0 +1,10 @@
+# strtol.m4 serial 5
+dnl Copyright (C) 2002, 2003, 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_FUNC_STRTOL],
+[
+ AC_REPLACE_FUNCS([strtol])
+])
diff --git a/ltdl/m4/symlink.m4 b/ltdl/m4/symlink.m4
new file mode 100755
index 00000000..3d14e692
--- /dev/null
+++ b/ltdl/m4/symlink.m4
@@ -0,0 +1,38 @@
+# serial 2
+# See if we need to provide symlink replacement.
+
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Written by Eric Blake.
+
+AC_DEFUN([gl_FUNC_SYMLINK],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_CHECK_FUNCS_ONCE([symlink])
+ dnl The best we can do on mingw is provide a dummy that always fails, so
+ dnl that compilation can proceed with fewer ifdefs. On Solaris 9 and
+ dnl FreeBSD 7.2, we want to fix a bug with trailing slash handling.
+ if test $ac_cv_func_symlink = no; then
+ HAVE_SYMLINK=0
+ AC_LIBOBJ([symlink])
+ else
+ AC_CACHE_CHECK([whether symlink handles trailing slash correctly],
+ [gl_cv_func_symlink_works],
+ [AC_RUN_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <unistd.h>
+]], [[if (!symlink ("a", "conftest.link/")) return 1;
+ if (symlink ("conftest.f", "conftest.lnk2")) return 2;
+ if (!symlink ("a", "conftest.lnk2/")) return 3;]])],
+ [gl_cv_func_symlink_works=yes], [gl_cv_func_symlink_works=no],
+ [gl_cv_func_symlink_works="guessing no"])
+ rm -f conftest.f conftest.link conftest.lnk2])
+ if test "$gl_cv_func_symlink_works" != yes; then
+ REPLACE_SYMLINK=1
+ AC_LIBOBJ([symlink])
+ fi
+ fi
+])
diff --git a/ltdl/m4/sys_stat_h.m4 b/ltdl/m4/sys_stat_h.m4
new file mode 100755
index 00000000..5a113d02
--- /dev/null
+++ b/ltdl/m4/sys_stat_h.m4
@@ -0,0 +1,80 @@
+# sys_stat_h.m4 serial 22 -*- Autoconf -*-
+dnl Copyright (C) 2006-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 Eric Blake.
+dnl Provide a GNU-like <sys/stat.h>.
+
+AC_DEFUN([gl_HEADER_SYS_STAT_H],
+[
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+
+ dnl For the mkdir substitute.
+ AC_REQUIRE([AC_C_INLINE])
+
+ dnl Check for broken stat macros.
+ AC_REQUIRE([AC_HEADER_STAT])
+
+ gl_CHECK_NEXT_HEADERS([sys/stat.h])
+
+ dnl Define types that are supposed to be defined in <sys/types.h> or
+ dnl <sys/stat.h>.
+ AC_CHECK_TYPE([nlink_t], [],
+ [AC_DEFINE([nlink_t], [int],
+ [Define to the type of st_nlink in struct stat, or a supertype.])],
+ [#include <sys/types.h>
+ #include <sys/stat.h>])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <sys/stat.h>
+ ]], [fchmodat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat
+ mknod mknodat stat utimensat])
+]) # gl_HEADER_SYS_STAT_H
+
+AC_DEFUN([gl_SYS_STAT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_STAT_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SYS_STAT_H_DEFAULTS],
+[
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) dnl for REPLACE_FCHDIR
+ GNULIB_FCHMODAT=0; AC_SUBST([GNULIB_FCHMODAT])
+ GNULIB_FSTATAT=0; AC_SUBST([GNULIB_FSTATAT])
+ GNULIB_FUTIMENS=0; AC_SUBST([GNULIB_FUTIMENS])
+ GNULIB_LCHMOD=0; AC_SUBST([GNULIB_LCHMOD])
+ GNULIB_LSTAT=0; AC_SUBST([GNULIB_LSTAT])
+ GNULIB_MKDIRAT=0; AC_SUBST([GNULIB_MKDIRAT])
+ GNULIB_MKFIFO=0; AC_SUBST([GNULIB_MKFIFO])
+ GNULIB_MKFIFOAT=0; AC_SUBST([GNULIB_MKFIFOAT])
+ GNULIB_MKNOD=0; AC_SUBST([GNULIB_MKNOD])
+ GNULIB_MKNODAT=0; AC_SUBST([GNULIB_MKNODAT])
+ GNULIB_STAT=0; AC_SUBST([GNULIB_STAT])
+ GNULIB_UTIMENSAT=0; AC_SUBST([GNULIB_UTIMENSAT])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_FCHMODAT=1; AC_SUBST([HAVE_FCHMODAT])
+ HAVE_FSTATAT=1; AC_SUBST([HAVE_FSTATAT])
+ HAVE_FUTIMENS=1; AC_SUBST([HAVE_FUTIMENS])
+ HAVE_LCHMOD=1; AC_SUBST([HAVE_LCHMOD])
+ HAVE_LSTAT=1; AC_SUBST([HAVE_LSTAT])
+ HAVE_MKDIRAT=1; AC_SUBST([HAVE_MKDIRAT])
+ HAVE_MKFIFO=1; AC_SUBST([HAVE_MKFIFO])
+ HAVE_MKFIFOAT=1; AC_SUBST([HAVE_MKFIFOAT])
+ HAVE_MKNOD=1; AC_SUBST([HAVE_MKNOD])
+ HAVE_MKNODAT=1; AC_SUBST([HAVE_MKNODAT])
+ HAVE_UTIMENSAT=1; AC_SUBST([HAVE_UTIMENSAT])
+ REPLACE_FSTAT=0; AC_SUBST([REPLACE_FSTAT])
+ REPLACE_FSTATAT=0; AC_SUBST([REPLACE_FSTATAT])
+ REPLACE_FUTIMENS=0; AC_SUBST([REPLACE_FUTIMENS])
+ REPLACE_LSTAT=0; AC_SUBST([REPLACE_LSTAT])
+ REPLACE_MKDIR=0; AC_SUBST([REPLACE_MKDIR])
+ REPLACE_MKFIFO=0; AC_SUBST([REPLACE_MKFIFO])
+ REPLACE_MKNOD=0; AC_SUBST([REPLACE_MKNOD])
+ REPLACE_STAT=0; AC_SUBST([REPLACE_STAT])
+ REPLACE_UTIMENSAT=0; AC_SUBST([REPLACE_UTIMENSAT])
+])
diff --git a/ltdl/m4/sys_time_h.m4 b/ltdl/m4/sys_time_h.m4
new file mode 100755
index 00000000..be6d7ecb
--- /dev/null
+++ b/ltdl/m4/sys_time_h.m4
@@ -0,0 +1,70 @@
+# Configure a replacement for <sys/time.h>.
+# serial 4
+
+# Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Martin Lambers.
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H],
+[
+ dnl Use AC_REQUIRE here, so that the REPLACE_GETTIMEOFDAY=0 statement
+ dnl below is expanded once only, before all REPLACE_GETTIMEOFDAY=1
+ dnl statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ gl_CHECK_NEXT_HEADERS([sys/time.h])
+
+ if test $ac_cv_header_sys_time_h != yes; then
+ HAVE_SYS_TIME_H=0
+ fi
+
+ AC_CACHE_CHECK([for struct timeval], [gl_cv_sys_struct_timeval],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#if HAVE_SYS_TIME_H
+ #include <sys/time.h>
+ #endif
+ #include <time.h>
+ ]],
+ [[static struct timeval x; x.tv_sec = x.tv_usec;]])],
+ [gl_cv_sys_struct_timeval=yes],
+ [gl_cv_sys_struct_timeval=no])])
+ if test $gl_cv_sys_struct_timeval != yes; then
+ HAVE_STRUCT_TIMEVAL=0
+ fi
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+#if HAVE_SYS_TIME_H
+# include <sys/time.h>
+#endif
+#include <time.h>
+ ]], [gettimeofday])
+])
+
+AC_DEFUN([gl_SYS_TIME_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_HEADER_SYS_TIME_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_HEADER_SYS_TIME_H_DEFAULTS],
+[
+ GNULIB_GETTIMEOFDAY=0; AC_SUBST([GNULIB_GETTIMEOFDAY])
+ dnl Assume POSIX behavior unless another module says otherwise.
+ HAVE_GETTIMEOFDAY=1; AC_SUBST([HAVE_GETTIMEOFDAY])
+ HAVE_STRUCT_TIMEVAL=1; AC_SUBST([HAVE_STRUCT_TIMEVAL])
+ HAVE_SYS_TIME_H=1; AC_SUBST([HAVE_SYS_TIME_H])
+ REPLACE_GETTIMEOFDAY=0; AC_SUBST([REPLACE_GETTIMEOFDAY])
+])
diff --git a/ltdl/m4/sys_wait_h.m4 b/ltdl/m4/sys_wait_h.m4
new file mode 100755
index 00000000..a161ff72
--- /dev/null
+++ b/ltdl/m4/sys_wait_h.m4
@@ -0,0 +1,24 @@
+# sys_wait_h.m4 serial 2
+dnl Copyright (C) 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_SYS_WAIT_H],
+[
+ AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+
+ gl_CHECK_NEXT_HEADERS([sys/wait.h])
+])
+
+AC_DEFUN([gl_SYS_WAIT_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_SYS_WAIT_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_SYS_WAIT_H_DEFAULTS],
+[
+ dnl Assume proper GNU behavior unless another module says otherwise.
+])
diff --git a/ltdl/m4/tempname.m4 b/ltdl/m4/tempname.m4
new file mode 100755
index 00000000..bf83f195
--- /dev/null
+++ b/ltdl/m4/tempname.m4
@@ -0,0 +1,22 @@
+#serial 3
+
+# Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# glibc provides __gen_tempname as a wrapper for mk[ds]temp. Expose
+# it as a public API, and provide it on systems that are lacking.
+AC_DEFUN([gl_FUNC_GEN_TEMPNAME],
+[
+ AC_REQUIRE([AC_SYS_LARGEFILE])
+
+ AC_LIBOBJ([tempname])
+ gl_PREREQ_TEMPNAME
+])
+
+# Prerequisites of lib/tempname.c.
+AC_DEFUN([gl_PREREQ_TEMPNAME],
+[
+ :
+])
diff --git a/ltdl/m4/threadlib.m4 b/ltdl/m4/threadlib.m4
new file mode 100755
index 00000000..bba460e4
--- /dev/null
+++ b/ltdl/m4/threadlib.m4
@@ -0,0 +1,324 @@
+# threadlib.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2005-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 Bruno Haible.
+
+dnl gl_THREADLIB
+dnl ------------
+dnl Tests for a multithreading library to be used.
+dnl Defines at most one of the macros USE_POSIX_THREADS, USE_SOLARIS_THREADS,
+dnl USE_PTH_THREADS, USE_WIN32_THREADS
+dnl Sets the variables LIBTHREAD and LTLIBTHREAD to the linker options for use
+dnl in a Makefile (LIBTHREAD for use without libtool, LTLIBTHREAD for use with
+dnl libtool).
+dnl Sets the variables LIBMULTITHREAD and LTLIBMULTITHREAD similarly, for
+dnl programs that really need multithread functionality. The difference
+dnl between LIBTHREAD and LIBMULTITHREAD is that on platforms supporting weak
+dnl symbols, typically LIBTHREAD="" whereas LIBMULTITHREAD="-lpthread".
+dnl Adds to CPPFLAGS the flag -D_REENTRANT or -D_THREAD_SAFE if needed for
+dnl multithread-safe programs.
+
+AC_DEFUN([gl_THREADLIB_EARLY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+])
+
+dnl The guts of gl_THREADLIB_EARLY. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_EARLY_BODY],
+[
+ dnl Ordering constraints: This macro modifies CPPFLAGS in a way that
+ dnl influences the result of the autoconf tests that test for *_unlocked
+ dnl declarations, on AIX 5 at least. Therefore it must come early.
+ AC_BEFORE([$0], [gl_FUNC_GLIBC_UNLOCKED_IO])dnl
+ AC_BEFORE([$0], [gl_ARGP])dnl
+
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ dnl _GNU_SOURCE is needed for pthread_rwlock_t on glibc systems.
+ dnl AC_USE_SYSTEM_EXTENSIONS was introduced in autoconf 2.60 and obsoletes
+ dnl AC_GNU_SOURCE.
+ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
+ [AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])],
+ [AC_REQUIRE([AC_GNU_SOURCE])])
+ dnl Check for multithreading.
+ m4_divert_text([DEFAULTS], [gl_use_threads_default=])
+ AC_ARG_ENABLE([threads],
+AC_HELP_STRING([--enable-threads={posix|solaris|pth|win32}], [specify multithreading API])
+AC_HELP_STRING([--disable-threads], [build without multithread safety]),
+ [gl_use_threads=$enableval],
+ [if test -n "$gl_use_threads_default"; then
+ gl_use_threads="$gl_use_threads_default"
+ else
+changequote(,)dnl
+ case "$host_os" in
+ dnl Disable multithreading by default on OSF/1, because it interferes
+ dnl with fork()/exec(): When msgexec is linked with -lpthread, its
+ dnl child process gets an endless segmentation fault inside execvp().
+ dnl Disable multithreading by default on Cygwin 1.5.x, because it has
+ dnl bugs that lead to endless loops or crashes. See
+ dnl <http://cygwin.com/ml/cygwin/2009-08/msg00283.html>.
+ osf*) gl_use_threads=no ;;
+ cygwin*)
+ case `uname -r` in
+ 1.[0-5].*) gl_use_threads=no ;;
+ *) gl_use_threads=yes ;;
+ esac
+ ;;
+ *) gl_use_threads=yes ;;
+ esac
+changequote([,])dnl
+ fi
+ ])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # For using <pthread.h>:
+ case "$host_os" in
+ osf*)
+ # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
+ # groks <pthread.h>. cc also understands the flag -pthread, but
+ # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
+ # 2. putting a flag into CPPFLAGS that has an effect on the linker
+ # causes the AC_TRY_LINK test below to succeed unexpectedly,
+ # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
+ CPPFLAGS="$CPPFLAGS -D_REENTRANT"
+ ;;
+ esac
+ # Some systems optimize for single-threaded programs by default, and
+ # need special flags to disable these optimizations. For example, the
+ # definition of 'errno' in <errno.h>.
+ case "$host_os" in
+ aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;;
+ solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;;
+ esac
+ fi
+])
+
+dnl The guts of gl_THREADLIB. Needs to be expanded only once.
+
+AC_DEFUN([gl_THREADLIB_BODY],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY_BODY])
+ gl_threads_api=none
+ LIBTHREAD=
+ LTLIBTHREAD=
+ LIBMULTITHREAD=
+ LTLIBMULTITHREAD=
+ if test "$gl_use_threads" != no; then
+ dnl Check whether the compiler and linker support weak declarations.
+ AC_MSG_CHECKING([whether imported symbols can be declared weak])
+ gl_have_weak=no
+ AC_TRY_LINK([extern void xyzzy ();
+#pragma weak xyzzy], [xyzzy();], [gl_have_weak=yes])
+ AC_MSG_RESULT([$gl_have_weak])
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then
+ # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
+ # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY.
+ AC_CHECK_HEADER([pthread.h],
+ [gl_have_pthread_h=yes], [gl_have_pthread_h=no])
+ if test "$gl_have_pthread_h" = yes; then
+ # Other possible tests:
+ # -lpthreads (FSU threads, PCthreads)
+ # -lgthreads
+ gl_have_pthread=
+ # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
+ # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
+ # the second one only in libpthread, and lock.c needs it.
+ AC_TRY_LINK([#include <pthread.h>],
+ [pthread_mutex_lock((pthread_mutex_t*)0);
+ pthread_mutexattr_init((pthread_mutexattr_t*)0);],
+ [gl_have_pthread=yes])
+ # Test for libpthread by looking for pthread_kill. (Not pthread_self,
+ # since it is defined as a macro on OSF/1.)
+ if test -n "$gl_have_pthread"; then
+ # The program links fine without libpthread. But it may actually
+ # need to link with libpthread in order to create multiple threads.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread
+ # On Solaris and HP-UX, most pthread functions exist also in libc.
+ # Therefore pthread_in_use() needs to actually try to create a
+ # thread: pthread_create from libc will fail, whereas
+ # pthread_create will actually create a thread.
+ case "$host_os" in
+ solaris* | hpux*)
+ AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
+ [Define if the pthread_in_use() detection is hard.])
+ esac
+ ])
+ else
+ # Some library is needed. Try libpthread and libc_r.
+ AC_CHECK_LIB([pthread], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread
+ LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread])
+ if test -z "$gl_have_pthread"; then
+ # For FreeBSD 4.
+ AC_CHECK_LIB([c_r], [pthread_kill],
+ [gl_have_pthread=yes
+ LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r
+ LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r])
+ fi
+ fi
+ if test -n "$gl_have_pthread"; then
+ gl_threads_api=posix
+ AC_DEFINE([USE_POSIX_THREADS], [1],
+ [Define if the POSIX multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_POSIX_THREADS_WEAK], [1],
+ [Define if references to the POSIX multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then
+ gl_have_solaristhread=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lthread"
+ AC_TRY_LINK([#include <thread.h>
+#include <synch.h>],
+ [thr_self();],
+ [gl_have_solaristhread=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_solaristhread"; then
+ gl_threads_api=solaris
+ LIBTHREAD=-lthread
+ LTLIBTHREAD=-lthread
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_SOLARIS_THREADS], [1],
+ [Define if the old Solaris multithreading library can be used.])
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_SOLARIS_THREADS_WEAK], [1],
+ [Define if references to the old Solaris multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ fi
+ fi
+ if test "$gl_use_threads" = pth; then
+ gl_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_LINKFLAGS([pth])
+ gl_have_pth=
+ gl_save_LIBS="$LIBS"
+ LIBS="$LIBS -lpth"
+ AC_TRY_LINK([#include <pth.h>], [pth_self();], [gl_have_pth=yes])
+ LIBS="$gl_save_LIBS"
+ if test -n "$gl_have_pth"; then
+ gl_threads_api=pth
+ LIBTHREAD="$LIBPTH"
+ LTLIBTHREAD="$LTLIBPTH"
+ LIBMULTITHREAD="$LIBTHREAD"
+ LTLIBMULTITHREAD="$LTLIBTHREAD"
+ AC_DEFINE([USE_PTH_THREADS], [1],
+ [Define if the GNU Pth multithreading library can be used.])
+ if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then
+ if test $gl_have_weak = yes; then
+ AC_DEFINE([USE_PTH_THREADS_WEAK], [1],
+ [Define if references to the GNU Pth multithreading library should be made weak.])
+ LIBTHREAD=
+ LTLIBTHREAD=
+ fi
+ fi
+ else
+ CPPFLAGS="$gl_save_CPPFLAGS"
+ fi
+ fi
+ if test -z "$gl_have_pthread"; then
+ if test "$gl_use_threads" = yes || test "$gl_use_threads" = win32; then
+ if { case "$host_os" in
+ mingw*) true;;
+ *) false;;
+ esac
+ }; then
+ gl_threads_api=win32
+ AC_DEFINE([USE_WIN32_THREADS], [1],
+ [Define if the Win32 multithreading API can be used.])
+ fi
+ fi
+ fi
+ fi
+ AC_MSG_CHECKING([for multithread API to use])
+ AC_MSG_RESULT([$gl_threads_api])
+ AC_SUBST([LIBTHREAD])
+ AC_SUBST([LTLIBTHREAD])
+ AC_SUBST([LIBMULTITHREAD])
+ AC_SUBST([LTLIBMULTITHREAD])
+])
+
+AC_DEFUN([gl_THREADLIB],
+[
+ AC_REQUIRE([gl_THREADLIB_EARLY])
+ AC_REQUIRE([gl_THREADLIB_BODY])
+])
+
+
+dnl gl_DISABLE_THREADS
+dnl ------------------
+dnl Sets the gl_THREADLIB default so that threads are not used by default.
+dnl The user can still override it at installation time, by using the
+dnl configure option '--enable-threads'.
+
+AC_DEFUN([gl_DISABLE_THREADS], [
+ m4_divert_text([INIT_PREPARE], [gl_use_threads_default=no])
+])
+
+
+dnl Survey of platforms:
+dnl
+dnl Platform Available Compiler Supports test-lock
+dnl flavours option weak result
+dnl --------------- --------- --------- -------- ---------
+dnl Linux 2.4/glibc posix -lpthread Y OK
+dnl
+dnl GNU Hurd/glibc posix
+dnl
+dnl FreeBSD 5.3 posix -lc_r Y
+dnl posix -lkse ? Y
+dnl posix -lpthread ? Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 5.2 posix -lc_r Y
+dnl posix -lkse Y
+dnl posix -lthr Y
+dnl
+dnl FreeBSD 4.0,4.10 posix -lc_r Y OK
+dnl
+dnl NetBSD 1.6 --
+dnl
+dnl OpenBSD 3.4 posix -lpthread Y OK
+dnl
+dnl MacOS X 10.[123] posix -lpthread Y OK
+dnl
+dnl Solaris 7,8,9 posix -lpthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl solaris -lthread Y Sol 7,8: 0.0; Sol 9: OK
+dnl
+dnl HP-UX 11 posix -lpthread N (cc) OK
+dnl Y (gcc)
+dnl
+dnl IRIX 6.5 posix -lpthread Y 0.5
+dnl
+dnl AIX 4.3,5.1 posix -lpthread N AIX 4: 0.5; AIX 5: OK
+dnl
+dnl OSF/1 4.0,5.1 posix -pthread (cc) N OK
+dnl -lpthread (gcc) Y
+dnl
+dnl Cygwin posix -lpthread Y OK
+dnl
+dnl Any of the above pth -lpth 0.0
+dnl
+dnl Mingw win32 N OK
+dnl
+dnl BeOS 5 --
+dnl
+dnl The test-lock result shows what happens if in test-lock.c EXPLICIT_YIELD is
+dnl turned off:
+dnl OK if all three tests terminate OK,
+dnl 0.5 if the first test terminates OK but the second one loops endlessly,
+dnl 0.0 if the first test already loops endlessly.
diff --git a/ltdl/m4/time_h.m4 b/ltdl/m4/time_h.m4
new file mode 100755
index 00000000..c00bfae9
--- /dev/null
+++ b/ltdl/m4/time_h.m4
@@ -0,0 +1,74 @@
+# Configure a more-standard replacement for <time.h>.
+
+# Copyright (C) 2000-2001, 2003-2007, 2009-2010 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# Written by Paul Eggert and Jim Meyering.
+
+AC_DEFUN([gl_HEADER_TIME_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_HEADER_TIME_H_BODY])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_BODY],
+[
+ AC_REQUIRE([AC_C_RESTRICT])
+ AC_REQUIRE([gl_HEADER_TIME_H_DEFAULTS])
+ gl_CHECK_NEXT_HEADERS([time.h])
+ AC_REQUIRE([gl_CHECK_TYPE_STRUCT_TIMESPEC])
+])
+
+AC_DEFUN([gl_HEADER_TIME_H_DEFAULTS],
+[
+ dnl If another module says to replace or to not replace, do that.
+ dnl Otherwise, replace only if someone compiles with -DGNULIB_PORTCHECK;
+ dnl this lets maintainers check for portability.
+ REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; AC_SUBST([REPLACE_LOCALTIME_R])
+ REPLACE_MKTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_MKTIME])
+ REPLACE_NANOSLEEP=GNULIB_PORTCHECK; AC_SUBST([REPLACE_NANOSLEEP])
+ REPLACE_STRPTIME=GNULIB_PORTCHECK; AC_SUBST([REPLACE_STRPTIME])
+ REPLACE_TIMEGM=GNULIB_PORTCHECK; AC_SUBST([REPLACE_TIMEGM])
+])
+
+dnl Define HAVE_STRUCT_TIMESPEC if `struct timespec' is declared
+dnl in time.h or sys/time.h.
+
+AC_DEFUN([gl_CHECK_TYPE_STRUCT_TIMESPEC],
+[
+ AC_CHECK_HEADERS_ONCE([sys/time.h])
+ AC_CACHE_CHECK([for struct timespec in <time.h>],
+ [gl_cv_sys_struct_timespec_in_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_time_h=no])])
+
+ TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
+ if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
+ TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ else
+ AC_CACHE_CHECK([for struct timespec in <sys/time.h>],
+ [gl_cv_sys_struct_timespec_in_sys_time_h],
+ [AC_COMPILE_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[#include <sys/time.h>
+ ]],
+ [[static struct timespec x; x.tv_sec = x.tv_nsec;]])],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=yes],
+ [gl_cv_sys_struct_timespec_in_sys_time_h=no])])
+ if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
+ SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
+ fi
+ fi
+ AC_SUBST([TIME_H_DEFINES_STRUCT_TIMESPEC])
+ AC_SUBST([SYS_TIME_H_DEFINES_STRUCT_TIMESPEC])
+])
diff --git a/ltdl/m4/tmpdir.m4 b/ltdl/m4/tmpdir.m4
new file mode 100755
index 00000000..b2ace868
--- /dev/null
+++ b/ltdl/m4/tmpdir.m4
@@ -0,0 +1,12 @@
+# tmpdir.m4 serial 3
+dnl Copyright (C) 2001-2002, 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+# Prerequisites for lib/tmpdir.c
+
+AC_DEFUN([gt_TMPDIR],
+[
+ AC_CHECK_FUNCS([__secure_getenv])
+])
diff --git a/ltdl/m4/uintmax_t.m4 b/ltdl/m4/uintmax_t.m4
new file mode 100755
index 00000000..03b51bcf
--- /dev/null
+++ b/ltdl/m4/uintmax_t.m4
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 12
+dnl Copyright (C) 1997-2004, 2007-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 Paul Eggert.
+
+AC_PREREQ([2.13])
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ test $ac_cv_type_unsigned_long_long_int = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED([uintmax_t], [$ac_type],
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE([HAVE_UINTMAX_T], [1],
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/ltdl/m4/uintmax_t.m4~ b/ltdl/m4/uintmax_t.m4~
new file mode 100644
index 00000000..bf83ed74
--- /dev/null
+++ b/ltdl/m4/uintmax_t.m4~
@@ -0,0 +1,30 @@
+# uintmax_t.m4 serial 9
+dnl Copyright (C) 1997-2004 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 Paul Eggert.
+
+AC_PREREQ(2.13)
+
+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
+# if it is not already defined in <stdint.h> or <inttypes.h>.
+
+AC_DEFUN([gl_AC_TYPE_UINTMAX_T],
+[
+ AC_REQUIRE([gl_AC_HEADER_INTTYPES_H])
+ AC_REQUIRE([gl_AC_HEADER_STDINT_H])
+ if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then
+ AC_REQUIRE([gl_AC_TYPE_UNSIGNED_LONG_LONG])
+ test $ac_cv_type_unsigned_long_long = yes \
+ && ac_type='unsigned long long' \
+ || ac_type='unsigned long'
+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
+ [Define to unsigned long or unsigned long long
+ if <stdint.h> and <inttypes.h> don't define.])
+ else
+ AC_DEFINE(HAVE_UINTMAX_T, 1,
+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
+ fi
+])
diff --git a/ltdl/m4/ulonglong.m4 b/ltdl/m4/ulonglong.m4
new file mode 100644
index 00000000..9fae98e3
--- /dev/null
+++ b/ltdl/m4/ulonglong.m4
@@ -0,0 +1,48 @@
+# ulonglong.m4 serial 6
+dnl Copyright (C) 1999-2006 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 Paul Eggert.
+
+# Define HAVE_UNSIGNED_LONG_LONG_INT if 'unsigned long long int' works.
+# This fixes a bug in Autoconf 2.60, but can be removed once we
+# assume 2.61 everywhere.
+
+# Note: If the type 'unsigned long long int' exists but is only 32 bits
+# large (as on some very old compilers), AC_TYPE_UNSIGNED_LONG_LONG_INT
+# will not be defined. In this case you can treat 'unsigned long long int'
+# like 'unsigned long int'.
+
+AC_DEFUN([AC_TYPE_UNSIGNED_LONG_LONG_INT],
+[
+ AC_CACHE_CHECK([for unsigned long long int],
+ [ac_cv_type_unsigned_long_long_int],
+ [AC_LINK_IFELSE(
+ [AC_LANG_PROGRAM(
+ [[unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);]])],
+ [ac_cv_type_unsigned_long_long_int=yes],
+ [ac_cv_type_unsigned_long_long_int=no])])
+ if test $ac_cv_type_unsigned_long_long_int = yes; then
+ AC_DEFINE([HAVE_UNSIGNED_LONG_LONG_INT], 1,
+ [Define to 1 if the system has the type `unsigned long long int'.])
+ fi
+])
+
+# This macro is obsolescent and should go away soon.
+AC_DEFUN([gl_AC_TYPE_UNSIGNED_LONG_LONG],
+[
+ AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT])
+ ac_cv_type_unsigned_long_long=$ac_cv_type_unsigned_long_long_int
+ if test $ac_cv_type_unsigned_long_long = yes; then
+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
+ [Define if you have the 'unsigned long long' type.])
+ fi
+])
diff --git a/ltdl/m4/ungetc.m4 b/ltdl/m4/ungetc.m4
new file mode 100755
index 00000000..68ccf883
--- /dev/null
+++ b/ltdl/m4/ungetc.m4
@@ -0,0 +1,36 @@
+# ungetc.m4 serial 2
+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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN_ONCE([gl_FUNC_UNGETC_WORKS],
+[
+ AC_REQUIRE([AC_PROG_CC])
+
+ AC_CACHE_CHECK([whether ungetc works on arbitrary bytes],
+ [gl_cv_func_ungetc_works],
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([[
+#include <stdio.h>
+ ]], [FILE *f;
+ if (!(f = fopen ("conftest.tmp", "w+"))) return 1;
+ if (fputs ("abc", f) < 0) return 2;
+ rewind (f);
+ if (fgetc (f) != 'a') return 3;
+ if (fgetc (f) != 'b') return 4;
+ if (ungetc ('d', f) != 'd') return 5;
+ if (ftell (f) != 1) return 6;
+ if (fgetc (f) != 'd') return 7;
+ if (ftell (f) != 2) return 8;
+ if (fseek (f, 0, SEEK_CUR) != 0) return 9;
+ if (ftell (f) != 2) return 10;
+ if (fgetc (f) != 'c') return 11;
+ fclose (f); remove ("conftest.tmp");])],
+ [gl_cv_func_ungetc_works=yes], [gl_cv_func_ungetc_works=no],
+ [gl_cv_func_ungetc_works='guessing no'])
+ ])
+ if test "$gl_cv_func_ungetc_works" != yes; then
+ AC_DEFINE([FUNC_UNGETC_BROKEN], [1],
+ [Define to 1 if ungetc is broken when used on arbitrary bytes.])
+ fi
+])
diff --git a/ltdl/m4/unistd-safer.m4 b/ltdl/m4/unistd-safer.m4
new file mode 100755
index 00000000..74c3ce60
--- /dev/null
+++ b/ltdl/m4/unistd-safer.m4
@@ -0,0 +1,13 @@
+#serial 8
+dnl Copyright (C) 2002, 2005-2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_UNISTD_SAFER],
+[
+ AC_CHECK_FUNCS_ONCE([pipe])
+ AC_LIBOBJ([dup-safer])
+ AC_LIBOBJ([fd-safer])
+ AC_LIBOBJ([pipe-safer])
+])
diff --git a/ltdl/m4/unistd_h.m4 b/ltdl/m4/unistd_h.m4
new file mode 100755
index 00000000..31d31c1e
--- /dev/null
+++ b/ltdl/m4/unistd_h.m4
@@ -0,0 +1,149 @@
+# unistd_h.m4 serial 39
+dnl Copyright (C) 2006-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 Written by Simon Josefsson, Bruno Haible.
+
+AC_DEFUN([gl_UNISTD_H],
+[
+ dnl Use AC_REQUIRE here, so that the default behavior below is expanded
+ dnl once only, before all statements that occur in other macros.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ AC_REQUIRE([AC_C_INLINE])
+
+ gl_CHECK_NEXT_HEADERS([unistd.h])
+
+ AC_CHECK_HEADERS_ONCE([unistd.h])
+ if test $ac_cv_header_unistd_h = yes; then
+ HAVE_UNISTD_H=1
+ else
+ HAVE_UNISTD_H=0
+ fi
+ AC_SUBST([HAVE_UNISTD_H])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[#include <unistd.h>
+/* Some systems declare various items in the wrong headers. */
+#ifndef __GLIBC__
+# include <fcntl.h>
+# include <stdio.h>
+# include <stdlib.h>
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+# include <io.h>
+# endif
+#endif
+ ]], [chown dup2 dup3 environ euidaccess faccessat fchdir fchownat
+ fsync ftruncate getcwd getdomainname getdtablesize getgroups
+ gethostname getlogin getlogin_r getpagesize getusershell setusershell
+ endusershell lchown link linkat lseek pipe2 pread readlink readlinkat
+ rmdir sleep symlink symlinkat unlink unlinkat usleep])
+])
+
+AC_DEFUN([gl_UNISTD_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_UNISTD_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_UNISTD_H_DEFAULTS],
+[
+ GNULIB_CHOWN=0; AC_SUBST([GNULIB_CHOWN])
+ GNULIB_CLOSE=0; AC_SUBST([GNULIB_CLOSE])
+ GNULIB_DUP2=0; AC_SUBST([GNULIB_DUP2])
+ GNULIB_DUP3=0; AC_SUBST([GNULIB_DUP3])
+ GNULIB_ENVIRON=0; AC_SUBST([GNULIB_ENVIRON])
+ GNULIB_EUIDACCESS=0; AC_SUBST([GNULIB_EUIDACCESS])
+ GNULIB_FACCESSAT=0; AC_SUBST([GNULIB_FACCESSAT])
+ GNULIB_FCHDIR=0; AC_SUBST([GNULIB_FCHDIR])
+ GNULIB_FCHOWNAT=0; AC_SUBST([GNULIB_FCHOWNAT])
+ GNULIB_FSYNC=0; AC_SUBST([GNULIB_FSYNC])
+ GNULIB_FTRUNCATE=0; AC_SUBST([GNULIB_FTRUNCATE])
+ GNULIB_GETCWD=0; AC_SUBST([GNULIB_GETCWD])
+ GNULIB_GETDOMAINNAME=0; AC_SUBST([GNULIB_GETDOMAINNAME])
+ GNULIB_GETDTABLESIZE=0; AC_SUBST([GNULIB_GETDTABLESIZE])
+ GNULIB_GETGROUPS=0; AC_SUBST([GNULIB_GETGROUPS])
+ GNULIB_GETHOSTNAME=0; AC_SUBST([GNULIB_GETHOSTNAME])
+ GNULIB_GETLOGIN=0; AC_SUBST([GNULIB_GETLOGIN])
+ GNULIB_GETLOGIN_R=0; AC_SUBST([GNULIB_GETLOGIN_R])
+ GNULIB_GETPAGESIZE=0; AC_SUBST([GNULIB_GETPAGESIZE])
+ GNULIB_GETUSERSHELL=0; AC_SUBST([GNULIB_GETUSERSHELL])
+ GNULIB_LCHOWN=0; AC_SUBST([GNULIB_LCHOWN])
+ GNULIB_LINK=0; AC_SUBST([GNULIB_LINK])
+ GNULIB_LINKAT=0; AC_SUBST([GNULIB_LINKAT])
+ GNULIB_LSEEK=0; AC_SUBST([GNULIB_LSEEK])
+ GNULIB_PIPE2=0; AC_SUBST([GNULIB_PIPE2])
+ GNULIB_PREAD=0; AC_SUBST([GNULIB_PREAD])
+ GNULIB_READLINK=0; AC_SUBST([GNULIB_READLINK])
+ GNULIB_READLINKAT=0; AC_SUBST([GNULIB_READLINKAT])
+ GNULIB_RMDIR=0; AC_SUBST([GNULIB_RMDIR])
+ GNULIB_SLEEP=0; AC_SUBST([GNULIB_SLEEP])
+ GNULIB_SYMLINK=0; AC_SUBST([GNULIB_SYMLINK])
+ GNULIB_SYMLINKAT=0; AC_SUBST([GNULIB_SYMLINKAT])
+ GNULIB_UNISTD_H_GETOPT=0; AC_SUBST([GNULIB_UNISTD_H_GETOPT])
+ GNULIB_UNISTD_H_SIGPIPE=0; AC_SUBST([GNULIB_UNISTD_H_SIGPIPE])
+ GNULIB_UNLINK=0; AC_SUBST([GNULIB_UNLINK])
+ GNULIB_UNLINKAT=0; AC_SUBST([GNULIB_UNLINKAT])
+ GNULIB_USLEEP=0; AC_SUBST([GNULIB_USLEEP])
+ GNULIB_WRITE=0; AC_SUBST([GNULIB_WRITE])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_CHOWN=1; AC_SUBST([HAVE_CHOWN])
+ HAVE_DUP2=1; AC_SUBST([HAVE_DUP2])
+ HAVE_DUP3=1; AC_SUBST([HAVE_DUP3])
+ HAVE_EUIDACCESS=1; AC_SUBST([HAVE_EUIDACCESS])
+ HAVE_FACCESSAT=1; AC_SUBST([HAVE_FACCESSAT])
+ HAVE_FCHOWNAT=1; AC_SUBST([HAVE_FCHOWNAT])
+ HAVE_FSYNC=1; AC_SUBST([HAVE_FSYNC])
+ HAVE_FTRUNCATE=1; AC_SUBST([HAVE_FTRUNCATE])
+ HAVE_GETDOMAINNAME=1; AC_SUBST([HAVE_GETDOMAINNAME])
+ HAVE_GETDTABLESIZE=1; AC_SUBST([HAVE_GETDTABLESIZE])
+ HAVE_GETGROUPS=1; AC_SUBST([HAVE_GETGROUPS])
+ HAVE_GETHOSTNAME=1; AC_SUBST([HAVE_GETHOSTNAME])
+ HAVE_GETLOGIN=1; AC_SUBST([HAVE_GETLOGIN])
+ HAVE_GETPAGESIZE=1; AC_SUBST([HAVE_GETPAGESIZE])
+ HAVE_GETUSERSHELL=1; AC_SUBST([HAVE_GETUSERSHELL])
+ HAVE_LCHOWN=1; AC_SUBST([HAVE_LCHOWN])
+ HAVE_LINK=1; AC_SUBST([HAVE_LINK])
+ HAVE_LINKAT=1; AC_SUBST([HAVE_LINKAT])
+ HAVE_PIPE2=1; AC_SUBST([HAVE_PIPE2])
+ HAVE_PREAD=1; AC_SUBST([HAVE_PREAD])
+ HAVE_READLINK=1; AC_SUBST([HAVE_READLINK])
+ HAVE_READLINKAT=1; AC_SUBST([HAVE_READLINKAT])
+ HAVE_SLEEP=1; AC_SUBST([HAVE_SLEEP])
+ HAVE_SYMLINK=1; AC_SUBST([HAVE_SYMLINK])
+ HAVE_SYMLINKAT=1; AC_SUBST([HAVE_SYMLINKAT])
+ HAVE_DECL_ENVIRON=1; AC_SUBST([HAVE_DECL_ENVIRON])
+ HAVE_DECL_GETLOGIN_R=1; AC_SUBST([HAVE_DECL_GETLOGIN_R])
+ HAVE_OS_H=0; AC_SUBST([HAVE_OS_H])
+ HAVE_SYS_PARAM_H=0; AC_SUBST([HAVE_SYS_PARAM_H])
+ HAVE_UNLINKAT=1; AC_SUBST([HAVE_UNLINKAT])
+ HAVE_USLEEP=1; AC_SUBST([HAVE_USLEEP])
+ REPLACE_CHOWN=0; AC_SUBST([REPLACE_CHOWN])
+ REPLACE_CLOSE=0; AC_SUBST([REPLACE_CLOSE])
+ REPLACE_DUP=0; AC_SUBST([REPLACE_DUP])
+ REPLACE_DUP2=0; AC_SUBST([REPLACE_DUP2])
+ REPLACE_FCHDIR=0; AC_SUBST([REPLACE_FCHDIR])
+ REPLACE_FCHOWNAT=0; AC_SUBST([REPLACE_FCHOWNAT])
+ REPLACE_GETCWD=0; AC_SUBST([REPLACE_GETCWD])
+ REPLACE_GETGROUPS=0; AC_SUBST([REPLACE_GETGROUPS])
+ REPLACE_GETPAGESIZE=0; AC_SUBST([REPLACE_GETPAGESIZE])
+ REPLACE_LCHOWN=0; AC_SUBST([REPLACE_LCHOWN])
+ REPLACE_LINK=0; AC_SUBST([REPLACE_LINK])
+ REPLACE_LINKAT=0; AC_SUBST([REPLACE_LINKAT])
+ REPLACE_LSEEK=0; AC_SUBST([REPLACE_LSEEK])
+ REPLACE_PREAD=0; AC_SUBST([REPLACE_PREAD])
+ REPLACE_READLINK=0; AC_SUBST([REPLACE_READLINK])
+ REPLACE_RMDIR=0; AC_SUBST([REPLACE_RMDIR])
+ REPLACE_SLEEP=0; AC_SUBST([REPLACE_SLEEP])
+ REPLACE_SYMLINK=0; AC_SUBST([REPLACE_SYMLINK])
+ REPLACE_UNLINK=0; AC_SUBST([REPLACE_UNLINK])
+ REPLACE_UNLINKAT=0; AC_SUBST([REPLACE_UNLINKAT])
+ REPLACE_USLEEP=0; AC_SUBST([REPLACE_USLEEP])
+ REPLACE_WRITE=0; AC_SUBST([REPLACE_WRITE])
+ UNISTD_H_HAVE_WINSOCK2_H=0; AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H])
+ UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
+ AC_SUBST([UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS])
+])
diff --git a/ltdl/m4/unlocked-io.m4 b/ltdl/m4/unlocked-io.m4
new file mode 100755
index 00000000..bddec0de
--- /dev/null
+++ b/ltdl/m4/unlocked-io.m4
@@ -0,0 +1,41 @@
+# unlocked-io.m4 serial 15
+
+# Copyright (C) 1998-2006, 2009-2010 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl From Jim Meyering.
+dnl
+dnl See if the glibc *_unlocked I/O macros or functions are available.
+dnl Use only those *_unlocked macros or functions that are declared
+dnl (because some of them were declared in Solaris 2.5.1 but were removed
+dnl in Solaris 2.6, whereas we want binaries built on Solaris 2.5.1 to run
+dnl on Solaris 2.6).
+
+AC_DEFUN([gl_FUNC_GLIBC_UNLOCKED_IO],
+[
+ AC_DEFINE([USE_UNLOCKED_IO], [1],
+ [Define to 1 if you want getc etc. to use unlocked I/O if available.
+ Unlocked I/O can improve performance in unithreaded apps,
+ but it is not safe for multithreaded apps.])
+
+ dnl Persuade glibc and Solaris <stdio.h> to declare
+ dnl fgets_unlocked(), fputs_unlocked() etc.
+ AC_REQUIRE([gl_USE_SYSTEM_EXTENSIONS])
+
+ AC_CHECK_DECLS_ONCE([clearerr_unlocked])
+ AC_CHECK_DECLS_ONCE([feof_unlocked])
+ AC_CHECK_DECLS_ONCE([ferror_unlocked])
+ AC_CHECK_DECLS_ONCE([fflush_unlocked])
+ AC_CHECK_DECLS_ONCE([fgets_unlocked])
+ AC_CHECK_DECLS_ONCE([fputc_unlocked])
+ AC_CHECK_DECLS_ONCE([fputs_unlocked])
+ AC_CHECK_DECLS_ONCE([fread_unlocked])
+ AC_CHECK_DECLS_ONCE([fwrite_unlocked])
+ AC_CHECK_DECLS_ONCE([getc_unlocked])
+ AC_CHECK_DECLS_ONCE([getchar_unlocked])
+ AC_CHECK_DECLS_ONCE([putc_unlocked])
+ AC_CHECK_DECLS_ONCE([putchar_unlocked])
+])
diff --git a/ltdl/m4/vasnprintf-posix.m4 b/ltdl/m4/vasnprintf-posix.m4
new file mode 100755
index 00000000..b37dc7e2
--- /dev/null
+++ b/ltdl/m4/vasnprintf-posix.m4
@@ -0,0 +1,100 @@
+# vasnprintf-posix.m4 serial 13
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_VASNPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vasnprintf_posix=no
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasnprintf = yes; then
+ # vasnprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasnprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasnprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ fi
+])
diff --git a/ltdl/m4/vasnprintf.m4 b/ltdl/m4/vasnprintf.m4
new file mode 100755
index 00000000..50a20cca
--- /dev/null
+++ b/ltdl/m4/vasnprintf.m4
@@ -0,0 +1,276 @@
+# vasnprintf.m4 serial 29
+dnl Copyright (C) 2002-2004, 2006-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.
+
+AC_DEFUN([gl_FUNC_VASNPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ if test $ac_cv_func_vasnprintf = no; then
+ gl_REPLACE_VASNPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VASNPRINTF],
+[
+ AC_CHECK_FUNCS_ONCE([vasnprintf])
+ AC_LIBOBJ([vasnprintf])
+ AC_LIBOBJ([printf-args])
+ AC_LIBOBJ([printf-parse])
+ AC_LIBOBJ([asnprintf])
+ if test $ac_cv_func_vasnprintf = yes; then
+ AC_DEFINE([REPLACE_VASNPRINTF], [1],
+ [Define if vasnprintf exists but is overridden by gnulib.])
+ fi
+ gl_PREREQ_PRINTF_ARGS
+ gl_PREREQ_PRINTF_PARSE
+ gl_PREREQ_VASNPRINTF
+ gl_PREREQ_ASNPRINTF
+])
+
+# Prequisites of lib/printf-args.h, lib/printf-args.c.
+AC_DEFUN([gl_PREREQ_PRINTF_ARGS],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+])
+
+# Prequisites of lib/printf-parse.h, lib/printf-parse.c.
+AC_DEFUN([gl_PREREQ_PRINTF_PARSE],
+[
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_REQUIRE([AC_TYPE_SIZE_T])
+ AC_CHECK_TYPE([ptrdiff_t], ,
+ [AC_DEFINE([ptrdiff_t], [long],
+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
+ ])
+ AC_REQUIRE([gt_AC_TYPE_INTMAX_T])
+])
+
+# Prerequisites of lib/vasnprintf.c.
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF],
+[
+ AC_REQUIRE([AC_FUNC_ALLOCA])
+ AC_REQUIRE([AC_TYPE_LONG_LONG_INT])
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ AC_CHECK_FUNCS([snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb])
+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
+ AC_CHECK_DECLS([_snprintf], , , [#include <stdio.h>])
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting 'long double'
+# arguments.
+AC_DEFUN_ONCE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE],
+[
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE],
+[
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_INFINITE_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ infinite 'double' arguments.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting infinite 'long double'
+# arguments.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE],
+[
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ dnl There is no need to set NEED_PRINTF_INFINITE_LONG_DOUBLE if
+ dnl NEED_PRINTF_LONG_DOUBLE is already set.
+ AC_REQUIRE([gl_PREREQ_VASNPRINTF_LONG_DOUBLE])
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_INFINITE_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ infinite 'long double' arguments.])
+ ;;
+ esac
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'a' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_A],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_A], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'a' and 'A' directives.])
+ AC_CHECK_FUNCS([nl_langinfo])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'F' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_F],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_F], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'F' directive.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 'ls' directive.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_DIRECTIVE_LS],
+[
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_DIRECTIVE_LS], [1],
+ [Define if the vasnprintf implementation needs special code for
+ the 'ls' directive.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the ' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_GROUPING],
+[
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_GROUPING], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ ' flag.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the '-' flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST],
+[
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_LEFTADJUST], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ '-' flag.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting the 0 flag.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_FLAG_ZERO],
+[
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_FLAG_ZERO], [1],
+ [Define if the vasnprintf implementation needs special code for the
+ 0 flag.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for supporting large precisions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_PRECISION],
+[
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_UNBOUNDED_PRECISION], [1],
+ [Define if the vasnprintf implementation needs special code for
+ supporting large precisions without arbitrary bounds.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+
+# Extra prerequisites of lib/vasnprintf.c for surviving out-of-memory
+# conditions.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_ENOMEM],
+[
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ ;;
+ *)
+ AC_DEFINE([NEED_PRINTF_ENOMEM], [1],
+ [Define if the vasnprintf implementation needs special code for
+ surviving out-of-memory conditions.])
+ AC_DEFINE([NEED_PRINTF_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'double' arguments.])
+ AC_DEFINE([NEED_PRINTF_LONG_DOUBLE], [1],
+ [Define if the vasnprintf implementation needs special code for
+ 'long double' arguments.])
+ ;;
+ esac
+])
+
+# Prerequisites of lib/vasnprintf.c including all extras for POSIX compliance.
+AC_DEFUN([gl_PREREQ_VASNPRINTF_WITH_EXTRAS],
+[
+ AC_REQUIRE([gl_PREREQ_VASNPRINTF])
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+])
+
+# Prerequisites of lib/asnprintf.c.
+AC_DEFUN([gl_PREREQ_ASNPRINTF],
+[
+])
diff --git a/ltdl/m4/vasprintf-posix.m4 b/ltdl/m4/vasprintf-posix.m4
new file mode 100755
index 00000000..a0b7bc66
--- /dev/null
+++ b/ltdl/m4/vasprintf-posix.m4
@@ -0,0 +1,101 @@
+# vasprintf-posix.m4 serial 13
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_VASPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vasprintf_posix=no
+ AC_CHECK_FUNCS([vasprintf])
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ if test $ac_cv_func_vasprintf = yes; then
+ # vasprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vasprintf_posix=yes
+ fi
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vasprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_VASPRINTF
+ fi
+])
diff --git a/ltdl/m4/vasprintf.m4 b/ltdl/m4/vasprintf.m4
new file mode 100755
index 00000000..b142bc0f
--- /dev/null
+++ b/ltdl/m4/vasprintf.m4
@@ -0,0 +1,46 @@
+# vasprintf.m4 serial 6
+dnl Copyright (C) 2002-2003, 2006-2007, 2009-2010 Free Software Foundation,
+dnl 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.
+
+AC_DEFUN([gl_FUNC_VASPRINTF],
+[
+ AC_CHECK_FUNCS([vasprintf])
+ if test $ac_cv_func_vasprintf = no; then
+ gl_REPLACE_VASPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VASPRINTF],
+[
+ AC_LIBOBJ([vasprintf])
+ AC_LIBOBJ([asprintf])
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ if test $ac_cv_func_vasprintf = yes; then
+ REPLACE_VASPRINTF=1
+ else
+ HAVE_VASPRINTF=0
+ fi
+ gl_PREREQ_VASPRINTF_H
+ gl_PREREQ_VASPRINTF
+ gl_PREREQ_ASPRINTF
+])
+
+# Prerequisites of the vasprintf portion of lib/stdio.h.
+AC_DEFUN([gl_PREREQ_VASPRINTF_H],
+[
+ dnl Persuade glibc <stdio.h> to declare asprintf() and vasprintf().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+])
+
+# Prerequisites of lib/vasprintf.c.
+AC_DEFUN([gl_PREREQ_VASPRINTF],
+[
+])
+
+# Prerequisites of lib/asprintf.c.
+AC_DEFUN([gl_PREREQ_ASPRINTF],
+[
+])
diff --git a/ltdl/m4/version-etc.m4 b/ltdl/m4/version-etc.m4
new file mode 100755
index 00000000..2c572b4b
--- /dev/null
+++ b/ltdl/m4/version-etc.m4
@@ -0,0 +1,33 @@
+# version-etc.m4 serial 1
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+dnl $1 - configure flag and define name
+dnl $2 - human readable description
+m4_define([gl_VERSION_ETC_FLAG],
+[dnl
+ AC_ARG_WITH([$1], [AS_HELP_STRING([--with-$1], [$2])],
+ [dnl
+ case $withval in
+ yes|no) ;;
+ *) AC_DEFINE_UNQUOTED(AS_TR_CPP([PACKAGE_$1]), ["$withval"], [$2]) ;;
+ esac
+ ])
+])
+
+AC_DEFUN([gl_VERSION_ETC],
+[dnl
+ gl_VERSION_ETC_FLAG([packager],
+ [String identifying the packager of this software])
+ gl_VERSION_ETC_FLAG([packager-version],
+ [Packager-specific version information])
+ gl_VERSION_ETC_FLAG([packager-bug-reports],
+ [Packager info for bug reports (URL/e-mail/...)])
+ if test "X$with_packager" = "X" && \
+ test "X$with_packager_version$with_packager_bug_reports" != "X"
+ then
+ AC_MSG_ERROR([The --with-packager-{bug-reports,version} options require --with-packager])
+ fi
+])
diff --git a/ltdl/m4/vfprintf-posix.m4 b/ltdl/m4/vfprintf-posix.m4
new file mode 100755
index 00000000..6f35b2f3
--- /dev/null
+++ b/ltdl/m4/vfprintf-posix.m4
@@ -0,0 +1,110 @@
+# vfprintf-posix.m4 serial 14
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_VFPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_PRINTF_SIZES_C99])
+ AC_REQUIRE([gl_PRINTF_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_INFINITE])
+ AC_REQUIRE([gl_PRINTF_INFINITE_LONG_DOUBLE])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_A])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_F])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_N])
+ AC_REQUIRE([gl_PRINTF_DIRECTIVE_LS])
+ AC_REQUIRE([gl_PRINTF_POSITIONS])
+ AC_REQUIRE([gl_PRINTF_FLAG_GROUPING])
+ AC_REQUIRE([gl_PRINTF_FLAG_LEFTADJUST])
+ AC_REQUIRE([gl_PRINTF_FLAG_ZERO])
+ AC_REQUIRE([gl_PRINTF_PRECISION])
+ AC_REQUIRE([gl_PRINTF_ENOMEM])
+ gl_cv_func_vfprintf_posix=no
+ case "$gl_cv_func_printf_sizes_c99" in
+ *yes)
+ case "$gl_cv_func_printf_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_infinite" in
+ *yes)
+ case "$gl_cv_func_printf_infinite_long_double" in
+ *yes)
+ case "$gl_cv_func_printf_directive_a" in
+ *yes)
+ case "$gl_cv_func_printf_directive_f" in
+ *yes)
+ case "$gl_cv_func_printf_directive_n" in
+ *yes)
+ case "$gl_cv_func_printf_directive_ls" in
+ *yes)
+ case "$gl_cv_func_printf_positions" in
+ *yes)
+ case "$gl_cv_func_printf_flag_grouping" in
+ *yes)
+ case "$gl_cv_func_printf_flag_leftadjust" in
+ *yes)
+ case "$gl_cv_func_printf_flag_zero" in
+ *yes)
+ case "$gl_cv_func_printf_precision" in
+ *yes)
+ case "$gl_cv_func_printf_enomem" in
+ *yes)
+ # vfprintf exists and is
+ # already POSIX compliant.
+ gl_cv_func_vfprintf_posix=yes
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ if test $gl_cv_func_vfprintf_posix = no; then
+ gl_PREREQ_VASNPRINTF_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_DOUBLE
+ gl_PREREQ_VASNPRINTF_INFINITE_LONG_DOUBLE
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_A
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_F
+ gl_PREREQ_VASNPRINTF_DIRECTIVE_LS
+ gl_PREREQ_VASNPRINTF_FLAG_GROUPING
+ gl_PREREQ_VASNPRINTF_FLAG_LEFTADJUST
+ gl_PREREQ_VASNPRINTF_FLAG_ZERO
+ gl_PREREQ_VASNPRINTF_PRECISION
+ gl_PREREQ_VASNPRINTF_ENOMEM
+ gl_REPLACE_VASNPRINTF
+ gl_REPLACE_VFPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VFPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([vfprintf])
+ REPLACE_VFPRINTF=1
+ AC_DEFINE([REPLACE_VFPRINTF_POSIX], [1],
+ [Define if vfprintf is overridden by a POSIX compliant gnulib implementation.])
+ gl_PREREQ_VFPRINTF
+])
+
+AC_DEFUN([gl_PREREQ_VFPRINTF], [:])
diff --git a/ltdl/m4/visibility.m4 b/ltdl/m4/visibility.m4
new file mode 100755
index 00000000..35a6dc0e
--- /dev/null
+++ b/ltdl/m4/visibility.m4
@@ -0,0 +1,52 @@
+# visibility.m4 serial 2 (gettext-0.18)
+dnl Copyright (C) 2005, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl MacOS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ AC_MSG_CHECKING([for simple visibility declarations])
+ AC_CACHE_VAL([gl_cv_cc_visibility], [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ AC_TRY_COMPILE(
+ [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
+ [],
+ [gl_cv_cc_visibility=yes],
+ [gl_cv_cc_visibility=no])
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_visibility])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/ltdl/m4/visibility.m4~ b/ltdl/m4/visibility.m4~
new file mode 100644
index 00000000..2ff6330a
--- /dev/null
+++ b/ltdl/m4/visibility.m4~
@@ -0,0 +1,52 @@
+# visibility.m4 serial 1 (gettext-0.15)
+dnl Copyright (C) 2005 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 Bruno Haible.
+
+dnl Tests whether the compiler supports the command-line option
+dnl -fvisibility=hidden and the function and variable attributes
+dnl __attribute__((__visibility__("hidden"))) and
+dnl __attribute__((__visibility__("default"))).
+dnl Does *not* test for __visibility__("protected") - which has tricky
+dnl semantics (see the 'vismain' test in glibc) and does not exist e.g. on
+dnl MacOS X.
+dnl Does *not* test for __visibility__("internal") - which has processor
+dnl dependent semantics.
+dnl Does *not* test for #pragma GCC visibility push(hidden) - which is
+dnl "really only recommended for legacy code".
+dnl Set the variable CFLAG_VISIBILITY.
+dnl Defines and sets the variable HAVE_VISIBILITY.
+
+AC_DEFUN([gl_VISIBILITY],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ CFLAG_VISIBILITY=
+ HAVE_VISIBILITY=0
+ if test -n "$GCC"; then
+ AC_MSG_CHECKING([for simple visibility declarations])
+ AC_CACHE_VAL(gl_cv_cc_visibility, [
+ gl_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS -fvisibility=hidden"
+ AC_TRY_COMPILE(
+ [extern __attribute__((__visibility__("hidden"))) int hiddenvar;
+ extern __attribute__((__visibility__("default"))) int exportedvar;
+ extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
+ extern __attribute__((__visibility__("default"))) int exportedfunc (void);],
+ [],
+ gl_cv_cc_visibility=yes,
+ gl_cv_cc_visibility=no)
+ CFLAGS="$gl_save_CFLAGS"])
+ AC_MSG_RESULT([$gl_cv_cc_visibility])
+ if test $gl_cv_cc_visibility = yes; then
+ CFLAG_VISIBILITY="-fvisibility=hidden"
+ HAVE_VISIBILITY=1
+ fi
+ fi
+ AC_SUBST([CFLAG_VISIBILITY])
+ AC_SUBST([HAVE_VISIBILITY])
+ AC_DEFINE_UNQUOTED([HAVE_VISIBILITY], [$HAVE_VISIBILITY],
+ [Define to 1 or 0, depending whether the compiler supports simple visibility declarations.])
+])
diff --git a/ltdl/m4/vprintf-posix.m4 b/ltdl/m4/vprintf-posix.m4
new file mode 100755
index 00000000..0f249dfe
--- /dev/null
+++ b/ltdl/m4/vprintf-posix.m4
@@ -0,0 +1,25 @@
+# vprintf-posix.m4 serial 3
+dnl Copyright (C) 2007-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.
+
+AC_DEFUN([gl_FUNC_VPRINTF_POSIX],
+[
+ AC_REQUIRE([gl_FUNC_VFPRINTF_POSIX])
+ if test $gl_cv_func_vfprintf_posix = no; then
+ gl_REPLACE_VPRINTF
+ fi
+])
+
+AC_DEFUN([gl_REPLACE_VPRINTF],
+[
+ AC_REQUIRE([gl_STDIO_H_DEFAULTS])
+ AC_LIBOBJ([vprintf])
+ REPLACE_VPRINTF=1
+ AC_DEFINE([REPLACE_VPRINTF_POSIX], [1],
+ [Define if vprintf is overridden by a POSIX compliant gnulib implementation.])
+ gl_PREREQ_VPRINTF
+])
+
+AC_DEFUN([gl_PREREQ_VPRINTF], [:])
diff --git a/ltdl/m4/wait-process.m4 b/ltdl/m4/wait-process.m4
new file mode 100755
index 00000000..22e0698d
--- /dev/null
+++ b/ltdl/m4/wait-process.m4
@@ -0,0 +1,13 @@
+# wait-process.m4 serial 5
+dnl Copyright (C) 2003, 2008, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_WAIT_PROCESS],
+[
+ dnl Prerequisites of lib/wait-process.c.
+ AC_REQUIRE([AC_C_INLINE])
+ AC_REQUIRE([gt_TYPE_SIG_ATOMIC_T])
+ AC_CHECK_FUNCS([waitid])
+])
diff --git a/ltdl/m4/warn-on-use.m4 b/ltdl/m4/warn-on-use.m4
new file mode 100755
index 00000000..42daae87
--- /dev/null
+++ b/ltdl/m4/warn-on-use.m4
@@ -0,0 +1,45 @@
+# warn-on-use.m4 serial 2
+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.
+
+# gl_WARN_ON_USE_PREPARE(INCLUDES, NAMES)
+# ---------------------------------------
+# For each whitespace-separated element in the list of NAMES, define
+# HAVE_RAW_DECL_name if the function has a declaration among INCLUDES
+# even after being undefined as a macro.
+#
+# See warn-on-use.h for some hints on how to poison function names, as
+# well as ideas on poisoning global variables and macros. NAMES may
+# include global variables, but remember that only functions work with
+# _GL_WARN_ON_USE. Typically, INCLUDES only needs to list a single
+# header, but if the replacement header pulls in other headers because
+# some systems declare functions in the wrong header, then INCLUDES
+# should do likewise.
+#
+# If you assume C89, then it is generally safe to assume declarations
+# for functions declared in that standard (such as gets) without
+# needing gl_WARN_ON_USE_PREPARE.
+AC_DEFUN([gl_WARN_ON_USE_PREPARE],
+[
+ m4_foreach_w([gl_decl], [$2],
+ [AH_TEMPLATE([HAVE_RAW_DECL_]AS_TR_CPP(m4_defn([gl_decl])),
+ [Define to 1 if ]m4_defn([gl_decl])[ is declared even after
+ undefining macros.])])dnl
+ for gl_func in m4_flatten([$2]); do
+ AS_VAR_PUSHDEF([gl_Symbol], [gl_cv_have_raw_decl_$gl_func])dnl
+ AC_CACHE_CHECK([whether $gl_func is declared without a macro],
+ gl_Symbol,
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([$1],
+[@%:@undef $gl_func
+ (void) $gl_func;])],
+ [AS_VAR_SET(gl_Symbol, [yes])], [AS_VAR_SET(gl_Symbol, [no])])])
+ AS_VAR_IF(gl_Symbol, [yes],
+ [AC_DEFINE_UNQUOTED(AS_TR_CPP([HAVE_RAW_DECL_$gl_func]), [1])
+ dnl shortcut - if the raw declaration exists, then set a cache
+ dnl variable to allow skipping any later AC_CHECK_DECL efforts
+ eval ac_cv_have_decl_$gl_func=yes])
+ AS_VAR_POPDEF([gl_Symbol])dnl
+ done
+])
diff --git a/ltdl/m4/wchar.m4 b/ltdl/m4/wchar.m4
new file mode 100755
index 00000000..e81485d0
--- /dev/null
+++ b/ltdl/m4/wchar.m4
@@ -0,0 +1,150 @@
+dnl A placeholder for ISO C99 <wchar.h>, for platforms that have issues.
+
+dnl Copyright (C) 2007-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 Written by Eric Blake.
+
+# wchar.m4 serial 31
+
+AC_DEFUN([gl_WCHAR_H],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([gl_WCHAR_H_INLINE_OK])
+ dnl Prepare for creating substitute <wchar.h>.
+ dnl Check for <wchar.h> (missing in Linux uClibc when built without wide
+ dnl character support).
+ dnl <wchar.h> is always overridden, because of GNULIB_POSIXCHECK.
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ gl_CHECK_NEXT_HEADERS([wchar.h])
+ if test $ac_cv_header_wchar_h = yes; then
+ HAVE_WCHAR_H=1
+ else
+ HAVE_WCHAR_H=0
+ fi
+ AC_SUBST([HAVE_WCHAR_H])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ dnl Check for declarations of anything we want to poison if the
+ dnl corresponding gnulib module is not in use.
+ gl_WARN_ON_USE_PREPARE([[
+/* Some systems require additional headers. */
+#ifndef __GLIBC__
+# include <stddef.h>
+# include <stdio.h>
+# include <time.h>
+#endif
+#include <wchar.h>
+ ]], [btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb
+ wcsrtombs wcsnrtombs wcwidth])
+])
+
+dnl Check whether <wchar.h> is usable at all.
+AC_DEFUN([gl_WCHAR_H_INLINE_OK],
+[
+ dnl Test whether <wchar.h> suffers due to the transition from '__inline' to
+ dnl 'gnu_inline'. See <http://sourceware.org/bugzilla/show_bug.cgi?id=4022>
+ dnl and <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42440>. In summary,
+ dnl glibc version 2.5 or older, together with gcc version 4.3 or newer and
+ dnl the option -std=c99 or -std=gnu99, leads to a broken <wchar.h>.
+ AC_CACHE_CHECK([whether <wchar.h> uses 'inline' correctly],
+ [gl_cv_header_wchar_h_correct_inline],
+ [gl_cv_header_wchar_h_correct_inline=yes
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+extern int zero (void);
+int main () { return zero(); }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest1.$ac_objext
+ AC_LANG_CONFTEST([
+ AC_LANG_SOURCE([[#define wcstod renamed_wcstod
+#include <wchar.h>
+int zero (void) { return 0; }
+]])])
+ if AC_TRY_EVAL([ac_compile]); then
+ mv conftest.$ac_objext conftest2.$ac_objext
+ if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&AS_MESSAGE_LOG_FD 2>&1; then
+ :
+ else
+ gl_cv_header_wchar_h_correct_inline=no
+ fi
+ fi
+ fi
+ rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
+ ])
+ if test $gl_cv_header_wchar_h_correct_inline = no; then
+ AC_MSG_ERROR([<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
+This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
+C99 mode. You have four options:
+ - Add the flag -fgnu89-inline to CC and reconfigure, or
+ - Fix your include files, using parts of
+ <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
+ - Use a gcc version older than 4.3, or
+ - Don't use the flags -std=c99 or -std=gnu99.
+Configuration aborted.])
+ fi
+])
+
+dnl Unconditionally enables the replacement of <wchar.h>.
+AC_DEFUN([gl_REPLACE_WCHAR_H],
+[
+ dnl This is a no-op, because <wchar.h> is always overridden.
+ :
+])
+
+AC_DEFUN([gl_WCHAR_MODULE_INDICATOR],
+[
+ dnl Use AC_REQUIRE here, so that the default settings are expanded once only.
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ GNULIB_[]m4_translit([$1],[abcdefghijklmnopqrstuvwxyz./-],[ABCDEFGHIJKLMNOPQRSTUVWXYZ___])=1
+])
+
+AC_DEFUN([gl_WCHAR_H_DEFAULTS],
+[
+ GNULIB_BTOWC=0; AC_SUBST([GNULIB_BTOWC])
+ GNULIB_WCTOB=0; AC_SUBST([GNULIB_WCTOB])
+ GNULIB_MBSINIT=0; AC_SUBST([GNULIB_MBSINIT])
+ GNULIB_MBRTOWC=0; AC_SUBST([GNULIB_MBRTOWC])
+ GNULIB_MBRLEN=0; AC_SUBST([GNULIB_MBRLEN])
+ GNULIB_MBSRTOWCS=0; AC_SUBST([GNULIB_MBSRTOWCS])
+ GNULIB_MBSNRTOWCS=0; AC_SUBST([GNULIB_MBSNRTOWCS])
+ GNULIB_WCRTOMB=0; AC_SUBST([GNULIB_WCRTOMB])
+ GNULIB_WCSRTOMBS=0; AC_SUBST([GNULIB_WCSRTOMBS])
+ GNULIB_WCSNRTOMBS=0; AC_SUBST([GNULIB_WCSNRTOMBS])
+ GNULIB_WCWIDTH=0; AC_SUBST([GNULIB_WCWIDTH])
+ dnl Assume proper GNU behavior unless another module says otherwise.
+ HAVE_BTOWC=1; AC_SUBST([HAVE_BTOWC])
+ HAVE_MBSINIT=1; AC_SUBST([HAVE_MBSINIT])
+ HAVE_MBRTOWC=1; AC_SUBST([HAVE_MBRTOWC])
+ HAVE_MBRLEN=1; AC_SUBST([HAVE_MBRLEN])
+ HAVE_MBSRTOWCS=1; AC_SUBST([HAVE_MBSRTOWCS])
+ HAVE_MBSNRTOWCS=1; AC_SUBST([HAVE_MBSNRTOWCS])
+ HAVE_WCRTOMB=1; AC_SUBST([HAVE_WCRTOMB])
+ HAVE_WCSRTOMBS=1; AC_SUBST([HAVE_WCSRTOMBS])
+ HAVE_WCSNRTOMBS=1; AC_SUBST([HAVE_WCSNRTOMBS])
+ HAVE_DECL_WCTOB=1; AC_SUBST([HAVE_DECL_WCTOB])
+ HAVE_DECL_WCWIDTH=1; AC_SUBST([HAVE_DECL_WCWIDTH])
+ REPLACE_MBSTATE_T=0; AC_SUBST([REPLACE_MBSTATE_T])
+ REPLACE_BTOWC=0; AC_SUBST([REPLACE_BTOWC])
+ REPLACE_WCTOB=0; AC_SUBST([REPLACE_WCTOB])
+ REPLACE_MBSINIT=0; AC_SUBST([REPLACE_MBSINIT])
+ REPLACE_MBRTOWC=0; AC_SUBST([REPLACE_MBRTOWC])
+ REPLACE_MBRLEN=0; AC_SUBST([REPLACE_MBRLEN])
+ REPLACE_MBSRTOWCS=0; AC_SUBST([REPLACE_MBSRTOWCS])
+ REPLACE_MBSNRTOWCS=0; AC_SUBST([REPLACE_MBSNRTOWCS])
+ REPLACE_WCRTOMB=0; AC_SUBST([REPLACE_WCRTOMB])
+ REPLACE_WCSRTOMBS=0; AC_SUBST([REPLACE_WCSRTOMBS])
+ REPLACE_WCSNRTOMBS=0; AC_SUBST([REPLACE_WCSNRTOMBS])
+ REPLACE_WCWIDTH=0; AC_SUBST([REPLACE_WCWIDTH])
+])
diff --git a/ltdl/m4/wchar_t.m4 b/ltdl/m4/wchar_t.m4
new file mode 100755
index 00000000..ed804e66
--- /dev/null
+++ b/ltdl/m4/wchar_t.m4
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 3 (gettext-0.18)
+dnl Copyright (C) 2002-2003, 2008-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 Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+ AC_CACHE_CHECK([for wchar_t], [gt_cv_c_wchar_t],
+ [AC_TRY_COMPILE([#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wchar_t=yes], [gt_cv_c_wchar_t=no])])
+ if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE([HAVE_WCHAR_T], [1], [Define if you have the 'wchar_t' type.])
+ fi
+])
diff --git a/ltdl/m4/wchar_t.m4~ b/ltdl/m4/wchar_t.m4~
new file mode 100644
index 00000000..cde2129a
--- /dev/null
+++ b/ltdl/m4/wchar_t.m4~
@@ -0,0 +1,20 @@
+# wchar_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2002-2003 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 Bruno Haible.
+dnl Test whether <stddef.h> has the 'wchar_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WCHAR_T],
+[
+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
+ [AC_TRY_COMPILE([#include <stddef.h>
+ wchar_t foo = (wchar_t)'\0';], ,
+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
+ if test $gt_cv_c_wchar_t = yes; then
+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
+ fi
+])
diff --git a/ltdl/m4/wcrtomb.m4 b/ltdl/m4/wcrtomb.m4
new file mode 100755
index 00000000..19c0c5fe
--- /dev/null
+++ b/ltdl/m4/wcrtomb.m4
@@ -0,0 +1,92 @@
+# wcrtomb.m4 serial 4
+dnl Copyright (C) 2008-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.
+
+AC_DEFUN([gl_FUNC_WCRTOMB],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_REQUIRE([AC_TYPE_MBSTATE_T])
+ gl_MBSTATE_T_BROKEN
+ if test $REPLACE_MBSTATE_T = 1; then
+ REPLACE_WCRTOMB=1
+ fi
+ AC_CHECK_FUNCS_ONCE([wcrtomb])
+ if test $ac_cv_func_wcrtomb = no; then
+ HAVE_WCRTOMB=0
+ fi
+ if test $HAVE_WCRTOMB != 0 && test $REPLACE_WCRTOMB != 1; then
+ dnl On AIX 4.3, OSF/1 5.1 and Solaris 10, wcrtomb (NULL, 0, NULL) sometimes
+ dnl returns 0 instead of 1.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([gt_LOCALE_FR_UTF8])
+ AC_REQUIRE([gt_LOCALE_JA])
+ AC_REQUIRE([gt_LOCALE_ZH_CN])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wcrtomb return value is correct],
+ [gl_cv_func_wcrtomb_retval],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on AIX 4, OSF/1 and Solaris.
+ aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
+ {
+ if (wcrtomb (NULL, 0, NULL) != 1)
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wcrtomb_retval=yes],
+ [gl_cv_func_wcrtomb_retval=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wcrtomb_retval" in
+ *yes) ;;
+ *) REPLACE_WCRTOMB=1 ;;
+ esac
+ fi
+ if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wcrtomb])
+ gl_PREREQ_WCRTOMB
+ fi
+])
+
+# Prerequisites of lib/wcrtomb.c.
+AC_DEFUN([gl_PREREQ_WCRTOMB], [
+ :
+])
diff --git a/ltdl/m4/wctob.m4 b/ltdl/m4/wctob.m4
new file mode 100755
index 00000000..3362ec62
--- /dev/null
+++ b/ltdl/m4/wctob.m4
@@ -0,0 +1,91 @@
+# wctob.m4 serial 4
+dnl Copyright (C) 2008-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.
+
+AC_DEFUN([gl_FUNC_WCTOB],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+
+ AC_CHECK_FUNCS_ONCE([wctob])
+ if test $ac_cv_func_wctob = no; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl Solaris 9 has the wctob() function but it does not work.
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([gt_LOCALE_FR])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+ AC_CACHE_CHECK([whether wctob works],
+ [gl_cv_func_wctob_works],
+ [
+ dnl Initial guess, used when cross-compiling or when no suitable locale
+ dnl is present.
+changequote(,)dnl
+ case "$host_os" in
+ # Guess no on Solaris <= 9.
+ solaris2.[1-9] | solaris2.[1-9].*)
+ gl_cv_func_wctob_works="guessing no" ;;
+ # Guess yes otherwise.
+ *) gl_cv_func_wctob_works="guessing yes" ;;
+ esac
+changequote([,])dnl
+ if test $LOCALE_FR != none; then
+ AC_TRY_RUN([
+#include <locale.h>
+#include <string.h>
+#include <wchar.h>
+int main ()
+{
+ if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
+ {
+ wchar_t wc;
+
+ if (mbtowc (&wc, "\374", 1) == 1)
+ if (wctob (wc) != (unsigned char) '\374')
+ return 1;
+ }
+ return 0;
+}],
+ [gl_cv_func_wctob_works=yes],
+ [gl_cv_func_wctob_works=no],
+ [:])
+ fi
+ ])
+ case "$gl_cv_func_wctob_works" in
+ *yes) ;;
+ *) REPLACE_WCTOB=1 ;;
+ esac
+ if test $REPLACE_WCTOB = 1; then
+ gl_REPLACE_WCHAR_H
+ AC_LIBOBJ([wctob])
+ gl_PREREQ_WCTOB
+ else
+
+ dnl IRIX 6.5 has the wctob() function but does not declare it.
+ AC_CHECK_DECLS([wctob], [], [], [
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+ if test $ac_cv_have_decl_wctob != yes; then
+ HAVE_DECL_WCTOB=0
+ gl_REPLACE_WCHAR_H
+ fi
+ fi
+ fi
+])
+
+# Prerequisites of lib/wctob.c.
+AC_DEFUN([gl_PREREQ_WCTOB], [
+ :
+])
diff --git a/ltdl/m4/wctype.m4 b/ltdl/m4/wctype.m4
new file mode 100755
index 00000000..7fa36a1b
--- /dev/null
+++ b/ltdl/m4/wctype.m4
@@ -0,0 +1,84 @@
+# wctype.m4 serial 4
+
+dnl A placeholder for ISO C99 <wctype.h>, for platforms that lack it.
+
+dnl Copyright (C) 2006-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 Written by Paul Eggert.
+
+AC_DEFUN([gl_WCTYPE_H],
+[
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_CHECK_FUNCS_ONCE([iswcntrl])
+ if test $ac_cv_func_iswcntrl = yes; then
+ HAVE_ISWCNTRL=1
+ else
+ HAVE_ISWCNTRL=0
+ fi
+ AC_SUBST([HAVE_ISWCNTRL])
+ AC_CHECK_HEADERS_ONCE([wctype.h])
+ AC_REQUIRE([AC_C_INLINE])
+
+ AC_REQUIRE([gt_TYPE_WINT_T])
+ if test $gt_cv_c_wint_t = yes; then
+ HAVE_WINT_T=1
+ else
+ HAVE_WINT_T=0
+ fi
+ AC_SUBST([HAVE_WINT_T])
+
+ WCTYPE_H=wctype.h
+ if test $ac_cv_header_wctype_h = yes; then
+ if test $ac_cv_func_iswcntrl = yes; then
+ dnl Linux libc5 has an iswprint function that returns 0 for all arguments.
+ dnl The other functions are likely broken in the same way.
+ AC_CACHE_CHECK([whether iswcntrl works], [gl_cv_func_iswcntrl_works],
+ [
+ AC_RUN_IFELSE([AC_LANG_SOURCE([[
+ #include <stddef.h>
+ #include <stdio.h>
+ #include <time.h>
+ #include <wchar.h>
+ #include <wctype.h>
+ int main () { return iswprint ('x') == 0; }]])],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no],
+ [AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <stdlib.h>
+ #if __GNU_LIBRARY__ == 1
+ Linux libc5 i18n is broken.
+ #endif]], [])],
+ [gl_cv_func_iswcntrl_works=yes], [gl_cv_func_iswcntrl_works=no])
+ ])
+ ])
+ if test $gl_cv_func_iswcntrl_works = yes; then
+ case "$host_os" in
+ mingw*)
+ dnl On mingw, towlower and towupper return random high 16 bits.
+ ;;
+ *)
+ dnl iswcntrl works. towlower and towupper work as well.
+ WCTYPE_H=
+ ;;
+ esac
+ fi
+ fi
+ dnl Compute NEXT_WCTYPE_H even if WCTYPE_H is empty,
+ dnl for the benefit of builds from non-distclean directories.
+ gl_CHECK_NEXT_HEADERS([wctype.h])
+ HAVE_WCTYPE_H=1
+ else
+ HAVE_WCTYPE_H=0
+ fi
+ AC_SUBST([HAVE_WCTYPE_H])
+ AC_SUBST([WCTYPE_H])
+
+ if test "$gl_cv_func_iswcntrl_works" = no; then
+ REPLACE_ISWCNTRL=1
+ else
+ REPLACE_ISWCNTRL=0
+ fi
+ AC_SUBST([REPLACE_ISWCNTRL])
+])
diff --git a/ltdl/m4/wcwidth.m4 b/ltdl/m4/wcwidth.m4
new file mode 100755
index 00000000..ef5404ea
--- /dev/null
+++ b/ltdl/m4/wcwidth.m4
@@ -0,0 +1,94 @@
+# wcwidth.m4 serial 15
+dnl Copyright (C) 2006-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.
+
+AC_DEFUN([gl_FUNC_WCWIDTH],
+[
+ AC_REQUIRE([gl_WCHAR_H_DEFAULTS])
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Persuade glibc <wchar.h> to declare wcwidth().
+ AC_REQUIRE([AC_USE_SYSTEM_EXTENSIONS])
+
+ AC_REQUIRE([gt_TYPE_WCHAR_T])
+ AC_REQUIRE([gt_TYPE_WINT_T])
+
+ AC_CHECK_HEADERS_ONCE([wchar.h])
+ AC_CHECK_FUNCS_ONCE([wcwidth])
+
+ AC_CHECK_DECLS([wcwidth], [], [], [
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+])
+ if test $ac_cv_have_decl_wcwidth != yes; then
+ HAVE_DECL_WCWIDTH=0
+ fi
+
+ if test $ac_cv_func_wcwidth = no; then
+ REPLACE_WCWIDTH=1
+ else
+ dnl On MacOS X 10.3, wcwidth(0x0301) (COMBINING ACUTE ACCENT) returns 1.
+ dnl On OSF/1 5.1, wcwidth(0x200B) (ZERO WIDTH SPACE) returns 1.
+ dnl This leads to bugs in 'ls' (coreutils).
+ AC_CACHE_CHECK([whether wcwidth works reasonably in UTF-8 locales],
+ [gl_cv_func_wcwidth_works],
+ [
+ AC_TRY_RUN([
+#include <locale.h>
+/* AIX 3.2.5 declares wcwidth in <string.h>. */
+#include <string.h>
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+#if !HAVE_DECL_WCWIDTH
+extern
+# ifdef __cplusplus
+"C"
+# endif
+int wcwidth (int);
+#endif
+int main ()
+{
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
+ if (wcwidth (0x0301) > 0 || wcwidth (0x200B) > 0)
+ return 1;
+ return 0;
+}], [gl_cv_func_wcwidth_works=yes], [gl_cv_func_wcwidth_works=no],
+ [
+changequote(,)dnl
+ case "$host_os" in
+ # Guess yes on glibc systems.
+ *-gnu*) gl_cv_func_wcwidth_works="guessing yes";;
+ *) gl_cv_func_wcwidth_works="guessing no";;
+ esac
+changequote([,])dnl
+ ])
+ ])
+ case "$gl_cv_func_wcwidth_works" in
+ *yes) ;;
+ *no) REPLACE_WCWIDTH=1 ;;
+ esac
+ fi
+ if test $REPLACE_WCWIDTH = 1; then
+ AC_LIBOBJ([wcwidth])
+ fi
+
+ if test $REPLACE_WCWIDTH = 1 || test $HAVE_DECL_WCWIDTH = 0; then
+ gl_REPLACE_WCHAR_H
+ fi
+])
diff --git a/ltdl/m4/wint_t.m4 b/ltdl/m4/wint_t.m4
new file mode 100755
index 00000000..a6c7d15c
--- /dev/null
+++ b/ltdl/m4/wint_t.m4
@@ -0,0 +1,28 @@
+# wint_t.m4 serial 4 (gettext-0.18)
+dnl Copyright (C) 2003, 2007-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 Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], [gt_cv_c_wint_t],
+ [AC_TRY_COMPILE([
+/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
+ <wchar.h>.
+ BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
+ before <wchar.h>. */
+#include <stddef.h>
+#include <stdio.h>
+#include <time.h>
+#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ [gt_cv_c_wint_t=yes], [gt_cv_c_wint_t=no])])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE([HAVE_WINT_T], [1], [Define if you have the 'wint_t' type.])
+ fi
+])
diff --git a/ltdl/m4/wint_t.m4~ b/ltdl/m4/wint_t.m4~
new file mode 100644
index 00000000..b8fff9c8
--- /dev/null
+++ b/ltdl/m4/wint_t.m4~
@@ -0,0 +1,20 @@
+# wint_t.m4 serial 1 (gettext-0.12)
+dnl Copyright (C) 2003 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 Bruno Haible.
+dnl Test whether <wchar.h> has the 'wint_t' type.
+dnl Prerequisite: AC_PROG_CC
+
+AC_DEFUN([gt_TYPE_WINT_T],
+[
+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
+ [AC_TRY_COMPILE([#include <wchar.h>
+ wint_t foo = (wchar_t)'\0';], ,
+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
+ if test $gt_cv_c_wint_t = yes; then
+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
+ fi
+])
diff --git a/ltdl/m4/xalloc.m4 b/ltdl/m4/xalloc.m4
new file mode 100755
index 00000000..83247fe3
--- /dev/null
+++ b/ltdl/m4/xalloc.m4
@@ -0,0 +1,25 @@
+# xalloc.m4 serial 16
+dnl Copyright (C) 2002, 2003, 2004, 2005, 2006, 2009, 2010 Free Software
+dnl 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.
+
+AC_DEFUN([gl_XALLOC],
+[
+ AC_LIBOBJ([xmalloc])
+
+ gl_PREREQ_XALLOC
+ gl_PREREQ_XMALLOC
+])
+
+# Prerequisites of lib/xalloc.h.
+AC_DEFUN([gl_PREREQ_XALLOC], [
+ AC_REQUIRE([gl_INLINE])
+ :
+])
+
+# Prerequisites of lib/xmalloc.c.
+AC_DEFUN([gl_PREREQ_XMALLOC], [
+ :
+])
diff --git a/ltdl/m4/xsize.m4 b/ltdl/m4/xsize.m4
new file mode 100755
index 00000000..b653693a
--- /dev/null
+++ b/ltdl/m4/xsize.m4
@@ -0,0 +1,13 @@
+# xsize.m4 serial 4
+dnl Copyright (C) 2003-2004, 2008-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.
+
+AC_DEFUN([gl_XSIZE],
+[
+ dnl Prerequisites of lib/xsize.h.
+ AC_REQUIRE([gl_SIZE_MAX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CHECK_HEADERS([stdint.h])
+])
diff --git a/ltdl/m4/xsize.m4~ b/ltdl/m4/xsize.m4~
new file mode 100644
index 00000000..85bb721e
--- /dev/null
+++ b/ltdl/m4/xsize.m4~
@@ -0,0 +1,13 @@
+# xsize.m4 serial 3
+dnl Copyright (C) 2003-2004 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.
+
+AC_DEFUN([gl_XSIZE],
+[
+ dnl Prerequisites of lib/xsize.h.
+ AC_REQUIRE([gl_SIZE_MAX])
+ AC_REQUIRE([AC_C_INLINE])
+ AC_CHECK_HEADERS(stdint.h)
+])
diff --git a/ltdl/m4/xstrndup.m4 b/ltdl/m4/xstrndup.m4
new file mode 100755
index 00000000..74302cc9
--- /dev/null
+++ b/ltdl/m4/xstrndup.m4
@@ -0,0 +1,15 @@
+# xstrndup.m4 serial 2
+dnl Copyright (C) 2003, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRNDUP],
+[
+ gl_PREREQ_XSTRNDUP
+])
+
+# Prerequisites of lib/xstrndup.c.
+AC_DEFUN([gl_PREREQ_XSTRNDUP], [
+ :
+])
diff --git a/ltdl/m4/xstrtol.m4 b/ltdl/m4/xstrtol.m4
new file mode 100755
index 00000000..25ab9b3f
--- /dev/null
+++ b/ltdl/m4/xstrtol.m4
@@ -0,0 +1,12 @@
+#serial 10
+dnl Copyright (C) 2002-2007, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XSTRTOL],
+[
+ AC_LIBOBJ([xstrtol])
+ AC_LIBOBJ([xstrtoul])
+ AC_LIBOBJ([xstrtol-error])
+])
diff --git a/ltdl/m4/xvasprintf.m4 b/ltdl/m4/xvasprintf.m4
new file mode 100755
index 00000000..bd5200f7
--- /dev/null
+++ b/ltdl/m4/xvasprintf.m4
@@ -0,0 +1,11 @@
+# xvasprintf.m4 serial 1
+dnl Copyright (C) 2006, 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,
+dnl with or without modifications, as long as this notice is preserved.
+
+AC_DEFUN([gl_XVASPRINTF],
+[
+ dnl Prerequisites of lib/xvasprintf.c.
+ AC_REQUIRE([AC_C_INLINE])
+])
diff --git a/ltdl/slist.c b/ltdl/slist.c
new file mode 100644
index 00000000..c99f3991
--- /dev/null
+++ b/ltdl/slist.c
@@ -0,0 +1,375 @@
+/* slist.c -- generalised singly linked lists
+
+ Copyright (C) 2000, 2004, 2007, 2008 Free Software Foundation, Inc.
+ Written by Gary V. Vaughan, 2000
+
+ NOTE: The canonical source of this file is maintained with the
+ GNU Libtool package. Report bugs to bug-libtool@gnu.org.
+
+GNU Libltdl 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 2 of the License, or (at your option) any later version.
+
+As a special exception to the GNU Lesser General Public License,
+if you distribute this file as part of a program or library that
+is built using GNU Libtool, you may include this file under the
+same distribution terms that you use for the rest of that program.
+
+GNU Libltdl 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 GNU Libltdl; see the file COPYING.LIB. If not, a
+copy can be downloaded from http://www.gnu.org/licenses/lgpl.html,
+or obtained by writing to the Free Software Foundation, Inc.,
+51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+*/
+
+#include <assert.h>
+
+#include "slist.h"
+#include <stddef.h>
+
+static SList * slist_sort_merge (SList *left, SList *right,
+ SListCompare *compare, void *userdata);
+
+
+/* Call DELETE repeatedly on each element of HEAD.
+
+ CAVEAT: If you call this when HEAD is the start of a list of boxed
+ items, you must remember that each item passed back to your
+ DELETE function will be a boxed item that must be slist_unbox()ed
+ before operating on its contents.
+
+ e.g. void boxed_delete (void *item) { item_free (slist_unbox (item)); }
+ ...
+ slist = slist_delete (slist, boxed_delete);
+ ...
+*/
+SList *
+slist_delete (SList *head, void (*delete_fct) (void *item))
+{
+ assert (delete_fct);
+
+ while (head)
+ {
+ SList *next = head->next;
+ (*delete_fct) (head);
+ head = next;
+ }
+
+ return 0;
+}
+
+/* Call FIND repeatedly with MATCHDATA and each item of *PHEAD, until
+ FIND returns non-NULL, or the list is exhausted. If a match is found
+ the matching item is destructively removed from *PHEAD, and the value
+ returned by the matching call to FIND is returned.
+
+ CAVEAT: To avoid memory leaks, unless you already have the address of
+ the stale item, you should probably return that from FIND if
+ it makes a successful match. Don't forget to slist_unbox()
+ every item in a boxed list before operating on its contents. */
+void *
+slist_remove (SList **phead, SListCallback *find, void *matchdata)
+{
+ SList *stale = 0;
+ void *result = 0;
+
+ assert (find);
+
+ if (!phead || !*phead)
+ return 0;
+
+ /* Does the head of the passed list match? */
+ result = (*find) (*phead, matchdata);
+ if (result)
+ {
+ stale = *phead;
+ *phead = stale->next;
+ }
+ /* what about the rest of the elements? */
+ else
+ {
+ SList *head;
+ for (head = *phead; head->next; head = head->next)
+ {
+ result = (*find) (head->next, matchdata);
+ if (result)
+ {
+ stale = head->next;
+ head->next = stale->next;
+ break;
+ }
+ }
+ }
+
+ return result;
+}
+
+/* Call FIND repeatedly with each element of SLIST and MATCHDATA, until
+ FIND returns non-NULL, or the list is exhausted. If a match is found
+ the value returned by the matching call to FIND is returned. */
+void *
+slist_find (SList *slist, SListCallback *find, void *matchdata)
+{
+ void *result = 0;
+
+ assert (find);
+
+ for (; slist; slist = slist->next)
+ {
+ result = (*find) (slist, matchdata);
+ if (result)
+ break;
+ }
+
+ return result;
+}
+
+/* Return a single list, composed by destructively concatenating the
+ items in HEAD and TAIL. The values of HEAD and TAIL are undefined
+ after calling this function.
+
+ CAVEAT: Don't mix boxed and unboxed items in a single list.
+
+ e.g. slist1 = slist_concat (slist1, slist2); */
+SList *
+slist_concat (SList *head, SList *tail)
+{
+ SList *last;
+
+ if (!head)
+ {
+ return tail;
+ }
+
+ last = head;
+ while (last->next)
+ last = last->next;
+
+ last->next = tail;
+
+ return head;
+}
+
+/* Return a single list, composed by destructively appending all of
+ the items in SLIST to ITEM. The values of ITEM and SLIST are undefined
+ after calling this function.
+
+ CAVEAT: Don't mix boxed and unboxed items in a single list.
+
+ e.g. slist1 = slist_cons (slist_box (data), slist1); */
+SList *
+slist_cons (SList *item, SList *slist)
+{
+ if (!item)
+ {
+ return slist;
+ }
+
+ assert (!item->next);
+
+ item->next = slist;
+ return item;
+}
+
+/* Return a list starting at the second item of SLIST. */
+SList *
+slist_tail (SList *slist)
+{
+ return slist ? slist->next : NULL;
+}
+
+/* Return a list starting at the Nth item of SLIST. If SLIST is less
+ than N items long, NULL is returned. Just to be confusing, list items
+ are counted from 1, to get the 2nd element of slist:
+
+ e.g. shared_list = slist_nth (slist, 2); */
+SList *
+slist_nth (SList *slist, size_t n)
+{
+ for (;n > 1 && slist; n--)
+ slist = slist->next;
+
+ return slist;
+}
+
+/* Return the number of items in SLIST. We start counting from 1, so
+ the length of a list with no items is 0, and so on. */
+size_t
+slist_length (SList *slist)
+{
+ size_t n;
+
+ for (n = 0; slist; ++n)
+ slist = slist->next;
+
+ return n;
+}
+
+/* Destructively reverse the order of items in SLIST. The value of SLIST
+ is undefined after calling this function.
+
+ CAVEAT: You must store the result of this function, or you might not
+ be able to get all the items except the first one back again.
+
+ e.g. slist = slist_reverse (slist); */
+SList *
+slist_reverse (SList *slist)
+{
+ SList *result = 0;
+ SList *next;
+
+ while (slist)
+ {
+ next = slist->next;
+ slist->next = result;
+ result = slist;
+ slist = next;
+ }
+
+ return result;
+}
+
+/* Call FOREACH once for each item in SLIST, passing both the item and
+ USERDATA on each call. */
+void *
+slist_foreach (SList *slist, SListCallback *foreach, void *userdata)
+{
+ void *result = 0;
+
+ assert (foreach);
+
+ while (slist)
+ {
+ SList *next = slist->next;
+ result = (*foreach) (slist, userdata);
+
+ if (result)
+ break;
+
+ slist = next;
+ }
+
+ return result;
+}
+
+/* Destructively merge the items of two ordered lists LEFT and RIGHT,
+ returning a single sorted list containing the items of both -- Part of
+ the quicksort algorithm. The values of LEFT and RIGHT are undefined
+ after calling this function.
+
+ At each iteration, add another item to the merged list by taking the
+ lowest valued item from the head of either LEFT or RIGHT, determined
+ by passing those items and USERDATA to COMPARE. COMPARE should return
+ less than 0 if the head of LEFT has the lower value, greater than 0 if
+ the head of RIGHT has the lower value, otherwise 0. */
+static SList *
+slist_sort_merge (SList *left, SList *right, SListCompare *compare,
+ void *userdata)
+{
+ SList merged, *insert;
+
+ insert = &merged;
+
+ while (left && right)
+ {
+ if ((*compare) (left, right, userdata) <= 0)
+ {
+ insert = insert->next = left;
+ left = left->next;
+ }
+ else
+ {
+ insert = insert->next = right;
+ right = right->next;
+ }
+ }
+
+ insert->next = left ? left : right;
+
+ return merged.next;
+}
+
+/* Perform a destructive quicksort on the items in SLIST, by repeatedly
+ calling COMPARE with a pair of items from SLIST along with USERDATA
+ at every iteration. COMPARE is a function as defined above for
+ slist_sort_merge(). The value of SLIST is undefined after calling
+ this function.
+
+ e.g. slist = slist_sort (slist, compare, 0); */
+SList *
+slist_sort (SList *slist, SListCompare *compare, void *userdata)
+{
+ SList *left, *right;
+
+ if (!slist)
+ return slist;
+
+ /* Be sure that LEFT and RIGHT never contain the same item. */
+ left = slist;
+ right = slist->next;
+
+ /* Skip two items with RIGHT and one with SLIST, until RIGHT falls off
+ the end. SLIST must be about half way along. */
+ while (right && (right = right->next))
+ {
+ if (!right || !(right = right->next))
+ break;
+ slist = slist->next;
+ }
+ right = slist->next;
+ slist->next = 0;
+
+ /* Sort LEFT and RIGHT, then merge the two. */
+ return slist_sort_merge (slist_sort (left, compare, userdata),
+ slist_sort (right, compare, userdata),
+ compare, userdata);
+}
+
+
+/* Aside from using the functions above to manage chained structures of
+ any type that has a NEXT pointer as its first field, SLISTs can
+ be comprised of boxed items. The boxes are chained together in
+ that case, so there is no need for a NEXT field in the item proper.
+ Some care must be taken to slist_box and slist_unbox each item in
+ a boxed list at the appropriate points to avoid leaking the memory
+ used for the boxes. It us usually a very bad idea to mix boxed and
+ non-boxed items in a single list. */
+
+/* Return a `boxed' freshly mallocated 1 element list containing
+ USERDATA. */
+SList *
+slist_box (const void *userdata)
+{
+ SList *item = (SList *) malloc (sizeof *item);
+
+ if (item)
+ {
+ item->next = 0;
+ item->userdata = userdata;
+ }
+
+ return item;
+}
+
+/* Return the contents of a `boxed' ITEM, recycling the box itself. */
+void *
+slist_unbox (SList *item)
+{
+ void *userdata = 0;
+
+ if (item)
+ {
+ /* Strip the const, because responsibility for this memory
+ passes to the caller on return. */
+ userdata = (void *) item->userdata;
+ free (item);
+ }
+
+ return userdata;
+}
diff --git a/maint.mk b/maint.mk
new file mode 100755
index 00000000..7d84b6c3
--- /dev/null
+++ b/maint.mk
@@ -0,0 +1,940 @@
+# -*-Makefile-*-
+# This Makefile fragment tries to be general-purpose enough to be
+# used by many projects via the gnulib maintainer-makefile module.
+
+## Copyright (C) 2001-2010 Free Software Foundation, Inc.
+##
+## This program is free software: you can redistribute it and/or modify
+## it under the terms of the GNU 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 General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# This is reported not to work with make-3.79.1
+# ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
+ME := maint.mk
+
+# Override this in cfg.mk if you use a non-standard build-aux directory.
+build_aux ?= $(srcdir)/build-aux
+
+# Do not save the original name or timestamp in the .tar.gz file.
+# Use --rsyncable if available.
+gzip_rsyncable := \
+ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
+GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
+
+GIT = git
+VC = $(GIT)
+VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
+
+VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
+
+# You can override this variable in cfg.mk to set your own regexp
+# matching files to ignore.
+VC_LIST_ALWAYS_EXCLUDE_REGEX ?= ^$$
+
+# This is to preprocess robustly the output of $(VC_LIST), so that even
+# when $(srcdir) is a pathological name like "....", the leading sed command
+# removes only the intended prefix.
+_dot_escaped_srcdir = $(subst .,\.,$(srcdir))
+
+# Post-process $(VC_LIST) output, prepending $(srcdir)/, but only
+# when $(srcdir) is not ".".
+ifeq ($(srcdir),.)
+_prepend_srcdir_prefix =
+else
+_prepend_srcdir_prefix = | sed 's|^|$(srcdir)/|'
+endif
+
+# In order to be able to consistently filter "."-relative names,
+# (i.e., with no $(srcdir) prefix), this definition is careful to
+# remove any $(srcdir) prefix, and to restore what it removes.
+VC_LIST_EXCEPT = \
+ $(VC_LIST) | sed 's|^$(_dot_escaped_srcdir)/||' \
+ | if test -f $(srcdir)/.x-$@; then grep -vEf $(srcdir)/.x-$@; \
+ else grep -Ev -e "$${VC_LIST_EXCEPT_DEFAULT-ChangeLog}"; fi \
+ | grep -Ev -e '$(VC_LIST_ALWAYS_EXCLUDE_REGEX)' \
+ $(_prepend_srcdir_prefix)
+
+ifeq ($(origin prev_version_file), undefined)
+ prev_version_file = $(srcdir)/.prev-version
+endif
+
+PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null)
+VERSION_REGEXP = $(subst .,\.,$(VERSION))
+PREV_VERSION_REGEXP = $(subst .,\.,$(PREV_VERSION))
+
+ifeq ($(VC),$(GIT))
+this-vc-tag = v$(VERSION)
+this-vc-tag-regexp = v$(VERSION_REGEXP)
+else
+tag-package = $(shell echo "$(PACKAGE)" | tr '[:lower:]' '[:upper:]')
+tag-this-version = $(subst .,_,$(VERSION))
+this-vc-tag = $(tag-package)-$(tag-this-version)
+this-vc-tag-regexp = $(this-vc-tag)
+endif
+my_distdir = $(PACKAGE)-$(VERSION)
+
+# Old releases are stored here.
+release_archive_dir ?= ../release
+
+# Override gnu_rel_host and url_dir_list in cfg.mk if these are not right.
+# Use alpha.gnu.org for alpha and beta releases.
+# Use ftp.gnu.org for stable releases.
+gnu_ftp_host-alpha = alpha.gnu.org
+gnu_ftp_host-beta = alpha.gnu.org
+gnu_ftp_host-stable = ftp.gnu.org
+gnu_rel_host ?= $(gnu_ftp_host-$(RELEASE_TYPE))
+
+ifeq ($(gnu_rel_host),ftp.gnu.org)
+url_dir_list ?= http://ftpmirror.gnu.org/$(PACKAGE)
+else
+url_dir_list ?= ftp://$(gnu_rel_host)/gnu/$(PACKAGE)
+endif
+
+# Override this in cfg.mk if you are using a different format in your
+# NEWS file.
+today = $(shell date +%Y-%m-%d)
+news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)'
+
+# Prevent programs like 'sort' from considering distinct strings to be equal.
+# Doing it here saves us from having to set LC_ALL elsewhere in this file.
+export LC_ALL = C
+
+## --------------- ##
+## Sanity checks. ##
+## --------------- ##
+
+_cfg_mk := $(shell test -f $(srcdir)/cfg.mk && echo '$(srcdir)/cfg.mk')
+
+# Collect the names of rules starting with `sc_'.
+syntax-check-rules := $(sort $(shell sed -n 's/^\(sc_[a-zA-Z0-9_-]*\):.*/\1/p' \
+ $(srcdir)/$(ME) $(_cfg_mk)))
+.PHONY: $(syntax-check-rules)
+
+local-checks-available = \
+ $(syntax-check-rules)
+.PHONY: $(local-checks-available)
+
+# Arrange to print the name of each syntax-checking rule just before running it.
+$(syntax-check-rules): %: %.m
+sc_m_rules_ = $(patsubst %, %.m, $(syntax-check-rules))
+.PHONY: $(sc_m_rules_)
+$(sc_m_rules_):
+ @echo $(patsubst sc_%.m, %, $@)
+
+local-check := $(filter-out $(local-checks-to-skip), $(local-checks-available))
+
+syntax-check: $(local-check)
+# @grep -nE '# *include <(limits|std(def|arg|bool))\.h>' \
+# $$(find -type f -name '*.[chly]') && \
+# { echo '$(ME): found conditional include' 1>&2; \
+# exit 1; } || :
+
+# grep -nE '^# *include <(string|stdlib)\.h>' \
+# $(srcdir)/{lib,src}/*.[chy] && \
+# { echo '$(ME): FIXME' 1>&2; \
+# exit 1; } || :
+# FIXME: don't allow `#include .strings\.h' anywhere
+
+# By default, _prohibit_regexp does not ignore case.
+export ignore_case =
+_ignore_case = $$(test -n "$$ignore_case" && echo -i || :)
+
+# There are many rules below that prohibit constructs in this package.
+# If the offending construct can be matched with a grep-E-style regexp,
+# use this macro. The shell variables "re" and "msg" must be defined.
+define _prohibit_regexp
+ dummy=; : so we do not need a semicolon before each use; \
+ test "x$$re" != x || { echo '$(ME): re not defined' 1>&2; exit 1; }; \
+ test "x$$msg" != x || { echo '$(ME): msg not defined' 1>&2; exit 1; };\
+ grep $(_ignore_case) -nE "$$re" $$($(VC_LIST_EXCEPT)) && \
+ { echo '$(ME): '"$$msg" 1>&2; exit 1; } || :
+endef
+
+sc_avoid_if_before_free:
+ @$(build_aux)/useless-if-before-free \
+ $(useless_free_options) \
+ $$($(VC_LIST_EXCEPT) | grep -v useless-if-before-free) && \
+ { echo '$(ME): found useless "if" before "free" above' 1>&2; \
+ exit 1; } || :
+
+sc_cast_of_argument_to_free:
+ @re='\<free *\( *\(' msg='don'\''t cast free argument' \
+ $(_prohibit_regexp)
+
+sc_cast_of_x_alloc_return_value:
+ @re='\*\) *x(m|c|re)alloc\>' \
+ msg='don'\''t cast x*alloc return value' \
+ $(_prohibit_regexp)
+
+sc_cast_of_alloca_return_value:
+ @re='\*\) *alloca\>' msg='don'\''t cast alloca return value' \
+ $(_prohibit_regexp)
+
+sc_space_tab:
+ @re='[ ] ' msg='found SPACE-TAB sequence; remove the SPACE' \
+ $(_prohibit_regexp)
+
+# Don't use *scanf or the old ato* functions in `real' code.
+# They provide no error checking mechanism.
+# Instead, use strto* functions.
+sc_prohibit_atoi_atof:
+ @re='\<([fs]?scanf|ato([filq]|ll)) *\(' \
+ msg='do not use *scan''f, ato''f, ato''i, ato''l, ato''ll or ato''q' \
+ $(_prohibit_regexp)
+
+# Use STREQ rather than comparing strcmp == 0, or != 0.
+sc_prohibit_strcmp:
+ @grep -nE '! *str''cmp *\(|\<str''cmp *\([^)]+\) *==' \
+ $$($(VC_LIST_EXCEPT)) \
+ | grep -vE ':# *define STREQ\(' && \
+ { echo '$(ME): use STREQ in place of the above uses of str''cmp' \
+ 1>&2; exit 1; } || :
+
+# Pass EXIT_*, not number, to usage, exit, and error (when exiting)
+# Convert all uses automatically, via these two commands:
+# git grep -l '\<exit *(1)' \
+# | grep -vEf .x-sc_prohibit_magic_number_exit \
+# | xargs --no-run-if-empty \
+# perl -pi -e 's/(^|[^.])\b(exit ?)\(1\)/$1$2(EXIT_FAILURE)/'
+# git grep -l '\<exit *(0)' \
+# | grep -vEf .x-sc_prohibit_magic_number_exit \
+# | xargs --no-run-if-empty \
+# perl -pi -e 's/(^|[^.])\b(exit ?)\(0\)/$1$2(EXIT_SUCCESS)/'
+sc_prohibit_magic_number_exit:
+ @re='(^|[^.])\<(usage|exit) ?\([0-9]|\<error ?\([1-9][0-9]*,' \
+ msg='use EXIT_* values rather than magic number' \
+ $(_prohibit_regexp)
+
+# Using EXIT_SUCCESS as the first argument to error is misleading,
+# since when that parameter is 0, error does not exit. Use `0' instead.
+sc_error_exit_success:
+ @grep -nE 'error \(EXIT_SUCCESS,' \
+ $$($(VC_LIST_EXCEPT) | grep -E '\.[chly]$$') && \
+ { echo '$(ME): found error (EXIT_SUCCESS' 1>&2; exit 1; } || :
+
+# `FATAL:' should be fully upper-cased in error messages
+# `WARNING:' should be fully upper-cased, or fully lower-cased
+sc_error_message_warn_fatal:
+ @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '"Warning|"Fatal|"fatal' && \
+ { echo '$(ME): use FATAL, WARNING or warning' 1>&2; \
+ exit 1; } || :
+
+# Error messages should not start with a capital letter
+sc_error_message_uppercase:
+ @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '"[A-Z]' \
+ | grep -vE '"FATAL|"WARNING|"Java|"C#|PRIuMAX' && \
+ { echo '$(ME): found capitalized error message' 1>&2; \
+ exit 1; } || :
+
+# Error messages should not end with a period
+sc_error_message_period:
+ @grep -nEA2 '[^rp]error \(' $$($(VC_LIST_EXCEPT)) \
+ | grep -E '[^."]\."' && \
+ { echo '$(ME): found error message ending in period' 1>&2; \
+ exit 1; } || :
+
+sc_file_system:
+ @re=file''system ignore_case=1 \
+ msg='found use of "file''system"; spell it "file system"' \
+ $(_prohibit_regexp)
+
+# Don't use cpp tests of this symbol. All code assumes config.h is included.
+sc_prohibit_have_config_h:
+ @grep -n '^# *if.*HAVE''_CONFIG_H' $$($(VC_LIST_EXCEPT)) && \
+ { echo '$(ME): found use of HAVE''_CONFIG_H; remove' \
+ 1>&2; exit 1; } || :
+
+# Nearly all .c files must include <config.h>. However, we also permit this
+# via inclusion of a package-specific header, if cfg.mk specified one.
+# config_h_header must be suitable for grep -E.
+config_h_header ?= <config\.h>
+sc_require_config_h:
+ @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
+ grep -EL '^# *include $(config_h_header)' \
+ $$($(VC_LIST_EXCEPT) | grep '\.c$$') \
+ | grep . && \
+ { echo '$(ME): the above files do not include <config.h>' \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
+# You must include <config.h> before including any other header file.
+# This can possibly be via a package-specific header, if given by cfg.mk.
+sc_require_config_h_first:
+ @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
+ fail=0; \
+ for i in $$($(VC_LIST_EXCEPT) | grep '\.c$$'); do \
+ grep '^# *include\>' $$i | sed 1q \
+ | grep -E '^# *include $(config_h_header)' > /dev/null \
+ || { echo $$i; fail=1; }; \
+ done; \
+ test $$fail = 1 && \
+ { echo '$(ME): the above files include some other header' \
+ 'before <config.h>' 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
+sc_prohibit_HAVE_MBRTOWC:
+ @re='\bHAVE_MBRTOWC\b' msg="do not use $$re; it is always defined" \
+ $(_prohibit_regexp)
+
+# To use this "command" macro, you must first define two shell variables:
+# h: the header, enclosed in <> or ""
+# re: a regular expression that matches IFF something provided by $h is used.
+define _header_without_use
+ dummy=; : so we do not need a semicolon before each use; \
+ h_esc=`echo "$$h"|sed 's/\./\\\\./g'`; \
+ if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
+ files=$$(grep -l '^# *include '"$$h_esc" \
+ $$($(VC_LIST_EXCEPT) | grep '\.c$$')) && \
+ grep -LE "$$re" $$files | grep . && \
+ { echo "$(ME): the above files include $$h but don't use it" \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+endef
+
+# Prohibit the inclusion of assert.h without an actual use of assert.
+sc_prohibit_assert_without_use:
+ @h='<assert.h>' re='\<assert *\(' $(_header_without_use)
+
+# Prohibit the inclusion of close-stream.h without an actual use.
+sc_prohibit_close_stream_without_use:
+ @h='"close-stream.h"' re='\<close_stream *\(' $(_header_without_use)
+
+# Prohibit the inclusion of getopt.h without an actual use.
+sc_prohibit_getopt_without_use:
+ @h='<getopt.h>' re='\<getopt(_long)? *\(' $(_header_without_use)
+
+# Don't include quotearg.h unless you use one of its functions.
+sc_prohibit_quotearg_without_use:
+ @h='"quotearg.h"' re='\<quotearg(_[^ ]+)? *\(' $(_header_without_use)
+
+# Don't include quote.h unless you use one of its functions.
+sc_prohibit_quote_without_use:
+ @h='"quote.h"' re='\<quote(_n)? *\(' $(_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_long_options_without_use:
+ @h='"long-options.h"' re='\<parse_long_options *\(' \
+ $(_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_inttostr_without_use:
+ @h='"inttostr.h"' re='\<(off|[iu]max|uint)tostr *\(' \
+ $(_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_ignore_value_without_use:
+ @h='"ignore-value.h"' re='\<ignore_(value|ptr) *\(' \
+ $(_header_without_use)
+
+# Don't include this header unless you use one of its functions.
+sc_prohibit_error_without_use:
+ @h='"error.h"' \
+ re='\<error(_at_line|_print_progname|_one_per_line|_message_count)? *\('\
+ $(_header_without_use)
+
+# Don't include xalloc.h unless you use one of its functions.
+# Consider these symbols:
+# perl -lne '/^# *define (\w+)\(/ and print $1' lib/xalloc.h|grep -v '^__';
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) \(/ and print $1' lib/xalloc.h
+# Divide into two sets on case, and filter each through this:
+# | sort | perl -MRegexp::Assemble -le \
+# 'print Regexp::Assemble->new(file => "/dev/stdin")->as_string'|sed 's/\?://g'
+# Note this was produced by the above:
+# _xa1 = \
+#x(((2n?)?re|c(har)?|n(re|m)|z)alloc|alloc_(oversized|die)|m(alloc|emdup)|strdup)
+# But we can do better, in at least two ways:
+# 1) take advantage of two "dup"-suffixed strings:
+# x(((2n?)?re|c(har)?|n(re|m)|[mz])alloc|alloc_(oversized|die)|(mem|str)dup)
+# 2) notice that "c(har)?|[mz]" is equivalent to the shorter and more readable
+# "char|[cmz]"
+# x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa1 = x(((2n?)?re|char|n(re|m)|[cmz])alloc|alloc_(oversized|die)|(mem|str)dup)
+_xa2 = X([CZ]|N?M)ALLOC
+sc_prohibit_xalloc_without_use:
+ @h='"xalloc.h"' \
+ re='\<($(_xa1)|$(_xa2)) *\('\
+ $(_header_without_use)
+
+# Extract function names:
+# perl -lne '/^(?:extern )?(?:void|char) \*?(\w+) \(/ and print $1' lib/hash.h
+_hash_re = \
+clear|delete|free|get_(first|next)|insert|lookup|print_statistics|reset_tuning
+_hash_fn = \<($(_hash_re)) *\(
+_hash_struct = (struct )?\<[Hh]ash_(table|tuning)\>
+sc_prohibit_hash_without_use:
+ @h='"hash.h"' \
+ re='$(_hash_fn)|$(_hash_struct)'\
+ $(_header_without_use)
+
+sc_prohibit_hash_pjw_without_use:
+ @h='"hash-pjw.h"' \
+ re='\<hash_pjw *\(' \
+ $(_header_without_use)
+
+sc_prohibit_safe_read_without_use:
+ @h='"safe-read.h"' re='(\<SAFE_READ_ERROR\>|\<safe_read *\()' \
+ $(_header_without_use)
+
+sc_prohibit_argmatch_without_use:
+ @h='"argmatch.h"' \
+ re='(\<(ARRAY_CARDINALITY|X?ARGMATCH(|_TO_ARGUMENT|_VERIFY))\>|\<argmatch(_exit_fn|_(in)?valid) *\()' \
+ $(_header_without_use)
+
+sc_prohibit_canonicalize_without_use:
+ @h='"canonicalize.h"' \
+ re='CAN_(EXISTING|ALL_BUT_LAST|MISSING)|canonicalize_(mode_t|filename_mode)' \
+ $(_header_without_use)
+
+sc_prohibit_root_dev_ino_without_use:
+ @h='"root-dev-ino.h"' \
+ re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
+ $(_header_without_use)
+
+sc_prohibit_openat_without_use:
+ @h='"openat.h"' \
+ re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat)\>' \
+ $(_header_without_use)
+
+# Prohibit the inclusion of c-ctype.h without an actual use.
+ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
+|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
+sc_prohibit_c_ctype_without_use:
+ @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' $(_header_without_use)
+
+_empty =
+_sp = $(_empty) $(_empty)
+# The following list was generated by running:
+# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
+# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
+_sig_functions = \
+ bsd_signal kill killpg pthread_kill pthread_sigmask raise sigaction \
+ sigaddset sigaltstack sigdelset sigemptyset sigfillset sighold sigignore \
+ siginterrupt sigismember signal sigpause sigpending sigprocmask sigqueue \
+ sigrelse sigset sigsuspend sigtimedwait sigwait sigwaitinfo
+_sig_function_re = $(subst $(_sp),|,$(strip $(_sig_functions)))
+# The following were extracted from "man signal.h" manually.
+_sig_types_and_consts = \
+ MINSIGSTKSZ SA_NOCLDSTOP SA_NOCLDWAIT SA_NODEFER SA_ONSTACK \
+ SA_RESETHAND SA_RESTART SA_SIGINFO SIGEV_NONE SIGEV_SIGNAL \
+ SIGEV_THREAD SIGSTKSZ SIG_BLOCK SIG_SETMASK SIG_UNBLOCK SS_DISABLE \
+ SS_ONSTACK mcontext_t pid_t sig_atomic_t sigevent siginfo_t sigset_t \
+ sigstack sigval stack_t ucontext_t
+# generated via this:
+# perl -lne '/^#ifdef (SIG\w+)/ and print $1' lib/sig2str.c|sort -u|fmt -70
+_sig_names = \
+ SIGABRT SIGALRM SIGALRM1 SIGBUS SIGCANCEL SIGCHLD SIGCLD SIGCONT \
+ SIGDANGER SIGDIL SIGEMT SIGFPE SIGFREEZE SIGGRANT SIGHUP SIGILL \
+ SIGINFO SIGINT SIGIO SIGIOT SIGKAP SIGKILL SIGKILLTHR SIGLOST SIGLWP \
+ SIGMIGRATE SIGMSG SIGPHONE SIGPIPE SIGPOLL SIGPRE SIGPROF SIGPWR \
+ SIGQUIT SIGRETRACT SIGSAK SIGSEGV SIGSOUND SIGSTKFLT SIGSTOP SIGSYS \
+ SIGTERM SIGTHAW SIGTRAP SIGTSTP SIGTTIN SIGTTOU SIGURG SIGUSR1 \
+ SIGUSR2 SIGVIRT SIGVTALRM SIGWAITING SIGWINCH SIGWIND SIGWINDOW \
+ SIGXCPU SIGXFSZ
+_sig_syms_re = $(subst $(_sp),|,$(strip $(_sig_names) $(_sig_types_and_consts)))
+
+# Prohibit the inclusion of signal.h without an actual use.
+sc_prohibit_signal_without_use:
+ @h='<signal.h>' \
+ re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \
+ $(_header_without_use)
+
+sc_obsolete_symbols:
+ @re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
+ msg='do not use HAVE''_FCNTL_H or O'_NDELAY \
+ $(_prohibit_regexp)
+
+# FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
+
+# Each nonempty ChangeLog line must start with a year number, or a TAB.
+sc_changelog:
+ @if $(VC_LIST_EXCEPT) | grep -l '^ChangeLog$$' >/dev/null; then \
+ grep -n '^[^12 ]' \
+ $$($(VC_LIST_EXCEPT) | grep '^ChangeLog$$') && \
+ { echo '$(ME): found unexpected prefix in a ChangeLog' 1>&2; \
+ exit 1; } || :; \
+ fi
+
+# Ensure that each .c file containing a "main" function also
+# calls set_program_name.
+sc_program_name:
+ @if $(VC_LIST_EXCEPT) | grep -l '\.c$$' > /dev/null; then \
+ files=$$(grep -l '^main *(' $$($(VC_LIST_EXCEPT) | grep '\.c$$')); \
+ grep -LE 'set_program_name *\(m?argv\[0\]\);' $$files \
+ | grep . && \
+ { echo '$(ME): the above files do not call set_program_name' \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
+# Require that the final line of each test-lib.sh-using test be this one:
+# Exit $fail
+# Note: this test requires GNU grep's --label= option.
+Exit_witness_file ?= tests/test-lib.sh
+Exit_base := $(notdir $(Exit_witness_file))
+sc_require_test_exit_idiom:
+ @if test -f $(srcdir)/$(Exit_witness_file); then \
+ die=0; \
+ for i in $$(grep -l -F 'srcdir/$(Exit_base)' \
+ $$($(VC_LIST) tests)); do \
+ tail -n1 $$i | grep '^Exit .' > /dev/null \
+ && : || { die=1; echo $$i; } \
+ done; \
+ test $$die = 1 && \
+ { echo 1>&2 '$(ME): the final line in each of the above is not:'; \
+ echo 1>&2 'Exit something'; \
+ exit 1; } || :; \
+ fi
+
+sc_the_the:
+ @re='\<the ''the\>' \
+ ignore_case=1 msg='found use of "the ''the";' \
+ $(_prohibit_regexp)
+
+sc_trailing_blank:
+ @re='[ ]$$' \
+ msg='found trailing blank(s)' \
+ $(_prohibit_regexp)
+
+# Match lines like the following, but where there is only one space
+# between the options and the description:
+# -D, --all-repeated[=delimit-method] print all duplicate lines\n
+longopt_re = --[a-z][0-9A-Za-z-]*(\[?=[0-9A-Za-z-]*\]?)?
+sc_two_space_separator_in_usage:
+ @grep -nE '^ *(-[A-Za-z],)? $(longopt_re) [^ ].*\\$$' \
+ $$($(VC_LIST_EXCEPT)) && \
+ { echo "$(ME): help2man requires at least two spaces between"; \
+ echo "$(ME): an option and its description"; \
+ 1>&2; exit 1; } || :
+
+# Look for diagnostics that aren't marked for translation.
+# This won't find any for which error's format string is on a separate line.
+sc_unmarked_diagnostics:
+ @grep -nE \
+ '\<error \([^"]*"[^"]*[a-z]{3}' $$($(VC_LIST_EXCEPT)) \
+ | grep -v '_''(' && \
+ { echo '$(ME): found unmarked diagnostic(s)' 1>&2; \
+ exit 1; } || :
+
+# Avoid useless parentheses like those in this example:
+# #if defined (SYMBOL) || defined (SYM2)
+sc_useless_cpp_parens:
+ @grep -n '^# *if .*defined *(' $$($(VC_LIST_EXCEPT)) && \
+ { echo '$(ME): found useless parentheses in cpp directive' \
+ 1>&2; exit 1; } || :
+
+# Require the latest GPL.
+sc_GPL_version:
+ @re='either ''version [^3]' msg='GPL vN, N!=3' \
+ $(_prohibit_regexp)
+
+# Require the latest GFDL. Two regexp, since some .texi files end up
+# line wrapping between 'Free Documentation License,' and 'Version'.
+_GFDL_regexp = (Free ''Documentation.*Version 1\.[^3]|Version 1\.[^3] or any)
+sc_GFDL_version:
+ @re='$(_GFDL_regexp)' msg='GFDL vN, N!=3' \
+ $(_prohibit_regexp)
+
+cvs_keywords = \
+ Author|Date|Header|Id|Name|Locker|Log|RCSfile|Revision|Source|State
+
+sc_prohibit_cvs_keyword:
+ @re='\$$($(cvs_keywords))\$$' \
+ msg='do not use CVS keyword expansion' \
+ $(_prohibit_regexp)
+
+# Make sure we don't use st_blocks. Use ST_NBLOCKS instead.
+# This is a bit of a kludge, since it prevents use of the string
+# even in comments, but for now it does the job with no false positives.
+sc_prohibit_stat_st_blocks:
+ @re='[.>]st_blocks' msg='do not use st_blocks; use ST_NBLOCKS' \
+ $(_prohibit_regexp)
+
+# Make sure we don't define any S_IS* macros in src/*.c files.
+# They're already defined via gnulib's sys/stat.h replacement.
+sc_prohibit_S_IS_definition:
+ @re='^ *# *define *S_IS' \
+ msg='do not define S_IS* macros; include <sys/stat.h>' \
+ $(_prohibit_regexp)
+
+# Each program that uses proper_name_utf8 must link with one of the
+# ICONV libraries. Otherwise, some ICONV library must appear in LDADD.
+# The perl -0777 invocation below extracts the possibly-multi-line
+# definition of LDADD from the appropriate Makefile.am and exits 0
+# when it contains "ICONV".
+sc_proper_name_utf8_requires_ICONV:
+ @progs=$$(grep -l 'proper_name_utf8 ''("' $$($(VC_LIST_EXCEPT)));\
+ if test "x$$progs" != x; then \
+ fail=0; \
+ for p in $$progs; do \
+ dir=$$(dirname "$$p"); \
+ perl -0777 \
+ -ne 'exit !(/^LDADD =(.+?[^\\]\n)/ms && $$1 =~ /ICONV/)' \
+ $$dir/Makefile.am && continue; \
+ base=$$(basename "$$p" .c); \
+ grep "$${base}_LDADD.*ICONV)" $$dir/Makefile.am > /dev/null \
+ || { fail=1; echo 1>&2 "$(ME): $$p uses proper_name_utf8"; }; \
+ done; \
+ test $$fail = 1 && \
+ { echo 1>&2 '$(ME): the above do not link with any ICONV library'; \
+ exit 1; } || :; \
+ fi
+
+# Warn about "c0nst struct Foo const foo[]",
+# but not about "char const *const foo" or "#define const const".
+sc_redundant_const:
+ @re='\bconst\b[[:space:][:alnum:]]{2,}\bconst\b' \
+ msg='redundant "const" in declarations' \
+ $(_prohibit_regexp)
+
+sc_const_long_option:
+ @grep '^ *static.*struct option ' $$($(VC_LIST_EXCEPT)) \
+ | grep -Ev 'const struct option|struct option const' && { \
+ echo 1>&2 '$(ME): add "const" to the above declarations'; \
+ exit 1; } || :
+
+NEWS_hash = \
+ $$(sed -n '/^\*.* $(PREV_VERSION_REGEXP) ([0-9-]*)/,$$p' \
+ $(srcdir)/NEWS \
+ | perl -0777 -pe \
+ 's/^Copyright.+?Free\sSoftware\sFoundation,\sInc\.\n//ms' \
+ | md5sum - \
+ | sed 's/ .*//')
+
+# Ensure that we don't accidentally insert an entry into an old NEWS block.
+sc_immutable_NEWS:
+ @if test -f $(srcdir)/NEWS; then \
+ test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : || \
+ { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
+ fi
+
+# Update the hash stored above. Do this after each release and
+# for any corrections to old entries.
+update-NEWS-hash: NEWS
+ perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \
+ $(srcdir)/cfg.mk
+
+# Ensure that we use only the standard $(VAR) notation,
+# not @...@ in Makefile.am, now that we can rely on automake
+# to emit a definition for each substituted variable.
+# We use perl rather than "grep -nE ..." to exempt a single
+# use of an @...@-delimited variable name in src/Makefile.am.
+# Allow the package to add exceptions via a hook in cfg.mk;
+# for example, @PRAGMA_SYSTEM_HEADER@ can be permitted by
+# setting this to ' && !/PRAGMA_SYSTEM_HEADER/'.
+_makefile_at_at_check_exceptions ?=
+sc_makefile_at_at_check:
+ @perl -ne '/\@[A-Z_0-9]+\@/'$(_makefile_at_at_check_exceptions) \
+ -e 'and (print "$$ARGV:$$.: $$_"), $$m=1; END {exit !$$m}' \
+ $$($(VC_LIST_EXCEPT) | grep -E '(^|/)Makefile\.am$$') \
+ && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
+
+news-check: NEWS
+ if head $(srcdir)/NEWS | grep -E $(news-check-regexp) \
+ >/dev/null; then \
+ :; \
+ else \
+ echo 'NEWS: $$(news-check-regexp) failed to match' 1>&2; \
+ exit 1; \
+ fi
+
+sc_makefile_TAB_only_indentation:
+ @grep -nE '^ [ ]{8}' \
+ $$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$') \
+ && { echo '$(ME): found TAB-8-space indentation' 1>&2; \
+ exit 1; } || :
+
+sc_m4_quote_check:
+ @grep -nE '(AC_DEFINE(_UNQUOTED)?|AC_DEFUN)\([^[]' \
+ $$($(VC_LIST_EXCEPT) | grep -E '(^configure\.ac|\.m4)$$') \
+ && { echo '$(ME): quote the first arg to AC_DEF*' 1>&2; \
+ exit 1; } || :
+
+fix_po_file_diag = \
+'you have changed the set of files with translatable diagnostics;\n\
+apply the above patch\n'
+
+# Verify that all source files using _() are listed in po/POTFILES.in.
+po_file = po/POTFILES.in
+sc_po_check:
+ @if test -f $(po_file); then \
+ grep -E -v '^(#|$$)' $(po_file) \
+ | grep -v '^src/false\.c$$' | sort > $@-1; \
+ files=; \
+ for file in $$($(VC_LIST_EXCEPT)) lib/*.[ch]; do \
+ test -r $$file || continue; \
+ case $$file in \
+ *.m4|*.mk) continue ;; \
+ *.?|*.??) ;; \
+ *) continue;; \
+ esac; \
+ case $$file in \
+ *.[ch]) \
+ base=`expr " $$file" : ' \(.*\)\..'`; \
+ { test -f $$base.l || test -f $$base.y; } && continue;; \
+ esac; \
+ files="$$files $$file"; \
+ done; \
+ grep -E -l '\b(N?_|gettext *)\([^)"]*("|$$)' $$files \
+ | sort -u > $@-2; \
+ diff -u -L $(po_file) -L $(po_file) $@-1 $@-2 \
+ || { printf '$(ME): '$(fix_po_file_diag) 1>&2; exit 1; }; \
+ rm -f $@-1 $@-2; \
+ fi
+
+# Sometimes it is useful to change the PATH environment variable
+# in Makefiles. When doing so, it's better not to use the Unix-centric
+# path separator of `:', but rather the automake-provided `$(PATH_SEPARATOR)'.
+msg = '$(ME): Do not use `:'\'' above; use $$(PATH_SEPARATOR) instead'
+sc_makefile_path_separator_check:
+ @grep -nE 'PATH[=].*:' \
+ $$($(VC_LIST_EXCEPT) | grep -E 'akefile|\.mk$$') \
+ && { echo $(msg) 1>&2; exit 1; } || :
+
+# Check that `make alpha' will not fail at the end of the process.
+writable-files:
+ if test -d $(release_archive_dir); then :; else \
+ for file in $(distdir).tar.gz \
+ $(release_archive_dir)/$(distdir).tar.gz; do \
+ test -e $$file || continue; \
+ test -w $$file \
+ || { echo ERROR: $$file is not writable; fail=1; }; \
+ done; \
+ test "$$fail" && exit 1 || : ; \
+ fi
+
+v_etc_file = lib/version-etc.c
+sample-test = tests/sample-test
+texi = doc/$(PACKAGE).texi
+# Make sure that the copyright date in $(v_etc_file) is up to date.
+# Do the same for the $(sample-test) and the main doc/.texi file.
+sc_copyright_check:
+ @if test -f $(v_etc_file); then \
+ grep 'enum { COPYRIGHT_YEAR = '$$(date +%Y)' };' $(v_etc_file) \
+ >/dev/null \
+ || { echo 'out of date copyright in $(v_etc_file); update it' 1>&2; \
+ exit 1; }; \
+ fi
+ @if test -f $(sample-test); then \
+ grep '# Copyright (C) '$$(date +%Y)' Free' $(sample-test) \
+ >/dev/null \
+ || { echo 'out of date copyright in $(sample-test); update it' 1>&2; \
+ exit 1; }; \
+ fi
+ @if test -f $(texi); then \
+ grep 'Copyright @copyright{} .*'$$(date +%Y)' Free' $(texi) \
+ >/dev/null \
+ || { echo 'out of date copyright in $(texi); update it' 1>&2; \
+ exit 1; }; \
+ fi
+
+# #if HAVE_... will evaluate to false for any non numeric string.
+# That would be flagged by using -Wundef, however gnulib currently
+# tests many undefined macros, and so we can't enable that option.
+# So at least preclude common boolean strings as macro values.
+sc_Wundef_boolean:
+ @grep -Ei '^#define.*(yes|no|true|false)$$' '$(CONFIG_INCLUDE)' && \
+ { echo 'Use 0 or 1 for macro values' 1>&2; exit 1; } || :
+
+sc_vulnerable_makefile_CVE-2009-4029:
+ @files=$$(find $(srcdir) -name Makefile.in); \
+ if test -n "$$files"; then \
+ grep -E \
+ 'perm -777 -exec chmod a\+rwx|chmod 777 \$$\(distdir\)' \
+ $$files && \
+ { echo '$(ME): the above files are vulnerable; beware of' \
+ 'running "make dist*" rules, and upgrade to fixed automake' \
+ 'see http://bugzilla.redhat.com/542609 for details' \
+ 1>&2; exit 1; } || :; \
+ else :; \
+ fi
+
+vc-diff-check:
+ (unset CDPATH; cd $(srcdir) && $(VC) diff) > vc-diffs || :
+ if test -s vc-diffs; then \
+ cat vc-diffs; \
+ echo "Some files are locally modified:" 1>&2; \
+ exit 1; \
+ else \
+ rm vc-diffs; \
+ fi
+
+rel-files = $(DIST_ARCHIVES)
+
+gnulib_dir ?= $(srcdir)/gnulib
+gnulib-version = $$(cd $(gnulib_dir) && git describe)
+bootstrap-tools ?= autoconf,automake,gnulib
+
+# If it's not already specified, derive the GPG key ID from
+# the signed tag we've just applied to mark this release.
+gpg_key_ID ?= \
+ $$(git cat-file tag v$(VERSION) > .ann-sig \
+ && gpgv .ann-sig - < /dev/null 2>&1 \
+ | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
+
+announcement: NEWS ChangeLog $(rel-files)
+ @$(build_aux)/announce-gen \
+ --release-type=$(RELEASE_TYPE) \
+ --package=$(PACKAGE) \
+ --prev=$(PREV_VERSION) \
+ --curr=$(VERSION) \
+ --gpg-key-id=$(gpg_key_ID) \
+ --news=$(srcdir)/NEWS \
+ --bootstrap-tools=$(bootstrap-tools) \
+ --gnulib-version=$(gnulib-version) \
+ --no-print-checksums \
+ $(addprefix --url-dir=, $(url_dir_list))
+
+## ---------------- ##
+## Updating files. ##
+## ---------------- ##
+
+ftp-gnu = ftp://ftp.gnu.org/gnu
+www-gnu = http://www.gnu.org
+
+upload_dest_dir_ ?= $(PACKAGE)
+emit_upload_commands:
+ @echo =====================================
+ @echo =====================================
+ @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
+ @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\"
+ @echo " $(rel-files)"
+ @echo '# send the ~/announce-$(my_distdir) e-mail'
+ @echo =====================================
+ @echo =====================================
+
+noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
+define emit-commit-log
+ printf '%s\n' 'post-release administrivia' '' \
+ '* NEWS: Add header line for next release.' \
+ '* .prev-version: Record previous version.' \
+ '* cfg.mk (old_NEWS_hash): Auto-update.'
+endef
+
+.PHONY: no-submodule-changes
+no-submodule-changes:
+ if test -d $(srcdir)/.git; then \
+ diff=$$(cd $(srcdir) && git submodule -q foreach \
+ git diff-index --name-only HEAD) \
+ || exit 1; \
+ case $$diff in '') ;; \
+ *) echo '$(ME): submodule files are locally modified:'; \
+ echo "$$diff"; exit 1;; esac; \
+ else \
+ : ; \
+ fi
+
+.PHONY: alpha beta stable
+ALL_RECURSIVE_TARGETS += alpha beta stable
+alpha beta stable: $(local-check) writable-files no-submodule-changes
+ test $@ = stable \
+ && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
+ || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
+ || :
+ $(MAKE) vc-diff-check
+ $(MAKE) news-check
+ $(MAKE) distcheck
+ $(MAKE) dist XZ_OPT=-9ev
+ $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
+ $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+# Override this in cfg.mk if you follow different procedures.
+release-prep-hook ?= release-prep
+
+.PHONY: release-prep
+release-prep:
+ case $$RELEASE_TYPE in alpha|beta|stable) ;; \
+ *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
+ $(MAKE) -s announcement > ~/announce-$(my_distdir)
+ if test -d $(release_archive_dir); then \
+ ln $(rel-files) $(release_archive_dir); \
+ chmod a-w $(rel-files); \
+ fi
+ echo $(VERSION) > $(prev_version_file)
+ $(MAKE) update-NEWS-hash
+ perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
+ $(emit-commit-log) > .ci-msg
+ $(VC) commit -F .ci-msg -a
+ rm .ci-msg
+
+.PHONY: web-manual
+web-manual:
+ @test -z "$(manual_title)" \
+ && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
+ @cd '$(srcdir)/doc'; \
+ $(SHELL) ../build-aux/gendocs.sh -o '$(abs_builddir)/doc/manual' \
+ --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
+ "$(PACKAGE_NAME) - $(manual_title)"
+ @echo " *** Upload the doc/manual directory to web-cvs."
+
+# Code Coverage
+
+init-coverage:
+ $(MAKE) $(AM_MAKEFLAGS) clean
+ lcov --directory . --zerocounters
+
+COVERAGE_CCOPTS ?= "-g --coverage"
+COVERAGE_OUT ?= doc/coverage
+
+build-coverage:
+ $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS)
+ $(MAKE) $(AM_MAKEFLAGS) CFLAGS=$(COVERAGE_CCOPTS) CXXFLAGS=$(COVERAGE_CCOPTS) check
+ mkdir -p $(COVERAGE_OUT)
+ lcov --directory . --output-file $(COVERAGE_OUT)/$(PACKAGE).info \
+ --capture
+
+gen-coverage:
+ genhtml --output-directory $(COVERAGE_OUT) \
+ $(COVERAGE_OUT)/$(PACKAGE).info \
+ --highlight --frames --legend \
+ --title "$(PACKAGE_NAME)"
+
+coverage: init-coverage build-coverage gen-coverage
+
+# Update gettext files.
+PACKAGE ?= $(shell basename $(PWD))
+PO_DOMAIN ?= $(PACKAGE)
+POURL = http://translationproject.org/latest/$(PO_DOMAIN)/
+PODIR ?= po
+refresh-po:
+ rm -f $(PODIR)/*.po && \
+ echo "$(ME): getting translations into po (please ignore the robots.txt ERROR 404)..." && \
+ wget --no-verbose --directory-prefix $(PODIR) --no-directories --recursive --level 1 --accept .po --accept .po.1 $(POURL) && \
+ echo 'en@boldquot' > $(PODIR)/LINGUAS && \
+ echo 'en@quot' >> $(PODIR)/LINGUAS && \
+ ls $(PODIR)/*.po | sed 's/\.po//' | sed 's,$(PODIR)/,,' | sort >> $(PODIR)/LINGUAS
+
+INDENT_SOURCES ?= $(C_SOURCES)
+.PHONY: indent
+indent:
+ indent $(INDENT_SOURCES)
+
+# If you want to set UPDATE_COPYRIGHT_* environment variables,
+# put the assignments in this variable.
+update-copyright-env ?=
+
+# Run this rule once per year (usually early in January)
+# to update all FSF copyright year lists in your project.
+# If you have an additional project-specific rule,
+# add it in cfg.mk along with a line 'update-copyright: prereq'.
+# By default, exclude all variants of COPYING; you can also
+# add exemptions (such as ChangeLog..* for rotated change logs)
+# in the file .x-update-copyright.
+.PHONY: update-copyright
+update-copyright:
+ grep -l -w Copyright \
+ $$(export VC_LIST_EXCEPT_DEFAULT=COPYING && $(VC_LIST_EXCEPT)) \
+ | $(update-copyright-env) xargs $(build_aux)/$@
diff --git a/po/.reference/cs.po b/po/.reference/cs.po
new file mode 100644
index 00000000..0948f411
--- /dev/null
+++ b/po/.reference/cs.po
@@ -0,0 +1,670 @@
+# Czech translation of the GNU m4.
+# Copyright (C) 1998 Free Software Foundation, Inc.
+# Ji Pavlovsk <pavlovsk@ff.cuni.cz>, 1998-2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2000-08-08 23:19+0200\n"
+"Last-Translator: Ji Pavlovsk <pavlovsk@ff.cuni.cz>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: pepna `%s' nen jednoznan\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: pepna `--%s' mus bt zadn bez argumentu\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: pepna `%c%s' mus bt zadn bez argumentu\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: pepna `%s' vyaduje argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: neznm pepna `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: neznm pepna `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: neznm pepna -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: neznm pepna -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: pepna vyaduje argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: pepna `-W %s' nen jednoznan\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: pepna ` -W %s' mus bt zadn bez argumentu\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "pam vyerpna"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "spch"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Shoda nenalezena"
+
+# , c-format
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "patn regulrn vraz"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Chybn srovnvac znak"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Chybn tda znak"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Nadbyten zptn lomtko"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Chybn zptn odkaz"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Chyb uzavrajc znak pro [ i [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Chyb uzavrajc znak pro ( i \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Chyb uzavrajc znak pro \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Chybn obsah \\{\\} vrazu"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Chybn specifikace intervalu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Pam vyerpna"
+
+# , c-format
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Chybn pedchoz regulrn vraz"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Pedasn konec regulrnho vrazu"
+
+# , c-format
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Pli velik regulrn vraz"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Chyb otevrajc znak pro \\)"
+
+# , c-format
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Chyb pedchoz regulrn vraz"
+
+# , c-format
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varovn: pli mlo argument pro vestavn makro `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varovn: pli mnoho argument pro vestavn makro `%s' - budou ignorovny"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Neseln argument pro vestavn makro `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "VNITN CHYBA: patn typ tokenu v define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Jmno %s nen definovno"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "VNITN CHYBA: Vestavn makro nenalezeno v tabulce vestavnch maker!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "VNITN CHYBA: patn typ tokenu v m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Jmno `%s' nen definovno"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "VNITN CHYBA: patn typ symbolu v m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Rouru do pkazu `%s' nelze otevt"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Zklad v makru eval je mimo rozsah (zklad = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Zporn ka v makru eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Neseln argument pro %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Chyba pi voln makra undivert pro %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntaktick kd %c nen definovn"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "%s nelze otevt"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Ladc md: patn ladc volby: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Chybov soubor %s nelze pout"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VAROVN: \\0 zmiz, pi nahrazovn pouijte \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "patn regulrn vraz `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Chyba pi porovnvn regulrnho vrazu `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr ""
+"VNITN CHYBA: vestavn makro nenalezeno v tabulce vestavnch maker\n"
+"(trace_pre ())!"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "VNITN CHYBA: patn typ tokenu (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "patn vraz v makru eval (chyb prav zvorka): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "patn vraz v makru eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "patn vraz v makru eval (patn vstup): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "patn vraz v makru eval (nadbyten vstup): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Dlen nulou v makru eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nulou v makru eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "VNITN CHYBA: patn chybov kd v evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "VNITN CHYBA: patn opertor porovnn v cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "VNITN CHYBA: patn opertor posunu v shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "VNITN CHYBA: patn opertor v mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "VNITN CHYBA: Vestavn makro nenalezeno v tabulce vestavnch maker!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "VNITN CHYBA: patn typ tokenu ve freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ve zmrazenm souboru oekvn LF"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ve zmrazenm souboru oekvn znak `%c'"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "patn formt zmrazenho souboru"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Pedasn konec zmrazenho souboru"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' ze zmrazenho souboru nenalezeno v tabulce vestavnch maker!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Vstup ten z %s, dku %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Vstup ten z %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "VNITN CHYBA: rekurzivn push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "VNITN CHYBA: patn voln init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "VNITN CHYBA: chyba vstupnho zsobnku v next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "VNITN CHYBA: chyba vstupnho zsobnku v peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "DN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "CHYBA: EOF v etzci"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "CHYBA: Peteen zsobnku. (nekonen rekurze makra define?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Vce informac zskte pkazem `%s --help'.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Pouit: %s [PEPNA]... [SOUBOR]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Povinn i voliteln argumenty pro dlouh pepnae jsou povinn respektive\n"
+"voliteln i pro odpovdajc pepnae krtk.\n"
+"\n"
+"Chovn programu:\n"
+" --help vype tuto npovdu a skon\n"
+" --version vype oznaen verze a skon\n"
+" -e, --interactive nebufferovan vstup, ignoruje peruen\n"
+" -E, --fatal-warnings skon po prvnm varovn\n"
+" -Q, --quiet, --silent potla nkter varovn tkajc se\n"
+" vestavnch maker\n"
+" -P, --prefix-builtins vechna vestavn makra budou mt prefix `m4_'\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGVR syntaxe jmen maker bude urena pomoc REGVR\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Nastaven dynamickho zavdn modul:\n"
+" -m, --module-directory=ADRES pid ADRES k seznamu adres s moduly\n"
+" -M, --load-module=MODUL zavede dynamick MODUL z M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Nastaven preprocesoru:\n"
+" -I, --include=ADRES ADRES bude druh v poad pi hledn\n"
+" vloench soubor\n"
+" -D, --define=MAKRO[=HODNOTA] definuje MAKRO majc HODNOTU, me bt\n"
+" i przdn\n"
+" -U, --undefine=MAKRO smae vestavn MAKRO\n"
+" -s, --synclines vlo dky tvaru `#line SLO \"SOUBOR\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Nastaven limit:\n"
+" -G, --traditional vypne GNU rozen\n"
+" -H, --hashsize=PRVOSLO velikost hash tabulky pro vyhledvn symbol\n"
+" -L, --nesting-limit=SLO nastav limit pro vnoen voln maker\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Zmrazen soubory:\n"
+" -F, --freeze-state=SOUBOR pi ukonen ulo zmrazen stav do SOUBORU\n"
+" -R, --reload-state=SOUBOR pi startu nate zmrazen stav ze SOUBORU\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Ladn:\n"
+" -d, --debug=[VOLBY] nastav rove ladn (pokud nejsou VOLBY\n"
+" zadny, pak implicitn `aeq')\n"
+" -t, --trace=MAKRO sleduje MAKRO, kdy je definovno\n"
+" -l, --arglength=POET reguluje poet vstupnch informac\n"
+" ze sledovn maker\n"
+" -o, --error-output=SOUBOR pesmruje vstup ladn a sledovn do SOUBORU\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"VOLBOU me bt cokoliv z:\n"
+" t sleduje vechna makra, nejenom ta uren pomoc traceon\n"
+" a vype aktuln argumenty\n"
+" e vype expanzi\n"
+" q dle poteby uzave hodnoty mezi apostrofy, s volbami a nebo e\n"
+" c vype hodnoty ped a po vyhodnocen argument a po voln makra\n"
+" x bude vypisovat jedinen ID voln makra, uiten s volbou c\n"
+" f bude vypisovat nzev vstupnho souboru\n"
+" l bude vypisovat slo vstupnho dku\n"
+" p vype informace o nalezen zadanho souboru\n"
+" i vype informace o kad zmn vstupnho souboru\n"
+" V zkratka pro vechny ve uveden volby\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nJestlie SOUBOR nen zadn, nebo je SOUBOR `-', pak je ten standardn vstup.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Chyby v programu oznamujte na adrese <bug-m4@gnu.org> (anglicky).\n"
+"Pipomnky k pekladu zaslejte na adresu <cs@li.org> (esky).\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "patn ladc volby: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "CHYBA: `%s' nelze pidat k seznamu prohledvanch adres"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "CHYBA: `%s' nelze pidat k seznamu prohledvanch adres: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (peloeno s volbami:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "VNITN CHYBA: patn kd v odloench argumentech"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "VNITN CHYBA: patn typ tokenu v expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "CHYBA: EOF v seznamu argument"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "VNITN CHYBA: patn typ tokenu v expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "VNITN CHYBA: patn typ symbolu v call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "CHYBA: pekroen limit pro rekurzi (%d), zmte jej pomoc -L<N>"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "CHYBA: moduly nelze inicializovat: %s"
+
+# , c-format
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "CHYBA: modul `%s' nelze nalzt"
+
+# , c-format
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "CHYBA: modul `%s' nelze nalzt: %s"
+
+# , c-format
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "CHYBA: moduly nelze deinicializovat"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "CHYBA: moduly nelze deinicializovat: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "CHYBA: modul `%s' nelze deinicializovat"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "CHYBA: modul `%s' nelze deinicializovat: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "CHYBA: doasn soubor pro uloen odloenho vstupu nelze vytvoit"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "CHYBA: odloen vstup nelze zapsat do doasnho souboru"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "CHYBA: pi zapisovn vloenho souboru"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "CHYBA: pi ten vloenho souboru"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Chyba pi voln funkce stat pro soubor obsahujc odloen vstup"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Odloen vstup je pli velik."
+
+# , c-format
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Hledn soubor `%s', nalezen soubor `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Pekroen VMEM limit?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Neoprvnn pstup do pamti (SIGSEGV). Jedn se bu o peteen zsobnku,\n"
+"nebo o chybu "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Provte, zda se nejedn o nekonenou rekurzi.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "VNITN CHYBA: patn md pro symbol_lookup ()"
+
+# , c-format
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Jmno `%s' nen znmo\n"
diff --git a/po/.reference/cs.s1 b/po/.reference/cs.s1
new file mode 100644
index 00000000..4ad67fa6
--- /dev/null
+++ b/po/.reference/cs.s1
@@ -0,0 +1 @@
+c00fafbdb462aa4a3b973f308a41cd44950fd4ee -
diff --git a/po/.reference/da.po b/po/.reference/da.po
new file mode 100644
index 00000000..d8eb280c
--- /dev/null
+++ b/po/.reference/da.po
@@ -0,0 +1,653 @@
+# Danish version of GNU m4 strings.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Ole Laursen <olau@hardworking.dk>, 2000, 2001.
+#
+# Diversion er ikke oversat fordi det endnu ikke er lykkedes
+# at finde et passende dansk ord (hjlp modtages gerne :-).
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-06-14 23:09+02:00\n"
+"Last-Translator: Ole Laursen <olau@hardworking.dk>\n"
+"Language-Team: Danish <dansk@klid.dk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: tilvalget '%s' is flertydigt\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '--%s' tager ikke en parameter\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '%c%s' tager ikke en parameter\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: tilvalget '%s' skal have en parameter\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ukendt tilvalg '--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ukendt tilvalg '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ulovligt tilvalg - %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ugyldigt tilvalg - %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tilvalg skal have en parameter - %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: tilvalget '-W %s' er flertydigt\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '-W %s' tager ikke en parameter\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "lbet tr for hukommelse"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succes"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Intet fundet"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ugyldigt regulrt udtryk"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ugyldigt sorteringstegn"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ugyldig tegnklassenavn"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Afsluttende omvendt skrstreg"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ugyldig tilbagereference"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Uafbalanceret [ eller [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Uafbalanceret ( eller \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Uafbalanceret \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ugyldigt indhold af \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ugyldig intervalslutning"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Lbet tr for hukommelse"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ugyldigt forudgende regulrt udtryk"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "For tidlig afslutning p regulrt udtryk"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regulrt udtryk for stort"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Uafbalanceret ) eller \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Intet tidligere regulrt udtryk"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Advarsel: For f parametre til indbygget `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Advarsel: Ekstra parametre til indbygget `%s' ignoreret"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Parameteren til indbygget `%s' er ikke et tal"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERN FEJL: Ugyldig datatype i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Navnet '%s' ikke defineret"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERN FEJL: Ugyldig datatype i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ikke-defineret navn '%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERN FEJL: Ugyldig symboltype i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan ikke bne overfrselsledning til kommando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Grundtallet i eval ligger ikke i det gyldige interval (grundtal = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negativ bredde i eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Parameteren til %s er ikke et tal"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan ikke undivert %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntakskode %c ikke defineret"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan ikke bne %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Fejlretningstilstand: ugyldige fejlfindingsflag: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan ikke stte fil %s til brug for fejl"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "ADVARSEL: \\0 vil forsvinde, brug \\& i stedet for i erstatninger"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Ugyldigt regulrt udtryk `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fejl under sgning af regulrt udtryk `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERN FEJL: Ugyldig datatype (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Ugyldigt udtryk i eval (manglende hjreparantes): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Ugyldigt udtryk i eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Ugyldigt udtryk i eval (ugyldigt inddata): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Ugyldigt udtryk i eval (for stor mngde inddata): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division med nul i eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo med nul i eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERN FEJL: Ugyldig fejlkode i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERN FEJL: Ugyldig sammenligningsoperator i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERN FEJL: Ugyldig skifteoperator i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERN FEJL: Ugyldig operator i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERN FEJL: Ugyldig datatype i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Forventede linieskift i fryst fil"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Forventede tegnet `%c' i fryst fil"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Ugyldigt formatteret fryst fil"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "For tidlig afslutning p fryst fil"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' fra fryst fil ikke fundet i tabellen over indbyggede"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Inddata sendt tilbage til %s, linje %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Inddata lst fra %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERN FEJL: Rekursiv push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERN FEJL: Ugyldigt kald til init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERN FEJL: Inddatastakken forkludret i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERN FEJL: Inddatastakken forkludret i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "INTET"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEJL: EOF i tekststreng"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEJL: Overfyldt stak. (Uendelig define rekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prv `%s --help' for mere information.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Brug: %s [TILVALG]... [FIL]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Obligatoriske eller valgfri parametre til lange tilvalg er ogs\n"
+"obligatoriske eller valgfri for de korte tilvalg\n"
+"\n"
+"Arbejdstilstande:\n"
+" --help vis denne hjlp og afslut\n"
+" --version udskriv versionsinformation og afslut\n"
+" -e, --interactive uddata ikke i buffer, ignorr afbrydelser\n"
+" -E, --fatal-warnings stop efter den frste advarsel\n"
+" -Q, --quiet, --silent undertryk nogle advarsler for indbyggede\n"
+" -P, --prefix-builtins st et `m4_'-prfix p alle indbyggede\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP benyt REGEXP som makronavnssyntaks\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamiske indlsningsfaciliteter:\n"
+" -m, --module-directory=KATALOG tilfj KATALOG til modulsgningsstien\n"
+" -M, --load-module=MODUL indls dynamisk MODUL fra M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Forbehandlerfaciliteter:\n"
+" -I, --include=MAPPE led sekundrt i denne mappe efter inkluderinger\n"
+" -D, --define=NAVN[=VRDI] indst NAVN med vrdien tom eller VRDI\n"
+" -U, --undefine=NAVN slet indbygget NAVN\n"
+" -s, --synclines generr `#line NR \"FIL\"' linjer\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Regulering af grnser:\n"
+" -G, --traditional undertryk alle GNU-udvidelser\n"
+" -H, --hashsize=PRIMTAL st strrelsen p hashtabellen til symbolopslag\n"
+" -L, --nesting-limit=NUMMER st grnsen p strukturer inde i hinanden\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fryste tilstandsfiler:\n"
+" -F, --freeze-state=FIL gem en fryst tilstand i FIL til slut\n"
+" -R, --reload-state=FIL hent en fryst tilstand fra FIL ved start\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Fejlretning:\n"
+" -d, --debug=[FLAG] st fejlretningsniveau (ingen flag medfrer `aeq')\n"
+" -t, --trace=NAVN flg navn nr det bliver defineret\n"
+" -l, --arglength=NR afgrns strrelsen af makrosporingens uddata\n"
+" -o, --error-output=FIL omdirigr fejlretnings- og sporingsuddata\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAG er hvilken som helst af:\n"
+" t flg alle makrokald, ikke kun dem med traceon\n"
+" a vis aktuelle parametre\n"
+" e vis makroudfoldelse\n"
+" q anbring aktuelle parametre og udfoldelser mellem citationstegn\n"
+" c vis fr indsamling af parametre, efter indsamling og efter kald\n"
+" x tilfj et unikt makrokald-id, nyttig med `c'-flaget\n"
+" f vis nuvrende inddatafilnavn\n"
+" l vis nuvrende inddatalinjenummer\n"
+" p vis resultat af stisgninger\n"
+" i vis ndringer i inddatafiler\n"
+" V forkortelse for alle ovenstende flag\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nStandardinddata lses hvis FIL ikke specificeres eller hvis FIL er `-'.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nRapportr fejl (p engelsk) til <bug-m4@gnu.org> (oversttelsesfejl til <olau@hardworking.dk>).\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Ugyldige fejlretningsflag: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEJL: tilfjelse af sgningskataloget '%s' mislykkedes"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEJL: tilfjelse af sgningskataloget '%s' mislykkedes: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tilvalg:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERN FEJL: Ugyldig kode i opsatte parametre"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERN FEJL: Ugyldig type i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEJL: EOF i parameterliste"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERN FEJL: Ugyldig type i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERN FEJL: Ugyldig symboltype i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEJL: Rekursionsgrnse p %d overskredet, -L<N> kan bruges til at ndre den"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEJL: klargring af moduler mislykkedes: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEJL: Kan ikke finde modul: '%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEJL: kan ikke finde modul: '%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEJL: Kan ikke lukke moduler"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEJL: kan ikke lukke moduler: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEJL: Kan ikke lukke modul: '%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEJL: kan ikke lukke modul: '%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEJL: Kan ikke oprette midlertidig fil til diversion"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEJL: Kan ikke hlde diversion ud i midlertidig fil"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEJL: Kopierer indsat fil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEJL: Lser indsat fil"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan ikke finde filoplysninger om diversion"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversion for stor"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Stisgning efter '%s' fandt '%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-grnsen overskredet?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Overskridelse af hukommelsesgrnserne opdaget (SIGSEGV). Enten er stakken\n"
+"blevet overfyldt, eller der er en fejl i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Se efter om der skulle vre uendelige rekursioner.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERN FEJL: Ulovlig tilstand til symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Navnet '%s' er ukendt\n"
diff --git a/po/.reference/da.s1 b/po/.reference/da.s1
new file mode 100644
index 00000000..8b48f573
--- /dev/null
+++ b/po/.reference/da.s1
@@ -0,0 +1 @@
+0660db496cc2b8b1e1483a7ba27c4e6d090142de -
diff --git a/po/.reference/de.po b/po/.reference/de.po
new file mode 100644
index 00000000..7ccf475e
--- /dev/null
+++ b/po/.reference/de.po
@@ -0,0 +1,654 @@
+# German translation for the GNU m4 messages
+# Copyright (C) 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995
+# Martin von Lwis <martin@mira.isdn.cs.tu-berlin.de>, 1996, 1999, 2001
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-10-10 10:31+02:00\n"
+"Last-Translator: Martin von Lwis <martin@mira.isdn.cs.tu-berlin.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: Die Option %s ist mehrdeutig.\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: Die Option --%s erlaubt keinen Parameter.\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: Die Option %c%s erlaubt keinen Parameter.\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: Die Option %s verlangt einen Parameter.\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: Nicht erkannte Option --%s.\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "\"%s: Nicht erkannte Option %c%s.\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: Ungltige Option -- %c.\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: Ungltige Option -- %c.\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: Option verlangt einen Parameter -- %c.\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: Option -W %s ist zweideutig.\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: Option -W %s erlaubt keinen Parameter.\\\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "Virtueller Speicher erschpft."
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Erfolg"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Keine bereinstimmung"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ungltiger regulrer Ausdruck"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ungltiger Vergleichsbuchstabe"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ungltiger Name fr eine Zeichenklasse"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Angehngter Backslash (\\)"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ungltiger Rckverweis"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ oder [^ ohne schlieende Klammer"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( oder \\( ohne schlieende Klammer"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "{ ohne schlieende Klammer"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ungltiger Inhalt von \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ungltiges Bereichsende"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Kein Speicher mehr verfgbar"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Der vorherige regulre Ausdruck ist nicht korrekt"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Unerwartetes Ende des regulren Ausdrucks"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regulrer Ausdruck zu gro"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") order \\) ohne ffnende Klammer"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Kein vorangehender regulrer Ausdruck"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Warnung: Zu wenig Argumente fr eingebaute Funktion %s"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Warnung: berschssige Argumente fr eingebaute Funktion %s ignoriert"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Nicht-numerisches Argument in eingebauter Funktion %s"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Name %s nicht definiert"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Undefinierter Name %s."
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERNER FEHLER: Falscher Symboltyp in m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kann keine `pipe' fr Kommando %s ffnen"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Basis in `eval' nicht in den Grenzen (Basis = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negative Breite in `eval'"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Nicht-numerisches Argument in %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kann Umleitung %s nicht aufheben"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntaxzeichen %c nicht definiert."
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kann %s nicht ffnen"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmodus: falsche Debug Flags: %s"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kann Fehlerdatei nicht vorbereiten: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "WARNUNG: \\0 wird wegfallen, benutze \\& stattdessen"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Falscher regulrer Ausdruck %s: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fehler beim Erkennen des regulren Ausdrucks %s"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Falscher Ausdruck in `eval' (fehlende rechte Klammer): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Falscher Ausdruck in `eval': %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Falscher Ausdruck in `eval' (falsche Eingabe): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Falscher Ausdruck in `eval' (zu groe Eingabe): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division durch Null in `eval': %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo Null in `eval': %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERNER FEHLER: Falscher Fehlerkode in evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERNER FEHLER: Falscher Vergleichsoperator in cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERNER FEHLER: Falscher Shift-Operator in shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERNER FEHLER: Falscher Operator in mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Erwarte Zeilenumbruch in eingefrorener Datei"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Erwarte Zeichen %c in eingefrorener Datei"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fehlerhafte eingefrorene Datei"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Vorzeitiges Ende der eingefrorenen Datei"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "%s aus eingefrorener Datei nicht in Tabelle der eingebauten Funktionen gefunden!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Eingabe zurckgenommen zu %s, Zeile %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Eingabe gelesen von %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERNER FEHLER: Rekursives push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERNER FEHLER: Falscher Aufruf von init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in peek_input ()"
+
+# This is the name of the input file when there is no current input file.
+# Is this ever printed in a message?
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEHLER: Dateiende in Zeichenkette"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEHLER: Keller voll. (Unendliche `define' Rekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "%s --help zeigt weitere Informationen.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Aufruf: %s [OPTION]... [DATEI]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Notwendige bzw. optionale Argumente fr Optionen der Langform sind auch \n"
+"fr die Kurform notwendig bzw. optional.\n"
+"\n"
+"Operationsmodi:\n"
+" --help zeige diese Hilfe an und beende\n"
+" --version zeige Versionsinformation an und beende\n"
+" -e, --interactive keine Ausgabepufferung, ignoriere Interrupts\n"
+" -E, --fatal-warnings beende Ausfhrung nach erster Warnung\n"
+" -Q, --quiet, --silent unterdrcke Warnungen bei eingebauten Funktionen\n"
+" -P, --prefix-builtins erzwinge `m4_' Prfix fr eingebaute Funktionen\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP benutze REGEXP fr Makronamensyntax\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisches Nachladen:\n"
+" -m, --module-directory=VERZEICHNIS VERZEICHNIS in den Modulsuchpfad einfgen.\n"
+" -M, --load-module=MODUL MODUL dynamisch vom M4MODPATH laden.\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Prprozessoreigenschaften:\n"
+" -I, --include=VERZEICHNIS durchsuche VERZEICHNIS als zweites bei `include'\n"
+" -D, --define=NAME[=WERT] fge NAME mit WERT (oder leer) ein\n"
+" -U, --undefine=NAME lsche eingebaute Funktion NAME\n"
+" -s, --synclines erzeuge `#line NR \"DATEI\"' Zeilen\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Setze Grenzen:\n"
+" -G, --traditional schalte alle GNU Erweiterungen aus\n"
+" -H, --hashsize=PRIMZAHL setze Gre der Symbol-Hashtabelle\n"
+" -L, --nesting-limit=NUMMER setze knstliche Grenze fr Schachtelungstiefe\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Eingefrorene Dateien:\n"
+" -F, --freeze-state=DATEI erzeuge am Ende eine eingefrorene Form in DATEI\n"
+" -R, --reload-state=DATEI lade zu Beginn Zustand von eingefrorener DATEI\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] setze Debuglevel (keine FLAGS bedeutet `aeq')\\\n"
+" -t, --trace=NAME verfolge NAME, wenn er definiert wird\n"
+" -l, --arglength=NUMMER beschrnke Gre bei Macroverfolgung\n"
+" -o, --error-output=DATEI leite Debug- und Verfolgungsausgaben nach DATEI\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS ist Kombination aus folgendem:\n"
+" t verfolge alle Makroaufrufe, nicht nur die von `traceon'\n"
+" a zeige aktuelle Argumente\n"
+" e zeige Ausdehnung\n"
+" q setze Werte in Anfhrungszeichen, wenn ntig, mit a- oder e-Flag\n"
+" c zeige vor und nach `collect' und nach Aufruf an\n"
+" x zeige fr jeden Aufruf eindeutige Nummer an, hilfreich bei -c\n"
+" f gebe Namen der aktuellen Eingabedatei aus\n"
+" l gebe aktuelle Zeilennummer der Eingabezeile aus\n"
+" p gebe Ergebnis der Pfadsuche aus\n"
+" i gebe Vernderungen der Eingabedatei aus\n"
+" V Kurzform fr alle Flags oben zusammen\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nOhne DATEI oder wenn DATEI `-' ist, wird die Standardeingabe gelesen\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nProbleme und Fehler an <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Falsche Debug Flags: %s"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEHLER: Suchverzeichnis %s konnte nicht eingefgt werden."
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEHLER: Suchverzeichnis %s konnte nicht eingefgt werden: %s."
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr "(Optionen:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERNER FEHLER: Falscher Kode in zurckgestellten Argumenten"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in expands_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEHLER: Dateiende in Argumentliste"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERNER FEHLER: Falscher Typ des Tokens in expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERNER FEHLER: Falsche Symboltyp in call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEHLER: Grenze der Rekursion von %d berschritten, benutze -L<N> zur nderung"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEHLER: Kann Module nicht initialisieren: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEHLER: Kann Modul nicht finden: %s."
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEHLER: Kann Modul nicht finden: %s: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEHLER: Kann Module nicht schlieen."
+
+# XXX: Autor fragen, ob "cannot cannot" absicht ist.
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEHLER: Kann Module nicht schlieen: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEHLER: Kann Modul nicht schlieen: %s"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEHLER: Kann Modul nicht schlieen: %s: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEHLER: Kann keine temporre Datei fr Umleitung erzeugen"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEHLER: Kann Umleitung nicht in temporre Datei ausgeben"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEHLER: Whrend Kopieren einer eingefgten Datei"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEHLER: Whrend Lesen einer eingefgten Datei"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kann `stat' nicht auf Umleitung anwenden"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Die Umleitung (diversion) ist zu lang."
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Pfad fr Suche nach %s hat %s gefunden"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM Beschrnkung berschritten?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Verletzung der Speichergrenzen festgestellt (SIGSEGV). Entweder ist ein\n"
+"Stackberlauf aufgetreten, oder es gibt einen Fehler in "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Untersuche auf mgliche unendliche Rekursion.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERNER FEHLER: Illegaler Modus bei symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Name %s ist unbekannt\n"
diff --git a/po/.reference/de.s1 b/po/.reference/de.s1
new file mode 100644
index 00000000..dd6346f4
--- /dev/null
+++ b/po/.reference/de.s1
@@ -0,0 +1 @@
+5e60ede2eafd398ed56220b3d86ca67103e4b838 -
diff --git a/po/.reference/el.po b/po/.reference/el.po
new file mode 100644
index 00000000..0a0d1009
--- /dev/null
+++ b/po/.reference/el.po
@@ -0,0 +1,470 @@
+# Greek messages for GNU m4.
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>, 1999.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU m4 1.4n\n"
+"POT-Creation-Date: 1998-11-29 04:20+0100\n"
+"PO-Revision-Date: 1999-06-24 00:25+0000\n"
+"Last-Translator: Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>\n"
+"Language-Team: Greek <nls@tux.hellug.gr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-7\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: src/builtin.c:337
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr ": `%s'"
+
+#: src/builtin.c:343
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr ": `%s' "
+
+#: src/builtin.c:371
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "- `%s'"
+
+#: src/builtin.c:482
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr " : define_macro ()"
+
+#: src/builtin.c:677 src/builtin.c:740 src/builtin.c:1383 src/builtin.c:1407
+#, c-format
+msgid "Undefined name %s"
+msgstr " %s"
+
+#: src/builtin.c:705
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr " : !"
+
+#: src/builtin.c:713
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr " : m4_dumpdef ()"
+
+#: src/builtin.c:764
+#, c-format
+msgid "Undefined macro `%s'"
+msgstr " `%s'"
+
+#: src/builtin.c:802
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr " : m4_defn ()"
+
+#: src/builtin.c:868
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr " `%s'"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr " ( = %d)"
+
+#: src/builtin.c:917
+msgid "Negative width to eval"
+msgstr " "
+
+#: src/builtin.c:1023
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr " %s"
+
+#: src/builtin.c:1035
+#, c-format
+msgid "Cannot undivert %s"
+msgstr " %s"
+
+#: src/builtin.c:1183
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr " %c"
+
+#: src/builtin.c:1234 src/freeze.c:207
+#, c-format
+msgid "Cannot open %s"
+msgstr " %s"
+
+#: src/builtin.c:1443
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr " : : `%s'"
+
+#: src/builtin.c:1479
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr " : %s"
+
+#: src/builtin.c:1696
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr ": \\0 , \\& "
+
+#: src/builtin.c:1757 src/builtin.c:1817 src/input.c:1012
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr " `%s': %s"
+
+#: src/builtin.c:1768 src/builtin.c:1841
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr " `%s'"
+
+#: src/debug.c:379
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr " : ! (trace_pre ())"
+
+#: src/debug.c:387
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr " : (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr " : evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr " : cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr " : shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr " : mult_term ()"
+
+#: src/freeze.c:115
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr " : !"
+
+#: src/freeze.c:128
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr " : freeze_one_symbol ()"
+
+#: src/freeze.c:159
+msgid "Expecting line feed in frozen file"
+msgstr " `line feed' "
+
+#: src/freeze.c:161
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr " `%c' "
+
+#: src/freeze.c:218
+msgid "Ill-formated frozen file"
+msgstr "- "
+
+#: src/freeze.c:273 src/freeze.c:289
+msgid "Premature end of frozen file"
+msgstr " "
+
+#: src/freeze.c:323
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr " `%s' "
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr " %s, %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr " %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr " : push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr " : init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr " : next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr " : peek_input ()"
+
+#: src/input.c:803
+msgid "NONE"
+msgstr ""
+
+#: src/input.c:1197 src/input.c:1224
+msgid "ERROR: EOF in string"
+msgstr ": EOF "
+
+#: src/m4.c:117
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr ": . ( ;)"
+
+#: src/m4.c:144
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr " `%s --help' .\n"
+
+#: src/m4.c:148
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr ": %s []... []...\n"
+
+#: src/m4.c:149
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+" \n"
+" .\n"
+"\n"
+" :\n"
+" --help \n"
+" --version \n"
+" -e, --interactive , \n"
+" -E, --fatal-warnings \n"
+" -Q, --quiet, --silent \n"
+" -P, --prefix-builtins `m4_' \n"
+
+#: src/m4.c:162
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W --word-regexp= \n"
+
+#: src/m4.c:166
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+" :\n"
+" -I, --include= \n"
+" -D, --define=[=] ͼ , \n"
+" -U, --undefine= ͼ\n"
+" -s, --synclines `#line \"\"'\n"
+
+#: src/m4.c:174
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+" :\n"
+" -G, --traditional GNU\n"
+" -H, --hashsize= \n"
+" -L, --nesting-limit= \n"
+
+#: src/m4.c:181
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+" :\n"
+" -F, --freeze-state=ARXEIO \n"
+" -R, --reload-state=ARXEIO \n"
+
+#: src/m4.c:187
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+":\n"
+" -d, --debug=[] ( `aeq')\n"
+" -t, --trace=ONOMA ͼ \n"
+" -l, --arglength= \n"
+" -o, --error-output= \n"
+
+#: src/m4.c:195
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+" :\n"
+" t , \n"
+" a \n"
+" e \n"
+" q , a e\n"
+" c , \n"
+" x , c\n"
+" f \n"
+" l \n"
+" p \n"
+" i \n"
+" V \n"
+
+#: src/m4.c:210
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\n , -, .\n"
+
+#: src/m4.c:215
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\n <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:388
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr " : `%s'"
+
+#: src/m4.c:417
+msgid " (options:"
+msgstr " (:"
+
+#: src/m4.c:500
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr " : "
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr " : expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr ": EOF "
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr " : expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr " : call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ": %d , -L<N> "
+
+#: src/module.c:312
+#, c-format
+msgid "Module search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#: src/module.c:349
+#, c-format
+msgid "ERROR: cannot find module `%s': %s"
+msgstr ": `%s': %s"
+
+#: src/module.c:353
+#, c-format
+msgid "ERROR: cannot find module `%s'"
+msgstr ": `%s'"
+
+#: src/output.c:198
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr ": "
+
+#: src/output.c:208
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr ": "
+
+#: src/output.c:292
+msgid "ERROR: Copying inserted file"
+msgstr ": "
+
+#: src/output.c:473
+msgid "ERROR: Reading inserted file"
+msgstr ": "
+
+#: src/output.c:572
+msgid "Cannot stat diversion"
+msgstr " "
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:168
+msgid "VMEM limit exceeded?\n"
+msgstr " ;\n"
+
+#: src/stackovf.c:190
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+" (SIGSEGV). \n"
+" "
+
+#: src/stackovf.c:195
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". ' .\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr " : symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr " `%s' \n"
diff --git a/po/.reference/el.s1 b/po/.reference/el.s1
new file mode 100644
index 00000000..4dbd36e4
--- /dev/null
+++ b/po/.reference/el.s1
@@ -0,0 +1 @@
+941aa81d60bb5f59090d1f3820827990959f9ad9 -
diff --git a/po/.reference/fi.po b/po/.reference/fi.po
new file mode 100644
index 00000000..6df96d1b
--- /dev/null
+++ b/po/.reference/fi.po
@@ -0,0 +1,664 @@
+# Finnish messages for m4.
+# Copyright © 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Jorma Karvonen <karvonen.jorma@gmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2010-03-02 22:05+0200\n"
+"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: valitsin ”%s” ei ole yksiselitteinen\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”--%s” ei salli argumenttia\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: valitsin ”%s” vaatii argumentin\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: tunnistamaton valitsin ”--%s”\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: tunnistamaton valitsin ”%c%s”\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: virheellinen valitsin -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: virheellinen valitsin -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: valitsin vaatii argumentin -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: valitsin ”-W %s” ei ole yksiselitteinen\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "muisti loppui"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Onnistui"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Ei täsmäystä"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Virheellinen säännöllinen lauseke"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Virheellinen tietojenkeräysmerkki"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Virheellinen merkkiluokkanimi"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Jälkikenoviiva"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Virheellinen paluuviite"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Pariton [ tai [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Pariton ( tai \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Pariton \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Virheellinen \\{\\}-sisältö"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Virheellinen alueen loppu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Muisti loppui"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Virheellinen edeltävä säännöllinen lauseke"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Säännöllisen lausekkeen ennenaikainen loppu"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Säännöllinen lauseke on liian suuri"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Pariton ) tai \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Ei edellistä säännöllistä lauseketta"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varoitus: Liian harvoja argumenttia sisäänrakennetulle ”%s”"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varoitus: Ei välitetä lisäargumenteista sisäänrakennetulle ”%s”"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Ei-numeerinen argumentti sisäänrakennettuun ”%s”"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi makrossa define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Määrittelemätön nimi %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "SISÄINEN VIRHE: Builtin ei löytynyt builtin-taulussa!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi funktiossa m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Määrittelemätön nimi ”%s”"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "SISÄINEN VIRHE: Väärä symbolityyppi funktiossa m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Ei voi avata putkea komentoon ”%s”"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Kantaluku kohteessa eval alueen ulkopuolella (kantaluku = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negatiivinen leveys kohteeseen eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Ei-numeerinen argumentti kohteeseen %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Ei voida kääntää takaisin %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Määrittelemätön syntaksikoodi %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Ei voi avata %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Vianjäljitystila: väärät vianjäljitysliput: ”%s”"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Ei voi asettaa virhetiedostoa: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VAROITUS: \\0 häviää, käytä sen sijaan merkintää \\& korvauksissa"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Virheellinen säännöllinen lauseke ”%s”: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Virhe täsmättäessä säännöllistä lauseketta ”%s”"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "SISÄINEN VIRHE: Builtin ei löytynyt builtin-taulussa! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Virheellinen lauseke kohteessa eval (oikea sulje puuttuu): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Virheellinen lauseke kohteessa eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Virheellinen lauseke kohteessa eval (virheellinen syöte): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Virheellinen lauseke kohteessa eval (lisäsyöte): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Jaa nollalla kohteessa eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nollalla kohteessa eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "SISÄINEN VIRHE: Virheellinen koodi funktiossa evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen vertailuoperaattori funktiossa cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen siirto-operaattori funktiossa shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen operaattori funktiossa mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "SISÄINEN VIRHE: Built-in ei löytynyt builtin-taulussa!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonodatatyyppi funktiossa freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Odotetaan rivinvaihtoa jäätyneessä tiedostossa"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Odotetaan merkkiä ”%c” jäätyneessä tiedostossa"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Vääränmuotoinen jäätynyt tiedosto"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Jäätyneen tiedoston ennenaikainen loppu"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "”%s” jäätyneestä tiedostosta ei löytynyt builtin-taulua!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Syöte käänteisesti kohteeseen %s, rivi %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Syöte luettiin kohteesta %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "SISÄINEN VIRHE: Rekursiivinen push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "SISÄINEN VIRHE: Virheellinen kutsu funktioon init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "SISÄINEN VIRHE: Syötepino botch funktiossa next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "SISÄINEN VIRHE: Syötepino botch funktiossa peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "EI MITÄÄN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "VIRHE: tiedoston loppumerkki EOF merkkijonossa"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "VIRHE: Pinon ylivuoto. (Päättymätön define-rekursio?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Lisätietoja komennolla ”%s --help”.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Pakolliset tai valinnaiset argumentit pitkille valitsimille ovat pakollisia\n"
+"tai valinnaisia myös lyhyille valitsimille.\n"
+"\n"
+"Toimintotilat:\n"
+" --help näytä tämä ohje ja poistu\n"
+" --version tulosta versiotiedot ja poistu\n"
+" -e, --interactive puskuroimaton tuloste, älä välitä keskeytyksistä\n"
+" -E, --fatal-warnings pysäytä suoritus ensimmäisen varoituksen jälkeen\n"
+" -Q, --quiet, --silent estä jotkut varoitukset kohteelle builtins\n"
+" -P, --prefix-builtins pakota ”m4_”-etuliite kaikkiin builtins-kohteisiin\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP käytä REGEXP makronimisyntaksille\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynaamiset latausominaisuudet:\n"
+" -m, --module-directory=DIRECTORY lisää DIRECTORY-hakemisto moduulin etsintäpolkuun\n"
+" -M, --load-module=MODULE lataa dynaaminen MODULE-moduuli kohteesta M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Esiprosessoriominaisuudet:\n"
+" -I, --include=DIRECTORY hae tämä hakemisto toisen kerran include-määrittelyjä varten\n"
+" -D, --define=NIMI[=ARVO] kirjoita NIMI, jolla on ARVO tai tyhjä\n"
+" -U, --undefine=NIMI poista builtin-NIMI\n"
+" -s, --synclines tuota ”#line NO \"FILE\"” rivit\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Rajoitusten valvonta:\n"
+" -G, --traditional estä kaikki GNU-laajennukset\n"
+" -H, --hashsize=PRIME aseta symbolin lookup hash-taulun koko\n"
+" -L, --nesting-limit=NUMERO vaihda keinotekoinen sisennysraja\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Jäädytetyn tilan tiedostot:\n"
+" -F, --freeze-state=TIEDOSTO tuota jäädytetty tila TIEDOSTOon lopussa\n"
+" -R, --reload-state=TIEDOSTO hae uudelleen jäädytetty tila TIEDOSTOsta alussa\n"
+
+#: src/m4.c:197
+#, fuzzy
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Vianjäljitys:\n"
+" -d, --debug=[LIPUT] aseta vianjäljitystaso (ilman LIPUT-määritystä\n"
+" sisältää ”aeq”)\n"
+" -t, --trace=NIMI jäljitä NIMI kun se määritellään\n"
+" -l, --arglength=NUM rajoita makrojäljityksen kokoa\n"
+" -o, --error-output=TIEDOSTO ohjaa edelleen vianjäljitys- ja jäljitystuloste\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"LIPUT on mikä tahansa seuraavista:\n"
+" t jäljitä kaikki makrokutsut, ei vain silloin kun jäljitys on päällä\n"
+" a näytä todelliset argumentit\n"
+" e näytä laajennus\n"
+" q lainaa arvot milloin välttämätöntä, ”a”- tai ”e”-lipulla\n"
+" c näytä ennen collect-toimintoa, sen jälkeen ja kutsun jälkeenl\n"
+" x lisää uniikki makrokutsutunniste, hyödyllinen c-lipun kanssa\n"
+" f sano nykyinen syötetiedostonimi\n"
+" l sano nykyinen syöterivinumero\n"
+" p näytä polkuetsinnän tulokset\n"
+" i näytä muutokset syötetiedostoissa\n"
+" V lyhenne kaikille yllä oleville lipuille\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jos ei ole TIEDOSTOa tai TIEDOSTO on ”-”, luetaan vakiosyötteestä.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Ilmoita virheistä (englanniksi) osoitteeseen <bug-m4@gnu.org>.\n"
+"Ilmoita suomennoksen virheistä osoitteeseen <translation-team-fi@lists.sourceforge.net>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Virheelliset vianjäljitysliput: ”%s”"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "VIRHE: etsintähakemiston ”%s” lisäys epäonnistui"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "VIRHE: etsintähakemiston lisäys epäonnistui ”%s”: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (valitsimet:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "SISÄINEN VIRHE: Virheellinen koodi uudelleenviitatuissa argumenteissa"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonotyyppi funktiossa expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "VIRHE: Tiedostonloppumerkki EOF argumenttiluettelossa"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonotyyppi funktiossa expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "SISÄINEN VIRHE: Virheellinen symbolityyppi funktiossa call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "VIRHE: Ylitettiin rekursioraja %d, käytä -L<N> sen muuttamiseen"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "VIRHE: moduulien alustus epäonnistui: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "VIRHE: ei löydy moduulia: ”%s”"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "VIRHE: ei löydy moduuleja: ”%s”: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "VIRHE: ei voi sulkea moduuleja"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "VIRHE: ei voida sulkea moduuleja: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "VIRHE: ei voida sulkea moduulia: ”%s”"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "VIRHE: ei voida sulkea moduulia: ”%s”: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "VIRHE: Ei voida luoda tilapäistä tiedostoa diversiota varten"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "VIRHE: Ei voida flush diversion tilapäiseen tiedostoon"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "VIRHE: Kopioidaan lisättyä tiedostoa"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "VIRHE: Luetaan lisättyä tiedostoa"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Ei voi suorittaa stat-diversiota"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversio on liian suuri"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Polkuetsintä kohteelle ”%s” löysi ”%s”"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-raja ylitetty?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Muistirajojen ylittäminen havaittu (SIGSEGV). Tapahtui joko pinon ylivuoto\n"
+"tai sitten on virhe kohteessa "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Tarkista mahdollinen päättymätön rekursiivisuus.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "SISÄINEN VIRHE: Virheellinen tila funktiolle symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nimi ”%s” on tuntematon\n"
diff --git a/po/.reference/fi.s1 b/po/.reference/fi.s1
new file mode 100644
index 00000000..f9ec6e60
--- /dev/null
+++ b/po/.reference/fi.s1
@@ -0,0 +1 @@
+778dfa26b4bbe3c6f730740d0bc4242b0d1cbade -
diff --git a/po/.reference/fr.po b/po/.reference/fr.po
new file mode 100644
index 00000000..e8601ca9
--- /dev/null
+++ b/po/.reference/fr.po
@@ -0,0 +1,673 @@
+# Messages franais pour GNU m4.
+# Copyright 2004 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@iro.umontreal.ca>, traducteur depuis/since 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2004-04-10 08:00-05:00\n"
+"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: l'option %s est ambigu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: l'option --%s ne permet pas un argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: l'option %c%s ne permet pas un argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: l'option %s requiert un argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: option non reconnue --%s \n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: option non reconnue %c%s \n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: option illgale -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: option invalide -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: l'option requiert un argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: l'option -W %s est ambigu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: l'option -W %s ne permet pas un argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "mmoire puise"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succs"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Pas de concordance"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Mauvaise expression rgulire"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Collation invalide de caractres"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nom invalide de classe de caractres"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barre oblique inverse de queue"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Rfrence arrire invalide"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ non pair"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( non pair"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ non pair"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contenu invalide de \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Borne finale invalide"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Mmoire puise"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Prcdente expression rgulire invalide"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fin prmature de l'expression rgulire"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expression rgulire trop grande"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) non pair"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Pas d'expression rgulire prcdente"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Attention: Trop peu d'arguments pour %s prdfini"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Attention: Les arguments superflus pour %s prdfini sont ignors"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argument non-numrique pour %s prdfini"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERREUR INTERNE: Mauvais type de lexme dans define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nom %s non-dfini"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERREUR INTERNE: Mauvais type de donnes pour lexme dans m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nom %s non-dfini"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERREUR INTERNE: Mauvais type de symbole dans m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Incapable d'ouvrir un pipe pour la commande %s "
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Base hors intervalle dans eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Largeur ngative dans eval "
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argument non-numrique pour %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Incapble de ramener la diversion %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Code de syntaxe %c non-dfini"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Incapable d'ouvrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: mauvais indicateurs de mise-au-point: %s "
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Incapable de prparer le fichier d'erreurs: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "ATTENTION: \\0 disparatra, utiliser \\& plutt pour les remplacements"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Mauvaise expression rgulire %s : %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erreur d'appariement pour l'expression rgulire %s "
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERREUR INTERNE: Mauvais type de donne pour de lexme (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Mauvaise expression dans eval (parenthse droite manquante): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Mauvaise expression dans eval : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Mauvaise expression dans eval (mauvaise entre): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Mauvaise expression dans eval (entre superflue): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division par zro dans eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Module par zro dans eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERREUR INTERNE: Mauvais code d'erreur dans evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur de comparaison dans cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur de dcalage dans shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur dans mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERREUR INTERNE: Mauvais type de donne pour lexme dans freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Fin-de-ligne attendue du fichier fig"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Caractre %c attendu du fichier fig"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fichier fig difforme"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fin prmature de fichier fig"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr " %s dans le fichier fig est introuvable dans la table des prdfinis!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Entre reprise de %s, ligne %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Entre lue de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERREUR INTERNE: Utilisation rcursive de push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERREUR INTERNE: Mauvais appel init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERREUR INTERNE: Pile d'entre douteuse dans next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERREUR INTERNE: Pile d'entre douteuse dans peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "AUCUN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERREUR: Fin-de-fichier dans la chane"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERREUR: Dbordement de pile. (Rcursion sans fin sur define ?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pour plus d'information, essayez %s --help .\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Usage: %s [OPTION]... [FICHIER]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Les arguments obligatoires ou optionnels pour la forme longue des\n"
+"options sont aussi obligatoires ou optionnels pour les formes courtes\n"
+"qui leur correspondent.\n"
+"\n"
+"Modes d'opration:\n"
+" --help fournir ce message d'aide, puis terminer\n"
+" --version identifier le programme, puis terminer\n"
+" -e, --interactive ne pas tamponner, ignorer les interruptions\n"
+" -E, --fatal-warnings terminer l'excution aprs le moindre message\n"
+" -Q, --quiet, --silent inhiber certains diagnostics prdfinis\n"
+" -P, --prefix-builtins prfixer tous les prdfinis par m4_ \n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP utiliser REGEXP pour les noms de macro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Options de chargement dynamique:\n"
+" -m, --module-directory=RPERTOIRE ajouter le RPERTOIRE au module du chemin de recherche\n"
+" -M, --load-module=MODULE charger le MODULE dynamique depuis M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Capacits de prprocesseur:\n"
+" -I, --include=REPERTOIRE ensuite fouiller ce rpertoire d'inclusions\n"
+" -D, --define=NOM[=VALEUR] dfinir NOM comme ayant VALEUR (ou vide)\n"
+" -U, --undefine=NOM liminer le NOM prdfini\n"
+" -s, --synclines engendrer des lignes #line NNN \"FICHIER\" \n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Contrle des limites:\n"
+" -G, --traditional inhiber toutes les extensions GNU\n"
+" -H, --hashsize=PREMIER choisir la grandeur de la table de symboles\n"
+" -L, --nesting-limit=NOMBRE modifier la limite artificielle d'imbrication\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fichiers d'tat fig:\n"
+" -F, --freeze-state=FICHIER produire un FICHIER fig la fin\n"
+" -R, --reload-state=FICHIER recharger un FICHIER fig au dpart\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Mise-au-point:\n"
+" -d, --debug=[INDICS] niveau de mise-au-point (implicitement aeq )\n"
+" -t, --trace=NOM tracer NOM lorsqu'il sera dfini\n"
+" -l, --arglength=NOMBRE restreindre la grandeur de trace des macros\n"
+" -o, --error-output=FICHIER rediriger la sortie de trace et mise-au-point\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"INDICS est une combinaison de:\n"
+" t tracer tous les appels de macro, pas uniquement les traceon \n"
+" a afficher les arguments vritables\n"
+" e afficher le rsultat de l'expension\n"
+" q mettre entre guillemets lorsque ncessaire, avec indics a ou e \n"
+" c afficher avant et aprs la collecte, puis aprs l'appel\n"
+" x ajouter une identification unique, utile avec l'indicateur c \n"
+" f donner le nom courant du fichier d'entre\n"
+" l donner le numro de la ligne d'entre\n"
+" p afficher les rsultats des fouilles de chemin\n"
+" i afficher les modifications dans les fichiers d'entre\n"
+" V abbrviation commode pour toutes les options prcdentes la fois\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Si aucun FICHIER ou si FICHIER vaut - , lit l'entre standard.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporter tout disfonctionnement mailto:bug-m4@gnu.org; et rapporter les\n"
+"problmes de francisation mailto:traduc@traduc.org.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Mauvais indicateurs de mise-au-point: %s "
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERREUR: chec de l'ajout du rpertoire de recherche %s "
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERREUR: chec de l'ajout du rpertoire de recherche %s : %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (options:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERREUR INTERNE: Mauvais code dans les arguments diffrs"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERREUR INTERNE: Mauvais type de lexme dans expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERREUR: Fin-de-fichier dans la liste d'arguments"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERREUR INTERNE: Mauvais type de donnes pour lexme dans expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERREUR INTERNE: Mauvais type de symbole dans call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERREUR: Limite de rcursion %d dpasse, la changer par -L<N>"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERREUR: ne peut initialiser le module: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERREUR: ne peut trouver le module: %s "
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERREUR: ne peut trouver le module: %s : %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERREUR: ne peut fermer les modules"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERREUR: ne peut fermer les module: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERREUR: ne peut fermer le module: %s "
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERREUR: ne peut fermer le module: %s : %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERREUR: Incapable de crer un fichier temporaire pour la diversion"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERREUR: Incapable de vider la diversion sur un fichier temporaire"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERREUR: Pendant la copie du fichier insr"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERREUR: Pendant la lecture d'un fichier insr"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Incapable d'oprer stat() pour la diversion"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Disversion trop grande"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "La fouille du chemin pour %s trouve %s "
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limit VMEM outrepasse?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Les violations de mmoire sont dtectes (SIGSEGV). Ou bien la pile a\n"
+"dbord, ou bien il y a un problme dans "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Vrifier une rcursion hors contrle.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERREUR INTERNE: Mode illgal dans symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Le nom %s est inconnu\n"
+
+#~ msgid "Undefined macro `%s'"
+#~ msgstr "Macro %s non-dfini"
+
+#~ msgid "Module search for `%s' found `%s'"
+#~ msgstr "Une fouille de module pour %s a fourni %s"
+
+#~ msgid "Bad regular expression: `%s': %s"
+#~ msgstr "Mauvaise expression rgulire: %s: %s"
+
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "ERREUR INTERNE: Pile d'entre douteuse dans pop_input ()"
diff --git a/po/.reference/fr.s1 b/po/.reference/fr.s1
new file mode 100644
index 00000000..83681cad
--- /dev/null
+++ b/po/.reference/fr.s1
@@ -0,0 +1 @@
+8cc66b3f0f56d9e54ed7c0e4156a4dfa19366035 -
diff --git a/po/.reference/ga.po b/po/.reference/ga.po
new file mode 100644
index 00000000..120fed5e
--- /dev/null
+++ b/po/.reference/ga.po
@@ -0,0 +1,658 @@
+# Irish translations for m4.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Kevin Patrick Scannell <scannell@SLU.EDU>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-02-09 11:27-0500\n"
+"Last-Translator: Kevin Patrick Scannell <scannell@SLU.EDU>\n"
+"Language-Team: Irish <ga@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: T an rogha `%s' dbhroch\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `--%s'\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `%c%s'\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: n folir argint don rogha `%s'\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: rogha anaithnid `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: rogha anaithnid `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: rogha neamhcheadaithe -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: rogha neamhbhail -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: n folir argint don rogha -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: T an rogha `-W %s' dbhroch\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `-W %s'\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "cuimhne dithe"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Bua!"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Nl a leithid ann"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Slonn ionadaochta neamhbhail"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Carachtar neamhbhail cimheasa"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Aicme neamhbhail charachtair"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Clslais ag deireadh"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Cltagairt neamhbhail"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ n [^ corr"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( n \\( corr"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ corr"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "bhar neamhbhail idir \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Deireadh raoin neamhbhail"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Cuimhne dithe"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Is neamhbhail an slonn ionadaochta roimhe seo"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Deireadh le slonn ionadaochta gan choinne"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Slonn ionadaochta rmhr"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") n \\) corr"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Nl aon slonn ionadaochta roimhe seo"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Rabhadh: Nl go leor argint ann don fheidhm insuite `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Rabhadh: ag danamh neamhshuim ar argint breise don fheidhm insuite `%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argint neamhuimhriil don fheidhm insuite `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Ainm %s gan sainmhni"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ainm `%s' gan sainmhni"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "EARRID INMHENACH: Droch-chinel siombaile i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "N fidir popa a oscailt go hord `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Bunuimhir as raon i eval (bunuimhir = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Leithead diltach i eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argint neamhuimhriil chun %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "N fidir %s a d-atreor"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cd comhrire %c gan sainmhni"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "N fidir %s a oscailt"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Md dfhabhtaithe: drochbhratacha dfhabhtaithe: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "N fidir an comhad earride a shocr: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "RABHADH: Rachaidh \\0 as radharc, sid \\& ina ionad i dteaghrin ionadaochta"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Slonn ionadaochta neamhbhail `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Earrid le linn cuardaigh ar shlonn ionadaochta `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Slonn neamhbhail i eval (libn deas ar iarraidh): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Slonn neamhbhail i eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Slonn neamhbhail i eval (droch-ionchur): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Slonn neamhbhail i eval (ionchur sa bhreis): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Nialas san ainmneoir i eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo le nialas i eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "EARRID INMHENACH: Droch-chd earride i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir comparide i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir iomlaoide i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ag sil le fotha lne i gcomhad sioctha"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ag sil le carachtar `%c' i gcomhad sioctha"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Comhad sioctha mchumtha"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Comhadchroch gan choinne i gcomhad sioctha"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "Nor aimsodh `%s' as comhad sioctha sa tbla insuite!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "D'fhill an t-ionchur ar %s, lne %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Ladh an t-ionchur %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "EARRID INMHENACH: push_string athchrsach!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "EARRID INMHENACH: Drochghlao ar init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "EARRID INMHENACH: Rinneadh praiseach den chruach ionchurtha i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "EARRID INMHENACH: Rinneadh praiseach den chruach ionchurtha i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NEAMHN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "EARRID: EOF i dteaghrn"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "EARRID: Cruach thar maoil. (Athchrsil `define' igrochta?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Bain triail as `%s --help' chun tuilleadh eolais a fhil.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "sid: %s [ROGHA]... [COMHAD]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Is riachtanach le rogha ghearr aon argint at riachtanach leis an rogha\n"
+"fhada. Mar an gcanna le hargint roghnacha.\n"
+"\n"
+"Mid oibre:\n"
+" --help taispein an chabhair seo agus scoir\n"
+" --version taispein eolas faoin leagan agus scoir\n"
+" -e, --interactive aschur gan maoln; gan idirbhristeacha\n"
+" -E, --fatal-warnings stop i ndiaidh an chad rabhaidh\n"
+" -Q, --quiet, --silent ceil roinnt rabhaidh d'fheidhmeanna insuite\n"
+" -P, --prefix-builtins iligh an rimr `m4_' ar gach feidhm insuite\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=SLONN sid SLONN do chomhrir na n-ainmneacha macra\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Gnithe maidir leis an lucht beo:\n"
+" -m, --module-directory=COMHADLANN cuir COMHADLANN sa chonair chuardach modl\n"
+" -M, --load-module=MODL luchtaigh MODL beo M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Gnithe an ramhphrisela:\n"
+" -I, --include=COMHADLANN cuardach COMHADLANN ar chomhaid cheanntisc\n"
+" -D, --define=AINM[=LUACH] iontril AINM le LUACH, is sin n folamh\n"
+" -U, --undefine=AINM scrios AINM insuite\n"
+" -s, --synclines gin lnte `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Rial na dteorainneacha:\n"
+" -G, --traditional mch gach eisnteacht GNU\n"
+" -H, --hashsize=PROMHA mid hais-tbla na siombail\n"
+" -L, --nesting-limit=UIMHIR athraigh an teorainn shaorga neadaithe\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Comhaid shioctha:\n"
+" -F, --freeze-state=COMHAD dan staid shioctha ag deireadh COMHAD\n"
+" -R, --reload-state=COMHAD athluchtaigh staid shioctha thosach an CHOMHAID\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Dfhabht:\n"
+" -d, --debug=[BRATACHA] socraigh an leibhal dfhabhtaithe (gan BRATACHA => `aeq')\n"
+" -t, --trace=AINM lorg AINM nuair at s sainmhnithe\n"
+" -l, --arglength=UIMHIR cuir teorainn le mid lorg macra\n"
+" -o, --error-output=COMHAD athsheol an t-aschur dfhabhtaithe/loirg\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"Is iad seo na BRATACHA:\n"
+" t lorg gach glao macra, n hamhin na cinn le `traceon'\n"
+" a taispein na forargint\n"
+" e taispein scaoileadh macra\n"
+" q sid athfhriotal ms g, leis an bhrat `a' n `e'\n"
+" c taispein roimh `collect', tar is `collect' agus tar is `call'\n"
+" x cuir aitheantas uathil macra leis, sideach le `c'\n"
+" f tabhair ainm an inchomhaid reatha\n"
+" l tabhair an lne-uimhir reatha ionchuir\n"
+" p taispein tortha na gcuardach conair\n"
+" i taispein athruithe in inchomhaid\n"
+" V gach ceann acu seo thuas\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Mura bhfuil COMHAD ann, n ms `-' , ligh n ionchur caighdenach.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Seol tuairisc fabhtanna chuig <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Bratacha neamhbhail dfhabhtaithe: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "EARRID: theip ar chur comhadlann chuardaigh `%s' leis"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "EARRID: theip ar chur comhadlann chuardaigh `%s' leis: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (roghanna:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "EARRID INMHENACH: Droch-chd sna hargint iarchurtha"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "EARRID INMHENACH: Droch-chinel comhartha i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "EARRID: EOF i liosta na n-argint"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "EARRID INMHENACH: Droch-chinel comhartha i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "EARRID INMHENACH: Droch-chinel siombaile i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "EARRID: Doimhneacht athchrsla nos m n an t-uasmhid %d, sid -L<N> chun a athr"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "EARRID: theip ar ths modil: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "EARRID: modl gan aimsi: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "EARRID: modl gan aimsi: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "EARRID: n fidir modil a dhnadh"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "EARRID: n fidir modil a dhnadh: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "EARRID: n fidir modl a dhnadh: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "EARRID: n fidir modl a dhnadh: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "EARRID: N fidir comhad sealadach a chruth le haghaidh atreoraithe"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "EARRID: N fidir atreor a shruthl go comhad sealadach"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "EARRID: Comhad ionsite chipeil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "EARRID: Comhad ionsite lamh"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "N fidir atreor a `stat'"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Atreor rmhr"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "D'aimsigh cuardach conaire ar `%s' seo a leanas: `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Teorainn VMEM sraithe?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Sraodh teorainneacha cuimhne (SIGSEGV). T cruach thar maoil, is\n"
+" sin n t fabht i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Seiceil nach bhfuil athchrsil igrochta ann.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "EARRID INMHENACH: Md neamhcheadaithe i symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Ainm `%s' anaithnid\n"
diff --git a/po/.reference/ga.s1 b/po/.reference/ga.s1
new file mode 100644
index 00000000..7d838e30
--- /dev/null
+++ b/po/.reference/ga.s1
@@ -0,0 +1 @@
+abaa3c80992fcc68508369a08d6aa1b3e5d135af -
diff --git a/po/.reference/gl.po b/po/.reference/gl.po
new file mode 100644
index 00000000..cf8feac6
--- /dev/null
+++ b/po/.reference/gl.po
@@ -0,0 +1,661 @@
+# Galician translation of GNU m4
+# Copyright (C) 2000 Free Software Foundation, Inc.
+# Jacobo Tarrio <jtarrio@iname.com>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-06-14 11:15+02:00\n"
+"Last-Translator: Jacobo Tarrio <jtarrio@iname.com>\n"
+"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: a opcin `%s' ambigua\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: a opcin `--%s' non admite un argumento\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: a opcin `%c%s' non admite un argumento\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: a opcin `%s' precisa dun argumento\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opcin `--%s' descoecida\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opcin `%c%s' descoecida\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opcin non permitida -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opcin non vlida -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: a opcin precisa dun argumento -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: a opcin `-W %s' ambigua\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: a opcin `-W %s' non admite un argumento\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memoria esgotada"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "xito"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Non encaixa nada"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expresin regular non vlida"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Carcter de ordenamento incorrecto"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nome de clase de caracteres non vlido"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barra invertida fin da lia"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referencia cara a atrs non vlida"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ non emparellado"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( non emparellado"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ non emparellado"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contido de \\{\\} non vlido"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Fin de rango non vlida"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memoria esgotada"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresin regular precedente non vlida"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fin prematura da expresin regular"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresin regular grande de mis"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) non emparellado"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Non hai unha expresin regular anterior"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Aviso: Moi poucos parmetros para o `%s' predefinido"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Aviso: Os parmetros de mis para o `%s' predefinido foron ignorados"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Parmetro non numrico ao `%s' predefinido"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nome %s non definido"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nome `%s' non definido"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorrecto en m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Non se pode abrir un cano ao comando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "A base est fra dos lmites en eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Ancho negativo en eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Parmetro non numrico para %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Non se pode endereitar %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cdigo de sintaxe %c non definido"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Non se pode abrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: modificadores de depuracin incorrectos: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Non se pode estabrece-lo ficheiro de erros: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVISO: \\0 ha desaparecer, empregue \\& no seu canto nas substitucins"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresin regular `%s' incorrecta: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erro ao compara-la expresin regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresin incorrecta en eval (falla a parntese dereita): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresin incorrecta en eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresin incorrecta en eval (entrada incorrecta): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresin incorrecta en eval (entrada excesiva): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Divisin por cero en eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Resto da divisin por cero en eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERRO INTERNO: Cdigo de erro incorrecto en evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERRO INTERNO: Operador de comparacin incorrecto en cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERRO INTERNO: Operador de desprazamento incorrecto en shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERRO INTERNO: Operador incorrecto en mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Esperbase un salto de lia no ficheiro conxelado"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Esperbase o carcter `%c' no ficheiro conxelado"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Ficheiro conxelado mal formatado"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fin prematura do ficheiro conxelado"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' do ficheiro conxelado non se atopou na tboa de predefinidas!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "A entrada levouse a %s, lia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Lese a entrada de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERRO INTERNO: push_string recursivo!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERRO INTERNO: Chamada incorrecta a init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERRO INTERNO: Fallo na pila de entrada en next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERRO INTERNO: Fallo na pila de entrada en peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NINGN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERRO: fin de ficheiro na cadea"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERRO: Desbordamento da pila. (Recursin infinita de defines?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Escriba `%s --help' para obter mis informacin.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Uso: %s [OPCIN]... [FICHEIRO]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Os parmetros obrigatorios ou opcionais nas opcins longas son tamn\n"
+"obrigatorios ou opcionais nas opcins curtas.\n"
+"\n"
+"Modos de funcionamento:\n"
+" --help amosar esta axuda e sair\n"
+" --version amosar informacin sobre a versin e sair\n"
+" -e, --interactive non usar un buffer de saida, ignora-las\n"
+" interrupcins\n"
+" -E, --fatal-warnings dete-la execucin tralo primeiro aviso\n"
+" -Q, --quiet, --silent suprimir algns avisos das predefinidas\n"
+" -P, --prefix-builtins forzar un prefixo `m4_' en tdalas predefinidas\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP usar REGEXP para a sintaxe dos nomes das macros\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Caractersticas de carga dinmica:\n"
+" -m, --module-directory=DIRECTORIO engadi-lo DIRECTORIO ruta de busca\n"
+" de mdulos\n"
+" -M, --load-module=MDULO carga-lo MDULO dinmico de M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Caractersticas do preprocesador:\n"
+" -I, --include=DIRECTORIO buscar tamn neste directorio por ficheiros\n"
+" a incluir\n"
+" -D, --define=NOME[=VALOR] introduci-lo NOME contendo o VALOR, ou baleiro\n"
+" -U, --undefine=NOME borra-la predefinida NOME\n"
+" -s, --synclines xerar lias `#line NM \"FICHEIRO\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control de lmites:\n"
+" -G, --traditional suprimir tdalas extensins GNU\n"
+" -H, --hashsize=PRIMO estabrece-lo tamao da tboa hash de smbolos\n"
+" -L, --nesting-limit=NMERO cambia-lo lmite artificial de aniamento\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Ficheiros de estado conxelado:\n"
+" -F, --freeze-state=FICHEIRO producir un estado conxelado fin do FICHEIRO\n"
+" -R, --reload-state=FICHEIRO cargar un estado conxelado do principio do\n"
+" FICHEIRO\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Depuracin:\n"
+" -d, --debug=[OPCINS] estabrece-lo nivel de depuracin (se non se\n"
+" indican opcins suponse `aeq')\n"
+" -t, --trace=NOME seguir NOME cando estea definido\n"
+" -l, --arglength=NM restrinxi-lo tamao do seguemento das macros\n"
+" -o, --error-output=FICHEIRO redirixi-la saida de depuracin e seguemento\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"OPCINS unha de:\n"
+" t seguemento de tdalas chamadas a macros, non s nas que teen traceon\n"
+" a amosa-los parmetros\n"
+" e amosa-la expansin\n"
+" q cita-los valores cando sexa preciso, coas opcins a ou e\n"
+" c amosar antes da obtencin, despois da obtencin e despois da chamada\n"
+" x engadir un identificador nico de chamada macro, til coa opcin c\n"
+" f dici-lo nome do ficheiro de entrada actual\n"
+" l dici-lo nmero da lia de entrada actual\n"
+" p amosa-los resultados das buscas nas rotas\n"
+" i amosa-los cambios nos ficheiros de entrada\n"
+" V forma curta de poer tdalas opcins de enriba\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nSe non se indica un FICHEIRO ou se o FICHEIRO `-', lese da entrada estndar.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nInforme dos erros a <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Opcins de depuracin incorrectas: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERRO: non se puido engadi-lo directorio de busca `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERRO: non se puido engadi-lo directorio de busca `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opcins:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERRO INTERNO: Cdigo incorrecto nos parmetros pospostos"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorrecto en expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERRO: Fin de ficheiro na lista de parmetros"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorrecto en expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorrecto en call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERRO: Lmite de %d recursins sobrepasado, empregue -L<N> para cambialo"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERRO: non se puido inicializar uns mdulos: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERRO: non se puido atopar un mdulo: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERRO: non se puido atopar un mdulo: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERRO: non se puido pecha-los mdulos"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERRO: non se puido pechar uns mdulos: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERRO: non se puido pechar un mdulo: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERRO: non se puido pechar un mdulo: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERRO: Non se puido crear un ficheiro temporal para o desvo"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERRO: Non se pode estabrece-lo desvo a un ficheiro temporal"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERRO: Copiando o ficheiro insertado"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERRO: Lendo o ficheiro insertado"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Non se pode facer unha operacin de stat sobre un desvo"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Desvo grande de mis"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "A busca de rotas de `%s' atopou `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Lmite de VMEM sobrepasado?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violacin dos lmites de memoria detectada (SIGSEGV). Ou ocorreu un\n"
+"desbordamento de pila ou hai un bug en "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Busque unha posible recursin infinita.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERRO INTERNO: Modo incorrecto para symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "O nome `%s' descoecido\n"
+
+#~ msgid "Undefined macro `%s'"
+#~ msgstr "Macro non definida `%s'"
+
+#~ msgid "Module search for `%s' found `%s'"
+#~ msgstr "A bsqueda de mdulo de `%s' atopou `%s'"
diff --git a/po/.reference/gl.s1 b/po/.reference/gl.s1
new file mode 100644
index 00000000..cc8e1e42
--- /dev/null
+++ b/po/.reference/gl.s1
@@ -0,0 +1 @@
+68ae3a997f2ee929b5708f1e3b54cdb089a12ad1 -
diff --git a/po/.reference/id.po b/po/.reference/id.po
new file mode 100644
index 00000000..c1a2e8b2
--- /dev/null
+++ b/po/.reference/id.po
@@ -0,0 +1,659 @@
+# m4-1.4o (Indonesian).
+# Copyright (C) 1998 Free Software Foundation, Inc.
+# Tedi Heriyanto <tedi_h@gmx.net>, 2000,2001,2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-07-24 21:21GMT+0700\n"
+"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
+"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: option `%s' rancu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: option `--%s' tidak membolehkan sebuah argumen\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: option `%c%s' tidak membolehkan sebuah argumen\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: option `%s' membutuhkan sebuah argumen\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: option tidak dikenal `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: option tidak dikenal `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: option ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: option tidak valid -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: option membutuhkan sebuah argumen -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: option `-W %s' rancu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: option `-W %s' tidak membolehkan sebuah argumen\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memori habis"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Sukses"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Tidak ada kecocokan"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ekspresi Reguler tidak valid"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Karakter kolasi tidak valid"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nama kelas karakter tidak valid"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Trailing backslash"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referensi balik tidak valid"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ atau [^ tidak cocok"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( atau \\( tidak cocok"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ tidak cocok"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Isi \\{\\} tidak valid"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Akhir range tidak valid"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memori habis"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Regular ekspresi sebelumnya tidak valid"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Akhir regular ekspresi yang prematur"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regular ekspresi terlalu besar"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") atau \\) tidak cocok"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Tidak ada regular ekspresi sebelumnya"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Peringatan: Argumen terlalu sedikit untuk built-in `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Peringatan: Argumen terlalu banyak untuk built-in `%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argumen non-numerik untuk built-in `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "KESALAHAN INTERNAL: Tipe data token buruk dalam define_macro()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nama yang tak terdefinisi %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "KESALAHAN INTERNAL: Builtin tidak ditemukan dalam tabel builtin!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "KESALAHAN INTERNAL: tipe token data buruk dalam m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nama yang tak terdefinisi `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "KESALAHAN INTERNAL: tipe simbol buruk dalam m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Tidak dapat membuka pipe untuk perintah `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Radix dalam eval di luar jangkauan (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Lebar negatif untuk eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argumen non-numerik untuk %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Tidak dapat mendivert %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Kode sintaks %c tak terdefinisi"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Tidak dapat membuka %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: flag debug buruk: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Tidak dapat menset error file: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "PERINGATAN: \\0 akan hilang, gunakan \\& sebagai gantinya"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Ekspresi Reguler yang buruk `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Kesalahan mencocokkan ekspresi reguler `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "KESALAHAN INTERNAL: Builtin tidak ditemukan dalam tabel builtin! (trace_pre())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "KESALAHAN INTERNAL: tipe data token buruk (trace_pre())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Ekspresi buruk dalam eval (tanda kurung kanan tidak ada): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Ekspresi buruk dalam eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Ekspresi buruk dalam eval (input buruk): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Ekspresi buruk dalam eval (input berlebih): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Pembagian dengan nol dalam eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulus dengan nol dalam eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "KESALAHAN INTERNAL: Kode kesalahan buruk dalam evaluate()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "KESALAHAN INTERNAL: operator perbandingan buruk dalam cmp_term()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "KESALAHAN INTERNAL: operator shift buruk dalam shift_term()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "KESALAHAN INTERNAL: operator buruk dalam mult_term()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "KESALAHAN INTERNAL: builtin tidak ditemukan dalam tabel builtin"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "KESALAHAN INTERNAL: tipe data token buruk dalam freeze_one_symbol()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Mengharapkan line feed dalam frozen file"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Mengharapkan karakter `%c' dalam frozen file"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Frozen file dalam format buruk"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Akhir frozen file prematur"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' dari frozen file tidak ditemukan dalam tabel builtin!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Input dikembalikan ke %s, baris %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Input membaca dari %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "KESALAHAN INTERNAL: push_string rekursif"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "KESALAHAN INTERNAL: panggilan buruk ke init_macro_token()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "KESALAHAN INTERNAL: stack input kacau dalam next_char()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "KESALAHAN INTERNAL: stack input kacau dalam peek_input()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "TIDAK ADA"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "KESALAHAN: EOF dalam string"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "KESALAHAN: stack overflow. (Rekursi tidak terbatas?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Coba `%s --help' untuk informasi lebih lanjut.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Pemakaian: %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumen opsional atau mandatori untuk opsion panjang juga berlaku \n"
+"untuk opsion pendek.\n"
+"\n"
+"Mode operasi:\n"
+" --help menampilkan bantuan ini dan keluar\n"
+" --version menampilkan informasi versi dan keluar\n"
+" -e, --interactive output unbuffer, abaikan interrupt\n"
+" -E, --fatal-warnings akhir eksekusi setelah peringatan pertama\n"
+" -Q, --quiet, --silent hilangkan beberapa peringatan builtin\n"
+" -P, --prefix-builtins paksa prefix `m4_' untuk seluruh builtin\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP gunakan REGEXP untuk sintaks nama makro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Fitur loading dinamis:\n"
+" -m, --module-directory=DIRECTORY tambah DIRECTORY ke path pencarian modul\n"
+" -M, --load-module=MODULE muat MODULE dinamik dari M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Feature preprosesor:\n"
+" -I, --include=DIREKTORI cari direktori ini untuk include\n"
+" -D, --define=NAMA[=NILAI] masukkan NAMA yang bernilai NILAI, atau kosong\n"
+" -U, --undefine=NAMA hapus builtin NAMA\n"
+" -s, --synclines hasilkan baris `#line NO \"FILE\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Kendali batas:\n"
+" -G, --traditional tiadakan seluruh ekstensi GNU\n"
+" -H, --hashsize=PRIME set ukuran tabel simbol lookup hash\n"
+" -L, --nesting-limit=NUMBER rubah batas sarang buatan\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"File frozen state:\n"
+" -F, --freeze-state=FILE hasilkan frozen state pada FILE di akhir\n"
+" -R, --reload-state=FILE reload frozen state dari FILE di awal\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set level debug (tidak ada FLAGS berarti `aeq')\n"
+" -t, --trace=NAMA trace NAMA ketika akan didefinisikan\n"
+" -l, --arglength=NUM batasi ukuran tracing makro\n"
+" -o, --error-output=FILE redireksi output debug dan trace\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS adalah:\n"
+" t trace seluruh panggilan makro, tidak hanya saat traceon\n"
+" a tampilkan seluruh argumen aktual\n"
+" e tampilkan ekspansi\n"
+" q cuplik nilai seperlunya, dengan flag a atau e\n"
+" c tampilkan sebelum, setelah koleksi dan setelah panggilan\n"
+" x tambahkan id panggilan makro unik, berguna dengan flag c\n"
+" f beritahu nama file input saat ini\n"
+" l beritahu nomor baris file input saat ini\n"
+" p tampilkan hasil pencarian path\n"
+" i tampilkan perubahan dalam file input\n"
+" V kependekan untuk seluruh flag di atas\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jika tidak ada FILE atau jika FILE adalah `-', baca dari std input.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Laporkan bug ke <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Flag debug buruk: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERROR: gagal menambah direktori pencarian `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERROR: gagal menambah direktori pencarian`%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opsi:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam deferred arguments"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam expand_token()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "KESALAHAN: EOF dalam daftar argumen"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam expand_argumen()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "KESALAHAN INTERNAL: tipe simbol buruk dalam call_macro()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "KESALAHAN: batas rekursi %d terlampaui, gunakan -L<N> untuk merubahnya"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERROR: gagal inisialisasi modul: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERROR: tidak dapat menemukan modul: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERROR: tidak dapat menemukan modul `%s':%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERROR: tidak dapat menutup modul "
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERROR: tidak dapat menutup modul %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERROR: tidak dapat menutup modul: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERROR: tidak dapat menutup modul: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "KESALAHAN: tidak dapat membuat file temporer untuk diversi"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "KESALAHAN: tidak dapat memflush diversi ke file temporer"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "KESALAHAN: menyalinkan file yang disisipkan"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "KESALAHAN: membaca file yang disisipkan"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Tidak dapat mendiversi"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversi terlalu besar"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Mencari path untuk `%s' menemukan `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Batas VMEM terlampaui?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Pelanggaran batas memori terdeteksi (SIGSEGV). Mungkin terdapat stack\n"
+"overflow atau terdapat bug di dalamnya "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Memeriksa kemungkinan rekursi tak terbatas.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "KESALAHAN INTERNAL: mode ilegal untuk symbol_lookup()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nama `%s' tidak dikenal\n"
diff --git a/po/.reference/id.s1 b/po/.reference/id.s1
new file mode 100644
index 00000000..3ba04e6e
--- /dev/null
+++ b/po/.reference/id.s1
@@ -0,0 +1 @@
+e891d70d281a54d905ea0a5454a7784e1859f0f7 -
diff --git a/po/.reference/ja.po b/po/.reference/ja.po
new file mode 100644
index 00000000..3722ddd2
--- /dev/null
+++ b/po/.reference/ja.po
@@ -0,0 +1,1286 @@
+# Japanese messages for GNU m4.
+# Copyright (C) 2000, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Akiko Matsushita <matusita@sra.co.jp>, 1996.
+# Masahito Yamaga <yamaga@ipc.chiba-u.ac.jp>, 2002.
+# GOTO Masanori <gotom@debian.or.jp>, 2006.
+# derived from the version by Yasuyuki Furukawa <yasu@on.cs.keio.ac.jp> 1998.
+# Jun Nishii <jun@flatout.org> 1999.
+# Daisuke Yamashita <yamad@mb.infoweb.ne.jp> 1999.
+# Yasuaki Taniguchi <yasuakit@gmail.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2011-10-23 08:32+0900\n"
+"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
+"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: オプション `%s' は曖昧です\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: オプション `--%s' は引数を取ることができません\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: オプション `%c%s' は引数を取ることができません\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: オプション `%s' には引数が必要です\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: --%s は認識されないオプションです\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: `%c%s' は認識されないオプションです\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: 不正なオプション -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: %c は無効なオプションです。\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: %c オプションには引数が必要です\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: オプション '-W %s' は曖昧です\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: オプション '-W %s' は引数を取ることができません\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "メモリを使い果たしました"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功です"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "一致しません"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "無効な正規表現です"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "無効な照合文字です"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "無効な文字クラス名です"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "終端のバックスラッシュ"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "無効な前方参照です"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ または [^ が不一致です"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( または \\( が不一致です"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ が不一致です"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} の中身が無効です"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "無効な範囲終了です"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "メモリを使い果たしました"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "無効な前方正規表現です"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "正規表現が途中で終了しました"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正規表現が大きすぎます"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") または \\) が不一致です"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "以前に正規表現がありません"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告: ビルトイン `%s' に対する引数が不足しています"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告: ビルトイン `%s' に対する引数が多すぎます (超過分は無視されます)"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "ビルトイン `%s' に非数字の引数が渡されています"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "内部エラー:関数 define_macro () 内のトークンデータの種類に誤りがあります"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "%s という名前は定義されていません"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "内部エラー:ビルトインテーブルにビルトインが見つかりません!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "内部エラー:関数 m4_dumpdef () 内のトークンデータの種類に誤りがあります"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "`%s' という名前は定義されていません"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "内部エラー:関数 m4_defn () 内のシンボルの種類に誤りがあります"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "コマンド `%s' に対するパイプを開けません"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "eval の基数 ( %d 進法) の桁数が許容範囲外にあります"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "eval の出力桁数が負数になっています"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s に数字でない引数が渡されています"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "%s を undivert できません"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "構文コード %c は定義されていません"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "%s を開くことが出来ません"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "デバッグモード: 誤ったデバッグフラグです: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "エラーファイルとして設定できません: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告: \\0 は廃止されます。置換の際には代わりに \\& を使用してください"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "正規表現 `%s' に誤りがあります: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "正規表現 `%s' の一致処理に失敗しました"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "内部エラー:ビルトインテーブルにビルトインが見つかりません! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "内部エラー:トークンデータの種類に誤りがあります (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "eval 中の計算式に誤りがあります (閉じる小括弧がありません): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "eval 中の計算式に誤りがあります: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "eval 中の計算式に誤りがあります (誤った入力): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "eval 中の計算式に誤りがあります (入力超過): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "eval 中に 0 による除算があります: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "eval 中に 0 による剰余計算があります: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "内部エラー: evaluate () 内のエラーコードに誤りがあります"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "内部エラー: cmp_term () 内の比較演算子に誤りがあります"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "内部エラー: shift_term () 内のシフト演算子に誤りがあります"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "内部エラー: mult_term () 内の演算子に誤りがあります"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "内部エラー: ビルトインテーブルにビルトインが見つかりません!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "内部エラー: freeze_one_symbol () 内のトークンデータの種類に誤りがあります"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "凍結ファイル内で改行が予期されます"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "凍結ファイル内で文字 `%c' が予期されます"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "不正な書式の凍結ファイルです"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "凍結ファイルのファイル終端 (EOF) が早すぎます"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "凍結ファイルの `%s' がビルトインテーブル内にありません!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "入力が %s へ戻されました (行 %d)"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "%s から入力を読み込みます"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "内部エラー: 再帰的な push_string です!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "内部エラー: init_macro_token () の誤った呼び出しです"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "内部エラー: next_char () 内で入力スタックが壊れました"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "内部エラー: peek_input () 内で入力スタックが壊れました"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "エラー: 文字列内でファイル終端 (EOF) に達しました"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "エラー: スタックオーバーフローです。(無限に再帰定義をしていませんか?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "詳しくは `%s --help' を実行して下さい。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "使用法: %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"長い形式のオプションで必須または任意の引数は、それに対応する短い形式の\n"
+"オプションでも同様に必須または任意です。\n"
+"\n"
+"操作モード:\n"
+" --help オプション一覧を出力し、終了する\n"
+" --version バージョン情報を出力し、終了する\n"
+" -e, --interactive 出力バッファリングせず、割り込みを無視する\n"
+" -E, --fatal-warnings 最初の警告で実行を中止する\n"
+" -Q, --quiet, --silent ビルトインのいくつかの警告を抑止する\n"
+" -P, --prefix-builtins 全てのビルトインに `m4_' という接頭辞を\n"
+" 強制的に付加する\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr ""
+" -W, --word-regexp=REGEXP マクロ名の構文として正規表現 REGEXP\n"
+" を使用する\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"動的ローディング機能:\n"
+" -m, --module-directory=DIRECTORY モジュール検索パスに DIRECTORY を加える\n"
+" -M, --load-module=MODULE M4MODPATH から動的に MODULE をロードする\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"プリプロセッサ機能:\n"
+" -I, --include=DIRECTORY 2番目のインクルードディレクトリとして DIRECTORY\n"
+" を検索する\n"
+" -D, --define=NAME[=VALUE] NAME の値を VALUE に設定する。省略した場合は\n"
+" 空になる\n"
+" -U, --undefine=NAME NAME ビルトインを削除する\n"
+" -s, --synclines `#line NO \"FILE\"' 行を生成する\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"制限の制御:\n"
+" -G, --traditional 全ての GNU 拡張を抑止する\n"
+" -H, --hashsize=PRIME シンボル検索のハッシュテーブルサイズを設定する\n"
+" -L, --nesting-limit=NUMBER ネストの制限を人為的に NUMBER に変更する\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"凍結状態のファイル:\n"
+" -F, --freeze-state=FILE 最後に指定された FILE を凍結状態にします。\n"
+" -R, --reload-state=FILE 最初に指定された FILE から\n"
+" 凍結された定義をロードします\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"デバッグ:\n"
+" -d, --debug=[FLAGS] デバッグレベルを設定する (FLAGS を指定しない\n"
+" 場合は暗黙的に `aeq' となる)\n"
+" -t, --trace=NAME NAME が定義されたらトレースを行う\n"
+" -l, --arglength=NUM マクロのトレースサイズを NUM に制限する\n"
+" -o, --error-output=FILE デバッグとトレースの出力を FILE にリダイレ\n"
+" クトする\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAG は以下のいずれかです:\n"
+" t 全てのマクロ呼びだしをトレースする\n"
+" (traceon によるものに限定しない)\n"
+" a 実際の引数を表示する\n"
+" e 展開されたものを表示する\n"
+" q `a' または `e' と共に用い、必要に応じて値を引用符で囲む\n"
+" c 訂正前と訂正後、呼出後に表示する\n"
+" x そのマクロコールに固有の ID を追加する。\n"
+" `c' と組み合わせると役に立つ\n"
+" f 現在の入力ファイル名を表示する\n"
+" l 現在の入力行数を表示する\n"
+" p パス検索の結果を表示する\n"
+" i 入力ファイルの変化を表示する\n"
+" V 上記すべての FLAG の短縮形\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"FILE が指定されていない場合および指定されたファイルが `-' の場合は\n"
+" 標準入力が読み込まれます。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"バグを発見したら <bug-m4@gnu.org> に報告して下さい。\n"
+"翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してください。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "不正なデバッグフラグ: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "エラー: 検索ディレクトリ `%s' の追加に失敗しました"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "エラー: 検索ディレクトリ `%s' の追加に失敗しました: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (オプション:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "内部エラー:オプションの後処理で、不正コードが検出されました。"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "内部エラー:関数 expand_token () 内のトークンの種類が不正です。"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "エラー: 引数リスト内にファイルの終端記号があります。"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "内部エラー:関数 expand_argument () のトークンの種類が不正です。"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "内部エラー:関数 call_macro () 内のシンボルの種類が不正です。"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ""
+"エラー:再帰的定義のネストが指定された値 %d を超えています。\n"
+" -L<数字> オプションを用いてネスト数の上限を増やして下さい。"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERROR: モジュールの初期化に失敗しました: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERROR: モジュールが見つかりません: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERROR: モジュールが見つかりません: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERROR: モジュールを閉じることが出来ません"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr ""
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERROR: モジュールを閉じることができません: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr ""
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "エラー: divert のためのテンポラリファイルが作成できません。"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "エラー: テンポラリファイルに divert すべき内容を write できません。"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "エラー: 挿入されるべきファイルをコピー中です。"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "エラー: 挿入されるべきファイルをリード中です。"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr ""
+"divert のためのファイルのステータスを得ることができません。\n"
+" (stat できません。)"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "divert が大きすぎます"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "`%s' というディレクトリから `%s' というファイルを見つけました。"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "リソース値 RLIMIT_VMEM を超えていませんか?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"メモリ (セグメンテーション違反) が検出されました。\n"
+" スタックがオーバーフローしている、あるいはバグが存在する\n"
+" 可能性があります。"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". 無限の再帰呼び出しが行われていないかどうかチェックして下さい。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "内部エラー: symbol_lookup () に対するモードが不正です"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "`%s' という名前は不明です\n"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "%2$s に対する引数 %1$s が曖昧です"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "有効な引数:"
+
+#~ msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
+#~ msgstr "ARGP_HELP_FMT: %s の値は %s の値以下です"
+
+#~ msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
+#~ msgstr "%.*s: ARGP_HELP_FMT パラメータには値が必要です"
+
+#~ msgid "%.*s: ARGP_HELP_FMT parameter must be positive"
+#~ msgstr "%.*s: ARGP_HELP_FMT パラメータは正の値でなければいけません"
+
+#~ msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
+#~ msgstr "%.*s: 不明な ARGP_HELP_FMT パラメータ"
+
+#~ msgid "Garbage in ARGP_HELP_FMT: %s"
+#~ msgstr "ARGP_HELP_FMT 中にごみがあります: %s"
+
+#~ msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
+#~ msgstr "長い形式のオプションで必須または任意の引数は、それに対応する短い形式のオプションでも同様に必須または任意です。"
+
+#~ msgid "Usage:"
+#~ msgstr "使用法:"
+
+#~ msgid " or: "
+#~ msgstr "または: "
+
+#~ msgid " [OPTION...]"
+#~ msgstr " [OPTION...]"
+
+#~ msgid "Unknown system error"
+#~ msgstr "不明なシステムエラー"
+
+#~ msgid "give this help list"
+#~ msgstr "このヘルプを表示する"
+
+#~ msgid "give a short usage message"
+#~ msgstr "短い使用方法を表示する"
+
+#~ msgid "NAME"
+#~ msgstr "名前"
+
+#~ msgid "set the program name"
+#~ msgstr "プログラム名を設定する"
+
+#~ msgid "SECS"
+#~ msgstr "SECS"
+
+#~ msgid "hang for SECS seconds (default 3600)"
+#~ msgstr "SECS 秒でハング (デフォルト 3600)"
+
+#~ msgid "print program version"
+#~ msgstr "プログラムのバージョンを表示する"
+
+#~ msgid "(PROGRAM ERROR) No version known!?"
+#~ msgstr "(プログラムエラー) 不明なバージョン!?"
+
+#~ msgid "%s: Too many arguments\n"
+#~ msgstr "%s: 引数が多すぎます\n"
+
+#~ msgid "(PROGRAM ERROR) Option should have been recognized!?"
+#~ msgstr "(プログラムエラー) オプションは認識されているべきです!?"
+
+#~ msgid "program error"
+#~ msgstr "プログラムエラー"
+
+#~ msgid "stack overflow"
+#~ msgstr "スタックオーバーフロー"
+
+#~ msgid "cannot find a temporary directory, try setting $TMPDIR"
+#~ msgstr "一時ディレクトリを作成できません。 $TMPDIR を設定してみてください"
+
+#~ msgid "cannot create a temporary directory using template \"%s\""
+#~ msgstr "テンプレート \"%s\" を使用した一時ディレクトリを作成できません"
+
+#~ msgid "cannot remove temporary directory %s"
+#~ msgstr "一時ディレクトリ %s を削除できません"
+
+#~ msgid "error closing file"
+#~ msgstr "ファイルクローズエラー"
+
+#~ msgid "write error"
+#~ msgstr "書き込みエラー"
+
+#~ msgid "preserving permissions for %s"
+#~ msgstr "%s のパーミッションを保存しています"
+
+#~ msgid "error while opening \"%s\" for reading"
+#~ msgstr "\"%s\"を読込むため開いている際にエラーが発生しました"
+
+#~ msgid "cannot open backup file \"%s\" for writing"
+#~ msgstr "書込み用バックアップファイル\"%s\"を開くことができません"
+
+#~ msgid "error reading \"%s\""
+#~ msgstr "\"%s\"の読込み中にエラーが発生しました"
+
+#~ msgid "error writing \"%s\""
+#~ msgstr "\"%s\"の書込み中にエラーが発生しました"
+
+#~ msgid "error after reading \"%s\""
+#~ msgstr "\"%s\"の読込み後にエラーが発生しました"
+
+#~ msgid "fdopen() failed"
+#~ msgstr "fdopen()に失敗しました"
+
+#~ msgid "C# compiler not found, try installing pnet"
+#~ msgstr "C# コンパイラが見つりません。pnet をインストールしてみてください"
+
+#~ msgid "C# virtual machine not found, try installing pnet"
+#~ msgstr "C# 仮想マシンが見つかりません。pnet をインストールしてみてください"
+
+#~ msgid "%s subprocess failed"
+#~ msgstr "%s サブプロセスが失敗しました"
+
+#~ msgid "regular empty file"
+#~ msgstr "通常の空ファイル"
+
+#~ msgid "regular file"
+#~ msgstr "通常ファイル"
+
+#~ msgid "directory"
+#~ msgstr "ディレクトリ"
+
+#~ msgid "block special file"
+#~ msgstr "ブロックスペシャルファイル"
+
+#~ msgid "character special file"
+#~ msgstr "キャラクタスペシャルファイル"
+
+#~ msgid "fifo"
+#~ msgstr "fifo"
+
+#~ msgid "symbolic link"
+#~ msgstr "シンボリックリンク"
+
+#~ msgid "socket"
+#~ msgstr "ソケット"
+
+#~ msgid "message queue"
+#~ msgstr "メッセージキュー"
+
+#~ msgid "semaphore"
+#~ msgstr "セマフォ"
+
+#~ msgid "shared memory object"
+#~ msgstr "共有メモリオブジェクト"
+
+#~ msgid "typed memory object"
+#~ msgstr "型付メモリオブジェクト"
+
+#~ msgid "weird file"
+#~ msgstr "不明なファイル"
+
+#~ msgid "Address family for hostname not supported"
+#~ msgstr "ホスト名に対する Address family がサポートされていません"
+
+#~ msgid "Temporary failure in name resolution"
+#~ msgstr "名前解決に一時的に失敗しました"
+
+#~ msgid "Bad value for ai_flags"
+#~ msgstr "ai_flags に対する誤った値です"
+
+#~ msgid "Non-recoverable failure in name resolution"
+#~ msgstr "名前解決でリカバリできない失敗が発生しました"
+
+#~ msgid "ai_family not supported"
+#~ msgstr "ai_family はサポートされていません"
+
+#~ msgid "Memory allocation failure"
+#~ msgstr "メモリ配置に失敗しました"
+
+#~ msgid "No address associated with hostname"
+#~ msgstr "ホスト名にアドレスが割り当てられていません"
+
+#~ msgid "Servname not supported for ai_socktype"
+#~ msgstr "ai_socktype に対して Servname がサポートされていません"
+
+#~ msgid "ai_socktype not supported"
+#~ msgstr "ai_socktype はサポートされていません"
+
+#~ msgid "System error"
+#~ msgstr "システムエラー"
+
+#~ msgid "Argument buffer too small"
+#~ msgstr "引数バッファが小さすぎます"
+
+#~ msgid "Processing request in progress"
+#~ msgstr "要求された処理は実行中です"
+
+#~ msgid "Request canceled"
+#~ msgstr "要求がキャンセルされました"
+
+#~ msgid "Request not canceled"
+#~ msgstr "要求がキャンセルされませんでした"
+
+#~ msgid "All requests done"
+#~ msgstr "すべての要求が完了しました"
+
+#~ msgid "Interrupted by a signal"
+#~ msgstr "シグナル割り込みが発生しました"
+
+#~ msgid "Parameter string not correctly encoded"
+#~ msgstr "パラメーター文字列が正しくエンコードされていません"
+
+#~ msgid "Unknown error"
+#~ msgstr "不明なエラー"
+
+#~ msgid "invalid source_version argument to compile_java_class"
+#~ msgstr "compile_java_class への source_version 引数が無効です"
+
+#~ msgid "invalid target_version argument to compile_java_class"
+#~ msgstr "compile_java_class への target_version 引数が無効です"
+
+#~ msgid "failed to create \"%s\""
+#~ msgstr "\"%s\" の作成に失敗しました"
+
+#~ msgid "error while writing \"%s\" file"
+#~ msgstr "\"%s\" ファイルの書き込み中にエラーが発生しました"
+
+#~ msgid "Java compiler not found, try installing gcj or set $JAVAC"
+#~ msgstr "Java コンパイラが見つかりません。 gcj をインストールするか、またはt $JAVAC を設定してみてください"
+
+#~ msgid "Java virtual machine not found, try installing gij or set $JAVA"
+#~ msgstr "Java 仮想マシンが見つかりません。 gij をインストールするか、または $JAVA を設定してみてください"
+
+#~ msgid "%s subprocess I/O error"
+#~ msgstr "%s サブプロセス I/O エラー"
+
+#~ msgid "cannot change permissions of %s"
+#~ msgstr "%s のパーミッションを変更できません"
+
+#~ msgid "cannot create directory %s"
+#~ msgstr "ディレクトリ %s を作成できません"
+
+#~ msgid "unable to record current working directory"
+#~ msgstr "現在の作業ディレクトリを記録することができません"
+
+#~ msgid "failed to return to initial working directory"
+#~ msgstr "初期作業ディレクトリに戻るのに失敗しました"
+
+#~ msgid "Failed to open /dev/zero for read"
+#~ msgstr "/dev/zeroを読込み用に開けません"
+
+#~ msgid "creation of reading thread failed"
+#~ msgstr "読み込みスレッドの作成に失敗しました"
+
+#~ msgid "cannot set up nonblocking I/O to %s subprocess"
+#~ msgstr "%s 子プロセスへ非ブロック I/O を設定できません"
+
+#~ msgid "communication with %s subprocess failed"
+#~ msgstr "%s 子プロセスとの通信に失敗しました"
+
+#~ msgid "write to %s subprocess failed"
+#~ msgstr "%s 子プロセスへの書き込みに失敗しました"
+
+#~ msgid "read from %s subprocess failed"
+#~ msgstr "%s 子プロセスからの読み込みに失敗しました"
+
+#~ msgid "subprocess %s terminated with exit code %d"
+#~ msgstr "子プロセス %s が終了コード %d で終了しました"
+
+#~ msgid "creation of threads failed"
+#~ msgstr "スレッドの作成に失敗しました"
+
+#~ msgid "%s subprocess terminated with exit code %d"
+#~ msgstr "%s 子プロセスが終了コード %d で終了しました"
+
+#~ msgid "cannot create pipe"
+#~ msgstr "パイプを作成できません"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "setting permissions for %s"
+#~ msgstr "%s のパーミッションを設定します"
+
+#~ msgid "Hangup"
+#~ msgstr "Hangup"
+
+#~ msgid "Interrupt"
+#~ msgstr "割り込み"
+
+#~ msgid "Quit"
+#~ msgstr "終了"
+
+#~ msgid "Illegal instruction"
+#~ msgstr "Illegal instruction"
+
+#~ msgid "Trace/breakpoint trap"
+#~ msgstr "Trace/breakpoint trap"
+
+#~ msgid "Aborted"
+#~ msgstr "中止"
+
+#~ msgid "Floating point exception"
+#~ msgstr "浮動小数点例外"
+
+#~ msgid "Killed"
+#~ msgstr "強制終了"
+
+#~ msgid "Bus error"
+#~ msgstr "バスエラー"
+
+#~ msgid "Segmentation fault"
+#~ msgstr "Segmentation fault"
+
+#~ msgid "Broken pipe"
+#~ msgstr "Broken pipe"
+
+#~ msgid "Alarm clock"
+#~ msgstr "Alarm clock"
+
+#~ msgid "Terminated"
+#~ msgstr "Terminated"
+
+#~ msgid "Urgent I/O condition"
+#~ msgstr "緊急 I/O 状態"
+
+#~ msgid "Stopped (signal)"
+#~ msgstr "停止 (シグナル)"
+
+#~ msgid "Stopped"
+#~ msgstr "停止"
+
+#~ msgid "Continued"
+#~ msgstr "継続"
+
+#~ msgid "Child exited"
+#~ msgstr "子プロセス終了"
+
+#~ msgid "Stopped (tty input)"
+#~ msgstr "停止 (tty 入力)"
+
+#~ msgid "Stopped (tty output)"
+#~ msgstr "停止 (tty 出力)"
+
+#~ msgid "I/O possible"
+#~ msgstr "I/O 可能"
+
+#~ msgid "File size limit exceeded"
+#~ msgstr "ファイルサイズ制限を超過しました"
+
+#~ msgid "Virtual timer expired"
+#~ msgstr "仮想タイマーが終了しました"
+
+#~ msgid "Profiling timer expired"
+#~ msgstr "プロファイリングタイマーが終了しました"
+
+#~ msgid "Window changed"
+#~ msgstr "Window が変更されました"
+
+#~ msgid "User defined signal 2"
+#~ msgstr "ユーザー定義シグナル2"
+
+#~ msgid "EMT trap"
+#~ msgstr "EMT トラップ"
+
+#~ msgid "Bad system call"
+#~ msgstr "間違ったシステムコール"
+
+#~ msgid "Stack fault"
+#~ msgstr "スタックエラー"
+
+#~ msgid "Information request"
+#~ msgstr "情報要求"
+
+#~ msgid "Power failure"
+#~ msgstr "電源エラー"
+
+#~ msgid "Resource lost"
+#~ msgstr "リソースが無くなりました"
+
+#~ msgid "error writing to a closed pipe or socket"
+#~ msgstr "閉じたパイプまたはソケットへの書き込みでエラーが発生しました"
+
+#~ msgid "Real-time signal %d"
+#~ msgstr "リアルタイムシグナル %d"
+
+#~ msgid "Unknown signal %d"
+#~ msgstr "不明なシグナル %d"
+
+#~ msgid "iconv function not usable"
+#~ msgstr "iconv 関数が使えません"
+
+#~ msgid "iconv function not available"
+#~ msgstr "iconv 関数が有効ではありません"
+
+#~ msgid "character out of range"
+#~ msgstr "範囲外の文字"
+
+#~ msgid "cannot convert U+%04X to local character set"
+#~ msgstr "U+%04X をローカル文字セットに変換できません"
+
+#~ msgid "cannot convert U+%04X to local character set: %s"
+#~ msgstr "U+%04X をローカル文字セット %s に変換できません"
+
+#~ msgid "invalid user"
+#~ msgstr "無効なユーザ"
+
+#~ msgid "invalid group"
+#~ msgstr "無効なグループ"
+
+#~ msgid "invalid spec"
+#~ msgstr "無効な指定"
+
+#~ msgid "unable to display error message"
+#~ msgstr "エラーメッセージを表示できません"
+
+#~ msgid "Packaged by %s (%s)\n"
+#~ msgstr "パッケージ作成者: %s (%s)\n"
+
+#~ msgid "Packaged by %s\n"
+#~ msgstr "パッケージ作成者: %s\n"
+
+#~ msgid "(C)"
+#~ msgstr "(C)"
+
+#~ msgid ""
+#~ "\n"
+#~ "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
+#~ "This is free software: you are free to change and redistribute it.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ライセンス GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
+#~ "This is free software: you are free to change and redistribute it.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+
+#~ msgid "Written by %s.\n"
+#~ msgstr "作者 %s。\n"
+
+#~ msgid "Written by %s and %s.\n"
+#~ msgstr "作者 %s および %s。\n"
+
+#~ msgid "Written by %s, %s, and %s.\n"
+#~ msgstr "作者 %s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "%s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "%s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "%s, %s, and others.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "%s、 %s、 および他の方々。\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "バグを発見したら <%s> に報告して下さい。\n"
+#~ "翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してください。\n"
+
+#~ msgid "Report %s bugs to: %s\n"
+#~ msgstr "%s のバグは <%s> に報告してください。\n"
+
+#~ msgid "%s home page: <%s>\n"
+#~ msgstr "%s のホームページ: <%s>\n"
+
+#~ msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
+
+#~ msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#~ msgstr "GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>\n"
+
+#~ msgid "_open_osfhandle failed"
+#~ msgstr "_open_osfhandle に失敗しました"
+
+#~ msgid "cannot restore fd %d: dup2 failed"
+#~ msgstr "ファイル記述子 (fd) %d をリストアできません: dup2 に失敗しました"
+
+#~ msgid "%s subprocess"
+#~ msgstr "%s 子プロセス"
+
+#~ msgid "%s subprocess got fatal signal %d"
+#~ msgstr "%s 子プロセスが致命的なシグナル %d を受信しました"
+
+#~ msgid "stdin"
+#~ msgstr "標準入力"
+
+#~ msgid "stdout"
+#~ msgstr "標準出力"
+
+#~ msgid "stderr"
+#~ msgstr "標準エラー出力"
+
+#~ msgid "unknown stream"
+#~ msgstr "不明なストリーム"
+
+#~ msgid "failed to reopen %s with mode %s"
+#~ msgstr "%s をモード %s で再度開くことに失敗しました"
+
+#~ msgid "string comparison failed"
+#~ msgstr "文字列の比較に失敗しました"
+
+#~ msgid "Set LC_ALL='C' to work around the problem."
+#~ msgstr "問題を回避するために LC_ALL='C' を指定してください."
+
+#~ msgid "The strings compared were %s and %s."
+#~ msgstr "比較した文字列は %s と %s です."
+
+#~ msgid "cannot perform formatted output"
+#~ msgstr "書式設定を行った出力を実行することができません"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "引数 `%3$s' に対して無効な接尾辞 %1$s%2$s です"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "引数 `%3$s' に対する %1$s%2$s が大きすぎます"
+
+#~ msgid "block size"
+#~ msgstr "ブロックサイズ"
+
+#~ msgid "%s exists but is not a directory"
+#~ msgstr "%s は存在しますがディレクトリではありません"
+
+#~ msgid "cannot change owner and/or group of %s"
+#~ msgstr "%s のオーナーとグループを変更できません"
+
+#~ msgid "cannot chdir to directory %s"
+#~ msgstr "ディレクトリ %s に移動できません"
+
+#~ msgid "cannot get the login group of a numeric UID"
+#~ msgstr "数字のUIDのログイングループを取得できません"
+
+#~ msgid ""
+#~ "\n"
+#~ "This is free software. You may redistribute copies of it under the terms of\n"
+#~ "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "本プログラムはフリーソフトウェアです. GNU一般公有使用許諾\n"
+#~ "<http://www.gnu.org/licenses/gpl.html> で定められた条項の下で本プログラ\n"
+#~ "ムのコピーを再配布できます. 適切な法が認る限りにおいて全くの無保証です.\n"
+#~ "\n"
diff --git a/po/.reference/ja.s1 b/po/.reference/ja.s1
new file mode 100644
index 00000000..cbc1899e
--- /dev/null
+++ b/po/.reference/ja.s1
@@ -0,0 +1 @@
+498c12997942ed04c76ae5a43d404c5926013036 -
diff --git a/po/.reference/nl.po b/po/.reference/nl.po
new file mode 100644
index 00000000..1556af08
--- /dev/null
+++ b/po/.reference/nl.po
@@ -0,0 +1,667 @@
+# Translation of m4-1.4o to Dutch.
+# Copyright (C) 2000, 2007 Free Software Foundation, Inc.
+#
+# Tijs van Bakel <smoke@casema.net>, 2000.
+# Benno Schulenberg <benno@vertaalt.nl>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2007-09-02 11:55+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: optie '%s' is niet eenduidig\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: optie '--%s' staat geen argument toe\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: optie '%c%s' staat geen argument toe\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: optie '%s' vereist een argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: onbekende optie '--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: onbekende optie '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: optie vereist een argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: optie '-W %s' is niet eenduidig\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: optie '-W %s' staat geen argument toe\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "onvoldoende geheugen beschikbaar"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Gelukt"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Geen overeenkomsten"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ongeldige reguliere expressie"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ongeldig samengesteld teken"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ongeldige tekenklassenaam"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Backslash aan het eind"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ongeldige terugverwijzing"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Ongepaarde [ of [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Ongepaarde ( of \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Ongepaarde \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ongeldige inhoud van \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ongeldig bereikeinde"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Onvoldoende geheugen beschikbaar"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ongeldige voorafgaande reguliere expressie"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Voortijdig einde van reguliere expressie"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Reguliere expressie is te groot"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Ongepaarde ) of \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Geen eerdere reguliere expressie"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Waarschuwing: te weinig argumenten voor ingebouwde functie '%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Waarschuwing: te veel argumenten voor ingebouwde functie '%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Niet-numeriek argument van ingebouwde functie '%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "**Interne fout**: Foutief datatype voor token in define_macro()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Ongedefinieerde naam '%s'"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "**Interne fout**: Foutief datatype voor eenheid in m4_dumpdef()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ongedefinieerde naam '%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "**Interne fout**: Foutief type voor symbool in m4_defn()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan niet doorsluizen naar opdracht '%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Getalsbasis %d in 'eval' valt buiten bereik"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negatieve breedte voor 'eval'"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Niet-numeriek argument van %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan %s niet terugbuigen"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Ongedefinieerde syntactische code %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan %s niet openen"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Foutieve debug-opties: '%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan geen foutenbestand aanmaken: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "Waarschuwing: \\0 zal verdwijnen; gebruik in vervangingen liever \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Foutieve reguliere expressie '%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fout bij vergelijken van reguliere expressie '%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel! (trace_pre())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "**Interne fout**: Foutief datatype voor eenheid (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Foutieve expressie in 'eval' (ontbrekend sluithaakje): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Foutieve expressie in 'eval': %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Foutieve expressie in 'eval' (foutieve invoer): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Foutieve expressie in 'eval' (overvloedige invoer): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Deling door nul in 'eval': %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nul in 'eval': %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "**Interne fout**: Foutieve foutcode in evaluate()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "**Interne fout**: Foutieve vergelijkingsoperator in cmp_term()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "**Interne fout**: Foutieve schuifoperator in shift_term()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "**Interne fout**: Foutieve operator in mult_term()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "**Interne fout**: Foutief datatype voor eenheid in freeze_one_symbol()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Een regeleindeteken werd verwacht in bevroren bestand"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Teken '%c' werd verwacht in bevroren bestand"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Foutief geformatteerd bevroren bestand"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Voortijdig einde van bevroren bestand"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "'%s' uit bevroren bestand niet gevonden in tabel van ingebouwde functies!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Invoer is teruggekeerd naar %s, regel %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Invoer gelezen van %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "**Interne fout**: Recursieve push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "**Interne fout**: Foutieve aanroep van init_macro_token()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "**Interne fout**: Invoerstapel vernield in next_char()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "**Interne fout**: Invoerstapel vernield in peek_input()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "GEEN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FOUT: bestandseinde in tekenreeks"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FOUT: Stapeloverloop. (Oneindige recursie van 'define'?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Typ '%s --help' voor meer informatie.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Gebruik: %s [OPTIE]... [BESTAND]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Een argument dat verplicht of optioneel is voor een lange optie, is dat\n"
+"ook voor de overeenkomstige korte optie.\n"
+"\n"
+"Werkingsmodus:\n"
+" --help deze hulptekst tonen en stoppen\n"
+" --version versie-informatie tonen en stoppen\n"
+" -e, --interactive uitvoer niet bufferen, onderbrekingen negeren\n"
+" -E, --fatal-warnings stoppen na de eerste waarschuwing\n"
+" -Q, --quiet, --silent sommige waarschuwingen voor ingebouwde functies\n"
+" onderdrukken\n"
+" -P, --prefix-builtins ingebouwde functies het voorvoegsel 'm4_' geven\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr ""
+" -W, --word-regexp=REGEXP deze reguliere expressie gebruiken voor de\n"
+" syntaxis van macronamen\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisch laden:\n"
+" -m, --module-directory=MAP deze map aan het modules-zoekpad toevoegen\n"
+" -M, --load-module=MODULE deze module laden, zoekend in M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Voorbewerkingsopties:\n"
+" -I, --include=MAP ook in deze map naar insluitbestanden zoeken\n"
+" -D, --define=NAAM[=WAARDE] NAAM definiëren (met gegeven beginwaarde)\n"
+" -U, --undefine=NAAM ingebouwde functie met deze naam verwijderen\n"
+" -s, --synclines '#line NR \"BESTAND\"'-regels genereren\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Begrenzingen:\n"
+" -G, --traditional alle GNU-uitbreidingen uitschakelen\n"
+" -H, --hashsize=PRIEM grootte van hash-tabel voor symbolen\n"
+" -L, --nesting-limit=GETAL te gebruiken kunstmatige nestingsdiepte\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Bevroren toestandsbestanden:\n"
+" -F, --freeze-state=BESTAND bij einde bevroren toestand in BESTAND opslaan\n"
+" -R, --reload-state=BESTAND bij begin bevroren toestand uit BESTAND inlezen\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debuggen:\n"
+" -d, --debug[=OPTIES] debug-niveau (geen OPTIES impliceert 'aeq')\n"
+" -t, --trace=NAAM NAAM tracen zodra deze gedefinieerd wordt\n"
+" -l, --arglength=GETAL trace-grootte van macro's beperken\n"
+" -o, --error-output=BESTAND debug- en trace-uitvoer omleiden naar BESTAND\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"OPTIES is één of meer van:\n"
+" t alle macro-aanroepen tracen, niet slechts die met 'traceon'\n"
+" a de werkelijke argumenten tonen\n"
+" e expansies tonen\n"
+" q waarden zonodig aanhalen (bij optie 'a' of 'e')\n"
+" c toestand vóór en na verzamelen van argumenten tonen, en na aanroep\n"
+" x een uniek macro-nummer tonen (handig bij optie 'c')\n"
+" f het huidige invoerbestand vermelden\n"
+" l het huidige regelnummer van de invoer vermelden\n"
+" p resultaten van pad-doorzoekingen tonen\n"
+" i wijzigingen in invoerbestanden tonen\n"
+" V alle bovenstaande opties samen\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Als er geen BESTAND gegeven is, of als BESTAND '-' is, wordt van\n"
+"standaardinvoer gelezen.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporteer gebreken in het programma aan <bug-m4@gnu.org>;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Foutieve debug-opties: '%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FOUT: kan zoekmap '%s' niet toevoegen"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FOUT: kan zoekmap '%s' niet toevoegen: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opties:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "**Interne fout**: Foutieve code in achtergehouden argumenten"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "**Interne fout**: Foutief type voor eenheid in expand_token()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FOUT: bestandseinde in argumentenlijst"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "**Interne fout**: Foutief type voor eenheid in expand_argument()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "**Interne fout**: Foutief type voor symbool in call_macro()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FOUT: Recursiegrens %d overschreden; gebruik -L<GETAL> om deze te veranderen"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FOUT: Kan modules niet initialiseren: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FOUT: Kan module '%s' niet vinden"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FOUT: Kan module '%s' niet vinden: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FOUT: Kan modules niet sluiten"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FOUT: Kan modules niet sluiten: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FOUT: Kan module '%s' niet sluiten"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FOUT: Kan module '%s' niet sluiten: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FOUT: Kan geen tijdelijke map maken voor afbuiging"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FOUT: Kan afbuiging niet opslaan in tijdelijk bestand"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FOUT: Kopiëren van ingevoegd bestand"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FOUT: Lezen van ingevoegd bestand"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan de status van afbuiging niet opvragen"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Afbuiging is te groot"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Padzoektocht naar '%s' vond '%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-limiet overschreden?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Een geheugensegmentgrens is overschreden: SIGSEGV.\n"
+"Er is ofwel een stapeloverloop opgetreden,\n"
+"of er zit een programmeerfout in "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Controleer op een mogelijk oneindige recursie.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "**Interne fout**: Ongeldige modus voor symbol_lookup()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Naam '%s' is onbekend\n"
diff --git a/po/.reference/nl.s1 b/po/.reference/nl.s1
new file mode 100644
index 00000000..38e8df60
--- /dev/null
+++ b/po/.reference/nl.s1
@@ -0,0 +1 @@
+c813ff0de849d7d10dbd1bccdd493e5c428a4eca -
diff --git a/po/.reference/pl.po b/po/.reference/pl.po
new file mode 100644
index 00000000..a6cbd6f5
--- /dev/null
+++ b/po/.reference/pl.po
@@ -0,0 +1,663 @@
+# Polish translations for the GNU m4 messages.
+# Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Rafał Maszkowski <rzm@icm.edu.pl>, 1998-1999, 2001, 2003, 2010.
+# Thanks do Jakub Bogusz for corretions, 2003
+# my „smart" mutt needs this line
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2010-01-23 23:15+0100\n"
+"Last-Translator: Rafał Maszkowski <rzm@icm.edu.pl>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opcja `%s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opcja `--%s' nie może mieć argumentu\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opcja `%c%s' nie może mieć argumentu\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opcja `%s' musi mieć argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: nierozpoznana opcja `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: nierozpoznana opcja `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: nielegalna opcja -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: błędna opcja -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opcja musi mieć argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcja `-W %s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcja `-W %s' nie może mieć argumentu\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "brak pamięci"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Wzorzec znaleziony"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Wzorca nie znaleziono"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Błędne wyrażenie regularne"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Znak błędny dla bieżącego uporządkowania"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Błędna nazwa klasy znaków"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Końcowy ukośnik odwrotny"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Błędne odwołanie"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Nie pasujące [ lub [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Nie pasujące ( lub \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Nie pasujący \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Błędna zawartość \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Błędny koniec zakresu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Brak pamięci"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Błędne poprzedzające wyrażenie regularne"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Przedwczesny koniec pliku wyrażenia regularnego"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Za duże wyrażenie regularne"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Nie pasujące ) lub \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Brak poprzedniego wyrażenia regularnego"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Uwaga: Za mało argumentów dla wbudowanego `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Uwaga: Nadmiarowe argumenty do built-in `%s' zostały zignorowane"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Nienumeryczny argument do built-in `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu w define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Niezdefiniowana nazwa %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu w m4_dumpref ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Niezdefiniowana nazwa `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ symbolu w m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Nie mogę otworzyć potoku do komendy `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Baza w eval poza zakresem (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Ujemna długość w eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Nienumeryczny argument dla %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Nie mogę przetworzyć z powrotem %s"
+
+# hm - rzm
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Niezdefiniowany kod składniowy %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Nie mogę otworzyć %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Tryb debugowania: złe flagi debugowania: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Nie mogę ustawić pliku błędów: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "UWAGA: \\0 zniknie, w podstawieniach użyj zamiast tego \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Błędne wyrażenie regularne `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Błąd dopasowania do wyrażenia regularnego `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Błędne wyrażenie w eval (brakujący prawy nawias): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Błędne wyrażenie w eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Błędne wyrażenie w eval (złe dane wejściowe): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Błędne wyrażenie w eval (nadmiarowe dane): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Dzielenie przez zero w eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo zero w eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny kod błędu w evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator porównania w cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator przesunięcia w shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator w mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ danych tokenu w freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Oczekiwany line feed w zamrożonym pliku stanu"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Oczekiwany znak `%c' w zamrożonym pliku stanu"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Źle sformatowany zamrożony pliku stanu"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Przedwczesny koniec zamrożonego pliku stanu"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' z zamrożonego pliku stanu nie znalezione w tablicy wbudowanych poleceń!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Dane wejściowe wycofane do %s, linia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Dane wejściowe przeczytane z %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "BŁĄD WEWNĘTRZNY: Rekursywny push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędne wywołanie init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błąd stosu wejściowego w next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błąd stosu wejściowego w peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "ŻADEN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "BŁĄD: EOF w łańcuchu"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "BŁĄD: Przepełnienie stosu. (Nieskończona rekursja definicji?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Spróbuj `%s --help' żeby dowiedzieć się więcej.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Składnia: %s [OPCJA]... [PLIK]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumenty obowiązkowe lub opcjonalne dla opcji długich są obowiązkowe lub\n"
+"opcjonalne również dla krótkich.\n"
+"\n"
+"Tryby pracy:\n"
+" --help wyświetlenie tego opisu i zakończenie\n"
+" --version wyświetlenie informacji o wersji i zakończenie\n"
+" -e, --intercative bez buforowania wyjścia, ignorowanie przerwań\n"
+" -E, --fatal-warnings zatrzymanie się po pierwszym ostrzeżeniu\n"
+" -Q, --quiet, --silent bez pokazywania niektórych ostrzeżeń dla\n"
+" wbudowanych poleceń\n"
+" -P, --prefix-builtins dodanie zawsze `m4_' przed wszystkimi\n"
+" wbudowanymi poleceniami\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=WYR_REGUL użycie WYR_REGUL w składni nazw makr\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Parametry dynamicznego ładowania modułów:\n"
+" -m, --module-directory=KATALOG dodanie KATALOGU do ścieżki szukania modułów\n"
+" -M, --load-module=MODUŁ dynamiczne załadowanie modułu z M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Właściwości preprocesora:\n"
+" -I, --include=KATALOG szukanie includes w tym KATALOGU\n"
+" -D, --define=NAZWA[=WARTOŚĆ] wprowadzenie NAZWY z WARTOŚCIĄ lub pustą\n"
+" -U, --undefine=NAZWA skasowanie wbudowanej NAZWY\n"
+" -s, --synclines generowanie linii `#line NR \"PLIK\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Sterowanie ograniczeniami:\n"
+" -G, --traditional wyłączenie wszystkich rozszerzeń GNU\n"
+" -H, --hashzize=PIERWSZA ustawienie rozmiaru tablicy mieszającej dla symboli\n"
+" -L, --nesting-limit=LICZBA zmiania sztucznego limitu zagłębień\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Zamrożone pliki stanu:\n"
+" -F, --freeze-state=PLIK zapisanie zamrożonego PLIKU stanu na końcu\n"
+" -R, --reload-state=PLIK załadowanie zamrożonego PLIKU stanu na początku\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugowanie:\n"
+" -d, --debug=[FLAGI] ustawienie poziomu debugowania (bez FLAG: `aeg')\n"
+" -t, --trace=NAZWA śledzenie NAZWY, kiedy będzie zdefiniowana\n"
+" -l, --arglength=ILE ograniczenie rozmiaru śledzenia makr\n"
+" -o, --error-output=PLIK przekierowanie wyników debugowania i śledzenia\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGI mogą być następujące:\n"
+" t śledzenie wszystkich wywołań makr, nie tylko tych z traceon\n"
+" a pokazanie właściwych argumentów\n"
+" e pokazanie rozwinięcia\n"
+" q zabezpieczenie znaków specjalnych, z flagą a lub e\n"
+" c pokazanie przez zebraniem, po zebraniu i po wywołaniu\n"
+" x dodanie unikalnego identyfikatora wywołania makra, pożyteczne z flagą c\n"
+" f podanie nazwy bieżącego pliku wejściowego\n"
+" l podanie numeru bieżącej linii\n"
+" p pokazanie wyników przeszukiwań ścieżek\n"
+" i pokazanie zmian w plikach wejściowych\n"
+" V skrót do wszystkich powyższych flag\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jeżeli brak PLIKu lub PLIK to `-', czytane jest std. wejście.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raporty o błędach wysyłaj do bug-m4@gnu.org.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Błędne flagi debugowania: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "BŁĄD: nie udało się dodać katalogu do przeszukiwania `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "BŁĄD: nie udało się dodać katalogu do przeszukiwania `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opcje:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny kod w odłożonych argumentach"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ tokena w expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "BŁĄD: EOF w liście argumentów"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ tokena w expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny symbol w call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "BŁĄD: Osiągnięty limit rekursji %d, użyj -L<N> żeby go zmienić"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "BŁĄD: nie można zainicjalizować modułu: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "BŁĄD: nie można znaleźć modułu `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "BŁĄD: nie można znaleźć modułu `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "BŁĄD: nie można zamknąć modułów"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "BŁĄD: nie można zamknąć modułu: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "BŁĄD: nie można zamknąć modułu `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "BŁĄD: nie można zamknąć modułu `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "BŁĄD: Nie mogę utworzyć plików tymczasowych dla przetwarzania"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "BŁĄD: Nie mogę zapisać zmian przetwarzania do pliku tymczasowego"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "BŁĄD: Kopiowanie włożonego pliku"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "BŁĄD: Czytanie włożonego pliku"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Nie mogę zrobić stat na danych przetwarzanych"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Za duża zmiana"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Przeszukanie ścieżki dla `%s' znalazło `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "przekroczony limit VMEM\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Wykryto pogwałcenie ograniczeń adresów pamięci (SIGSEGV). Albo doszło do\n"
+"przepełnienia stosu albo jest błąd w "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Sprawdź czy nie doszło do nieskończonej rekursji.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "BŁĄD WEWNĘTRZNY: Nielegalny tryb w symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nazwa `%s' jest nieznana\n"
diff --git a/po/.reference/pl.s1 b/po/.reference/pl.s1
new file mode 100644
index 00000000..78606f8f
--- /dev/null
+++ b/po/.reference/pl.s1
@@ -0,0 +1 @@
+c413a023c36da699989408cbd8047dfbefe38451 -
diff --git a/po/.reference/pt_BR.po b/po/.reference/pt_BR.po
new file mode 100644
index 00000000..bfd151f2
--- /dev/null
+++ b/po/.reference/pt_BR.po
@@ -0,0 +1,663 @@
+# m4: translation to Brazilian Portuguese (pt_BR)
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002.
+# based on the translation to Galician (gl) by
+# Jacobo Tarrio <jtarrio@iname.com>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-07-24 17:25-0300\n"
+"Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n"
+"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: a opo `%s' ambgua\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: a opo `--%s' no admite um argumento\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: a opo `%c%s' no admite um argumento\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: a opo `%s' exige um argumento\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opo `--%s' desconhecida\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opo `%c%s' desconhecida\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opo ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opo invlida -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: a opo precisa de um argumento -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: a opo `-W %s' ambgua\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: a opo `-W %s' no admite um argumento\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memria esgotada"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Sucesso"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "No casa nada"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expreso regular invlida"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Caractere de ordenamento invlido"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nome de classe de caracteres invlido"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barra invertida no final da linha"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referncia para trs invlida"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ sem correspondncia"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( sem correspondncia"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ sem correspondncia"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contedo de \\{\\} invlido"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Fim de faixa invlido"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memria esgotada"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresso regular precedente invlida"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fim prematuro da expresso regular"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresso regular grande demais"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) sem correspondncia"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "No h uma expresso regular anterior"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Aviso: Faltam argumentos para o `%s' predefinido"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Aviso: Os argumentos demais para o `%s' predefinido foram ignorados"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "argumento no-numrico para o `%s' predefinido"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no token em define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nome %s no definido"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no token em m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nome `%s' no definido"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorreto em m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Impossvel abrir um pipe para o comando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "A base est fora dos limites em eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Largura negativa para eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argumento no-numrico para %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Impossvel endireitar %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cdigo de sintaxe %c no definido"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Impossvel abrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: sinalizadores de depurao incorretos: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Impossvel definir arquivo de erros: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVISO: \\0 ir desaparecer, use \\& no seu lugar nas substituies"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresso regular `%s' incorreta: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erro ao comparar expresso regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no elemento (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresso incorreta em eval (falta o parntese dereito): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresso incorreta em eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresso incorreta em eval (entrada incorreta): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresso incorreta em eval (entrada excessiva): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Diviso por zero em eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Resto da diviso por zero em eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERRO INTERNO: Cdigo de erro incorreto em evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERRO INTERNO: Operador de comparao incorreto em cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERRO INTERNO: Operador de desprazamento incorreto em shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERRO INTERNO: Operador incorreto em mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no elemento em freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Era esperado um salto de linha no arquivo congelado"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Era esperado o caractere `%c' no arquivo congelado"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "arquivo congelado mal formatado"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fim prematuro do arquivo congelado"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' do arquivo congelado no encontrado na tabela de predefinidas!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "A entrada reverteu para %s, linha %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Ler a entrada de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERRO INTERNO: push_string recursivo!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERRO INTERNO: Chamada incorreta a init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERRO INTERNO: Erro na pilha de entrada em next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERRO INTERNO: Erro na pilha de entrada em peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NENHUM"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERRO: Fim de arquivo na string"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERRO: Transbordamento da pilha. (Recurso infinita de defines?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Tente `%s --help' para obter mais informaes.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Uso: %s [opo]... [arquivo]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Os argumentos obrigatrios ou opcionais nas opes longas so tambm\n"
+"obrigatrios ou opcionais nas opes curtas.\n"
+"\n"
+"Modos de funcionamento:\n"
+" --help exibe esta ajuda e sai\n"
+" --version mostra informaes de verso e sai\n"
+" -e, --interactive sada sem buffer, ignora as interrupes\n"
+" -E, --fatal-warnings pra a execuo depois do primeiro aviso\n"
+" -Q, --quiet, --silent suprime alguns avisos das predefinidas\n"
+" -P, --prefix-builtins fora um prefixo `m4_' em todas as predefinidas\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP usa REGEXP para a sintaxe dos nomes das macros\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Caractersticas de carga dinmica:\n"
+" -m, --module-directory=DIRETORIO adiciona DIRETORIO rota de busca\n"
+" de mdulos\n"
+" -M, --load-module=MDULO carrega MDULO dinmico de M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Caractersticas do preprocesador:\n"
+" -I, --include=DIRETORIO procura depois neste DIRETORIO por arquivos\n"
+" a incluir\n"
+" -D, --define=NOME[=VALOR] define NOME contendo o VALOR, ou vazio\n"
+" -U, --undefine=NOME apaga a predefinida NOME\n"
+" -s, --synclines gera linhas `#line NUM \"arquivo\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control de lmites:\n"
+" -G, --traditional suprime todas as extenses GNU\n"
+" -H, --hashsize=PRIMO estabelece o tamanho da tabela hash de smbolos\n"
+" -L, --nesting-limit=NMERO muda limite artificial de aninhamento\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Ficheiros de estado congelado:\n"
+" -F, --freeze-state=ARQ produz um estado congelado em ARQ no final\n"
+" -R, --reload-state=ARQ recarrega um estado congelado de ARQ no incio\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"depurao:\n"
+" -d, --debug=[opes] estabelece o nvel de depurao (no indicar\n"
+" opes implica em `aeq')\n"
+" -t, --trace=NOME rastreia NOME quando ele ser definido\n"
+" -l, --arglength=NM restringe tamanho do rastreamento das macros\n"
+" -o, --error-output=arquivo redireciona a sada de depurao e rastreamento\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"opes uma de:\n"
+" t rastreamento de todas as chamadas de macro, no s das que tenhan traceon\n"
+" a mostra os argumentos reais\n"
+" e mostra a expanso\n"
+" q cita o valores quando seja preciso, com as opes a ou e\n"
+" c mostra antes da obtenco, depois da obteno e depois da chamada\n"
+" x adiciona um identificador nico de chamada macro, til com a opo c\n"
+" f diz nome do arquivo de entrada atual\n"
+" l diz nmero da linha de entrada atual\n"
+" p mostra o resultados das buscas nas rotas\n"
+" i mostra mudanas nos arquivos de entrada\n"
+" V forma curta para todas as opes acima\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Se no for indicado um ARQUIVO ou se o ARQUIVO `-', a entrada padro usada.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Informe os erros para <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Opes de depurao incorretas: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERRO: impossvel adicionar diretrio de busca `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERRO: impossvel adicionar diretrio de busca `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opes:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERRO INTERNO: Cdigo incorreto nos argumentos pospostos"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERRO INTERNO: Tipo de token incorreto em expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERRO: Fim de arquivo na lista de argumentos"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorreto em expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorreto em call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERRO: Limite de %d recurses excedido, use -L<N> para mud-lo"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERRO: impossvel inicializar mdulos: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERRO: impossvel encontrar mdulo: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERRO: impossvel encontrar mdulo: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERRO: impossvel fechar mdulos"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERRO: impossvel fechar mdulos: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERRO: impossvel fechar mdulo: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERRO: impossvel fechar mdulo: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERRO: Impossvel criar um arquivo temporrio para o desvio"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERRO: Impossvel descarregar desvio para um arquivo temporrio"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERRO: Copiando o arquivo inserido"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERRO: Lendo o arquivo inserido"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Impossvel fazer uma operao de stat sobre um desvio"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Desvio grande demais"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "A busca de caminhos por `%s' encontrou `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limite de VMEM excedido?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violao dos limites de memria detectada (SIGSEGV). Ou ocorreu um\n"
+"transbordamento de pilha, ou h um bug em "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Procure por uma possvel recurso infinita.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERRO INTERNO: Modo ilegal para symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "O nome `%s' desconhecido\n"
diff --git a/po/.reference/pt_BR.s1 b/po/.reference/pt_BR.s1
new file mode 100644
index 00000000..0519f035
--- /dev/null
+++ b/po/.reference/pt_BR.s1
@@ -0,0 +1 @@
+6f1507e708f5c26412d93e60e24b6a4000a9924f -
diff --git a/po/.reference/ro.po b/po/.reference/ro.po
new file mode 100644
index 00000000..b4e7948b
--- /dev/null
+++ b/po/.reference/ro.po
@@ -0,0 +1,660 @@
+# Mesajele n limba romn pentru m4.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Acest fiier este distribuit sub aceeai licen ca i pachetul m4.
+# Laurentiu Buzdugan <buzdugan@voyager.net>, 2003.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2003-04-26 18:00-05\n"
+"Last-Translator: Laurentiu Buzdugan <buzdugan@voyager.net>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opiunea `%s' este ambigu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opiunea `--%s' nu permite un argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opiunea `%c%s' nu permite un argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opiunea `%s' necesit un argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opiune nerecunoscut `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opiune nerecunoscut `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opiune ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opiune ilegal -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opiunea necesit un argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opiunea `-W %s' este ambigu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opiunea `-W %s' nu permite un argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "Memorie epuizat"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succes"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Nici o potrivire"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expresie regular incorect"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Colatare de caractere incorect"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nume de clas de caractere incorect"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Backslash n coad"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referin napoi incorect"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ sau [^ fr pereche"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( sau \\( fr pereche"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ fr pereche"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Coninut incorect pentru \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Sfrit de interval incorect"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memorie epuizat"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresie regular precedent incorect"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Sfrit prematur al expresiei regulare"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresie regular prea mare"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") sau \\) fr pereche"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Nici o expresie regular anterioar"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Avertisment: Prea puine argumente pentru built-in `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Avertisment: Argumente n exces pentru built-in `%s' ignorate"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argumen non-numeric pentru `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "EROARE INTERN: Tip dat token incorect n define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nume nedefinit %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "EROARE INTERN: Builtin nu a fost gsit n tabelul builtin!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "EROARE INTERN: Tip dat token incorect n m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nume nedefinit `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "EROARE INTERN: Tip simbol incorect n m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Nu pot deschide pipe ctre comanda `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Radix (baz, rdcin) n eval n afara intervalului (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Lime negativ pentru eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argument non-numeric pentru %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Nu pot de-abate %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cod sintax nedefinit %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Nu pot deschide %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Moddepanare: flag-uri depanare incorecte: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Nu pot seta eroare fiier: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVERTISMENT: \\0 va dispare, folosii n schimb \\& n nlocuiri"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresie regular incorect `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Eroare potrivire expresie regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "EROARE INTERN: Builtin nu a fost gsit n tabelul builtin! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "EROARE INTERN: Tip dat token incorect (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresie incorect n eval (lipsete paranteza din dreapta): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresie incorect n eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresie incorect n eval (intrare incorect): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresie incorect n eval (prea multe intrri): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "mprire cu zero n eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo cu zero n eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "EROARE INTERN: Cod eroare incorect n evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "EROARE INTERN: Operator comparaie incorect n cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "EROARE INTERN: Operator shift incorect n shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "EROARE INTERN: Operator incorect n mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "EROARE INTERN: Built-in nu a fost gsit n tabelul builtin!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "EROARE INTERN: Tip dat token incorect n freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Atept line feed n fiier blocat"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Atept caracter `%c' n fiier blocat"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fiier blocat formatat incorect"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Sfrit prematur de fiier blocat"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' din fiier blocat nu a fost gsit n tabelul builtin!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Intrare reschimbat ca %s, linia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Intrare citit de la %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "EROARE INTERN: push_string recursiv!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "EROARE INTERN: Apel incorect al funciei init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "EROARE INTERN: Stiv intrare resolit n next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "EROARE INTERN: Stiv intrare rasolit n peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NIMIC"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "EROARE: EOF n ir"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "EROARE: Depire de stiv. (definire recursiv infinit?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "ncercai `%s --help' pentru informaii suplimentare.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Folosire: %s [OPIUNE]... FIIER...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumentele obligatorii sau opionale pentru opiunile lungi sunt obligatorii sau opionale i pentru opiunile scurte.\n"
+"\n"
+"Moduri operare:\n"
+" --help afieaz acest mesaj i termin\n"
+" --version afieaz informaie despre versiune i termin\n"
+" -e, --interactive ieire fr buffer, ignor ntreruperi\n"
+" -E, --fatal-warnings oprete execuia dup primul avertisment\n"
+" -Q, --quiet, --silent elimin cteva avertismente pentru builtins\n"
+" -P, --prefix-builtins foreaz un prefix `m4_' pentru toate builtins\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP folosete REGEXP pentru sintax nume macro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Capabiliti ncrcare dinamic:\n"
+" -m, --module-directory=DIRECTOR adaug DIRECTOR la calea de cutare module\n"
+" -M, --load-module=MODUL ncarc dinamic MODUL din M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Capabiliti preprocesor:\n"
+" -I, --include=DIRECTOR caut i acest director pentru includeri\n"
+" -D, --define=NUME[=VALOARE] NUME definit ca avnd VALOARE, sau gol\n"
+" -U, --undefine=NUME terge builtin NUME\n"
+" -s, --synclines genereaz `#linie NO \"FIIER\"' linii\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control limite:\n"
+" -G, --traditional elimin toate extensiile GNU\n"
+" -H, --hashsize=PRIM seteaz dimensiunea tabel de cutare simboluri\n"
+" -L, --nesting-limit=NUMR schimb limita artificial de ncuibare\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fiiere stare blocat:\n"
+" -F, --freeze-state=FIIER creaz o stare blocat n FIIER la sfrit\n"
+" -R, --reload-state=FIIER rencarc o stare blocat din FIIER la nceput\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Depanare:\n"
+" -d, --debug=[FLAGS] seteaz nivel depanare (nici un FLAG implic `aeq')\n"
+" -t, --trace=NUME urmrete NUME cnd va fi definit\n"
+" -l, --arglength=NUM restricioneaz dimensiune macro urmrire\n"
+" -o, --error-output=FIIER redirecteaz ieire depanare i urmrire\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS este oricare din:\n"
+" t urmrete orice apel macro, nu numai cele activate ca urmrite\n"
+" a arat argumentele curente\n"
+" e arat expansiune\n"
+" q pune ghilimele pentru valori, unde necesar, cu un flag a sau e\n"
+" c arat nainte de colectare, dup colectare i dup apel\n"
+" x adaug un id de apel unic pentru macro, util cu flag-ul c\n"
+" f afieaz numele fiierului de intrare curent\n"
+" l afieaz numrul liniei de intrare curente\n"
+" p afieaz rezultatele cautrilor n ci (paths)\n"
+" i afieaz schimbrile n fiierele de intrare\n"
+" V scurttur pentru toate flag-urile de deasupra\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Dac nici un FIIER sau dac FIIER este `-', este citit intrarea standard.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raportai bug-uri la <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Flag-uri depanare incorecte: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "EROARE: nu am reuit s adaug director cutare `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "EROARE: nu am reuit s adaug director cutare `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opiuni:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "EROARE INTERN: Cod incorect n argumente amnate"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "EROARE INTERN: Tip token incorect n expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "EROARE: EOF n list argumente"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "EROARE INTERN: tip token incorect n expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "EROARE INTERN: tip simbol incorect n call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "EROARE: Limita de %d chemri recursive depit, folosii -L<N> pentru a o schimba"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "EROARE: am euat s iniializez modulele: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "EROARE: nu pot gsi modulul: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "EROARE: nu pot gsi modulul: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "EROARE: nu pot nchide modulul"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "EROARE: nu pot nchide modulul: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "EROARE: nu pot nchide modulul: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "EROARE: nu pot nchide modulul: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "EROARE: Nu pot crea fiier temporar pentru diversiune"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "EROARE: Nu pot flush diversiunea n fiier temporar"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "EROARE: Copiez fiier inserat"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "EROARE: Citesc fiier inserat"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Nu pot afla statistici despre diversiune"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversiune prea mare"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Cale cutare pentru `%s' a gsit `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limit VMEM depit?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violare limit memorie detectat (SIGSEGV). Fie a avut loc o depire\n"
+"de stiv, fie exist un bug n "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Verificai pentru o eventual recursivitate infinit.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "EROARE INTERN: Mod ilegal pentru symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nume `%s' este necunoscut\n"
diff --git a/po/.reference/ro.s1 b/po/.reference/ro.s1
new file mode 100644
index 00000000..61b7cdc1
--- /dev/null
+++ b/po/.reference/ro.s1
@@ -0,0 +1 @@
+d8b3f86dadf7ca1912edbc561a60ec0a1f937d9d -
diff --git a/po/.reference/ru.po b/po/.reference/ru.po
new file mode 100644
index 00000000..de5b222f
--- /dev/null
+++ b/po/.reference/ru.po
@@ -0,0 +1,650 @@
+# m4-1.4n
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Denis Perchine <dyp@perchine.com>, 1997, 1998, 1999, 2000, 2001, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-01-07 20:32GMT+06\n"
+"Last-Translator: Denis Perchine <dyp@perchine.com>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=KOI8-R\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: `%s' \n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: `--%s' \n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: `%c%s' \n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: `%s' \n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: `-W %s' \n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: `-W %s' \n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr " "
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr ""
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr " "
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr " "
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr " "
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr " "
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr " "
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr " "
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr " [ [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr " ( \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr " \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr " \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr " "
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr " "
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr " "
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr " "
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr " "
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr " ) \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr " "
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr ": '%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr ": '%s' "
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr " '%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr " : define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr " %s "
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr " : !"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr " : m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr " `%s' "
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr " : m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr " '%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr " (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr " "
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr " %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr " %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr " %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr " %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr " : : '%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr " %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr ": \\0 , \\& "
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr " : '%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr " '%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr " : ! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr " : (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr " (bad input): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr " (excess input): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr " : evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr " : cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr " : shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr " : mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr " : !"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr " : freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr " - "
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr " '%c' - "
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr " - "
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr " - "
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "'%s' - !"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr " %s , %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr " %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr " : push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr " : init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr " : next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr " : peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr ""
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr ": "
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr ": . ( ?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr " '%s --help' .\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr ": %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+" \n"
+"\n"
+" :\n"
+" --help \n"
+" --version \n"
+" -e, --interactive , \n"
+" -E, --fatal-warnings \n"
+" -Q, --quiet, --silent \n"
+" -P, --prefix-builtins `m4_' \n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP REGEXP \n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+" :\n"
+" -m, --module-directory=DIRECTORY DIRECTORY \n"
+" -M, --load-module=MODULE MODULE M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+" :\n"
+" -I, --include=DIRECTORY \n"
+" -D, --define=NAME[=VALUE] , NAME VALUE, \n"
+" -U, --undefine=NAME NAME\n"
+" -s, --synclines `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+":\n"
+" -G, --traditional GNU \n"
+" -H, --hashsize=PRIME - \n"
+" -L, --nesting-limit=NUMBER \n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+" :\n"
+" -F, --freeze-state=FILE FILE\n"
+" -R, --reload-state=FILE FILE\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+":\n"
+" -d, --debug=[FLAGS] ( FLAGS=`aeq')\n"
+" -t, --trace=NAME NAME \n"
+" -l, --arglength=NUM \n"
+" -o, --error-output=FILE FILE\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS is any of:\n"
+" t \n"
+" a \n"
+" e \n"
+" q , a e \n"
+" c , \n"
+" x , c\n"
+" f \n"
+" l \n"
+" p \n"
+" i \n"
+" V \n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\n FILE FILE `-', .\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\n <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr " : '%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr ": `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr ": `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr " : "
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr " : expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr ": "
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr " : expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr " : call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ": %d , -L<N> "
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr ": %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr ": `%s' "
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr ": `%s' : %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr ": "
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr ": : %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr ": : `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr ": : `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr ": "
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr ": "
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr ": "
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr ": "
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr " "
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr " "
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr " ?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+" (SIGSEGV). \n"
+" "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". .\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr " : symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr " `%s' \n"
diff --git a/po/.reference/ru.s1 b/po/.reference/ru.s1
new file mode 100644
index 00000000..e985af0e
--- /dev/null
+++ b/po/.reference/ru.s1
@@ -0,0 +1 @@
+71deab0958846aeefd46d5c0e6e17fb162e73a75 -
diff --git a/po/.reference/sv.po b/po/.reference/sv.po
new file mode 100644
index 00000000..b30551bb
--- /dev/null
+++ b/po/.reference/sv.po
@@ -0,0 +1,661 @@
+# Swedish messages for m4
+# Copyright 1999, 2001 Free Software Foundation, Inc.
+# Jan Djrv <Jan.Djarv@mbox200.swipnet.se>, 1999, 2001
+# Revision: 1.13
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-08-21 21:51+0200\n"
+"Last-Translator: Jan Djrv <Jan.Djarv@mbox200.swipnet.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: flaggan \"%s\" r tvetydig\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"--%s\" tar inget argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: flaggan \"%s\" behver ett argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: oknd flagga \"--%s\"\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: oknd flagga \"%c%s\"\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: otillten flagga -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ogiltig flagga -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flaggan behver ett argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: flaggan \"-W %s\" r tvetydig\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"-W %s\" tar inget argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "minnet slut"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Lyckat"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Ingen trff"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ogiltigt reguljruttryck"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ogiltigt kollationeringstecken"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ogiltigt teckenklassnamn"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Avslutande omvnt snedstreck"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ogiltig baktreferens"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Obalanserade [ eller [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Obalanserade ( eller \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Obalanserad \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ogiltigt innehll i \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ogiltigt intervallslut"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Minnet slut"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ogiltigt fregende reguljruttryck"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fr tidigt slut p reguljruttryck"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Reguljruttrycket r fr stort"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Obalanserade ) eller \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Inget fregende reguljruttryck"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varning: Fr f argument till inbyggt makro \"%s\""
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varning: verskottsargument till inbyggt makro \"%s\" ignorerade"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Ickenumeriskt argument till inbyggt makro \"%s\""
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Odefinierat namn \"%s\""
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Odefinierat namn \"%s\""
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERNT FEL: Otillten symboltyp i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan inte skapa rr till kommandot \"%s\""
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Otillten bas i \"eval\" (bas = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negativ bredd till \"eval\""
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Ickenumeriskt argument till %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan inte terleda %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Odefinierad syntaxkod %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan inte ppna %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Felskningslge: oknd flagga: \"%s\""
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan inte stta felutskriftsfil: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VARNING: \\0 kommer att frsvinna, anvnd \\& istllet i ersttningar"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Otilltet reguljruttryck \"%s\": %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fel nr reguljruttrycket \"%s\" matchades"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Otilltet uttryck i \"eval\" (hgerparentes saknas): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Otilltet uttryck i \"eval\": %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Otilltet uttryck i \"eval\" (otilltet indata): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Otilltet uttryck i \"eval\" (fr mycket indata): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division med noll i \"eval\": %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo med noll i \"eval\": %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERNT FEL: Otillten felkod i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERNT FEL: Otillten jmfrelseoperator i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERNT FEL: Otillten skiftoperator i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERNT FEL: Otillten operator i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Nyrad frvntas i fryst fil"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Tecknet \"%c\" frvntas i fryst fil"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Korrupt fryst fil"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fr tidigt filslut i fryst fil"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "\"%s\" frn fryst fil hittades inte i tabellen fr inbyggda makron!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Indata tergr till %s, rad %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Indata lses frn %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERNT FEL: Rekursiv push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERNT FEL: Otilltet anrop till init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERNT FEL: Instacken havererade i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNT FEL: Instacken havererade i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "INGET"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEL: Filslut i strng"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEL: Stacken fldar ver. (Ondlig definitionsrekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Frsk med \"%s --help\" fr mer information.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Anvndning: %s [FLAGGA]... [FIL]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Obligatoriska respektive valfria argument fr lnga flaggor r\n"
+"obligatoriska respektive valfria ven fr korta.\n"
+"\n"
+"Krlgen:\n"
+" --help visa denna hjlptext och avsluta\n"
+" --version visa versionsinformation och avsluta\n"
+" -e, --interactive obuffrad utskrift, ignorera avbrott\n"
+" -E, --fatal-warnings avsluta exekvering efter frsta varningen\n"
+" -Q, --quiet, --silent undertryck vissa varningar om inbyggda makron\n"
+" -P, --prefix-builtins alla inbyggda makron brjar med `m4_'\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP anvnd REGEXP som makronamnsyntax\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisk laddning:\n"
+" -m, --module-directory=KATALOG sk moduler ven i KATALOG\n"
+" -M, --load-module=MODUL ladda MODUL frn M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Frprocessorstyrning:\n"
+" -I, --include=KATALOG sk i katalog efter inkluderade filer\n"
+" -D, --define=NAMN[=VRDE] definiera NAMN som VRDE, eller tomt\n"
+" -U, --undefine=NAMN ta bort inbyggt makro\n"
+" -s, --synclines generera rader med '#line NNN \"FIL\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Begrnsningskontroll:\n"
+" -G, --traditional undertryck alla extra GNU-tillgg\n"
+" -H, --hashsize=PRIMTAL stt storlek p symboltabellen\n"
+" -L, --nesting-limit=ANTAL ndra artificiell nstningsniv\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Frysta tillstndsfiler:\n"
+" -F, --freeze-state=FIL spara fryst tillstnd i FIL vid avslut\n"
+" -R, --reload-state=FIL ls fryst tillstnd frn FIL vid start\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Felskning:\n"
+" -d, --debug=[FLAGGOR] stt felskningsniv\n"
+" (inga FLAGGOR tolkas som \"aeq\")\n"
+" -t, --trace=NAMN spra NAMN nr den blir definierad\n"
+" -l, --arglength=ANTAL begrnsa makrosprningsstorleken\n"
+" -o, --error-output=FIL avled felsknings- och sprutskrifter till FIL\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGGOR kan vara en eller flera av:\n"
+" t spra alla makroanrop, inte bara de som spras med \"traceon\"\n"
+" a visa aktuella argument\n"
+" e visa expansioner\n"
+" q stt citationstecken dr det behvs, gller \"a\" och \"e\"\n"
+" c visa fre insamling, efter insamling och efter anrop\n"
+" x lgg till en unik identifierare fr makroanrop, anvndbart med \"c\"\n"
+" f visa namnet p aktuell infil\n"
+" l visa raden i aktuell infil\n"
+" p visa resultatet av skvgsskningar\n"
+" i visa byten av infil\n"
+" V frkortning fr alla ovanstende flaggor\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nOm ingen FIL anges eller om FIL r `-', s lses standard in.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapportera fel till <bug-m4@gnu.org>.\n"
+"Rapportera fel p versttningen till <sv@li.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Oknd felskningsflagga \"%s\""
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEL: misslyckades med att lgga till skkatalog \"%s\""
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEL: misslyckades med att lgga till skkatalog \"%s\": %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tillgg:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERNT FEL: Otillten kod i argument"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEL: Filslut i argumentlistan"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERNT FEL: Otillten symboltyp i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEL: Rekursionsgrns %d verskriden, anvnd -L<N> fr att ndra"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEL: misslyckades med att initiera moduler: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEL: kan inte hitta modul: \"%s\""
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEL: kan inte hitta modul: \"%s\": %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEL: kan inte stnga moduler"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEL: kan inte stnga moduler: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEL: kan inte stnga modul: \"%s\""
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEL: kan inte stnga modul: \"%s\": %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEL: Kan inte skapa temporr fil fr avledning"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEL: Kan inte skriva avledningen till temporr fil"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEL: Kopiering av insatt fil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEL: Lsning av insatt fil"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan inte ta status p avledningen"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Avledning fr stor"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "\"%s\" hittades som \"%s\" i skvgen"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Begrnsning fr VMEM verskriden?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Otillten referens utanfr minnesgrnserna har upptckts (SIGSEGV).\n"
+"Antingen fldade stacken ver eller s r det ett fel i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Kontrollera om ondlig rekursion frekommer.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERNT FEL: Otilltet lge till symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Namnet \"%s\" r oknt\n"
+
+msgid "Undefined macro `%s'"
+msgstr "Odefinierat makro \"%s\""
+
+msgid "Module search for `%s' found `%s'"
+msgstr "Modulskning fr \"%s\" hittade \"%s\""
diff --git a/po/.reference/sv.s1 b/po/.reference/sv.s1
new file mode 100644
index 00000000..80d91f80
--- /dev/null
+++ b/po/.reference/sv.s1
@@ -0,0 +1 @@
+f2f6180a5def6e0d794748ce32f7d430604d90b2 -
diff --git a/po/.reference/vi.po b/po/.reference/vi.po
new file mode 100644
index 00000000..845eefb7
--- /dev/null
+++ b/po/.reference/vi.po
@@ -0,0 +1,663 @@
+# Vietnamese Translation for m4-1.4o.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: <bug-m4@gnu.org>\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-02-11 20:51+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net> \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: tùy chọn `%s' mơ hồ\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `--%s' không cho phép đối số\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `%c%s' không cho phép đối số\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: tùy chọn `%s' cần đến đối số\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: không chấp nhận tùy chọn `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: không chấp nhận tùy chọn `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: không cho phép tùy chọn -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: tùy chọn không hợp lệ -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tùy chọn cần đến đối số -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: tùy chọn `-W %s' mơ hồ\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `-W %s' không cho phép đối số\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "hết bộ nhớ"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Thành công"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Không khớp với gì"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Biểu thức chính quy không hợp lệ"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ký tự đối hợp không hợp lệ"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Tên loại ký tự không hợp lệ"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Xuyệc ngược theo sau"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Tham chiếu quay lui không hợp lệ"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Chưa khớp ký tự [ hay [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Chưa khớp ký tự ( hay \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Chưa khớp ký tự \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} có nội bộ không hợp lệ"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Kết thức miền không hợp lệ"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Hết bộ nhớ"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Biểu thức chính quy đi trước không hợp lệ"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Biểu thức chính quy có kết thức quá sớm"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Biểu thức chính quy quá lớn"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Chưa khớp ký tự ) hay \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Không có biểu thức chính quy trước này"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Cảnh báo: quá ít đối số đối với `%s' có sẵn"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Cảnh báo: quá nhiều đối số đối với `%s' có sẵn bị bỏ qua"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Có đối số không thuộc số đối với `%s' có sẵn"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong define_macro () (định nghĩa bộ lệnh thay thế)"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Chưa định nghĩa tên %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "LỖI NỘI BỘ: Chưa tìm điều builtin trong bảng builtin (có sẵn)"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Chưa định nghĩa tên `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "LỖI NỘI BỘ: loại ký hiệu sai trong m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Không mở được đường ống đến lệnh `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Cơ số trong eval (việc tính để kiểm tra) ngoài miền (cơ số = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Eval (việc tính để kiểm tra) có độ dài âm"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s có đối số không thuộc số"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Không thể bỏ việc làm trệch hướng %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Chưa định nghĩa mã cú pháp %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Không mở được %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Chế độ gỡ lỗi: cờ gỡ lỗi sai: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Không lập được tập tin lỗi: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "CẢNH BÁO: \\0 sẽ biến mất nên hãy sử dụng \\& khi thay thế"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Biểu thức chính quy sai `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Gặp lỗi khi khớp với biểu thức chính quy `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "LỖI NỘI BỘ: Chưa tìm builtin (có sẵn) trong bảng builtin. (trace_pre ()) (tìm thấy dấu vết trước)"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai (trace_pre ()) (tìm thấy dấu vết trước)"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - thiếu ngoặc phải: %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - dữ liệu nhập sai: %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - quá nhiều dữ liệu nhập: %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Chia cho số không trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo cho số không trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "LỖI NỘI BỘ: mã lỗi sai trong evaluate () "
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "LỖI NỘI BỘ: toán tử so sánh sai trong cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "LỖI NỘI BỘ: toán tử sử dụng phím tăng tốc là sai trong shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "LỖI NỘI BỘ: toán tử sai trong mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "LỖI NỘI BỘ: chưa tìm built-in (có sẵn) trong bảng builtin"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong freeze_one_symbol () (đông lạnh một ky tự)"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ngờ ký tự ngắt dòng trong tập tin đông lạnh"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ngờ ký tự `%c' trong tập tin đông lạnh"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Tập tin đông lạnh có dạng khuyết tật"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Tập tin đông lạnh có kết thức quá sớm"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' từ tập tin đông lạnh chưa được tìm trong bảng builtin (có sẵn)"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Dữ liệu nhập trở lại %s, dòng %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Đã đọc dữ liệu nhập từ %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "LỖI NỘI BỘ: push-string (đẩy-chuỗi) đệ qui."
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "LỖI NỘI BỘ: việc gọi sai đến init_macro_token () (hiệu bàì bộ lệnh thay thế)"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "LỖI NỘI BỘ: lỗi ngăn xếp nhập (input stack) trong next_char () (ký tự tới)"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "LỖI NỘI BỘ: lỗi ngăn xếp nhập (input stack) trong peek_input () (hé nhìn nhâp)"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "Không có"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "LỖI: gặp kết thức tập tin trong chuỗi"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "LỖI: ngăn xếp bị tràn. (Đệ qui định nghĩa có vô hạn không?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Hãy thử lệnh `%s --help' để tìm thấy thông tin thêm.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Cách sử dụng: %s [TÙY_CHỌN]... [TẬP_TIN]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Tất cả đối số bắt buộc hay tùy chọn đối với tùy chọn dài cũng bắt buộc \n"
+"hay tùy chọn đối với tùy chọn ngắn\n"
+"\n"
+"Chế độ thi hành:\n"
+" --help hiển thị _trợ giúp_ này rồi thoát\n"
+" --version xuất thông tin _phiên bản_ rồi thoát\n"
+" -e, --interactive trừ dữ liệu xuất ra bộ đệm, bỏ qua các lệnh ngắt (_tương tác_)\n"
+" -E, --fatal-warnings thôi thi hành sau khi gặp _cảnh báo_ thứ nhất (_nghiêm trọng_)\n"
+" -Q, --quiet, --silent thu hồi một phần cảnh báo đối với builtin (có sẵn) (_im_)\n"
+" -P, --prefix-builtins buộc _tiền tố_ `m4_' đối với tất cả builtin (có sẵn)\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=BIỂU_THỨC_CHÍNH_QUY sử dụng biểu thức chính quy ấy đối với cú pháp tên bô lệnh thay thế\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Tính năng tải động:\n"
+" -m, --module-directory=THƯ_MỤC thêm thư mục ấy vào đường dẫn tìm kiếm mô-đun\n"
+" -M, --load-module=MÔ-ĐUN tải mô-đun động từ dường dẫn M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Tính năng tiền xử lý:\n"
+" -I, --include=THƯ_MỤC tìm kiếm tập tin include (bao gồm) trong thư mục này thứ hai\n"
+" -D, --define=TÊN[=TRỊ_SỐ] nhập tên ấy có trị số ấy hay là trống (_định nghĩa_)\n"
+" -U, --undefine=TÊN xóa bỏ builtin (có sẵn) tên ấy (_bỏ định nghĩa_)\n"
+" -s, --synclines tạo dòng loại `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Điều kiện giới hạn:\n"
+" -G, --traditional thu hồi tất cả trình mở rộng GNU (_truyền thống_)\n"
+" -H, --hashsize=SỐ_NGUYÊN_TỐ lập _cỡ_ bảng _băm_ tra cứu ký hiệu\n"
+" -L, --nesting-limit=SỐ thay đổi _giới hạn lồng nhau_ nhân tạo\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Tập tin tình trạng đông lạnh:\n"
+" -F, --freeze-state=TẬP_TIN _đông lạnh_ tập tin ấy khi xong (_tình trạng_)\n"
+" -R, --reload-state=TẬP_TIN _tải lại hình trạng_ đông lạnh từ tập tin ấy khi bắt đầu\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Gỡ lỗi:\n"
+" -d, --debug=[CỜ] lập mức gỡ lỗi (khi không có cờ thì ngụ ý `aeq')\n"
+" -t, --trace=TÊN tìm thấy _dấu vết_ tên ấy khi nó sẽ được định nghĩa\n"
+" -l, --arglength=SỐ hạn chế cỡ bộ lệnh thay thế (macro) tìm thấy dấu vết\n"
+"(_độ dài đối số_)\n"
+" -o, --error-output=TẬP_TIN chuyển hướng _xuất_ dữ liệu gỡ _lỗi_\n"
+"và tìm thấy dấu vết\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"Những CỜ có thể:\n"
+" t tìm thấy dấu vết tất cả việc gọi bô lệnh thay thế (macro),\n"
+"không chỉ loại traceon\n"
+" a hiển thị tất cả đối số thật\n"
+" e hiển thị dạng mở rộng\n"
+" q hiển thị trị số khi cần đến, với cờ a hay e\n"
+" c hiển thị trước khi tập hợp (collect), sau khi tập hợp và sau khi gọi\n"
+" x thêm điều nhận biết việc gọi bô lệnh thay thế (macro) độc nhất,\n"
+"có ích với cờ c\n"
+" f nói tên tập tin nhập hiện\n"
+" l nói số dòng nhập hiện\n"
+" p hiển thị kết quả của các việc tìm kiếm đường dẫn\n"
+" i hiển thị các sự thay đổi trong những tập tin nhập\n"
+" V lời tắt cho tất cả cờ ở trên\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Nếu không có tập tin, hay nếu tập tin là `-', thì đọc dữ liệu nhập chuẩn.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Hãy thông báo lỗi cho <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Cờ gỡ lỗi sai: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "LỖI: không thêm được thư mục tìm kiếm `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "LỖI: không thêm được thư mục tìm kiếm `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tùy chọn:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "LỖI NỘI BỘ: mã sai trong đối số trì hoãn"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "LỖI NỘI BỘ: loại hiệu bài sai trong expand_token () (mở rộng hiệu bài)"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "LỖI: gặp kêt thức tâp tin trong danh sách đối số"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "LỖI NỘI BỘ: loại hiệu bài sai trong expand_argument () (mở rộng đối số)"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "LỖI NỘI BỘ: loại ký hiệu sai trong call_macro () (gọi bộ lệnh thay thế)"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "LỖI: giới hạn %d bị vượt quá nên hãy sử dụng -L<N> để thay đổi nó"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "LỖI: không khởi động mô-đun được: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "LỖI: không tìm được mô-đun: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "LỖI: không tìm được mô-đun: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "LỖI: không đóng được mô-đun"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "LỖI: không đóng được mô-đun: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "LÔI: không đóng được mô-đun: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "LỖI: không đóng được mô-đun: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "LỖI: không tạo được tập tin tạm thời đối với sự trệch đi"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "LỖI: không chuyển hết sự trệch đi ra vào tập tin tạm thời"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "LỖI: sao chép tập tin đã chèn"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "LỖI: đọc tập tin đã chèn"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Không thể gọi tất cả thông tin về (stat) sự trệch đi"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Sự trệch đi quá lớn"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Việc tìm kiếm đường dẫn `%s' thì tìm `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Giới hạn VMEM bị vượt quá không?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Mới phát hiện việc vượt trội giới hạn bộ nhớ (SIGSEGV). \n"
+"Hoặc ngăn xếp bị tràn hoặc có lỗi trong"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Kiểm tra đệ qui vô hạn có thê.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "LỖI NỘI BỘ: không cho phép chế độ đối với symbol_lookup () (tra cứu ký hiệu)"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Chưa biết tên `%s'\n"
diff --git a/po/.reference/vi.s1 b/po/.reference/vi.s1
new file mode 100644
index 00000000..bbec1168
--- /dev/null
+++ b/po/.reference/vi.s1
@@ -0,0 +1 @@
+5eb279f0d754be7522caf1ceadd8c82443fbe62b -
diff --git a/po/.reference/zh_CN.po b/po/.reference/zh_CN.po
new file mode 100644
index 00000000..31869606
--- /dev/null
+++ b/po/.reference/zh_CN.po
@@ -0,0 +1,658 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Wang Li <charles@linux.net.cn>, 2003.
+# LI Daobing <lidaobing@gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2008-02-05 22:15+0800\n"
+"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s:选项“%s”有二义性\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s:选项“--%s”不接受参数\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s:选项“%c%s”不接受参数\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s:选项“%s”需要一个参数\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s:无法识别的选项“--%s”\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s:无法识别的选项“%c%s”\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s:非法的选项 -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s:无效的选项 -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s:选项需要一个参数 -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s:选项“-W %s”有二义性\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s:选项“-W %s”不接受参数\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "内存耗尽"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "无匹配"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "无效的正规表达式"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "无效的 collation 字符"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "无效的字符类名"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "末尾的反斜线"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "无效的向后引用"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "不匹配的 [ 或 [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "不匹配的 ( 或 \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "不匹配的 \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} 的内容无效"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "无效的范围结束"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "内存耗尽"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "无效的前置正规表达式"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "不完整的正规表达式"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正规表达式过大"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "不匹配的 ) 或 \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "没有上一个正规表达式"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告:内置宏“%s”的参数不足"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告:忽略过多的内置宏“%s”"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "内置宏“%s”的非数值参数"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "内部错误:define_marco () 中错误的标记数据类型"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "未定义的名称 %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "内部错误:在内置宏表中找不到内置宏!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "内部错误:m4_dumpdef () 中错误的标记数据类型"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "未定义的名称“%s”"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "内部错误:m4_defn () 中的错误符号类型"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "无法打开到命令“%s”的管道"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "求值中根超出范围 (根 = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "求值负宽度"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s 的非数值参数"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "无法反转换 %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "未定义的语法编码 %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "无法打开 %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "调试模式:错误的调试标志:“%s”"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "无法设置错误文件:%s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告:\\\\0 将消失,用 \\\\& 作为替代"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "错误的正规表达式“%s”:%s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "匹配正规表达式“%s”出错"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "内部错误:在内置宏表中找不到内置宏!(trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "内部错误:错误的标记数据类型 (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "求值错误的表达式 (缺少右括号):%s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "求值错误的表达式:%s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "求值错误的表达式 (错误的输入):%s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "求值错误的表达式 (过多的输入):%s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "求值中除零:%s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "求值中按零取模:%s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "内部错误:evaluate () 中错误的错误码"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "内部错误:cmp_term () 中错误的比较操作"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "内部错误:shift_term () 中错误的位移操作"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "内部错误:mult_term () 中错误的操作"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "内部错误:内置宏表中找不到内置宏!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "内部错误:freeze_one_symbol () 中错误的标记数据类型"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "在冻结文件中应为换行符"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "在冻结文件中应为字符“%c”"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "冻结文件的格式错误"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "不完整的冻结文件"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "在内置宏表中找不到来自冻结文件的“%s”!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "输入退回到 %s 的第 %d 行"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "从 %s 中读取输入"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "内部错误:递归地 push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "内部错误:错误地调用 init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "内部错误:next_char () 中输入栈出错"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "内部错误:peek_input () 中输入栈出错"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "无"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "错误:字符串中的 EOF"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "错误:栈溢出。(无穷的定义递归?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "试用“%s --help”以获取更多信息。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "用法:%s [选项]... [文件]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"必须给出或可选的长选项对应的短选项同样是必须给出或可选的。\n"
+"\n"
+"操作模式:\n"
+" --help 显示该求助信息并退出\n"
+" --version 输出版本信息并退出\n"
+" -e, --interactive 不缓冲输出,忽略中段\n"
+" -E, --fatal-warnings 在第一个警告后中止执行\n"
+" -Q, --quiet, --silent 关闭关于内置宏的某些警告\n"
+" -P, --prefix-builtins 为所有内置宏强制添加前缀“m4_”\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=正规表达式 将“正规表达式”作为宏名的语法\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"动态加载特征:\n"
+" -m, --module-directory=目录 将“目录”添加到模块搜索路径中\n"
+" -M, --load-module=模块 从路径 M4MODPATH 中装入“模块”\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"预处理器特征:\n"
+" -I, --include=目录 在此目录中搜索引入文件\n"
+" -D, --define=名字[=值] 将“名字”的值定义为“值”或空\n"
+" -U, --undefine=名字 删除内置宏“名字”\n"
+" -s, --synclines 生成 “#line NO \"FILE\"” 行\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"限止控制:\n"
+" -G, --traditional 关闭所有 GNU 扩展\n"
+" -H, --hashsize=PRIME 设置符号搜索杂凑表的大小\n"
+" -L, --nesting-limit=NUMBER 改变手工嵌套限制\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"冻结状态文件:\n"
+" -F, --freeze-state=文件 在结束时在“文件”中生成冻结状态\n"
+" -R, --reload-state=文件 在启动是从“文件”中重新装入冻结状态\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"调试:\n"
+" -d, --debug=[标志] 设定调试级别 (无“标志”表示“aeq”)\n"
+" -t, --trace=名字 在定义了“名字”的时候跟踪它\n"
+" -l, --arglength=长度 限止宏跟踪大小\n"
+" -o, --error-output=文件 重定向调试和跟踪输出\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"“标志”是以下字符之一:\n"
+" t 跟踪所有的宏调用,而不仅仅是标为要跟踪的宏\n"
+" a 显示实际的参数\n"
+" e 显示扩展\n"
+" q 带 a 或 e 标志,按需要引用值\n"
+" c 在收集之前、收集之后和调用之后显示\n"
+" x 添加一个唯一的宏调用标识,使用 c 标志时有用\n"
+" f 输出当前输入文件名\n"
+" l 输出当前输入行行号\n"
+" p 显示路径搜索结果\n"
+" i 显示输入文件中的变化\n"
+" V 所有以上标志的缩写\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"如果未给出“文件”或“文件”为“-”,就从标准输入中读。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"将错误报告到 <bug-m4@gnu.org>。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "错误的调试标志:“%s”"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "错误:添加搜索目录“%s”失败"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "错误:添加搜索目录“%s”失败:%s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (选项:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "内部错误:延迟参数中错误的代码"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "内部错误:expand_token () 中错误的标记类型"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "错误:参数列表中出现 EOF"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "内部错误:expand_argument () 中错误的标记类型"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "内部错误:call_macro () 中错误的符号类型"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "错误:超出递归上限 %d,使用 -L<N> 以改变此上限"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "错误:初始化模块失败:%s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "错误:无法找到模块:“%s”"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "错误:无法找到模块:“%s”:%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "错误:无法关闭模块"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "错误:无法关闭模块:%s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "错误:无法关闭模块:“%s”"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "错误:无法关闭模块:“%s”:%s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "错误:无法为转换创建临时文件"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "错误:无法将转换刷新到临时文件"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "错误:复制已插入的文件"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "错误:读取已插入的文件"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "无法获取转换的状态"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "转换过大"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "搜索“%s”的路径找到“%s”"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "超出 VMEM 限止?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"检测到内存超界 (SIGSEGV)。\n"
+"栈溢出或有 bug"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". 检查可能的无限递归。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "内部错误:symbol_lookup () 的非法模式"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "名字“%s”是未知的\n"
diff --git a/po/.reference/zh_CN.s1 b/po/.reference/zh_CN.s1
new file mode 100644
index 00000000..7fcab188
--- /dev/null
+++ b/po/.reference/zh_CN.s1
@@ -0,0 +1 @@
+b3f06e9023d5382381110df7c964ecbf8795a1c5 -
diff --git a/po/.reference/zh_TW.po b/po/.reference/zh_TW.po
new file mode 100644
index 00000000..742f153c
--- /dev/null
+++ b/po/.reference/zh_TW.po
@@ -0,0 +1,657 @@
+# Traditional Chinese Messages for m4
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-06-06 09:05+0800\n"
+"Last-Translator: Wei-Lun Chao <chaoweilun@pcmail.com.tw>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s:選項‘%s’不明確\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s:選項‘--%s’不可配合引數使用\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s:選項‘%c%s’不可配合引數使用\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s:選項‘%s’需要引數\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s:無法識別的選項‘--%s’\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s:無法識別的選項‘%c%s’\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s:不合法的選項 ─ %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s:無效的選項 ─ %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s:選項需要引數 ─ %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s:選項‘-W %s’不明確\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s:選項‘-W %s’不可配合引數使用\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "沒有符合的字串"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "無效的正規表示式"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "無效的 collation 字元"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "無效的字元種類名稱"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "末端有多餘的反斜號"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "無效的 back reference"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "沒有對應的 [ 或 [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "沒有對應的 ( 或 \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "沒有對應的 \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} 中的內容無效"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "範圍末端字元無效"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "之前的正規表示式無效"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "正規表示式過早結束"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正規表示式過長"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "沒有對應的 ) 或 \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "之前沒有任何正規表示式"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告:內建「%s」的引數太少"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告:內建「%s」的超額引數被忽略"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "提供了非數值引數給內建「%s」"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "內部錯誤:define_macro() 中不當的表徵資料型態"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "未定義的名稱 %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "內部錯誤:無法在內建表格中找到內建指令!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "內部錯誤:m4_dumpdef() 中不當的表徵資料型態"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "未定義的名稱「%s」"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "內部錯誤:m4_defn() 中不當的符號型態"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "無法開啟至命令「%s」 的管道."
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "求值時基數超出範圍 (基數 = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "求值寬度為負"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s 的引數非數值"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "無法反向轉移「%s」"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "未定義的語法碼 %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "無法開啟 %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "除錯模式:不當的除錯旗標:「%s」"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "無法設置錯誤檔案:%s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告:\\0 將會消失,請於置換時使用 \\& 代替"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "不當的正規表示式「%s」:%s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "對應正規表示式「%s」時出現錯誤"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "內部錯誤:無法在內建表格中找到內建指令!(trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "內部錯誤:不當的表徵資料型態 (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "求值時不當的表示式 (缺少右側括號):%s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "求值時不當的表示式:%s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "求值時不當的表示式 (不當的輸入):%s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "求值時不當的表示式 (超額的輸入):%s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "求值時被零除:%s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "求值時計算除以零的餘數:%s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "內部錯誤:evaluate () 中不當的錯誤碼"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "內部錯誤:cmp_term () 中不當的比較運算子"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "內部錯誤:shift_term () 中不當的位移運算子"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "內部錯誤:mult_term () 中不當的運算子"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "內部錯誤:內建表格中無法找到內建指令"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "內部錯誤:freeze_one_symbol () 中不當的表徵資料型態"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "在凍結的檔案中期待有換列字元"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "在凍結的檔案中期待有「%c」字元"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "不良格式的凍結檔案"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "凍結檔案突然結束"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "來自凍結檔案的「%s」無法在內建表格中找到!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "輸入還原到 %s,第 %d 列"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "輸入從 %s 讀取"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "內部錯誤:遞迴的 push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "內部錯誤:不當呼叫 init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "內部錯誤:next_char () 中難看的輸入堆疊"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "內部錯誤:peek_input () 中難看的輸入堆疊"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "錯誤:字串中有檔尾字元 (EOF)"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "錯誤:堆疊溢位。(無限的定義迴圈?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "請嘗試執行「%s --help」來獲取更多資訊。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "用法:%s [選項]... [檔案]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"對於長選項是必要的或是選擇性的引數,也同樣對於短選項是必要的或是選擇性的。\n"
+"\n"
+"作業模式:\n"
+" --help 顯示此輔助訊息並離開\n"
+" --version 輸出版本資訊並離開\n"
+" -e, --interactive 輸出不使用緩衝區,忽略插斷訊號\n"
+" -E, --fatal-warnings 在首次警告之後停止執行\n"
+" -Q, --quiet, --silent 抑制某些關於內建指令的警告\n"
+" -P, --prefix-builtins 強迫所有內建指令加上「m4_」前置文字\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP 使用 REGEXP 做為巨集名稱語法\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"動態載入特殊功能:\n"
+" -m, --module-directory=DIRECTORY 加入 DIRECTORY 至模組搜尋路徑\n"
+" -M, --load-module=MODULE 從 M4MODPATH 載入動態 MODULE\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"前置處理器特殊功能:\n"
+" -I, --include=DIRECTORY 搜尋此目錄做為含入的輔助\n"
+" -D, --define=NAME[=VALUE] 輸入的 NAME 具有 VALUE,或是空值\n"
+" -U, --undefine=NAME 刪除內建的 NAME\n"
+" -s, --synclines 產生「#line NO \"FILE\"」的列\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"限制控制:\n"
+" -G, --traditional 抑制所有 GNU 擴充功能\n"
+" -H, --hashsize=PRIME 設定符號查找雜湊表大小\n"
+" -L, --nesting-limit=NUMBER 改變人造巢狀迴圈限制\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"凍結狀態檔案:\n"
+" -F, --freeze-state=FILE 結束時於 FILE 產生凍結狀態\n"
+" -R, --reload-state=FILE 開始時從 FILE 重新載入凍結狀態\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"除錯:\n"
+" -d, --debug=[FLAGS] 設定除錯層級 (無 FLAGS 則表示「aeq」)\n"
+" -t, --trace=NAME 當 NAME 將會被定義時追蹤它\n"
+" -l, --arglength=NUM 限定巨集追蹤大小\n"
+" -o, --error-output=FILE 重新導向除錯與追蹤的輸出\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS 是下列任何組合:\n"
+" t 追蹤所有巨集呼叫,而非只有被標示追蹤者\n"
+" a 顯示實際引數\n"
+" e 顯示展開狀況\n"
+" q 必要時標示引數值,並加上旗標 a 或 e\n"
+" c 於收集之前、收集之後與呼叫之後顯示\n"
+" x 加上獨一的巨集呼叫識別號,常與旗標 c 同時使用\n"
+" f 指明目前輸入檔案名稱\n"
+" l 指明目前輸入列號\n"
+" p 顯示路徑搜尋結果\n"
+" i 顯示輸入檔案中的變更\n"
+" V 代表以上所有旗標的簡稱\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"如果沒有指定 FILE 或 FILE 是 -,則由標準輸入讀取資料。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"請向 <bug-m4@gnu.org> 回報錯誤。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "不當的除錯旗標:「%s」"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "錯誤:無法加入搜尋目錄「%s」"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "錯誤:無法加入搜尋目錄「%s」:%s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr "(選項:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "內部錯誤:延遲的引數中有不當的碼"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "內部錯誤:expand_token () 中有不當的表徵型態"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "錯誤:引數串列中出現檔案結尾(EOF)"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "內部錯誤:expand_argument () 中有不當的表徵型態"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "內部錯誤:call_macro () 中有不當的符號型態"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "錯誤:超出 %d 的遞迴限制,使用 -L<N> 來修正它"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "錯誤:模組啟始失敗:%s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "錯誤:無法找到模組:「%s」"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "錯誤:無法找到模組:「%s」:%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "錯誤:無法關閉模組"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "錯誤:無法關閉模組:%s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "錯誤:無法關閉模組:「%s」"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "錯誤:無法關閉模組:「%s」:%s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "錯誤:無法建立轉移用的暫時檔案"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "錯誤:無法清空轉移資料至暫時檔案"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "錯誤:複製已插入的檔案"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "錯誤:讀取已插入的檔案"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "無法顯示轉移狀態"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "轉移資料太大"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "對於「%s」的路徑搜尋找到「%s」"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "超過 VMEM 限制?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr "偵測到違反記憶體邊界 (SIGSEGV)。可能是發生堆疊溢出,或是有程式錯誤於 "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr "。檢查是否有可能的無限迴圈。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "內部錯誤:symbol_lookup () 的不正確模式"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "未知的名稱「%s」\n"
diff --git a/po/.reference/zh_TW.s1 b/po/.reference/zh_TW.s1
new file mode 100644
index 00000000..4a2a4f2b
--- /dev/null
+++ b/po/.reference/zh_TW.s1
@@ -0,0 +1 @@
+980822614630eaba74750f1b9a2280f8e022b1a0 -
diff --git a/po/LINGUAS b/po/LINGUAS
new file mode 100644
index 00000000..c1a230ed
--- /dev/null
+++ b/po/LINGUAS
@@ -0,0 +1,19 @@
+cs
+da
+de
+el
+fi
+fr
+ga
+gl
+id
+ja
+nl
+pl
+pt_BR
+ro
+ru
+sv
+vi
+zh_CN
+zh_TW
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
new file mode 100644
index 00000000..5022b8b1
--- /dev/null
+++ b/po/Makefile.in.in
@@ -0,0 +1,403 @@
+# Makefile for PO directory in any package using GNU gettext.
+# Copyright (C) 1995-1997, 2000-2006 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
+#
+# This file can be copied and used freely without restrictions. It can
+# be used in projects which are not available under the GNU General Public
+# License but which still want to provide support for the GNU gettext
+# functionality.
+# Please note that the actual code of GNU gettext is covered by the GNU
+# General Public License and is *not* in the public domain.
+#
+# Origin: gettext-0.16
+
+PACKAGE = @PACKAGE@
+VERSION = @VERSION@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+
+SHELL = /bin/sh
+@SET_MAKE@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+datarootdir = @datarootdir@
+datadir = @datadir@
+localedir = @localedir@
+gettextsrcdir = $(datadir)/gettext/po
+
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+
+# We use $(mkdir_p).
+# In automake <= 1.9.x, $(mkdir_p) is defined either as "mkdir -p --" or as
+# "$(mkinstalldirs)" or as "$(install_sh) -d". For these automake versions,
+# @install_sh@ does not start with $(SHELL), so we add it.
+# In automake >= 1.10, @mkdir_p@ is derived from ${MKDIR_P}, which is defined
+# either as "/path/to/mkdir -p" or ".../install-sh -c -d". For these automake
+# versions, $(mkinstalldirs) and $(install_sh) are unused.
+mkinstalldirs = $(SHELL) @install_sh@ -d
+install_sh = $(SHELL) @install_sh@
+MKDIR_P = @MKDIR_P@
+mkdir_p = @mkdir_p@
+
+GMSGFMT_ = @GMSGFMT@
+GMSGFMT_no = @GMSGFMT@
+GMSGFMT_yes = @GMSGFMT_015@
+GMSGFMT = $(GMSGFMT_$(USE_MSGCTXT))
+MSGFMT_ = @MSGFMT@
+MSGFMT_no = @MSGFMT@
+MSGFMT_yes = @MSGFMT_015@
+MSGFMT = $(MSGFMT_$(USE_MSGCTXT))
+XGETTEXT_ = @XGETTEXT@
+XGETTEXT_no = @XGETTEXT@
+XGETTEXT_yes = @XGETTEXT_015@
+XGETTEXT = $(XGETTEXT_$(USE_MSGCTXT))
+MSGMERGE = msgmerge
+MSGMERGE_UPDATE = @MSGMERGE@ --update
+MSGINIT = msginit
+MSGCONV = msgconv
+MSGFILTER = msgfilter
+
+POFILES = @POFILES@
+GMOFILES = @GMOFILES@
+UPDATEPOFILES = @UPDATEPOFILES@
+DUMMYPOFILES = @DUMMYPOFILES@
+DISTFILES.common = Makefile.in.in remove-potcdate.sin \
+$(DISTFILES.common.extra1) $(DISTFILES.common.extra2) $(DISTFILES.common.extra3)
+DISTFILES = $(DISTFILES.common) Makevars POTFILES.in \
+$(POFILES) $(GMOFILES) \
+$(DISTFILES.extra1) $(DISTFILES.extra2) $(DISTFILES.extra3)
+
+POTFILES = \
+
+CATALOGS = @CATALOGS@
+
+# Makevars gets inserted here. (Don't remove this line!)
+
+.SUFFIXES:
+.SUFFIXES: .po .gmo .mo .sed .sin .nop .po-create .po-update
+
+.po.mo:
+ @echo "$(MSGFMT) -c -o $@ $<"; \
+ $(MSGFMT) -c -o t-$@ $< && mv t-$@ $@
+
+.po.gmo:
+ @lang=`echo $* | sed -e 's,.*/,,'`; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \
+ cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo
+
+.sin.sed:
+ sed -e '/^#/d' $< > t-$@
+ mv t-$@ $@
+
+
+all: all-@USE_NLS@
+
+all-yes: stamp-po
+all-no:
+
+# $(srcdir)/$(DOMAIN).pot is only created when needed. When xgettext finds no
+# internationalized messages, no $(srcdir)/$(DOMAIN).pot is created (because
+# we don't want to bother translators with empty POT files). We assume that
+# LINGUAS is empty in this case, i.e. $(POFILES) and $(GMOFILES) are empty.
+# In this case, stamp-po is a nop (i.e. a phony target).
+
+# stamp-po is a timestamp denoting the last time at which the CATALOGS have
+# been loosely updated. Its purpose is that when a developer or translator
+# checks out the package via CVS, and the $(DOMAIN).pot file is not in CVS,
+# "make" will update the $(DOMAIN).pot and the $(CATALOGS), but subsequent
+# invocations of "make" will do nothing. This timestamp would not be necessary
+# if updating the $(CATALOGS) would always touch them; however, the rule for
+# $(POFILES) has been designed to not touch files that don't need to be
+# changed.
+stamp-po: $(srcdir)/$(DOMAIN).pot
+ test ! -f $(srcdir)/$(DOMAIN).pot || \
+ test -z "$(GMOFILES)" || $(MAKE) $(GMOFILES)
+ @test ! -f $(srcdir)/$(DOMAIN).pot || { \
+ echo "touch stamp-po" && \
+ echo timestamp > stamp-poT && \
+ mv stamp-poT stamp-po; \
+ }
+
+# Note: Target 'all' must not depend on target '$(DOMAIN).pot-update',
+# otherwise packages like GCC can not be built if only parts of the source
+# have been downloaded.
+
+# This target rebuilds $(DOMAIN).pot; it is an expensive operation.
+# Note that $(DOMAIN).pot is not touched if it doesn't need to be changed.
+$(DOMAIN).pot-update: $(POTFILES) $(srcdir)/POTFILES.in remove-potcdate.sed
+ if test -n '$(MSGID_BUGS_ADDRESS)' || test '$(PACKAGE_BUGREPORT)' = '@'PACKAGE_BUGREPORT'@'; then \
+ msgid_bugs_address='$(MSGID_BUGS_ADDRESS)'; \
+ else \
+ msgid_bugs_address='$(PACKAGE_BUGREPORT)'; \
+ fi; \
+ $(XGETTEXT) --default-domain=$(DOMAIN) --directory=$(top_srcdir) \
+ --add-comments=TRANSLATORS: $(XGETTEXT_OPTIONS) \
+ --files-from=$(srcdir)/POTFILES.in \
+ --copyright-holder='$(COPYRIGHT_HOLDER)' \
+ --msgid-bugs-address="$$msgid_bugs_address"
+ test ! -f $(DOMAIN).po || { \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ sed -f remove-potcdate.sed < $(srcdir)/$(DOMAIN).pot > $(DOMAIN).1po && \
+ sed -f remove-potcdate.sed < $(DOMAIN).po > $(DOMAIN).2po && \
+ if cmp $(DOMAIN).1po $(DOMAIN).2po >/dev/null 2>&1; then \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(DOMAIN).po; \
+ else \
+ rm -f $(DOMAIN).1po $(DOMAIN).2po $(srcdir)/$(DOMAIN).pot && \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ else \
+ mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+ fi; \
+ }
+
+# This rule has no dependencies: we don't need to update $(DOMAIN).pot at
+# every "make" invocation, only create it when it is missing.
+# Only "make $(DOMAIN).pot-update" or "make dist" will force an update.
+$(srcdir)/$(DOMAIN).pot:
+ $(MAKE) $(DOMAIN).pot-update
+
+# This target rebuilds a PO file if $(DOMAIN).pot has changed.
+# Note that a PO file is not touched if it doesn't need to be changed.
+$(POFILES): $(srcdir)/$(DOMAIN).pot
+ @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/$${lang}.po"; then \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ cd $(srcdir) && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi
+
+
+install: install-exec install-data
+install-exec:
+install-data: install-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ $(INSTALL_DATA) $(srcdir)/$$file \
+ $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ for file in Makevars; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+install-data-no: all
+install-data-yes: all
+ $(mkdir_p) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ if test -r $$cat; then realcat=$$cat; else realcat=$(srcdir)/$$cat; fi; \
+ $(INSTALL_DATA) $$realcat $(DESTDIR)$$dir/$(DOMAIN).mo; \
+ echo "installing $$realcat as $(DESTDIR)$$dir/$(DOMAIN).mo"; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ ln -s ../LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ ln $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo 2>/dev/null || \
+ cp -p $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(DOMAIN).mo $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ echo "installing $$realcat link as $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo"; \
+ fi; \
+ done; \
+ done
+
+install-strip: install
+
+installdirs: installdirs-exec installdirs-data
+installdirs-exec:
+installdirs-data: installdirs-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ $(mkdir_p) $(DESTDIR)$(gettextsrcdir); \
+ else \
+ : ; \
+ fi
+installdirs-data-no:
+installdirs-data-yes:
+ $(mkdir_p) $(DESTDIR)$(datadir)
+ @catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ dir=$(localedir)/$$lang/LC_MESSAGES; \
+ $(mkdir_p) $(DESTDIR)$$dir; \
+ for lc in '' $(EXTRA_LOCALE_CATEGORIES); do \
+ if test -n "$$lc"; then \
+ if (cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc 2>/dev/null) | grep ' -> ' >/dev/null; then \
+ link=`cd $(DESTDIR)$(localedir)/$$lang && LC_ALL=C ls -l -d $$lc | sed -e 's/^.* -> //'`; \
+ mv $(DESTDIR)$(localedir)/$$lang/$$lc $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ (cd $(DESTDIR)$(localedir)/$$lang/$$lc.old && \
+ for file in *; do \
+ if test -f $$file; then \
+ ln -s ../$$link/$$file $(DESTDIR)$(localedir)/$$lang/$$lc/$$file; \
+ fi; \
+ done); \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc.old; \
+ else \
+ if test -d $(DESTDIR)$(localedir)/$$lang/$$lc; then \
+ :; \
+ else \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ mkdir $(DESTDIR)$(localedir)/$$lang/$$lc; \
+ fi; \
+ fi; \
+ fi; \
+ done; \
+ done
+
+# Define this as empty until I found a useful application.
+installcheck:
+
+uninstall: uninstall-exec uninstall-data
+uninstall-exec:
+uninstall-data: uninstall-data-@USE_NLS@
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ for file in $(DISTFILES.common) Makevars.template; do \
+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
+ done; \
+ else \
+ : ; \
+ fi
+uninstall-data-no:
+uninstall-data-yes:
+ catalogs='$(CATALOGS)'; \
+ for cat in $$catalogs; do \
+ cat=`basename $$cat`; \
+ lang=`echo $$cat | sed -e 's/\.gmo$$//'`; \
+ for lc in LC_MESSAGES $(EXTRA_LOCALE_CATEGORIES); do \
+ rm -f $(DESTDIR)$(localedir)/$$lang/$$lc/$(DOMAIN).mo; \
+ done; \
+ done
+
+check: all
+
+info dvi ps pdf html tags TAGS ctags CTAGS ID:
+
+mostlyclean:
+ rm -f remove-potcdate.sed
+ rm -f stamp-poT
+ rm -f core core.* $(DOMAIN).po $(DOMAIN).1po $(DOMAIN).2po *.new.po
+ rm -fr *.o
+
+clean: mostlyclean
+
+distclean: clean
+ rm -f Makefile Makefile.in POTFILES *.mo
+
+maintainer-clean: distclean
+ @echo "This command is intended for maintainers to use;"
+ @echo "it deletes files that may require special tools to rebuild."
+ rm -f stamp-po $(GMOFILES)
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+dist distdir:
+ $(MAKE) update-po
+ @$(MAKE) dist2
+# This is a separate target because 'update-po' must be executed before.
+dist2: stamp-po $(DISTFILES)
+ dists="$(DISTFILES)"; \
+ if test "$(PACKAGE)" = "gettext-tools"; then \
+ dists="$$dists Makevars.template"; \
+ fi; \
+ if test -f $(srcdir)/$(DOMAIN).pot; then \
+ dists="$$dists $(DOMAIN).pot stamp-po"; \
+ fi; \
+ if test -f $(srcdir)/ChangeLog; then \
+ dists="$$dists ChangeLog"; \
+ fi; \
+ for i in 0 1 2 3 4 5 6 7 8 9; do \
+ if test -f $(srcdir)/ChangeLog.$$i; then \
+ dists="$$dists ChangeLog.$$i"; \
+ fi; \
+ done; \
+ if test -f $(srcdir)/LINGUAS; then dists="$$dists LINGUAS"; fi; \
+ for file in $$dists; do \
+ if test -f $$file; then \
+ cp -p $$file $(distdir) || exit 1; \
+ else \
+ cp -p $(srcdir)/$$file $(distdir) || exit 1; \
+ fi; \
+ done
+
+update-po: Makefile
+ $(MAKE) $(DOMAIN).pot-update
+ test -z "$(UPDATEPOFILES)" || $(MAKE) $(UPDATEPOFILES)
+ $(MAKE) update-gmo
+
+# General rule for creating PO files.
+
+.nop.po-create:
+ @lang=`echo $@ | sed -e 's/\.po-create$$//'`; \
+ echo "File $$lang.po does not exist. If you are a translator, you can create it through 'msginit'." 1>&2; \
+ exit 1
+
+# General rule for updating PO files.
+
+.nop.po-update:
+ @lang=`echo $@ | sed -e 's/\.po-update$$//'`; \
+ if test "$(PACKAGE)" = "gettext-tools"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
+ echo "$${cdcmd}$(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$lang.new.po"; \
+ cd $(srcdir); \
+ if $(MSGMERGE) $$lang.po $(DOMAIN).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "msgmerge for $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+$(DUMMYPOFILES):
+
+update-gmo: Makefile $(GMOFILES)
+ @:
+
+Makefile: Makefile.in.in Makevars $(top_builddir)/config.status @POMAKEFILEDEPS@
+ cd $(top_builddir) \
+ && $(SHELL) ./config.status $(subdir)/$@.in po-directories
+
+force:
+
+# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/po/Makevars.template b/po/Makevars.template
new file mode 100644
index 00000000..32692ab4
--- /dev/null
+++ b/po/Makevars.template
@@ -0,0 +1,41 @@
+# Makefile variables for PO directory in any package using GNU gettext.
+
+# Usually the message domain is the same as the package name.
+DOMAIN = $(PACKAGE)
+
+# These two variables depend on the location of this directory.
+subdir = po
+top_builddir = ..
+
+# These options get passed to xgettext.
+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
+
+# This is the copyright holder that gets inserted into the header of the
+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
+# package. (Note that the msgstr strings, extracted from the package's
+# sources, belong to the copyright holder of the package.) Translators are
+# expected to transfer the copyright for their translations to this person
+# or entity, or to disclaim their copyright. The empty string stands for
+# the public domain; in this case the translators are expected to disclaim
+# their copyright.
+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
+
+# This is the email address or URL to which the translators shall report
+# bugs in the untranslated strings:
+# - Strings which are not entire sentences, see the maintainer guidelines
+# in the GNU gettext documentation, section 'Preparing Strings'.
+# - Strings which use unclear terms or require additional context to be
+# understood.
+# - Strings which make invalid assumptions about notation of date, time or
+# money.
+# - Pluralisation problems.
+# - Incorrect English spelling.
+# - Incorrect formatting.
+# It can be your email address, or a mailing list address where translators
+# can write to without being subscribed, or the URL of a web page through
+# which the translators can contact you.
+MSGID_BUGS_ADDRESS =
+
+# This is the list of locale categories, beyond LC_MESSAGES, for which the
+# message catalogs shall be used. It is usually empty.
+EXTRA_LOCALE_CATEGORIES =
diff --git a/po/Rules-quot b/po/Rules-quot
new file mode 100644
index 00000000..9c2a995e
--- /dev/null
+++ b/po/Rules-quot
@@ -0,0 +1,47 @@
+# Special Makefile rules for English message catalogs with quotation marks.
+
+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
+
+.SUFFIXES: .insert-header .po-update-en
+
+en@quot.po-create:
+ $(MAKE) en@quot.po-update
+en@boldquot.po-create:
+ $(MAKE) en@boldquot.po-update
+
+en@quot.po-update: en@quot.po-update-en
+en@boldquot.po-update: en@boldquot.po-update-en
+
+.insert-header.po-update-en:
+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
+ tmpdir=`pwd`; \
+ echo "$$lang:"; \
+ ll=`echo $$lang | sed -e 's/@.*//'`; \
+ LC_ALL=C; export LC_ALL; \
+ cd $(srcdir); \
+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else \
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
+ else \
+ echo "creation of $$lang.po failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
+ fi
+
+en@quot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
+
+en@boldquot.insert-header: insert-header.sin
+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
+
+mostlyclean: mostlyclean-quot
+mostlyclean-quot:
+ rm -f *.insert-header
diff --git a/po/boldquot.sed b/po/boldquot.sed
new file mode 100644
index 00000000..4b937aa5
--- /dev/null
+++ b/po/boldquot.sed
@@ -0,0 +1,10 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
+s/“/“/g
+s/”/”/g
+s/‘/‘/g
+s/’/’/g
diff --git a/po/cs.po b/po/cs.po
new file mode 100644
index 00000000..0948f411
--- /dev/null
+++ b/po/cs.po
@@ -0,0 +1,670 @@
+# Czech translation of the GNU m4.
+# Copyright (C) 1998 Free Software Foundation, Inc.
+# Ji Pavlovsk <pavlovsk@ff.cuni.cz>, 1998-2001.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2000-08-08 23:19+0200\n"
+"Last-Translator: Ji Pavlovsk <pavlovsk@ff.cuni.cz>\n"
+"Language-Team: Czech <cs@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: pepna `%s' nen jednoznan\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: pepna `--%s' mus bt zadn bez argumentu\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: pepna `%c%s' mus bt zadn bez argumentu\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: pepna `%s' vyaduje argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: neznm pepna `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: neznm pepna `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: neznm pepna -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: neznm pepna -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: pepna vyaduje argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: pepna `-W %s' nen jednoznan\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: pepna ` -W %s' mus bt zadn bez argumentu\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "pam vyerpna"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "spch"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Shoda nenalezena"
+
+# , c-format
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "patn regulrn vraz"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Chybn srovnvac znak"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Chybn tda znak"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Nadbyten zptn lomtko"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Chybn zptn odkaz"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Chyb uzavrajc znak pro [ i [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Chyb uzavrajc znak pro ( i \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Chyb uzavrajc znak pro \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Chybn obsah \\{\\} vrazu"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Chybn specifikace intervalu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Pam vyerpna"
+
+# , c-format
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Chybn pedchoz regulrn vraz"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Pedasn konec regulrnho vrazu"
+
+# , c-format
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Pli velik regulrn vraz"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Chyb otevrajc znak pro \\)"
+
+# , c-format
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Chyb pedchoz regulrn vraz"
+
+# , c-format
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varovn: pli mlo argument pro vestavn makro `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varovn: pli mnoho argument pro vestavn makro `%s' - budou ignorovny"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Neseln argument pro vestavn makro `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "VNITN CHYBA: patn typ tokenu v define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Jmno %s nen definovno"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "VNITN CHYBA: Vestavn makro nenalezeno v tabulce vestavnch maker!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "VNITN CHYBA: patn typ tokenu v m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Jmno `%s' nen definovno"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "VNITN CHYBA: patn typ symbolu v m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Rouru do pkazu `%s' nelze otevt"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Zklad v makru eval je mimo rozsah (zklad = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Zporn ka v makru eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Neseln argument pro %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Chyba pi voln makra undivert pro %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntaktick kd %c nen definovn"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "%s nelze otevt"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Ladc md: patn ladc volby: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Chybov soubor %s nelze pout"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VAROVN: \\0 zmiz, pi nahrazovn pouijte \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "patn regulrn vraz `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Chyba pi porovnvn regulrnho vrazu `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr ""
+"VNITN CHYBA: vestavn makro nenalezeno v tabulce vestavnch maker\n"
+"(trace_pre ())!"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "VNITN CHYBA: patn typ tokenu (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "patn vraz v makru eval (chyb prav zvorka): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "patn vraz v makru eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "patn vraz v makru eval (patn vstup): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "patn vraz v makru eval (nadbyten vstup): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Dlen nulou v makru eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nulou v makru eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "VNITN CHYBA: patn chybov kd v evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "VNITN CHYBA: patn opertor porovnn v cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "VNITN CHYBA: patn opertor posunu v shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "VNITN CHYBA: patn opertor v mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "VNITN CHYBA: Vestavn makro nenalezeno v tabulce vestavnch maker!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "VNITN CHYBA: patn typ tokenu ve freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ve zmrazenm souboru oekvn LF"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ve zmrazenm souboru oekvn znak `%c'"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "patn formt zmrazenho souboru"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Pedasn konec zmrazenho souboru"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' ze zmrazenho souboru nenalezeno v tabulce vestavnch maker!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Vstup ten z %s, dku %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Vstup ten z %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "VNITN CHYBA: rekurzivn push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "VNITN CHYBA: patn voln init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "VNITN CHYBA: chyba vstupnho zsobnku v next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "VNITN CHYBA: chyba vstupnho zsobnku v peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "DN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "CHYBA: EOF v etzci"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "CHYBA: Peteen zsobnku. (nekonen rekurze makra define?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Vce informac zskte pkazem `%s --help'.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Pouit: %s [PEPNA]... [SOUBOR]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Povinn i voliteln argumenty pro dlouh pepnae jsou povinn respektive\n"
+"voliteln i pro odpovdajc pepnae krtk.\n"
+"\n"
+"Chovn programu:\n"
+" --help vype tuto npovdu a skon\n"
+" --version vype oznaen verze a skon\n"
+" -e, --interactive nebufferovan vstup, ignoruje peruen\n"
+" -E, --fatal-warnings skon po prvnm varovn\n"
+" -Q, --quiet, --silent potla nkter varovn tkajc se\n"
+" vestavnch maker\n"
+" -P, --prefix-builtins vechna vestavn makra budou mt prefix `m4_'\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGVR syntaxe jmen maker bude urena pomoc REGVR\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Nastaven dynamickho zavdn modul:\n"
+" -m, --module-directory=ADRES pid ADRES k seznamu adres s moduly\n"
+" -M, --load-module=MODUL zavede dynamick MODUL z M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Nastaven preprocesoru:\n"
+" -I, --include=ADRES ADRES bude druh v poad pi hledn\n"
+" vloench soubor\n"
+" -D, --define=MAKRO[=HODNOTA] definuje MAKRO majc HODNOTU, me bt\n"
+" i przdn\n"
+" -U, --undefine=MAKRO smae vestavn MAKRO\n"
+" -s, --synclines vlo dky tvaru `#line SLO \"SOUBOR\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Nastaven limit:\n"
+" -G, --traditional vypne GNU rozen\n"
+" -H, --hashsize=PRVOSLO velikost hash tabulky pro vyhledvn symbol\n"
+" -L, --nesting-limit=SLO nastav limit pro vnoen voln maker\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Zmrazen soubory:\n"
+" -F, --freeze-state=SOUBOR pi ukonen ulo zmrazen stav do SOUBORU\n"
+" -R, --reload-state=SOUBOR pi startu nate zmrazen stav ze SOUBORU\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Ladn:\n"
+" -d, --debug=[VOLBY] nastav rove ladn (pokud nejsou VOLBY\n"
+" zadny, pak implicitn `aeq')\n"
+" -t, --trace=MAKRO sleduje MAKRO, kdy je definovno\n"
+" -l, --arglength=POET reguluje poet vstupnch informac\n"
+" ze sledovn maker\n"
+" -o, --error-output=SOUBOR pesmruje vstup ladn a sledovn do SOUBORU\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"VOLBOU me bt cokoliv z:\n"
+" t sleduje vechna makra, nejenom ta uren pomoc traceon\n"
+" a vype aktuln argumenty\n"
+" e vype expanzi\n"
+" q dle poteby uzave hodnoty mezi apostrofy, s volbami a nebo e\n"
+" c vype hodnoty ped a po vyhodnocen argument a po voln makra\n"
+" x bude vypisovat jedinen ID voln makra, uiten s volbou c\n"
+" f bude vypisovat nzev vstupnho souboru\n"
+" l bude vypisovat slo vstupnho dku\n"
+" p vype informace o nalezen zadanho souboru\n"
+" i vype informace o kad zmn vstupnho souboru\n"
+" V zkratka pro vechny ve uveden volby\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nJestlie SOUBOR nen zadn, nebo je SOUBOR `-', pak je ten standardn vstup.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Chyby v programu oznamujte na adrese <bug-m4@gnu.org> (anglicky).\n"
+"Pipomnky k pekladu zaslejte na adresu <cs@li.org> (esky).\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "patn ladc volby: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "CHYBA: `%s' nelze pidat k seznamu prohledvanch adres"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "CHYBA: `%s' nelze pidat k seznamu prohledvanch adres: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (peloeno s volbami:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "VNITN CHYBA: patn kd v odloench argumentech"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "VNITN CHYBA: patn typ tokenu v expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "CHYBA: EOF v seznamu argument"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "VNITN CHYBA: patn typ tokenu v expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "VNITN CHYBA: patn typ symbolu v call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "CHYBA: pekroen limit pro rekurzi (%d), zmte jej pomoc -L<N>"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "CHYBA: moduly nelze inicializovat: %s"
+
+# , c-format
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "CHYBA: modul `%s' nelze nalzt"
+
+# , c-format
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "CHYBA: modul `%s' nelze nalzt: %s"
+
+# , c-format
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "CHYBA: moduly nelze deinicializovat"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "CHYBA: moduly nelze deinicializovat: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "CHYBA: modul `%s' nelze deinicializovat"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "CHYBA: modul `%s' nelze deinicializovat: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "CHYBA: doasn soubor pro uloen odloenho vstupu nelze vytvoit"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "CHYBA: odloen vstup nelze zapsat do doasnho souboru"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "CHYBA: pi zapisovn vloenho souboru"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "CHYBA: pi ten vloenho souboru"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Chyba pi voln funkce stat pro soubor obsahujc odloen vstup"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Odloen vstup je pli velik."
+
+# , c-format
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Hledn soubor `%s', nalezen soubor `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Pekroen VMEM limit?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Neoprvnn pstup do pamti (SIGSEGV). Jedn se bu o peteen zsobnku,\n"
+"nebo o chybu "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Provte, zda se nejedn o nekonenou rekurzi.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "VNITN CHYBA: patn md pro symbol_lookup ()"
+
+# , c-format
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Jmno `%s' nen znmo\n"
diff --git a/po/da.po b/po/da.po
new file mode 100644
index 00000000..d8eb280c
--- /dev/null
+++ b/po/da.po
@@ -0,0 +1,653 @@
+# Danish version of GNU m4 strings.
+# Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+# Ole Laursen <olau@hardworking.dk>, 2000, 2001.
+#
+# Diversion er ikke oversat fordi det endnu ikke er lykkedes
+# at finde et passende dansk ord (hjlp modtages gerne :-).
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-06-14 23:09+02:00\n"
+"Last-Translator: Ole Laursen <olau@hardworking.dk>\n"
+"Language-Team: Danish <dansk@klid.dk>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: tilvalget '%s' is flertydigt\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '--%s' tager ikke en parameter\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '%c%s' tager ikke en parameter\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: tilvalget '%s' skal have en parameter\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: ukendt tilvalg '--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: ukendt tilvalg '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ulovligt tilvalg - %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ugyldigt tilvalg - %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tilvalg skal have en parameter - %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: tilvalget '-W %s' er flertydigt\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: tilvalget '-W %s' tager ikke en parameter\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "lbet tr for hukommelse"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succes"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Intet fundet"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ugyldigt regulrt udtryk"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ugyldigt sorteringstegn"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ugyldig tegnklassenavn"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Afsluttende omvendt skrstreg"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ugyldig tilbagereference"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Uafbalanceret [ eller [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Uafbalanceret ( eller \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Uafbalanceret \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ugyldigt indhold af \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ugyldig intervalslutning"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Lbet tr for hukommelse"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ugyldigt forudgende regulrt udtryk"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "For tidlig afslutning p regulrt udtryk"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regulrt udtryk for stort"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Uafbalanceret ) eller \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Intet tidligere regulrt udtryk"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Advarsel: For f parametre til indbygget `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Advarsel: Ekstra parametre til indbygget `%s' ignoreret"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Parameteren til indbygget `%s' er ikke et tal"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERN FEJL: Ugyldig datatype i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Navnet '%s' ikke defineret"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERN FEJL: Ugyldig datatype i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ikke-defineret navn '%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERN FEJL: Ugyldig symboltype i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan ikke bne overfrselsledning til kommando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Grundtallet i eval ligger ikke i det gyldige interval (grundtal = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negativ bredde i eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Parameteren til %s er ikke et tal"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan ikke undivert %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntakskode %c ikke defineret"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan ikke bne %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Fejlretningstilstand: ugyldige fejlfindingsflag: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan ikke stte fil %s til brug for fejl"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "ADVARSEL: \\0 vil forsvinde, brug \\& i stedet for i erstatninger"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Ugyldigt regulrt udtryk `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fejl under sgning af regulrt udtryk `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERN FEJL: Ugyldig datatype (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Ugyldigt udtryk i eval (manglende hjreparantes): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Ugyldigt udtryk i eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Ugyldigt udtryk i eval (ugyldigt inddata): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Ugyldigt udtryk i eval (for stor mngde inddata): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division med nul i eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo med nul i eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERN FEJL: Ugyldig fejlkode i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERN FEJL: Ugyldig sammenligningsoperator i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERN FEJL: Ugyldig skifteoperator i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERN FEJL: Ugyldig operator i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERN FEJL: Indbygget ikke fundet i tabellen over indbyggede"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERN FEJL: Ugyldig datatype i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Forventede linieskift i fryst fil"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Forventede tegnet `%c' i fryst fil"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Ugyldigt formatteret fryst fil"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "For tidlig afslutning p fryst fil"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' fra fryst fil ikke fundet i tabellen over indbyggede"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Inddata sendt tilbage til %s, linje %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Inddata lst fra %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERN FEJL: Rekursiv push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERN FEJL: Ugyldigt kald til init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERN FEJL: Inddatastakken forkludret i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERN FEJL: Inddatastakken forkludret i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "INTET"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEJL: EOF i tekststreng"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEJL: Overfyldt stak. (Uendelig define rekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Prv `%s --help' for mere information.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Brug: %s [TILVALG]... [FIL]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Obligatoriske eller valgfri parametre til lange tilvalg er ogs\n"
+"obligatoriske eller valgfri for de korte tilvalg\n"
+"\n"
+"Arbejdstilstande:\n"
+" --help vis denne hjlp og afslut\n"
+" --version udskriv versionsinformation og afslut\n"
+" -e, --interactive uddata ikke i buffer, ignorr afbrydelser\n"
+" -E, --fatal-warnings stop efter den frste advarsel\n"
+" -Q, --quiet, --silent undertryk nogle advarsler for indbyggede\n"
+" -P, --prefix-builtins st et `m4_'-prfix p alle indbyggede\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP benyt REGEXP som makronavnssyntaks\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamiske indlsningsfaciliteter:\n"
+" -m, --module-directory=KATALOG tilfj KATALOG til modulsgningsstien\n"
+" -M, --load-module=MODUL indls dynamisk MODUL fra M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Forbehandlerfaciliteter:\n"
+" -I, --include=MAPPE led sekundrt i denne mappe efter inkluderinger\n"
+" -D, --define=NAVN[=VRDI] indst NAVN med vrdien tom eller VRDI\n"
+" -U, --undefine=NAVN slet indbygget NAVN\n"
+" -s, --synclines generr `#line NR \"FIL\"' linjer\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Regulering af grnser:\n"
+" -G, --traditional undertryk alle GNU-udvidelser\n"
+" -H, --hashsize=PRIMTAL st strrelsen p hashtabellen til symbolopslag\n"
+" -L, --nesting-limit=NUMMER st grnsen p strukturer inde i hinanden\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fryste tilstandsfiler:\n"
+" -F, --freeze-state=FIL gem en fryst tilstand i FIL til slut\n"
+" -R, --reload-state=FIL hent en fryst tilstand fra FIL ved start\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Fejlretning:\n"
+" -d, --debug=[FLAG] st fejlretningsniveau (ingen flag medfrer `aeq')\n"
+" -t, --trace=NAVN flg navn nr det bliver defineret\n"
+" -l, --arglength=NR afgrns strrelsen af makrosporingens uddata\n"
+" -o, --error-output=FIL omdirigr fejlretnings- og sporingsuddata\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAG er hvilken som helst af:\n"
+" t flg alle makrokald, ikke kun dem med traceon\n"
+" a vis aktuelle parametre\n"
+" e vis makroudfoldelse\n"
+" q anbring aktuelle parametre og udfoldelser mellem citationstegn\n"
+" c vis fr indsamling af parametre, efter indsamling og efter kald\n"
+" x tilfj et unikt makrokald-id, nyttig med `c'-flaget\n"
+" f vis nuvrende inddatafilnavn\n"
+" l vis nuvrende inddatalinjenummer\n"
+" p vis resultat af stisgninger\n"
+" i vis ndringer i inddatafiler\n"
+" V forkortelse for alle ovenstende flag\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nStandardinddata lses hvis FIL ikke specificeres eller hvis FIL er `-'.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nRapportr fejl (p engelsk) til <bug-m4@gnu.org> (oversttelsesfejl til <olau@hardworking.dk>).\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Ugyldige fejlretningsflag: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEJL: tilfjelse af sgningskataloget '%s' mislykkedes"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEJL: tilfjelse af sgningskataloget '%s' mislykkedes: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tilvalg:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERN FEJL: Ugyldig kode i opsatte parametre"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERN FEJL: Ugyldig type i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEJL: EOF i parameterliste"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERN FEJL: Ugyldig type i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERN FEJL: Ugyldig symboltype i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEJL: Rekursionsgrnse p %d overskredet, -L<N> kan bruges til at ndre den"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEJL: klargring af moduler mislykkedes: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEJL: Kan ikke finde modul: '%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEJL: kan ikke finde modul: '%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEJL: Kan ikke lukke moduler"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEJL: kan ikke lukke moduler: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEJL: Kan ikke lukke modul: '%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEJL: kan ikke lukke modul: '%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEJL: Kan ikke oprette midlertidig fil til diversion"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEJL: Kan ikke hlde diversion ud i midlertidig fil"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEJL: Kopierer indsat fil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEJL: Lser indsat fil"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan ikke finde filoplysninger om diversion"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversion for stor"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Stisgning efter '%s' fandt '%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-grnsen overskredet?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Overskridelse af hukommelsesgrnserne opdaget (SIGSEGV). Enten er stakken\n"
+"blevet overfyldt, eller der er en fejl i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Se efter om der skulle vre uendelige rekursioner.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERN FEJL: Ulovlig tilstand til symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Navnet '%s' er ukendt\n"
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 00000000..7ccf475e
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,654 @@
+# German translation for the GNU m4 messages
+# Copyright (C) 1995, 1996, 1999, 2001 Free Software Foundation, Inc.
+# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995
+# Martin von Lwis <martin@mira.isdn.cs.tu-berlin.de>, 1996, 1999, 2001
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-10-10 10:31+02:00\n"
+"Last-Translator: Martin von Lwis <martin@mira.isdn.cs.tu-berlin.de>\n"
+"Language-Team: German <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: Die Option %s ist mehrdeutig.\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: Die Option --%s erlaubt keinen Parameter.\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: Die Option %c%s erlaubt keinen Parameter.\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: Die Option %s verlangt einen Parameter.\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: Nicht erkannte Option --%s.\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "\"%s: Nicht erkannte Option %c%s.\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: Ungltige Option -- %c.\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: Ungltige Option -- %c.\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: Option verlangt einen Parameter -- %c.\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: Option -W %s ist zweideutig.\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: Option -W %s erlaubt keinen Parameter.\\\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "Virtueller Speicher erschpft."
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Erfolg"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Keine bereinstimmung"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ungltiger regulrer Ausdruck"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ungltiger Vergleichsbuchstabe"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ungltiger Name fr eine Zeichenklasse"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Angehngter Backslash (\\)"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ungltiger Rckverweis"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ oder [^ ohne schlieende Klammer"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( oder \\( ohne schlieende Klammer"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "{ ohne schlieende Klammer"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ungltiger Inhalt von \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ungltiges Bereichsende"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Kein Speicher mehr verfgbar"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Der vorherige regulre Ausdruck ist nicht korrekt"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Unerwartetes Ende des regulren Ausdrucks"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regulrer Ausdruck zu gro"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") order \\) ohne ffnende Klammer"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Kein vorangehender regulrer Ausdruck"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Warnung: Zu wenig Argumente fr eingebaute Funktion %s"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Warnung: berschssige Argumente fr eingebaute Funktion %s ignoriert"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Nicht-numerisches Argument in eingebauter Funktion %s"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Name %s nicht definiert"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Undefinierter Name %s."
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERNER FEHLER: Falscher Symboltyp in m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kann keine `pipe' fr Kommando %s ffnen"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Basis in `eval' nicht in den Grenzen (Basis = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negative Breite in `eval'"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Nicht-numerisches Argument in %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kann Umleitung %s nicht aufheben"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Syntaxzeichen %c nicht definiert."
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kann %s nicht ffnen"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmodus: falsche Debug Flags: %s"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kann Fehlerdatei nicht vorbereiten: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "WARNUNG: \\0 wird wegfallen, benutze \\& stattdessen"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Falscher regulrer Ausdruck %s: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fehler beim Erkennen des regulren Ausdrucks %s"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Falscher Ausdruck in `eval' (fehlende rechte Klammer): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Falscher Ausdruck in `eval': %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Falscher Ausdruck in `eval' (falsche Eingabe): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Falscher Ausdruck in `eval' (zu groe Eingabe): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division durch Null in `eval': %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo Null in `eval': %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERNER FEHLER: Falscher Fehlerkode in evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERNER FEHLER: Falscher Vergleichsoperator in cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERNER FEHLER: Falscher Shift-Operator in shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERNER FEHLER: Falscher Operator in mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERNER FEHLER: Eingebaute Funktion nicht in Tabelle gefunden!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Erwarte Zeilenumbruch in eingefrorener Datei"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Erwarte Zeichen %c in eingefrorener Datei"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fehlerhafte eingefrorene Datei"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Vorzeitiges Ende der eingefrorenen Datei"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "%s aus eingefrorener Datei nicht in Tabelle der eingebauten Funktionen gefunden!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Eingabe zurckgenommen zu %s, Zeile %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Eingabe gelesen von %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERNER FEHLER: Rekursives push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERNER FEHLER: Falscher Aufruf von init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNER FEHLER: Kellerspeicher der Eingabe durcheinander in peek_input ()"
+
+# This is the name of the input file when there is no current input file.
+# Is this ever printed in a message?
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEHLER: Dateiende in Zeichenkette"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEHLER: Keller voll. (Unendliche `define' Rekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "%s --help zeigt weitere Informationen.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Aufruf: %s [OPTION]... [DATEI]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Notwendige bzw. optionale Argumente fr Optionen der Langform sind auch \n"
+"fr die Kurform notwendig bzw. optional.\n"
+"\n"
+"Operationsmodi:\n"
+" --help zeige diese Hilfe an und beende\n"
+" --version zeige Versionsinformation an und beende\n"
+" -e, --interactive keine Ausgabepufferung, ignoriere Interrupts\n"
+" -E, --fatal-warnings beende Ausfhrung nach erster Warnung\n"
+" -Q, --quiet, --silent unterdrcke Warnungen bei eingebauten Funktionen\n"
+" -P, --prefix-builtins erzwinge `m4_' Prfix fr eingebaute Funktionen\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP benutze REGEXP fr Makronamensyntax\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisches Nachladen:\n"
+" -m, --module-directory=VERZEICHNIS VERZEICHNIS in den Modulsuchpfad einfgen.\n"
+" -M, --load-module=MODUL MODUL dynamisch vom M4MODPATH laden.\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Prprozessoreigenschaften:\n"
+" -I, --include=VERZEICHNIS durchsuche VERZEICHNIS als zweites bei `include'\n"
+" -D, --define=NAME[=WERT] fge NAME mit WERT (oder leer) ein\n"
+" -U, --undefine=NAME lsche eingebaute Funktion NAME\n"
+" -s, --synclines erzeuge `#line NR \"DATEI\"' Zeilen\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Setze Grenzen:\n"
+" -G, --traditional schalte alle GNU Erweiterungen aus\n"
+" -H, --hashsize=PRIMZAHL setze Gre der Symbol-Hashtabelle\n"
+" -L, --nesting-limit=NUMMER setze knstliche Grenze fr Schachtelungstiefe\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Eingefrorene Dateien:\n"
+" -F, --freeze-state=DATEI erzeuge am Ende eine eingefrorene Form in DATEI\n"
+" -R, --reload-state=DATEI lade zu Beginn Zustand von eingefrorener DATEI\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] setze Debuglevel (keine FLAGS bedeutet `aeq')\\\n"
+" -t, --trace=NAME verfolge NAME, wenn er definiert wird\n"
+" -l, --arglength=NUMMER beschrnke Gre bei Macroverfolgung\n"
+" -o, --error-output=DATEI leite Debug- und Verfolgungsausgaben nach DATEI\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS ist Kombination aus folgendem:\n"
+" t verfolge alle Makroaufrufe, nicht nur die von `traceon'\n"
+" a zeige aktuelle Argumente\n"
+" e zeige Ausdehnung\n"
+" q setze Werte in Anfhrungszeichen, wenn ntig, mit a- oder e-Flag\n"
+" c zeige vor und nach `collect' und nach Aufruf an\n"
+" x zeige fr jeden Aufruf eindeutige Nummer an, hilfreich bei -c\n"
+" f gebe Namen der aktuellen Eingabedatei aus\n"
+" l gebe aktuelle Zeilennummer der Eingabezeile aus\n"
+" p gebe Ergebnis der Pfadsuche aus\n"
+" i gebe Vernderungen der Eingabedatei aus\n"
+" V Kurzform fr alle Flags oben zusammen\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nOhne DATEI oder wenn DATEI `-' ist, wird die Standardeingabe gelesen\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nProbleme und Fehler an <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Falsche Debug Flags: %s"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEHLER: Suchverzeichnis %s konnte nicht eingefgt werden."
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEHLER: Suchverzeichnis %s konnte nicht eingefgt werden: %s."
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr "(Optionen:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERNER FEHLER: Falscher Kode in zurckgestellten Argumenten"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERNER FEHLER: Falscher Datentyp des Tokens in expands_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEHLER: Dateiende in Argumentliste"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERNER FEHLER: Falscher Typ des Tokens in expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERNER FEHLER: Falsche Symboltyp in call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEHLER: Grenze der Rekursion von %d berschritten, benutze -L<N> zur nderung"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEHLER: Kann Module nicht initialisieren: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEHLER: Kann Modul nicht finden: %s."
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEHLER: Kann Modul nicht finden: %s: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEHLER: Kann Module nicht schlieen."
+
+# XXX: Autor fragen, ob "cannot cannot" absicht ist.
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEHLER: Kann Module nicht schlieen: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEHLER: Kann Modul nicht schlieen: %s"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEHLER: Kann Modul nicht schlieen: %s: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEHLER: Kann keine temporre Datei fr Umleitung erzeugen"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEHLER: Kann Umleitung nicht in temporre Datei ausgeben"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEHLER: Whrend Kopieren einer eingefgten Datei"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEHLER: Whrend Lesen einer eingefgten Datei"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kann `stat' nicht auf Umleitung anwenden"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Die Umleitung (diversion) ist zu lang."
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Pfad fr Suche nach %s hat %s gefunden"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM Beschrnkung berschritten?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Verletzung der Speichergrenzen festgestellt (SIGSEGV). Entweder ist ein\n"
+"Stackberlauf aufgetreten, oder es gibt einen Fehler in "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Untersuche auf mgliche unendliche Rekursion.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERNER FEHLER: Illegaler Modus bei symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Name %s ist unbekannt\n"
diff --git a/po/el.po b/po/el.po
new file mode 100644
index 00000000..0a0d1009
--- /dev/null
+++ b/po/el.po
@@ -0,0 +1,470 @@
+# Greek messages for GNU m4.
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>, 1999.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU m4 1.4n\n"
+"POT-Creation-Date: 1998-11-29 04:20+0100\n"
+"PO-Revision-Date: 1999-06-24 00:25+0000\n"
+"Last-Translator: Simos Xenitellis <S.Xenitellis@rhbnc.ac.uk>\n"
+"Language-Team: Greek <nls@tux.hellug.gr>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-7\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: src/builtin.c:337
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr ": `%s'"
+
+#: src/builtin.c:343
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr ": `%s' "
+
+#: src/builtin.c:371
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "- `%s'"
+
+#: src/builtin.c:482
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr " : define_macro ()"
+
+#: src/builtin.c:677 src/builtin.c:740 src/builtin.c:1383 src/builtin.c:1407
+#, c-format
+msgid "Undefined name %s"
+msgstr " %s"
+
+#: src/builtin.c:705
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr " : !"
+
+#: src/builtin.c:713
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr " : m4_dumpdef ()"
+
+#: src/builtin.c:764
+#, c-format
+msgid "Undefined macro `%s'"
+msgstr " `%s'"
+
+#: src/builtin.c:802
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr " : m4_defn ()"
+
+#: src/builtin.c:868
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr " `%s'"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr " ( = %d)"
+
+#: src/builtin.c:917
+msgid "Negative width to eval"
+msgstr " "
+
+#: src/builtin.c:1023
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr " %s"
+
+#: src/builtin.c:1035
+#, c-format
+msgid "Cannot undivert %s"
+msgstr " %s"
+
+#: src/builtin.c:1183
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr " %c"
+
+#: src/builtin.c:1234 src/freeze.c:207
+#, c-format
+msgid "Cannot open %s"
+msgstr " %s"
+
+#: src/builtin.c:1443
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr " : : `%s'"
+
+#: src/builtin.c:1479
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr " : %s"
+
+#: src/builtin.c:1696
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr ": \\0 , \\& "
+
+#: src/builtin.c:1757 src/builtin.c:1817 src/input.c:1012
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr " `%s': %s"
+
+#: src/builtin.c:1768 src/builtin.c:1841
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr " `%s'"
+
+#: src/debug.c:379
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr " : ! (trace_pre ())"
+
+#: src/debug.c:387
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr " : (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr " : evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr " : cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr " : shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr " : mult_term ()"
+
+#: src/freeze.c:115
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr " : !"
+
+#: src/freeze.c:128
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr " : freeze_one_symbol ()"
+
+#: src/freeze.c:159
+msgid "Expecting line feed in frozen file"
+msgstr " `line feed' "
+
+#: src/freeze.c:161
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr " `%c' "
+
+#: src/freeze.c:218
+msgid "Ill-formated frozen file"
+msgstr "- "
+
+#: src/freeze.c:273 src/freeze.c:289
+msgid "Premature end of frozen file"
+msgstr " "
+
+#: src/freeze.c:323
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr " `%s' "
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr " %s, %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr " %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr " : push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr " : init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr " : next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr " : peek_input ()"
+
+#: src/input.c:803
+msgid "NONE"
+msgstr ""
+
+#: src/input.c:1197 src/input.c:1224
+msgid "ERROR: EOF in string"
+msgstr ": EOF "
+
+#: src/m4.c:117
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr ": . ( ;)"
+
+#: src/m4.c:144
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr " `%s --help' .\n"
+
+#: src/m4.c:148
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr ": %s []... []...\n"
+
+#: src/m4.c:149
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+" \n"
+" .\n"
+"\n"
+" :\n"
+" --help \n"
+" --version \n"
+" -e, --interactive , \n"
+" -E, --fatal-warnings \n"
+" -Q, --quiet, --silent \n"
+" -P, --prefix-builtins `m4_' \n"
+
+#: src/m4.c:162
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W --word-regexp= \n"
+
+#: src/m4.c:166
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+" :\n"
+" -I, --include= \n"
+" -D, --define=[=] ͼ , \n"
+" -U, --undefine= ͼ\n"
+" -s, --synclines `#line \"\"'\n"
+
+#: src/m4.c:174
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+" :\n"
+" -G, --traditional GNU\n"
+" -H, --hashsize= \n"
+" -L, --nesting-limit= \n"
+
+#: src/m4.c:181
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+" :\n"
+" -F, --freeze-state=ARXEIO \n"
+" -R, --reload-state=ARXEIO \n"
+
+#: src/m4.c:187
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+":\n"
+" -d, --debug=[] ( `aeq')\n"
+" -t, --trace=ONOMA ͼ \n"
+" -l, --arglength= \n"
+" -o, --error-output= \n"
+
+#: src/m4.c:195
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+" :\n"
+" t , \n"
+" a \n"
+" e \n"
+" q , a e\n"
+" c , \n"
+" x , c\n"
+" f \n"
+" l \n"
+" p \n"
+" i \n"
+" V \n"
+
+#: src/m4.c:210
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\n , -, .\n"
+
+#: src/m4.c:215
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\n <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:388
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr " : `%s'"
+
+#: src/m4.c:417
+msgid " (options:"
+msgstr " (:"
+
+#: src/m4.c:500
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr " : "
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr " : expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr ": EOF "
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr " : expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr " : call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ": %d , -L<N> "
+
+#: src/module.c:312
+#, c-format
+msgid "Module search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#: src/module.c:349
+#, c-format
+msgid "ERROR: cannot find module `%s': %s"
+msgstr ": `%s': %s"
+
+#: src/module.c:353
+#, c-format
+msgid "ERROR: cannot find module `%s'"
+msgstr ": `%s'"
+
+#: src/output.c:198
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr ": "
+
+#: src/output.c:208
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr ": "
+
+#: src/output.c:292
+msgid "ERROR: Copying inserted file"
+msgstr ": "
+
+#: src/output.c:473
+msgid "ERROR: Reading inserted file"
+msgstr ": "
+
+#: src/output.c:572
+msgid "Cannot stat diversion"
+msgstr " "
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:168
+msgid "VMEM limit exceeded?\n"
+msgstr " ;\n"
+
+#: src/stackovf.c:190
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+" (SIGSEGV). \n"
+" "
+
+#: src/stackovf.c:195
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". ' .\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr " : symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr " `%s' \n"
diff --git a/po/en@boldquot.header b/po/en@boldquot.header
new file mode 100644
index 00000000..fedb6a06
--- /dev/null
+++ b/po/en@boldquot.header
@@ -0,0 +1,25 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
+# This catalog furthermore displays the text between the quotation marks in
+# bold face, assuming the VT100/XTerm escape sequences.
+#
diff --git a/po/en@quot.header b/po/en@quot.header
new file mode 100644
index 00000000..a9647fc3
--- /dev/null
+++ b/po/en@quot.header
@@ -0,0 +1,22 @@
+# All this catalog "translates" are quotation characters.
+# The msgids must be ASCII and therefore cannot contain real quotation
+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
+# and double quote (0x22). These substitutes look strange; see
+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
+#
+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
+# It also translates pairs of apostrophe (0x27) to
+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
+# and pairs of quotation mark (0x22) to
+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
+#
+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
+# When output to an ISO-8859-1 terminal, the single quotation marks are
+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
+# grave/acute accent (by libiconv), and the double quotation marks are
+# transliterated to 0x22.
+# When output to an ASCII terminal, the single quotation marks are
+# transliterated to apostrophes, and the double quotation marks are
+# transliterated to 0x22.
+#
diff --git a/po/fi.po b/po/fi.po
new file mode 100644
index 00000000..6df96d1b
--- /dev/null
+++ b/po/fi.po
@@ -0,0 +1,664 @@
+# Finnish messages for m4.
+# Copyright © 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Jorma Karvonen <karvonen.jorma@gmail.com>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2010-03-02 22:05+0200\n"
+"Last-Translator: Jorma Karvonen <karvonen.jorma@gmail.com>\n"
+"Language-Team: Finnish <translation-team-fi@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: valitsin ”%s” ei ole yksiselitteinen\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”--%s” ei salli argumenttia\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”%c%s” ei salli argumenttia\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: valitsin ”%s” vaatii argumentin\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: tunnistamaton valitsin ”--%s”\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: tunnistamaton valitsin ”%c%s”\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: virheellinen valitsin -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: virheellinen valitsin -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: valitsin vaatii argumentin -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: valitsin ”-W %s” ei ole yksiselitteinen\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: valitsin ”-W %s” ei salli argumenttia\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "muisti loppui"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Onnistui"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Ei täsmäystä"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Virheellinen säännöllinen lauseke"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Virheellinen tietojenkeräysmerkki"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Virheellinen merkkiluokkanimi"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Jälkikenoviiva"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Virheellinen paluuviite"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Pariton [ tai [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Pariton ( tai \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Pariton \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Virheellinen \\{\\}-sisältö"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Virheellinen alueen loppu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Muisti loppui"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Virheellinen edeltävä säännöllinen lauseke"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Säännöllisen lausekkeen ennenaikainen loppu"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Säännöllinen lauseke on liian suuri"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Pariton ) tai \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Ei edellistä säännöllistä lauseketta"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varoitus: Liian harvoja argumenttia sisäänrakennetulle ”%s”"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varoitus: Ei välitetä lisäargumenteista sisäänrakennetulle ”%s”"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Ei-numeerinen argumentti sisäänrakennettuun ”%s”"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi makrossa define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Määrittelemätön nimi %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "SISÄINEN VIRHE: Builtin ei löytynyt builtin-taulussa!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi funktiossa m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Määrittelemätön nimi ”%s”"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "SISÄINEN VIRHE: Väärä symbolityyppi funktiossa m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Ei voi avata putkea komentoon ”%s”"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Kantaluku kohteessa eval alueen ulkopuolella (kantaluku = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negatiivinen leveys kohteeseen eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Ei-numeerinen argumentti kohteeseen %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Ei voida kääntää takaisin %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Määrittelemätön syntaksikoodi %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Ei voi avata %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Vianjäljitystila: väärät vianjäljitysliput: ”%s”"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Ei voi asettaa virhetiedostoa: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VAROITUS: \\0 häviää, käytä sen sijaan merkintää \\& korvauksissa"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Virheellinen säännöllinen lauseke ”%s”: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Virhe täsmättäessä säännöllistä lauseketta ”%s”"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "SISÄINEN VIRHE: Builtin ei löytynyt builtin-taulussa! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "SISÄINEN VIRHE: Väärä merkkijonodatatyyppi (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Virheellinen lauseke kohteessa eval (oikea sulje puuttuu): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Virheellinen lauseke kohteessa eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Virheellinen lauseke kohteessa eval (virheellinen syöte): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Virheellinen lauseke kohteessa eval (lisäsyöte): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Jaa nollalla kohteessa eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nollalla kohteessa eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "SISÄINEN VIRHE: Virheellinen koodi funktiossa evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen vertailuoperaattori funktiossa cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen siirto-operaattori funktiossa shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "SISÄINEN VIRHE: Virheellinen operaattori funktiossa mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "SISÄINEN VIRHE: Built-in ei löytynyt builtin-taulussa!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonodatatyyppi funktiossa freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Odotetaan rivinvaihtoa jäätyneessä tiedostossa"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Odotetaan merkkiä ”%c” jäätyneessä tiedostossa"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Vääränmuotoinen jäätynyt tiedosto"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Jäätyneen tiedoston ennenaikainen loppu"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "”%s” jäätyneestä tiedostosta ei löytynyt builtin-taulua!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Syöte käänteisesti kohteeseen %s, rivi %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Syöte luettiin kohteesta %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "SISÄINEN VIRHE: Rekursiivinen push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "SISÄINEN VIRHE: Virheellinen kutsu funktioon init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "SISÄINEN VIRHE: Syötepino botch funktiossa next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "SISÄINEN VIRHE: Syötepino botch funktiossa peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "EI MITÄÄN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "VIRHE: tiedoston loppumerkki EOF merkkijonossa"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "VIRHE: Pinon ylivuoto. (Päättymätön define-rekursio?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Lisätietoja komennolla ”%s --help”.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Käyttö: %s [VALITSIN]... [TIEDOSTO]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Pakolliset tai valinnaiset argumentit pitkille valitsimille ovat pakollisia\n"
+"tai valinnaisia myös lyhyille valitsimille.\n"
+"\n"
+"Toimintotilat:\n"
+" --help näytä tämä ohje ja poistu\n"
+" --version tulosta versiotiedot ja poistu\n"
+" -e, --interactive puskuroimaton tuloste, älä välitä keskeytyksistä\n"
+" -E, --fatal-warnings pysäytä suoritus ensimmäisen varoituksen jälkeen\n"
+" -Q, --quiet, --silent estä jotkut varoitukset kohteelle builtins\n"
+" -P, --prefix-builtins pakota ”m4_”-etuliite kaikkiin builtins-kohteisiin\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP käytä REGEXP makronimisyntaksille\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynaamiset latausominaisuudet:\n"
+" -m, --module-directory=DIRECTORY lisää DIRECTORY-hakemisto moduulin etsintäpolkuun\n"
+" -M, --load-module=MODULE lataa dynaaminen MODULE-moduuli kohteesta M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Esiprosessoriominaisuudet:\n"
+" -I, --include=DIRECTORY hae tämä hakemisto toisen kerran include-määrittelyjä varten\n"
+" -D, --define=NIMI[=ARVO] kirjoita NIMI, jolla on ARVO tai tyhjä\n"
+" -U, --undefine=NIMI poista builtin-NIMI\n"
+" -s, --synclines tuota ”#line NO \"FILE\"” rivit\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Rajoitusten valvonta:\n"
+" -G, --traditional estä kaikki GNU-laajennukset\n"
+" -H, --hashsize=PRIME aseta symbolin lookup hash-taulun koko\n"
+" -L, --nesting-limit=NUMERO vaihda keinotekoinen sisennysraja\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Jäädytetyn tilan tiedostot:\n"
+" -F, --freeze-state=TIEDOSTO tuota jäädytetty tila TIEDOSTOon lopussa\n"
+" -R, --reload-state=TIEDOSTO hae uudelleen jäädytetty tila TIEDOSTOsta alussa\n"
+
+#: src/m4.c:197
+#, fuzzy
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Vianjäljitys:\n"
+" -d, --debug=[LIPUT] aseta vianjäljitystaso (ilman LIPUT-määritystä\n"
+" sisältää ”aeq”)\n"
+" -t, --trace=NIMI jäljitä NIMI kun se määritellään\n"
+" -l, --arglength=NUM rajoita makrojäljityksen kokoa\n"
+" -o, --error-output=TIEDOSTO ohjaa edelleen vianjäljitys- ja jäljitystuloste\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"LIPUT on mikä tahansa seuraavista:\n"
+" t jäljitä kaikki makrokutsut, ei vain silloin kun jäljitys on päällä\n"
+" a näytä todelliset argumentit\n"
+" e näytä laajennus\n"
+" q lainaa arvot milloin välttämätöntä, ”a”- tai ”e”-lipulla\n"
+" c näytä ennen collect-toimintoa, sen jälkeen ja kutsun jälkeenl\n"
+" x lisää uniikki makrokutsutunniste, hyödyllinen c-lipun kanssa\n"
+" f sano nykyinen syötetiedostonimi\n"
+" l sano nykyinen syöterivinumero\n"
+" p näytä polkuetsinnän tulokset\n"
+" i näytä muutokset syötetiedostoissa\n"
+" V lyhenne kaikille yllä oleville lipuille\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jos ei ole TIEDOSTOa tai TIEDOSTO on ”-”, luetaan vakiosyötteestä.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Ilmoita virheistä (englanniksi) osoitteeseen <bug-m4@gnu.org>.\n"
+"Ilmoita suomennoksen virheistä osoitteeseen <translation-team-fi@lists.sourceforge.net>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Virheelliset vianjäljitysliput: ”%s”"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "VIRHE: etsintähakemiston ”%s” lisäys epäonnistui"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "VIRHE: etsintähakemiston lisäys epäonnistui ”%s”: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (valitsimet:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "SISÄINEN VIRHE: Virheellinen koodi uudelleenviitatuissa argumenteissa"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonotyyppi funktiossa expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "VIRHE: Tiedostonloppumerkki EOF argumenttiluettelossa"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "SISÄINEN VIRHE: Virheellinen merkkijonotyyppi funktiossa expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "SISÄINEN VIRHE: Virheellinen symbolityyppi funktiossa call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "VIRHE: Ylitettiin rekursioraja %d, käytä -L<N> sen muuttamiseen"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "VIRHE: moduulien alustus epäonnistui: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "VIRHE: ei löydy moduulia: ”%s”"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "VIRHE: ei löydy moduuleja: ”%s”: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "VIRHE: ei voi sulkea moduuleja"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "VIRHE: ei voida sulkea moduuleja: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "VIRHE: ei voida sulkea moduulia: ”%s”"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "VIRHE: ei voida sulkea moduulia: ”%s”: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "VIRHE: Ei voida luoda tilapäistä tiedostoa diversiota varten"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "VIRHE: Ei voida flush diversion tilapäiseen tiedostoon"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "VIRHE: Kopioidaan lisättyä tiedostoa"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "VIRHE: Luetaan lisättyä tiedostoa"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Ei voi suorittaa stat-diversiota"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversio on liian suuri"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Polkuetsintä kohteelle ”%s” löysi ”%s”"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-raja ylitetty?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Muistirajojen ylittäminen havaittu (SIGSEGV). Tapahtui joko pinon ylivuoto\n"
+"tai sitten on virhe kohteessa "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Tarkista mahdollinen päättymätön rekursiivisuus.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "SISÄINEN VIRHE: Virheellinen tila funktiolle symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nimi ”%s” on tuntematon\n"
diff --git a/po/fr.po b/po/fr.po
new file mode 100644
index 00000000..e8601ca9
--- /dev/null
+++ b/po/fr.po
@@ -0,0 +1,673 @@
+# Messages franais pour GNU m4.
+# Copyright 2004 Free Software Foundation, Inc.
+# Michel Robitaille <robitail@iro.umontreal.ca>, traducteur depuis/since 1996.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GNU m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2004-04-10 08:00-05:00\n"
+"Last-Translator: Michel Robitaille <robitail@IRO.UMontreal.CA>\n"
+"Language-Team: French <traduc@traduc.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+"Plural-Forms: nplurals=2; plural=(n > 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: l'option %s est ambigu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: l'option --%s ne permet pas un argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: l'option %c%s ne permet pas un argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: l'option %s requiert un argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: option non reconnue --%s \n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: option non reconnue %c%s \n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: option illgale -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: option invalide -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: l'option requiert un argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: l'option -W %s est ambigu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: l'option -W %s ne permet pas un argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "mmoire puise"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succs"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Pas de concordance"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Mauvaise expression rgulire"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Collation invalide de caractres"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nom invalide de classe de caractres"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barre oblique inverse de queue"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Rfrence arrire invalide"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ non pair"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( non pair"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ non pair"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contenu invalide de \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Borne finale invalide"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Mmoire puise"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Prcdente expression rgulire invalide"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fin prmature de l'expression rgulire"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expression rgulire trop grande"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) non pair"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Pas d'expression rgulire prcdente"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Attention: Trop peu d'arguments pour %s prdfini"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Attention: Les arguments superflus pour %s prdfini sont ignors"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argument non-numrique pour %s prdfini"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERREUR INTERNE: Mauvais type de lexme dans define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nom %s non-dfini"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERREUR INTERNE: Mauvais type de donnes pour lexme dans m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nom %s non-dfini"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERREUR INTERNE: Mauvais type de symbole dans m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Incapable d'ouvrir un pipe pour la commande %s "
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Base hors intervalle dans eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Largeur ngative dans eval "
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argument non-numrique pour %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Incapble de ramener la diversion %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Code de syntaxe %c non-dfini"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Incapable d'ouvrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: mauvais indicateurs de mise-au-point: %s "
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Incapable de prparer le fichier d'erreurs: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "ATTENTION: \\0 disparatra, utiliser \\& plutt pour les remplacements"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Mauvaise expression rgulire %s : %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erreur d'appariement pour l'expression rgulire %s "
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERREUR INTERNE: Mauvais type de donne pour de lexme (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Mauvaise expression dans eval (parenthse droite manquante): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Mauvaise expression dans eval : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Mauvaise expression dans eval (mauvaise entre): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Mauvaise expression dans eval (entre superflue): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division par zro dans eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Module par zro dans eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERREUR INTERNE: Mauvais code d'erreur dans evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur de comparaison dans cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur de dcalage dans shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERREUR INTERNE: Mauvais oprateur dans mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERREUR INTERNE: Prdfini introuvable dans la table des prdfinis!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERREUR INTERNE: Mauvais type de donne pour lexme dans freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Fin-de-ligne attendue du fichier fig"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Caractre %c attendu du fichier fig"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fichier fig difforme"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fin prmature de fichier fig"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr " %s dans le fichier fig est introuvable dans la table des prdfinis!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Entre reprise de %s, ligne %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Entre lue de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERREUR INTERNE: Utilisation rcursive de push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERREUR INTERNE: Mauvais appel init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERREUR INTERNE: Pile d'entre douteuse dans next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERREUR INTERNE: Pile d'entre douteuse dans peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "AUCUN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERREUR: Fin-de-fichier dans la chane"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERREUR: Dbordement de pile. (Rcursion sans fin sur define ?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Pour plus d'information, essayez %s --help .\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Usage: %s [OPTION]... [FICHIER]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Les arguments obligatoires ou optionnels pour la forme longue des\n"
+"options sont aussi obligatoires ou optionnels pour les formes courtes\n"
+"qui leur correspondent.\n"
+"\n"
+"Modes d'opration:\n"
+" --help fournir ce message d'aide, puis terminer\n"
+" --version identifier le programme, puis terminer\n"
+" -e, --interactive ne pas tamponner, ignorer les interruptions\n"
+" -E, --fatal-warnings terminer l'excution aprs le moindre message\n"
+" -Q, --quiet, --silent inhiber certains diagnostics prdfinis\n"
+" -P, --prefix-builtins prfixer tous les prdfinis par m4_ \n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP utiliser REGEXP pour les noms de macro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Options de chargement dynamique:\n"
+" -m, --module-directory=RPERTOIRE ajouter le RPERTOIRE au module du chemin de recherche\n"
+" -M, --load-module=MODULE charger le MODULE dynamique depuis M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Capacits de prprocesseur:\n"
+" -I, --include=REPERTOIRE ensuite fouiller ce rpertoire d'inclusions\n"
+" -D, --define=NOM[=VALEUR] dfinir NOM comme ayant VALEUR (ou vide)\n"
+" -U, --undefine=NOM liminer le NOM prdfini\n"
+" -s, --synclines engendrer des lignes #line NNN \"FICHIER\" \n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Contrle des limites:\n"
+" -G, --traditional inhiber toutes les extensions GNU\n"
+" -H, --hashsize=PREMIER choisir la grandeur de la table de symboles\n"
+" -L, --nesting-limit=NOMBRE modifier la limite artificielle d'imbrication\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fichiers d'tat fig:\n"
+" -F, --freeze-state=FICHIER produire un FICHIER fig la fin\n"
+" -R, --reload-state=FICHIER recharger un FICHIER fig au dpart\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Mise-au-point:\n"
+" -d, --debug=[INDICS] niveau de mise-au-point (implicitement aeq )\n"
+" -t, --trace=NOM tracer NOM lorsqu'il sera dfini\n"
+" -l, --arglength=NOMBRE restreindre la grandeur de trace des macros\n"
+" -o, --error-output=FICHIER rediriger la sortie de trace et mise-au-point\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"INDICS est une combinaison de:\n"
+" t tracer tous les appels de macro, pas uniquement les traceon \n"
+" a afficher les arguments vritables\n"
+" e afficher le rsultat de l'expension\n"
+" q mettre entre guillemets lorsque ncessaire, avec indics a ou e \n"
+" c afficher avant et aprs la collecte, puis aprs l'appel\n"
+" x ajouter une identification unique, utile avec l'indicateur c \n"
+" f donner le nom courant du fichier d'entre\n"
+" l donner le numro de la ligne d'entre\n"
+" p afficher les rsultats des fouilles de chemin\n"
+" i afficher les modifications dans les fichiers d'entre\n"
+" V abbrviation commode pour toutes les options prcdentes la fois\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Si aucun FICHIER ou si FICHIER vaut - , lit l'entre standard.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporter tout disfonctionnement mailto:bug-m4@gnu.org; et rapporter les\n"
+"problmes de francisation mailto:traduc@traduc.org.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Mauvais indicateurs de mise-au-point: %s "
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERREUR: chec de l'ajout du rpertoire de recherche %s "
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERREUR: chec de l'ajout du rpertoire de recherche %s : %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (options:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERREUR INTERNE: Mauvais code dans les arguments diffrs"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERREUR INTERNE: Mauvais type de lexme dans expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERREUR: Fin-de-fichier dans la liste d'arguments"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERREUR INTERNE: Mauvais type de donnes pour lexme dans expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERREUR INTERNE: Mauvais type de symbole dans call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERREUR: Limite de rcursion %d dpasse, la changer par -L<N>"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERREUR: ne peut initialiser le module: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERREUR: ne peut trouver le module: %s "
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERREUR: ne peut trouver le module: %s : %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERREUR: ne peut fermer les modules"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERREUR: ne peut fermer les module: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERREUR: ne peut fermer le module: %s "
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERREUR: ne peut fermer le module: %s : %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERREUR: Incapable de crer un fichier temporaire pour la diversion"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERREUR: Incapable de vider la diversion sur un fichier temporaire"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERREUR: Pendant la copie du fichier insr"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERREUR: Pendant la lecture d'un fichier insr"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Incapable d'oprer stat() pour la diversion"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Disversion trop grande"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "La fouille du chemin pour %s trouve %s "
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limit VMEM outrepasse?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Les violations de mmoire sont dtectes (SIGSEGV). Ou bien la pile a\n"
+"dbord, ou bien il y a un problme dans "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Vrifier une rcursion hors contrle.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERREUR INTERNE: Mode illgal dans symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Le nom %s est inconnu\n"
+
+#~ msgid "Undefined macro `%s'"
+#~ msgstr "Macro %s non-dfini"
+
+#~ msgid "Module search for `%s' found `%s'"
+#~ msgstr "Une fouille de module pour %s a fourni %s"
+
+#~ msgid "Bad regular expression: `%s': %s"
+#~ msgstr "Mauvaise expression rgulire: %s: %s"
+
+#~ msgid "INTERNAL ERROR: Input stack botch in pop_input ()"
+#~ msgstr "ERREUR INTERNE: Pile d'entre douteuse dans pop_input ()"
diff --git a/po/ga.po b/po/ga.po
new file mode 100644
index 00000000..120fed5e
--- /dev/null
+++ b/po/ga.po
@@ -0,0 +1,658 @@
+# Irish translations for m4.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Kevin Patrick Scannell <scannell@SLU.EDU>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-02-09 11:27-0500\n"
+"Last-Translator: Kevin Patrick Scannell <scannell@SLU.EDU>\n"
+"Language-Team: Irish <ga@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: T an rogha `%s' dbhroch\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `--%s'\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `%c%s'\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: n folir argint don rogha `%s'\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: rogha anaithnid `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: rogha anaithnid `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: rogha neamhcheadaithe -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: rogha neamhbhail -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: n folir argint don rogha -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: T an rogha `-W %s' dbhroch\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: n cheadatear argint i ndiaidh na rogha `-W %s'\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "cuimhne dithe"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Bua!"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Nl a leithid ann"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Slonn ionadaochta neamhbhail"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Carachtar neamhbhail cimheasa"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Aicme neamhbhail charachtair"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Clslais ag deireadh"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Cltagairt neamhbhail"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ n [^ corr"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( n \\( corr"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ corr"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "bhar neamhbhail idir \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Deireadh raoin neamhbhail"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Cuimhne dithe"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Is neamhbhail an slonn ionadaochta roimhe seo"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Deireadh le slonn ionadaochta gan choinne"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Slonn ionadaochta rmhr"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") n \\) corr"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Nl aon slonn ionadaochta roimhe seo"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Rabhadh: Nl go leor argint ann don fheidhm insuite `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Rabhadh: ag danamh neamhshuim ar argint breise don fheidhm insuite `%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argint neamhuimhriil don fheidhm insuite `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Ainm %s gan sainmhni"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ainm `%s' gan sainmhni"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "EARRID INMHENACH: Droch-chinel siombaile i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "N fidir popa a oscailt go hord `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Bunuimhir as raon i eval (bunuimhir = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Leithead diltach i eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argint neamhuimhriil chun %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "N fidir %s a d-atreor"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cd comhrire %c gan sainmhni"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "N fidir %s a oscailt"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Md dfhabhtaithe: drochbhratacha dfhabhtaithe: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "N fidir an comhad earride a shocr: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "RABHADH: Rachaidh \\0 as radharc, sid \\& ina ionad i dteaghrin ionadaochta"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Slonn ionadaochta neamhbhail `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Earrid le linn cuardaigh ar shlonn ionadaochta `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Slonn neamhbhail i eval (libn deas ar iarraidh): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Slonn neamhbhail i eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Slonn neamhbhail i eval (droch-ionchur): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Slonn neamhbhail i eval (ionchur sa bhreis): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Nialas san ainmneoir i eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo le nialas i eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "EARRID INMHENACH: Droch-chd earride i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir comparide i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir iomlaoide i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "EARRID INMHENACH: Drochoibreoir i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "EARRID INMHENACH: Nor aimsodh feidhm insuite sa tbla insuite!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "EARRID INMHENACH: Droch-chinel sonra comhartha i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ag sil le fotha lne i gcomhad sioctha"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ag sil le carachtar `%c' i gcomhad sioctha"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Comhad sioctha mchumtha"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Comhadchroch gan choinne i gcomhad sioctha"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "Nor aimsodh `%s' as comhad sioctha sa tbla insuite!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "D'fhill an t-ionchur ar %s, lne %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Ladh an t-ionchur %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "EARRID INMHENACH: push_string athchrsach!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "EARRID INMHENACH: Drochghlao ar init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "EARRID INMHENACH: Rinneadh praiseach den chruach ionchurtha i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "EARRID INMHENACH: Rinneadh praiseach den chruach ionchurtha i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NEAMHN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "EARRID: EOF i dteaghrn"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "EARRID: Cruach thar maoil. (Athchrsil `define' igrochta?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Bain triail as `%s --help' chun tuilleadh eolais a fhil.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "sid: %s [ROGHA]... [COMHAD]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Is riachtanach le rogha ghearr aon argint at riachtanach leis an rogha\n"
+"fhada. Mar an gcanna le hargint roghnacha.\n"
+"\n"
+"Mid oibre:\n"
+" --help taispein an chabhair seo agus scoir\n"
+" --version taispein eolas faoin leagan agus scoir\n"
+" -e, --interactive aschur gan maoln; gan idirbhristeacha\n"
+" -E, --fatal-warnings stop i ndiaidh an chad rabhaidh\n"
+" -Q, --quiet, --silent ceil roinnt rabhaidh d'fheidhmeanna insuite\n"
+" -P, --prefix-builtins iligh an rimr `m4_' ar gach feidhm insuite\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=SLONN sid SLONN do chomhrir na n-ainmneacha macra\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Gnithe maidir leis an lucht beo:\n"
+" -m, --module-directory=COMHADLANN cuir COMHADLANN sa chonair chuardach modl\n"
+" -M, --load-module=MODL luchtaigh MODL beo M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Gnithe an ramhphrisela:\n"
+" -I, --include=COMHADLANN cuardach COMHADLANN ar chomhaid cheanntisc\n"
+" -D, --define=AINM[=LUACH] iontril AINM le LUACH, is sin n folamh\n"
+" -U, --undefine=AINM scrios AINM insuite\n"
+" -s, --synclines gin lnte `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Rial na dteorainneacha:\n"
+" -G, --traditional mch gach eisnteacht GNU\n"
+" -H, --hashsize=PROMHA mid hais-tbla na siombail\n"
+" -L, --nesting-limit=UIMHIR athraigh an teorainn shaorga neadaithe\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Comhaid shioctha:\n"
+" -F, --freeze-state=COMHAD dan staid shioctha ag deireadh COMHAD\n"
+" -R, --reload-state=COMHAD athluchtaigh staid shioctha thosach an CHOMHAID\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Dfhabht:\n"
+" -d, --debug=[BRATACHA] socraigh an leibhal dfhabhtaithe (gan BRATACHA => `aeq')\n"
+" -t, --trace=AINM lorg AINM nuair at s sainmhnithe\n"
+" -l, --arglength=UIMHIR cuir teorainn le mid lorg macra\n"
+" -o, --error-output=COMHAD athsheol an t-aschur dfhabhtaithe/loirg\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"Is iad seo na BRATACHA:\n"
+" t lorg gach glao macra, n hamhin na cinn le `traceon'\n"
+" a taispein na forargint\n"
+" e taispein scaoileadh macra\n"
+" q sid athfhriotal ms g, leis an bhrat `a' n `e'\n"
+" c taispein roimh `collect', tar is `collect' agus tar is `call'\n"
+" x cuir aitheantas uathil macra leis, sideach le `c'\n"
+" f tabhair ainm an inchomhaid reatha\n"
+" l tabhair an lne-uimhir reatha ionchuir\n"
+" p taispein tortha na gcuardach conair\n"
+" i taispein athruithe in inchomhaid\n"
+" V gach ceann acu seo thuas\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Mura bhfuil COMHAD ann, n ms `-' , ligh n ionchur caighdenach.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Seol tuairisc fabhtanna chuig <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Bratacha neamhbhail dfhabhtaithe: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "EARRID: theip ar chur comhadlann chuardaigh `%s' leis"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "EARRID: theip ar chur comhadlann chuardaigh `%s' leis: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (roghanna:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "EARRID INMHENACH: Droch-chd sna hargint iarchurtha"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "EARRID INMHENACH: Droch-chinel comhartha i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "EARRID: EOF i liosta na n-argint"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "EARRID INMHENACH: Droch-chinel comhartha i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "EARRID INMHENACH: Droch-chinel siombaile i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "EARRID: Doimhneacht athchrsla nos m n an t-uasmhid %d, sid -L<N> chun a athr"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "EARRID: theip ar ths modil: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "EARRID: modl gan aimsi: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "EARRID: modl gan aimsi: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "EARRID: n fidir modil a dhnadh"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "EARRID: n fidir modil a dhnadh: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "EARRID: n fidir modl a dhnadh: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "EARRID: n fidir modl a dhnadh: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "EARRID: N fidir comhad sealadach a chruth le haghaidh atreoraithe"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "EARRID: N fidir atreor a shruthl go comhad sealadach"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "EARRID: Comhad ionsite chipeil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "EARRID: Comhad ionsite lamh"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "N fidir atreor a `stat'"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Atreor rmhr"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "D'aimsigh cuardach conaire ar `%s' seo a leanas: `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Teorainn VMEM sraithe?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Sraodh teorainneacha cuimhne (SIGSEGV). T cruach thar maoil, is\n"
+" sin n t fabht i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Seiceil nach bhfuil athchrsil igrochta ann.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "EARRID INMHENACH: Md neamhcheadaithe i symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Ainm `%s' anaithnid\n"
diff --git a/po/gl.po b/po/gl.po
new file mode 100644
index 00000000..cf8feac6
--- /dev/null
+++ b/po/gl.po
@@ -0,0 +1,661 @@
+# Galician translation of GNU m4
+# Copyright (C) 2000 Free Software Foundation, Inc.
+# Jacobo Tarrio <jtarrio@iname.com>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-06-14 11:15+02:00\n"
+"Last-Translator: Jacobo Tarrio <jtarrio@iname.com>\n"
+"Language-Team: Galician <gpul-traduccion@ceu.fi.udc.es>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=iso-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: a opcin `%s' ambigua\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: a opcin `--%s' non admite un argumento\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: a opcin `%c%s' non admite un argumento\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: a opcin `%s' precisa dun argumento\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opcin `--%s' descoecida\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opcin `%c%s' descoecida\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opcin non permitida -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opcin non vlida -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: a opcin precisa dun argumento -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: a opcin `-W %s' ambigua\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: a opcin `-W %s' non admite un argumento\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memoria esgotada"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "xito"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Non encaixa nada"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expresin regular non vlida"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Carcter de ordenamento incorrecto"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nome de clase de caracteres non vlido"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barra invertida fin da lia"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referencia cara a atrs non vlida"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ non emparellado"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( non emparellado"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ non emparellado"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contido de \\{\\} non vlido"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Fin de rango non vlida"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memoria esgotada"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresin regular precedente non vlida"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fin prematura da expresin regular"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresin regular grande de mis"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) non emparellado"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Non hai unha expresin regular anterior"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Aviso: Moi poucos parmetros para o `%s' predefinido"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Aviso: Os parmetros de mis para o `%s' predefinido foron ignorados"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Parmetro non numrico ao `%s' predefinido"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nome %s non definido"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nome `%s' non definido"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorrecto en m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Non se pode abrir un cano ao comando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "A base est fra dos lmites en eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Ancho negativo en eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Parmetro non numrico para %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Non se pode endereitar %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cdigo de sintaxe %c non definido"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Non se pode abrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: modificadores de depuracin incorrectos: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Non se pode estabrece-lo ficheiro de erros: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVISO: \\0 ha desaparecer, empregue \\& no seu canto nas substitucins"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresin regular `%s' incorrecta: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erro ao compara-la expresin regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresin incorrecta en eval (falla a parntese dereita): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresin incorrecta en eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresin incorrecta en eval (entrada incorrecta): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresin incorrecta en eval (entrada excesiva): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Divisin por cero en eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Resto da divisin por cero en eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERRO INTERNO: Cdigo de erro incorrecto en evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERRO INTERNO: Operador de comparacin incorrecto en cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERRO INTERNO: Operador de desprazamento incorrecto en shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERRO INTERNO: Operador incorrecto en mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida non atopada na tboa de predefinidas!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERRO INTERNO: Tipo de dato incorrecto no elemento en freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Esperbase un salto de lia no ficheiro conxelado"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Esperbase o carcter `%c' no ficheiro conxelado"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Ficheiro conxelado mal formatado"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fin prematura do ficheiro conxelado"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' do ficheiro conxelado non se atopou na tboa de predefinidas!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "A entrada levouse a %s, lia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Lese a entrada de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERRO INTERNO: push_string recursivo!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERRO INTERNO: Chamada incorrecta a init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERRO INTERNO: Fallo na pila de entrada en next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERRO INTERNO: Fallo na pila de entrada en peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NINGN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERRO: fin de ficheiro na cadea"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERRO: Desbordamento da pila. (Recursin infinita de defines?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Escriba `%s --help' para obter mis informacin.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Uso: %s [OPCIN]... [FICHEIRO]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Os parmetros obrigatorios ou opcionais nas opcins longas son tamn\n"
+"obrigatorios ou opcionais nas opcins curtas.\n"
+"\n"
+"Modos de funcionamento:\n"
+" --help amosar esta axuda e sair\n"
+" --version amosar informacin sobre a versin e sair\n"
+" -e, --interactive non usar un buffer de saida, ignora-las\n"
+" interrupcins\n"
+" -E, --fatal-warnings dete-la execucin tralo primeiro aviso\n"
+" -Q, --quiet, --silent suprimir algns avisos das predefinidas\n"
+" -P, --prefix-builtins forzar un prefixo `m4_' en tdalas predefinidas\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP usar REGEXP para a sintaxe dos nomes das macros\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Caractersticas de carga dinmica:\n"
+" -m, --module-directory=DIRECTORIO engadi-lo DIRECTORIO ruta de busca\n"
+" de mdulos\n"
+" -M, --load-module=MDULO carga-lo MDULO dinmico de M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Caractersticas do preprocesador:\n"
+" -I, --include=DIRECTORIO buscar tamn neste directorio por ficheiros\n"
+" a incluir\n"
+" -D, --define=NOME[=VALOR] introduci-lo NOME contendo o VALOR, ou baleiro\n"
+" -U, --undefine=NOME borra-la predefinida NOME\n"
+" -s, --synclines xerar lias `#line NM \"FICHEIRO\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control de lmites:\n"
+" -G, --traditional suprimir tdalas extensins GNU\n"
+" -H, --hashsize=PRIMO estabrece-lo tamao da tboa hash de smbolos\n"
+" -L, --nesting-limit=NMERO cambia-lo lmite artificial de aniamento\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Ficheiros de estado conxelado:\n"
+" -F, --freeze-state=FICHEIRO producir un estado conxelado fin do FICHEIRO\n"
+" -R, --reload-state=FICHEIRO cargar un estado conxelado do principio do\n"
+" FICHEIRO\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Depuracin:\n"
+" -d, --debug=[OPCINS] estabrece-lo nivel de depuracin (se non se\n"
+" indican opcins suponse `aeq')\n"
+" -t, --trace=NOME seguir NOME cando estea definido\n"
+" -l, --arglength=NM restrinxi-lo tamao do seguemento das macros\n"
+" -o, --error-output=FICHEIRO redirixi-la saida de depuracin e seguemento\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"OPCINS unha de:\n"
+" t seguemento de tdalas chamadas a macros, non s nas que teen traceon\n"
+" a amosa-los parmetros\n"
+" e amosa-la expansin\n"
+" q cita-los valores cando sexa preciso, coas opcins a ou e\n"
+" c amosar antes da obtencin, despois da obtencin e despois da chamada\n"
+" x engadir un identificador nico de chamada macro, til coa opcin c\n"
+" f dici-lo nome do ficheiro de entrada actual\n"
+" l dici-lo nmero da lia de entrada actual\n"
+" p amosa-los resultados das buscas nas rotas\n"
+" i amosa-los cambios nos ficheiros de entrada\n"
+" V forma curta de poer tdalas opcins de enriba\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nSe non se indica un FICHEIRO ou se o FICHEIRO `-', lese da entrada estndar.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\nInforme dos erros a <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Opcins de depuracin incorrectas: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERRO: non se puido engadi-lo directorio de busca `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERRO: non se puido engadi-lo directorio de busca `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opcins:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERRO INTERNO: Cdigo incorrecto nos parmetros pospostos"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorrecto en expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERRO: Fin de ficheiro na lista de parmetros"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorrecto en expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorrecto en call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERRO: Lmite de %d recursins sobrepasado, empregue -L<N> para cambialo"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERRO: non se puido inicializar uns mdulos: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERRO: non se puido atopar un mdulo: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERRO: non se puido atopar un mdulo: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERRO: non se puido pecha-los mdulos"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERRO: non se puido pechar uns mdulos: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERRO: non se puido pechar un mdulo: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERRO: non se puido pechar un mdulo: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERRO: Non se puido crear un ficheiro temporal para o desvo"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERRO: Non se pode estabrece-lo desvo a un ficheiro temporal"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERRO: Copiando o ficheiro insertado"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERRO: Lendo o ficheiro insertado"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Non se pode facer unha operacin de stat sobre un desvo"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Desvo grande de mis"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "A busca de rotas de `%s' atopou `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Lmite de VMEM sobrepasado?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violacin dos lmites de memoria detectada (SIGSEGV). Ou ocorreu un\n"
+"desbordamento de pila ou hai un bug en "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Busque unha posible recursin infinita.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERRO INTERNO: Modo incorrecto para symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "O nome `%s' descoecido\n"
+
+#~ msgid "Undefined macro `%s'"
+#~ msgstr "Macro non definida `%s'"
+
+#~ msgid "Module search for `%s' found `%s'"
+#~ msgstr "A bsqueda de mdulo de `%s' atopou `%s'"
diff --git a/po/id.po b/po/id.po
new file mode 100644
index 00000000..c1a2e8b2
--- /dev/null
+++ b/po/id.po
@@ -0,0 +1,659 @@
+# m4-1.4o (Indonesian).
+# Copyright (C) 1998 Free Software Foundation, Inc.
+# Tedi Heriyanto <tedi_h@gmx.net>, 2000,2001,2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-07-24 21:21GMT+0700\n"
+"Last-Translator: Tedi Heriyanto <tedi_h@gmx.net>\n"
+"Language-Team: Indonesian <translation-team-id@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: option `%s' rancu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: option `--%s' tidak membolehkan sebuah argumen\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: option `%c%s' tidak membolehkan sebuah argumen\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: option `%s' membutuhkan sebuah argumen\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: option tidak dikenal `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: option tidak dikenal `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: option ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: option tidak valid -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: option membutuhkan sebuah argumen -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: option `-W %s' rancu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: option `-W %s' tidak membolehkan sebuah argumen\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memori habis"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Sukses"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Tidak ada kecocokan"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ekspresi Reguler tidak valid"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Karakter kolasi tidak valid"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nama kelas karakter tidak valid"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Trailing backslash"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referensi balik tidak valid"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ atau [^ tidak cocok"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( atau \\( tidak cocok"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ tidak cocok"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Isi \\{\\} tidak valid"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Akhir range tidak valid"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memori habis"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Regular ekspresi sebelumnya tidak valid"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Akhir regular ekspresi yang prematur"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Regular ekspresi terlalu besar"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") atau \\) tidak cocok"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Tidak ada regular ekspresi sebelumnya"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Peringatan: Argumen terlalu sedikit untuk built-in `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Peringatan: Argumen terlalu banyak untuk built-in `%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argumen non-numerik untuk built-in `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "KESALAHAN INTERNAL: Tipe data token buruk dalam define_macro()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nama yang tak terdefinisi %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "KESALAHAN INTERNAL: Builtin tidak ditemukan dalam tabel builtin!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "KESALAHAN INTERNAL: tipe token data buruk dalam m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nama yang tak terdefinisi `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "KESALAHAN INTERNAL: tipe simbol buruk dalam m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Tidak dapat membuka pipe untuk perintah `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Radix dalam eval di luar jangkauan (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Lebar negatif untuk eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argumen non-numerik untuk %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Tidak dapat mendivert %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Kode sintaks %c tak terdefinisi"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Tidak dapat membuka %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: flag debug buruk: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Tidak dapat menset error file: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "PERINGATAN: \\0 akan hilang, gunakan \\& sebagai gantinya"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Ekspresi Reguler yang buruk `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Kesalahan mencocokkan ekspresi reguler `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "KESALAHAN INTERNAL: Builtin tidak ditemukan dalam tabel builtin! (trace_pre())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "KESALAHAN INTERNAL: tipe data token buruk (trace_pre())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Ekspresi buruk dalam eval (tanda kurung kanan tidak ada): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Ekspresi buruk dalam eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Ekspresi buruk dalam eval (input buruk): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Ekspresi buruk dalam eval (input berlebih): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Pembagian dengan nol dalam eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulus dengan nol dalam eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "KESALAHAN INTERNAL: Kode kesalahan buruk dalam evaluate()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "KESALAHAN INTERNAL: operator perbandingan buruk dalam cmp_term()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "KESALAHAN INTERNAL: operator shift buruk dalam shift_term()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "KESALAHAN INTERNAL: operator buruk dalam mult_term()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "KESALAHAN INTERNAL: builtin tidak ditemukan dalam tabel builtin"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "KESALAHAN INTERNAL: tipe data token buruk dalam freeze_one_symbol()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Mengharapkan line feed dalam frozen file"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Mengharapkan karakter `%c' dalam frozen file"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Frozen file dalam format buruk"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Akhir frozen file prematur"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' dari frozen file tidak ditemukan dalam tabel builtin!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Input dikembalikan ke %s, baris %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Input membaca dari %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "KESALAHAN INTERNAL: push_string rekursif"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "KESALAHAN INTERNAL: panggilan buruk ke init_macro_token()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "KESALAHAN INTERNAL: stack input kacau dalam next_char()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "KESALAHAN INTERNAL: stack input kacau dalam peek_input()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "TIDAK ADA"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "KESALAHAN: EOF dalam string"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "KESALAHAN: stack overflow. (Rekursi tidak terbatas?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Coba `%s --help' untuk informasi lebih lanjut.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Pemakaian: %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumen opsional atau mandatori untuk opsion panjang juga berlaku \n"
+"untuk opsion pendek.\n"
+"\n"
+"Mode operasi:\n"
+" --help menampilkan bantuan ini dan keluar\n"
+" --version menampilkan informasi versi dan keluar\n"
+" -e, --interactive output unbuffer, abaikan interrupt\n"
+" -E, --fatal-warnings akhir eksekusi setelah peringatan pertama\n"
+" -Q, --quiet, --silent hilangkan beberapa peringatan builtin\n"
+" -P, --prefix-builtins paksa prefix `m4_' untuk seluruh builtin\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP gunakan REGEXP untuk sintaks nama makro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Fitur loading dinamis:\n"
+" -m, --module-directory=DIRECTORY tambah DIRECTORY ke path pencarian modul\n"
+" -M, --load-module=MODULE muat MODULE dinamik dari M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Feature preprosesor:\n"
+" -I, --include=DIREKTORI cari direktori ini untuk include\n"
+" -D, --define=NAMA[=NILAI] masukkan NAMA yang bernilai NILAI, atau kosong\n"
+" -U, --undefine=NAMA hapus builtin NAMA\n"
+" -s, --synclines hasilkan baris `#line NO \"FILE\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Kendali batas:\n"
+" -G, --traditional tiadakan seluruh ekstensi GNU\n"
+" -H, --hashsize=PRIME set ukuran tabel simbol lookup hash\n"
+" -L, --nesting-limit=NUMBER rubah batas sarang buatan\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"File frozen state:\n"
+" -F, --freeze-state=FILE hasilkan frozen state pada FILE di akhir\n"
+" -R, --reload-state=FILE reload frozen state dari FILE di awal\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set level debug (tidak ada FLAGS berarti `aeq')\n"
+" -t, --trace=NAMA trace NAMA ketika akan didefinisikan\n"
+" -l, --arglength=NUM batasi ukuran tracing makro\n"
+" -o, --error-output=FILE redireksi output debug dan trace\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS adalah:\n"
+" t trace seluruh panggilan makro, tidak hanya saat traceon\n"
+" a tampilkan seluruh argumen aktual\n"
+" e tampilkan ekspansi\n"
+" q cuplik nilai seperlunya, dengan flag a atau e\n"
+" c tampilkan sebelum, setelah koleksi dan setelah panggilan\n"
+" x tambahkan id panggilan makro unik, berguna dengan flag c\n"
+" f beritahu nama file input saat ini\n"
+" l beritahu nomor baris file input saat ini\n"
+" p tampilkan hasil pencarian path\n"
+" i tampilkan perubahan dalam file input\n"
+" V kependekan untuk seluruh flag di atas\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jika tidak ada FILE atau jika FILE adalah `-', baca dari std input.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Laporkan bug ke <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Flag debug buruk: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERROR: gagal menambah direktori pencarian `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERROR: gagal menambah direktori pencarian`%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opsi:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam deferred arguments"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam expand_token()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "KESALAHAN: EOF dalam daftar argumen"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "KESALAHAN INTERNAL: tipe token buruk dalam expand_argumen()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "KESALAHAN INTERNAL: tipe simbol buruk dalam call_macro()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "KESALAHAN: batas rekursi %d terlampaui, gunakan -L<N> untuk merubahnya"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERROR: gagal inisialisasi modul: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERROR: tidak dapat menemukan modul: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERROR: tidak dapat menemukan modul `%s':%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERROR: tidak dapat menutup modul "
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERROR: tidak dapat menutup modul %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERROR: tidak dapat menutup modul: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERROR: tidak dapat menutup modul: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "KESALAHAN: tidak dapat membuat file temporer untuk diversi"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "KESALAHAN: tidak dapat memflush diversi ke file temporer"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "KESALAHAN: menyalinkan file yang disisipkan"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "KESALAHAN: membaca file yang disisipkan"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Tidak dapat mendiversi"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversi terlalu besar"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Mencari path untuk `%s' menemukan `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Batas VMEM terlampaui?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Pelanggaran batas memori terdeteksi (SIGSEGV). Mungkin terdapat stack\n"
+"overflow atau terdapat bug di dalamnya "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Memeriksa kemungkinan rekursi tak terbatas.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "KESALAHAN INTERNAL: mode ilegal untuk symbol_lookup()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nama `%s' tidak dikenal\n"
diff --git a/po/insert-header.sin b/po/insert-header.sin
new file mode 100644
index 00000000..b26de01f
--- /dev/null
+++ b/po/insert-header.sin
@@ -0,0 +1,23 @@
+# Sed script that inserts the file called HEADER before the header entry.
+#
+# At each occurrence of a line starting with "msgid ", we execute the following
+# commands. At the first occurrence, insert the file. At the following
+# occurrences, do nothing. The distinction between the first and the following
+# occurrences is achieved by looking at the hold space.
+/^msgid /{
+x
+# Test if the hold space is empty.
+s/m/m/
+ta
+# Yes it was empty. First occurrence. Read the file.
+r HEADER
+# Output the file's contents by reading the next line. But don't lose the
+# current line while doing this.
+g
+N
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ja.po b/po/ja.po
new file mode 100644
index 00000000..3722ddd2
--- /dev/null
+++ b/po/ja.po
@@ -0,0 +1,1286 @@
+# Japanese messages for GNU m4.
+# Copyright (C) 2000, 2010 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Akiko Matsushita <matusita@sra.co.jp>, 1996.
+# Masahito Yamaga <yamaga@ipc.chiba-u.ac.jp>, 2002.
+# GOTO Masanori <gotom@debian.or.jp>, 2006.
+# derived from the version by Yasuyuki Furukawa <yasu@on.cs.keio.ac.jp> 1998.
+# Jun Nishii <jun@flatout.org> 1999.
+# Daisuke Yamashita <yamad@mb.infoweb.ne.jp> 1999.
+# Yasuaki Taniguchi <yasuakit@gmail.com>, 2011.
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2011-10-23 08:32+0900\n"
+"Last-Translator: Yasuaki Taniguchi <yasuakit@gmail.com>\n"
+"Language-Team: Japanese <translation-team-ja@lists.sourceforge.net>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: オプション `%s' は曖昧です\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: オプション `--%s' は引数を取ることができません\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: オプション `%c%s' は引数を取ることができません\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: オプション `%s' には引数が必要です\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: --%s は認識されないオプションです\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: `%c%s' は認識されないオプションです\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: 不正なオプション -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: %c は無効なオプションです。\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: %c オプションには引数が必要です\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: オプション '-W %s' は曖昧です\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: オプション '-W %s' は引数を取ることができません\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "メモリを使い果たしました"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功です"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "一致しません"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "無効な正規表現です"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "無効な照合文字です"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "無効な文字クラス名です"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "終端のバックスラッシュ"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "無効な前方参照です"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ または [^ が不一致です"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( または \\( が不一致です"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ が不一致です"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} の中身が無効です"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "無効な範囲終了です"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "メモリを使い果たしました"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "無効な前方正規表現です"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "正規表現が途中で終了しました"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正規表現が大きすぎます"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") または \\) が不一致です"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "以前に正規表現がありません"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告: ビルトイン `%s' に対する引数が不足しています"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告: ビルトイン `%s' に対する引数が多すぎます (超過分は無視されます)"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "ビルトイン `%s' に非数字の引数が渡されています"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "内部エラー:関数 define_macro () 内のトークンデータの種類に誤りがあります"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "%s という名前は定義されていません"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "内部エラー:ビルトインテーブルにビルトインが見つかりません!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "内部エラー:関数 m4_dumpdef () 内のトークンデータの種類に誤りがあります"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "`%s' という名前は定義されていません"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "内部エラー:関数 m4_defn () 内のシンボルの種類に誤りがあります"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "コマンド `%s' に対するパイプを開けません"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "eval の基数 ( %d 進法) の桁数が許容範囲外にあります"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "eval の出力桁数が負数になっています"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s に数字でない引数が渡されています"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "%s を undivert できません"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "構文コード %c は定義されていません"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "%s を開くことが出来ません"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "デバッグモード: 誤ったデバッグフラグです: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "エラーファイルとして設定できません: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告: \\0 は廃止されます。置換の際には代わりに \\& を使用してください"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "正規表現 `%s' に誤りがあります: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "正規表現 `%s' の一致処理に失敗しました"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "内部エラー:ビルトインテーブルにビルトインが見つかりません! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "内部エラー:トークンデータの種類に誤りがあります (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "eval 中の計算式に誤りがあります (閉じる小括弧がありません): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "eval 中の計算式に誤りがあります: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "eval 中の計算式に誤りがあります (誤った入力): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "eval 中の計算式に誤りがあります (入力超過): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "eval 中に 0 による除算があります: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "eval 中に 0 による剰余計算があります: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "内部エラー: evaluate () 内のエラーコードに誤りがあります"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "内部エラー: cmp_term () 内の比較演算子に誤りがあります"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "内部エラー: shift_term () 内のシフト演算子に誤りがあります"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "内部エラー: mult_term () 内の演算子に誤りがあります"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "内部エラー: ビルトインテーブルにビルトインが見つかりません!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "内部エラー: freeze_one_symbol () 内のトークンデータの種類に誤りがあります"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "凍結ファイル内で改行が予期されます"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "凍結ファイル内で文字 `%c' が予期されます"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "不正な書式の凍結ファイルです"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "凍結ファイルのファイル終端 (EOF) が早すぎます"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "凍結ファイルの `%s' がビルトインテーブル内にありません!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "入力が %s へ戻されました (行 %d)"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "%s から入力を読み込みます"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "内部エラー: 再帰的な push_string です!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "内部エラー: init_macro_token () の誤った呼び出しです"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "内部エラー: next_char () 内で入力スタックが壊れました"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "内部エラー: peek_input () 内で入力スタックが壊れました"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "エラー: 文字列内でファイル終端 (EOF) に達しました"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "エラー: スタックオーバーフローです。(無限に再帰定義をしていませんか?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "詳しくは `%s --help' を実行して下さい。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "使用法: %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"長い形式のオプションで必須または任意の引数は、それに対応する短い形式の\n"
+"オプションでも同様に必須または任意です。\n"
+"\n"
+"操作モード:\n"
+" --help オプション一覧を出力し、終了する\n"
+" --version バージョン情報を出力し、終了する\n"
+" -e, --interactive 出力バッファリングせず、割り込みを無視する\n"
+" -E, --fatal-warnings 最初の警告で実行を中止する\n"
+" -Q, --quiet, --silent ビルトインのいくつかの警告を抑止する\n"
+" -P, --prefix-builtins 全てのビルトインに `m4_' という接頭辞を\n"
+" 強制的に付加する\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr ""
+" -W, --word-regexp=REGEXP マクロ名の構文として正規表現 REGEXP\n"
+" を使用する\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"動的ローディング機能:\n"
+" -m, --module-directory=DIRECTORY モジュール検索パスに DIRECTORY を加える\n"
+" -M, --load-module=MODULE M4MODPATH から動的に MODULE をロードする\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"プリプロセッサ機能:\n"
+" -I, --include=DIRECTORY 2番目のインクルードディレクトリとして DIRECTORY\n"
+" を検索する\n"
+" -D, --define=NAME[=VALUE] NAME の値を VALUE に設定する。省略した場合は\n"
+" 空になる\n"
+" -U, --undefine=NAME NAME ビルトインを削除する\n"
+" -s, --synclines `#line NO \"FILE\"' 行を生成する\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"制限の制御:\n"
+" -G, --traditional 全ての GNU 拡張を抑止する\n"
+" -H, --hashsize=PRIME シンボル検索のハッシュテーブルサイズを設定する\n"
+" -L, --nesting-limit=NUMBER ネストの制限を人為的に NUMBER に変更する\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"凍結状態のファイル:\n"
+" -F, --freeze-state=FILE 最後に指定された FILE を凍結状態にします。\n"
+" -R, --reload-state=FILE 最初に指定された FILE から\n"
+" 凍結された定義をロードします\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"デバッグ:\n"
+" -d, --debug=[FLAGS] デバッグレベルを設定する (FLAGS を指定しない\n"
+" 場合は暗黙的に `aeq' となる)\n"
+" -t, --trace=NAME NAME が定義されたらトレースを行う\n"
+" -l, --arglength=NUM マクロのトレースサイズを NUM に制限する\n"
+" -o, --error-output=FILE デバッグとトレースの出力を FILE にリダイレ\n"
+" クトする\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAG は以下のいずれかです:\n"
+" t 全てのマクロ呼びだしをトレースする\n"
+" (traceon によるものに限定しない)\n"
+" a 実際の引数を表示する\n"
+" e 展開されたものを表示する\n"
+" q `a' または `e' と共に用い、必要に応じて値を引用符で囲む\n"
+" c 訂正前と訂正後、呼出後に表示する\n"
+" x そのマクロコールに固有の ID を追加する。\n"
+" `c' と組み合わせると役に立つ\n"
+" f 現在の入力ファイル名を表示する\n"
+" l 現在の入力行数を表示する\n"
+" p パス検索の結果を表示する\n"
+" i 入力ファイルの変化を表示する\n"
+" V 上記すべての FLAG の短縮形\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"FILE が指定されていない場合および指定されたファイルが `-' の場合は\n"
+" 標準入力が読み込まれます。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"バグを発見したら <bug-m4@gnu.org> に報告して下さい。\n"
+"翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してください。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "不正なデバッグフラグ: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "エラー: 検索ディレクトリ `%s' の追加に失敗しました"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "エラー: 検索ディレクトリ `%s' の追加に失敗しました: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (オプション:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "内部エラー:オプションの後処理で、不正コードが検出されました。"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "内部エラー:関数 expand_token () 内のトークンの種類が不正です。"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "エラー: 引数リスト内にファイルの終端記号があります。"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "内部エラー:関数 expand_argument () のトークンの種類が不正です。"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "内部エラー:関数 call_macro () 内のシンボルの種類が不正です。"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ""
+"エラー:再帰的定義のネストが指定された値 %d を超えています。\n"
+" -L<数字> オプションを用いてネスト数の上限を増やして下さい。"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERROR: モジュールの初期化に失敗しました: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERROR: モジュールが見つかりません: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERROR: モジュールが見つかりません: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERROR: モジュールを閉じることが出来ません"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr ""
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERROR: モジュールを閉じることができません: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr ""
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "エラー: divert のためのテンポラリファイルが作成できません。"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "エラー: テンポラリファイルに divert すべき内容を write できません。"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "エラー: 挿入されるべきファイルをコピー中です。"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "エラー: 挿入されるべきファイルをリード中です。"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr ""
+"divert のためのファイルのステータスを得ることができません。\n"
+" (stat できません。)"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "divert が大きすぎます"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "`%s' というディレクトリから `%s' というファイルを見つけました。"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "リソース値 RLIMIT_VMEM を超えていませんか?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"メモリ (セグメンテーション違反) が検出されました。\n"
+" スタックがオーバーフローしている、あるいはバグが存在する\n"
+" 可能性があります。"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". 無限の再帰呼び出しが行われていないかどうかチェックして下さい。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "内部エラー: symbol_lookup () に対するモードが不正です"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "`%s' という名前は不明です\n"
+
+#~ msgid "ambiguous argument %s for %s"
+#~ msgstr "%2$s に対する引数 %1$s が曖昧です"
+
+#~ msgid "Valid arguments are:"
+#~ msgstr "有効な引数:"
+
+#~ msgid "ARGP_HELP_FMT: %s value is less than or equal to %s"
+#~ msgstr "ARGP_HELP_FMT: %s の値は %s の値以下です"
+
+#~ msgid "%.*s: ARGP_HELP_FMT parameter requires a value"
+#~ msgstr "%.*s: ARGP_HELP_FMT パラメータには値が必要です"
+
+#~ msgid "%.*s: ARGP_HELP_FMT parameter must be positive"
+#~ msgstr "%.*s: ARGP_HELP_FMT パラメータは正の値でなければいけません"
+
+#~ msgid "%.*s: Unknown ARGP_HELP_FMT parameter"
+#~ msgstr "%.*s: 不明な ARGP_HELP_FMT パラメータ"
+
+#~ msgid "Garbage in ARGP_HELP_FMT: %s"
+#~ msgstr "ARGP_HELP_FMT 中にごみがあります: %s"
+
+#~ msgid "Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options."
+#~ msgstr "長い形式のオプションで必須または任意の引数は、それに対応する短い形式のオプションでも同様に必須または任意です。"
+
+#~ msgid "Usage:"
+#~ msgstr "使用法:"
+
+#~ msgid " or: "
+#~ msgstr "または: "
+
+#~ msgid " [OPTION...]"
+#~ msgstr " [OPTION...]"
+
+#~ msgid "Unknown system error"
+#~ msgstr "不明なシステムエラー"
+
+#~ msgid "give this help list"
+#~ msgstr "このヘルプを表示する"
+
+#~ msgid "give a short usage message"
+#~ msgstr "短い使用方法を表示する"
+
+#~ msgid "NAME"
+#~ msgstr "名前"
+
+#~ msgid "set the program name"
+#~ msgstr "プログラム名を設定する"
+
+#~ msgid "SECS"
+#~ msgstr "SECS"
+
+#~ msgid "hang for SECS seconds (default 3600)"
+#~ msgstr "SECS 秒でハング (デフォルト 3600)"
+
+#~ msgid "print program version"
+#~ msgstr "プログラムのバージョンを表示する"
+
+#~ msgid "(PROGRAM ERROR) No version known!?"
+#~ msgstr "(プログラムエラー) 不明なバージョン!?"
+
+#~ msgid "%s: Too many arguments\n"
+#~ msgstr "%s: 引数が多すぎます\n"
+
+#~ msgid "(PROGRAM ERROR) Option should have been recognized!?"
+#~ msgstr "(プログラムエラー) オプションは認識されているべきです!?"
+
+#~ msgid "program error"
+#~ msgstr "プログラムエラー"
+
+#~ msgid "stack overflow"
+#~ msgstr "スタックオーバーフロー"
+
+#~ msgid "cannot find a temporary directory, try setting $TMPDIR"
+#~ msgstr "一時ディレクトリを作成できません。 $TMPDIR を設定してみてください"
+
+#~ msgid "cannot create a temporary directory using template \"%s\""
+#~ msgstr "テンプレート \"%s\" を使用した一時ディレクトリを作成できません"
+
+#~ msgid "cannot remove temporary directory %s"
+#~ msgstr "一時ディレクトリ %s を削除できません"
+
+#~ msgid "error closing file"
+#~ msgstr "ファイルクローズエラー"
+
+#~ msgid "write error"
+#~ msgstr "書き込みエラー"
+
+#~ msgid "preserving permissions for %s"
+#~ msgstr "%s のパーミッションを保存しています"
+
+#~ msgid "error while opening \"%s\" for reading"
+#~ msgstr "\"%s\"を読込むため開いている際にエラーが発生しました"
+
+#~ msgid "cannot open backup file \"%s\" for writing"
+#~ msgstr "書込み用バックアップファイル\"%s\"を開くことができません"
+
+#~ msgid "error reading \"%s\""
+#~ msgstr "\"%s\"の読込み中にエラーが発生しました"
+
+#~ msgid "error writing \"%s\""
+#~ msgstr "\"%s\"の書込み中にエラーが発生しました"
+
+#~ msgid "error after reading \"%s\""
+#~ msgstr "\"%s\"の読込み後にエラーが発生しました"
+
+#~ msgid "fdopen() failed"
+#~ msgstr "fdopen()に失敗しました"
+
+#~ msgid "C# compiler not found, try installing pnet"
+#~ msgstr "C# コンパイラが見つりません。pnet をインストールしてみてください"
+
+#~ msgid "C# virtual machine not found, try installing pnet"
+#~ msgstr "C# 仮想マシンが見つかりません。pnet をインストールしてみてください"
+
+#~ msgid "%s subprocess failed"
+#~ msgstr "%s サブプロセスが失敗しました"
+
+#~ msgid "regular empty file"
+#~ msgstr "通常の空ファイル"
+
+#~ msgid "regular file"
+#~ msgstr "通常ファイル"
+
+#~ msgid "directory"
+#~ msgstr "ディレクトリ"
+
+#~ msgid "block special file"
+#~ msgstr "ブロックスペシャルファイル"
+
+#~ msgid "character special file"
+#~ msgstr "キャラクタスペシャルファイル"
+
+#~ msgid "fifo"
+#~ msgstr "fifo"
+
+#~ msgid "symbolic link"
+#~ msgstr "シンボリックリンク"
+
+#~ msgid "socket"
+#~ msgstr "ソケット"
+
+#~ msgid "message queue"
+#~ msgstr "メッセージキュー"
+
+#~ msgid "semaphore"
+#~ msgstr "セマフォ"
+
+#~ msgid "shared memory object"
+#~ msgstr "共有メモリオブジェクト"
+
+#~ msgid "typed memory object"
+#~ msgstr "型付メモリオブジェクト"
+
+#~ msgid "weird file"
+#~ msgstr "不明なファイル"
+
+#~ msgid "Address family for hostname not supported"
+#~ msgstr "ホスト名に対する Address family がサポートされていません"
+
+#~ msgid "Temporary failure in name resolution"
+#~ msgstr "名前解決に一時的に失敗しました"
+
+#~ msgid "Bad value for ai_flags"
+#~ msgstr "ai_flags に対する誤った値です"
+
+#~ msgid "Non-recoverable failure in name resolution"
+#~ msgstr "名前解決でリカバリできない失敗が発生しました"
+
+#~ msgid "ai_family not supported"
+#~ msgstr "ai_family はサポートされていません"
+
+#~ msgid "Memory allocation failure"
+#~ msgstr "メモリ配置に失敗しました"
+
+#~ msgid "No address associated with hostname"
+#~ msgstr "ホスト名にアドレスが割り当てられていません"
+
+#~ msgid "Servname not supported for ai_socktype"
+#~ msgstr "ai_socktype に対して Servname がサポートされていません"
+
+#~ msgid "ai_socktype not supported"
+#~ msgstr "ai_socktype はサポートされていません"
+
+#~ msgid "System error"
+#~ msgstr "システムエラー"
+
+#~ msgid "Argument buffer too small"
+#~ msgstr "引数バッファが小さすぎます"
+
+#~ msgid "Processing request in progress"
+#~ msgstr "要求された処理は実行中です"
+
+#~ msgid "Request canceled"
+#~ msgstr "要求がキャンセルされました"
+
+#~ msgid "Request not canceled"
+#~ msgstr "要求がキャンセルされませんでした"
+
+#~ msgid "All requests done"
+#~ msgstr "すべての要求が完了しました"
+
+#~ msgid "Interrupted by a signal"
+#~ msgstr "シグナル割り込みが発生しました"
+
+#~ msgid "Parameter string not correctly encoded"
+#~ msgstr "パラメーター文字列が正しくエンコードされていません"
+
+#~ msgid "Unknown error"
+#~ msgstr "不明なエラー"
+
+#~ msgid "invalid source_version argument to compile_java_class"
+#~ msgstr "compile_java_class への source_version 引数が無効です"
+
+#~ msgid "invalid target_version argument to compile_java_class"
+#~ msgstr "compile_java_class への target_version 引数が無効です"
+
+#~ msgid "failed to create \"%s\""
+#~ msgstr "\"%s\" の作成に失敗しました"
+
+#~ msgid "error while writing \"%s\" file"
+#~ msgstr "\"%s\" ファイルの書き込み中にエラーが発生しました"
+
+#~ msgid "Java compiler not found, try installing gcj or set $JAVAC"
+#~ msgstr "Java コンパイラが見つかりません。 gcj をインストールするか、またはt $JAVAC を設定してみてください"
+
+#~ msgid "Java virtual machine not found, try installing gij or set $JAVA"
+#~ msgstr "Java 仮想マシンが見つかりません。 gij をインストールするか、または $JAVA を設定してみてください"
+
+#~ msgid "%s subprocess I/O error"
+#~ msgstr "%s サブプロセス I/O エラー"
+
+#~ msgid "cannot change permissions of %s"
+#~ msgstr "%s のパーミッションを変更できません"
+
+#~ msgid "cannot create directory %s"
+#~ msgstr "ディレクトリ %s を作成できません"
+
+#~ msgid "unable to record current working directory"
+#~ msgstr "現在の作業ディレクトリを記録することができません"
+
+#~ msgid "failed to return to initial working directory"
+#~ msgstr "初期作業ディレクトリに戻るのに失敗しました"
+
+#~ msgid "Failed to open /dev/zero for read"
+#~ msgstr "/dev/zeroを読込み用に開けません"
+
+#~ msgid "creation of reading thread failed"
+#~ msgstr "読み込みスレッドの作成に失敗しました"
+
+#~ msgid "cannot set up nonblocking I/O to %s subprocess"
+#~ msgstr "%s 子プロセスへ非ブロック I/O を設定できません"
+
+#~ msgid "communication with %s subprocess failed"
+#~ msgstr "%s 子プロセスとの通信に失敗しました"
+
+#~ msgid "write to %s subprocess failed"
+#~ msgstr "%s 子プロセスへの書き込みに失敗しました"
+
+#~ msgid "read from %s subprocess failed"
+#~ msgstr "%s 子プロセスからの読み込みに失敗しました"
+
+#~ msgid "subprocess %s terminated with exit code %d"
+#~ msgstr "子プロセス %s が終了コード %d で終了しました"
+
+#~ msgid "creation of threads failed"
+#~ msgstr "スレッドの作成に失敗しました"
+
+#~ msgid "%s subprocess terminated with exit code %d"
+#~ msgstr "%s 子プロセスが終了コード %d で終了しました"
+
+#~ msgid "cannot create pipe"
+#~ msgstr "パイプを作成できません"
+
+#~ msgid "`"
+#~ msgstr "`"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "^[yY]"
+#~ msgstr "^[yY]"
+
+#~ msgid "^[nN]"
+#~ msgstr "^[nN]"
+
+#~ msgid "setting permissions for %s"
+#~ msgstr "%s のパーミッションを設定します"
+
+#~ msgid "Hangup"
+#~ msgstr "Hangup"
+
+#~ msgid "Interrupt"
+#~ msgstr "割り込み"
+
+#~ msgid "Quit"
+#~ msgstr "終了"
+
+#~ msgid "Illegal instruction"
+#~ msgstr "Illegal instruction"
+
+#~ msgid "Trace/breakpoint trap"
+#~ msgstr "Trace/breakpoint trap"
+
+#~ msgid "Aborted"
+#~ msgstr "中止"
+
+#~ msgid "Floating point exception"
+#~ msgstr "浮動小数点例外"
+
+#~ msgid "Killed"
+#~ msgstr "強制終了"
+
+#~ msgid "Bus error"
+#~ msgstr "バスエラー"
+
+#~ msgid "Segmentation fault"
+#~ msgstr "Segmentation fault"
+
+#~ msgid "Broken pipe"
+#~ msgstr "Broken pipe"
+
+#~ msgid "Alarm clock"
+#~ msgstr "Alarm clock"
+
+#~ msgid "Terminated"
+#~ msgstr "Terminated"
+
+#~ msgid "Urgent I/O condition"
+#~ msgstr "緊急 I/O 状態"
+
+#~ msgid "Stopped (signal)"
+#~ msgstr "停止 (シグナル)"
+
+#~ msgid "Stopped"
+#~ msgstr "停止"
+
+#~ msgid "Continued"
+#~ msgstr "継続"
+
+#~ msgid "Child exited"
+#~ msgstr "子プロセス終了"
+
+#~ msgid "Stopped (tty input)"
+#~ msgstr "停止 (tty 入力)"
+
+#~ msgid "Stopped (tty output)"
+#~ msgstr "停止 (tty 出力)"
+
+#~ msgid "I/O possible"
+#~ msgstr "I/O 可能"
+
+#~ msgid "File size limit exceeded"
+#~ msgstr "ファイルサイズ制限を超過しました"
+
+#~ msgid "Virtual timer expired"
+#~ msgstr "仮想タイマーが終了しました"
+
+#~ msgid "Profiling timer expired"
+#~ msgstr "プロファイリングタイマーが終了しました"
+
+#~ msgid "Window changed"
+#~ msgstr "Window が変更されました"
+
+#~ msgid "User defined signal 2"
+#~ msgstr "ユーザー定義シグナル2"
+
+#~ msgid "EMT trap"
+#~ msgstr "EMT トラップ"
+
+#~ msgid "Bad system call"
+#~ msgstr "間違ったシステムコール"
+
+#~ msgid "Stack fault"
+#~ msgstr "スタックエラー"
+
+#~ msgid "Information request"
+#~ msgstr "情報要求"
+
+#~ msgid "Power failure"
+#~ msgstr "電源エラー"
+
+#~ msgid "Resource lost"
+#~ msgstr "リソースが無くなりました"
+
+#~ msgid "error writing to a closed pipe or socket"
+#~ msgstr "閉じたパイプまたはソケットへの書き込みでエラーが発生しました"
+
+#~ msgid "Real-time signal %d"
+#~ msgstr "リアルタイムシグナル %d"
+
+#~ msgid "Unknown signal %d"
+#~ msgstr "不明なシグナル %d"
+
+#~ msgid "iconv function not usable"
+#~ msgstr "iconv 関数が使えません"
+
+#~ msgid "iconv function not available"
+#~ msgstr "iconv 関数が有効ではありません"
+
+#~ msgid "character out of range"
+#~ msgstr "範囲外の文字"
+
+#~ msgid "cannot convert U+%04X to local character set"
+#~ msgstr "U+%04X をローカル文字セットに変換できません"
+
+#~ msgid "cannot convert U+%04X to local character set: %s"
+#~ msgstr "U+%04X をローカル文字セット %s に変換できません"
+
+#~ msgid "invalid user"
+#~ msgstr "無効なユーザ"
+
+#~ msgid "invalid group"
+#~ msgstr "無効なグループ"
+
+#~ msgid "invalid spec"
+#~ msgstr "無効な指定"
+
+#~ msgid "unable to display error message"
+#~ msgstr "エラーメッセージを表示できません"
+
+#~ msgid "Packaged by %s (%s)\n"
+#~ msgstr "パッケージ作成者: %s (%s)\n"
+
+#~ msgid "Packaged by %s\n"
+#~ msgstr "パッケージ作成者: %s\n"
+
+#~ msgid "(C)"
+#~ msgstr "(C)"
+
+#~ msgid ""
+#~ "\n"
+#~ "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
+#~ "This is free software: you are free to change and redistribute it.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "ライセンス GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n"
+#~ "This is free software: you are free to change and redistribute it.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+
+#~ msgid "Written by %s.\n"
+#~ msgstr "作者 %s。\n"
+
+#~ msgid "Written by %s and %s.\n"
+#~ msgstr "作者 %s および %s。\n"
+
+#~ msgid "Written by %s, %s, and %s.\n"
+#~ msgstr "作者 %s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "%s, and %s.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "%s、および %s。\n"
+
+#~ msgid ""
+#~ "Written by %s, %s, %s,\n"
+#~ "%s, %s, %s, %s,\n"
+#~ "%s, %s, and others.\n"
+#~ msgstr ""
+#~ "作者 %s、 %s、 %s、\n"
+#~ "%s、 %s、 %s、 %s、\n"
+#~ "%s、 %s、 および他の方々。\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Report bugs to: %s\n"
+#~ msgstr ""
+#~ "\n"
+#~ "バグを発見したら <%s> に報告して下さい。\n"
+#~ "翻訳に関するバグは<translation-team-ja@lists.sourceforge.net>に報告してください。\n"
+
+#~ msgid "Report %s bugs to: %s\n"
+#~ msgstr "%s のバグは <%s> に報告してください。\n"
+
+#~ msgid "%s home page: <%s>\n"
+#~ msgstr "%s のホームページ: <%s>\n"
+
+#~ msgid "%s home page: <http://www.gnu.org/software/%s/>\n"
+#~ msgstr "%s のホームページ: <http://www.gnu.org/software/%s/>\n"
+
+#~ msgid "General help using GNU software: <http://www.gnu.org/gethelp/>\n"
+#~ msgstr "GNU ソフトウェアを使用する際の一般的なヘルプ: <http://www.gnu.org/gethelp/>\n"
+
+#~ msgid "_open_osfhandle failed"
+#~ msgstr "_open_osfhandle に失敗しました"
+
+#~ msgid "cannot restore fd %d: dup2 failed"
+#~ msgstr "ファイル記述子 (fd) %d をリストアできません: dup2 に失敗しました"
+
+#~ msgid "%s subprocess"
+#~ msgstr "%s 子プロセス"
+
+#~ msgid "%s subprocess got fatal signal %d"
+#~ msgstr "%s 子プロセスが致命的なシグナル %d を受信しました"
+
+#~ msgid "stdin"
+#~ msgstr "標準入力"
+
+#~ msgid "stdout"
+#~ msgstr "標準出力"
+
+#~ msgid "stderr"
+#~ msgstr "標準エラー出力"
+
+#~ msgid "unknown stream"
+#~ msgstr "不明なストリーム"
+
+#~ msgid "failed to reopen %s with mode %s"
+#~ msgstr "%s をモード %s で再度開くことに失敗しました"
+
+#~ msgid "string comparison failed"
+#~ msgstr "文字列の比較に失敗しました"
+
+#~ msgid "Set LC_ALL='C' to work around the problem."
+#~ msgstr "問題を回避するために LC_ALL='C' を指定してください."
+
+#~ msgid "The strings compared were %s and %s."
+#~ msgstr "比較した文字列は %s と %s です."
+
+#~ msgid "cannot perform formatted output"
+#~ msgstr "書式設定を行った出力を実行することができません"
+
+#~ msgid "invalid %s%s argument `%s'"
+#~ msgstr "引数 `%3$s' に対して %1$s%2$s が無効です"
+
+#~ msgid "invalid suffix in %s%s argument `%s'"
+#~ msgstr "引数 `%3$s' に対して無効な接尾辞 %1$s%2$s です"
+
+#~ msgid "%s%s argument `%s' too large"
+#~ msgstr "引数 `%3$s' に対する %1$s%2$s が大きすぎます"
+
+#~ msgid "block size"
+#~ msgstr "ブロックサイズ"
+
+#~ msgid "%s exists but is not a directory"
+#~ msgstr "%s は存在しますがディレクトリではありません"
+
+#~ msgid "cannot change owner and/or group of %s"
+#~ msgstr "%s のオーナーとグループを変更できません"
+
+#~ msgid "cannot chdir to directory %s"
+#~ msgstr "ディレクトリ %s に移動できません"
+
+#~ msgid "cannot get the login group of a numeric UID"
+#~ msgstr "数字のUIDのログイングループを取得できません"
+
+#~ msgid ""
+#~ "\n"
+#~ "This is free software. You may redistribute copies of it under the terms of\n"
+#~ "the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.\n"
+#~ "There is NO WARRANTY, to the extent permitted by law.\n"
+#~ "\n"
+#~ msgstr ""
+#~ "\n"
+#~ "本プログラムはフリーソフトウェアです. GNU一般公有使用許諾\n"
+#~ "<http://www.gnu.org/licenses/gpl.html> で定められた条項の下で本プログラ\n"
+#~ "ムのコピーを再配布できます. 適切な法が認る限りにおいて全くの無保証です.\n"
+#~ "\n"
diff --git a/po/nl.po b/po/nl.po
new file mode 100644
index 00000000..1556af08
--- /dev/null
+++ b/po/nl.po
@@ -0,0 +1,667 @@
+# Translation of m4-1.4o to Dutch.
+# Copyright (C) 2000, 2007 Free Software Foundation, Inc.
+#
+# Tijs van Bakel <smoke@casema.net>, 2000.
+# Benno Schulenberg <benno@vertaalt.nl>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2007-09-02 11:55+0200\n"
+"Last-Translator: Benno Schulenberg <benno@vertaalt.nl>\n"
+"Language-Team: Dutch <vertaling@vrijschrift.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: optie '%s' is niet eenduidig\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: optie '--%s' staat geen argument toe\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: optie '%c%s' staat geen argument toe\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: optie '%s' vereist een argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: onbekende optie '--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: onbekende optie '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ongeldige optie -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: optie vereist een argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: optie '-W %s' is niet eenduidig\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: optie '-W %s' staat geen argument toe\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "onvoldoende geheugen beschikbaar"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Gelukt"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Geen overeenkomsten"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ongeldige reguliere expressie"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ongeldig samengesteld teken"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ongeldige tekenklassenaam"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Backslash aan het eind"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ongeldige terugverwijzing"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Ongepaarde [ of [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Ongepaarde ( of \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Ongepaarde \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ongeldige inhoud van \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ongeldig bereikeinde"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Onvoldoende geheugen beschikbaar"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ongeldige voorafgaande reguliere expressie"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Voortijdig einde van reguliere expressie"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Reguliere expressie is te groot"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Ongepaarde ) of \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Geen eerdere reguliere expressie"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Waarschuwing: te weinig argumenten voor ingebouwde functie '%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Waarschuwing: te veel argumenten voor ingebouwde functie '%s'"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Niet-numeriek argument van ingebouwde functie '%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "**Interne fout**: Foutief datatype voor token in define_macro()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Ongedefinieerde naam '%s'"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "**Interne fout**: Foutief datatype voor eenheid in m4_dumpdef()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Ongedefinieerde naam '%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "**Interne fout**: Foutief type voor symbool in m4_defn()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan niet doorsluizen naar opdracht '%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Getalsbasis %d in 'eval' valt buiten bereik"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negatieve breedte voor 'eval'"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Niet-numeriek argument van %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan %s niet terugbuigen"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Ongedefinieerde syntactische code %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan %s niet openen"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Foutieve debug-opties: '%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan geen foutenbestand aanmaken: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "Waarschuwing: \\0 zal verdwijnen; gebruik in vervangingen liever \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Foutieve reguliere expressie '%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fout bij vergelijken van reguliere expressie '%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel! (trace_pre())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "**Interne fout**: Foutief datatype voor eenheid (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Foutieve expressie in 'eval' (ontbrekend sluithaakje): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Foutieve expressie in 'eval': %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Foutieve expressie in 'eval' (foutieve invoer): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Foutieve expressie in 'eval' (overvloedige invoer): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Deling door nul in 'eval': %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo nul in 'eval': %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "**Interne fout**: Foutieve foutcode in evaluate()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "**Interne fout**: Foutieve vergelijkingsoperator in cmp_term()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "**Interne fout**: Foutieve schuifoperator in shift_term()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "**Interne fout**: Foutieve operator in mult_term()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "**Interne fout**: Ingebouwde functie niet gevonden in tabel!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "**Interne fout**: Foutief datatype voor eenheid in freeze_one_symbol()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Een regeleindeteken werd verwacht in bevroren bestand"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Teken '%c' werd verwacht in bevroren bestand"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Foutief geformatteerd bevroren bestand"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Voortijdig einde van bevroren bestand"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "'%s' uit bevroren bestand niet gevonden in tabel van ingebouwde functies!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Invoer is teruggekeerd naar %s, regel %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Invoer gelezen van %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "**Interne fout**: Recursieve push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "**Interne fout**: Foutieve aanroep van init_macro_token()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "**Interne fout**: Invoerstapel vernield in next_char()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "**Interne fout**: Invoerstapel vernield in peek_input()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "GEEN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FOUT: bestandseinde in tekenreeks"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FOUT: Stapeloverloop. (Oneindige recursie van 'define'?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Typ '%s --help' voor meer informatie.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Gebruik: %s [OPTIE]... [BESTAND]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Een argument dat verplicht of optioneel is voor een lange optie, is dat\n"
+"ook voor de overeenkomstige korte optie.\n"
+"\n"
+"Werkingsmodus:\n"
+" --help deze hulptekst tonen en stoppen\n"
+" --version versie-informatie tonen en stoppen\n"
+" -e, --interactive uitvoer niet bufferen, onderbrekingen negeren\n"
+" -E, --fatal-warnings stoppen na de eerste waarschuwing\n"
+" -Q, --quiet, --silent sommige waarschuwingen voor ingebouwde functies\n"
+" onderdrukken\n"
+" -P, --prefix-builtins ingebouwde functies het voorvoegsel 'm4_' geven\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr ""
+" -W, --word-regexp=REGEXP deze reguliere expressie gebruiken voor de\n"
+" syntaxis van macronamen\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisch laden:\n"
+" -m, --module-directory=MAP deze map aan het modules-zoekpad toevoegen\n"
+" -M, --load-module=MODULE deze module laden, zoekend in M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Voorbewerkingsopties:\n"
+" -I, --include=MAP ook in deze map naar insluitbestanden zoeken\n"
+" -D, --define=NAAM[=WAARDE] NAAM definiëren (met gegeven beginwaarde)\n"
+" -U, --undefine=NAAM ingebouwde functie met deze naam verwijderen\n"
+" -s, --synclines '#line NR \"BESTAND\"'-regels genereren\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Begrenzingen:\n"
+" -G, --traditional alle GNU-uitbreidingen uitschakelen\n"
+" -H, --hashsize=PRIEM grootte van hash-tabel voor symbolen\n"
+" -L, --nesting-limit=GETAL te gebruiken kunstmatige nestingsdiepte\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Bevroren toestandsbestanden:\n"
+" -F, --freeze-state=BESTAND bij einde bevroren toestand in BESTAND opslaan\n"
+" -R, --reload-state=BESTAND bij begin bevroren toestand uit BESTAND inlezen\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debuggen:\n"
+" -d, --debug[=OPTIES] debug-niveau (geen OPTIES impliceert 'aeq')\n"
+" -t, --trace=NAAM NAAM tracen zodra deze gedefinieerd wordt\n"
+" -l, --arglength=GETAL trace-grootte van macro's beperken\n"
+" -o, --error-output=BESTAND debug- en trace-uitvoer omleiden naar BESTAND\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"OPTIES is één of meer van:\n"
+" t alle macro-aanroepen tracen, niet slechts die met 'traceon'\n"
+" a de werkelijke argumenten tonen\n"
+" e expansies tonen\n"
+" q waarden zonodig aanhalen (bij optie 'a' of 'e')\n"
+" c toestand vóór en na verzamelen van argumenten tonen, en na aanroep\n"
+" x een uniek macro-nummer tonen (handig bij optie 'c')\n"
+" f het huidige invoerbestand vermelden\n"
+" l het huidige regelnummer van de invoer vermelden\n"
+" p resultaten van pad-doorzoekingen tonen\n"
+" i wijzigingen in invoerbestanden tonen\n"
+" V alle bovenstaande opties samen\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Als er geen BESTAND gegeven is, of als BESTAND '-' is, wordt van\n"
+"standaardinvoer gelezen.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapporteer gebreken in het programma aan <bug-m4@gnu.org>;\n"
+"meld fouten in de vertaling aan <vertaling@vrijschrift.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Foutieve debug-opties: '%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FOUT: kan zoekmap '%s' niet toevoegen"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FOUT: kan zoekmap '%s' niet toevoegen: %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opties:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "**Interne fout**: Foutieve code in achtergehouden argumenten"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "**Interne fout**: Foutief type voor eenheid in expand_token()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FOUT: bestandseinde in argumentenlijst"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "**Interne fout**: Foutief type voor eenheid in expand_argument()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "**Interne fout**: Foutief type voor symbool in call_macro()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FOUT: Recursiegrens %d overschreden; gebruik -L<GETAL> om deze te veranderen"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FOUT: Kan modules niet initialiseren: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FOUT: Kan module '%s' niet vinden"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FOUT: Kan module '%s' niet vinden: %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FOUT: Kan modules niet sluiten"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FOUT: Kan modules niet sluiten: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FOUT: Kan module '%s' niet sluiten"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FOUT: Kan module '%s' niet sluiten: %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FOUT: Kan geen tijdelijke map maken voor afbuiging"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FOUT: Kan afbuiging niet opslaan in tijdelijk bestand"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FOUT: Kopiëren van ingevoegd bestand"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FOUT: Lezen van ingevoegd bestand"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan de status van afbuiging niet opvragen"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Afbuiging is te groot"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Padzoektocht naar '%s' vond '%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "VMEM-limiet overschreden?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Een geheugensegmentgrens is overschreden: SIGSEGV.\n"
+"Er is ofwel een stapeloverloop opgetreden,\n"
+"of er zit een programmeerfout in "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Controleer op een mogelijk oneindige recursie.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "**Interne fout**: Ongeldige modus voor symbol_lookup()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Naam '%s' is onbekend\n"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 00000000..a6cbd6f5
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,663 @@
+# Polish translations for the GNU m4 messages.
+# Copyright (C) 1998, 1999, 2001, 2003 Free Software Foundation, Inc.
+# This file is distributed under the same license as the m4 package.
+# Rafał Maszkowski <rzm@icm.edu.pl>, 1998-1999, 2001, 2003, 2010.
+# Thanks do Jakub Bogusz for corretions, 2003
+# my „smart" mutt needs this line
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2010-01-23 23:15+0100\n"
+"Last-Translator: Rafał Maszkowski <rzm@icm.edu.pl>\n"
+"Language-Team: Polish <translation-team-pl@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opcja `%s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opcja `--%s' nie może mieć argumentu\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opcja `%c%s' nie może mieć argumentu\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opcja `%s' musi mieć argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: nierozpoznana opcja `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: nierozpoznana opcja `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: nielegalna opcja -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: błędna opcja -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opcja musi mieć argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opcja `-W %s' jest niejednoznaczna\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opcja `-W %s' nie może mieć argumentu\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "brak pamięci"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Wzorzec znaleziony"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Wzorca nie znaleziono"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Błędne wyrażenie regularne"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Znak błędny dla bieżącego uporządkowania"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Błędna nazwa klasy znaków"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Końcowy ukośnik odwrotny"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Błędne odwołanie"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Nie pasujące [ lub [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Nie pasujące ( lub \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Nie pasujący \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Błędna zawartość \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Błędny koniec zakresu"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Brak pamięci"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Błędne poprzedzające wyrażenie regularne"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Przedwczesny koniec pliku wyrażenia regularnego"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Za duże wyrażenie regularne"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Nie pasujące ) lub \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Brak poprzedniego wyrażenia regularnego"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Uwaga: Za mało argumentów dla wbudowanego `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Uwaga: Nadmiarowe argumenty do built-in `%s' zostały zignorowane"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Nienumeryczny argument do built-in `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu w define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Niezdefiniowana nazwa %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu w m4_dumpref ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Niezdefiniowana nazwa `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ symbolu w m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Nie mogę otworzyć potoku do komendy `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Baza w eval poza zakresem (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Ujemna długość w eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Nienumeryczny argument dla %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Nie mogę przetworzyć z powrotem %s"
+
+# hm - rzm
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Niezdefiniowany kod składniowy %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Nie mogę otworzyć %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Tryb debugowania: złe flagi debugowania: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Nie mogę ustawić pliku błędów: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "UWAGA: \\0 zniknie, w podstawieniach użyj zamiast tego \\&"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Błędne wyrażenie regularne `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Błąd dopasowania do wyrażenia regularnego `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "BŁĄD WEWNĘTRZNY: Zły typ danych tokenu (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Błędne wyrażenie w eval (brakujący prawy nawias): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Błędne wyrażenie w eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Błędne wyrażenie w eval (złe dane wejściowe): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Błędne wyrażenie w eval (nadmiarowe dane): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Dzielenie przez zero w eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo zero w eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny kod błędu w evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator porównania w cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator przesunięcia w shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny operator w mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "BŁĄD WEWNĘTRZNY: Wbudowane nie znalezione w tablicy wbudowanych!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ danych tokenu w freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Oczekiwany line feed w zamrożonym pliku stanu"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Oczekiwany znak `%c' w zamrożonym pliku stanu"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Źle sformatowany zamrożony pliku stanu"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Przedwczesny koniec zamrożonego pliku stanu"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' z zamrożonego pliku stanu nie znalezione w tablicy wbudowanych poleceń!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Dane wejściowe wycofane do %s, linia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Dane wejściowe przeczytane z %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "BŁĄD WEWNĘTRZNY: Rekursywny push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędne wywołanie init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błąd stosu wejściowego w next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błąd stosu wejściowego w peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "ŻADEN"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "BŁĄD: EOF w łańcuchu"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "BŁĄD: Przepełnienie stosu. (Nieskończona rekursja definicji?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Spróbuj `%s --help' żeby dowiedzieć się więcej.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Składnia: %s [OPCJA]... [PLIK]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumenty obowiązkowe lub opcjonalne dla opcji długich są obowiązkowe lub\n"
+"opcjonalne również dla krótkich.\n"
+"\n"
+"Tryby pracy:\n"
+" --help wyświetlenie tego opisu i zakończenie\n"
+" --version wyświetlenie informacji o wersji i zakończenie\n"
+" -e, --intercative bez buforowania wyjścia, ignorowanie przerwań\n"
+" -E, --fatal-warnings zatrzymanie się po pierwszym ostrzeżeniu\n"
+" -Q, --quiet, --silent bez pokazywania niektórych ostrzeżeń dla\n"
+" wbudowanych poleceń\n"
+" -P, --prefix-builtins dodanie zawsze `m4_' przed wszystkimi\n"
+" wbudowanymi poleceniami\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=WYR_REGUL użycie WYR_REGUL w składni nazw makr\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Parametry dynamicznego ładowania modułów:\n"
+" -m, --module-directory=KATALOG dodanie KATALOGU do ścieżki szukania modułów\n"
+" -M, --load-module=MODUŁ dynamiczne załadowanie modułu z M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Właściwości preprocesora:\n"
+" -I, --include=KATALOG szukanie includes w tym KATALOGU\n"
+" -D, --define=NAZWA[=WARTOŚĆ] wprowadzenie NAZWY z WARTOŚCIĄ lub pustą\n"
+" -U, --undefine=NAZWA skasowanie wbudowanej NAZWY\n"
+" -s, --synclines generowanie linii `#line NR \"PLIK\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Sterowanie ograniczeniami:\n"
+" -G, --traditional wyłączenie wszystkich rozszerzeń GNU\n"
+" -H, --hashzize=PIERWSZA ustawienie rozmiaru tablicy mieszającej dla symboli\n"
+" -L, --nesting-limit=LICZBA zmiania sztucznego limitu zagłębień\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Zamrożone pliki stanu:\n"
+" -F, --freeze-state=PLIK zapisanie zamrożonego PLIKU stanu na końcu\n"
+" -R, --reload-state=PLIK załadowanie zamrożonego PLIKU stanu na początku\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Debugowanie:\n"
+" -d, --debug=[FLAGI] ustawienie poziomu debugowania (bez FLAG: `aeg')\n"
+" -t, --trace=NAZWA śledzenie NAZWY, kiedy będzie zdefiniowana\n"
+" -l, --arglength=ILE ograniczenie rozmiaru śledzenia makr\n"
+" -o, --error-output=PLIK przekierowanie wyników debugowania i śledzenia\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGI mogą być następujące:\n"
+" t śledzenie wszystkich wywołań makr, nie tylko tych z traceon\n"
+" a pokazanie właściwych argumentów\n"
+" e pokazanie rozwinięcia\n"
+" q zabezpieczenie znaków specjalnych, z flagą a lub e\n"
+" c pokazanie przez zebraniem, po zebraniu i po wywołaniu\n"
+" x dodanie unikalnego identyfikatora wywołania makra, pożyteczne z flagą c\n"
+" f podanie nazwy bieżącego pliku wejściowego\n"
+" l podanie numeru bieżącej linii\n"
+" p pokazanie wyników przeszukiwań ścieżek\n"
+" i pokazanie zmian w plikach wejściowych\n"
+" V skrót do wszystkich powyższych flag\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Jeżeli brak PLIKu lub PLIK to `-', czytane jest std. wejście.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raporty o błędach wysyłaj do bug-m4@gnu.org.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Błędne flagi debugowania: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "BŁĄD: nie udało się dodać katalogu do przeszukiwania `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "BŁĄD: nie udało się dodać katalogu do przeszukiwania `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opcje:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny kod w odłożonych argumentach"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ tokena w expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "BŁĄD: EOF w liście argumentów"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny typ tokena w expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "BŁĄD WEWNĘTRZNY: Błędny symbol w call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "BŁĄD: Osiągnięty limit rekursji %d, użyj -L<N> żeby go zmienić"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "BŁĄD: nie można zainicjalizować modułu: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "BŁĄD: nie można znaleźć modułu `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "BŁĄD: nie można znaleźć modułu `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "BŁĄD: nie można zamknąć modułów"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "BŁĄD: nie można zamknąć modułu: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "BŁĄD: nie można zamknąć modułu `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "BŁĄD: nie można zamknąć modułu `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "BŁĄD: Nie mogę utworzyć plików tymczasowych dla przetwarzania"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "BŁĄD: Nie mogę zapisać zmian przetwarzania do pliku tymczasowego"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "BŁĄD: Kopiowanie włożonego pliku"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "BŁĄD: Czytanie włożonego pliku"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Nie mogę zrobić stat na danych przetwarzanych"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Za duża zmiana"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Przeszukanie ścieżki dla `%s' znalazło `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "przekroczony limit VMEM\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Wykryto pogwałcenie ograniczeń adresów pamięci (SIGSEGV). Albo doszło do\n"
+"przepełnienia stosu albo jest błąd w "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Sprawdź czy nie doszło do nieskończonej rekursji.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "BŁĄD WEWNĘTRZNY: Nielegalny tryb w symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nazwa `%s' jest nieznana\n"
diff --git a/po/pt_BR.po b/po/pt_BR.po
new file mode 100644
index 00000000..bfd151f2
--- /dev/null
+++ b/po/pt_BR.po
@@ -0,0 +1,663 @@
+# m4: translation to Brazilian Portuguese (pt_BR)
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Alexandre Folle de Menezes <afmenez@terra.com.br>, 2002.
+# based on the translation to Galician (gl) by
+# Jacobo Tarrio <jtarrio@iname.com>, 2000.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-07-24 17:25-0300\n"
+"Last-Translator: Alexandre Folle de Menezes <afmenez@terra.com.br>\n"
+"Language-Team: Brazilian Portuguese <ldp-br@bazar.conectiva.com.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: a opo `%s' ambgua\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: a opo `--%s' no admite um argumento\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: a opo `%c%s' no admite um argumento\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: a opo `%s' exige um argumento\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opo `--%s' desconhecida\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opo `%c%s' desconhecida\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opo ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opo invlida -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: a opo precisa de um argumento -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: a opo `-W %s' ambgua\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: a opo `-W %s' no admite um argumento\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "memria esgotada"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Sucesso"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "No casa nada"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expreso regular invlida"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Caractere de ordenamento invlido"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nome de classe de caracteres invlido"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Barra invertida no final da linha"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referncia para trs invlida"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ ou [^ sem correspondncia"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( ou \\( sem correspondncia"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ sem correspondncia"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Contedo de \\{\\} invlido"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Fim de faixa invlido"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memria esgotada"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresso regular precedente invlida"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fim prematuro da expresso regular"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresso regular grande demais"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") ou \\) sem correspondncia"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "No h uma expresso regular anterior"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Aviso: Faltam argumentos para o `%s' predefinido"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Aviso: Os argumentos demais para o `%s' predefinido foram ignorados"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "argumento no-numrico para o `%s' predefinido"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no token em define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nome %s no definido"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no token em m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nome `%s' no definido"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorreto em m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Impossvel abrir um pipe para o comando `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "A base est fora dos limites em eval (base = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Largura negativa para eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argumento no-numrico para %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Impossvel endireitar %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cdigo de sintaxe %c no definido"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Impossvel abrir %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Debugmode: sinalizadores de depurao incorretos: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Impossvel definir arquivo de erros: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVISO: \\0 ir desaparecer, use \\& no seu lugar nas substituies"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresso regular `%s' incorreta: %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Erro ao comparar expresso regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no elemento (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresso incorreta em eval (falta o parntese dereito): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresso incorreta em eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresso incorreta em eval (entrada incorreta): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresso incorreta em eval (entrada excessiva): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Diviso por zero em eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Resto da diviso por zero em eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "ERRO INTERNO: Cdigo de erro incorreto em evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "ERRO INTERNO: Operador de comparao incorreto em cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "ERRO INTERNO: Operador de desprazamento incorreto em shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "ERRO INTERNO: Operador incorreto em mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "ERRO INTERNO: Predefinida no encontrada na tabela de predefinidas!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "ERRO INTERNO: Tipo de dado incorreto no elemento em freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Era esperado um salto de linha no arquivo congelado"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Era esperado o caractere `%c' no arquivo congelado"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "arquivo congelado mal formatado"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fim prematuro do arquivo congelado"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' do arquivo congelado no encontrado na tabela de predefinidas!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "A entrada reverteu para %s, linha %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Ler a entrada de %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "ERRO INTERNO: push_string recursivo!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "ERRO INTERNO: Chamada incorreta a init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "ERRO INTERNO: Erro na pilha de entrada em next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "ERRO INTERNO: Erro na pilha de entrada em peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NENHUM"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "ERRO: Fim de arquivo na string"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "ERRO: Transbordamento da pilha. (Recurso infinita de defines?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Tente `%s --help' para obter mais informaes.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Uso: %s [opo]... [arquivo]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Os argumentos obrigatrios ou opcionais nas opes longas so tambm\n"
+"obrigatrios ou opcionais nas opes curtas.\n"
+"\n"
+"Modos de funcionamento:\n"
+" --help exibe esta ajuda e sai\n"
+" --version mostra informaes de verso e sai\n"
+" -e, --interactive sada sem buffer, ignora as interrupes\n"
+" -E, --fatal-warnings pra a execuo depois do primeiro aviso\n"
+" -Q, --quiet, --silent suprime alguns avisos das predefinidas\n"
+" -P, --prefix-builtins fora um prefixo `m4_' em todas as predefinidas\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP usa REGEXP para a sintaxe dos nomes das macros\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Caractersticas de carga dinmica:\n"
+" -m, --module-directory=DIRETORIO adiciona DIRETORIO rota de busca\n"
+" de mdulos\n"
+" -M, --load-module=MDULO carrega MDULO dinmico de M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Caractersticas do preprocesador:\n"
+" -I, --include=DIRETORIO procura depois neste DIRETORIO por arquivos\n"
+" a incluir\n"
+" -D, --define=NOME[=VALOR] define NOME contendo o VALOR, ou vazio\n"
+" -U, --undefine=NOME apaga a predefinida NOME\n"
+" -s, --synclines gera linhas `#line NUM \"arquivo\"\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control de lmites:\n"
+" -G, --traditional suprime todas as extenses GNU\n"
+" -H, --hashsize=PRIMO estabelece o tamanho da tabela hash de smbolos\n"
+" -L, --nesting-limit=NMERO muda limite artificial de aninhamento\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Ficheiros de estado congelado:\n"
+" -F, --freeze-state=ARQ produz um estado congelado em ARQ no final\n"
+" -R, --reload-state=ARQ recarrega um estado congelado de ARQ no incio\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"depurao:\n"
+" -d, --debug=[opes] estabelece o nvel de depurao (no indicar\n"
+" opes implica em `aeq')\n"
+" -t, --trace=NOME rastreia NOME quando ele ser definido\n"
+" -l, --arglength=NM restringe tamanho do rastreamento das macros\n"
+" -o, --error-output=arquivo redireciona a sada de depurao e rastreamento\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"opes uma de:\n"
+" t rastreamento de todas as chamadas de macro, no s das que tenhan traceon\n"
+" a mostra os argumentos reais\n"
+" e mostra a expanso\n"
+" q cita o valores quando seja preciso, com as opes a ou e\n"
+" c mostra antes da obtenco, depois da obteno e depois da chamada\n"
+" x adiciona um identificador nico de chamada macro, til com a opo c\n"
+" f diz nome do arquivo de entrada atual\n"
+" l diz nmero da linha de entrada atual\n"
+" p mostra o resultados das buscas nas rotas\n"
+" i mostra mudanas nos arquivos de entrada\n"
+" V forma curta para todas as opes acima\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Se no for indicado um ARQUIVO ou se o ARQUIVO `-', a entrada padro usada.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Informe os erros para <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Opes de depurao incorretas: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "ERRO: impossvel adicionar diretrio de busca `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "ERRO: impossvel adicionar diretrio de busca `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opes:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "ERRO INTERNO: Cdigo incorreto nos argumentos pospostos"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "ERRO INTERNO: Tipo de token incorreto em expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "ERRO: Fim de arquivo na lista de argumentos"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "ERRO INTERNO: Tipo de elemento incorreto em expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "ERRO INTERNO: Tipo de smbolo incorreto em call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "ERRO: Limite de %d recurses excedido, use -L<N> para mud-lo"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "ERRO: impossvel inicializar mdulos: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "ERRO: impossvel encontrar mdulo: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "ERRO: impossvel encontrar mdulo: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "ERRO: impossvel fechar mdulos"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "ERRO: impossvel fechar mdulos: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "ERRO: impossvel fechar mdulo: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "ERRO: impossvel fechar mdulo: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "ERRO: Impossvel criar um arquivo temporrio para o desvio"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "ERRO: Impossvel descarregar desvio para um arquivo temporrio"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "ERRO: Copiando o arquivo inserido"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "ERRO: Lendo o arquivo inserido"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Impossvel fazer uma operao de stat sobre um desvio"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Desvio grande demais"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "A busca de caminhos por `%s' encontrou `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limite de VMEM excedido?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violao dos limites de memria detectada (SIGSEGV). Ou ocorreu um\n"
+"transbordamento de pilha, ou h um bug em "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Procure por uma possvel recurso infinita.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "ERRO INTERNO: Modo ilegal para symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "O nome `%s' desconhecido\n"
diff --git a/po/quot.sed b/po/quot.sed
new file mode 100644
index 00000000..0122c463
--- /dev/null
+++ b/po/quot.sed
@@ -0,0 +1,6 @@
+s/"\([^"]*\)"/“\1”/g
+s/`\([^`']*\)'/‘\1’/g
+s/ '\([^`']*\)' / ‘\1’ /g
+s/ '\([^`']*\)'$/ ‘\1’/g
+s/^'\([^`']*\)' /‘\1’ /g
+s/“”/""/g
diff --git a/po/remove-potcdate.sin b/po/remove-potcdate.sin
new file mode 100644
index 00000000..2436c49e
--- /dev/null
+++ b/po/remove-potcdate.sin
@@ -0,0 +1,19 @@
+# Sed script that remove the POT-Creation-Date line in the header entry
+# from a POT file.
+#
+# The distinction between the first and the following occurrences of the
+# pattern is achieved by looking at the hold space.
+/^"POT-Creation-Date: .*"$/{
+x
+# Test if the hold space is empty.
+s/P/P/
+ta
+# Yes it was empty. First occurrence. Remove the line.
+g
+d
+bb
+:a
+# The hold space was nonempty. Following occurrences. Do nothing.
+x
+:b
+}
diff --git a/po/ro.po b/po/ro.po
new file mode 100644
index 00000000..b4e7948b
--- /dev/null
+++ b/po/ro.po
@@ -0,0 +1,660 @@
+# Mesajele n limba romn pentru m4.
+# Copyright (C) 2003 Free Software Foundation, Inc.
+# Acest fiier este distribuit sub aceeai licen ca i pachetul m4.
+# Laurentiu Buzdugan <buzdugan@voyager.net>, 2003.
+#
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2003-04-26 18:00-05\n"
+"Last-Translator: Laurentiu Buzdugan <buzdugan@voyager.net>\n"
+"Language-Team: Romanian <translation-team-ro@lists.sourceforge.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: opiunea `%s' este ambigu\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: opiunea `--%s' nu permite un argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: opiunea `%c%s' nu permite un argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: opiunea `%s' necesit un argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: opiune nerecunoscut `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: opiune nerecunoscut `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: opiune ilegal -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: opiune ilegal -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: opiunea necesit un argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: opiunea `-W %s' este ambigu\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: opiunea `-W %s' nu permite un argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "Memorie epuizat"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Succes"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Nici o potrivire"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Expresie regular incorect"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Colatare de caractere incorect"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Nume de clas de caractere incorect"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Backslash n coad"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Referin napoi incorect"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "[ sau [^ fr pereche"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "( sau \\( fr pereche"
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "\\{ fr pereche"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Coninut incorect pentru \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Sfrit de interval incorect"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Memorie epuizat"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Expresie regular precedent incorect"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Sfrit prematur al expresiei regulare"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Expresie regular prea mare"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr ") sau \\) fr pereche"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Nici o expresie regular anterioar"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Avertisment: Prea puine argumente pentru built-in `%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Avertisment: Argumente n exces pentru built-in `%s' ignorate"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Argumen non-numeric pentru `%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "EROARE INTERN: Tip dat token incorect n define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Nume nedefinit %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "EROARE INTERN: Builtin nu a fost gsit n tabelul builtin!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "EROARE INTERN: Tip dat token incorect n m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Nume nedefinit `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "EROARE INTERN: Tip simbol incorect n m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Nu pot deschide pipe ctre comanda `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Radix (baz, rdcin) n eval n afara intervalului (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Lime negativ pentru eval"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Argument non-numeric pentru %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Nu pot de-abate %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Cod sintax nedefinit %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Nu pot deschide %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Moddepanare: flag-uri depanare incorecte: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Nu pot seta eroare fiier: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "AVERTISMENT: \\0 va dispare, folosii n schimb \\& n nlocuiri"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Expresie regular incorect `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Eroare potrivire expresie regular `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "EROARE INTERN: Builtin nu a fost gsit n tabelul builtin! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "EROARE INTERN: Tip dat token incorect (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Expresie incorect n eval (lipsete paranteza din dreapta): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Expresie incorect n eval: %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Expresie incorect n eval (intrare incorect): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Expresie incorect n eval (prea multe intrri): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "mprire cu zero n eval: %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo cu zero n eval: %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "EROARE INTERN: Cod eroare incorect n evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "EROARE INTERN: Operator comparaie incorect n cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "EROARE INTERN: Operator shift incorect n shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "EROARE INTERN: Operator incorect n mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "EROARE INTERN: Built-in nu a fost gsit n tabelul builtin!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "EROARE INTERN: Tip dat token incorect n freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Atept line feed n fiier blocat"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Atept caracter `%c' n fiier blocat"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Fiier blocat formatat incorect"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Sfrit prematur de fiier blocat"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' din fiier blocat nu a fost gsit n tabelul builtin!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Intrare reschimbat ca %s, linia %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Intrare citit de la %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "EROARE INTERN: push_string recursiv!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "EROARE INTERN: Apel incorect al funciei init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "EROARE INTERN: Stiv intrare resolit n next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "EROARE INTERN: Stiv intrare rasolit n peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NIMIC"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "EROARE: EOF n ir"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "EROARE: Depire de stiv. (definire recursiv infinit?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "ncercai `%s --help' pentru informaii suplimentare.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Folosire: %s [OPIUNE]... FIIER...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Argumentele obligatorii sau opionale pentru opiunile lungi sunt obligatorii sau opionale i pentru opiunile scurte.\n"
+"\n"
+"Moduri operare:\n"
+" --help afieaz acest mesaj i termin\n"
+" --version afieaz informaie despre versiune i termin\n"
+" -e, --interactive ieire fr buffer, ignor ntreruperi\n"
+" -E, --fatal-warnings oprete execuia dup primul avertisment\n"
+" -Q, --quiet, --silent elimin cteva avertismente pentru builtins\n"
+" -P, --prefix-builtins foreaz un prefix `m4_' pentru toate builtins\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP folosete REGEXP pentru sintax nume macro\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Capabiliti ncrcare dinamic:\n"
+" -m, --module-directory=DIRECTOR adaug DIRECTOR la calea de cutare module\n"
+" -M, --load-module=MODUL ncarc dinamic MODUL din M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Capabiliti preprocesor:\n"
+" -I, --include=DIRECTOR caut i acest director pentru includeri\n"
+" -D, --define=NUME[=VALOARE] NUME definit ca avnd VALOARE, sau gol\n"
+" -U, --undefine=NUME terge builtin NUME\n"
+" -s, --synclines genereaz `#linie NO \"FIIER\"' linii\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Control limite:\n"
+" -G, --traditional elimin toate extensiile GNU\n"
+" -H, --hashsize=PRIM seteaz dimensiunea tabel de cutare simboluri\n"
+" -L, --nesting-limit=NUMR schimb limita artificial de ncuibare\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Fiiere stare blocat:\n"
+" -F, --freeze-state=FIIER creaz o stare blocat n FIIER la sfrit\n"
+" -R, --reload-state=FIIER rencarc o stare blocat din FIIER la nceput\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Depanare:\n"
+" -d, --debug=[FLAGS] seteaz nivel depanare (nici un FLAG implic `aeq')\n"
+" -t, --trace=NUME urmrete NUME cnd va fi definit\n"
+" -l, --arglength=NUM restricioneaz dimensiune macro urmrire\n"
+" -o, --error-output=FIIER redirecteaz ieire depanare i urmrire\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS este oricare din:\n"
+" t urmrete orice apel macro, nu numai cele activate ca urmrite\n"
+" a arat argumentele curente\n"
+" e arat expansiune\n"
+" q pune ghilimele pentru valori, unde necesar, cu un flag a sau e\n"
+" c arat nainte de colectare, dup colectare i dup apel\n"
+" x adaug un id de apel unic pentru macro, util cu flag-ul c\n"
+" f afieaz numele fiierului de intrare curent\n"
+" l afieaz numrul liniei de intrare curente\n"
+" p afieaz rezultatele cautrilor n ci (paths)\n"
+" i afieaz schimbrile n fiierele de intrare\n"
+" V scurttur pentru toate flag-urile de deasupra\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Dac nici un FIIER sau dac FIIER este `-', este citit intrarea standard.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Raportai bug-uri la <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Flag-uri depanare incorecte: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "EROARE: nu am reuit s adaug director cutare `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "EROARE: nu am reuit s adaug director cutare `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (opiuni:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "EROARE INTERN: Cod incorect n argumente amnate"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "EROARE INTERN: Tip token incorect n expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "EROARE: EOF n list argumente"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "EROARE INTERN: tip token incorect n expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "EROARE INTERN: tip simbol incorect n call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "EROARE: Limita de %d chemri recursive depit, folosii -L<N> pentru a o schimba"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "EROARE: am euat s iniializez modulele: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "EROARE: nu pot gsi modulul: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "EROARE: nu pot gsi modulul: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "EROARE: nu pot nchide modulul"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "EROARE: nu pot nchide modulul: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "EROARE: nu pot nchide modulul: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "EROARE: nu pot nchide modulul: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "EROARE: Nu pot crea fiier temporar pentru diversiune"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "EROARE: Nu pot flush diversiunea n fiier temporar"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "EROARE: Copiez fiier inserat"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "EROARE: Citesc fiier inserat"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Nu pot afla statistici despre diversiune"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Diversiune prea mare"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Cale cutare pentru `%s' a gsit `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Limit VMEM depit?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Violare limit memorie detectat (SIGSEGV). Fie a avut loc o depire\n"
+"de stiv, fie exist un bug n "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Verificai pentru o eventual recursivitate infinit.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "EROARE INTERN: Mod ilegal pentru symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Nume `%s' este necunoscut\n"
diff --git a/po/ru.po b/po/ru.po
new file mode 100644
index 00000000..de5b222f
--- /dev/null
+++ b/po/ru.po
@@ -0,0 +1,650 @@
+# m4-1.4n
+# Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Denis Perchine <dyp@perchine.com>, 1997, 1998, 1999, 2000, 2001, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2002-01-07 20:32GMT+06\n"
+"Last-Translator: Denis Perchine <dyp@perchine.com>\n"
+"Language-Team: Russian <ru@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=KOI8-R\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.9.5\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: `%s' \n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: `--%s' \n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: `%c%s' \n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: `%s' \n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: '%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: `-W %s' \n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: `-W %s' \n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr " "
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr ""
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr " "
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr " "
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr " "
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr " "
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr " "
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr " "
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr " [ [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr " ( \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr " \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr " \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr " "
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr " "
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr " "
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr " "
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr " "
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr " ) \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr " "
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr ": '%s'"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr ": '%s' "
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr " '%s'"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr " : define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr " %s "
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr " : !"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr " : m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr " `%s' "
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr " : m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr " '%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr " (radix = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr " "
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr " %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr " %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr " %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr " %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr " : : '%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr " %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr ": \\0 , \\& "
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr " : '%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr " '%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr " : ! (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr " : (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr " ( ): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr " (bad input): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr " (excess input): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr " : %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr " : evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr " : cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr " : shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr " : mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr " : !"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr " : freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr " - "
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr " '%c' - "
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr " - "
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr " - "
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "'%s' - !"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr " %s , %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr " %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr " : push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr " : init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr " : next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr " : peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr ""
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr ": "
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr ": . ( ?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr " '%s --help' .\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr ": %s [OPTION]... [FILE]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+" \n"
+"\n"
+" :\n"
+" --help \n"
+" --version \n"
+" -e, --interactive , \n"
+" -E, --fatal-warnings \n"
+" -Q, --quiet, --silent \n"
+" -P, --prefix-builtins `m4_' \n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP REGEXP \n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+" :\n"
+" -m, --module-directory=DIRECTORY DIRECTORY \n"
+" -M, --load-module=MODULE MODULE M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+" :\n"
+" -I, --include=DIRECTORY \n"
+" -D, --define=NAME[=VALUE] , NAME VALUE, \n"
+" -U, --undefine=NAME NAME\n"
+" -s, --synclines `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+":\n"
+" -G, --traditional GNU \n"
+" -H, --hashsize=PRIME - \n"
+" -L, --nesting-limit=NUMBER \n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+" :\n"
+" -F, --freeze-state=FILE FILE\n"
+" -R, --reload-state=FILE FILE\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+":\n"
+" -d, --debug=[FLAGS] ( FLAGS=`aeq')\n"
+" -t, --trace=NAME NAME \n"
+" -l, --arglength=NUM \n"
+" -o, --error-output=FILE FILE\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS is any of:\n"
+" t \n"
+" a \n"
+" e \n"
+" q , a e \n"
+" c , \n"
+" x , c\n"
+" f \n"
+" l \n"
+" p \n"
+" i \n"
+" V \n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\n FILE FILE `-', .\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr "\n <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr " : '%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr ": `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr ": `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr " : "
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr " : expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr ": "
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr " : expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr " : call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr ": %d , -L<N> "
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr ": %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr ": `%s' "
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr ": `%s' : %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr ": "
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr ": : %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr ": : `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr ": : `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr ": "
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr ": "
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr ": "
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr ": "
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr " "
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr " "
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr " `%s' `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr " ?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+" (SIGSEGV). \n"
+" "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". .\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr " : symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr " `%s' \n"
diff --git a/po/sv.po b/po/sv.po
new file mode 100644
index 00000000..b30551bb
--- /dev/null
+++ b/po/sv.po
@@ -0,0 +1,661 @@
+# Swedish messages for m4
+# Copyright 1999, 2001 Free Software Foundation, Inc.
+# Jan Djrv <Jan.Djarv@mbox200.swipnet.se>, 1999, 2001
+# Revision: 1.13
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2001-08-21 21:51+0200\n"
+"Last-Translator: Jan Djrv <Jan.Djarv@mbox200.swipnet.se>\n"
+"Language-Team: Swedish <sv@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: flaggan \"%s\" r tvetydig\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"--%s\" tar inget argument\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"%c%s\" tar inget argument\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: flaggan \"%s\" behver ett argument\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: oknd flagga \"--%s\"\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: oknd flagga \"%c%s\"\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: otillten flagga -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: ogiltig flagga -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: flaggan behver ett argument -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: flaggan \"-W %s\" r tvetydig\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: flaggan \"-W %s\" tar inget argument\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "minnet slut"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Lyckat"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Ingen trff"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Ogiltigt reguljruttryck"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ogiltigt kollationeringstecken"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Ogiltigt teckenklassnamn"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Avslutande omvnt snedstreck"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Ogiltig baktreferens"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Obalanserade [ eller [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Obalanserade ( eller \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Obalanserad \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "Ogiltigt innehll i \\{\\}"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Ogiltigt intervallslut"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Minnet slut"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Ogiltigt fregende reguljruttryck"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Fr tidigt slut p reguljruttryck"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Reguljruttrycket r fr stort"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Obalanserade ) eller \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Inget fregende reguljruttryck"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Varning: Fr f argument till inbyggt makro \"%s\""
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Varning: verskottsargument till inbyggt makro \"%s\" ignorerade"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Ickenumeriskt argument till inbyggt makro \"%s\""
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i define_macro ()"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Odefinierat namn \"%s\""
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Odefinierat namn \"%s\""
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "INTERNT FEL: Otillten symboltyp i m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Kan inte skapa rr till kommandot \"%s\""
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Otillten bas i \"eval\" (bas = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Negativ bredd till \"eval\""
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "Ickenumeriskt argument till %s"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Kan inte terleda %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Odefinierad syntaxkod %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Kan inte ppna %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Felskningslge: oknd flagga: \"%s\""
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Kan inte stta felutskriftsfil: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "VARNING: \\0 kommer att frsvinna, anvnd \\& istllet i ersttningar"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Otilltet reguljruttryck \"%s\": %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Fel nr reguljruttrycket \"%s\" matchades"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen (trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Otilltet uttryck i \"eval\" (hgerparentes saknas): %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Otilltet uttryck i \"eval\": %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Otilltet uttryck i \"eval\" (otilltet indata): %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Otilltet uttryck i \"eval\" (fr mycket indata): %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Division med noll i \"eval\": %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo med noll i \"eval\": %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "INTERNT FEL: Otillten felkod i evaluate ()"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "INTERNT FEL: Otillten jmfrelseoperator i cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "INTERNT FEL: Otillten skiftoperator i shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "INTERNT FEL: Otillten operator i mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "INTERNT FEL: Inbyggt makro finns inte i tabellen!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i freeze_one_symbol ()"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Nyrad frvntas i fryst fil"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Tecknet \"%c\" frvntas i fryst fil"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Korrupt fryst fil"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Fr tidigt filslut i fryst fil"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "\"%s\" frn fryst fil hittades inte i tabellen fr inbyggda makron!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Indata tergr till %s, rad %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Indata lses frn %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "INTERNT FEL: Rekursiv push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "INTERNT FEL: Otilltet anrop till init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "INTERNT FEL: Instacken havererade i next_char ()"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "INTERNT FEL: Instacken havererade i peek_input ()"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "INGET"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "FEL: Filslut i strng"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "FEL: Stacken fldar ver. (Ondlig definitionsrekursion?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Frsk med \"%s --help\" fr mer information.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Anvndning: %s [FLAGGA]... [FIL]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Obligatoriska respektive valfria argument fr lnga flaggor r\n"
+"obligatoriska respektive valfria ven fr korta.\n"
+"\n"
+"Krlgen:\n"
+" --help visa denna hjlptext och avsluta\n"
+" --version visa versionsinformation och avsluta\n"
+" -e, --interactive obuffrad utskrift, ignorera avbrott\n"
+" -E, --fatal-warnings avsluta exekvering efter frsta varningen\n"
+" -Q, --quiet, --silent undertryck vissa varningar om inbyggda makron\n"
+" -P, --prefix-builtins alla inbyggda makron brjar med `m4_'\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP anvnd REGEXP som makronamnsyntax\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Dynamisk laddning:\n"
+" -m, --module-directory=KATALOG sk moduler ven i KATALOG\n"
+" -M, --load-module=MODUL ladda MODUL frn M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Frprocessorstyrning:\n"
+" -I, --include=KATALOG sk i katalog efter inkluderade filer\n"
+" -D, --define=NAMN[=VRDE] definiera NAMN som VRDE, eller tomt\n"
+" -U, --undefine=NAMN ta bort inbyggt makro\n"
+" -s, --synclines generera rader med '#line NNN \"FIL\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Begrnsningskontroll:\n"
+" -G, --traditional undertryck alla extra GNU-tillgg\n"
+" -H, --hashsize=PRIMTAL stt storlek p symboltabellen\n"
+" -L, --nesting-limit=ANTAL ndra artificiell nstningsniv\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Frysta tillstndsfiler:\n"
+" -F, --freeze-state=FIL spara fryst tillstnd i FIL vid avslut\n"
+" -R, --reload-state=FIL ls fryst tillstnd frn FIL vid start\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Felskning:\n"
+" -d, --debug=[FLAGGOR] stt felskningsniv\n"
+" (inga FLAGGOR tolkas som \"aeq\")\n"
+" -t, --trace=NAMN spra NAMN nr den blir definierad\n"
+" -l, --arglength=ANTAL begrnsa makrosprningsstorleken\n"
+" -o, --error-output=FIL avled felsknings- och sprutskrifter till FIL\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGGOR kan vara en eller flera av:\n"
+" t spra alla makroanrop, inte bara de som spras med \"traceon\"\n"
+" a visa aktuella argument\n"
+" e visa expansioner\n"
+" q stt citationstecken dr det behvs, gller \"a\" och \"e\"\n"
+" c visa fre insamling, efter insamling och efter anrop\n"
+" x lgg till en unik identifierare fr makroanrop, anvndbart med \"c\"\n"
+" f visa namnet p aktuell infil\n"
+" l visa raden i aktuell infil\n"
+" p visa resultatet av skvgsskningar\n"
+" i visa byten av infil\n"
+" V frkortning fr alla ovanstende flaggor\n"
+
+#: src/m4.c:220
+msgid "\nIf no FILE or if FILE is `-', standard input is read.\n"
+msgstr "\nOm ingen FIL anges eller om FIL r `-', s lses standard in.\n"
+
+#: src/m4.c:225
+msgid "\nReport bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Rapportera fel till <bug-m4@gnu.org>.\n"
+"Rapportera fel p versttningen till <sv@li.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Oknd felskningsflagga \"%s\""
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "FEL: misslyckades med att lgga till skkatalog \"%s\""
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "FEL: misslyckades med att lgga till skkatalog \"%s\": %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tillgg:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "INTERNT FEL: Otillten kod i argument"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i expand_token ()"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "FEL: Filslut i argumentlistan"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "INTERNT FEL: Otillten lexikalisk datatyp i expand_argument ()"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "INTERNT FEL: Otillten symboltyp i call_macro ()"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "FEL: Rekursionsgrns %d verskriden, anvnd -L<N> fr att ndra"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "FEL: misslyckades med att initiera moduler: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "FEL: kan inte hitta modul: \"%s\""
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "FEL: kan inte hitta modul: \"%s\": %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "FEL: kan inte stnga moduler"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "FEL: kan inte stnga moduler: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "FEL: kan inte stnga modul: \"%s\""
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "FEL: kan inte stnga modul: \"%s\": %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "FEL: Kan inte skapa temporr fil fr avledning"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "FEL: Kan inte skriva avledningen till temporr fil"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "FEL: Kopiering av insatt fil"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "FEL: Lsning av insatt fil"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Kan inte ta status p avledningen"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Avledning fr stor"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "\"%s\" hittades som \"%s\" i skvgen"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Begrnsning fr VMEM verskriden?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Otillten referens utanfr minnesgrnserna har upptckts (SIGSEGV).\n"
+"Antingen fldade stacken ver eller s r det ett fel i "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Kontrollera om ondlig rekursion frekommer.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "INTERNT FEL: Otilltet lge till symbol_lookup ()"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Namnet \"%s\" r oknt\n"
+
+msgid "Undefined macro `%s'"
+msgstr "Odefinierat makro \"%s\""
+
+msgid "Module search for `%s' found `%s'"
+msgstr "Modulskning fr \"%s\" hittade \"%s\""
diff --git a/po/vi.po b/po/vi.po
new file mode 100644
index 00000000..845eefb7
--- /dev/null
+++ b/po/vi.po
@@ -0,0 +1,663 @@
+# Vietnamese Translation for m4-1.4o.
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Clytie Siddall <clytie@riverland.net.au>, 2005.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: <bug-m4@gnu.org>\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-02-11 20:51+1030\n"
+"Last-Translator: Clytie Siddall <clytie@riverland.net.au>\n"
+"Language-Team: Vietnamese <gnomevi-list@lists.sourceforge.net> \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s: tùy chọn `%s' mơ hồ\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `--%s' không cho phép đối số\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `%c%s' không cho phép đối số\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s: tùy chọn `%s' cần đến đối số\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s: không chấp nhận tùy chọn `--%s'\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s: không chấp nhận tùy chọn `%c%s'\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s: không cho phép tùy chọn -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s: tùy chọn không hợp lệ -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s: tùy chọn cần đến đối số -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s: tùy chọn `-W %s' mơ hồ\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s: tùy chọn `-W %s' không cho phép đối số\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "hết bộ nhớ"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "Thành công"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "Không khớp với gì"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "Biểu thức chính quy không hợp lệ"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "Ký tự đối hợp không hợp lệ"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "Tên loại ký tự không hợp lệ"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "Xuyệc ngược theo sau"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "Tham chiếu quay lui không hợp lệ"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "Chưa khớp ký tự [ hay [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "Chưa khớp ký tự ( hay \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "Chưa khớp ký tự \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} có nội bộ không hợp lệ"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "Kết thức miền không hợp lệ"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "Hết bộ nhớ"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "Biểu thức chính quy đi trước không hợp lệ"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "Biểu thức chính quy có kết thức quá sớm"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "Biểu thức chính quy quá lớn"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "Chưa khớp ký tự ) hay \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "Không có biểu thức chính quy trước này"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "Cảnh báo: quá ít đối số đối với `%s' có sẵn"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "Cảnh báo: quá nhiều đối số đối với `%s' có sẵn bị bỏ qua"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "Có đối số không thuộc số đối với `%s' có sẵn"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong define_macro () (định nghĩa bộ lệnh thay thế)"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "Chưa định nghĩa tên %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "LỖI NỘI BỘ: Chưa tìm điều builtin trong bảng builtin (có sẵn)"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong m4_dumpdef ()"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "Chưa định nghĩa tên `%s'"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "LỖI NỘI BỘ: loại ký hiệu sai trong m4_defn ()"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "Không mở được đường ống đến lệnh `%s'"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "Cơ số trong eval (việc tính để kiểm tra) ngoài miền (cơ số = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "Eval (việc tính để kiểm tra) có độ dài âm"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s có đối số không thuộc số"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "Không thể bỏ việc làm trệch hướng %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "Chưa định nghĩa mã cú pháp %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "Không mở được %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "Chế độ gỡ lỗi: cờ gỡ lỗi sai: `%s'"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "Không lập được tập tin lỗi: %s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "CẢNH BÁO: \\0 sẽ biến mất nên hãy sử dụng \\& khi thay thế"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "Biểu thức chính quy sai `%s': %s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "Gặp lỗi khi khớp với biểu thức chính quy `%s'"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "LỖI NỘI BỘ: Chưa tìm builtin (có sẵn) trong bảng builtin. (trace_pre ()) (tìm thấy dấu vết trước)"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai (trace_pre ()) (tìm thấy dấu vết trước)"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - thiếu ngoặc phải: %s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - dữ liệu nhập sai: %s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "Biểu thức sai trong eval (việc tính để kiểm tra) - quá nhiều dữ liệu nhập: %s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "Chia cho số không trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "Modulo cho số không trong eval (việc tính để kiểm tra): %s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "LỖI NỘI BỘ: mã lỗi sai trong evaluate () "
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "LỖI NỘI BỘ: toán tử so sánh sai trong cmp_term ()"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "LỖI NỘI BỘ: toán tử sử dụng phím tăng tốc là sai trong shift_term ()"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "LỖI NỘI BỘ: toán tử sai trong mult_term ()"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "LỖI NỘI BỘ: chưa tìm built-in (có sẵn) trong bảng builtin"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "LỖI NỘI BỘ: loại dữ liệu hiệu bài sai trong freeze_one_symbol () (đông lạnh một ky tự)"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "Ngờ ký tự ngắt dòng trong tập tin đông lạnh"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "Ngờ ký tự `%c' trong tập tin đông lạnh"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "Tập tin đông lạnh có dạng khuyết tật"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "Tập tin đông lạnh có kết thức quá sớm"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "`%s' từ tập tin đông lạnh chưa được tìm trong bảng builtin (có sẵn)"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "Dữ liệu nhập trở lại %s, dòng %d"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "Đã đọc dữ liệu nhập từ %s"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "LỖI NỘI BỘ: push-string (đẩy-chuỗi) đệ qui."
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "LỖI NỘI BỘ: việc gọi sai đến init_macro_token () (hiệu bàì bộ lệnh thay thế)"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "LỖI NỘI BỘ: lỗi ngăn xếp nhập (input stack) trong next_char () (ký tự tới)"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "LỖI NỘI BỘ: lỗi ngăn xếp nhập (input stack) trong peek_input () (hé nhìn nhâp)"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "Không có"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "LỖI: gặp kết thức tập tin trong chuỗi"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "LỖI: ngăn xếp bị tràn. (Đệ qui định nghĩa có vô hạn không?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "Hãy thử lệnh `%s --help' để tìm thấy thông tin thêm.\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "Cách sử dụng: %s [TÙY_CHỌN]... [TẬP_TIN]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"Tất cả đối số bắt buộc hay tùy chọn đối với tùy chọn dài cũng bắt buộc \n"
+"hay tùy chọn đối với tùy chọn ngắn\n"
+"\n"
+"Chế độ thi hành:\n"
+" --help hiển thị _trợ giúp_ này rồi thoát\n"
+" --version xuất thông tin _phiên bản_ rồi thoát\n"
+" -e, --interactive trừ dữ liệu xuất ra bộ đệm, bỏ qua các lệnh ngắt (_tương tác_)\n"
+" -E, --fatal-warnings thôi thi hành sau khi gặp _cảnh báo_ thứ nhất (_nghiêm trọng_)\n"
+" -Q, --quiet, --silent thu hồi một phần cảnh báo đối với builtin (có sẵn) (_im_)\n"
+" -P, --prefix-builtins buộc _tiền tố_ `m4_' đối với tất cả builtin (có sẵn)\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=BIỂU_THỨC_CHÍNH_QUY sử dụng biểu thức chính quy ấy đối với cú pháp tên bô lệnh thay thế\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"Tính năng tải động:\n"
+" -m, --module-directory=THƯ_MỤC thêm thư mục ấy vào đường dẫn tìm kiếm mô-đun\n"
+" -M, --load-module=MÔ-ĐUN tải mô-đun động từ dường dẫn M4MODPATH\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"Tính năng tiền xử lý:\n"
+" -I, --include=THƯ_MỤC tìm kiếm tập tin include (bao gồm) trong thư mục này thứ hai\n"
+" -D, --define=TÊN[=TRỊ_SỐ] nhập tên ấy có trị số ấy hay là trống (_định nghĩa_)\n"
+" -U, --undefine=TÊN xóa bỏ builtin (có sẵn) tên ấy (_bỏ định nghĩa_)\n"
+" -s, --synclines tạo dòng loại `#line NO \"FILE\"'\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"Điều kiện giới hạn:\n"
+" -G, --traditional thu hồi tất cả trình mở rộng GNU (_truyền thống_)\n"
+" -H, --hashsize=SỐ_NGUYÊN_TỐ lập _cỡ_ bảng _băm_ tra cứu ký hiệu\n"
+" -L, --nesting-limit=SỐ thay đổi _giới hạn lồng nhau_ nhân tạo\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"Tập tin tình trạng đông lạnh:\n"
+" -F, --freeze-state=TẬP_TIN _đông lạnh_ tập tin ấy khi xong (_tình trạng_)\n"
+" -R, --reload-state=TẬP_TIN _tải lại hình trạng_ đông lạnh từ tập tin ấy khi bắt đầu\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"Gỡ lỗi:\n"
+" -d, --debug=[CỜ] lập mức gỡ lỗi (khi không có cờ thì ngụ ý `aeq')\n"
+" -t, --trace=TÊN tìm thấy _dấu vết_ tên ấy khi nó sẽ được định nghĩa\n"
+" -l, --arglength=SỐ hạn chế cỡ bộ lệnh thay thế (macro) tìm thấy dấu vết\n"
+"(_độ dài đối số_)\n"
+" -o, --error-output=TẬP_TIN chuyển hướng _xuất_ dữ liệu gỡ _lỗi_\n"
+"và tìm thấy dấu vết\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"Những CỜ có thể:\n"
+" t tìm thấy dấu vết tất cả việc gọi bô lệnh thay thế (macro),\n"
+"không chỉ loại traceon\n"
+" a hiển thị tất cả đối số thật\n"
+" e hiển thị dạng mở rộng\n"
+" q hiển thị trị số khi cần đến, với cờ a hay e\n"
+" c hiển thị trước khi tập hợp (collect), sau khi tập hợp và sau khi gọi\n"
+" x thêm điều nhận biết việc gọi bô lệnh thay thế (macro) độc nhất,\n"
+"có ích với cờ c\n"
+" f nói tên tập tin nhập hiện\n"
+" l nói số dòng nhập hiện\n"
+" p hiển thị kết quả của các việc tìm kiếm đường dẫn\n"
+" i hiển thị các sự thay đổi trong những tập tin nhập\n"
+" V lời tắt cho tất cả cờ ở trên\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"Nếu không có tập tin, hay nếu tập tin là `-', thì đọc dữ liệu nhập chuẩn.\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"Hãy thông báo lỗi cho <bug-m4@gnu.org>.\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "Cờ gỡ lỗi sai: `%s'"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "LỖI: không thêm được thư mục tìm kiếm `%s'"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "LỖI: không thêm được thư mục tìm kiếm `%s': %s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (tùy chọn:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "LỖI NỘI BỘ: mã sai trong đối số trì hoãn"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "LỖI NỘI BỘ: loại hiệu bài sai trong expand_token () (mở rộng hiệu bài)"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "LỖI: gặp kêt thức tâp tin trong danh sách đối số"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "LỖI NỘI BỘ: loại hiệu bài sai trong expand_argument () (mở rộng đối số)"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "LỖI NỘI BỘ: loại ký hiệu sai trong call_macro () (gọi bộ lệnh thay thế)"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "LỖI: giới hạn %d bị vượt quá nên hãy sử dụng -L<N> để thay đổi nó"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "LỖI: không khởi động mô-đun được: %s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "LỖI: không tìm được mô-đun: `%s'"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "LỖI: không tìm được mô-đun: `%s': %s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "LỖI: không đóng được mô-đun"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "LỖI: không đóng được mô-đun: %s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "LÔI: không đóng được mô-đun: `%s'"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "LỖI: không đóng được mô-đun: `%s': %s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "LỖI: không tạo được tập tin tạm thời đối với sự trệch đi"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "LỖI: không chuyển hết sự trệch đi ra vào tập tin tạm thời"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "LỖI: sao chép tập tin đã chèn"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "LỖI: đọc tập tin đã chèn"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "Không thể gọi tất cả thông tin về (stat) sự trệch đi"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "Sự trệch đi quá lớn"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "Việc tìm kiếm đường dẫn `%s' thì tìm `%s'"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "Giới hạn VMEM bị vượt quá không?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"Mới phát hiện việc vượt trội giới hạn bộ nhớ (SIGSEGV). \n"
+"Hoặc ngăn xếp bị tràn hoặc có lỗi trong"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". Kiểm tra đệ qui vô hạn có thê.\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "LỖI NỘI BỘ: không cho phép chế độ đối với symbol_lookup () (tra cứu ký hiệu)"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "Chưa biết tên `%s'\n"
diff --git a/po/zh_CN.po b/po/zh_CN.po
new file mode 100644
index 00000000..31869606
--- /dev/null
+++ b/po/zh_CN.po
@@ -0,0 +1,658 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) 2003, 2008 Free Software Foundation, Inc.
+# Wang Li <charles@linux.net.cn>, 2003.
+# LI Daobing <lidaobing@gmail.com>, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2008-02-05 22:15+0800\n"
+"Last-Translator: LI Daobing <lidaobing@gmail.com>\n"
+"Language-Team: Chinese (simplified) <i18n-zh@googlegroups.com>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s:选项“%s”有二义性\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s:选项“--%s”不接受参数\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s:选项“%c%s”不接受参数\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s:选项“%s”需要一个参数\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s:无法识别的选项“--%s”\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s:无法识别的选项“%c%s”\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s:非法的选项 -- %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s:无效的选项 -- %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s:选项需要一个参数 -- %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s:选项“-W %s”有二义性\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s:选项“-W %s”不接受参数\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "内存耗尽"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "无匹配"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "无效的正规表达式"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "无效的 collation 字符"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "无效的字符类名"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "末尾的反斜线"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "无效的向后引用"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "不匹配的 [ 或 [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "不匹配的 ( 或 \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "不匹配的 \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} 的内容无效"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "无效的范围结束"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "内存耗尽"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "无效的前置正规表达式"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "不完整的正规表达式"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正规表达式过大"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "不匹配的 ) 或 \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "没有上一个正规表达式"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告:内置宏“%s”的参数不足"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告:忽略过多的内置宏“%s”"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "内置宏“%s”的非数值参数"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "内部错误:define_marco () 中错误的标记数据类型"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "未定义的名称 %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "内部错误:在内置宏表中找不到内置宏!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "内部错误:m4_dumpdef () 中错误的标记数据类型"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "未定义的名称“%s”"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "内部错误:m4_defn () 中的错误符号类型"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "无法打开到命令“%s”的管道"
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "求值中根超出范围 (根 = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "求值负宽度"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s 的非数值参数"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "无法反转换 %s"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "未定义的语法编码 %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "无法打开 %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "调试模式:错误的调试标志:“%s”"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "无法设置错误文件:%s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告:\\\\0 将消失,用 \\\\& 作为替代"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "错误的正规表达式“%s”:%s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "匹配正规表达式“%s”出错"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "内部错误:在内置宏表中找不到内置宏!(trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "内部错误:错误的标记数据类型 (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "求值错误的表达式 (缺少右括号):%s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "求值错误的表达式:%s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "求值错误的表达式 (错误的输入):%s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "求值错误的表达式 (过多的输入):%s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "求值中除零:%s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "求值中按零取模:%s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "内部错误:evaluate () 中错误的错误码"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "内部错误:cmp_term () 中错误的比较操作"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "内部错误:shift_term () 中错误的位移操作"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "内部错误:mult_term () 中错误的操作"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "内部错误:内置宏表中找不到内置宏!"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "内部错误:freeze_one_symbol () 中错误的标记数据类型"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "在冻结文件中应为换行符"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "在冻结文件中应为字符“%c”"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "冻结文件的格式错误"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "不完整的冻结文件"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "在内置宏表中找不到来自冻结文件的“%s”!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "输入退回到 %s 的第 %d 行"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "从 %s 中读取输入"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "内部错误:递归地 push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "内部错误:错误地调用 init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "内部错误:next_char () 中输入栈出错"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "内部错误:peek_input () 中输入栈出错"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "无"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "错误:字符串中的 EOF"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "错误:栈溢出。(无穷的定义递归?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "试用“%s --help”以获取更多信息。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "用法:%s [选项]... [文件]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"必须给出或可选的长选项对应的短选项同样是必须给出或可选的。\n"
+"\n"
+"操作模式:\n"
+" --help 显示该求助信息并退出\n"
+" --version 输出版本信息并退出\n"
+" -e, --interactive 不缓冲输出,忽略中段\n"
+" -E, --fatal-warnings 在第一个警告后中止执行\n"
+" -Q, --quiet, --silent 关闭关于内置宏的某些警告\n"
+" -P, --prefix-builtins 为所有内置宏强制添加前缀“m4_”\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=正规表达式 将“正规表达式”作为宏名的语法\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"动态加载特征:\n"
+" -m, --module-directory=目录 将“目录”添加到模块搜索路径中\n"
+" -M, --load-module=模块 从路径 M4MODPATH 中装入“模块”\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"预处理器特征:\n"
+" -I, --include=目录 在此目录中搜索引入文件\n"
+" -D, --define=名字[=值] 将“名字”的值定义为“值”或空\n"
+" -U, --undefine=名字 删除内置宏“名字”\n"
+" -s, --synclines 生成 “#line NO \"FILE\"” 行\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"限止控制:\n"
+" -G, --traditional 关闭所有 GNU 扩展\n"
+" -H, --hashsize=PRIME 设置符号搜索杂凑表的大小\n"
+" -L, --nesting-limit=NUMBER 改变手工嵌套限制\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"冻结状态文件:\n"
+" -F, --freeze-state=文件 在结束时在“文件”中生成冻结状态\n"
+" -R, --reload-state=文件 在启动是从“文件”中重新装入冻结状态\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"调试:\n"
+" -d, --debug=[标志] 设定调试级别 (无“标志”表示“aeq”)\n"
+" -t, --trace=名字 在定义了“名字”的时候跟踪它\n"
+" -l, --arglength=长度 限止宏跟踪大小\n"
+" -o, --error-output=文件 重定向调试和跟踪输出\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"“标志”是以下字符之一:\n"
+" t 跟踪所有的宏调用,而不仅仅是标为要跟踪的宏\n"
+" a 显示实际的参数\n"
+" e 显示扩展\n"
+" q 带 a 或 e 标志,按需要引用值\n"
+" c 在收集之前、收集之后和调用之后显示\n"
+" x 添加一个唯一的宏调用标识,使用 c 标志时有用\n"
+" f 输出当前输入文件名\n"
+" l 输出当前输入行行号\n"
+" p 显示路径搜索结果\n"
+" i 显示输入文件中的变化\n"
+" V 所有以上标志的缩写\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"如果未给出“文件”或“文件”为“-”,就从标准输入中读。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"将错误报告到 <bug-m4@gnu.org>。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "错误的调试标志:“%s”"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "错误:添加搜索目录“%s”失败"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "错误:添加搜索目录“%s”失败:%s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr " (选项:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "内部错误:延迟参数中错误的代码"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "内部错误:expand_token () 中错误的标记类型"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "错误:参数列表中出现 EOF"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "内部错误:expand_argument () 中错误的标记类型"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "内部错误:call_macro () 中错误的符号类型"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "错误:超出递归上限 %d,使用 -L<N> 以改变此上限"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "错误:初始化模块失败:%s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "错误:无法找到模块:“%s”"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "错误:无法找到模块:“%s”:%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "错误:无法关闭模块"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "错误:无法关闭模块:%s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "错误:无法关闭模块:“%s”"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "错误:无法关闭模块:“%s”:%s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "错误:无法为转换创建临时文件"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "错误:无法将转换刷新到临时文件"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "错误:复制已插入的文件"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "错误:读取已插入的文件"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "无法获取转换的状态"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "转换过大"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "搜索“%s”的路径找到“%s”"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "超出 VMEM 限止?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr ""
+"检测到内存超界 (SIGSEGV)。\n"
+"栈溢出或有 bug"
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr ". 检查可能的无限递归。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "内部错误:symbol_lookup () 的非法模式"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "名字“%s”是未知的\n"
diff --git a/po/zh_TW.po b/po/zh_TW.po
new file mode 100644
index 00000000..742f153c
--- /dev/null
+++ b/po/zh_TW.po
@@ -0,0 +1,657 @@
+# Traditional Chinese Messages for m4
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# Wei-Lun Chao <chaoweilun@pcmail.com.tw>, 2005
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: m4 1.4o\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2000-01-10 05:27+0100\n"
+"PO-Revision-Date: 2005-06-06 09:05+0800\n"
+"Last-Translator: Wei-Lun Chao <chaoweilun@pcmail.com.tw>\n"
+"Language-Team: Chinese (traditional) <zh-l10n@linux.org.tw>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: lib/getopt.c:677
+#, c-format
+msgid "%s: option `%s' is ambiguous\n"
+msgstr "%s:選項‘%s’不明確\n"
+
+#: lib/getopt.c:702
+#, c-format
+msgid "%s: option `--%s' doesn't allow an argument\n"
+msgstr "%s:選項‘--%s’不可配合引數使用\n"
+
+#: lib/getopt.c:707
+#, c-format
+msgid "%s: option `%c%s' doesn't allow an argument\n"
+msgstr "%s:選項‘%c%s’不可配合引數使用\n"
+
+#: lib/getopt.c:725 lib/getopt.c:898
+#, c-format
+msgid "%s: option `%s' requires an argument\n"
+msgstr "%s:選項‘%s’需要引數\n"
+
+#. --option
+#: lib/getopt.c:754
+#, c-format
+msgid "%s: unrecognized option `--%s'\n"
+msgstr "%s:無法識別的選項‘--%s’\n"
+
+#. +option or -option
+#: lib/getopt.c:758
+#, c-format
+msgid "%s: unrecognized option `%c%s'\n"
+msgstr "%s:無法識別的選項‘%c%s’\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:784
+#, c-format
+msgid "%s: illegal option -- %c\n"
+msgstr "%s:不合法的選項 ─ %c\n"
+
+#: lib/getopt.c:787
+#, c-format
+msgid "%s: invalid option -- %c\n"
+msgstr "%s:無效的選項 ─ %c\n"
+
+#. 1003.2 specifies the format of this message.
+#: lib/getopt.c:817 lib/getopt.c:947
+#, c-format
+msgid "%s: option requires an argument -- %c\n"
+msgstr "%s:選項需要引數 ─ %c\n"
+
+#: lib/getopt.c:864
+#, c-format
+msgid "%s: option `-W %s' is ambiguous\n"
+msgstr "%s:選項‘-W %s’不明確\n"
+
+#: lib/getopt.c:882
+#, c-format
+msgid "%s: option `-W %s' doesn't allow an argument\n"
+msgstr "%s:選項‘-W %s’不可配合引數使用\n"
+
+#: lib/obstack.c:471
+msgid "memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regex.c:1019
+msgid "Success"
+msgstr "成功"
+
+#: lib/regex.c:1022
+msgid "No match"
+msgstr "沒有符合的字串"
+
+#: lib/regex.c:1025
+msgid "Invalid regular expression"
+msgstr "無效的正規表示式"
+
+#: lib/regex.c:1028
+msgid "Invalid collation character"
+msgstr "無效的 collation 字元"
+
+#: lib/regex.c:1031
+msgid "Invalid character class name"
+msgstr "無效的字元種類名稱"
+
+#: lib/regex.c:1034
+msgid "Trailing backslash"
+msgstr "末端有多餘的反斜號"
+
+#: lib/regex.c:1037
+msgid "Invalid back reference"
+msgstr "無效的 back reference"
+
+#: lib/regex.c:1040
+msgid "Unmatched [ or [^"
+msgstr "沒有對應的 [ 或 [^"
+
+#: lib/regex.c:1043
+msgid "Unmatched ( or \\("
+msgstr "沒有對應的 ( 或 \\("
+
+#: lib/regex.c:1046
+msgid "Unmatched \\{"
+msgstr "沒有對應的 \\{"
+
+#: lib/regex.c:1049
+msgid "Invalid content of \\{\\}"
+msgstr "\\{\\} 中的內容無效"
+
+#: lib/regex.c:1052
+msgid "Invalid range end"
+msgstr "範圍末端字元無效"
+
+#: lib/regex.c:1055 lib/xmalloc.c:82
+msgid "Memory exhausted"
+msgstr "記憶體耗盡"
+
+#: lib/regex.c:1058
+msgid "Invalid preceding regular expression"
+msgstr "之前的正規表示式無效"
+
+#: lib/regex.c:1061
+msgid "Premature end of regular expression"
+msgstr "正規表示式過早結束"
+
+#: lib/regex.c:1064
+msgid "Regular expression too big"
+msgstr "正規表示式過長"
+
+#: lib/regex.c:1067
+msgid "Unmatched ) or \\)"
+msgstr "沒有對應的 ) 或 \\)"
+
+#: lib/regex.c:5564
+msgid "No previous regular expression"
+msgstr "之前沒有任何正規表示式"
+
+#: src/builtin.c:349
+#, c-format
+msgid "Warning: Too few arguments to built-in `%s'"
+msgstr "警告:內建「%s」的引數太少"
+
+#: src/builtin.c:355
+#, c-format
+msgid "Warning: Excess arguments to built-in `%s' ignored"
+msgstr "警告:內建「%s」的超額引數被忽略"
+
+#: src/builtin.c:383
+#, c-format
+msgid "Non-numeric argument to built-in `%s'"
+msgstr "提供了非數值引數給內建「%s」"
+
+#: src/builtin.c:494
+msgid "INTERNAL ERROR: Bad token data type in define_macro ()"
+msgstr "內部錯誤:define_macro() 中不當的表徵資料型態"
+
+#: src/builtin.c:681 src/builtin.c:780 src/builtin.c:1423 src/builtin.c:1447
+#, c-format
+msgid "Undefined name %s"
+msgstr "未定義的名稱 %s"
+
+#: src/builtin.c:721
+msgid "INTERNAL ERROR: Builtin not found in builtin table!"
+msgstr "內部錯誤:無法在內建表格中找到內建指令!"
+
+#: src/builtin.c:729
+msgid "INTERNAL ERROR: Bad token data type in m4_dumpdef ()"
+msgstr "內部錯誤:m4_dumpdef() 中不當的表徵資料型態"
+
+#: src/builtin.c:804
+#, c-format
+msgid "Undefined name `%s'"
+msgstr "未定義的名稱「%s」"
+
+#: src/builtin.c:842
+msgid "INTERNAL ERROR: Bad symbol type in m4_defn ()"
+msgstr "內部錯誤:m4_defn() 中不當的符號型態"
+
+#: src/builtin.c:908
+#, c-format
+msgid "Cannot open pipe to command `%s'"
+msgstr "無法開啟至命令「%s」 的管道."
+
+#: src/builtin.c:948
+#, c-format
+msgid "Radix in eval out of range (radix = %d)"
+msgstr "求值時基數超出範圍 (基數 = %d)"
+
+#: src/builtin.c:957
+msgid "Negative width to eval"
+msgstr "求值寬度為負"
+
+#: src/builtin.c:1063
+#, c-format
+msgid "Non-numeric argument to %s"
+msgstr "%s 的引數非數值"
+
+#: src/builtin.c:1075
+#, c-format
+msgid "Cannot undivert %s"
+msgstr "無法反向轉移「%s」"
+
+#: src/builtin.c:1223
+#, c-format
+msgid "Undefined syntax code %c"
+msgstr "未定義的語法碼 %c"
+
+#: src/builtin.c:1274 src/freeze.c:211
+#, c-format
+msgid "Cannot open %s"
+msgstr "無法開啟 %s"
+
+#: src/builtin.c:1483
+#, c-format
+msgid "Debugmode: bad debug flags: `%s'"
+msgstr "除錯模式:不當的除錯旗標:「%s」"
+
+#: src/builtin.c:1519
+#, c-format
+msgid "Cannot set error file: %s"
+msgstr "無法設置錯誤檔案:%s"
+
+#: src/builtin.c:1740
+msgid "WARNING: \\0 will disappear, use \\& instead in replacements"
+msgstr "警告:\\0 將會消失,請於置換時使用 \\& 代替"
+
+#: src/builtin.c:1801 src/builtin.c:1861 src/input.c:1014
+#, c-format
+msgid "Bad regular expression `%s': %s"
+msgstr "不當的正規表示式「%s」:%s"
+
+#: src/builtin.c:1812 src/builtin.c:1885
+#, c-format
+msgid "Error matching regular expression `%s'"
+msgstr "對應正規表示式「%s」時出現錯誤"
+
+#: src/debug.c:380
+msgid "INTERNAL ERROR: Builtin not found in builtin table! (trace_pre ())"
+msgstr "內部錯誤:無法在內建表格中找到內建指令!(trace_pre ())"
+
+#: src/debug.c:388
+msgid "INTERNAL ERROR: Bad token data type (trace_pre ())"
+msgstr "內部錯誤:不當的表徵資料型態 (trace_pre ())"
+
+#: src/eval.c:309
+#, c-format
+msgid "Bad expression in eval (missing right parenthesis): %s"
+msgstr "求值時不當的表示式 (缺少右側括號):%s"
+
+#: src/eval.c:315
+#, c-format
+msgid "Bad expression in eval: %s"
+msgstr "求值時不當的表示式:%s"
+
+#: src/eval.c:320
+#, c-format
+msgid "Bad expression in eval (bad input): %s"
+msgstr "求值時不當的表示式 (不當的輸入):%s"
+
+#: src/eval.c:325
+#, c-format
+msgid "Bad expression in eval (excess input): %s"
+msgstr "求值時不當的表示式 (超額的輸入):%s"
+
+#: src/eval.c:330
+#, c-format
+msgid "Divide by zero in eval: %s"
+msgstr "求值時被零除:%s"
+
+#: src/eval.c:335
+#, c-format
+msgid "Modulo by zero in eval: %s"
+msgstr "求值時計算除以零的餘數:%s"
+
+#: src/eval.c:340
+msgid "INTERNAL ERROR: Bad error code in evaluate ()"
+msgstr "內部錯誤:evaluate () 中不當的錯誤碼"
+
+#: src/eval.c:594
+msgid "INTERNAL ERROR: Bad comparison operator in cmp_term ()"
+msgstr "內部錯誤:cmp_term () 中不當的比較運算子"
+
+#: src/eval.c:639
+msgid "INTERNAL ERROR: Bad shift operator in shift_term ()"
+msgstr "內部錯誤:shift_term () 中不當的位移運算子"
+
+#: src/eval.c:738
+msgid "INTERNAL ERROR: Bad operator in mult_term ()"
+msgstr "內部錯誤:mult_term () 中不當的運算子"
+
+#: src/freeze.c:119
+msgid "INTERNAL ERROR: Built-in not found in builtin table!"
+msgstr "內部錯誤:內建表格中無法找到內建指令"
+
+#: src/freeze.c:132
+msgid "INTERNAL ERROR: Bad token data type in freeze_one_symbol ()"
+msgstr "內部錯誤:freeze_one_symbol () 中不當的表徵資料型態"
+
+#: src/freeze.c:163
+msgid "Expecting line feed in frozen file"
+msgstr "在凍結的檔案中期待有換列字元"
+
+#: src/freeze.c:165
+#, c-format
+msgid "Expecting character `%c' in frozen file"
+msgstr "在凍結的檔案中期待有「%c」字元"
+
+#: src/freeze.c:222
+msgid "Ill-formated frozen file"
+msgstr "不良格式的凍結檔案"
+
+#: src/freeze.c:277 src/freeze.c:293
+msgid "Premature end of frozen file"
+msgstr "凍結檔案突然結束"
+
+#: src/freeze.c:327
+#, c-format
+msgid "`%s' from frozen file not found in builtin table!"
+msgstr "來自凍結檔案的「%s」無法在內建表格中找到!"
+
+#: src/input.c:318
+#, c-format
+msgid "Input reverted to %s, line %d"
+msgstr "輸入還原到 %s,第 %d 列"
+
+#: src/input.c:346
+#, c-format
+msgid "Input read from %s"
+msgstr "輸入從 %s 讀取"
+
+#: src/input.c:506
+msgid "INTERNAL ERROR: Recursive push_string!"
+msgstr "內部錯誤:遞迴的 push_string!"
+
+#: src/input.c:623
+msgid "INTERNAL ERROR: Bad call to init_macro_token ()"
+msgstr "內部錯誤:不當呼叫 init_macro_token ()"
+
+#: src/input.c:663
+msgid "INTERNAL ERROR: Input stack botch in next_char ()"
+msgstr "內部錯誤:next_char () 中難看的輸入堆疊"
+
+#: src/input.c:700
+msgid "INTERNAL ERROR: Input stack botch in peek_input ()"
+msgstr "內部錯誤:peek_input () 中難看的輸入堆疊"
+
+#: src/input.c:805
+msgid "NONE"
+msgstr "NONE"
+
+#: src/input.c:1199 src/input.c:1226
+msgid "ERROR: EOF in string"
+msgstr "錯誤:字串中有檔尾字元 (EOF)"
+
+#: src/m4.c:119
+msgid "ERROR: Stack overflow. (Infinite define recursion?)"
+msgstr "錯誤:堆疊溢位。(無限的定義迴圈?)"
+
+#: src/m4.c:146
+#, c-format
+msgid "Try `%s --help' for more information.\n"
+msgstr "請嘗試執行「%s --help」來獲取更多資訊。\n"
+
+#: src/m4.c:150
+#, c-format
+msgid "Usage: %s [OPTION]... [FILE]...\n"
+msgstr "用法:%s [選項]... [檔案]...\n"
+
+#: src/m4.c:151
+msgid ""
+"Mandatory or optional arguments to long options are mandatory or optional\n"
+"for short options too.\n"
+"\n"
+"Operation modes:\n"
+" --help display this help and exit\n"
+" --version output version information and exit\n"
+" -e, --interactive unbuffer output, ignore interrupts\n"
+" -E, --fatal-warnings stop execution after first warning\n"
+" -Q, --quiet, --silent suppress some warnings for builtins\n"
+" -P, --prefix-builtins force a `m4_' prefix to all builtins\n"
+msgstr ""
+"對於長選項是必要的或是選擇性的引數,也同樣對於短選項是必要的或是選擇性的。\n"
+"\n"
+"作業模式:\n"
+" --help 顯示此輔助訊息並離開\n"
+" --version 輸出版本資訊並離開\n"
+" -e, --interactive 輸出不使用緩衝區,忽略插斷訊號\n"
+" -E, --fatal-warnings 在首次警告之後停止執行\n"
+" -Q, --quiet, --silent 抑制某些關於內建指令的警告\n"
+" -P, --prefix-builtins 強迫所有內建指令加上「m4_」前置文字\n"
+
+#: src/m4.c:164
+msgid " -W, --word-regexp=REGEXP use REGEXP for macro name syntax\n"
+msgstr " -W, --word-regexp=REGEXP 使用 REGEXP 做為巨集名稱語法\n"
+
+#: src/m4.c:169
+msgid ""
+"\n"
+"Dynamic loading features:\n"
+" -m, --module-directory=DIRECTORY add DIRECTORY to the module search path\n"
+" -M, --load-module=MODULE load dynamic MODULE from M4MODPATH\n"
+msgstr ""
+"\n"
+"動態載入特殊功能:\n"
+" -m, --module-directory=DIRECTORY 加入 DIRECTORY 至模組搜尋路徑\n"
+" -M, --load-module=MODULE 從 M4MODPATH 載入動態 MODULE\n"
+
+#: src/m4.c:176
+msgid ""
+"\n"
+"Preprocessor features:\n"
+" -I, --include=DIRECTORY search this directory second for includes\n"
+" -D, --define=NAME[=VALUE] enter NAME has having VALUE, or empty\n"
+" -U, --undefine=NAME delete builtin NAME\n"
+" -s, --synclines generate `#line NO \"FILE\"' lines\n"
+msgstr ""
+"\n"
+"前置處理器特殊功能:\n"
+" -I, --include=DIRECTORY 搜尋此目錄做為含入的輔助\n"
+" -D, --define=NAME[=VALUE] 輸入的 NAME 具有 VALUE,或是空值\n"
+" -U, --undefine=NAME 刪除內建的 NAME\n"
+" -s, --synclines 產生「#line NO \"FILE\"」的列\n"
+
+#: src/m4.c:184
+msgid ""
+"\n"
+"Limits control:\n"
+" -G, --traditional suppress all GNU extensions\n"
+" -H, --hashsize=PRIME set symbol lookup hash table size\n"
+" -L, --nesting-limit=NUMBER change artificial nesting limit\n"
+msgstr ""
+"\n"
+"限制控制:\n"
+" -G, --traditional 抑制所有 GNU 擴充功能\n"
+" -H, --hashsize=PRIME 設定符號查找雜湊表大小\n"
+" -L, --nesting-limit=NUMBER 改變人造巢狀迴圈限制\n"
+
+#: src/m4.c:191
+msgid ""
+"\n"
+"Frozen state files:\n"
+" -F, --freeze-state=FILE produce a frozen state on FILE at end\n"
+" -R, --reload-state=FILE reload a frozen state from FILE at start\n"
+msgstr ""
+"\n"
+"凍結狀態檔案:\n"
+" -F, --freeze-state=FILE 結束時於 FILE 產生凍結狀態\n"
+" -R, --reload-state=FILE 開始時從 FILE 重新載入凍結狀態\n"
+
+#: src/m4.c:197
+msgid ""
+"\n"
+"Debugging:\n"
+" -d, --debug=[FLAGS] set debug level (no FLAGS implies `aeq')\n"
+" -t, --trace=NAME trace NAME when it will be defined\n"
+" -l, --arglength=NUM restrict macro tracing size\n"
+" -o, --error-output=FILE redirect debug and trace output\n"
+msgstr ""
+"\n"
+"除錯:\n"
+" -d, --debug=[FLAGS] 設定除錯層級 (無 FLAGS 則表示「aeq」)\n"
+" -t, --trace=NAME 當 NAME 將會被定義時追蹤它\n"
+" -l, --arglength=NUM 限定巨集追蹤大小\n"
+" -o, --error-output=FILE 重新導向除錯與追蹤的輸出\n"
+
+#: src/m4.c:205
+msgid ""
+"\n"
+"FLAGS is any of:\n"
+" t trace for all macro calls, not only traceon'ed\n"
+" a show actual arguments\n"
+" e show expansion\n"
+" q quote values as necessary, with a or e flag\n"
+" c show before collect, after collect and after call\n"
+" x add a unique macro call id, useful with c flag\n"
+" f say current input file name\n"
+" l say current input line number\n"
+" p show results of path searches\n"
+" i show changes in input files\n"
+" V shorthand for all of the above flags\n"
+msgstr ""
+"\n"
+"FLAGS 是下列任何組合:\n"
+" t 追蹤所有巨集呼叫,而非只有被標示追蹤者\n"
+" a 顯示實際引數\n"
+" e 顯示展開狀況\n"
+" q 必要時標示引數值,並加上旗標 a 或 e\n"
+" c 於收集之前、收集之後與呼叫之後顯示\n"
+" x 加上獨一的巨集呼叫識別號,常與旗標 c 同時使用\n"
+" f 指明目前輸入檔案名稱\n"
+" l 指明目前輸入列號\n"
+" p 顯示路徑搜尋結果\n"
+" i 顯示輸入檔案中的變更\n"
+" V 代表以上所有旗標的簡稱\n"
+
+#: src/m4.c:220
+msgid ""
+"\n"
+"If no FILE or if FILE is `-', standard input is read.\n"
+msgstr ""
+"\n"
+"如果沒有指定 FILE 或 FILE 是 -,則由標準輸入讀取資料。\n"
+
+#: src/m4.c:225
+msgid ""
+"\n"
+"Report bugs to <bug-m4@gnu.org>.\n"
+msgstr ""
+"\n"
+"請向 <bug-m4@gnu.org> 回報錯誤。\n"
+
+#: src/m4.c:414
+#, c-format
+msgid "Bad debug flags: `%s'"
+msgstr "不當的除錯旗標:「%s」"
+
+#: src/m4.c:436
+#, c-format
+msgid "ERROR: failed to add search directory `%s'"
+msgstr "錯誤:無法加入搜尋目錄「%s」"
+
+#: src/m4.c:440
+#, c-format
+msgid "ERROR: failed to add search directory `%s': %s"
+msgstr "錯誤:無法加入搜尋目錄「%s」:%s"
+
+#: src/m4.c:460
+msgid " (options:"
+msgstr "(選項:"
+
+#: src/m4.c:542
+msgid "INTERNAL ERROR: Bad code in deferred arguments"
+msgstr "內部錯誤:延遲的引數中有不當的碼"
+
+#: src/macro.c:97
+msgid "INTERNAL ERROR: Bad token type in expand_token ()"
+msgstr "內部錯誤:expand_token () 中有不當的表徵型態"
+
+#: src/macro.c:163
+msgid "ERROR: EOF in argument list"
+msgstr "錯誤:引數串列中出現檔案結尾(EOF)"
+
+#: src/macro.c:182
+msgid "INTERNAL ERROR: Bad token type in expand_argument ()"
+msgstr "內部錯誤:expand_argument () 中有不當的表徵型態"
+
+#: src/macro.c:259
+msgid "INTERNAL ERROR: Bad symbol type in call_macro ()"
+msgstr "內部錯誤:call_macro () 中有不當的符號型態"
+
+#: src/macro.c:288
+#, c-format
+msgid "ERROR: Recursion limit of %d exceeded, use -L<N> to change it"
+msgstr "錯誤:超出 %d 的遞迴限制,使用 -L<N> 來修正它"
+
+#: src/module.c:123
+#, c-format
+msgid "ERROR: failed to initialise modules: %s"
+msgstr "錯誤:模組啟始失敗:%s"
+
+#: src/module.c:221
+#, c-format
+msgid "ERROR: cannot find module: `%s'"
+msgstr "錯誤:無法找到模組:「%s」"
+
+#: src/module.c:224
+#, c-format
+msgid "ERROR: cannot find module: `%s': %s"
+msgstr "錯誤:無法找到模組:「%s」:%s"
+
+#: src/module.c:274
+msgid "ERROR: cannot close modules"
+msgstr "錯誤:無法關閉模組"
+
+#: src/module.c:277
+#, c-format
+msgid "ERROR: cannot cannot close modules: %s"
+msgstr "錯誤:無法關閉模組:%s"
+
+#: src/module.c:284
+#, c-format
+msgid "ERROR: cannot close module: `%s'"
+msgstr "錯誤:無法關閉模組:「%s」"
+
+#: src/module.c:288
+#, c-format
+msgid "ERROR: cannot cannot close module: `%s': %s"
+msgstr "錯誤:無法關閉模組:「%s」:%s"
+
+#: src/output.c:262
+msgid "ERROR: Cannot create temporary file for diversion"
+msgstr "錯誤:無法建立轉移用的暫時檔案"
+
+#: src/output.c:272
+msgid "ERROR: Cannot flush diversion to temporary file"
+msgstr "錯誤:無法清空轉移資料至暫時檔案"
+
+#: src/output.c:356
+msgid "ERROR: Copying inserted file"
+msgstr "錯誤:複製已插入的檔案"
+
+#: src/output.c:537
+msgid "ERROR: Reading inserted file"
+msgstr "錯誤:讀取已插入的檔案"
+
+#: src/output.c:636
+msgid "Cannot stat diversion"
+msgstr "無法顯示轉移狀態"
+
+#: src/output.c:639
+msgid "Diversion too large"
+msgstr "轉移資料太大"
+
+#: src/path.c:157
+#, c-format
+msgid "Path search for `%s' found `%s'"
+msgstr "對於「%s」的路徑搜尋找到「%s」"
+
+#. sbrk failed. Assume the RLIMIT_VMEM prevents expansion even
+#. if the stack limit has not been reached.
+#: src/stackovf.c:175
+msgid "VMEM limit exceeded?\n"
+msgstr "超過 VMEM 限制?\n"
+
+#: src/stackovf.c:197
+msgid ""
+"Memory bounds violation detected (SIGSEGV). Either a stack overflow\n"
+"occurred, or there is a bug in "
+msgstr "偵測到違反記憶體邊界 (SIGSEGV)。可能是發生堆疊溢出,或是有程式錯誤於 "
+
+#: src/stackovf.c:202
+msgid ". Check for possible infinite recursion.\n"
+msgstr "。檢查是否有可能的無限迴圈。\n"
+
+#: src/symtab.c:190
+msgid "INTERNAL ERROR: Illegal mode to symbol_lookup ()"
+msgstr "內部錯誤:symbol_lookup () 的不正確模式"
+
+#: src/symtab.c:243
+#, c-format
+msgid "Name `%s' is unknown\n"
+msgstr "未知的名稱「%s」\n"
diff --git a/src/getopt.c b/src/getopt.c
new file mode 100755
index 00000000..406d5b71
--- /dev/null
+++ b/src/getopt.c
@@ -0,0 +1,1189 @@
+/* Getopt for GNU.
+ NOTE: getopt is part of the C library, so if you don't know what
+ "Keep this file name-space clean" means, talk to drepper@gnu.org
+ before changing it!
+ Copyright (C) 1987-1996, 1998-2004, 2006, 2008-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+#include "getopt.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#ifdef _LIBC
+# include <libintl.h>
+#else
+# include "gettext.h"
+# define _(msgid) gettext (msgid)
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+# include <wchar.h>
+#endif
+
+#ifndef attribute_hidden
+# define attribute_hidden
+#endif
+
+/* This version of `getopt' appears to the caller like standard Unix `getopt'
+ but it behaves differently for the user, since it allows the user
+ to intersperse the options with the other arguments.
+
+ As `getopt_long' works, it permutes the elements of ARGV so that,
+ when it is done, all the options precede everything else. Thus
+ all application programs are extended to handle flexible argument order.
+
+ Using `getopt' or setting the environment variable POSIXLY_CORRECT
+ disables permutation.
+ Then the behavior is completely standard.
+
+ GNU application programs can use a third alternative mode in which
+ they can distinguish the relative order of options and other arguments. */
+
+#include "getopt_int.h"
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+/* 1003.2 says this must be 1 before any call. */
+int optind = 1;
+
+/* Callers store zero here to inhibit the error message
+ for unrecognized options. */
+
+int opterr = 1;
+
+/* Set to an option character which was unrecognized.
+ This must be initialized on some systems to avoid linking in the
+ system's own getopt implementation. */
+
+int optopt = '?';
+
+/* Keep a global copy of all internal members of getopt_data. */
+
+static struct _getopt_data getopt_data;
+
+
+#if defined HAVE_DECL_GETENV && !HAVE_DECL_GETENV
+extern char *getenv ();
+#endif
+
+#ifdef _LIBC
+/* Stored original parameters.
+ XXX This is no good solution. We should rather copy the args so
+ that we can compare them later. But we must not use malloc(3). */
+extern int __libc_argc;
+extern char **__libc_argv;
+
+/* Bash 2.0 gives us an environment variable containing flags
+ indicating ARGV elements that should not be considered arguments. */
+
+# ifdef USE_NONOPTION_FLAGS
+/* Defined in getopt_init.c */
+extern char *__getopt_nonoption_flags;
+# endif
+
+# ifdef USE_NONOPTION_FLAGS
+# define SWAP_FLAGS(ch1, ch2) \
+ if (d->__nonoption_flags_len > 0) \
+ { \
+ char __tmp = __getopt_nonoption_flags[ch1]; \
+ __getopt_nonoption_flags[ch1] = __getopt_nonoption_flags[ch2]; \
+ __getopt_nonoption_flags[ch2] = __tmp; \
+ }
+# else
+# define SWAP_FLAGS(ch1, ch2)
+# endif
+#else /* !_LIBC */
+# define SWAP_FLAGS(ch1, ch2)
+#endif /* _LIBC */
+
+/* Exchange two adjacent subsequences of ARGV.
+ One subsequence is elements [first_nonopt,last_nonopt)
+ which contains all the non-options that have been skipped so far.
+ The other is elements [last_nonopt,optind), which contains all
+ the options processed since those non-options were skipped.
+
+ `first_nonopt' and `last_nonopt' are relocated so that they describe
+ the new indices of the non-options in ARGV after they are moved. */
+
+static void
+exchange (char **argv, struct _getopt_data *d)
+{
+ int bottom = d->__first_nonopt;
+ int middle = d->__last_nonopt;
+ int top = d->optind;
+ char *tem;
+
+ /* Exchange the shorter segment with the far end of the longer segment.
+ That puts the shorter segment into the right place.
+ It leaves the longer segment in the right place overall,
+ but it consists of two parts that need to be swapped next. */
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ /* First make sure the handling of the `__getopt_nonoption_flags'
+ string can work normally. Our top argument must be in the range
+ of the string. */
+ if (d->__nonoption_flags_len > 0 && top >= d->__nonoption_flags_max_len)
+ {
+ /* We must extend the array. The user plays games with us and
+ presents new arguments. */
+ char *new_str = malloc (top + 1);
+ if (new_str == NULL)
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len = 0;
+ else
+ {
+ memset (__mempcpy (new_str, __getopt_nonoption_flags,
+ d->__nonoption_flags_max_len),
+ '\0', top + 1 - d->__nonoption_flags_max_len);
+ d->__nonoption_flags_max_len = top + 1;
+ __getopt_nonoption_flags = new_str;
+ }
+ }
+#endif
+
+ while (top > middle && middle > bottom)
+ {
+ if (top - middle > middle - bottom)
+ {
+ /* Bottom segment is the short one. */
+ int len = middle - bottom;
+ register int i;
+
+ /* Swap it with the top part of the top segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[top - (middle - bottom) + i];
+ argv[top - (middle - bottom) + i] = tem;
+ SWAP_FLAGS (bottom + i, top - (middle - bottom) + i);
+ }
+ /* Exclude the moved bottom segment from further swapping. */
+ top -= len;
+ }
+ else
+ {
+ /* Top segment is the short one. */
+ int len = top - middle;
+ register int i;
+
+ /* Swap it with the bottom part of the bottom segment. */
+ for (i = 0; i < len; i++)
+ {
+ tem = argv[bottom + i];
+ argv[bottom + i] = argv[middle + i];
+ argv[middle + i] = tem;
+ SWAP_FLAGS (bottom + i, middle + i);
+ }
+ /* Exclude the moved top segment from further swapping. */
+ bottom += len;
+ }
+ }
+
+ /* Update records for the slots the non-options now occupy. */
+
+ d->__first_nonopt += (d->optind - d->__last_nonopt);
+ d->__last_nonopt = d->optind;
+}
+
+/* Initialize the internal data when the first call is made. */
+
+static const char *
+_getopt_initialize (int argc _GL_UNUSED,
+ char **argv _GL_UNUSED, const char *optstring,
+ struct _getopt_data *d, int posixly_correct)
+{
+ /* Start processing options with ARGV-element 1 (since ARGV-element 0
+ is the program name); the sequence of previously skipped
+ non-option ARGV-elements is empty. */
+
+ d->__first_nonopt = d->__last_nonopt = d->optind;
+
+ d->__nextchar = NULL;
+
+ d->__posixly_correct = posixly_correct || !!getenv ("POSIXLY_CORRECT");
+
+ /* Determine how to handle the ordering of options and nonoptions. */
+
+ if (optstring[0] == '-')
+ {
+ d->__ordering = RETURN_IN_ORDER;
+ ++optstring;
+ }
+ else if (optstring[0] == '+')
+ {
+ d->__ordering = REQUIRE_ORDER;
+ ++optstring;
+ }
+ else if (d->__posixly_correct)
+ d->__ordering = REQUIRE_ORDER;
+ else
+ d->__ordering = PERMUTE;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ if (!d->__posixly_correct
+ && argc == __libc_argc && argv == __libc_argv)
+ {
+ if (d->__nonoption_flags_max_len == 0)
+ {
+ if (__getopt_nonoption_flags == NULL
+ || __getopt_nonoption_flags[0] == '\0')
+ d->__nonoption_flags_max_len = -1;
+ else
+ {
+ const char *orig_str = __getopt_nonoption_flags;
+ int len = d->__nonoption_flags_max_len = strlen (orig_str);
+ if (d->__nonoption_flags_max_len < argc)
+ d->__nonoption_flags_max_len = argc;
+ __getopt_nonoption_flags =
+ (char *) malloc (d->__nonoption_flags_max_len);
+ if (__getopt_nonoption_flags == NULL)
+ d->__nonoption_flags_max_len = -1;
+ else
+ memset (__mempcpy (__getopt_nonoption_flags, orig_str, len),
+ '\0', d->__nonoption_flags_max_len - len);
+ }
+ }
+ d->__nonoption_flags_len = d->__nonoption_flags_max_len;
+ }
+ else
+ d->__nonoption_flags_len = 0;
+#endif
+
+ return optstring;
+}
+
+/* Scan elements of ARGV (whose length is ARGC) for option characters
+ given in OPTSTRING.
+
+ If an element of ARGV starts with '-', and is not exactly "-" or "--",
+ then it is an option element. The characters of this element
+ (aside from the initial '-') are option characters. If `getopt'
+ is called repeatedly, it returns successively each of the option characters
+ from each of the option elements.
+
+ If `getopt' finds another option character, it returns that character,
+ updating `optind' and `nextchar' so that the next call to `getopt' can
+ resume the scan with the following option character or ARGV-element.
+
+ If there are no more option characters, `getopt' returns -1.
+ Then `optind' is the index in ARGV of the first ARGV-element
+ that is not an option. (The ARGV-elements have been permuted
+ so that those that are not options now come last.)
+
+ OPTSTRING is a string containing the legitimate option characters.
+ If an option character is seen that is not listed in OPTSTRING,
+ return '?' after printing an error message. If you set `opterr' to
+ zero, the error message is suppressed but we still return '?'.
+
+ If a char in OPTSTRING is followed by a colon, that means it wants an arg,
+ so the following text in the same ARGV-element, or the text of the following
+ ARGV-element, is returned in `optarg'. Two colons mean an option that
+ wants an optional arg; if there is text in the current ARGV-element,
+ it is returned in `optarg', otherwise `optarg' is set to zero.
+
+ If OPTSTRING starts with `-' or `+', it requests different methods of
+ handling the non-option ARGV-elements.
+ See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above.
+
+ Long-named options begin with `--' instead of `-'.
+ Their names may be abbreviated as long as the abbreviation is unique
+ or is an exact match for some defined option. If they have an
+ argument, it follows the option name in the same ARGV-element, separated
+ from the option name by a `=', or else the in next ARGV-element.
+ When `getopt' finds a long-named option, it returns 0 if that option's
+ `flag' field is nonzero, the value of the option's `val' field
+ if the `flag' field is zero.
+
+ The elements of ARGV aren't really const, because we permute them.
+ But we pretend they're const in the prototype to be compatible
+ with other systems.
+
+ LONGOPTS is a vector of `struct option' terminated by an
+ element containing a name which is zero.
+
+ LONGIND returns the index in LONGOPT of the long-named option found.
+ It is only valid when a long-named option has been found by the most
+ recent call.
+
+ If LONG_ONLY is nonzero, '-' as well as '--' can introduce
+ long-named options. */
+
+int
+_getopt_internal_r (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind,
+ int long_only, struct _getopt_data *d, int posixly_correct)
+{
+ int print_errors = d->opterr;
+ if (optstring[0] == ':')
+ print_errors = 0;
+
+ if (argc < 1)
+ return -1;
+
+ d->optarg = NULL;
+
+ if (d->optind == 0 || !d->__initialized)
+ {
+ if (d->optind == 0)
+ d->optind = 1; /* Don't scan ARGV[0], the program name. */
+ optstring = _getopt_initialize (argc, argv, optstring, d,
+ posixly_correct);
+ d->__initialized = 1;
+ }
+
+ /* Test whether ARGV[optind] points to a non-option argument.
+ Either it does not have option syntax, or there is an environment flag
+ from the shell indicating it is not an option. The later information
+ is only used when the used in the GNU libc. */
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0' \
+ || (d->optind < d->__nonoption_flags_len \
+ && __getopt_nonoption_flags[d->optind] == '1'))
+#else
+# define NONOPTION_P (argv[d->optind][0] != '-' || argv[d->optind][1] == '\0')
+#endif
+
+ if (d->__nextchar == NULL || *d->__nextchar == '\0')
+ {
+ /* Advance to the next ARGV-element. */
+
+ /* Give FIRST_NONOPT & LAST_NONOPT rational values if OPTIND has been
+ moved back by the user (who may also have changed the arguments). */
+ if (d->__last_nonopt > d->optind)
+ d->__last_nonopt = d->optind;
+ if (d->__first_nonopt > d->optind)
+ d->__first_nonopt = d->optind;
+
+ if (d->__ordering == PERMUTE)
+ {
+ /* If we have just processed some options following some non-options,
+ exchange them so that the options come first. */
+
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__last_nonopt != d->optind)
+ d->__first_nonopt = d->optind;
+
+ /* Skip any additional non-options
+ and extend the range of non-options previously skipped. */
+
+ while (d->optind < argc && NONOPTION_P)
+ d->optind++;
+ d->__last_nonopt = d->optind;
+ }
+
+ /* The special ARGV-element `--' means premature end of options.
+ Skip it like a null option,
+ then exchange with previous non-options as if it were an option,
+ then skip everything else like a non-option. */
+
+ if (d->optind != argc && !strcmp (argv[d->optind], "--"))
+ {
+ d->optind++;
+
+ if (d->__first_nonopt != d->__last_nonopt
+ && d->__last_nonopt != d->optind)
+ exchange ((char **) argv, d);
+ else if (d->__first_nonopt == d->__last_nonopt)
+ d->__first_nonopt = d->optind;
+ d->__last_nonopt = argc;
+
+ d->optind = argc;
+ }
+
+ /* If we have done all the ARGV-elements, stop the scan
+ and back over any non-options that we skipped and permuted. */
+
+ if (d->optind == argc)
+ {
+ /* Set the next-arg-index to point at the non-options
+ that we previously skipped, so the caller will digest them. */
+ if (d->__first_nonopt != d->__last_nonopt)
+ d->optind = d->__first_nonopt;
+ return -1;
+ }
+
+ /* If we have come to a non-option and did not permute it,
+ either stop the scan or describe it to the caller and pass it by. */
+
+ if (NONOPTION_P)
+ {
+ if (d->__ordering == REQUIRE_ORDER)
+ return -1;
+ d->optarg = argv[d->optind++];
+ return 1;
+ }
+
+ /* We have found another option-ARGV-element.
+ Skip the initial punctuation. */
+
+ d->__nextchar = (argv[d->optind] + 1
+ + (longopts != NULL && argv[d->optind][1] == '-'));
+ }
+
+ /* Decode the current option-ARGV-element. */
+
+ /* Check whether the ARGV-element is a long option.
+
+ If long_only and the ARGV-element has the form "-f", where f is
+ a valid short option, don't consider it an abbreviated form of
+ a long option that starts with f. Otherwise there would be no
+ way to give the -f short option.
+
+ On the other hand, if there's a long option "fubar" and
+ the ARGV-element is "-fu", do consider that an abbreviation of
+ the long option, just like "--fu", and not "-f" with arg "u".
+
+ This distinction seems to be the most useful approach. */
+
+ if (longopts != NULL
+ && (argv[d->optind][1] == '-'
+ || (long_only && (argv[d->optind][2]
+ || !strchr (optstring, argv[d->optind][1])))))
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = -1;
+ int option_index;
+
+ for (nameend = d->__nextchar; *nameend && *nameend != '='; nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar)
+ == (unsigned int) strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else if (long_only
+ || pfound->has_arg != p->has_arg
+ || pfound->flag != p->flag
+ || pfound->val != p->val)
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option '%s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option '%s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ d->optind++;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ d->optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind - 1][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option '--%s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#else
+ fprintf (stderr, _("\
+%s: option '%c%s' doesn't allow an argument\n"),
+ argv[0], argv[d->optind - 1][0],
+ pfound->name);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+
+ d->optopt = pfound->val;
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option '%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optopt = pfound->val;
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+
+ /* Can't find it as a long option. If this is not getopt_long_only,
+ or the option starts with '--' or is not a valid short
+ option, then it's an error.
+ Otherwise interpret it as a short option. */
+ if (!long_only || argv[d->optind][1] == '-'
+ || strchr (optstring, *d->__nextchar) == NULL)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+ if (argv[d->optind][1] == '-')
+ {
+ /* --option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option '--%s'\n"),
+ argv[0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option '--%s'\n"),
+ argv[0], d->__nextchar);
+#endif
+ }
+ else
+ {
+ /* +option or -option */
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: unrecognized option '%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#else
+ fprintf (stderr, _("%s: unrecognized option '%c%s'\n"),
+ argv[0], argv[d->optind][0], d->__nextchar);
+#endif
+ }
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->__nextchar = (char *) "";
+ d->optind++;
+ d->optopt = 0;
+ return '?';
+ }
+ }
+
+ /* Look at and handle the next short option-character. */
+
+ {
+ char c = *d->__nextchar++;
+ char *temp = strchr (optstring, c);
+
+ /* Increment `optind' when we start to process its last character. */
+ if (*d->__nextchar == '\0')
+ ++d->optind;
+
+ if (temp == NULL || c == ':')
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+ int n;
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ n = __asprintf (&buf, _("%s: invalid option -- '%c'\n"),
+ argv[0], c);
+#else
+ fprintf (stderr, _("%s: invalid option -- '%c'\n"), argv[0], c);
+#endif
+
+#if defined _LIBC && defined USE_IN_LIBIO
+ if (n >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#endif
+ }
+ d->optopt = c;
+ return '?';
+ }
+ /* Convenience. Treat POSIX -W foo same as long option --foo */
+ if (temp[0] == 'W' && temp[1] == ';')
+ {
+ char *nameend;
+ const struct option *p;
+ const struct option *pfound = NULL;
+ int exact = 0;
+ int ambig = 0;
+ int indfound = 0;
+ int option_index;
+
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ d->optind++;
+ }
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+#endif
+ }
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ return c;
+ }
+ else
+ /* We already incremented `d->optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+
+ /* optarg is now the argument, see if it's in the
+ table of longopts. */
+
+ for (d->__nextchar = nameend = d->optarg; *nameend && *nameend != '=';
+ nameend++)
+ /* Do nothing. */ ;
+
+ /* Test all long options for either exact match
+ or abbreviated matches. */
+ for (p = longopts, option_index = 0; p->name; p++, option_index++)
+ if (!strncmp (p->name, d->__nextchar, nameend - d->__nextchar))
+ {
+ if ((unsigned int) (nameend - d->__nextchar) == strlen (p->name))
+ {
+ /* Exact match found. */
+ pfound = p;
+ indfound = option_index;
+ exact = 1;
+ break;
+ }
+ else if (pfound == NULL)
+ {
+ /* First nonexact match found. */
+ pfound = p;
+ indfound = option_index;
+ }
+ else
+ /* Second or later nonexact match found. */
+ ambig = 1;
+ }
+ if (ambig && !exact)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("%s: option '-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("%s: option '-W %s' is ambiguous\n"),
+ argv[0], argv[d->optind]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ d->optind++;
+ return '?';
+ }
+ if (pfound != NULL)
+ {
+ option_index = indfound;
+ if (*nameend)
+ {
+ /* Don't test has_arg with >, because some C compilers don't
+ allow it to be used on enums. */
+ if (pfound->has_arg)
+ d->optarg = nameend + 1;
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr, _("\
+%s: option '-W %s' doesn't allow an argument\n"),
+ argv[0], pfound->name);
+#endif
+ }
+
+ d->__nextchar += strlen (d->__nextchar);
+ return '?';
+ }
+ }
+ else if (pfound->has_arg == 1)
+ {
+ if (d->optind < argc)
+ d->optarg = argv[d->optind++];
+ else
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option '%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2
+ |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option '%s' requires an argument\n"),
+ argv[0], argv[d->optind - 1]);
+#endif
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ return optstring[0] == ':' ? ':' : '?';
+ }
+ }
+ d->__nextchar += strlen (d->__nextchar);
+ if (longind != NULL)
+ *longind = option_index;
+ if (pfound->flag)
+ {
+ *(pfound->flag) = pfound->val;
+ return 0;
+ }
+ return pfound->val;
+ }
+ d->__nextchar = NULL;
+ return 'W'; /* Let the application handle it. */
+ }
+ if (temp[1] == ':')
+ {
+ if (temp[2] == ':')
+ {
+ /* This is an option that accepts an argument optionally. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ d->optind++;
+ }
+ else
+ d->optarg = NULL;
+ d->__nextchar = NULL;
+ }
+ else
+ {
+ /* This is an option that requires an argument. */
+ if (*d->__nextchar != '\0')
+ {
+ d->optarg = d->__nextchar;
+ /* If we end this ARGV-element by taking the rest as an arg,
+ we must advance to the next element now. */
+ d->optind++;
+ }
+ else if (d->optind == argc)
+ {
+ if (print_errors)
+ {
+#if defined _LIBC && defined USE_IN_LIBIO
+ char *buf;
+
+ if (__asprintf (&buf, _("\
+%s: option requires an argument -- '%c'\n"),
+ argv[0], c) >= 0)
+ {
+ _IO_flockfile (stderr);
+
+ int old_flags2 = ((_IO_FILE *) stderr)->_flags2;
+ ((_IO_FILE *) stderr)->_flags2 |= _IO_FLAGS2_NOTCANCEL;
+
+ __fxprintf (NULL, "%s", buf);
+
+ ((_IO_FILE *) stderr)->_flags2 = old_flags2;
+ _IO_funlockfile (stderr);
+
+ free (buf);
+ }
+#else
+ fprintf (stderr,
+ _("%s: option requires an argument -- '%c'\n"),
+ argv[0], c);
+#endif
+ }
+ d->optopt = c;
+ if (optstring[0] == ':')
+ c = ':';
+ else
+ c = '?';
+ }
+ else
+ /* We already incremented `optind' once;
+ increment it again when taking next ARGV-elt as argument. */
+ d->optarg = argv[d->optind++];
+ d->__nextchar = NULL;
+ }
+ }
+ return c;
+ }
+}
+
+int
+_getopt_internal (int argc, char **argv, const char *optstring,
+ const struct option *longopts, int *longind, int long_only,
+ int posixly_correct)
+{
+ int result;
+
+ getopt_data.optind = optind;
+ getopt_data.opterr = opterr;
+
+ result = _getopt_internal_r (argc, argv, optstring, longopts,
+ longind, long_only, &getopt_data,
+ posixly_correct);
+
+ optind = getopt_data.optind;
+ optarg = getopt_data.optarg;
+ optopt = getopt_data.optopt;
+
+ return result;
+}
+
+/* glibc gets a LSB-compliant getopt.
+ Standalone applications get a POSIX-compliant getopt. */
+#if _LIBC
+enum { POSIXLY_CORRECT = 0 };
+#else
+enum { POSIXLY_CORRECT = 1 };
+#endif
+
+int
+getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, (char **) argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, POSIXLY_CORRECT);
+}
+
+#ifdef _LIBC
+int
+__posix_getopt (int argc, char *const *argv, const char *optstring)
+{
+ return _getopt_internal (argc, argv, optstring,
+ (const struct option *) 0,
+ (int *) 0,
+ 0, 1);
+}
+#endif
+
+
+#ifdef TEST
+
+/* Compile with -DTEST to make an executable for use in testing
+ the above definition of `getopt'. */
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+
+ c = getopt (argc, argv, "abc:d:0123456789");
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value '%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/src/getopt.in.h b/src/getopt.in.h
new file mode 100755
index 00000000..57a8e899
--- /dev/null
+++ b/src/getopt.in.h
@@ -0,0 +1,249 @@
+/* Declarations for getopt.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2007, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_GETOPT_H
+
+#if __GNUC__ >= 3
+@PRAGMA_SYSTEM_HEADER@
+#endif
+
+/* The include_next requires a split double-inclusion guard. We must
+ also inform the replacement unistd.h to not recursively use
+ <getopt.h>; our definitions will be present soon enough. */
+#if @HAVE_GETOPT_H@
+# define _GL_SYSTEM_GETOPT
+# @INCLUDE_NEXT@ @NEXT_GETOPT_H@
+# undef _GL_SYSTEM_GETOPT
+#endif
+
+#ifndef _GL_GETOPT_H
+
+#ifndef __need_getopt
+# define _GL_GETOPT_H 1
+#endif
+
+/* Standalone applications should #define __GETOPT_PREFIX to an
+ identifier that prefixes the external functions and variables
+ defined in this header. When this happens, include the
+ headers that might declare getopt so that they will not cause
+ confusion if included after this file (if the system had <getopt.h>,
+ we have already included it). Then systematically rename
+ identifiers so that they do not collide with the system functions
+ and variables. Renaming avoids problems with some compilers and
+ linkers. */
+#if defined __GETOPT_PREFIX && !defined __need_getopt
+# if !@HAVE_GETOPT_H@
+# include <stdlib.h>
+# include <stdio.h>
+# include <unistd.h>
+# endif
+# undef __need_getopt
+# undef getopt
+# undef getopt_long
+# undef getopt_long_only
+# undef optarg
+# undef opterr
+# undef optind
+# undef optopt
+# undef option
+# define __GETOPT_CONCAT(x, y) x ## y
+# define __GETOPT_XCONCAT(x, y) __GETOPT_CONCAT (x, y)
+# define __GETOPT_ID(y) __GETOPT_XCONCAT (__GETOPT_PREFIX, y)
+# define getopt __GETOPT_ID (getopt)
+# define getopt_long __GETOPT_ID (getopt_long)
+# define getopt_long_only __GETOPT_ID (getopt_long_only)
+# define optarg __GETOPT_ID (optarg)
+# define opterr __GETOPT_ID (opterr)
+# define optind __GETOPT_ID (optind)
+# define optopt __GETOPT_ID (optopt)
+# define option __GETOPT_ID (option)
+# define _getopt_internal __GETOPT_ID (getopt_internal)
+#endif
+
+/* Standalone applications get correct prototypes for getopt_long and
+ getopt_long_only; they declare "char **argv". libc uses prototypes
+ with "char *const *argv" that are incorrect because getopt_long and
+ getopt_long_only can permute argv; this is required for backward
+ compatibility (e.g., for LSB 2.0.1).
+
+ This used to be `#if defined __GETOPT_PREFIX && !defined __need_getopt',
+ but it caused redefinition warnings if both unistd.h and getopt.h were
+ included, since unistd.h includes getopt.h having previously defined
+ __need_getopt.
+
+ The only place where __getopt_argv_const is used is in definitions
+ of getopt_long and getopt_long_only below, but these are visible
+ only if __need_getopt is not defined, so it is quite safe to rewrite
+ the conditional as follows:
+*/
+#if !defined __need_getopt
+# if defined __GETOPT_PREFIX
+# define __getopt_argv_const /* empty */
+# else
+# define __getopt_argv_const const
+# endif
+#endif
+
+/* If __GNU_LIBRARY__ is not already defined, either we are being used
+ standalone, or this is the first header included in the source file.
+ If we are being used with glibc, we need to include <features.h>, but
+ that does not exist if we are standalone. So: if __GNU_LIBRARY__ is
+ not defined, include <ctype.h>, which will pull in <features.h> for us
+ if it's from glibc. (Why ctype.h? It's guaranteed to exist and it
+ doesn't flood the namespace with stuff the way some other headers do.) */
+#if !defined __GNU_LIBRARY__
+# include <ctype.h>
+#endif
+
+#ifndef __THROW
+# ifndef __GNUC_PREREQ
+# define __GNUC_PREREQ(maj, min) (0)
+# endif
+# if defined __cplusplus && __GNUC_PREREQ (2,8)
+# define __THROW throw ()
+# else
+# define __THROW
+# endif
+#endif
+
+/* The definition of _GL_ARG_NONNULL is copied here. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* For communication from `getopt' to the caller.
+ When `getopt' finds an option that takes an argument,
+ the argument value is returned here.
+ Also, when `ordering' is RETURN_IN_ORDER,
+ each non-option ARGV-element is returned here. */
+
+extern char *optarg;
+
+/* Index in ARGV of the next element to be scanned.
+ This is used for communication to and from the caller
+ and for communication between successive calls to `getopt'.
+
+ On entry to `getopt', zero means this is the first call; initialize.
+
+ When `getopt' returns -1, this is the index of the first of the
+ non-option elements that the caller should itself scan.
+
+ Otherwise, `optind' communicates from one call to the next
+ how much of ARGV has been scanned so far. */
+
+extern int optind;
+
+/* Callers store zero here to inhibit the error message `getopt' prints
+ for unrecognized options. */
+
+extern int opterr;
+
+/* Set to an option character which was unrecognized. */
+
+extern int optopt;
+
+#ifndef __need_getopt
+/* Describe the long-named options requested by the application.
+ The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector
+ of `struct option' terminated by an element containing a name which is
+ zero.
+
+ The field `has_arg' is:
+ no_argument (or 0) if the option does not take an argument,
+ required_argument (or 1) if the option requires an argument,
+ optional_argument (or 2) if the option takes an optional argument.
+
+ If the field `flag' is not NULL, it points to a variable that is set
+ to the value given in the field `val' when the option is found, but
+ left unchanged if the option is not found.
+
+ To have a long-named option do something other than set an `int' to
+ a compiled-in constant, such as set a value from `optarg', set the
+ option's `flag' field to zero and its `val' field to a nonzero
+ value (the equivalent single-letter option character, if there is
+ one). For long options that have a zero `flag' field, `getopt'
+ returns the contents of the `val' field. */
+
+struct option
+{
+ const char *name;
+ /* has_arg can't be an enum because some compilers complain about
+ type mismatches in all the code that assumes it is an int. */
+ int has_arg;
+ int *flag;
+ int val;
+};
+
+/* Names for the values of the `has_arg' field of `struct option'. */
+
+# define no_argument 0
+# define required_argument 1
+# define optional_argument 2
+#endif /* need getopt */
+
+
+/* Get definitions and prototypes for functions to process the
+ arguments in ARGV (ARGC of them, minus the program name) for
+ options given in OPTS.
+
+ Return the option character from OPTS just read. Return -1 when
+ there are no more options. For unrecognized options, or options
+ missing arguments, `optopt' is set to the option letter, and '?' is
+ returned.
+
+ The OPTS string is a list of characters which are recognized option
+ letters, optionally followed by colons, specifying that that letter
+ takes an argument, to be placed in `optarg'.
+
+ If a letter in OPTS is followed by two colons, its argument is
+ optional. This behavior is specific to the GNU `getopt'.
+
+ The argument `--' causes premature termination of argument
+ scanning, explicitly telling `getopt' that there are no more
+ options.
+
+ If OPTS begins with `-', then non-option arguments are treated as
+ arguments to the option '\1'. This behavior is specific to the GNU
+ `getopt'. If OPTS begins with `+', or POSIXLY_CORRECT is set in
+ the environment, then do not permute arguments. */
+
+extern int getopt (int ___argc, char *const *___argv, const char *__shortopts)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+#ifndef __need_getopt
+extern int getopt_long (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+extern int getopt_long_only (int ___argc, char *__getopt_argv_const *___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind)
+ __THROW _GL_ARG_NONNULL ((2, 3));
+
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+/* Make sure we later can get all the definitions and declarations. */
+#undef __need_getopt
+
+#endif /* getopt.h */
+#endif /* getopt.h */
diff --git a/src/getopt1.c b/src/getopt1.c
new file mode 100755
index 00000000..046d69f9
--- /dev/null
+++ b/src/getopt1.c
@@ -0,0 +1,170 @@
+/* getopt_long and getopt_long_only entry points for GNU getopt.
+ Copyright (C) 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994, 1996, 1997,
+ 1998, 2004, 2006, 2009, 2010 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifdef _LIBC
+# include <getopt.h>
+#else
+# include <config.h>
+# include "getopt.h"
+#endif
+#include "getopt_int.h"
+
+#include <stdio.h>
+
+/* This needs to come after some library #include
+ to get __GNU_LIBRARY__ defined. */
+#ifdef __GNU_LIBRARY__
+#include <stdlib.h>
+#endif
+
+#ifndef NULL
+#define NULL 0
+#endif
+
+int
+getopt_long (int argc, char *__getopt_argv_const *argv, const char *options,
+ const struct option *long_options, int *opt_index)
+{
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 0, 0);
+}
+
+int
+_getopt_long_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
+{
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 0, d, 0);
+}
+
+/* Like getopt_long, but '-' as well as '--' can indicate a long option.
+ If an option that starts with '-' (not '--') doesn't match a long option,
+ but does match a short option, it is parsed as a short option
+ instead. */
+
+int
+getopt_long_only (int argc, char *__getopt_argv_const *argv,
+ const char *options,
+ const struct option *long_options, int *opt_index)
+{
+ return _getopt_internal (argc, (char **) argv, options, long_options,
+ opt_index, 1, 0);
+}
+
+int
+_getopt_long_only_r (int argc, char **argv, const char *options,
+ const struct option *long_options, int *opt_index,
+ struct _getopt_data *d)
+{
+ return _getopt_internal_r (argc, argv, options, long_options, opt_index,
+ 1, d, 0);
+}
+
+
+#ifdef TEST
+
+#include <stdio.h>
+
+int
+main (int argc, char **argv)
+{
+ int c;
+ int digit_optind = 0;
+
+ while (1)
+ {
+ int this_option_optind = optind ? optind : 1;
+ int option_index = 0;
+ static const struct option long_options[] =
+ {
+ {"add", 1, 0, 0},
+ {"append", 0, 0, 0},
+ {"delete", 1, 0, 0},
+ {"verbose", 0, 0, 0},
+ {"create", 0, 0, 0},
+ {"file", 1, 0, 0},
+ {0, 0, 0, 0}
+ };
+
+ c = getopt_long (argc, argv, "abc:d:0123456789",
+ long_options, &option_index);
+ if (c == -1)
+ break;
+
+ switch (c)
+ {
+ case 0:
+ printf ("option %s", long_options[option_index].name);
+ if (optarg)
+ printf (" with arg %s", optarg);
+ printf ("\n");
+ break;
+
+ case '0':
+ case '1':
+ case '2':
+ case '3':
+ case '4':
+ case '5':
+ case '6':
+ case '7':
+ case '8':
+ case '9':
+ if (digit_optind != 0 && digit_optind != this_option_optind)
+ printf ("digits occur in two different argv-elements.\n");
+ digit_optind = this_option_optind;
+ printf ("option %c\n", c);
+ break;
+
+ case 'a':
+ printf ("option a\n");
+ break;
+
+ case 'b':
+ printf ("option b\n");
+ break;
+
+ case 'c':
+ printf ("option c with value `%s'\n", optarg);
+ break;
+
+ case 'd':
+ printf ("option d with value `%s'\n", optarg);
+ break;
+
+ case '?':
+ break;
+
+ default:
+ printf ("?? getopt returned character code 0%o ??\n", c);
+ }
+ }
+
+ if (optind < argc)
+ {
+ printf ("non-option ARGV-elements: ");
+ while (optind < argc)
+ printf ("%s ", argv[optind++]);
+ printf ("\n");
+ }
+
+ exit (0);
+}
+
+#endif /* TEST */
diff --git a/src/getopt_int.h b/src/getopt_int.h
new file mode 100755
index 00000000..169def5b
--- /dev/null
+++ b/src/getopt_int.h
@@ -0,0 +1,132 @@
+/* Internal declarations for getopt.
+ Copyright (C) 1989-1994, 1996-1999, 2001, 2003-2004, 2009-2010 Free Software
+ Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GETOPT_INT_H
+#define _GETOPT_INT_H 1
+
+#include <getopt.h>
+
+extern int _getopt_internal (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, int __posixly_correct);
+
+
+/* Reentrant versions which can handle parsing multiple argument
+ vectors at the same time. */
+
+/* Data type for reentrant functions. */
+struct _getopt_data
+{
+ /* These have exactly the same meaning as the corresponding global
+ variables, except that they are used for the reentrant
+ versions of getopt. */
+ int optind;
+ int opterr;
+ int optopt;
+ char *optarg;
+
+ /* Internal members. */
+
+ /* True if the internal members have been initialized. */
+ int __initialized;
+
+ /* The next char to be scanned in the option-element
+ in which the last option character we returned was found.
+ This allows us to pick up the scan where we left off.
+
+ If this is zero, or a null string, it means resume the scan
+ by advancing to the next ARGV-element. */
+ char *__nextchar;
+
+ /* Describe how to deal with options that follow non-option ARGV-elements.
+
+ If the caller did not specify anything,
+ the default is REQUIRE_ORDER if the environment variable
+ POSIXLY_CORRECT is defined, PERMUTE otherwise.
+
+ REQUIRE_ORDER means don't recognize them as options;
+ stop option processing when the first non-option is seen.
+ This is what Unix does.
+ This mode of operation is selected by either setting the environment
+ variable POSIXLY_CORRECT, or using `+' as the first character
+ of the list of option characters, or by calling getopt.
+
+ PERMUTE is the default. We permute the contents of ARGV as we
+ scan, so that eventually all the non-options are at the end.
+ This allows options to be given in any order, even with programs
+ that were not written to expect this.
+
+ RETURN_IN_ORDER is an option available to programs that were
+ written to expect options and other ARGV-elements in any order
+ and that care about the ordering of the two. We describe each
+ non-option ARGV-element as if it were the argument of an option
+ with character code 1. Using `-' as the first character of the
+ list of option characters selects this mode of operation.
+
+ The special argument `--' forces an end of option-scanning regardless
+ of the value of `ordering'. In the case of RETURN_IN_ORDER, only
+ `--' can cause `getopt' to return -1 with `optind' != ARGC. */
+
+ enum
+ {
+ REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER
+ } __ordering;
+
+ /* If the POSIXLY_CORRECT environment variable is set
+ or getopt was called. */
+ int __posixly_correct;
+
+
+ /* Handle permutation of arguments. */
+
+ /* Describe the part of ARGV that contains non-options that have
+ been skipped. `first_nonopt' is the index in ARGV of the first
+ of them; `last_nonopt' is the index after the last of them. */
+
+ int __first_nonopt;
+ int __last_nonopt;
+
+#if defined _LIBC && defined USE_NONOPTION_FLAGS
+ int __nonoption_flags_max_len;
+ int __nonoption_flags_len;
+# endif
+};
+
+/* The initializer is necessary to set OPTIND and OPTERR to their
+ default values and to clear the initialization flag. */
+#define _GETOPT_DATA_INITIALIZER { 1, 1 }
+
+extern int _getopt_internal_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ int __long_only, struct _getopt_data *__data,
+ int __posixly_correct);
+
+extern int _getopt_long_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts, int *__longind,
+ struct _getopt_data *__data);
+
+extern int _getopt_long_only_r (int ___argc, char **___argv,
+ const char *__shortopts,
+ const struct option *__longopts,
+ int *__longind,
+ struct _getopt_data *__data);
+
+#endif /* getopt_int.h */
diff --git a/src/version-etc-fsf.c b/src/version-etc-fsf.c
new file mode 100755
index 00000000..fc837a89
--- /dev/null
+++ b/src/version-etc-fsf.c
@@ -0,0 +1,30 @@
+/* Variable with FSF copyright information, for version-etc.
+ Copyright (C) 1999-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+/* Specification. */
+#include "version-etc.h"
+
+/* Default copyright goes to the FSF. */
+
+const char version_etc_copyright[] =
+ /* Do *not* mark this string for translation. %s is a copyright
+ symbol suitable for this locale, and %d is the copyright
+ year. */
+ "Copyright %s %d Free Software Foundation, Inc.";
diff --git a/src/version-etc.c b/src/version-etc.c
new file mode 100755
index 00000000..19c873d0
--- /dev/null
+++ b/src/version-etc.c
@@ -0,0 +1,258 @@
+/* Print --version and bug-reporting information in a consistent format.
+ Copyright (C) 1999-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+/* Specification. */
+#include "version-etc.h"
+
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#if USE_UNLOCKED_IO
+# include "unlocked-io.h"
+#endif
+
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
+/* If you use AM_INIT_AUTOMAKE's no-define option,
+ PACKAGE is not defined. Use PACKAGE_TARNAME instead. */
+#if ! defined PACKAGE && defined PACKAGE_TARNAME
+# define PACKAGE PACKAGE_TARNAME
+#endif
+
+enum { COPYRIGHT_YEAR = 2010 };
+
+/* The three functions below display the --version information the
+ standard way.
+
+ If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
+ the program. The formats are therefore:
+
+ PACKAGE VERSION
+
+ or
+
+ COMMAND_NAME (PACKAGE) VERSION.
+
+ The functions differ in the way they are passed author names. */
+
+/* Display the --version information the standard way.
+
+ Author names are given in the array AUTHORS. N_AUTHORS is the
+ number of elements in the array. */
+void
+version_etc_arn (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version,
+ const char * const * authors, size_t n_authors)
+{
+ if (command_name)
+ fprintf (stream, "%s (%s) %s\n", command_name, package, version);
+ else
+ fprintf (stream, "%s %s\n", package, version);
+
+#ifdef PACKAGE_PACKAGER
+# ifdef PACKAGE_PACKAGER_VERSION
+ fprintf (stream, _("Packaged by %s (%s)\n"), PACKAGE_PACKAGER,
+ PACKAGE_PACKAGER_VERSION);
+# else
+ fprintf (stream, _("Packaged by %s\n"), PACKAGE_PACKAGER);
+# endif
+#endif
+
+ /* TRANSLATORS: Translate "(C)" to the copyright symbol
+ (C-in-a-circle), if this symbol is available in the user's
+ locale. Otherwise, do not translate "(C)"; leave it as-is. */
+ fprintf (stream, version_etc_copyright, _("(C)"), COPYRIGHT_YEAR);
+
+ fputs (_("\
+\n\
+License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.\n\
+This is free software: you are free to change and redistribute it.\n\
+There is NO WARRANTY, to the extent permitted by law.\n\
+\n\
+"),
+ stream);
+
+ switch (n_authors)
+ {
+ case 0:
+ /* The caller must provide at least one author name. */
+ abort ();
+ case 1:
+ /* TRANSLATORS: %s denotes an author name. */
+ fprintf (stream, _("Written by %s.\n"), authors[0]);
+ break;
+ case 2:
+ /* TRANSLATORS: Each %s denotes an author name. */
+ fprintf (stream, _("Written by %s and %s.\n"), authors[0], authors[1]);
+ break;
+ case 3:
+ /* TRANSLATORS: Each %s denotes an author name. */
+ fprintf (stream, _("Written by %s, %s, and %s.\n"),
+ authors[0], authors[1], authors[2]);
+ break;
+ case 4:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("Written by %s, %s, %s,\nand %s.\n"),
+ authors[0], authors[1], authors[2], authors[3]);
+ break;
+ case 5:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("Written by %s, %s, %s,\n%s, and %s.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4]);
+ break;
+ case 6:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, and %s.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4],
+ authors[5]);
+ break;
+ case 7:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("Written by %s, %s, %s,\n%s, %s, %s, and %s.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4],
+ authors[5], authors[6]);
+ break;
+ case 8:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\nand %s.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4],
+ authors[5], authors[6], authors[7]);
+ break;
+ case 9:
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, and %s.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4],
+ authors[5], authors[6], authors[7], authors[8]);
+ break;
+ default:
+ /* 10 or more authors. Use an abbreviation, since the human reader
+ will probably not want to read the entire list anyway. */
+ /* TRANSLATORS: Each %s denotes an author name.
+ You can use line breaks, estimating that each author name occupies
+ ca. 16 screen columns and that a screen line has ca. 80 columns. */
+ fprintf (stream, _("\
+Written by %s, %s, %s,\n%s, %s, %s, %s,\n%s, %s, and others.\n"),
+ authors[0], authors[1], authors[2], authors[3], authors[4],
+ authors[5], authors[6], authors[7], authors[8]);
+ break;
+ }
+}
+
+/* Display the --version information the standard way. See the initial
+ comment to this module, for more information.
+
+ Author names are given in the NULL-terminated array AUTHORS. */
+void
+version_etc_ar (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, const char * const * authors)
+{
+ size_t n_authors;
+
+ for (n_authors = 0; authors[n_authors]; n_authors++)
+ ;
+ version_etc_arn (stream, command_name, package, version, authors, n_authors);
+}
+
+/* Display the --version information the standard way. See the initial
+ comment to this module, for more information.
+
+ Author names are given in the NULL-terminated va_list AUTHORS. */
+void
+version_etc_va (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, va_list authors)
+{
+ size_t n_authors;
+ const char *authtab[10];
+
+ for (n_authors = 0;
+ n_authors < 10
+ && (authtab[n_authors] = va_arg (authors, const char *)) != NULL;
+ n_authors++)
+ ;
+ version_etc_arn (stream, command_name, package, version,
+ authtab, n_authors);
+}
+
+
+/* Display the --version information the standard way.
+
+ If COMMAND_NAME is NULL, the PACKAGE is assumed to be the name of
+ the program. The formats are therefore:
+
+ PACKAGE VERSION
+
+ or
+
+ COMMAND_NAME (PACKAGE) VERSION.
+
+ The authors names are passed as separate arguments, with an additional
+ NULL argument at the end. */
+void
+version_etc (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, /* const char *author1, ...*/ ...)
+{
+ va_list authors;
+
+ va_start (authors, version);
+ version_etc_va (stream, command_name, package, version, authors);
+ va_end (authors);
+}
+
+void
+emit_bug_reporting_address (void)
+{
+ /* TRANSLATORS: The placeholder indicates the bug-reporting address
+ for this package. Please add _another line_ saying
+ "Report translation bugs to <...>\n" with the address for translation
+ bugs (typically your translation team's web or email address). */
+ printf (_("\nReport bugs to: %s\n"), PACKAGE_BUGREPORT);
+#ifdef PACKAGE_PACKAGER_BUG_REPORTS
+ printf (_("Report %s bugs to: %s\n"), PACKAGE_PACKAGER,
+ PACKAGE_PACKAGER_BUG_REPORTS);
+#endif
+#ifdef PACKAGE_URL
+ printf (_("%s home page: <%s>\n"), PACKAGE_NAME, PACKAGE_URL);
+#else
+ printf (_("%s home page: <http://www.gnu.org/software/%s/>\n"),
+ PACKAGE_NAME, PACKAGE);
+#endif
+ fputs (_("General help using GNU software: <http://www.gnu.org/gethelp/>\n"),
+ stdout);
+}
diff --git a/src/version-etc.h b/src/version-etc.h
new file mode 100755
index 00000000..629fe830
--- /dev/null
+++ b/src/version-etc.h
@@ -0,0 +1,78 @@
+/* Print --version and bug-reporting information in a consistent format.
+ Copyright (C) 1999, 2003, 2005, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#ifndef VERSION_ETC_H
+# define VERSION_ETC_H 1
+
+# include <stdarg.h>
+# include <stdio.h>
+
+/* The `sentinel' attribute was added in gcc 4.0. */
+#ifndef ATTRIBUTE_SENTINEL
+# if 4 <= __GNUC__
+# define ATTRIBUTE_SENTINEL __attribute__ ((__sentinel__))
+# else
+# define ATTRIBUTE_SENTINEL /* empty */
+# endif
+#endif
+
+extern const char version_etc_copyright[];
+
+/* The three functions below display the --version information in the
+ standard way: command and package names, package version, followed
+ by a short GPLv3+ notice and a list of up to 10 author names.
+
+ If COMMAND_NAME is NULL, the PACKAGE is asumed to be the name of
+ the program. The formats are therefore:
+
+ PACKAGE VERSION
+
+ or
+
+ COMMAND_NAME (PACKAGE) VERSION.
+
+ The functions differ in the way they are passed author names: */
+
+/* N_AUTHORS names are supplied in array AUTHORS. */
+extern void version_etc_arn (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version,
+ const char * const * authors, size_t n_authors);
+
+/* Names are passed in the NULL-terminated array AUTHORS. */
+extern void version_etc_ar (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, const char * const * authors);
+
+/* Names are passed in the NULL-terminated va_list. */
+extern void version_etc_va (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version, va_list authors);
+
+/* Names are passed as separate arguments, with an additional
+ NULL argument at the end. */
+extern void version_etc (FILE *stream,
+ const char *command_name, const char *package,
+ const char *version,
+ /* const char *author1, ..., NULL */ ...)
+ ATTRIBUTE_SENTINEL;
+
+/* Display the usual `Report bugs to' stanza */
+extern void emit_bug_reporting_address (void);
+
+#endif /* VERSION_ETC_H */
diff --git a/src/xstrtol-error.c b/src/xstrtol-error.c
new file mode 100755
index 00000000..014fc1c5
--- /dev/null
+++ b/src/xstrtol-error.c
@@ -0,0 +1,98 @@
+/* A more useful interface to strtol.
+
+ Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+#include "xstrtol.h"
+
+#include <stdlib.h>
+
+#include "error.h"
+#include "exitfail.h"
+#include "gettext.h"
+
+#define N_(msgid) msgid
+
+/* Report an error for an invalid integer in an option argument.
+
+ ERR is the error code returned by one of the xstrto* functions.
+
+ Use OPT_IDX to decide whether to print the short option string "C"
+ or "-C" or a long option string derived from LONG_OPTION. OPT_IDX
+ is -2 if the short option "C" was used, without any leading "-"; it
+ is -1 if the short option "-C" was used; otherwise it is an index
+ into LONG_OPTIONS, which should have a name preceded by two '-'
+ characters.
+
+ ARG is the option-argument containing the integer.
+
+ After reporting an error, exit with status EXIT_STATUS if it is
+ nonzero. */
+
+static void
+xstrtol_error (enum strtol_error err,
+ int opt_idx, char c, struct option const *long_options,
+ char const *arg,
+ int exit_status)
+{
+ char const *hyphens = "--";
+ char const *msgid;
+ char const *option;
+ char option_buffer[2];
+
+ switch (err)
+ {
+ default:
+ abort ();
+
+ case LONGINT_INVALID:
+ msgid = N_("invalid %s%s argument `%s'");
+ break;
+
+ case LONGINT_INVALID_SUFFIX_CHAR:
+ case LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW:
+ msgid = N_("invalid suffix in %s%s argument `%s'");
+ break;
+
+ case LONGINT_OVERFLOW:
+ msgid = N_("%s%s argument `%s' too large");
+ break;
+ }
+
+ if (opt_idx < 0)
+ {
+ hyphens -= opt_idx;
+ option_buffer[0] = c;
+ option_buffer[1] = '\0';
+ option = option_buffer;
+ }
+ else
+ option = long_options[opt_idx].name;
+
+ error (exit_status, 0, gettext (msgid), hyphens, option, arg);
+}
+
+/* Like xstrtol_error, except exit with a failure status. */
+
+void
+xstrtol_fatal (enum strtol_error err,
+ int opt_idx, char c, struct option const *long_options,
+ char const *arg)
+{
+ xstrtol_error (err, opt_idx, c, long_options, arg, exit_failure);
+ abort ();
+}
diff --git a/src/xstrtol.c b/src/xstrtol.c
new file mode 100755
index 00000000..43f5ada7
--- /dev/null
+++ b/src/xstrtol.c
@@ -0,0 +1,228 @@
+/* A more useful interface to strtol.
+
+ Copyright (C) 1995-1996, 1998-2001, 2003-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#ifndef __strtol
+# define __strtol strtol
+# define __strtol_t long int
+# define __xstrtol xstrtol
+# define STRTOL_T_MINIMUM LONG_MIN
+# define STRTOL_T_MAXIMUM LONG_MAX
+#endif
+
+#include <config.h>
+
+#include "xstrtol.h"
+
+/* Some pre-ANSI implementations (e.g. SunOS 4)
+ need stderr defined if assertion checking is enabled. */
+#include <stdio.h>
+
+#include <assert.h>
+#include <ctype.h>
+#include <errno.h>
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "intprops.h"
+
+static strtol_error
+bkm_scale (__strtol_t *x, int scale_factor)
+{
+ if (TYPE_SIGNED (__strtol_t) && *x < STRTOL_T_MINIMUM / scale_factor)
+ {
+ *x = STRTOL_T_MINIMUM;
+ return LONGINT_OVERFLOW;
+ }
+ if (STRTOL_T_MAXIMUM / scale_factor < *x)
+ {
+ *x = STRTOL_T_MAXIMUM;
+ return LONGINT_OVERFLOW;
+ }
+ *x *= scale_factor;
+ return LONGINT_OK;
+}
+
+static strtol_error
+bkm_scale_by_power (__strtol_t *x, int base, int power)
+{
+ strtol_error err = LONGINT_OK;
+ while (power--)
+ err |= bkm_scale (x, base);
+ return err;
+}
+
+/* FIXME: comment. */
+
+strtol_error
+__xstrtol (const char *s, char **ptr, int strtol_base,
+ __strtol_t *val, const char *valid_suffixes)
+{
+ char *t_ptr;
+ char **p;
+ __strtol_t tmp;
+ strtol_error err = LONGINT_OK;
+
+ assert (0 <= strtol_base && strtol_base <= 36);
+
+ p = (ptr ? ptr : &t_ptr);
+
+ if (! TYPE_SIGNED (__strtol_t))
+ {
+ const char *q = s;
+ unsigned char ch = *q;
+ while (isspace (ch))
+ ch = *++q;
+ if (ch == '-')
+ return LONGINT_INVALID;
+ }
+
+ errno = 0;
+ tmp = __strtol (s, p, strtol_base);
+
+ if (*p == s)
+ {
+ /* If there is no number but there is a valid suffix, assume the
+ number is 1. The string is invalid otherwise. */
+ if (valid_suffixes && **p && strchr (valid_suffixes, **p))
+ tmp = 1;
+ else
+ return LONGINT_INVALID;
+ }
+ else if (errno != 0)
+ {
+ if (errno != ERANGE)
+ return LONGINT_INVALID;
+ err = LONGINT_OVERFLOW;
+ }
+
+ /* Let valid_suffixes == NULL mean `allow any suffix'. */
+ /* FIXME: update all callers except the ones that allow suffixes
+ after the number, changing last parameter NULL to `""'. */
+ if (!valid_suffixes)
+ {
+ *val = tmp;
+ return err;
+ }
+
+ if (**p != '\0')
+ {
+ int base = 1024;
+ int suffixes = 1;
+ strtol_error overflow;
+
+ if (!strchr (valid_suffixes, **p))
+ {
+ *val = tmp;
+ return err | LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ if (strchr (valid_suffixes, '0'))
+ {
+ /* The ``valid suffix'' '0' is a special flag meaning that
+ an optional second suffix is allowed, which can change
+ the base. A suffix "B" (e.g. "100MB") stands for a power
+ of 1000, whereas a suffix "iB" (e.g. "100MiB") stands for
+ a power of 1024. If no suffix (e.g. "100M"), assume
+ power-of-1024. */
+
+ switch (p[0][1])
+ {
+ case 'i':
+ if (p[0][2] == 'B')
+ suffixes += 2;
+ break;
+
+ case 'B':
+ case 'D': /* 'D' is obsolescent */
+ base = 1000;
+ suffixes++;
+ break;
+ }
+ }
+
+ switch (**p)
+ {
+ case 'b':
+ overflow = bkm_scale (&tmp, 512);
+ break;
+
+ case 'B':
+ overflow = bkm_scale (&tmp, 1024);
+ break;
+
+ case 'c':
+ overflow = 0;
+ break;
+
+ case 'E': /* exa or exbi */
+ overflow = bkm_scale_by_power (&tmp, base, 6);
+ break;
+
+ case 'G': /* giga or gibi */
+ case 'g': /* 'g' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 3);
+ break;
+
+ case 'k': /* kilo */
+ case 'K': /* kibi */
+ overflow = bkm_scale_by_power (&tmp, base, 1);
+ break;
+
+ case 'M': /* mega or mebi */
+ case 'm': /* 'm' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 2);
+ break;
+
+ case 'P': /* peta or pebi */
+ overflow = bkm_scale_by_power (&tmp, base, 5);
+ break;
+
+ case 'T': /* tera or tebi */
+ case 't': /* 't' is undocumented; for compatibility only */
+ overflow = bkm_scale_by_power (&tmp, base, 4);
+ break;
+
+ case 'w':
+ overflow = bkm_scale (&tmp, 2);
+ break;
+
+ case 'Y': /* yotta or 2**80 */
+ overflow = bkm_scale_by_power (&tmp, base, 8);
+ break;
+
+ case 'Z': /* zetta or 2**70 */
+ overflow = bkm_scale_by_power (&tmp, base, 7);
+ break;
+
+ default:
+ *val = tmp;
+ return err | LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ err |= overflow;
+ *p += suffixes;
+ if (**p)
+ err |= LONGINT_INVALID_SUFFIX_CHAR;
+ }
+
+ *val = tmp;
+ return err;
+}
diff --git a/src/xstrtol.h b/src/xstrtol.h
new file mode 100755
index 00000000..3a94a9c6
--- /dev/null
+++ b/src/xstrtol.h
@@ -0,0 +1,83 @@
+/* A more useful interface to strtol.
+
+ Copyright (C) 1995-1996, 1998-1999, 2001-2004, 2006-2010 Free Software
+ Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef XSTRTOL_H_
+# define XSTRTOL_H_ 1
+
+# include <getopt.h>
+# include <inttypes.h>
+
+# ifndef _STRTOL_ERROR
+enum strtol_error
+ {
+ LONGINT_OK = 0,
+
+ /* These two values can be ORed together, to indicate that both
+ errors occurred. */
+ LONGINT_OVERFLOW = 1,
+ LONGINT_INVALID_SUFFIX_CHAR = 2,
+
+ LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW = (LONGINT_INVALID_SUFFIX_CHAR
+ | LONGINT_OVERFLOW),
+ LONGINT_INVALID = 4
+ };
+typedef enum strtol_error strtol_error;
+# endif
+
+# define _DECLARE_XSTRTOL(name, type) \
+ strtol_error name (const char *, char **, int, type *, const char *);
+_DECLARE_XSTRTOL (xstrtol, long int)
+_DECLARE_XSTRTOL (xstrtoul, unsigned long int)
+_DECLARE_XSTRTOL (xstrtoimax, intmax_t)
+_DECLARE_XSTRTOL (xstrtoumax, uintmax_t)
+
+#if HAVE_LONG_LONG_INT
+_DECLARE_XSTRTOL (xstrtoll, long long int)
+_DECLARE_XSTRTOL (xstrtoull, unsigned long long int)
+#endif
+
+#ifndef __attribute__
+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 8)
+# define __attribute__(x)
+# endif
+#endif
+
+#ifndef ATTRIBUTE_NORETURN
+# define ATTRIBUTE_NORETURN __attribute__ ((__noreturn__))
+#endif
+
+/* Report an error for an invalid integer in an option argument.
+
+ ERR is the error code returned by one of the xstrto* functions.
+
+ Use OPT_IDX to decide whether to print the short option string "C"
+ or "-C" or a long option string derived from LONG_OPTION. OPT_IDX
+ is -2 if the short option "C" was used, without any leading "-"; it
+ is -1 if the short option "-C" was used; otherwise it is an index
+ into LONG_OPTIONS, which should have a name preceded by two '-'
+ characters.
+
+ ARG is the option-argument containing the integer.
+
+ After reporting an error, exit with a failure status. */
+
+void xstrtol_fatal (enum strtol_error,
+ int, char, struct option const *,
+ char const *) ATTRIBUTE_NORETURN;
+
+#endif /* not XSTRTOL_H_ */
diff --git a/src/xstrtoul.c b/src/xstrtoul.c
new file mode 100755
index 00000000..285f7b96
--- /dev/null
+++ b/src/xstrtoul.c
@@ -0,0 +1,6 @@
+#define __strtol strtoul
+#define __strtol_t unsigned long int
+#define __xstrtol xstrtoul
+#define STRTOL_T_MINIMUM 0
+#define STRTOL_T_MAXIMUM ULONG_MAX
+#include "xstrtol.c"
diff --git a/tests/gnu/Makefile.am b/tests/gnu/Makefile.am
new file mode 100755
index 00000000..f75fd8a4
--- /dev/null
+++ b/tests/gnu/Makefile.am
@@ -0,0 +1,1159 @@
+## DO NOT EDIT! GENERATED AUTOMATICALLY!
+## Process this file with automake to produce Makefile.in.
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects
+
+SUBDIRS =
+TESTS =
+XFAIL_TESTS =
+TESTS_ENVIRONMENT =
+noinst_PROGRAMS =
+check_PROGRAMS =
+noinst_HEADERS =
+noinst_LIBRARIES =
+check_LIBRARIES = libtests.a
+EXTRA_DIST =
+BUILT_SOURCES =
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+
+AM_CPPFLAGS = \
+ -I. -I$(srcdir) \
+ -I../.. -I$(srcdir)/../.. \
+ -I../../gnu -I$(srcdir)/../../gnu
+
+LDADD = libtests.a ../../gnu/libgnu.la libtests.a $(LIBTESTS_LIBDEPS)
+
+libtests_a_SOURCES =
+libtests_a_LIBADD = $(M4tests_LIBOBJS)
+libtests_a_DEPENDENCIES = $(M4tests_LIBOBJS)
+EXTRA_libtests_a_SOURCES =
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+
+TESTS_ENVIRONMENT += EXEEXT='@EXEEXT@' srcdir='$(srcdir)'
+
+## begin gnulib module alloca-opt-tests
+
+TESTS += test-alloca-opt
+check_PROGRAMS += test-alloca-opt
+
+EXTRA_DIST += test-alloca-opt.c
+
+## end gnulib module alloca-opt-tests
+
+## begin gnulib module arg-nonnull
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+
+BUILT_SOURCES += arg-nonnull.h
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += arg-nonnull.h arg-nonnull.h-t
+
+ARG_NONNULL_H=arg-nonnull.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/arg-nonnull.h
+
+## end gnulib module arg-nonnull
+
+## begin gnulib module array-list
+
+libtests_a_SOURCES += gl_array_list.h gl_array_list.c
+
+## end gnulib module array-list
+
+## begin gnulib module array-list-tests
+
+TESTS += test-array_list
+check_PROGRAMS += test-array_list
+
+EXTRA_DIST += test-array_list.c macros.h
+
+## end gnulib module array-list-tests
+
+## begin gnulib module array-oset
+
+libtests_a_SOURCES += gl_array_oset.h gl_array_oset.c
+
+## end gnulib module array-oset
+
+## begin gnulib module array-oset-tests
+
+TESTS += test-array_oset
+check_PROGRAMS += test-array_oset
+test_array_oset_LDADD = $(LDADD) @LIBINTL@
+
+EXTRA_DIST += test-array_oset.c macros.h
+
+## end gnulib module array-oset-tests
+
+## begin gnulib module avltree-oset-tests
+
+TESTS += test-avltree_oset
+check_PROGRAMS += test-avltree_oset
+EXTRA_DIST += test-avltree_oset.c macros.h
+
+## end gnulib module avltree-oset-tests
+
+## begin gnulib module binary-io-tests
+
+TESTS += test-binary-io.sh
+check_PROGRAMS += test-binary-io
+
+EXTRA_DIST += test-binary-io.sh test-binary-io.c macros.h
+
+## end gnulib module binary-io-tests
+
+## begin gnulib module bitrotate-tests
+
+TESTS += test-bitrotate
+check_PROGRAMS += test-bitrotate
+EXTRA_DIST += test-bitrotate.c macros.h
+
+## end gnulib module bitrotate-tests
+
+## begin gnulib module btowc-tests
+
+TESTS += test-btowc1.sh test-btowc2.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-btowc
+
+EXTRA_DIST += test-btowc1.sh test-btowc2.sh test-btowc.c signature.h macros.h
+
+## end gnulib module btowc-tests
+
+## begin gnulib module c-ctype-tests
+
+TESTS += test-c-ctype
+check_PROGRAMS += test-c-ctype
+
+EXTRA_DIST += test-c-ctype.c macros.h
+
+## end gnulib module c-ctype-tests
+
+## begin gnulib module c-strcase-tests
+
+TESTS += test-c-strcase.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@'
+check_PROGRAMS += test-c-strcasecmp test-c-strncasecmp
+EXTRA_DIST += test-c-strcase.sh test-c-strcasecmp.c test-c-strncasecmp.c macros.h
+
+## end gnulib module c-strcase-tests
+
+## begin gnulib module canonicalize-lgpl-tests
+
+TESTS += test-canonicalize-lgpl
+check_PROGRAMS += test-canonicalize-lgpl
+EXTRA_DIST += test-canonicalize-lgpl.c signature.h macros.h
+
+## end gnulib module canonicalize-lgpl-tests
+
+## begin gnulib module cloexec-tests
+
+TESTS += test-cloexec
+check_PROGRAMS += test-cloexec
+EXTRA_DIST += test-cloexec.c macros.h
+
+## end gnulib module cloexec-tests
+
+## begin gnulib module closein-tests
+
+TESTS += test-closein.sh
+check_PROGRAMS += test-closein
+test_closein_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-closein.sh test-closein.c
+
+## end gnulib module closein-tests
+
+## begin gnulib module dirname-tests
+
+TESTS += test-dirname
+check_PROGRAMS += test-dirname
+test_dirname_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-dirname.c
+
+## end gnulib module dirname-tests
+
+## begin gnulib module dup2-tests
+
+TESTS += test-dup2
+check_PROGRAMS += test-dup2
+EXTRA_DIST += test-dup2.c signature.h macros.h
+
+## end gnulib module dup2-tests
+
+## begin gnulib module environ-tests
+
+TESTS += test-environ
+check_PROGRAMS += test-environ
+
+EXTRA_DIST += test-environ.c
+
+## end gnulib module environ-tests
+
+## begin gnulib module errno-tests
+
+TESTS += test-errno
+check_PROGRAMS += test-errno
+
+EXTRA_DIST += test-errno.c
+
+## end gnulib module errno-tests
+
+## begin gnulib module fcntl-h-tests
+
+TESTS += test-fcntl-h
+check_PROGRAMS += test-fcntl-h
+EXTRA_DIST += test-fcntl-h.c
+
+## end gnulib module fcntl-h-tests
+
+## begin gnulib module fcntl-tests
+
+TESTS += test-fcntl
+check_PROGRAMS += test-fcntl
+EXTRA_DIST += test-fcntl.c signature.h macros.h
+
+## end gnulib module fcntl-tests
+
+## begin gnulib module fflush-tests
+
+TESTS += test-fflush test-fflush2.sh
+check_PROGRAMS += test-fflush test-fflush2
+MOSTLYCLEANFILES += test-fflush.txt
+EXTRA_DIST += test-fflush.c test-fflush2.sh test-fflush2.c signature.h macros.h
+
+## end gnulib module fflush-tests
+
+## begin gnulib module filenamecat-tests
+
+TESTS += test-filenamecat
+check_PROGRAMS += test-filenamecat
+test_filenamecat_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-filenamecat.c
+
+## end gnulib module filenamecat-tests
+
+## begin gnulib module fopen-safer-tests
+
+TESTS += test-fopen-safer
+check_PROGRAMS += test-fopen-safer
+EXTRA_DIST += test-fopen.h test-fopen-safer.c macros.h
+
+## end gnulib module fopen-safer-tests
+
+## begin gnulib module fopen-tests
+
+TESTS += test-fopen
+check_PROGRAMS += test-fopen
+
+EXTRA_DIST += test-fopen.h test-fopen.c signature.h macros.h
+
+## end gnulib module fopen-tests
+
+## begin gnulib module fpending-tests
+
+TESTS += test-fpending.sh
+check_PROGRAMS += test-fpending
+MOSTLYCLEANFILES += test-fpending.t
+EXTRA_DIST += test-fpending.c test-fpending.sh macros.h
+
+## end gnulib module fpending-tests
+
+## begin gnulib module fpurge-tests
+
+TESTS += test-fpurge
+check_PROGRAMS += test-fpurge
+MOSTLYCLEANFILES += t-fpurge.tmp
+EXTRA_DIST += test-fpurge.c macros.h
+
+## end gnulib module fpurge-tests
+
+## begin gnulib module freadahead-tests
+
+TESTS += test-freadahead.sh
+check_PROGRAMS += test-freadahead
+EXTRA_DIST += test-freadahead.c test-freadahead.sh macros.h
+
+## end gnulib module freadahead-tests
+
+## begin gnulib module freading-tests
+
+TESTS += test-freading
+check_PROGRAMS += test-freading
+MOSTLYCLEANFILES += t-freading.tmp
+EXTRA_DIST += test-freading.c macros.h
+
+## end gnulib module freading-tests
+
+## begin gnulib module freadptr-tests
+
+TESTS += test-freadptr.sh test-freadptr2.sh
+check_PROGRAMS += test-freadptr test-freadptr2
+EXTRA_DIST += test-freadptr.c test-freadptr.sh test-freadptr2.c test-freadptr2.sh macros.h
+
+## end gnulib module freadptr-tests
+
+## begin gnulib module freadseek-tests
+
+TESTS += test-freadseek.sh
+check_PROGRAMS += test-freadseek
+EXTRA_DIST += test-freadseek.c test-freadseek.sh macros.h
+
+## end gnulib module freadseek-tests
+
+## begin gnulib module frexp-nolibm-tests
+
+TESTS += test-frexp-nolibm
+check_PROGRAMS += test-frexp-nolibm
+test_frexp_nolibm_SOURCES = test-frexp.c
+EXTRA_DIST += test-frexp.c signature.h macros.h
+
+## end gnulib module frexp-nolibm-tests
+
+## begin gnulib module frexpl-nolibm-tests
+
+TESTS += test-frexpl-nolibm
+check_PROGRAMS += test-frexpl-nolibm
+test_frexpl_nolibm_SOURCES = test-frexpl.c
+EXTRA_DIST += test-frexpl.c signature.h macros.h
+
+## end gnulib module frexpl-nolibm-tests
+
+## begin gnulib module fseeko-tests
+
+TESTS += test-fseeko.sh test-fseeko2.sh
+check_PROGRAMS += test-fseeko
+EXTRA_DIST += test-fseeko.c test-fseeko.sh test-fseeko2.sh signature.h macros.h
+
+## end gnulib module fseeko-tests
+
+## begin gnulib module fseterr-tests
+
+TESTS += test-fseterr
+check_PROGRAMS += test-fseterr
+
+EXTRA_DIST += test-fseterr.c
+
+## end gnulib module fseterr-tests
+
+## begin gnulib module ftello-tests
+
+TESTS += test-ftello.sh test-ftello2.sh
+check_PROGRAMS += test-ftello
+EXTRA_DIST += test-ftello.c test-ftello.sh test-ftello2.sh signature.h macros.h
+
+## end gnulib module ftello-tests
+
+## begin gnulib module getdtablesize-tests
+
+TESTS += test-getdtablesize
+check_PROGRAMS += test-getdtablesize
+EXTRA_DIST += test-getdtablesize.c signature.h macros.h
+
+## end gnulib module getdtablesize-tests
+
+## begin gnulib module getpagesize
+
+
+EXTRA_DIST += getpagesize.c
+
+EXTRA_libtests_a_SOURCES += getpagesize.c
+
+## end gnulib module getpagesize
+
+## begin gnulib module gettimeofday-tests
+
+TESTS += test-gettimeofday
+check_PROGRAMS += test-gettimeofday
+
+EXTRA_DIST += signature.h test-gettimeofday.c
+
+## end gnulib module gettimeofday-tests
+
+## begin gnulib module iconv-tests
+
+TESTS += test-iconv
+check_PROGRAMS += test-iconv
+test_iconv_LDADD = $(LDADD) @LIBICONV@
+
+EXTRA_DIST += test-iconv.c signature.h macros.h
+
+## end gnulib module iconv-tests
+
+## begin gnulib module ignore-value
+
+libtests_a_SOURCES += ignore-value.h
+
+## end gnulib module ignore-value
+
+## begin gnulib module inttypes-tests
+
+TESTS += test-inttypes
+check_PROGRAMS += test-inttypes
+EXTRA_DIST += test-inttypes.c
+
+## end gnulib module inttypes-tests
+
+## begin gnulib module isnand-nolibm-tests
+
+TESTS += test-isnand-nolibm
+check_PROGRAMS += test-isnand-nolibm
+
+EXTRA_DIST += test-isnand-nolibm.c test-isnand.h nan.h macros.h
+
+## end gnulib module isnand-nolibm-tests
+
+## begin gnulib module isnanf-nolibm-tests
+
+TESTS += test-isnanf-nolibm
+check_PROGRAMS += test-isnanf-nolibm
+
+EXTRA_DIST += test-isnanf-nolibm.c test-isnanf.h nan.h macros.h
+
+## end gnulib module isnanf-nolibm-tests
+
+## begin gnulib module isnanl-nolibm-tests
+
+TESTS += test-isnanl-nolibm
+check_PROGRAMS += test-isnanl-nolibm
+
+EXTRA_DIST += test-isnanl-nolibm.c test-isnanl.h nan.h macros.h
+
+## end gnulib module isnanl-nolibm-tests
+
+## begin gnulib module langinfo-tests
+
+TESTS += test-langinfo
+check_PROGRAMS += test-langinfo
+EXTRA_DIST += test-langinfo.c
+
+## end gnulib module langinfo-tests
+
+## begin gnulib module link
+
+
+EXTRA_DIST += link.c
+
+EXTRA_libtests_a_SOURCES += link.c
+
+## end gnulib module link
+
+## begin gnulib module link-tests
+
+TESTS += test-link
+check_PROGRAMS += test-link
+EXTRA_DIST += test-link.h test-link.c signature.h macros.h
+
+## end gnulib module link-tests
+
+## begin gnulib module linkedhash-list-tests
+
+TESTS += test-linkedhash_list
+check_PROGRAMS += test-linkedhash_list
+EXTRA_DIST += test-linkedhash_list.c macros.h
+
+## end gnulib module linkedhash-list-tests
+
+## begin gnulib module lseek-tests
+
+TESTS += test-lseek.sh
+check_PROGRAMS += test-lseek
+EXTRA_DIST += test-lseek.c test-lseek.sh signature.h macros.h
+
+## end gnulib module lseek-tests
+
+## begin gnulib module lstat-tests
+
+TESTS += test-lstat
+check_PROGRAMS += test-lstat
+EXTRA_DIST += test-lstat.h test-lstat.c signature.h macros.h
+
+## end gnulib module lstat-tests
+
+## begin gnulib module malloca-tests
+
+TESTS += test-malloca
+check_PROGRAMS += test-malloca
+
+EXTRA_DIST += test-malloca.c
+
+## end gnulib module malloca-tests
+
+## begin gnulib module math-tests
+
+TESTS += test-math
+check_PROGRAMS += test-math
+EXTRA_DIST += test-math.c
+
+## end gnulib module math-tests
+
+## begin gnulib module mbrtowc-tests
+
+TESTS += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh
+TESTS_ENVIRONMENT += \
+ LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbrtowc
+
+EXTRA_DIST += test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh test-mbrtowc.c signature.h macros.h
+
+## end gnulib module mbrtowc-tests
+
+## begin gnulib module mbsinit-tests
+
+TESTS += test-mbsinit.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-mbsinit
+
+EXTRA_DIST += test-mbsinit.sh test-mbsinit.c signature.h macros.h
+
+## end gnulib module mbsinit-tests
+
+## begin gnulib module mbsstr-tests
+
+TESTS += test-mbsstr1 test-mbsstr2.sh test-mbsstr3.sh
+TESTS_ENVIRONMENT += LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-mbsstr1 test-mbsstr2 test-mbsstr3
+
+EXTRA_DIST += test-mbsstr1.c test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c macros.h
+
+## end gnulib module mbsstr-tests
+
+## begin gnulib module memchr-tests
+
+TESTS += test-memchr
+check_PROGRAMS += test-memchr
+EXTRA_DIST += test-memchr.c zerosize-ptr.h signature.h macros.h
+
+## end gnulib module memchr-tests
+
+## begin gnulib module memchr2-tests
+
+TESTS += test-memchr2
+check_PROGRAMS += test-memchr2
+EXTRA_DIST += test-memchr2.c zerosize-ptr.h macros.h
+
+## end gnulib module memchr2-tests
+
+## begin gnulib module memmem-tests
+
+TESTS += test-memmem
+check_PROGRAMS += test-memmem
+
+EXTRA_DIST += test-memmem.c zerosize-ptr.h signature.h macros.h
+
+## end gnulib module memmem-tests
+
+## begin gnulib module nl_langinfo-tests
+
+TESTS += test-nl_langinfo.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-nl_langinfo
+EXTRA_DIST += test-nl_langinfo.sh test-nl_langinfo.c signature.h macros.h
+
+## end gnulib module nl_langinfo-tests
+
+## begin gnulib module obstack-printf
+
+
+EXTRA_DIST += obstack_printf.c
+
+EXTRA_libtests_a_SOURCES += obstack_printf.c
+
+## end gnulib module obstack-printf
+
+## begin gnulib module obstack-printf-tests
+
+TESTS += test-obstack-printf
+check_PROGRAMS += test-obstack-printf
+test_obstack_printf_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-obstack-printf.c signature.h macros.h
+
+## end gnulib module obstack-printf-tests
+
+## begin gnulib module open-tests
+
+TESTS += test-open
+check_PROGRAMS += test-open
+EXTRA_DIST += test-open.h test-open.c signature.h macros.h
+
+## end gnulib module open-tests
+
+## begin gnulib module pipe-tests
+
+TESTS += test-pipe.sh
+check_PROGRAMS += test-pipe
+test_pipe_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-pipe.sh test-pipe.c macros.h
+
+## end gnulib module pipe-tests
+
+## begin gnulib module pipe2-tests
+
+TESTS += test-pipe2
+check_PROGRAMS += test-pipe2
+EXTRA_DIST += test-pipe2.c signature.h macros.h
+
+## end gnulib module pipe2-tests
+
+## begin gnulib module posix_spawnp-tests
+
+if POSIX_SPAWN_PORTED
+TESTS += test-posix_spawn1 test-posix_spawn2
+check_PROGRAMS += test-posix_spawn1 test-posix_spawn2
+
+BUILT_SOURCES += test-posix_spawn1.sh
+test-posix_spawn1.sh: test-posix_spawn1.in.sh
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ cp $(srcdir)/test-posix_spawn1.in.sh $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += test-posix_spawn1.sh test-posix_spawn1.sh-t
+
+BUILT_SOURCES += test-posix_spawn2.sh
+test-posix_spawn2.sh: test-posix_spawn2.in.sh
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ cp $(srcdir)/test-posix_spawn2.in.sh $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += test-posix_spawn2.sh test-posix_spawn2.sh-t
+endif
+EXTRA_DIST += test-posix_spawn1.c test-posix_spawn1.in.sh test-posix_spawn2.c test-posix_spawn2.in.sh signature.h
+
+## end gnulib module posix_spawnp-tests
+
+## begin gnulib module printf-frexp-tests
+
+TESTS += test-printf-frexp
+check_PROGRAMS += test-printf-frexp
+EXTRA_DIST += test-printf-frexp.c macros.h
+
+## end gnulib module printf-frexp-tests
+
+## begin gnulib module printf-frexpl-tests
+
+TESTS += test-printf-frexpl
+check_PROGRAMS += test-printf-frexpl
+EXTRA_DIST += test-printf-frexpl.c macros.h
+
+## end gnulib module printf-frexpl-tests
+
+## begin gnulib module putenv
+
+
+EXTRA_DIST += putenv.c
+
+EXTRA_libtests_a_SOURCES += putenv.c
+
+## end gnulib module putenv
+
+## begin gnulib module quotearg-tests
+
+TESTS += test-quotearg.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-quotearg
+test_quotearg_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-quotearg.sh test-quotearg.c macros.h locale/fr/LC_MESSAGES/test-quotearg.po locale/fr/LC_MESSAGES/test-quotearg.mo
+
+## end gnulib module quotearg-tests
+
+## begin gnulib module rawmemchr-tests
+
+TESTS += test-rawmemchr
+check_PROGRAMS += test-rawmemchr
+EXTRA_DIST += test-rawmemchr.c signature.h macros.h
+
+## end gnulib module rawmemchr-tests
+
+## begin gnulib module readlink-tests
+
+TESTS += test-readlink
+check_PROGRAMS += test-readlink
+EXTRA_DIST += test-readlink.h test-readlink.c signature.h macros.h
+
+## end gnulib module readlink-tests
+
+## begin gnulib module rename-tests
+
+TESTS += test-rename
+check_PROGRAMS += test-rename
+EXTRA_DIST += test-rename.h test-rename.c signature.h macros.h
+
+## end gnulib module rename-tests
+
+## begin gnulib module rmdir-tests
+
+TESTS += test-rmdir
+check_PROGRAMS += test-rmdir
+EXTRA_DIST += test-rmdir.h test-rmdir.c signature.h macros.h
+
+## end gnulib module rmdir-tests
+
+## begin gnulib module sched-tests
+
+TESTS += test-sched
+check_PROGRAMS += test-sched
+EXTRA_DIST += test-sched.c
+
+## end gnulib module sched-tests
+
+## begin gnulib module setenv-tests
+
+TESTS += test-setenv
+check_PROGRAMS += test-setenv
+EXTRA_DIST += test-setenv.c signature.h macros.h
+
+## end gnulib module setenv-tests
+
+## begin gnulib module sigaction-tests
+
+TESTS += test-sigaction
+check_PROGRAMS += test-sigaction
+EXTRA_DIST += test-sigaction.c signature.h macros.h
+
+## end gnulib module sigaction-tests
+
+## begin gnulib module signal-tests
+
+TESTS += test-signal
+check_PROGRAMS += test-signal
+EXTRA_DIST += test-signal.c
+
+## end gnulib module signal-tests
+
+## begin gnulib module signbit-tests
+
+TESTS += test-signbit
+check_PROGRAMS += test-signbit
+
+EXTRA_DIST += test-signbit.c macros.h
+
+## end gnulib module signbit-tests
+
+## begin gnulib module snprintf-posix-tests
+
+TESTS += test-snprintf-posix test-snprintf
+check_PROGRAMS += test-snprintf-posix test-snprintf
+
+EXTRA_DIST += test-snprintf-posix.c test-snprintf-posix.h test-snprintf.c nan.h signature.h macros.h
+
+## end gnulib module snprintf-posix-tests
+
+## begin gnulib module snprintf-tests
+
+TESTS += test-snprintf
+check_PROGRAMS += test-snprintf
+
+EXTRA_DIST += test-snprintf.c signature.h macros.h
+
+## end gnulib module snprintf-tests
+
+## begin gnulib module spawn-tests
+
+TESTS += test-spawn
+check_PROGRAMS += test-spawn
+EXTRA_DIST += test-spawn.c
+
+## end gnulib module spawn-tests
+
+## begin gnulib module sprintf-posix-tests
+
+TESTS += test-sprintf-posix
+check_PROGRAMS += test-sprintf-posix
+
+EXTRA_DIST += test-sprintf-posix.c test-sprintf-posix.h nan.h signature.h macros.h
+
+## end gnulib module sprintf-posix-tests
+
+## begin gnulib module stat-tests
+
+TESTS += test-stat
+check_PROGRAMS += test-stat
+EXTRA_DIST += test-stat.h test-stat.c signature.h macros.h
+
+## end gnulib module stat-tests
+
+## begin gnulib module stdbool-tests
+
+TESTS += test-stdbool
+check_PROGRAMS += test-stdbool
+EXTRA_DIST += test-stdbool.c
+
+## end gnulib module stdbool-tests
+
+## begin gnulib module stddef-tests
+
+TESTS += test-stddef
+check_PROGRAMS += test-stddef
+EXTRA_DIST += test-stddef.c
+
+## end gnulib module stddef-tests
+
+## begin gnulib module stdint-tests
+
+TESTS += test-stdint
+check_PROGRAMS += test-stdint
+EXTRA_DIST += test-stdint.c
+
+## end gnulib module stdint-tests
+
+## begin gnulib module stdio-tests
+
+TESTS += test-stdio
+check_PROGRAMS += test-stdio
+EXTRA_DIST += test-stdio.c
+
+## end gnulib module stdio-tests
+
+## begin gnulib module stdlib-tests
+
+TESTS += test-stdlib
+check_PROGRAMS += test-stdlib
+EXTRA_DIST += test-stdlib.c
+
+## end gnulib module stdlib-tests
+
+## begin gnulib module strchrnul-tests
+
+TESTS += test-strchrnul
+check_PROGRAMS += test-strchrnul
+EXTRA_DIST += test-strchrnul.c signature.h macros.h
+
+## end gnulib module strchrnul-tests
+
+## begin gnulib module strdup-posix
+
+
+EXTRA_DIST += strdup.c
+
+EXTRA_libtests_a_SOURCES += strdup.c
+
+## end gnulib module strdup-posix
+
+## begin gnulib module strerror-tests
+
+TESTS += test-strerror
+check_PROGRAMS += test-strerror
+EXTRA_DIST += test-strerror.c signature.h macros.h
+
+## end gnulib module strerror-tests
+
+## begin gnulib module striconv-tests
+
+TESTS += test-striconv
+check_PROGRAMS += test-striconv
+test_striconv_LDADD = $(LDADD) @LIBICONV@
+
+EXTRA_DIST += test-striconv.c macros.h
+
+## end gnulib module striconv-tests
+
+## begin gnulib module string-tests
+
+TESTS += test-string
+check_PROGRAMS += test-string
+EXTRA_DIST += test-string.c
+
+## end gnulib module string-tests
+
+## begin gnulib module strtod-tests
+
+LIBS += $(POW_LIB)
+TESTS += test-strtod
+check_PROGRAMS += test-strtod
+EXTRA_DIST += test-strtod.c signature.h macros.h
+
+## end gnulib module strtod-tests
+
+## begin gnulib module symlink
+
+
+EXTRA_DIST += symlink.c
+
+EXTRA_libtests_a_SOURCES += symlink.c
+
+## end gnulib module symlink
+
+## begin gnulib module symlink-tests
+
+TESTS += test-symlink
+check_PROGRAMS += test-symlink
+EXTRA_DIST += test-symlink.h test-symlink.c signature.h macros.h
+
+## end gnulib module symlink-tests
+
+## begin gnulib module sys_stat-tests
+
+TESTS += test-sys_stat
+check_PROGRAMS += test-sys_stat
+EXTRA_DIST += test-sys_stat.c
+
+## end gnulib module sys_stat-tests
+
+## begin gnulib module sys_time-tests
+
+TESTS += test-sys_time
+check_PROGRAMS += test-sys_time
+EXTRA_DIST += test-sys_time.c
+
+## end gnulib module sys_time-tests
+
+## begin gnulib module sys_wait-tests
+
+TESTS += test-sys_wait
+check_PROGRAMS += test-sys_wait
+EXTRA_DIST += test-sys_wait.c
+
+## end gnulib module sys_wait-tests
+
+## begin gnulib module time-tests
+
+TESTS += test-time
+check_PROGRAMS += test-time
+EXTRA_DIST += test-time.c
+
+## end gnulib module time-tests
+
+## begin gnulib module unistd-safer-tests
+
+TESTS += test-dup-safer
+check_PROGRAMS += test-dup-safer
+EXTRA_DIST += test-dup-safer.c macros.h
+
+## end gnulib module unistd-safer-tests
+
+## begin gnulib module unistd-tests
+
+TESTS += test-unistd
+check_PROGRAMS += test-unistd
+EXTRA_DIST += test-unistd.c
+
+## end gnulib module unistd-tests
+
+## begin gnulib module uniwidth/width-tests
+
+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_width2_SOURCES = uniwidth/test-uc_width2.c
+
+EXTRA_DIST += uniwidth/test-uc_width.c uniwidth/test-uc_width2.c uniwidth/test-uc_width2.sh macros.h
+
+## end gnulib module uniwidth/width-tests
+
+## begin gnulib module unsetenv-tests
+
+TESTS += test-unsetenv
+check_PROGRAMS += test-unsetenv
+EXTRA_DIST += test-unsetenv.c signature.h macros.h
+
+## end gnulib module unsetenv-tests
+
+## begin gnulib module update-copyright-tests
+
+TESTS += test-update-copyright.sh
+TESTS_ENVIRONMENT += PATH='$(abs_aux_dir)'$(PATH_SEPARATOR)"$$PATH"
+EXTRA_DIST += test-update-copyright.sh
+
+## end gnulib module update-copyright-tests
+
+## begin gnulib module vasnprintf-posix-tests
+
+TESTS += test-vasnprintf-posix test-vasnprintf-posix2.sh
+TESTS_ENVIRONMENT += LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@'
+check_PROGRAMS += test-vasnprintf-posix test-vasnprintf-posix2
+EXTRA_DIST += test-vasnprintf-posix.c test-vasnprintf-posix2.sh test-vasnprintf-posix2.c nan.h macros.h
+
+## end gnulib module vasnprintf-posix-tests
+
+## begin gnulib module vasnprintf-tests
+
+TESTS += test-vasnprintf
+check_PROGRAMS += test-vasnprintf
+
+EXTRA_DIST += test-vasnprintf.c macros.h
+
+## end gnulib module vasnprintf-tests
+
+## begin gnulib module vasprintf-posix-tests
+
+TESTS += test-vasprintf-posix
+check_PROGRAMS += test-vasprintf-posix
+
+EXTRA_DIST += test-vasprintf-posix.c nan.h macros.h
+
+## end gnulib module vasprintf-posix-tests
+
+## begin gnulib module vasprintf-tests
+
+TESTS += test-vasprintf
+check_PROGRAMS += test-vasprintf
+
+EXTRA_DIST += test-vasprintf.c signature.h macros.h
+
+## end gnulib module vasprintf-tests
+
+## begin gnulib module vc-list-files-tests
+
+TESTS += test-vc-list-files-git.sh
+TESTS += test-vc-list-files-cvs.sh
+TESTS_ENVIRONMENT += PATH='$(abs_aux_dir)'$(PATH_SEPARATOR)"$$PATH"
+EXTRA_DIST += test-vc-list-files-git.sh test-vc-list-files-cvs.sh
+
+## end gnulib module vc-list-files-tests
+
+## begin gnulib module vfprintf-posix-tests
+
+TESTS += test-vfprintf-posix.sh
+check_PROGRAMS += test-vfprintf-posix
+EXTRA_DIST += test-vfprintf-posix.sh test-vfprintf-posix.c test-fprintf-posix.h test-printf-posix.output signature.h macros.h
+
+## end gnulib module vfprintf-posix-tests
+
+## begin gnulib module vprintf-posix-tests
+
+TESTS += test-vprintf-posix.sh
+check_PROGRAMS += test-vprintf-posix
+EXTRA_DIST += test-vprintf-posix.sh test-vprintf-posix.c test-printf-posix.h test-printf-posix.output signature.h macros.h
+
+## end gnulib module vprintf-posix-tests
+
+## begin gnulib module warn-on-use
+
+BUILT_SOURCES += warn-on-use.h
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+MOSTLYCLEANFILES += warn-on-use.h warn-on-use.h-t
+
+WARN_ON_USE_H=warn-on-use.h
+
+EXTRA_DIST += $(top_srcdir)/build-aux/warn-on-use.h
+
+## end gnulib module warn-on-use
+
+## begin gnulib module wchar-tests
+
+TESTS += test-wchar
+check_PROGRAMS += test-wchar
+EXTRA_DIST += test-wchar.c
+
+## end gnulib module wchar-tests
+
+## begin gnulib module wcrtomb-tests
+
+TESTS += test-wcrtomb.sh
+TESTS_ENVIRONMENT += \
+ LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+check_PROGRAMS += test-wcrtomb
+
+EXTRA_DIST += test-wcrtomb.sh test-wcrtomb.c signature.h macros.h
+
+## end gnulib module wcrtomb-tests
+
+## begin gnulib module wctob
+
+
+EXTRA_DIST += wctob.c
+
+EXTRA_libtests_a_SOURCES += wctob.c
+
+## end gnulib module wctob
+
+## begin gnulib module wctype-tests
+
+TESTS += test-wctype
+check_PROGRAMS += test-wctype
+EXTRA_DIST += test-wctype.c macros.h
+
+## end gnulib module wctype-tests
+
+## begin gnulib module wcwidth-tests
+
+TESTS += test-wcwidth
+check_PROGRAMS += test-wcwidth
+
+EXTRA_DIST += test-wcwidth.c signature.h macros.h
+
+## end gnulib module wcwidth-tests
+
+## begin gnulib module xalloc-die-tests
+
+TESTS += test-xalloc-die.sh
+check_PROGRAMS += test-xalloc-die
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xalloc-die.c test-xalloc-die.sh init.sh
+
+## end gnulib module xalloc-die-tests
+
+## begin gnulib module xmemdup0-tests
+
+TESTS += test-xmemdup0
+check_PROGRAMS += test-xmemdup0
+test_xmemdup0_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xmemdup0.c macros.h
+
+## end gnulib module xmemdup0-tests
+
+## begin gnulib module xprintf-posix-tests
+
+TESTS += test-xprintf-posix.sh
+check_PROGRAMS += test-xfprintf-posix test-xprintf-posix
+test_xfprintf_posix_LDADD = $(LDADD) @LIBINTL@
+test_xprintf_posix_LDADD = $(LDADD) @LIBINTL@
+EXTRA_DIST += test-xprintf-posix.sh test-xfprintf-posix.c test-xprintf-posix.c test-fprintf-posix.h test-printf-posix.h test-printf-posix.output macros.h
+
+## end gnulib module xprintf-posix-tests
+
+## begin gnulib module xvasprintf-tests
+
+TESTS += test-xvasprintf
+check_PROGRAMS += test-xvasprintf
+test_xvasprintf_LDADD = $(LDADD) @LIBINTL@
+
+EXTRA_DIST += test-xvasprintf.c macros.h
+
+## end gnulib module xvasprintf-tests
+
+# Clean up after Solaris cc.
+clean-local:
+ rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
diff --git a/tests/gnu/Makefile.in b/tests/gnu/Makefile.in
new file mode 100644
index 00000000..046750e9
--- /dev/null
+++ b/tests/gnu/Makefile.in
@@ -0,0 +1,3470 @@
+# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# @configure_input@
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
+# Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+@SET_MAKE@
+
+# Copyright (C) 2002-2010 Free Software Foundation, Inc.
+#
+# This file is free software, distributed under the terms of the GNU
+# General Public License. As a special exception to the GNU General
+# Public License, this file may be distributed as part of a program
+# that contains a configuration script generated by Autoconf, under
+# the same distribution terms as the rest of that program.
+#
+# Generated by gnulib-tool.
+
+
+
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkglibexecdir = $(libexecdir)/@PACKAGE@
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = @build@
+host_triplet = @host@
+TESTS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
+ test-array_oset$(EXEEXT) test-avltree_oset$(EXEEXT) \
+ test-binary-io.sh test-bitrotate$(EXEEXT) test-btowc1.sh \
+ test-btowc2.sh test-c-ctype$(EXEEXT) test-c-strcase.sh \
+ test-canonicalize-lgpl$(EXEEXT) test-cloexec$(EXEEXT) \
+ test-closein.sh test-dirname$(EXEEXT) test-dup2$(EXEEXT) \
+ test-environ$(EXEEXT) test-errno$(EXEEXT) \
+ test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fflush$(EXEEXT) \
+ test-fflush2.sh test-filenamecat$(EXEEXT) \
+ test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) test-fpending.sh \
+ test-fpurge$(EXEEXT) test-freadahead.sh test-freading$(EXEEXT) \
+ test-freadptr.sh test-freadptr2.sh test-freadseek.sh \
+ test-frexp-nolibm$(EXEEXT) test-frexpl-nolibm$(EXEEXT) \
+ test-fseeko.sh test-fseeko2.sh test-fseterr$(EXEEXT) \
+ test-ftello.sh test-ftello2.sh test-getdtablesize$(EXEEXT) \
+ test-gettimeofday$(EXEEXT) test-iconv$(EXEEXT) \
+ test-inttypes$(EXEEXT) test-isnand-nolibm$(EXEEXT) \
+ test-isnanf-nolibm$(EXEEXT) test-isnanl-nolibm$(EXEEXT) \
+ test-langinfo$(EXEEXT) test-link$(EXEEXT) \
+ test-linkedhash_list$(EXEEXT) test-lseek.sh \
+ test-lstat$(EXEEXT) test-malloca$(EXEEXT) test-math$(EXEEXT) \
+ test-mbrtowc1.sh test-mbrtowc2.sh test-mbrtowc3.sh \
+ test-mbrtowc4.sh test-mbsinit.sh test-mbsstr1$(EXEEXT) \
+ test-mbsstr2.sh test-mbsstr3.sh test-memchr$(EXEEXT) \
+ test-memchr2$(EXEEXT) test-memmem$(EXEEXT) test-nl_langinfo.sh \
+ test-obstack-printf$(EXEEXT) test-open$(EXEEXT) test-pipe.sh \
+ test-pipe2$(EXEEXT) $(am__EXEEXT_1) test-printf-frexp$(EXEEXT) \
+ test-printf-frexpl$(EXEEXT) test-quotearg.sh \
+ test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
+ test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-sched$(EXEEXT) \
+ test-setenv$(EXEEXT) test-sigaction$(EXEEXT) \
+ test-signal$(EXEEXT) test-signbit$(EXEEXT) \
+ test-snprintf-posix$(EXEEXT) test-snprintf$(EXEEXT) \
+ test-snprintf$(EXEEXT) test-spawn$(EXEEXT) \
+ test-sprintf-posix$(EXEEXT) test-stat$(EXEEXT) \
+ test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
+ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \
+ test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \
+ test-striconv$(EXEEXT) test-string$(EXEEXT) \
+ test-strtod$(EXEEXT) test-symlink$(EXEEXT) \
+ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+ test-sys_wait$(EXEEXT) test-time$(EXEEXT) \
+ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
+ test-uc_width$(EXEEXT) uniwidth/test-uc_width2.sh \
+ test-unsetenv$(EXEEXT) test-update-copyright.sh \
+ test-vasnprintf-posix$(EXEEXT) test-vasnprintf-posix2.sh \
+ test-vasnprintf$(EXEEXT) test-vasprintf-posix$(EXEEXT) \
+ test-vasprintf$(EXEEXT) test-vc-list-files-git.sh \
+ test-vc-list-files-cvs.sh test-vfprintf-posix.sh \
+ test-vprintf-posix.sh test-wchar$(EXEEXT) test-wcrtomb.sh \
+ test-wctype$(EXEEXT) test-wcwidth$(EXEEXT) test-xalloc-die.sh \
+ test-xmemdup0$(EXEEXT) test-xprintf-posix.sh \
+ test-xvasprintf$(EXEEXT)
+XFAIL_TESTS =
+noinst_PROGRAMS =
+check_PROGRAMS = test-alloca-opt$(EXEEXT) test-array_list$(EXEEXT) \
+ test-array_oset$(EXEEXT) test-avltree_oset$(EXEEXT) \
+ test-binary-io$(EXEEXT) test-bitrotate$(EXEEXT) \
+ test-btowc$(EXEEXT) test-c-ctype$(EXEEXT) \
+ test-c-strcasecmp$(EXEEXT) test-c-strncasecmp$(EXEEXT) \
+ test-canonicalize-lgpl$(EXEEXT) test-cloexec$(EXEEXT) \
+ test-closein$(EXEEXT) test-dirname$(EXEEXT) test-dup2$(EXEEXT) \
+ test-environ$(EXEEXT) test-errno$(EXEEXT) \
+ test-fcntl-h$(EXEEXT) test-fcntl$(EXEEXT) test-fflush$(EXEEXT) \
+ test-fflush2$(EXEEXT) test-filenamecat$(EXEEXT) \
+ test-fopen-safer$(EXEEXT) test-fopen$(EXEEXT) \
+ test-fpending$(EXEEXT) test-fpurge$(EXEEXT) \
+ test-freadahead$(EXEEXT) test-freading$(EXEEXT) \
+ test-freadptr$(EXEEXT) test-freadptr2$(EXEEXT) \
+ test-freadseek$(EXEEXT) test-frexp-nolibm$(EXEEXT) \
+ test-frexpl-nolibm$(EXEEXT) test-fseeko$(EXEEXT) \
+ test-fseterr$(EXEEXT) test-ftello$(EXEEXT) \
+ test-getdtablesize$(EXEEXT) test-gettimeofday$(EXEEXT) \
+ test-iconv$(EXEEXT) test-inttypes$(EXEEXT) \
+ test-isnand-nolibm$(EXEEXT) test-isnanf-nolibm$(EXEEXT) \
+ test-isnanl-nolibm$(EXEEXT) test-langinfo$(EXEEXT) \
+ test-link$(EXEEXT) test-linkedhash_list$(EXEEXT) \
+ test-lseek$(EXEEXT) test-lstat$(EXEEXT) test-malloca$(EXEEXT) \
+ test-math$(EXEEXT) test-mbrtowc$(EXEEXT) test-mbsinit$(EXEEXT) \
+ test-mbsstr1$(EXEEXT) test-mbsstr2$(EXEEXT) \
+ test-mbsstr3$(EXEEXT) test-memchr$(EXEEXT) \
+ test-memchr2$(EXEEXT) test-memmem$(EXEEXT) \
+ test-nl_langinfo$(EXEEXT) test-obstack-printf$(EXEEXT) \
+ test-open$(EXEEXT) test-pipe$(EXEEXT) test-pipe2$(EXEEXT) \
+ $(am__EXEEXT_1) test-printf-frexp$(EXEEXT) \
+ test-printf-frexpl$(EXEEXT) test-quotearg$(EXEEXT) \
+ test-rawmemchr$(EXEEXT) test-readlink$(EXEEXT) \
+ test-rename$(EXEEXT) test-rmdir$(EXEEXT) test-sched$(EXEEXT) \
+ test-setenv$(EXEEXT) test-sigaction$(EXEEXT) \
+ test-signal$(EXEEXT) test-signbit$(EXEEXT) \
+ test-snprintf-posix$(EXEEXT) test-snprintf$(EXEEXT) \
+ test-snprintf$(EXEEXT) test-spawn$(EXEEXT) \
+ test-sprintf-posix$(EXEEXT) test-stat$(EXEEXT) \
+ test-stdbool$(EXEEXT) test-stddef$(EXEEXT) \
+ test-stdint$(EXEEXT) test-stdio$(EXEEXT) test-stdlib$(EXEEXT) \
+ test-strchrnul$(EXEEXT) test-strerror$(EXEEXT) \
+ test-striconv$(EXEEXT) test-string$(EXEEXT) \
+ test-strtod$(EXEEXT) test-symlink$(EXEEXT) \
+ test-sys_stat$(EXEEXT) test-sys_time$(EXEEXT) \
+ test-sys_wait$(EXEEXT) test-time$(EXEEXT) \
+ test-dup-safer$(EXEEXT) test-unistd$(EXEEXT) \
+ test-uc_width$(EXEEXT) test-uc_width2$(EXEEXT) \
+ test-unsetenv$(EXEEXT) test-vasnprintf-posix$(EXEEXT) \
+ test-vasnprintf-posix2$(EXEEXT) test-vasnprintf$(EXEEXT) \
+ test-vasprintf-posix$(EXEEXT) test-vasprintf$(EXEEXT) \
+ test-vfprintf-posix$(EXEEXT) test-vprintf-posix$(EXEEXT) \
+ test-wchar$(EXEEXT) test-wcrtomb$(EXEEXT) test-wctype$(EXEEXT) \
+ test-wcwidth$(EXEEXT) test-xalloc-die$(EXEEXT) \
+ test-xmemdup0$(EXEEXT) test-xfprintf-posix$(EXEEXT) \
+ test-xprintf-posix$(EXEEXT) test-xvasprintf$(EXEEXT)
+@POSIX_SPAWN_PORTED_TRUE@am__append_1 = test-posix_spawn1 test-posix_spawn2
+@POSIX_SPAWN_PORTED_TRUE@am__append_2 = test-posix_spawn1 test-posix_spawn2
+@POSIX_SPAWN_PORTED_TRUE@am__append_3 = test-posix_spawn1.sh \
+@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh
+@POSIX_SPAWN_PORTED_TRUE@am__append_4 = test-posix_spawn1.sh \
+@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn1.sh-t \
+@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh \
+@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2.sh-t
+subdir = tests/gnu
+DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
+ $(srcdir)/Makefile.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/ltdl/m4/00gnulib.m4 \
+ $(top_srcdir)/ltdl/m4/alloca.m4 $(top_srcdir)/ltdl/m4/argz.m4 \
+ $(top_srcdir)/ltdl/m4/assert.m4 \
+ $(top_srcdir)/ltdl/m4/autobuild.m4 \
+ $(top_srcdir)/ltdl/m4/btowc.m4 \
+ $(top_srcdir)/ltdl/m4/canonicalize.m4 \
+ $(top_srcdir)/ltdl/m4/cloexec.m4 \
+ $(top_srcdir)/ltdl/m4/close-stream.m4 \
+ $(top_srcdir)/ltdl/m4/closein.m4 \
+ $(top_srcdir)/ltdl/m4/closeout.m4 \
+ $(top_srcdir)/ltdl/m4/codeset.m4 \
+ $(top_srcdir)/ltdl/m4/config-h.m4 \
+ $(top_srcdir)/ltdl/m4/debug.m4 \
+ $(top_srcdir)/ltdl/m4/dirname.m4 $(top_srcdir)/ltdl/m4/dos.m4 \
+ $(top_srcdir)/ltdl/m4/double-slash-root.m4 \
+ $(top_srcdir)/ltdl/m4/dup2.m4 $(top_srcdir)/ltdl/m4/eealloc.m4 \
+ $(top_srcdir)/ltdl/m4/environ.m4 \
+ $(top_srcdir)/ltdl/m4/errno_h.m4 \
+ $(top_srcdir)/ltdl/m4/error.m4 \
+ $(top_srcdir)/ltdl/m4/execute.m4 \
+ $(top_srcdir)/ltdl/m4/exitfail.m4 \
+ $(top_srcdir)/ltdl/m4/exponentd.m4 \
+ $(top_srcdir)/ltdl/m4/exponentf.m4 \
+ $(top_srcdir)/ltdl/m4/exponentl.m4 \
+ $(top_srcdir)/ltdl/m4/extensions.m4 \
+ $(top_srcdir)/ltdl/m4/fatal-signal.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl-o.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl.m4 \
+ $(top_srcdir)/ltdl/m4/fcntl_h.m4 \
+ $(top_srcdir)/ltdl/m4/fflush.m4 \
+ $(top_srcdir)/ltdl/m4/filenamecat.m4 \
+ $(top_srcdir)/ltdl/m4/flexmember.m4 \
+ $(top_srcdir)/ltdl/m4/float_h.m4 \
+ $(top_srcdir)/ltdl/m4/fopen.m4 \
+ $(top_srcdir)/ltdl/m4/fpending.m4 \
+ $(top_srcdir)/ltdl/m4/fpieee.m4 \
+ $(top_srcdir)/ltdl/m4/fpurge.m4 \
+ $(top_srcdir)/ltdl/m4/freading.m4 \
+ $(top_srcdir)/ltdl/m4/frexp.m4 $(top_srcdir)/ltdl/m4/frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/fseeko.m4 \
+ $(top_srcdir)/ltdl/m4/ftello.m4 \
+ $(top_srcdir)/ltdl/m4/getdtablesize.m4 \
+ $(top_srcdir)/ltdl/m4/getopt.m4 \
+ $(top_srcdir)/ltdl/m4/getpagesize.m4 \
+ $(top_srcdir)/ltdl/m4/gettext.m4 \
+ $(top_srcdir)/ltdl/m4/gettimeofday.m4 \
+ $(top_srcdir)/ltdl/m4/gl_list.m4 \
+ $(top_srcdir)/ltdl/m4/glibc21.m4 $(top_srcdir)/ltdl/m4/gmp.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-common.m4 \
+ $(top_srcdir)/ltdl/m4/gnulib-comp.m4 \
+ $(top_srcdir)/ltdl/m4/iconv.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_h.m4 \
+ $(top_srcdir)/ltdl/m4/iconv_open.m4 \
+ $(top_srcdir)/ltdl/m4/include_next.m4 \
+ $(top_srcdir)/ltdl/m4/inline.m4 \
+ $(top_srcdir)/ltdl/m4/intlmacosx.m4 \
+ $(top_srcdir)/ltdl/m4/intmax_t.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes-pri.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes.m4 \
+ $(top_srcdir)/ltdl/m4/inttypes_h.m4 \
+ $(top_srcdir)/ltdl/m4/isnand.m4 \
+ $(top_srcdir)/ltdl/m4/isnanf.m4 \
+ $(top_srcdir)/ltdl/m4/isnanl.m4 \
+ $(top_srcdir)/ltdl/m4/langinfo_h.m4 \
+ $(top_srcdir)/ltdl/m4/ldexpl.m4 \
+ $(top_srcdir)/ltdl/m4/lib-ld.m4 \
+ $(top_srcdir)/ltdl/m4/lib-link.m4 \
+ $(top_srcdir)/ltdl/m4/lib-prefix.m4 \
+ $(top_srcdir)/ltdl/m4/libtool.m4 $(top_srcdir)/ltdl/m4/link.m4 \
+ $(top_srcdir)/ltdl/m4/localcharset.m4 \
+ $(top_srcdir)/ltdl/m4/locale-fr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-ja.m4 \
+ $(top_srcdir)/ltdl/m4/locale-tr.m4 \
+ $(top_srcdir)/ltdl/m4/locale-zh.m4 \
+ $(top_srcdir)/ltdl/m4/longlong.m4 \
+ $(top_srcdir)/ltdl/m4/lseek.m4 $(top_srcdir)/ltdl/m4/lstat.m4 \
+ $(top_srcdir)/ltdl/m4/ltdl.m4 \
+ $(top_srcdir)/ltdl/m4/ltoptions.m4 \
+ $(top_srcdir)/ltdl/m4/ltsugar.m4 \
+ $(top_srcdir)/ltdl/m4/ltversion.m4 \
+ $(top_srcdir)/ltdl/m4/lt~obsolete.m4 \
+ $(top_srcdir)/ltdl/m4/m4-error.m4 \
+ $(top_srcdir)/ltdl/m4/m4-getopt.m4 \
+ $(top_srcdir)/ltdl/m4/m4-gettext.m4 \
+ $(top_srcdir)/ltdl/m4/m4-obstack.m4 \
+ $(top_srcdir)/ltdl/m4/m4-regex.m4 \
+ $(top_srcdir)/ltdl/m4/m4-rename.m4 \
+ $(top_srcdir)/ltdl/m4/m4-syscmd.m4 \
+ $(top_srcdir)/ltdl/m4/malloc.m4 \
+ $(top_srcdir)/ltdl/m4/malloca.m4 \
+ $(top_srcdir)/ltdl/m4/math_h.m4 \
+ $(top_srcdir)/ltdl/m4/mbchar.m4 \
+ $(top_srcdir)/ltdl/m4/mbiter.m4 \
+ $(top_srcdir)/ltdl/m4/mbrtowc.m4 \
+ $(top_srcdir)/ltdl/m4/mbsinit.m4 \
+ $(top_srcdir)/ltdl/m4/mbslen.m4 \
+ $(top_srcdir)/ltdl/m4/mbstate_t.m4 \
+ $(top_srcdir)/ltdl/m4/memchr.m4 \
+ $(top_srcdir)/ltdl/m4/memmem.m4 \
+ $(top_srcdir)/ltdl/m4/mkdtemp.m4 \
+ $(top_srcdir)/ltdl/m4/mkstemp.m4 \
+ $(top_srcdir)/ltdl/m4/mmap-anon.m4 \
+ $(top_srcdir)/ltdl/m4/mode_t.m4 \
+ $(top_srcdir)/ltdl/m4/multiarch.m4 \
+ $(top_srcdir)/ltdl/m4/nl_langinfo.m4 \
+ $(top_srcdir)/ltdl/m4/nls.m4 $(top_srcdir)/ltdl/m4/nocrash.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/obstack-printf.m4 \
+ $(top_srcdir)/ltdl/m4/open.m4 $(top_srcdir)/ltdl/m4/pathmax.m4 \
+ $(top_srcdir)/ltdl/m4/pipe.m4 $(top_srcdir)/ltdl/m4/pipe2.m4 \
+ $(top_srcdir)/ltdl/m4/po.m4 \
+ $(top_srcdir)/ltdl/m4/posix_spawn.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexp.m4 \
+ $(top_srcdir)/ltdl/m4/printf-frexpl.m4 \
+ $(top_srcdir)/ltdl/m4/printf.m4 \
+ $(top_srcdir)/ltdl/m4/progtest.m4 \
+ $(top_srcdir)/ltdl/m4/putenv.m4 $(top_srcdir)/ltdl/m4/quote.m4 \
+ $(top_srcdir)/ltdl/m4/quotearg.m4 \
+ $(top_srcdir)/ltdl/m4/rawmemchr.m4 \
+ $(top_srcdir)/ltdl/m4/readlink.m4 \
+ $(top_srcdir)/ltdl/m4/regex.m4 $(top_srcdir)/ltdl/m4/rename.m4 \
+ $(top_srcdir)/ltdl/m4/rmdir.m4 \
+ $(top_srcdir)/ltdl/m4/sched_h.m4 \
+ $(top_srcdir)/ltdl/m4/setenv.m4 \
+ $(top_srcdir)/ltdl/m4/sig_atomic_t.m4 \
+ $(top_srcdir)/ltdl/m4/sigaction.m4 \
+ $(top_srcdir)/ltdl/m4/signal_h.m4 \
+ $(top_srcdir)/ltdl/m4/signalblocking.m4 \
+ $(top_srcdir)/ltdl/m4/signbit.m4 \
+ $(top_srcdir)/ltdl/m4/size_max.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/snprintf.m4 \
+ $(top_srcdir)/ltdl/m4/spawn_h.m4 \
+ $(top_srcdir)/ltdl/m4/sprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/ssize_t.m4 \
+ $(top_srcdir)/ltdl/m4/stackovf.m4 \
+ $(top_srcdir)/ltdl/m4/stat.m4 $(top_srcdir)/ltdl/m4/stdarg.m4 \
+ $(top_srcdir)/ltdl/m4/stdbool.m4 \
+ $(top_srcdir)/ltdl/m4/stddef_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdint.m4 \
+ $(top_srcdir)/ltdl/m4/stdint_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdio-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdio_h.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib-safer.m4 \
+ $(top_srcdir)/ltdl/m4/stdlib_h.m4 \
+ $(top_srcdir)/ltdl/m4/strchrnul.m4 \
+ $(top_srcdir)/ltdl/m4/strdup.m4 \
+ $(top_srcdir)/ltdl/m4/strerror.m4 \
+ $(top_srcdir)/ltdl/m4/string_h.m4 \
+ $(top_srcdir)/ltdl/m4/strndup.m4 \
+ $(top_srcdir)/ltdl/m4/strnlen.m4 \
+ $(top_srcdir)/ltdl/m4/strtod.m4 \
+ $(top_srcdir)/ltdl/m4/strtol.m4 \
+ $(top_srcdir)/ltdl/m4/symlink.m4 \
+ $(top_srcdir)/ltdl/m4/sys_stat_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_time_h.m4 \
+ $(top_srcdir)/ltdl/m4/sys_wait_h.m4 \
+ $(top_srcdir)/ltdl/m4/tempname.m4 \
+ $(top_srcdir)/ltdl/m4/time_h.m4 \
+ $(top_srcdir)/ltdl/m4/tmpdir.m4 \
+ $(top_srcdir)/ltdl/m4/ulonglong.m4 \
+ $(top_srcdir)/ltdl/m4/ungetc.m4 \
+ $(top_srcdir)/ltdl/m4/unistd-safer.m4 \
+ $(top_srcdir)/ltdl/m4/unistd_h.m4 \
+ $(top_srcdir)/ltdl/m4/unlocked-io.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasnprintf.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vasprintf.m4 \
+ $(top_srcdir)/ltdl/m4/version-etc.m4 \
+ $(top_srcdir)/ltdl/m4/vfprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/vprintf-posix.m4 \
+ $(top_srcdir)/ltdl/m4/wait-process.m4 \
+ $(top_srcdir)/ltdl/m4/warn-on-use.m4 \
+ $(top_srcdir)/ltdl/m4/wchar.m4 \
+ $(top_srcdir)/ltdl/m4/wchar_t.m4 \
+ $(top_srcdir)/ltdl/m4/wcrtomb.m4 \
+ $(top_srcdir)/ltdl/m4/wctob.m4 $(top_srcdir)/ltdl/m4/wctype.m4 \
+ $(top_srcdir)/ltdl/m4/wcwidth.m4 \
+ $(top_srcdir)/ltdl/m4/wint_t.m4 \
+ $(top_srcdir)/ltdl/m4/xalloc.m4 $(top_srcdir)/ltdl/m4/xsize.m4 \
+ $(top_srcdir)/ltdl/m4/xstrndup.m4 \
+ $(top_srcdir)/ltdl/m4/xvasprintf.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+mkinstalldirs = $(install_sh) -d
+CONFIG_HEADER = $(top_builddir)/gnu/config.h
+CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_VPATH_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
+ARFLAGS = cru
+AM_V_AR = $(am__v_AR_$(V))
+am__v_AR_ = $(am__v_AR_$(AM_DEFAULT_VERBOSITY))
+am__v_AR_0 = @echo " AR " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
+libtests_a_AR = $(AR) $(ARFLAGS)
+am__DEPENDENCIES_1 =
+am_libtests_a_OBJECTS = gl_array_list.$(OBJEXT) \
+ gl_array_oset.$(OBJEXT)
+libtests_a_OBJECTS = $(am_libtests_a_OBJECTS)
+@POSIX_SPAWN_PORTED_TRUE@am__EXEEXT_1 = test-posix_spawn1$(EXEEXT) \
+@POSIX_SPAWN_PORTED_TRUE@ test-posix_spawn2$(EXEEXT)
+PROGRAMS = $(noinst_PROGRAMS)
+test_alloca_opt_SOURCES = test-alloca-opt.c
+test_alloca_opt_OBJECTS = test-alloca-opt.$(OBJEXT)
+test_alloca_opt_LDADD = $(LDADD)
+test_alloca_opt_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+AM_V_lt = $(am__v_lt_$(V))
+am__v_lt_ = $(am__v_lt_$(AM_DEFAULT_VERBOSITY))
+am__v_lt_0 = --silent
+test_array_list_SOURCES = test-array_list.c
+test_array_list_OBJECTS = test-array_list.$(OBJEXT)
+test_array_list_LDADD = $(LDADD)
+test_array_list_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_array_oset_SOURCES = test-array_oset.c
+test_array_oset_OBJECTS = test-array_oset.$(OBJEXT)
+am__DEPENDENCIES_2 = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_array_oset_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_avltree_oset_SOURCES = test-avltree_oset.c
+test_avltree_oset_OBJECTS = test-avltree_oset.$(OBJEXT)
+test_avltree_oset_LDADD = $(LDADD)
+test_avltree_oset_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_binary_io_SOURCES = test-binary-io.c
+test_binary_io_OBJECTS = test-binary-io.$(OBJEXT)
+test_binary_io_LDADD = $(LDADD)
+test_binary_io_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_bitrotate_SOURCES = test-bitrotate.c
+test_bitrotate_OBJECTS = test-bitrotate.$(OBJEXT)
+test_bitrotate_LDADD = $(LDADD)
+test_bitrotate_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_btowc_SOURCES = test-btowc.c
+test_btowc_OBJECTS = test-btowc.$(OBJEXT)
+test_btowc_LDADD = $(LDADD)
+test_btowc_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_c_ctype_SOURCES = test-c-ctype.c
+test_c_ctype_OBJECTS = test-c-ctype.$(OBJEXT)
+test_c_ctype_LDADD = $(LDADD)
+test_c_ctype_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_c_strcasecmp_SOURCES = test-c-strcasecmp.c
+test_c_strcasecmp_OBJECTS = test-c-strcasecmp.$(OBJEXT)
+test_c_strcasecmp_LDADD = $(LDADD)
+test_c_strcasecmp_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_c_strncasecmp_SOURCES = test-c-strncasecmp.c
+test_c_strncasecmp_OBJECTS = test-c-strncasecmp.$(OBJEXT)
+test_c_strncasecmp_LDADD = $(LDADD)
+test_c_strncasecmp_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_canonicalize_lgpl_SOURCES = test-canonicalize-lgpl.c
+test_canonicalize_lgpl_OBJECTS = test-canonicalize-lgpl.$(OBJEXT)
+test_canonicalize_lgpl_LDADD = $(LDADD)
+test_canonicalize_lgpl_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_cloexec_SOURCES = test-cloexec.c
+test_cloexec_OBJECTS = test-cloexec.$(OBJEXT)
+test_cloexec_LDADD = $(LDADD)
+test_cloexec_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_closein_SOURCES = test-closein.c
+test_closein_OBJECTS = test-closein.$(OBJEXT)
+test_closein_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_dirname_SOURCES = test-dirname.c
+test_dirname_OBJECTS = test-dirname.$(OBJEXT)
+test_dirname_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_dup_safer_SOURCES = test-dup-safer.c
+test_dup_safer_OBJECTS = test-dup-safer.$(OBJEXT)
+test_dup_safer_LDADD = $(LDADD)
+test_dup_safer_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_dup2_SOURCES = test-dup2.c
+test_dup2_OBJECTS = test-dup2.$(OBJEXT)
+test_dup2_LDADD = $(LDADD)
+test_dup2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_environ_SOURCES = test-environ.c
+test_environ_OBJECTS = test-environ.$(OBJEXT)
+test_environ_LDADD = $(LDADD)
+test_environ_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_errno_SOURCES = test-errno.c
+test_errno_OBJECTS = test-errno.$(OBJEXT)
+test_errno_LDADD = $(LDADD)
+test_errno_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fcntl_SOURCES = test-fcntl.c
+test_fcntl_OBJECTS = test-fcntl.$(OBJEXT)
+test_fcntl_LDADD = $(LDADD)
+test_fcntl_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fcntl_h_SOURCES = test-fcntl-h.c
+test_fcntl_h_OBJECTS = test-fcntl-h.$(OBJEXT)
+test_fcntl_h_LDADD = $(LDADD)
+test_fcntl_h_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fflush_SOURCES = test-fflush.c
+test_fflush_OBJECTS = test-fflush.$(OBJEXT)
+test_fflush_LDADD = $(LDADD)
+test_fflush_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fflush2_SOURCES = test-fflush2.c
+test_fflush2_OBJECTS = test-fflush2.$(OBJEXT)
+test_fflush2_LDADD = $(LDADD)
+test_fflush2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_filenamecat_SOURCES = test-filenamecat.c
+test_filenamecat_OBJECTS = test-filenamecat.$(OBJEXT)
+test_filenamecat_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_fopen_SOURCES = test-fopen.c
+test_fopen_OBJECTS = test-fopen.$(OBJEXT)
+test_fopen_LDADD = $(LDADD)
+test_fopen_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fopen_safer_SOURCES = test-fopen-safer.c
+test_fopen_safer_OBJECTS = test-fopen-safer.$(OBJEXT)
+test_fopen_safer_LDADD = $(LDADD)
+test_fopen_safer_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_fpending_SOURCES = test-fpending.c
+test_fpending_OBJECTS = test-fpending.$(OBJEXT)
+test_fpending_LDADD = $(LDADD)
+test_fpending_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fpurge_SOURCES = test-fpurge.c
+test_fpurge_OBJECTS = test-fpurge.$(OBJEXT)
+test_fpurge_LDADD = $(LDADD)
+test_fpurge_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_freadahead_SOURCES = test-freadahead.c
+test_freadahead_OBJECTS = test-freadahead.$(OBJEXT)
+test_freadahead_LDADD = $(LDADD)
+test_freadahead_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_freading_SOURCES = test-freading.c
+test_freading_OBJECTS = test-freading.$(OBJEXT)
+test_freading_LDADD = $(LDADD)
+test_freading_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_freadptr_SOURCES = test-freadptr.c
+test_freadptr_OBJECTS = test-freadptr.$(OBJEXT)
+test_freadptr_LDADD = $(LDADD)
+test_freadptr_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_freadptr2_SOURCES = test-freadptr2.c
+test_freadptr2_OBJECTS = test-freadptr2.$(OBJEXT)
+test_freadptr2_LDADD = $(LDADD)
+test_freadptr2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_freadseek_SOURCES = test-freadseek.c
+test_freadseek_OBJECTS = test-freadseek.$(OBJEXT)
+test_freadseek_LDADD = $(LDADD)
+test_freadseek_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+am_test_frexp_nolibm_OBJECTS = test-frexp.$(OBJEXT)
+test_frexp_nolibm_OBJECTS = $(am_test_frexp_nolibm_OBJECTS)
+test_frexp_nolibm_LDADD = $(LDADD)
+test_frexp_nolibm_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+am_test_frexpl_nolibm_OBJECTS = test-frexpl.$(OBJEXT)
+test_frexpl_nolibm_OBJECTS = $(am_test_frexpl_nolibm_OBJECTS)
+test_frexpl_nolibm_LDADD = $(LDADD)
+test_frexpl_nolibm_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_fseeko_SOURCES = test-fseeko.c
+test_fseeko_OBJECTS = test-fseeko.$(OBJEXT)
+test_fseeko_LDADD = $(LDADD)
+test_fseeko_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_fseterr_SOURCES = test-fseterr.c
+test_fseterr_OBJECTS = test-fseterr.$(OBJEXT)
+test_fseterr_LDADD = $(LDADD)
+test_fseterr_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_ftello_SOURCES = test-ftello.c
+test_ftello_OBJECTS = test-ftello.$(OBJEXT)
+test_ftello_LDADD = $(LDADD)
+test_ftello_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_getdtablesize_SOURCES = test-getdtablesize.c
+test_getdtablesize_OBJECTS = test-getdtablesize.$(OBJEXT)
+test_getdtablesize_LDADD = $(LDADD)
+test_getdtablesize_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_gettimeofday_SOURCES = test-gettimeofday.c
+test_gettimeofday_OBJECTS = test-gettimeofday.$(OBJEXT)
+test_gettimeofday_LDADD = $(LDADD)
+test_gettimeofday_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_iconv_SOURCES = test-iconv.c
+test_iconv_OBJECTS = test-iconv.$(OBJEXT)
+test_iconv_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_inttypes_SOURCES = test-inttypes.c
+test_inttypes_OBJECTS = test-inttypes.$(OBJEXT)
+test_inttypes_LDADD = $(LDADD)
+test_inttypes_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_isnand_nolibm_SOURCES = test-isnand-nolibm.c
+test_isnand_nolibm_OBJECTS = test-isnand-nolibm.$(OBJEXT)
+test_isnand_nolibm_LDADD = $(LDADD)
+test_isnand_nolibm_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_isnanf_nolibm_SOURCES = test-isnanf-nolibm.c
+test_isnanf_nolibm_OBJECTS = test-isnanf-nolibm.$(OBJEXT)
+test_isnanf_nolibm_LDADD = $(LDADD)
+test_isnanf_nolibm_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_isnanl_nolibm_SOURCES = test-isnanl-nolibm.c
+test_isnanl_nolibm_OBJECTS = test-isnanl-nolibm.$(OBJEXT)
+test_isnanl_nolibm_LDADD = $(LDADD)
+test_isnanl_nolibm_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_langinfo_SOURCES = test-langinfo.c
+test_langinfo_OBJECTS = test-langinfo.$(OBJEXT)
+test_langinfo_LDADD = $(LDADD)
+test_langinfo_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_link_SOURCES = test-link.c
+test_link_OBJECTS = test-link.$(OBJEXT)
+test_link_LDADD = $(LDADD)
+test_link_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_linkedhash_list_SOURCES = test-linkedhash_list.c
+test_linkedhash_list_OBJECTS = test-linkedhash_list.$(OBJEXT)
+test_linkedhash_list_LDADD = $(LDADD)
+test_linkedhash_list_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_lseek_SOURCES = test-lseek.c
+test_lseek_OBJECTS = test-lseek.$(OBJEXT)
+test_lseek_LDADD = $(LDADD)
+test_lseek_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_lstat_SOURCES = test-lstat.c
+test_lstat_OBJECTS = test-lstat.$(OBJEXT)
+test_lstat_LDADD = $(LDADD)
+test_lstat_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_malloca_SOURCES = test-malloca.c
+test_malloca_OBJECTS = test-malloca.$(OBJEXT)
+test_malloca_LDADD = $(LDADD)
+test_malloca_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_math_SOURCES = test-math.c
+test_math_OBJECTS = test-math.$(OBJEXT)
+test_math_LDADD = $(LDADD)
+test_math_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbrtowc_SOURCES = test-mbrtowc.c
+test_mbrtowc_OBJECTS = test-mbrtowc.$(OBJEXT)
+test_mbrtowc_LDADD = $(LDADD)
+test_mbrtowc_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbsinit_SOURCES = test-mbsinit.c
+test_mbsinit_OBJECTS = test-mbsinit.$(OBJEXT)
+test_mbsinit_LDADD = $(LDADD)
+test_mbsinit_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbsstr1_SOURCES = test-mbsstr1.c
+test_mbsstr1_OBJECTS = test-mbsstr1.$(OBJEXT)
+test_mbsstr1_LDADD = $(LDADD)
+test_mbsstr1_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbsstr2_SOURCES = test-mbsstr2.c
+test_mbsstr2_OBJECTS = test-mbsstr2.$(OBJEXT)
+test_mbsstr2_LDADD = $(LDADD)
+test_mbsstr2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_mbsstr3_SOURCES = test-mbsstr3.c
+test_mbsstr3_OBJECTS = test-mbsstr3.$(OBJEXT)
+test_mbsstr3_LDADD = $(LDADD)
+test_mbsstr3_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_memchr_SOURCES = test-memchr.c
+test_memchr_OBJECTS = test-memchr.$(OBJEXT)
+test_memchr_LDADD = $(LDADD)
+test_memchr_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_memchr2_SOURCES = test-memchr2.c
+test_memchr2_OBJECTS = test-memchr2.$(OBJEXT)
+test_memchr2_LDADD = $(LDADD)
+test_memchr2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_memmem_SOURCES = test-memmem.c
+test_memmem_OBJECTS = test-memmem.$(OBJEXT)
+test_memmem_LDADD = $(LDADD)
+test_memmem_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_nl_langinfo_SOURCES = test-nl_langinfo.c
+test_nl_langinfo_OBJECTS = test-nl_langinfo.$(OBJEXT)
+test_nl_langinfo_LDADD = $(LDADD)
+test_nl_langinfo_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_obstack_printf_SOURCES = test-obstack-printf.c
+test_obstack_printf_OBJECTS = test-obstack-printf.$(OBJEXT)
+test_obstack_printf_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_open_SOURCES = test-open.c
+test_open_OBJECTS = test-open.$(OBJEXT)
+test_open_LDADD = $(LDADD)
+test_open_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_pipe_SOURCES = test-pipe.c
+test_pipe_OBJECTS = test-pipe.$(OBJEXT)
+test_pipe_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_pipe2_SOURCES = test-pipe2.c
+test_pipe2_OBJECTS = test-pipe2.$(OBJEXT)
+test_pipe2_LDADD = $(LDADD)
+test_pipe2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_posix_spawn1_SOURCES = test-posix_spawn1.c
+test_posix_spawn1_OBJECTS = test-posix_spawn1.$(OBJEXT)
+test_posix_spawn1_LDADD = $(LDADD)
+test_posix_spawn1_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_posix_spawn2_SOURCES = test-posix_spawn2.c
+test_posix_spawn2_OBJECTS = test-posix_spawn2.$(OBJEXT)
+test_posix_spawn2_LDADD = $(LDADD)
+test_posix_spawn2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_printf_frexp_SOURCES = test-printf-frexp.c
+test_printf_frexp_OBJECTS = test-printf-frexp.$(OBJEXT)
+test_printf_frexp_LDADD = $(LDADD)
+test_printf_frexp_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_printf_frexpl_SOURCES = test-printf-frexpl.c
+test_printf_frexpl_OBJECTS = test-printf-frexpl.$(OBJEXT)
+test_printf_frexpl_LDADD = $(LDADD)
+test_printf_frexpl_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_quotearg_SOURCES = test-quotearg.c
+test_quotearg_OBJECTS = test-quotearg.$(OBJEXT)
+test_quotearg_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_rawmemchr_SOURCES = test-rawmemchr.c
+test_rawmemchr_OBJECTS = test-rawmemchr.$(OBJEXT)
+test_rawmemchr_LDADD = $(LDADD)
+test_rawmemchr_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_readlink_SOURCES = test-readlink.c
+test_readlink_OBJECTS = test-readlink.$(OBJEXT)
+test_readlink_LDADD = $(LDADD)
+test_readlink_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_rename_SOURCES = test-rename.c
+test_rename_OBJECTS = test-rename.$(OBJEXT)
+test_rename_LDADD = $(LDADD)
+test_rename_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_rmdir_SOURCES = test-rmdir.c
+test_rmdir_OBJECTS = test-rmdir.$(OBJEXT)
+test_rmdir_LDADD = $(LDADD)
+test_rmdir_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sched_SOURCES = test-sched.c
+test_sched_OBJECTS = test-sched.$(OBJEXT)
+test_sched_LDADD = $(LDADD)
+test_sched_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_setenv_SOURCES = test-setenv.c
+test_setenv_OBJECTS = test-setenv.$(OBJEXT)
+test_setenv_LDADD = $(LDADD)
+test_setenv_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sigaction_SOURCES = test-sigaction.c
+test_sigaction_OBJECTS = test-sigaction.$(OBJEXT)
+test_sigaction_LDADD = $(LDADD)
+test_sigaction_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_signal_SOURCES = test-signal.c
+test_signal_OBJECTS = test-signal.$(OBJEXT)
+test_signal_LDADD = $(LDADD)
+test_signal_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_signbit_SOURCES = test-signbit.c
+test_signbit_OBJECTS = test-signbit.$(OBJEXT)
+test_signbit_LDADD = $(LDADD)
+test_signbit_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_snprintf_SOURCES = test-snprintf.c
+test_snprintf_OBJECTS = test-snprintf.$(OBJEXT)
+test_snprintf_LDADD = $(LDADD)
+test_snprintf_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_snprintf_posix_SOURCES = test-snprintf-posix.c
+test_snprintf_posix_OBJECTS = test-snprintf-posix.$(OBJEXT)
+test_snprintf_posix_LDADD = $(LDADD)
+test_snprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_spawn_SOURCES = test-spawn.c
+test_spawn_OBJECTS = test-spawn.$(OBJEXT)
+test_spawn_LDADD = $(LDADD)
+test_spawn_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sprintf_posix_SOURCES = test-sprintf-posix.c
+test_sprintf_posix_OBJECTS = test-sprintf-posix.$(OBJEXT)
+test_sprintf_posix_LDADD = $(LDADD)
+test_sprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_stat_SOURCES = test-stat.c
+test_stat_OBJECTS = test-stat.$(OBJEXT)
+test_stat_LDADD = $(LDADD)
+test_stat_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdbool_SOURCES = test-stdbool.c
+test_stdbool_OBJECTS = test-stdbool.$(OBJEXT)
+test_stdbool_LDADD = $(LDADD)
+test_stdbool_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stddef_SOURCES = test-stddef.c
+test_stddef_OBJECTS = test-stddef.$(OBJEXT)
+test_stddef_LDADD = $(LDADD)
+test_stddef_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdint_SOURCES = test-stdint.c
+test_stdint_OBJECTS = test-stdint.$(OBJEXT)
+test_stdint_LDADD = $(LDADD)
+test_stdint_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdio_SOURCES = test-stdio.c
+test_stdio_OBJECTS = test-stdio.$(OBJEXT)
+test_stdio_LDADD = $(LDADD)
+test_stdio_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_stdlib_SOURCES = test-stdlib.c
+test_stdlib_OBJECTS = test-stdlib.$(OBJEXT)
+test_stdlib_LDADD = $(LDADD)
+test_stdlib_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_strchrnul_SOURCES = test-strchrnul.c
+test_strchrnul_OBJECTS = test-strchrnul.$(OBJEXT)
+test_strchrnul_LDADD = $(LDADD)
+test_strchrnul_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_strerror_SOURCES = test-strerror.c
+test_strerror_OBJECTS = test-strerror.$(OBJEXT)
+test_strerror_LDADD = $(LDADD)
+test_strerror_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_striconv_SOURCES = test-striconv.c
+test_striconv_OBJECTS = test-striconv.$(OBJEXT)
+test_striconv_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_string_SOURCES = test-string.c
+test_string_OBJECTS = test-string.$(OBJEXT)
+test_string_LDADD = $(LDADD)
+test_string_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_strtod_SOURCES = test-strtod.c
+test_strtod_OBJECTS = test-strtod.$(OBJEXT)
+test_strtod_LDADD = $(LDADD)
+test_strtod_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_symlink_SOURCES = test-symlink.c
+test_symlink_OBJECTS = test-symlink.$(OBJEXT)
+test_symlink_LDADD = $(LDADD)
+test_symlink_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_stat_SOURCES = test-sys_stat.c
+test_sys_stat_OBJECTS = test-sys_stat.$(OBJEXT)
+test_sys_stat_LDADD = $(LDADD)
+test_sys_stat_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_time_SOURCES = test-sys_time.c
+test_sys_time_OBJECTS = test-sys_time.$(OBJEXT)
+test_sys_time_LDADD = $(LDADD)
+test_sys_time_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_sys_wait_SOURCES = test-sys_wait.c
+test_sys_wait_OBJECTS = test-sys_wait.$(OBJEXT)
+test_sys_wait_LDADD = $(LDADD)
+test_sys_wait_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_time_SOURCES = test-time.c
+test_time_OBJECTS = test-time.$(OBJEXT)
+test_time_LDADD = $(LDADD)
+test_time_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+am__dirstamp = $(am__leading_dot)dirstamp
+am_test_uc_width_OBJECTS = uniwidth/test-uc_width.$(OBJEXT)
+test_uc_width_OBJECTS = $(am_test_uc_width_OBJECTS)
+test_uc_width_LDADD = $(LDADD)
+test_uc_width_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+am_test_uc_width2_OBJECTS = uniwidth/test-uc_width2.$(OBJEXT)
+test_uc_width2_OBJECTS = $(am_test_uc_width2_OBJECTS)
+test_uc_width2_LDADD = $(LDADD)
+test_uc_width2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_unistd_SOURCES = test-unistd.c
+test_unistd_OBJECTS = test-unistd.$(OBJEXT)
+test_unistd_LDADD = $(LDADD)
+test_unistd_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_unsetenv_SOURCES = test-unsetenv.c
+test_unsetenv_OBJECTS = test-unsetenv.$(OBJEXT)
+test_unsetenv_LDADD = $(LDADD)
+test_unsetenv_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_vasnprintf_SOURCES = test-vasnprintf.c
+test_vasnprintf_OBJECTS = test-vasnprintf.$(OBJEXT)
+test_vasnprintf_LDADD = $(LDADD)
+test_vasnprintf_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vasnprintf_posix_SOURCES = test-vasnprintf-posix.c
+test_vasnprintf_posix_OBJECTS = test-vasnprintf-posix.$(OBJEXT)
+test_vasnprintf_posix_LDADD = $(LDADD)
+test_vasnprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vasnprintf_posix2_SOURCES = test-vasnprintf-posix2.c
+test_vasnprintf_posix2_OBJECTS = test-vasnprintf-posix2.$(OBJEXT)
+test_vasnprintf_posix2_LDADD = $(LDADD)
+test_vasnprintf_posix2_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vasprintf_SOURCES = test-vasprintf.c
+test_vasprintf_OBJECTS = test-vasprintf.$(OBJEXT)
+test_vasprintf_LDADD = $(LDADD)
+test_vasprintf_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vasprintf_posix_SOURCES = test-vasprintf-posix.c
+test_vasprintf_posix_OBJECTS = test-vasprintf-posix.$(OBJEXT)
+test_vasprintf_posix_LDADD = $(LDADD)
+test_vasprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vfprintf_posix_SOURCES = test-vfprintf-posix.c
+test_vfprintf_posix_OBJECTS = test-vfprintf-posix.$(OBJEXT)
+test_vfprintf_posix_LDADD = $(LDADD)
+test_vfprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_vprintf_posix_SOURCES = test-vprintf-posix.c
+test_vprintf_posix_OBJECTS = test-vprintf-posix.$(OBJEXT)
+test_vprintf_posix_LDADD = $(LDADD)
+test_vprintf_posix_DEPENDENCIES = libtests.a ../../gnu/libgnu.la \
+ libtests.a $(am__DEPENDENCIES_1)
+test_wchar_SOURCES = test-wchar.c
+test_wchar_OBJECTS = test-wchar.$(OBJEXT)
+test_wchar_LDADD = $(LDADD)
+test_wchar_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wcrtomb_SOURCES = test-wcrtomb.c
+test_wcrtomb_OBJECTS = test-wcrtomb.$(OBJEXT)
+test_wcrtomb_LDADD = $(LDADD)
+test_wcrtomb_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wctype_SOURCES = test-wctype.c
+test_wctype_OBJECTS = test-wctype.$(OBJEXT)
+test_wctype_LDADD = $(LDADD)
+test_wctype_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_wcwidth_SOURCES = test-wcwidth.c
+test_wcwidth_OBJECTS = test-wcwidth.$(OBJEXT)
+test_wcwidth_LDADD = $(LDADD)
+test_wcwidth_DEPENDENCIES = libtests.a ../../gnu/libgnu.la libtests.a \
+ $(am__DEPENDENCIES_1)
+test_xalloc_die_SOURCES = test-xalloc-die.c
+test_xalloc_die_OBJECTS = test-xalloc-die.$(OBJEXT)
+test_xalloc_die_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xfprintf_posix_SOURCES = test-xfprintf-posix.c
+test_xfprintf_posix_OBJECTS = test-xfprintf-posix.$(OBJEXT)
+test_xfprintf_posix_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xmemdup0_SOURCES = test-xmemdup0.c
+test_xmemdup0_OBJECTS = test-xmemdup0.$(OBJEXT)
+test_xmemdup0_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xprintf_posix_SOURCES = test-xprintf-posix.c
+test_xprintf_posix_OBJECTS = test-xprintf-posix.$(OBJEXT)
+test_xprintf_posix_DEPENDENCIES = $(am__DEPENDENCIES_2)
+test_xvasprintf_SOURCES = test-xvasprintf.c
+test_xvasprintf_OBJECTS = test-xvasprintf.$(OBJEXT)
+test_xvasprintf_DEPENDENCIES = $(am__DEPENDENCIES_2)
+DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/gnu
+depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
+am__depfiles_maybe = depfiles
+am__mv = mv -f
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
+ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
+ $(AM_CFLAGS) $(CFLAGS)
+AM_V_CC = $(am__v_CC_$(V))
+am__v_CC_ = $(am__v_CC_$(AM_DEFAULT_VERBOSITY))
+am__v_CC_0 = @echo " CC " $@;
+CCLD = $(CC)
+LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
+ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
+ $(AM_LDFLAGS) $(LDFLAGS) -o $@
+AM_V_CCLD = $(am__v_CCLD_$(V))
+am__v_CCLD_ = $(am__v_CCLD_$(AM_DEFAULT_VERBOSITY))
+am__v_CCLD_0 = @echo " CCLD " $@;
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo " GEN " $@;
+SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
+ test-alloca-opt.c test-array_list.c test-array_oset.c \
+ test-avltree_oset.c test-binary-io.c test-bitrotate.c \
+ test-btowc.c test-c-ctype.c test-c-strcasecmp.c \
+ test-c-strncasecmp.c test-canonicalize-lgpl.c test-cloexec.c \
+ test-closein.c test-dirname.c test-dup-safer.c test-dup2.c \
+ test-environ.c test-errno.c test-fcntl.c test-fcntl-h.c \
+ test-fflush.c test-fflush2.c test-filenamecat.c test-fopen.c \
+ test-fopen-safer.c test-fpending.c test-fpurge.c \
+ test-freadahead.c test-freading.c test-freadptr.c \
+ test-freadptr2.c test-freadseek.c $(test_frexp_nolibm_SOURCES) \
+ $(test_frexpl_nolibm_SOURCES) test-fseeko.c test-fseterr.c \
+ test-ftello.c test-getdtablesize.c test-gettimeofday.c \
+ test-iconv.c test-inttypes.c test-isnand-nolibm.c \
+ test-isnanf-nolibm.c test-isnanl-nolibm.c test-langinfo.c \
+ test-link.c test-linkedhash_list.c test-lseek.c test-lstat.c \
+ test-malloca.c test-math.c test-mbrtowc.c test-mbsinit.c \
+ test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
+ test-memchr2.c test-memmem.c test-nl_langinfo.c \
+ test-obstack-printf.c test-open.c test-pipe.c test-pipe2.c \
+ test-posix_spawn1.c test-posix_spawn2.c test-printf-frexp.c \
+ test-printf-frexpl.c test-quotearg.c test-rawmemchr.c \
+ test-readlink.c test-rename.c test-rmdir.c test-sched.c \
+ test-setenv.c test-sigaction.c test-signal.c test-signbit.c \
+ test-snprintf.c test-snprintf-posix.c test-spawn.c \
+ test-sprintf-posix.c test-stat.c test-stdbool.c test-stddef.c \
+ test-stdint.c test-stdio.c test-stdlib.c test-strchrnul.c \
+ test-strerror.c test-striconv.c test-string.c test-strtod.c \
+ test-symlink.c test-sys_stat.c test-sys_time.c test-sys_wait.c \
+ test-time.c $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
+ test-unistd.c test-unsetenv.c test-vasnprintf.c \
+ test-vasnprintf-posix.c test-vasnprintf-posix2.c \
+ test-vasprintf.c test-vasprintf-posix.c test-vfprintf-posix.c \
+ test-vprintf-posix.c test-wchar.c test-wcrtomb.c test-wctype.c \
+ test-wcwidth.c test-xalloc-die.c test-xfprintf-posix.c \
+ test-xmemdup0.c test-xprintf-posix.c test-xvasprintf.c
+DIST_SOURCES = $(libtests_a_SOURCES) $(EXTRA_libtests_a_SOURCES) \
+ test-alloca-opt.c test-array_list.c test-array_oset.c \
+ test-avltree_oset.c test-binary-io.c test-bitrotate.c \
+ test-btowc.c test-c-ctype.c test-c-strcasecmp.c \
+ test-c-strncasecmp.c test-canonicalize-lgpl.c test-cloexec.c \
+ test-closein.c test-dirname.c test-dup-safer.c test-dup2.c \
+ test-environ.c test-errno.c test-fcntl.c test-fcntl-h.c \
+ test-fflush.c test-fflush2.c test-filenamecat.c test-fopen.c \
+ test-fopen-safer.c test-fpending.c test-fpurge.c \
+ test-freadahead.c test-freading.c test-freadptr.c \
+ test-freadptr2.c test-freadseek.c $(test_frexp_nolibm_SOURCES) \
+ $(test_frexpl_nolibm_SOURCES) test-fseeko.c test-fseterr.c \
+ test-ftello.c test-getdtablesize.c test-gettimeofday.c \
+ test-iconv.c test-inttypes.c test-isnand-nolibm.c \
+ test-isnanf-nolibm.c test-isnanl-nolibm.c test-langinfo.c \
+ test-link.c test-linkedhash_list.c test-lseek.c test-lstat.c \
+ test-malloca.c test-math.c test-mbrtowc.c test-mbsinit.c \
+ test-mbsstr1.c test-mbsstr2.c test-mbsstr3.c test-memchr.c \
+ test-memchr2.c test-memmem.c test-nl_langinfo.c \
+ test-obstack-printf.c test-open.c test-pipe.c test-pipe2.c \
+ test-posix_spawn1.c test-posix_spawn2.c test-printf-frexp.c \
+ test-printf-frexpl.c test-quotearg.c test-rawmemchr.c \
+ test-readlink.c test-rename.c test-rmdir.c test-sched.c \
+ test-setenv.c test-sigaction.c test-signal.c test-signbit.c \
+ test-snprintf.c test-snprintf-posix.c test-spawn.c \
+ test-sprintf-posix.c test-stat.c test-stdbool.c test-stddef.c \
+ test-stdint.c test-stdio.c test-stdlib.c test-strchrnul.c \
+ test-strerror.c test-striconv.c test-string.c test-strtod.c \
+ test-symlink.c test-sys_stat.c test-sys_time.c test-sys_wait.c \
+ test-time.c $(test_uc_width_SOURCES) $(test_uc_width2_SOURCES) \
+ test-unistd.c test-unsetenv.c test-vasnprintf.c \
+ test-vasnprintf-posix.c test-vasnprintf-posix2.c \
+ test-vasprintf.c test-vasprintf-posix.c test-vfprintf-posix.c \
+ test-vprintf-posix.c test-wchar.c test-wcrtomb.c test-wctype.c \
+ test-wcwidth.c test-xalloc-die.c test-xfprintf-posix.c \
+ test-xmemdup0.c test-xprintf-posix.c test-xvasprintf.c
+RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
+ html-recursive info-recursive install-data-recursive \
+ install-dvi-recursive install-exec-recursive \
+ install-html-recursive install-info-recursive \
+ install-pdf-recursive install-ps-recursive install-recursive \
+ installcheck-recursive installdirs-recursive pdf-recursive \
+ ps-recursive uninstall-recursive
+HEADERS = $(noinst_HEADERS)
+RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
+ distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+ check check-html recheck recheck-html distdir
+ETAGS = etags
+CTAGS = ctags
+# If stdout is a non-dumb tty, use colors. If test -t is not supported,
+# then this fails; a conservative approach. Of course do not redirect
+# stdout here, just stderr.
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=; \
+test "X$(AM_COLOR_TESTS)" != Xno \
+&& test "X$$TERM" != Xdumb \
+&& { test "X$(AM_COLOR_TESTS)" = Xalways || test -t 1 2>/dev/null; } \
+&& { \
+ red=''; \
+ grn=''; \
+ lgn=''; \
+ blu=''; \
+ std=''; \
+}
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+ *) f=$$p;; \
+ esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+ for p in $$list; do echo "$$p $$p"; done | \
+ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+ if (++n[$$2] == $(am__install_max)) \
+ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+ END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+# Restructured Text title and section.
+am__rst_title = sed 's/.*/ & /;h;s/./=/g;p;x;p;g;p;s/.*//'
+am__rst_section = sed 'p;s/./=/g;p;g'
+# Put stdin (possibly several lines separated by ". ") in a box.
+am__text_box = $(AWK) '{ \
+ n = split($$0, lines, "\\. "); max = 0; \
+ for (i = 1; i <= n; ++i) \
+ if (max < length(lines[i])) \
+ max = length(lines[i]); \
+ for (i = 0; i < max; ++i) line = line "="; \
+ print line; \
+ for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
+ print line; \
+}'
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL). This contradicts POSIX. Work around the problem
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# To be inserted before the command running the test. Creates the
+# directory for the log if needed. Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log, and passes
+# TESTS_ENVIRONMENT. Save and restore TERM around use of
+# TESTS_ENVIRONMENT, in case that unsets it.
+am__check_pre = \
+$(am__sh_e_setup); \
+$(am__vpath_adj_setup) $(am__vpath_adj) \
+srcdir=$(srcdir); export srcdir; \
+rm -f $@-t; \
+trap 'st=$$?; rm -f '\''$(abs_builddir)/$@-t'\''; (exit $$st); exit $$st' \
+ 1 2 13 15; \
+am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`; \
+test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?; \
+if test -f "./$$f"; then dir=./; \
+elif test -f "$$f"; then dir=; \
+else dir="$(srcdir)/"; fi; \
+tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM; \
+$(TESTS_ENVIRONMENT)
+RECHECK_LOGS = $(TEST_LOGS)
+TEST_SUITE_LOG = test-suite.log
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+TEST_EXTENSIONS = @EXEEXT@ .test
+LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+am__test_logs1 = $(TESTS:=.log)
+am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log)
+TEST_LOGS = $(am__test_logs2:.test.log=.log)
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+ $(TEST_LOG_FLAGS)
+TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
+DIST_SUBDIRS = $(SUBDIRS)
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+am__relativize = \
+ dir0=`pwd`; \
+ sed_first='s,^\([^/]*\)/.*$$,\1,'; \
+ sed_rest='s,^[^/]*/*,,'; \
+ sed_last='s,^.*/\([^/]*\)$$,\1,'; \
+ sed_butlast='s,/*[^/]*$$,,'; \
+ while test -n "$$dir1"; do \
+ first=`echo "$$dir1" | sed -e "$$sed_first"`; \
+ if test "$$first" != "."; then \
+ if test "$$first" = ".."; then \
+ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
+ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
+ else \
+ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
+ if test "$$first2" = "$$first"; then \
+ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
+ else \
+ dir2="../$$dir2"; \
+ fi; \
+ dir0="$$dir0"/"$$first"; \
+ fi; \
+ fi; \
+ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
+ done; \
+ reldir="$$dir2"
+ACLOCAL = @ACLOCAL@
+ALLOCA = @ALLOCA@
+ALLOCA_H = @ALLOCA_H@
+AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
+APPLE_UNIVERSAL_BUILD = @APPLE_UNIVERSAL_BUILD@
+AR = @AR@
+ARGZ_H = @ARGZ_H@
+AS = @AS@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+BITSIZEOF_PTRDIFF_T = @BITSIZEOF_PTRDIFF_T@
+BITSIZEOF_SIG_ATOMIC_T = @BITSIZEOF_SIG_ATOMIC_T@
+BITSIZEOF_SIZE_T = @BITSIZEOF_SIZE_T@
+BITSIZEOF_WCHAR_T = @BITSIZEOF_WCHAR_T@
+BITSIZEOF_WINT_T = @BITSIZEOF_WINT_T@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CONFIG_INCLUDE = @CONFIG_INCLUDE@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DLLTOOL = @DLLTOOL@
+DLPREOPEN = @DLPREOPEN@
+DSYMUTIL = @DSYMUTIL@
+DUMPBIN = @DUMPBIN@
+DYNAMIC_MODULES = @DYNAMIC_MODULES@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EMULTIHOP_HIDDEN = @EMULTIHOP_HIDDEN@
+EMULTIHOP_VALUE = @EMULTIHOP_VALUE@
+ENOLINK_HIDDEN = @ENOLINK_HIDDEN@
+ENOLINK_VALUE = @ENOLINK_VALUE@
+EOVERFLOW_HIDDEN = @EOVERFLOW_HIDDEN@
+EOVERFLOW_VALUE = @EOVERFLOW_VALUE@
+ERRNO_H = @ERRNO_H@
+ERROR_H = @ERROR_H@
+EXEEXT = @EXEEXT@
+FGREP = @FGREP@
+FLOAT_H = @FLOAT_H@
+GETOPT_H = @GETOPT_H@
+GETTEXT_H = @GETTEXT_H@
+GETTEXT_MACRO_VERSION = @GETTEXT_MACRO_VERSION@
+GLIBC21 = @GLIBC21@
+GMSGFMT = @GMSGFMT@
+GMSGFMT_015 = @GMSGFMT_015@
+GNULIB_ACOSL = @GNULIB_ACOSL@
+GNULIB_ASINL = @GNULIB_ASINL@
+GNULIB_ATANL = @GNULIB_ATANL@
+GNULIB_ATOLL = @GNULIB_ATOLL@
+GNULIB_BTOWC = @GNULIB_BTOWC@
+GNULIB_CALLOC_POSIX = @GNULIB_CALLOC_POSIX@
+GNULIB_CANONICALIZE_FILE_NAME = @GNULIB_CANONICALIZE_FILE_NAME@
+GNULIB_CEILF = @GNULIB_CEILF@
+GNULIB_CEILL = @GNULIB_CEILL@
+GNULIB_CHOWN = @GNULIB_CHOWN@
+GNULIB_CLOSE = @GNULIB_CLOSE@
+GNULIB_COSL = @GNULIB_COSL@
+GNULIB_DPRINTF = @GNULIB_DPRINTF@
+GNULIB_DUP2 = @GNULIB_DUP2@
+GNULIB_DUP3 = @GNULIB_DUP3@
+GNULIB_ENVIRON = @GNULIB_ENVIRON@
+GNULIB_EUIDACCESS = @GNULIB_EUIDACCESS@
+GNULIB_EXPL = @GNULIB_EXPL@
+GNULIB_FACCESSAT = @GNULIB_FACCESSAT@
+GNULIB_FCHDIR = @GNULIB_FCHDIR@
+GNULIB_FCHMODAT = @GNULIB_FCHMODAT@
+GNULIB_FCHOWNAT = @GNULIB_FCHOWNAT@
+GNULIB_FCLOSE = @GNULIB_FCLOSE@
+GNULIB_FCNTL = @GNULIB_FCNTL@
+GNULIB_FFLUSH = @GNULIB_FFLUSH@
+GNULIB_FLOORF = @GNULIB_FLOORF@
+GNULIB_FLOORL = @GNULIB_FLOORL@
+GNULIB_FOPEN = @GNULIB_FOPEN@
+GNULIB_FPRINTF = @GNULIB_FPRINTF@
+GNULIB_FPRINTF_POSIX = @GNULIB_FPRINTF_POSIX@
+GNULIB_FPURGE = @GNULIB_FPURGE@
+GNULIB_FPUTC = @GNULIB_FPUTC@
+GNULIB_FPUTS = @GNULIB_FPUTS@
+GNULIB_FREOPEN = @GNULIB_FREOPEN@
+GNULIB_FREXP = @GNULIB_FREXP@
+GNULIB_FREXPL = @GNULIB_FREXPL@
+GNULIB_FSEEK = @GNULIB_FSEEK@
+GNULIB_FSEEKO = @GNULIB_FSEEKO@
+GNULIB_FSTATAT = @GNULIB_FSTATAT@
+GNULIB_FSYNC = @GNULIB_FSYNC@
+GNULIB_FTELL = @GNULIB_FTELL@
+GNULIB_FTELLO = @GNULIB_FTELLO@
+GNULIB_FTRUNCATE = @GNULIB_FTRUNCATE@
+GNULIB_FUTIMENS = @GNULIB_FUTIMENS@
+GNULIB_FWRITE = @GNULIB_FWRITE@
+GNULIB_GETCWD = @GNULIB_GETCWD@
+GNULIB_GETDELIM = @GNULIB_GETDELIM@
+GNULIB_GETDOMAINNAME = @GNULIB_GETDOMAINNAME@
+GNULIB_GETDTABLESIZE = @GNULIB_GETDTABLESIZE@
+GNULIB_GETGROUPS = @GNULIB_GETGROUPS@
+GNULIB_GETHOSTNAME = @GNULIB_GETHOSTNAME@
+GNULIB_GETLINE = @GNULIB_GETLINE@
+GNULIB_GETLOADAVG = @GNULIB_GETLOADAVG@
+GNULIB_GETLOGIN = @GNULIB_GETLOGIN@
+GNULIB_GETLOGIN_R = @GNULIB_GETLOGIN_R@
+GNULIB_GETPAGESIZE = @GNULIB_GETPAGESIZE@
+GNULIB_GETSUBOPT = @GNULIB_GETSUBOPT@
+GNULIB_GETTIMEOFDAY = @GNULIB_GETTIMEOFDAY@
+GNULIB_GETUSERSHELL = @GNULIB_GETUSERSHELL@
+GNULIB_IMAXABS = @GNULIB_IMAXABS@
+GNULIB_IMAXDIV = @GNULIB_IMAXDIV@
+GNULIB_ISFINITE = @GNULIB_ISFINITE@
+GNULIB_ISINF = @GNULIB_ISINF@
+GNULIB_ISNAN = @GNULIB_ISNAN@
+GNULIB_ISNAND = @GNULIB_ISNAND@
+GNULIB_ISNANF = @GNULIB_ISNANF@
+GNULIB_ISNANL = @GNULIB_ISNANL@
+GNULIB_LCHMOD = @GNULIB_LCHMOD@
+GNULIB_LCHOWN = @GNULIB_LCHOWN@
+GNULIB_LDEXPL = @GNULIB_LDEXPL@
+GNULIB_LINK = @GNULIB_LINK@
+GNULIB_LINKAT = @GNULIB_LINKAT@
+GNULIB_LOGL = @GNULIB_LOGL@
+GNULIB_LSEEK = @GNULIB_LSEEK@
+GNULIB_LSTAT = @GNULIB_LSTAT@
+GNULIB_MALLOC_POSIX = @GNULIB_MALLOC_POSIX@
+GNULIB_MBRLEN = @GNULIB_MBRLEN@
+GNULIB_MBRTOWC = @GNULIB_MBRTOWC@
+GNULIB_MBSCASECMP = @GNULIB_MBSCASECMP@
+GNULIB_MBSCASESTR = @GNULIB_MBSCASESTR@
+GNULIB_MBSCHR = @GNULIB_MBSCHR@
+GNULIB_MBSCSPN = @GNULIB_MBSCSPN@
+GNULIB_MBSINIT = @GNULIB_MBSINIT@
+GNULIB_MBSLEN = @GNULIB_MBSLEN@
+GNULIB_MBSNCASECMP = @GNULIB_MBSNCASECMP@
+GNULIB_MBSNLEN = @GNULIB_MBSNLEN@
+GNULIB_MBSNRTOWCS = @GNULIB_MBSNRTOWCS@
+GNULIB_MBSPBRK = @GNULIB_MBSPBRK@
+GNULIB_MBSPCASECMP = @GNULIB_MBSPCASECMP@
+GNULIB_MBSRCHR = @GNULIB_MBSRCHR@
+GNULIB_MBSRTOWCS = @GNULIB_MBSRTOWCS@
+GNULIB_MBSSEP = @GNULIB_MBSSEP@
+GNULIB_MBSSPN = @GNULIB_MBSSPN@
+GNULIB_MBSSTR = @GNULIB_MBSSTR@
+GNULIB_MBSTOK_R = @GNULIB_MBSTOK_R@
+GNULIB_MEMCHR = @GNULIB_MEMCHR@
+GNULIB_MEMMEM = @GNULIB_MEMMEM@
+GNULIB_MEMPCPY = @GNULIB_MEMPCPY@
+GNULIB_MEMRCHR = @GNULIB_MEMRCHR@
+GNULIB_MKDIRAT = @GNULIB_MKDIRAT@
+GNULIB_MKDTEMP = @GNULIB_MKDTEMP@
+GNULIB_MKFIFO = @GNULIB_MKFIFO@
+GNULIB_MKFIFOAT = @GNULIB_MKFIFOAT@
+GNULIB_MKNOD = @GNULIB_MKNOD@
+GNULIB_MKNODAT = @GNULIB_MKNODAT@
+GNULIB_MKOSTEMP = @GNULIB_MKOSTEMP@
+GNULIB_MKOSTEMPS = @GNULIB_MKOSTEMPS@
+GNULIB_MKSTEMP = @GNULIB_MKSTEMP@
+GNULIB_MKSTEMPS = @GNULIB_MKSTEMPS@
+GNULIB_NL_LANGINFO = @GNULIB_NL_LANGINFO@
+GNULIB_OBSTACK_PRINTF = @GNULIB_OBSTACK_PRINTF@
+GNULIB_OBSTACK_PRINTF_POSIX = @GNULIB_OBSTACK_PRINTF_POSIX@
+GNULIB_OPEN = @GNULIB_OPEN@
+GNULIB_OPENAT = @GNULIB_OPENAT@
+GNULIB_PERROR = @GNULIB_PERROR@
+GNULIB_PIPE2 = @GNULIB_PIPE2@
+GNULIB_POPEN = @GNULIB_POPEN@
+GNULIB_POSIX_SPAWN = @GNULIB_POSIX_SPAWN@
+GNULIB_POSIX_SPAWNATTR_DESTROY = @GNULIB_POSIX_SPAWNATTR_DESTROY@
+GNULIB_POSIX_SPAWNATTR_GETFLAGS = @GNULIB_POSIX_SPAWNATTR_GETFLAGS@
+GNULIB_POSIX_SPAWNATTR_GETPGROUP = @GNULIB_POSIX_SPAWNATTR_GETPGROUP@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_GETSIGMASK = @GNULIB_POSIX_SPAWNATTR_GETSIGMASK@
+GNULIB_POSIX_SPAWNATTR_INIT = @GNULIB_POSIX_SPAWNATTR_INIT@
+GNULIB_POSIX_SPAWNATTR_SETFLAGS = @GNULIB_POSIX_SPAWNATTR_SETFLAGS@
+GNULIB_POSIX_SPAWNATTR_SETPGROUP = @GNULIB_POSIX_SPAWNATTR_SETPGROUP@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM@
+GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY = @GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY@
+GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT = @GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT@
+GNULIB_POSIX_SPAWNATTR_SETSIGMASK = @GNULIB_POSIX_SPAWNATTR_SETSIGMASK@
+GNULIB_POSIX_SPAWNP = @GNULIB_POSIX_SPAWNP@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY@
+GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT = @GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT@
+GNULIB_PREAD = @GNULIB_PREAD@
+GNULIB_PRINTF = @GNULIB_PRINTF@
+GNULIB_PRINTF_POSIX = @GNULIB_PRINTF_POSIX@
+GNULIB_PUTC = @GNULIB_PUTC@
+GNULIB_PUTCHAR = @GNULIB_PUTCHAR@
+GNULIB_PUTENV = @GNULIB_PUTENV@
+GNULIB_PUTS = @GNULIB_PUTS@
+GNULIB_RANDOM_R = @GNULIB_RANDOM_R@
+GNULIB_RAWMEMCHR = @GNULIB_RAWMEMCHR@
+GNULIB_READLINK = @GNULIB_READLINK@
+GNULIB_READLINKAT = @GNULIB_READLINKAT@
+GNULIB_REALLOC_POSIX = @GNULIB_REALLOC_POSIX@
+GNULIB_REALPATH = @GNULIB_REALPATH@
+GNULIB_REMOVE = @GNULIB_REMOVE@
+GNULIB_RENAME = @GNULIB_RENAME@
+GNULIB_RENAMEAT = @GNULIB_RENAMEAT@
+GNULIB_RMDIR = @GNULIB_RMDIR@
+GNULIB_ROUND = @GNULIB_ROUND@
+GNULIB_ROUNDF = @GNULIB_ROUNDF@
+GNULIB_ROUNDL = @GNULIB_ROUNDL@
+GNULIB_RPMATCH = @GNULIB_RPMATCH@
+GNULIB_SETENV = @GNULIB_SETENV@
+GNULIB_SIGACTION = @GNULIB_SIGACTION@
+GNULIB_SIGNAL_H_SIGPIPE = @GNULIB_SIGNAL_H_SIGPIPE@
+GNULIB_SIGNBIT = @GNULIB_SIGNBIT@
+GNULIB_SIGPROCMASK = @GNULIB_SIGPROCMASK@
+GNULIB_SINL = @GNULIB_SINL@
+GNULIB_SLEEP = @GNULIB_SLEEP@
+GNULIB_SNPRINTF = @GNULIB_SNPRINTF@
+GNULIB_SPRINTF_POSIX = @GNULIB_SPRINTF_POSIX@
+GNULIB_SQRTL = @GNULIB_SQRTL@
+GNULIB_STAT = @GNULIB_STAT@
+GNULIB_STDIO_H_SIGPIPE = @GNULIB_STDIO_H_SIGPIPE@
+GNULIB_STPCPY = @GNULIB_STPCPY@
+GNULIB_STPNCPY = @GNULIB_STPNCPY@
+GNULIB_STRCASESTR = @GNULIB_STRCASESTR@
+GNULIB_STRCHRNUL = @GNULIB_STRCHRNUL@
+GNULIB_STRDUP = @GNULIB_STRDUP@
+GNULIB_STRERROR = @GNULIB_STRERROR@
+GNULIB_STRNDUP = @GNULIB_STRNDUP@
+GNULIB_STRNLEN = @GNULIB_STRNLEN@
+GNULIB_STRPBRK = @GNULIB_STRPBRK@
+GNULIB_STRSEP = @GNULIB_STRSEP@
+GNULIB_STRSIGNAL = @GNULIB_STRSIGNAL@
+GNULIB_STRSTR = @GNULIB_STRSTR@
+GNULIB_STRTOD = @GNULIB_STRTOD@
+GNULIB_STRTOIMAX = @GNULIB_STRTOIMAX@
+GNULIB_STRTOK_R = @GNULIB_STRTOK_R@
+GNULIB_STRTOLL = @GNULIB_STRTOLL@
+GNULIB_STRTOULL = @GNULIB_STRTOULL@
+GNULIB_STRTOUMAX = @GNULIB_STRTOUMAX@
+GNULIB_STRVERSCMP = @GNULIB_STRVERSCMP@
+GNULIB_SYMLINK = @GNULIB_SYMLINK@
+GNULIB_SYMLINKAT = @GNULIB_SYMLINKAT@
+GNULIB_TANL = @GNULIB_TANL@
+GNULIB_TRUNC = @GNULIB_TRUNC@
+GNULIB_TRUNCF = @GNULIB_TRUNCF@
+GNULIB_TRUNCL = @GNULIB_TRUNCL@
+GNULIB_UNISTD_H_GETOPT = @GNULIB_UNISTD_H_GETOPT@
+GNULIB_UNISTD_H_SIGPIPE = @GNULIB_UNISTD_H_SIGPIPE@
+GNULIB_UNLINK = @GNULIB_UNLINK@
+GNULIB_UNLINKAT = @GNULIB_UNLINKAT@
+GNULIB_UNSETENV = @GNULIB_UNSETENV@
+GNULIB_USLEEP = @GNULIB_USLEEP@
+GNULIB_UTIMENSAT = @GNULIB_UTIMENSAT@
+GNULIB_VASPRINTF = @GNULIB_VASPRINTF@
+GNULIB_VDPRINTF = @GNULIB_VDPRINTF@
+GNULIB_VFPRINTF = @GNULIB_VFPRINTF@
+GNULIB_VFPRINTF_POSIX = @GNULIB_VFPRINTF_POSIX@
+GNULIB_VPRINTF = @GNULIB_VPRINTF@
+GNULIB_VPRINTF_POSIX = @GNULIB_VPRINTF_POSIX@
+GNULIB_VSNPRINTF = @GNULIB_VSNPRINTF@
+GNULIB_VSPRINTF_POSIX = @GNULIB_VSPRINTF_POSIX@
+GNULIB_WCRTOMB = @GNULIB_WCRTOMB@
+GNULIB_WCSNRTOMBS = @GNULIB_WCSNRTOMBS@
+GNULIB_WCSRTOMBS = @GNULIB_WCSRTOMBS@
+GNULIB_WCTOB = @GNULIB_WCTOB@
+GNULIB_WCWIDTH = @GNULIB_WCWIDTH@
+GNULIB_WRITE = @GNULIB_WRITE@
+GREP = @GREP@
+HAVE_ACOSL = @HAVE_ACOSL@
+HAVE_ASINL = @HAVE_ASINL@
+HAVE_ATANL = @HAVE_ATANL@
+HAVE_ATOLL = @HAVE_ATOLL@
+HAVE_BTOWC = @HAVE_BTOWC@
+HAVE_CALLOC_POSIX = @HAVE_CALLOC_POSIX@
+HAVE_CANONICALIZE_FILE_NAME = @HAVE_CANONICALIZE_FILE_NAME@
+HAVE_CHOWN = @HAVE_CHOWN@
+HAVE_COSL = @HAVE_COSL@
+HAVE_DECL_ACOSL = @HAVE_DECL_ACOSL@
+HAVE_DECL_ASINL = @HAVE_DECL_ASINL@
+HAVE_DECL_ATANL = @HAVE_DECL_ATANL@
+HAVE_DECL_COSL = @HAVE_DECL_COSL@
+HAVE_DECL_ENVIRON = @HAVE_DECL_ENVIRON@
+HAVE_DECL_EXPL = @HAVE_DECL_EXPL@
+HAVE_DECL_FPURGE = @HAVE_DECL_FPURGE@
+HAVE_DECL_FREXPL = @HAVE_DECL_FREXPL@
+HAVE_DECL_GETDELIM = @HAVE_DECL_GETDELIM@
+HAVE_DECL_GETLINE = @HAVE_DECL_GETLINE@
+HAVE_DECL_GETLOADAVG = @HAVE_DECL_GETLOADAVG@
+HAVE_DECL_GETLOGIN_R = @HAVE_DECL_GETLOGIN_R@
+HAVE_DECL_IMAXABS = @HAVE_DECL_IMAXABS@
+HAVE_DECL_IMAXDIV = @HAVE_DECL_IMAXDIV@
+HAVE_DECL_LDEXPL = @HAVE_DECL_LDEXPL@
+HAVE_DECL_LOGL = @HAVE_DECL_LOGL@
+HAVE_DECL_MEMMEM = @HAVE_DECL_MEMMEM@
+HAVE_DECL_MEMRCHR = @HAVE_DECL_MEMRCHR@
+HAVE_DECL_OBSTACK_PRINTF = @HAVE_DECL_OBSTACK_PRINTF@
+HAVE_DECL_SINL = @HAVE_DECL_SINL@
+HAVE_DECL_SNPRINTF = @HAVE_DECL_SNPRINTF@
+HAVE_DECL_SQRTL = @HAVE_DECL_SQRTL@
+HAVE_DECL_STRDUP = @HAVE_DECL_STRDUP@
+HAVE_DECL_STRERROR = @HAVE_DECL_STRERROR@
+HAVE_DECL_STRNDUP = @HAVE_DECL_STRNDUP@
+HAVE_DECL_STRNLEN = @HAVE_DECL_STRNLEN@
+HAVE_DECL_STRSIGNAL = @HAVE_DECL_STRSIGNAL@
+HAVE_DECL_STRTOIMAX = @HAVE_DECL_STRTOIMAX@
+HAVE_DECL_STRTOK_R = @HAVE_DECL_STRTOK_R@
+HAVE_DECL_STRTOUMAX = @HAVE_DECL_STRTOUMAX@
+HAVE_DECL_TANL = @HAVE_DECL_TANL@
+HAVE_DECL_TRUNC = @HAVE_DECL_TRUNC@
+HAVE_DECL_TRUNCF = @HAVE_DECL_TRUNCF@
+HAVE_DECL_VSNPRINTF = @HAVE_DECL_VSNPRINTF@
+HAVE_DECL_WCTOB = @HAVE_DECL_WCTOB@
+HAVE_DECL_WCWIDTH = @HAVE_DECL_WCWIDTH@
+HAVE_DPRINTF = @HAVE_DPRINTF@
+HAVE_DUP2 = @HAVE_DUP2@
+HAVE_DUP3 = @HAVE_DUP3@
+HAVE_EUIDACCESS = @HAVE_EUIDACCESS@
+HAVE_EXPL = @HAVE_EXPL@
+HAVE_FACCESSAT = @HAVE_FACCESSAT@
+HAVE_FCHMODAT = @HAVE_FCHMODAT@
+HAVE_FCHOWNAT = @HAVE_FCHOWNAT@
+HAVE_FCNTL = @HAVE_FCNTL@
+HAVE_FSTATAT = @HAVE_FSTATAT@
+HAVE_FSYNC = @HAVE_FSYNC@
+HAVE_FTRUNCATE = @HAVE_FTRUNCATE@
+HAVE_FUTIMENS = @HAVE_FUTIMENS@
+HAVE_GETDOMAINNAME = @HAVE_GETDOMAINNAME@
+HAVE_GETDTABLESIZE = @HAVE_GETDTABLESIZE@
+HAVE_GETGROUPS = @HAVE_GETGROUPS@
+HAVE_GETHOSTNAME = @HAVE_GETHOSTNAME@
+HAVE_GETLOGIN = @HAVE_GETLOGIN@
+HAVE_GETOPT_H = @HAVE_GETOPT_H@
+HAVE_GETPAGESIZE = @HAVE_GETPAGESIZE@
+HAVE_GETSUBOPT = @HAVE_GETSUBOPT@
+HAVE_GETTIMEOFDAY = @HAVE_GETTIMEOFDAY@
+HAVE_GETUSERSHELL = @HAVE_GETUSERSHELL@
+HAVE_INTTYPES_H = @HAVE_INTTYPES_H@
+HAVE_ISNAND = @HAVE_ISNAND@
+HAVE_ISNANF = @HAVE_ISNANF@
+HAVE_ISNANL = @HAVE_ISNANL@
+HAVE_ISWCNTRL = @HAVE_ISWCNTRL@
+HAVE_LANGINFO_CODESET = @HAVE_LANGINFO_CODESET@
+HAVE_LANGINFO_ERA = @HAVE_LANGINFO_ERA@
+HAVE_LANGINFO_H = @HAVE_LANGINFO_H@
+HAVE_LCHMOD = @HAVE_LCHMOD@
+HAVE_LCHOWN = @HAVE_LCHOWN@
+HAVE_LINK = @HAVE_LINK@
+HAVE_LINKAT = @HAVE_LINKAT@
+HAVE_LOGL = @HAVE_LOGL@
+HAVE_LONG_LONG_INT = @HAVE_LONG_LONG_INT@
+HAVE_LSTAT = @HAVE_LSTAT@
+HAVE_MALLOC_POSIX = @HAVE_MALLOC_POSIX@
+HAVE_MBRLEN = @HAVE_MBRLEN@
+HAVE_MBRTOWC = @HAVE_MBRTOWC@
+HAVE_MBSINIT = @HAVE_MBSINIT@
+HAVE_MBSLEN = @HAVE_MBSLEN@
+HAVE_MBSNRTOWCS = @HAVE_MBSNRTOWCS@
+HAVE_MBSRTOWCS = @HAVE_MBSRTOWCS@
+HAVE_MEMPCPY = @HAVE_MEMPCPY@
+HAVE_MKDIRAT = @HAVE_MKDIRAT@
+HAVE_MKDTEMP = @HAVE_MKDTEMP@
+HAVE_MKFIFO = @HAVE_MKFIFO@
+HAVE_MKFIFOAT = @HAVE_MKFIFOAT@
+HAVE_MKNOD = @HAVE_MKNOD@
+HAVE_MKNODAT = @HAVE_MKNODAT@
+HAVE_MKOSTEMP = @HAVE_MKOSTEMP@
+HAVE_MKOSTEMPS = @HAVE_MKOSTEMPS@
+HAVE_MKSTEMPS = @HAVE_MKSTEMPS@
+HAVE_NL_LANGINFO = @HAVE_NL_LANGINFO@
+HAVE_OPENAT = @HAVE_OPENAT@
+HAVE_OS_H = @HAVE_OS_H@
+HAVE_PIPE2 = @HAVE_PIPE2@
+HAVE_POSIX_SIGNALBLOCKING = @HAVE_POSIX_SIGNALBLOCKING@
+HAVE_POSIX_SPAWN = @HAVE_POSIX_SPAWN@
+HAVE_POSIX_SPAWNATTR_T = @HAVE_POSIX_SPAWNATTR_T@
+HAVE_POSIX_SPAWN_FILE_ACTIONS_T = @HAVE_POSIX_SPAWN_FILE_ACTIONS_T@
+HAVE_PREAD = @HAVE_PREAD@
+HAVE_RANDOM_H = @HAVE_RANDOM_H@
+HAVE_RANDOM_R = @HAVE_RANDOM_R@
+HAVE_RAWMEMCHR = @HAVE_RAWMEMCHR@
+HAVE_READLINK = @HAVE_READLINK@
+HAVE_READLINKAT = @HAVE_READLINKAT@
+HAVE_REALLOC_POSIX = @HAVE_REALLOC_POSIX@
+HAVE_REALPATH = @HAVE_REALPATH@
+HAVE_RENAMEAT = @HAVE_RENAMEAT@
+HAVE_RPMATCH = @HAVE_RPMATCH@
+HAVE_SCHED_H = @HAVE_SCHED_H@
+HAVE_SETENV = @HAVE_SETENV@
+HAVE_SIGACTION = @HAVE_SIGACTION@
+HAVE_SIGINFO_T = @HAVE_SIGINFO_T@
+HAVE_SIGNED_SIG_ATOMIC_T = @HAVE_SIGNED_SIG_ATOMIC_T@
+HAVE_SIGNED_WCHAR_T = @HAVE_SIGNED_WCHAR_T@
+HAVE_SIGNED_WINT_T = @HAVE_SIGNED_WINT_T@
+HAVE_SIGSET_T = @HAVE_SIGSET_T@
+HAVE_SINL = @HAVE_SINL@
+HAVE_SLEEP = @HAVE_SLEEP@
+HAVE_SPAWN_H = @HAVE_SPAWN_H@
+HAVE_SQRTL = @HAVE_SQRTL@
+HAVE_STDINT_H = @HAVE_STDINT_H@
+HAVE_STPCPY = @HAVE_STPCPY@
+HAVE_STPNCPY = @HAVE_STPNCPY@
+HAVE_STRCASESTR = @HAVE_STRCASESTR@
+HAVE_STRCHRNUL = @HAVE_STRCHRNUL@
+HAVE_STRPBRK = @HAVE_STRPBRK@
+HAVE_STRSEP = @HAVE_STRSEP@
+HAVE_STRTOD = @HAVE_STRTOD@
+HAVE_STRTOLL = @HAVE_STRTOLL@
+HAVE_STRTOULL = @HAVE_STRTOULL@
+HAVE_STRUCT_RANDOM_DATA = @HAVE_STRUCT_RANDOM_DATA@
+HAVE_STRUCT_SCHED_PARAM = @HAVE_STRUCT_SCHED_PARAM@
+HAVE_STRUCT_SIGACTION_SA_SIGACTION = @HAVE_STRUCT_SIGACTION_SA_SIGACTION@
+HAVE_STRUCT_TIMEVAL = @HAVE_STRUCT_TIMEVAL@
+HAVE_STRVERSCMP = @HAVE_STRVERSCMP@
+HAVE_SYMLINK = @HAVE_SYMLINK@
+HAVE_SYMLINKAT = @HAVE_SYMLINKAT@
+HAVE_SYS_BITYPES_H = @HAVE_SYS_BITYPES_H@
+HAVE_SYS_INTTYPES_H = @HAVE_SYS_INTTYPES_H@
+HAVE_SYS_LOADAVG_H = @HAVE_SYS_LOADAVG_H@
+HAVE_SYS_PARAM_H = @HAVE_SYS_PARAM_H@
+HAVE_SYS_TIME_H = @HAVE_SYS_TIME_H@
+HAVE_SYS_TYPES_H = @HAVE_SYS_TYPES_H@
+HAVE_TANL = @HAVE_TANL@
+HAVE_TYPE_VOLATILE_SIG_ATOMIC_T = @HAVE_TYPE_VOLATILE_SIG_ATOMIC_T@
+HAVE_UNISTD_H = @HAVE_UNISTD_H@
+HAVE_UNLINKAT = @HAVE_UNLINKAT@
+HAVE_UNSETENV = @HAVE_UNSETENV@
+HAVE_UNSIGNED_LONG_LONG_INT = @HAVE_UNSIGNED_LONG_LONG_INT@
+HAVE_USLEEP = @HAVE_USLEEP@
+HAVE_UTIMENSAT = @HAVE_UTIMENSAT@
+HAVE_VASPRINTF = @HAVE_VASPRINTF@
+HAVE_VDPRINTF = @HAVE_VDPRINTF@
+HAVE_WCHAR_H = @HAVE_WCHAR_H@
+HAVE_WCHAR_T = @HAVE_WCHAR_T@
+HAVE_WCRTOMB = @HAVE_WCRTOMB@
+HAVE_WCSNRTOMBS = @HAVE_WCSNRTOMBS@
+HAVE_WCSRTOMBS = @HAVE_WCSRTOMBS@
+HAVE_WCTYPE_H = @HAVE_WCTYPE_H@
+HAVE_WINT_T = @HAVE_WINT_T@
+HAVE__BOOL = @HAVE__BOOL@
+ICONV_H = @ICONV_H@
+INCLTDL = @INCLTDL@
+INCLUDE_ERROR_H = @INCLUDE_ERROR_H@
+INCLUDE_NEXT = @INCLUDE_NEXT@
+INCLUDE_NEXT_AS_FIRST_DIRECTIVE = @INCLUDE_NEXT_AS_FIRST_DIRECTIVE@
+INCLUDE_OBSTACK_H = @INCLUDE_OBSTACK_H@
+INCLUDE_REGEX_H = @INCLUDE_REGEX_H@
+INCLUDE_STDBOOL_H = @INCLUDE_STDBOOL_H@
+INSTALL = @INSTALL@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+INT32_MAX_LT_INTMAX_MAX = @INT32_MAX_LT_INTMAX_MAX@
+INT64_MAX_EQ_LONG_MAX = @INT64_MAX_EQ_LONG_MAX@
+INTLLIBS = @INTLLIBS@
+INTL_MACOSX_LIBS = @INTL_MACOSX_LIBS@
+LD = @LD@
+LDFLAGS = @LDFLAGS@
+LIBADD_DL = @LIBADD_DL@
+LIBADD_DLD_LINK = @LIBADD_DLD_LINK@
+LIBADD_DLOPEN = @LIBADD_DLOPEN@
+LIBADD_GMP = @LIBADD_GMP@
+LIBADD_SHL_LOAD = @LIBADD_SHL_LOAD@
+LIBICONV = @LIBICONV@
+LIBINTL = @LIBINTL@
+LIBLTDL = @LIBLTDL@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@ $(POW_LIB)
+LIBTESTS_LIBDEPS = @LIBTESTS_LIBDEPS@
+LIBTOOL = @LIBTOOL@
+LIPO = @LIPO@
+LN_S = @LN_S@
+LOCALCHARSET_TESTS_ENVIRONMENT = @LOCALCHARSET_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@
+LTALLOCA = @LTALLOCA@
+LTDLDEPS = @LTDLDEPS@
+LTDLINCL = @LTDLINCL@
+LTDLOPEN = @LTDLOPEN@
+LTLIBICONV = @LTLIBICONV@
+LTLIBINTL = @LTLIBINTL@
+LTLIBOBJS = @LTLIBOBJS@
+LT_CONFIG_H = @LT_CONFIG_H@
+LT_DLLOADERS = @LT_DLLOADERS@
+LT_DLPREOPEN = @LT_DLPREOPEN@
+M4_LIBOBJS = @M4_LIBOBJS@
+M4_LTLIBOBJS = @M4_LTLIBOBJS@
+M4tests_LIBOBJS = @M4tests_LIBOBJS@
+M4tests_LTLIBOBJS = @M4tests_LTLIBOBJS@
+MAKEINFO = @MAKEINFO@
+MKDIR_P = @MKDIR_P@
+MSGFMT = @MSGFMT@
+MSGFMT_015 = @MSGFMT_015@
+MSGMERGE = @MSGMERGE@
+NEXT_AS_FIRST_DIRECTIVE_ERRNO_H = @NEXT_AS_FIRST_DIRECTIVE_ERRNO_H@
+NEXT_AS_FIRST_DIRECTIVE_FCNTL_H = @NEXT_AS_FIRST_DIRECTIVE_FCNTL_H@
+NEXT_AS_FIRST_DIRECTIVE_FLOAT_H = @NEXT_AS_FIRST_DIRECTIVE_FLOAT_H@
+NEXT_AS_FIRST_DIRECTIVE_GETOPT_H = @NEXT_AS_FIRST_DIRECTIVE_GETOPT_H@
+NEXT_AS_FIRST_DIRECTIVE_ICONV_H = @NEXT_AS_FIRST_DIRECTIVE_ICONV_H@
+NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H = @NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H@
+NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H = @NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H@
+NEXT_AS_FIRST_DIRECTIVE_MATH_H = @NEXT_AS_FIRST_DIRECTIVE_MATH_H@
+NEXT_AS_FIRST_DIRECTIVE_SCHED_H = @NEXT_AS_FIRST_DIRECTIVE_SCHED_H@
+NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H = @NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H@
+NEXT_AS_FIRST_DIRECTIVE_SPAWN_H = @NEXT_AS_FIRST_DIRECTIVE_SPAWN_H@
+NEXT_AS_FIRST_DIRECTIVE_STDARG_H = @NEXT_AS_FIRST_DIRECTIVE_STDARG_H@
+NEXT_AS_FIRST_DIRECTIVE_STDDEF_H = @NEXT_AS_FIRST_DIRECTIVE_STDDEF_H@
+NEXT_AS_FIRST_DIRECTIVE_STDINT_H = @NEXT_AS_FIRST_DIRECTIVE_STDINT_H@
+NEXT_AS_FIRST_DIRECTIVE_STDIO_H = @NEXT_AS_FIRST_DIRECTIVE_STDIO_H@
+NEXT_AS_FIRST_DIRECTIVE_STDLIB_H = @NEXT_AS_FIRST_DIRECTIVE_STDLIB_H@
+NEXT_AS_FIRST_DIRECTIVE_STRING_H = @NEXT_AS_FIRST_DIRECTIVE_STRING_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H = @NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H@
+NEXT_AS_FIRST_DIRECTIVE_TIME_H = @NEXT_AS_FIRST_DIRECTIVE_TIME_H@
+NEXT_AS_FIRST_DIRECTIVE_UNISTD_H = @NEXT_AS_FIRST_DIRECTIVE_UNISTD_H@
+NEXT_AS_FIRST_DIRECTIVE_WCHAR_H = @NEXT_AS_FIRST_DIRECTIVE_WCHAR_H@
+NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H = @NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H@
+NEXT_ERRNO_H = @NEXT_ERRNO_H@
+NEXT_FCNTL_H = @NEXT_FCNTL_H@
+NEXT_FLOAT_H = @NEXT_FLOAT_H@
+NEXT_GETOPT_H = @NEXT_GETOPT_H@
+NEXT_ICONV_H = @NEXT_ICONV_H@
+NEXT_INTTYPES_H = @NEXT_INTTYPES_H@
+NEXT_LANGINFO_H = @NEXT_LANGINFO_H@
+NEXT_MATH_H = @NEXT_MATH_H@
+NEXT_SCHED_H = @NEXT_SCHED_H@
+NEXT_SIGNAL_H = @NEXT_SIGNAL_H@
+NEXT_SPAWN_H = @NEXT_SPAWN_H@
+NEXT_STDARG_H = @NEXT_STDARG_H@
+NEXT_STDDEF_H = @NEXT_STDDEF_H@
+NEXT_STDINT_H = @NEXT_STDINT_H@
+NEXT_STDIO_H = @NEXT_STDIO_H@
+NEXT_STDLIB_H = @NEXT_STDLIB_H@
+NEXT_STRING_H = @NEXT_STRING_H@
+NEXT_SYS_STAT_H = @NEXT_SYS_STAT_H@
+NEXT_SYS_TIME_H = @NEXT_SYS_TIME_H@
+NEXT_SYS_WAIT_H = @NEXT_SYS_WAIT_H@
+NEXT_TIME_H = @NEXT_TIME_H@
+NEXT_UNISTD_H = @NEXT_UNISTD_H@
+NEXT_WCHAR_H = @NEXT_WCHAR_H@
+NEXT_WCTYPE_H = @NEXT_WCTYPE_H@
+NM = @NM@
+NMEDIT = @NMEDIT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OBSTACK_H = @OBSTACK_H@
+OTOOL = @OTOOL@
+OTOOL64 = @OTOOL64@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_URL = @PACKAGE_URL@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+PERL = @PERL@
+POSUB = @POSUB@
+POW_LIB = @POW_LIB@
+PRAGMA_SYSTEM_HEADER = @PRAGMA_SYSTEM_HEADER@
+PREOPEN_DEPENDENCIES = @PREOPEN_DEPENDENCIES@
+PRIPTR_PREFIX = @PRIPTR_PREFIX@
+PRI_MACROS_BROKEN = @PRI_MACROS_BROKEN@
+PTRDIFF_T_SUFFIX = @PTRDIFF_T_SUFFIX@
+RANLIB = @RANLIB@
+REGEX_H = @REGEX_H@
+REPLACE_BTOWC = @REPLACE_BTOWC@
+REPLACE_CANONICALIZE_FILE_NAME = @REPLACE_CANONICALIZE_FILE_NAME@
+REPLACE_CEILF = @REPLACE_CEILF@
+REPLACE_CEILL = @REPLACE_CEILL@
+REPLACE_CHOWN = @REPLACE_CHOWN@
+REPLACE_CLOSE = @REPLACE_CLOSE@
+REPLACE_DPRINTF = @REPLACE_DPRINTF@
+REPLACE_DUP = @REPLACE_DUP@
+REPLACE_DUP2 = @REPLACE_DUP2@
+REPLACE_FCHDIR = @REPLACE_FCHDIR@
+REPLACE_FCHOWNAT = @REPLACE_FCHOWNAT@
+REPLACE_FCLOSE = @REPLACE_FCLOSE@
+REPLACE_FCNTL = @REPLACE_FCNTL@
+REPLACE_FFLUSH = @REPLACE_FFLUSH@
+REPLACE_FLOORF = @REPLACE_FLOORF@
+REPLACE_FLOORL = @REPLACE_FLOORL@
+REPLACE_FOPEN = @REPLACE_FOPEN@
+REPLACE_FPRINTF = @REPLACE_FPRINTF@
+REPLACE_FPURGE = @REPLACE_FPURGE@
+REPLACE_FREOPEN = @REPLACE_FREOPEN@
+REPLACE_FREXP = @REPLACE_FREXP@
+REPLACE_FREXPL = @REPLACE_FREXPL@
+REPLACE_FSEEK = @REPLACE_FSEEK@
+REPLACE_FSEEKO = @REPLACE_FSEEKO@
+REPLACE_FSTAT = @REPLACE_FSTAT@
+REPLACE_FSTATAT = @REPLACE_FSTATAT@
+REPLACE_FTELL = @REPLACE_FTELL@
+REPLACE_FTELLO = @REPLACE_FTELLO@
+REPLACE_FUTIMENS = @REPLACE_FUTIMENS@
+REPLACE_GETCWD = @REPLACE_GETCWD@
+REPLACE_GETDELIM = @REPLACE_GETDELIM@
+REPLACE_GETGROUPS = @REPLACE_GETGROUPS@
+REPLACE_GETLINE = @REPLACE_GETLINE@
+REPLACE_GETPAGESIZE = @REPLACE_GETPAGESIZE@
+REPLACE_GETTIMEOFDAY = @REPLACE_GETTIMEOFDAY@
+REPLACE_HUGE_VAL = @REPLACE_HUGE_VAL@
+REPLACE_ICONV = @REPLACE_ICONV@
+REPLACE_ICONV_OPEN = @REPLACE_ICONV_OPEN@
+REPLACE_ICONV_UTF = @REPLACE_ICONV_UTF@
+REPLACE_ISFINITE = @REPLACE_ISFINITE@
+REPLACE_ISINF = @REPLACE_ISINF@
+REPLACE_ISNAN = @REPLACE_ISNAN@
+REPLACE_ISWCNTRL = @REPLACE_ISWCNTRL@
+REPLACE_LCHOWN = @REPLACE_LCHOWN@
+REPLACE_LDEXPL = @REPLACE_LDEXPL@
+REPLACE_LINK = @REPLACE_LINK@
+REPLACE_LINKAT = @REPLACE_LINKAT@
+REPLACE_LOCALTIME_R = @REPLACE_LOCALTIME_R@
+REPLACE_LSEEK = @REPLACE_LSEEK@
+REPLACE_LSTAT = @REPLACE_LSTAT@
+REPLACE_MBRLEN = @REPLACE_MBRLEN@
+REPLACE_MBRTOWC = @REPLACE_MBRTOWC@
+REPLACE_MBSINIT = @REPLACE_MBSINIT@
+REPLACE_MBSNRTOWCS = @REPLACE_MBSNRTOWCS@
+REPLACE_MBSRTOWCS = @REPLACE_MBSRTOWCS@
+REPLACE_MBSTATE_T = @REPLACE_MBSTATE_T@
+REPLACE_MEMCHR = @REPLACE_MEMCHR@
+REPLACE_MEMMEM = @REPLACE_MEMMEM@
+REPLACE_MKDIR = @REPLACE_MKDIR@
+REPLACE_MKFIFO = @REPLACE_MKFIFO@
+REPLACE_MKNOD = @REPLACE_MKNOD@
+REPLACE_MKSTEMP = @REPLACE_MKSTEMP@
+REPLACE_MKTIME = @REPLACE_MKTIME@
+REPLACE_NAN = @REPLACE_NAN@
+REPLACE_NANOSLEEP = @REPLACE_NANOSLEEP@
+REPLACE_NL_LANGINFO = @REPLACE_NL_LANGINFO@
+REPLACE_NULL = @REPLACE_NULL@
+REPLACE_OBSTACK_PRINTF = @REPLACE_OBSTACK_PRINTF@
+REPLACE_OPEN = @REPLACE_OPEN@
+REPLACE_OPENAT = @REPLACE_OPENAT@
+REPLACE_PERROR = @REPLACE_PERROR@
+REPLACE_POPEN = @REPLACE_POPEN@
+REPLACE_POSIX_SPAWN = @REPLACE_POSIX_SPAWN@
+REPLACE_PREAD = @REPLACE_PREAD@
+REPLACE_PRINTF = @REPLACE_PRINTF@
+REPLACE_PUTENV = @REPLACE_PUTENV@
+REPLACE_READLINK = @REPLACE_READLINK@
+REPLACE_REALPATH = @REPLACE_REALPATH@
+REPLACE_REMOVE = @REPLACE_REMOVE@
+REPLACE_RENAME = @REPLACE_RENAME@
+REPLACE_RENAMEAT = @REPLACE_RENAMEAT@
+REPLACE_RMDIR = @REPLACE_RMDIR@
+REPLACE_ROUND = @REPLACE_ROUND@
+REPLACE_ROUNDF = @REPLACE_ROUNDF@
+REPLACE_ROUNDL = @REPLACE_ROUNDL@
+REPLACE_SETENV = @REPLACE_SETENV@
+REPLACE_SIGNBIT = @REPLACE_SIGNBIT@
+REPLACE_SIGNBIT_USING_GCC = @REPLACE_SIGNBIT_USING_GCC@
+REPLACE_SLEEP = @REPLACE_SLEEP@
+REPLACE_SNPRINTF = @REPLACE_SNPRINTF@
+REPLACE_SPRINTF = @REPLACE_SPRINTF@
+REPLACE_STAT = @REPLACE_STAT@
+REPLACE_STDIO_WRITE_FUNCS = @REPLACE_STDIO_WRITE_FUNCS@
+REPLACE_STRCASESTR = @REPLACE_STRCASESTR@
+REPLACE_STRDUP = @REPLACE_STRDUP@
+REPLACE_STRERROR = @REPLACE_STRERROR@
+REPLACE_STRNDUP = @REPLACE_STRNDUP@
+REPLACE_STRPTIME = @REPLACE_STRPTIME@
+REPLACE_STRSIGNAL = @REPLACE_STRSIGNAL@
+REPLACE_STRSTR = @REPLACE_STRSTR@
+REPLACE_STRTOD = @REPLACE_STRTOD@
+REPLACE_STRTOK_R = @REPLACE_STRTOK_R@
+REPLACE_SYMLINK = @REPLACE_SYMLINK@
+REPLACE_TIMEGM = @REPLACE_TIMEGM@
+REPLACE_TRUNCL = @REPLACE_TRUNCL@
+REPLACE_UNLINK = @REPLACE_UNLINK@
+REPLACE_UNLINKAT = @REPLACE_UNLINKAT@
+REPLACE_UNSETENV = @REPLACE_UNSETENV@
+REPLACE_USLEEP = @REPLACE_USLEEP@
+REPLACE_UTIMENSAT = @REPLACE_UTIMENSAT@
+REPLACE_VASPRINTF = @REPLACE_VASPRINTF@
+REPLACE_VDPRINTF = @REPLACE_VDPRINTF@
+REPLACE_VFPRINTF = @REPLACE_VFPRINTF@
+REPLACE_VPRINTF = @REPLACE_VPRINTF@
+REPLACE_VSNPRINTF = @REPLACE_VSNPRINTF@
+REPLACE_VSPRINTF = @REPLACE_VSPRINTF@
+REPLACE_WCRTOMB = @REPLACE_WCRTOMB@
+REPLACE_WCSNRTOMBS = @REPLACE_WCSNRTOMBS@
+REPLACE_WCSRTOMBS = @REPLACE_WCSRTOMBS@
+REPLACE_WCTOB = @REPLACE_WCTOB@
+REPLACE_WCWIDTH = @REPLACE_WCWIDTH@
+REPLACE_WRITE = @REPLACE_WRITE@
+SCHED_H = @SCHED_H@
+SED = @SED@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+SIG_ATOMIC_T_SUFFIX = @SIG_ATOMIC_T_SUFFIX@
+SIZE_T_SUFFIX = @SIZE_T_SUFFIX@
+STDARG_H = @STDARG_H@
+STDBOOL_H = @STDBOOL_H@
+STDDEF_H = @STDDEF_H@
+STDINT_H = @STDINT_H@
+STRIP = @STRIP@
+SYS_TIME_H_DEFINES_STRUCT_TIMESPEC = @SYS_TIME_H_DEFINES_STRUCT_TIMESPEC@
+TIME_H_DEFINES_STRUCT_TIMESPEC = @TIME_H_DEFINES_STRUCT_TIMESPEC@
+UINT32_MAX_LT_UINTMAX_MAX = @UINT32_MAX_LT_UINTMAX_MAX@
+UINT64_MAX_EQ_ULONG_MAX = @UINT64_MAX_EQ_ULONG_MAX@
+UNDEFINE_STRTOK_R = @UNDEFINE_STRTOK_R@
+UNISTD_H_HAVE_WINSOCK2_H = @UNISTD_H_HAVE_WINSOCK2_H@
+UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS = @UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS@
+USE_GMP = @USE_GMP@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WCHAR_T_SUFFIX = @WCHAR_T_SUFFIX@
+WCTYPE_H = @WCTYPE_H@
+WINT_T_SUFFIX = @WINT_T_SUFFIX@
+XGETTEXT = @XGETTEXT@
+XGETTEXT_015 = @XGETTEXT_015@
+XGETTEXT_EXTRA_OPTIONS = @XGETTEXT_EXTRA_OPTIONS@
+abs_aux_dir = @abs_aux_dir@
+abs_builddir = @abs_builddir@
+abs_srcdir = @abs_srcdir@
+abs_top_builddir = @abs_top_builddir@
+abs_top_srcdir = @abs_top_srcdir@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+am__tar = @am__tar@
+am__untar = @am__untar@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+builddir = @builddir@
+datadir = @datadir@
+datarootdir = @datarootdir@
+docdir = @docdir@
+dvidir = @dvidir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+htmldir = @htmldir@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localedir = @localedir@
+localstatedir = @localstatedir@
+lt_ECHO = @lt_ECHO@
+ltdl_LIBOBJS = @ltdl_LIBOBJS@
+ltdl_LTLIBOBJS = @ltdl_LTLIBOBJS@
+mandir = @mandir@
+mkdir_p = @mkdir_p@
+oldincludedir = @oldincludedir@
+pdfdir = @pdfdir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+psdir = @psdir@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+srcdir = @srcdir@
+sys_symbol_underscore = @sys_symbol_underscore@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+top_build_prefix = @top_build_prefix@
+top_builddir = @top_builddir@
+top_srcdir = @top_srcdir@
+AUTOMAKE_OPTIONS = 1.5 foreign subdir-objects
+SUBDIRS =
+TESTS_ENVIRONMENT = EXEEXT='@EXEEXT@' srcdir='$(srcdir)' \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_TR_UTF8='@LOCALE_TR_UTF8@' \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_ZH_CN='@LOCALE_ZH_CN@' LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' LOCALE_FR='@LOCALE_FR@' \
+ LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ PATH='$(abs_aux_dir)'$(PATH_SEPARATOR)"$$PATH" \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ PATH='$(abs_aux_dir)'$(PATH_SEPARATOR)"$$PATH" \
+ LOCALE_FR='@LOCALE_FR@' LOCALE_FR_UTF8='@LOCALE_FR_UTF8@' \
+ LOCALE_JA='@LOCALE_JA@' LOCALE_ZH_CN='@LOCALE_ZH_CN@'
+noinst_HEADERS =
+noinst_LIBRARIES =
+check_LIBRARIES = libtests.a
+EXTRA_DIST = test-alloca-opt.c $(top_srcdir)/build-aux/arg-nonnull.h \
+ test-array_list.c macros.h test-array_oset.c macros.h \
+ test-avltree_oset.c macros.h test-binary-io.sh \
+ test-binary-io.c macros.h test-bitrotate.c macros.h \
+ test-btowc1.sh test-btowc2.sh test-btowc.c signature.h \
+ macros.h test-c-ctype.c macros.h test-c-strcase.sh \
+ test-c-strcasecmp.c test-c-strncasecmp.c macros.h \
+ test-canonicalize-lgpl.c signature.h macros.h test-cloexec.c \
+ macros.h test-closein.sh test-closein.c test-dirname.c \
+ test-dup2.c signature.h macros.h test-environ.c test-errno.c \
+ test-fcntl-h.c test-fcntl.c signature.h macros.h test-fflush.c \
+ test-fflush2.sh test-fflush2.c signature.h macros.h \
+ test-filenamecat.c test-fopen.h test-fopen-safer.c macros.h \
+ test-fopen.h test-fopen.c signature.h macros.h test-fpending.c \
+ test-fpending.sh macros.h test-fpurge.c macros.h \
+ test-freadahead.c test-freadahead.sh macros.h test-freading.c \
+ macros.h test-freadptr.c test-freadptr.sh test-freadptr2.c \
+ test-freadptr2.sh macros.h test-freadseek.c test-freadseek.sh \
+ macros.h test-frexp.c signature.h macros.h test-frexpl.c \
+ signature.h macros.h test-fseeko.c test-fseeko.sh \
+ test-fseeko2.sh signature.h macros.h test-fseterr.c \
+ test-ftello.c test-ftello.sh test-ftello2.sh signature.h \
+ macros.h test-getdtablesize.c signature.h macros.h \
+ getpagesize.c signature.h test-gettimeofday.c test-iconv.c \
+ signature.h macros.h test-inttypes.c test-isnand-nolibm.c \
+ test-isnand.h nan.h macros.h test-isnanf-nolibm.c \
+ test-isnanf.h nan.h macros.h test-isnanl-nolibm.c \
+ test-isnanl.h nan.h macros.h test-langinfo.c link.c \
+ test-link.h test-link.c signature.h macros.h \
+ test-linkedhash_list.c macros.h test-lseek.c test-lseek.sh \
+ signature.h macros.h test-lstat.h test-lstat.c signature.h \
+ macros.h test-malloca.c test-math.c test-mbrtowc1.sh \
+ test-mbrtowc2.sh test-mbrtowc3.sh test-mbrtowc4.sh \
+ test-mbrtowc.c signature.h macros.h test-mbsinit.sh \
+ test-mbsinit.c signature.h macros.h test-mbsstr1.c \
+ test-mbsstr2.sh test-mbsstr2.c test-mbsstr3.sh test-mbsstr3.c \
+ macros.h test-memchr.c zerosize-ptr.h signature.h macros.h \
+ test-memchr2.c zerosize-ptr.h macros.h test-memmem.c \
+ zerosize-ptr.h signature.h macros.h test-nl_langinfo.sh \
+ test-nl_langinfo.c signature.h macros.h obstack_printf.c \
+ test-obstack-printf.c signature.h macros.h test-open.h \
+ test-open.c signature.h macros.h test-pipe.sh test-pipe.c \
+ macros.h test-pipe2.c signature.h macros.h test-posix_spawn1.c \
+ test-posix_spawn1.in.sh test-posix_spawn2.c \
+ test-posix_spawn2.in.sh signature.h test-printf-frexp.c \
+ macros.h test-printf-frexpl.c macros.h putenv.c \
+ test-quotearg.sh test-quotearg.c macros.h \
+ locale/fr/LC_MESSAGES/test-quotearg.po \
+ locale/fr/LC_MESSAGES/test-quotearg.mo test-rawmemchr.c \
+ signature.h macros.h test-readlink.h test-readlink.c \
+ signature.h macros.h test-rename.h test-rename.c signature.h \
+ macros.h test-rmdir.h test-rmdir.c signature.h macros.h \
+ test-sched.c test-setenv.c signature.h macros.h \
+ test-sigaction.c signature.h macros.h test-signal.c \
+ test-signbit.c macros.h test-snprintf-posix.c \
+ test-snprintf-posix.h test-snprintf.c nan.h signature.h \
+ macros.h test-snprintf.c signature.h macros.h test-spawn.c \
+ test-sprintf-posix.c test-sprintf-posix.h nan.h signature.h \
+ macros.h test-stat.h test-stat.c signature.h macros.h \
+ test-stdbool.c test-stddef.c test-stdint.c test-stdio.c \
+ test-stdlib.c test-strchrnul.c signature.h macros.h strdup.c \
+ test-strerror.c signature.h macros.h test-striconv.c macros.h \
+ test-string.c test-strtod.c signature.h macros.h symlink.c \
+ test-symlink.h test-symlink.c signature.h macros.h \
+ test-sys_stat.c test-sys_time.c test-sys_wait.c test-time.c \
+ test-dup-safer.c macros.h test-unistd.c \
+ uniwidth/test-uc_width.c uniwidth/test-uc_width2.c \
+ uniwidth/test-uc_width2.sh macros.h test-unsetenv.c \
+ signature.h macros.h test-update-copyright.sh \
+ test-vasnprintf-posix.c test-vasnprintf-posix2.sh \
+ test-vasnprintf-posix2.c nan.h macros.h test-vasnprintf.c \
+ macros.h test-vasprintf-posix.c nan.h macros.h \
+ test-vasprintf.c signature.h macros.h \
+ test-vc-list-files-git.sh test-vc-list-files-cvs.sh \
+ test-vfprintf-posix.sh test-vfprintf-posix.c \
+ test-fprintf-posix.h test-printf-posix.output signature.h \
+ macros.h test-vprintf-posix.sh test-vprintf-posix.c \
+ test-printf-posix.h test-printf-posix.output signature.h \
+ macros.h $(top_srcdir)/build-aux/warn-on-use.h test-wchar.c \
+ test-wcrtomb.sh test-wcrtomb.c signature.h macros.h wctob.c \
+ test-wctype.c macros.h test-wcwidth.c signature.h macros.h \
+ test-xalloc-die.c test-xalloc-die.sh init.sh test-xmemdup0.c \
+ macros.h test-xprintf-posix.sh test-xfprintf-posix.c \
+ test-xprintf-posix.c test-fprintf-posix.h test-printf-posix.h \
+ test-printf-posix.output macros.h test-xvasprintf.c macros.h
+
+# The BUILT_SOURCES created by this Makefile snippet are not used via #include
+# statements but through direct file reference. Therefore this snippet must be
+# present in all Makefile.am that need it. This is ensured by the applicability
+# 'all' defined above.
+BUILT_SOURCES = arg-nonnull.h $(am__append_3) warn-on-use.h
+SUFFIXES =
+MOSTLYCLEANFILES = core *.stackdump arg-nonnull.h arg-nonnull.h-t \
+ test-fflush.txt test-fpending.t t-fpurge.tmp t-freading.tmp \
+ $(am__append_4) warn-on-use.h warn-on-use.h-t
+MOSTLYCLEANDIRS =
+CLEANFILES =
+DISTCLEANFILES =
+MAINTAINERCLEANFILES =
+AM_CPPFLAGS = \
+ -I. -I$(srcdir) \
+ -I../.. -I$(srcdir)/../.. \
+ -I../../gnu -I$(srcdir)/../../gnu
+
+LDADD = libtests.a ../../gnu/libgnu.la libtests.a $(LIBTESTS_LIBDEPS)
+libtests_a_SOURCES = gl_array_list.h gl_array_list.c gl_array_oset.h \
+ gl_array_oset.c ignore-value.h
+libtests_a_LIBADD = $(M4tests_LIBOBJS)
+libtests_a_DEPENDENCIES = $(M4tests_LIBOBJS)
+EXTRA_libtests_a_SOURCES = getpagesize.c link.c obstack_printf.c \
+ putenv.c strdup.c symlink.c wctob.c
+AM_LIBTOOLFLAGS = --preserve-dup-deps
+ARG_NONNULL_H = arg-nonnull.h
+test_array_oset_LDADD = $(LDADD) @LIBINTL@
+test_closein_LDADD = $(LDADD) @LIBINTL@
+test_dirname_LDADD = $(LDADD) @LIBINTL@
+test_filenamecat_LDADD = $(LDADD) @LIBINTL@
+test_frexp_nolibm_SOURCES = test-frexp.c
+test_frexpl_nolibm_SOURCES = test-frexpl.c
+test_iconv_LDADD = $(LDADD) @LIBICONV@
+test_obstack_printf_LDADD = $(LDADD) @LIBINTL@
+test_pipe_LDADD = $(LDADD) @LIBINTL@
+test_quotearg_LDADD = $(LDADD) @LIBINTL@
+test_striconv_LDADD = $(LDADD) @LIBICONV@
+test_uc_width_SOURCES = uniwidth/test-uc_width.c
+test_uc_width2_SOURCES = uniwidth/test-uc_width2.c
+WARN_ON_USE_H = warn-on-use.h
+test_xalloc_die_LDADD = $(LDADD) @LIBINTL@
+test_xmemdup0_LDADD = $(LDADD) @LIBINTL@
+test_xfprintf_posix_LDADD = $(LDADD) @LIBINTL@
+test_xprintf_posix_LDADD = $(LDADD) @LIBINTL@
+test_xvasprintf_LDADD = $(LDADD) @LIBINTL@
+all: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+.SUFFIXES:
+.SUFFIXES: .c .html .lo .log .o .obj .test .test$(EXEEXT)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
+ @for dep in $?; do \
+ case '$(am__configure_deps)' in \
+ *$$dep*) \
+ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
+ && { if test -f $@; then exit 0; else break; fi; }; \
+ exit 1;; \
+ esac; \
+ done; \
+ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign tests/gnu/Makefile'; \
+ $(am__cd) $(top_srcdir) && \
+ $(AUTOMAKE) --foreign tests/gnu/Makefile
+.PRECIOUS: Makefile
+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
+ @case '$?' in \
+ *config.status*) \
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
+ *) \
+ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
+ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
+ esac;
+
+$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+
+$(top_srcdir)/configure: $(am__configure_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(ACLOCAL_M4): $(am__aclocal_m4_deps)
+ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
+$(am__aclocal_m4_deps):
+
+clean-checkLIBRARIES:
+ -test -z "$(check_LIBRARIES)" || rm -f $(check_LIBRARIES)
+
+clean-noinstLIBRARIES:
+ -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libtests.a: $(libtests_a_OBJECTS) $(libtests_a_DEPENDENCIES)
+ $(AM_V_at)-rm -f libtests.a
+ $(AM_V_AR)$(libtests_a_AR) libtests.a $(libtests_a_OBJECTS) $(libtests_a_LIBADD)
+ $(AM_V_at)$(RANLIB) libtests.a
+
+clean-checkPROGRAMS:
+ @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+
+clean-noinstPROGRAMS:
+ @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \
+ echo " rm -f" $$list; \
+ rm -f $$list || exit $$?; \
+ test -n "$(EXEEXT)" || exit 0; \
+ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \
+ echo " rm -f" $$list; \
+ rm -f $$list
+test-alloca-opt$(EXEEXT): $(test_alloca_opt_OBJECTS) $(test_alloca_opt_DEPENDENCIES)
+ @rm -f test-alloca-opt$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_alloca_opt_OBJECTS) $(test_alloca_opt_LDADD) $(LIBS)
+test-array_list$(EXEEXT): $(test_array_list_OBJECTS) $(test_array_list_DEPENDENCIES)
+ @rm -f test-array_list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_array_list_OBJECTS) $(test_array_list_LDADD) $(LIBS)
+test-array_oset$(EXEEXT): $(test_array_oset_OBJECTS) $(test_array_oset_DEPENDENCIES)
+ @rm -f test-array_oset$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_array_oset_OBJECTS) $(test_array_oset_LDADD) $(LIBS)
+test-avltree_oset$(EXEEXT): $(test_avltree_oset_OBJECTS) $(test_avltree_oset_DEPENDENCIES)
+ @rm -f test-avltree_oset$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_avltree_oset_OBJECTS) $(test_avltree_oset_LDADD) $(LIBS)
+test-binary-io$(EXEEXT): $(test_binary_io_OBJECTS) $(test_binary_io_DEPENDENCIES)
+ @rm -f test-binary-io$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_binary_io_OBJECTS) $(test_binary_io_LDADD) $(LIBS)
+test-bitrotate$(EXEEXT): $(test_bitrotate_OBJECTS) $(test_bitrotate_DEPENDENCIES)
+ @rm -f test-bitrotate$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_bitrotate_OBJECTS) $(test_bitrotate_LDADD) $(LIBS)
+test-btowc$(EXEEXT): $(test_btowc_OBJECTS) $(test_btowc_DEPENDENCIES)
+ @rm -f test-btowc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_btowc_OBJECTS) $(test_btowc_LDADD) $(LIBS)
+test-c-ctype$(EXEEXT): $(test_c_ctype_OBJECTS) $(test_c_ctype_DEPENDENCIES)
+ @rm -f test-c-ctype$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_ctype_OBJECTS) $(test_c_ctype_LDADD) $(LIBS)
+test-c-strcasecmp$(EXEEXT): $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_DEPENDENCIES)
+ @rm -f test-c-strcasecmp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_strcasecmp_OBJECTS) $(test_c_strcasecmp_LDADD) $(LIBS)
+test-c-strncasecmp$(EXEEXT): $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_DEPENDENCIES)
+ @rm -f test-c-strncasecmp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_c_strncasecmp_OBJECTS) $(test_c_strncasecmp_LDADD) $(LIBS)
+test-canonicalize-lgpl$(EXEEXT): $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_DEPENDENCIES)
+ @rm -f test-canonicalize-lgpl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_canonicalize_lgpl_OBJECTS) $(test_canonicalize_lgpl_LDADD) $(LIBS)
+test-cloexec$(EXEEXT): $(test_cloexec_OBJECTS) $(test_cloexec_DEPENDENCIES)
+ @rm -f test-cloexec$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_cloexec_OBJECTS) $(test_cloexec_LDADD) $(LIBS)
+test-closein$(EXEEXT): $(test_closein_OBJECTS) $(test_closein_DEPENDENCIES)
+ @rm -f test-closein$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_closein_OBJECTS) $(test_closein_LDADD) $(LIBS)
+test-dirname$(EXEEXT): $(test_dirname_OBJECTS) $(test_dirname_DEPENDENCIES)
+ @rm -f test-dirname$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dirname_OBJECTS) $(test_dirname_LDADD) $(LIBS)
+test-dup-safer$(EXEEXT): $(test_dup_safer_OBJECTS) $(test_dup_safer_DEPENDENCIES)
+ @rm -f test-dup-safer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dup_safer_OBJECTS) $(test_dup_safer_LDADD) $(LIBS)
+test-dup2$(EXEEXT): $(test_dup2_OBJECTS) $(test_dup2_DEPENDENCIES)
+ @rm -f test-dup2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_dup2_OBJECTS) $(test_dup2_LDADD) $(LIBS)
+test-environ$(EXEEXT): $(test_environ_OBJECTS) $(test_environ_DEPENDENCIES)
+ @rm -f test-environ$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_environ_OBJECTS) $(test_environ_LDADD) $(LIBS)
+test-errno$(EXEEXT): $(test_errno_OBJECTS) $(test_errno_DEPENDENCIES)
+ @rm -f test-errno$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_errno_OBJECTS) $(test_errno_LDADD) $(LIBS)
+test-fcntl$(EXEEXT): $(test_fcntl_OBJECTS) $(test_fcntl_DEPENDENCIES)
+ @rm -f test-fcntl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fcntl_OBJECTS) $(test_fcntl_LDADD) $(LIBS)
+test-fcntl-h$(EXEEXT): $(test_fcntl_h_OBJECTS) $(test_fcntl_h_DEPENDENCIES)
+ @rm -f test-fcntl-h$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fcntl_h_OBJECTS) $(test_fcntl_h_LDADD) $(LIBS)
+test-fflush$(EXEEXT): $(test_fflush_OBJECTS) $(test_fflush_DEPENDENCIES)
+ @rm -f test-fflush$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fflush_OBJECTS) $(test_fflush_LDADD) $(LIBS)
+test-fflush2$(EXEEXT): $(test_fflush2_OBJECTS) $(test_fflush2_DEPENDENCIES)
+ @rm -f test-fflush2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fflush2_OBJECTS) $(test_fflush2_LDADD) $(LIBS)
+test-filenamecat$(EXEEXT): $(test_filenamecat_OBJECTS) $(test_filenamecat_DEPENDENCIES)
+ @rm -f test-filenamecat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_filenamecat_OBJECTS) $(test_filenamecat_LDADD) $(LIBS)
+test-fopen$(EXEEXT): $(test_fopen_OBJECTS) $(test_fopen_DEPENDENCIES)
+ @rm -f test-fopen$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fopen_OBJECTS) $(test_fopen_LDADD) $(LIBS)
+test-fopen-safer$(EXEEXT): $(test_fopen_safer_OBJECTS) $(test_fopen_safer_DEPENDENCIES)
+ @rm -f test-fopen-safer$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fopen_safer_OBJECTS) $(test_fopen_safer_LDADD) $(LIBS)
+test-fpending$(EXEEXT): $(test_fpending_OBJECTS) $(test_fpending_DEPENDENCIES)
+ @rm -f test-fpending$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fpending_OBJECTS) $(test_fpending_LDADD) $(LIBS)
+test-fpurge$(EXEEXT): $(test_fpurge_OBJECTS) $(test_fpurge_DEPENDENCIES)
+ @rm -f test-fpurge$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fpurge_OBJECTS) $(test_fpurge_LDADD) $(LIBS)
+test-freadahead$(EXEEXT): $(test_freadahead_OBJECTS) $(test_freadahead_DEPENDENCIES)
+ @rm -f test-freadahead$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freadahead_OBJECTS) $(test_freadahead_LDADD) $(LIBS)
+test-freading$(EXEEXT): $(test_freading_OBJECTS) $(test_freading_DEPENDENCIES)
+ @rm -f test-freading$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freading_OBJECTS) $(test_freading_LDADD) $(LIBS)
+test-freadptr$(EXEEXT): $(test_freadptr_OBJECTS) $(test_freadptr_DEPENDENCIES)
+ @rm -f test-freadptr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freadptr_OBJECTS) $(test_freadptr_LDADD) $(LIBS)
+test-freadptr2$(EXEEXT): $(test_freadptr2_OBJECTS) $(test_freadptr2_DEPENDENCIES)
+ @rm -f test-freadptr2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freadptr2_OBJECTS) $(test_freadptr2_LDADD) $(LIBS)
+test-freadseek$(EXEEXT): $(test_freadseek_OBJECTS) $(test_freadseek_DEPENDENCIES)
+ @rm -f test-freadseek$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_freadseek_OBJECTS) $(test_freadseek_LDADD) $(LIBS)
+test-frexp-nolibm$(EXEEXT): $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_DEPENDENCIES)
+ @rm -f test-frexp-nolibm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_frexp_nolibm_OBJECTS) $(test_frexp_nolibm_LDADD) $(LIBS)
+test-frexpl-nolibm$(EXEEXT): $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_DEPENDENCIES)
+ @rm -f test-frexpl-nolibm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_frexpl_nolibm_OBJECTS) $(test_frexpl_nolibm_LDADD) $(LIBS)
+test-fseeko$(EXEEXT): $(test_fseeko_OBJECTS) $(test_fseeko_DEPENDENCIES)
+ @rm -f test-fseeko$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseeko_OBJECTS) $(test_fseeko_LDADD) $(LIBS)
+test-fseterr$(EXEEXT): $(test_fseterr_OBJECTS) $(test_fseterr_DEPENDENCIES)
+ @rm -f test-fseterr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_fseterr_OBJECTS) $(test_fseterr_LDADD) $(LIBS)
+test-ftello$(EXEEXT): $(test_ftello_OBJECTS) $(test_ftello_DEPENDENCIES)
+ @rm -f test-ftello$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_ftello_OBJECTS) $(test_ftello_LDADD) $(LIBS)
+test-getdtablesize$(EXEEXT): $(test_getdtablesize_OBJECTS) $(test_getdtablesize_DEPENDENCIES)
+ @rm -f test-getdtablesize$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_getdtablesize_OBJECTS) $(test_getdtablesize_LDADD) $(LIBS)
+test-gettimeofday$(EXEEXT): $(test_gettimeofday_OBJECTS) $(test_gettimeofday_DEPENDENCIES)
+ @rm -f test-gettimeofday$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_gettimeofday_OBJECTS) $(test_gettimeofday_LDADD) $(LIBS)
+test-iconv$(EXEEXT): $(test_iconv_OBJECTS) $(test_iconv_DEPENDENCIES)
+ @rm -f test-iconv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_iconv_OBJECTS) $(test_iconv_LDADD) $(LIBS)
+test-inttypes$(EXEEXT): $(test_inttypes_OBJECTS) $(test_inttypes_DEPENDENCIES)
+ @rm -f test-inttypes$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_inttypes_OBJECTS) $(test_inttypes_LDADD) $(LIBS)
+test-isnand-nolibm$(EXEEXT): $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_DEPENDENCIES)
+ @rm -f test-isnand-nolibm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_isnand_nolibm_OBJECTS) $(test_isnand_nolibm_LDADD) $(LIBS)
+test-isnanf-nolibm$(EXEEXT): $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_DEPENDENCIES)
+ @rm -f test-isnanf-nolibm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_isnanf_nolibm_OBJECTS) $(test_isnanf_nolibm_LDADD) $(LIBS)
+test-isnanl-nolibm$(EXEEXT): $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_DEPENDENCIES)
+ @rm -f test-isnanl-nolibm$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_isnanl_nolibm_OBJECTS) $(test_isnanl_nolibm_LDADD) $(LIBS)
+test-langinfo$(EXEEXT): $(test_langinfo_OBJECTS) $(test_langinfo_DEPENDENCIES)
+ @rm -f test-langinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_langinfo_OBJECTS) $(test_langinfo_LDADD) $(LIBS)
+test-link$(EXEEXT): $(test_link_OBJECTS) $(test_link_DEPENDENCIES)
+ @rm -f test-link$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_link_OBJECTS) $(test_link_LDADD) $(LIBS)
+test-linkedhash_list$(EXEEXT): $(test_linkedhash_list_OBJECTS) $(test_linkedhash_list_DEPENDENCIES)
+ @rm -f test-linkedhash_list$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_linkedhash_list_OBJECTS) $(test_linkedhash_list_LDADD) $(LIBS)
+test-lseek$(EXEEXT): $(test_lseek_OBJECTS) $(test_lseek_DEPENDENCIES)
+ @rm -f test-lseek$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_lseek_OBJECTS) $(test_lseek_LDADD) $(LIBS)
+test-lstat$(EXEEXT): $(test_lstat_OBJECTS) $(test_lstat_DEPENDENCIES)
+ @rm -f test-lstat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_lstat_OBJECTS) $(test_lstat_LDADD) $(LIBS)
+test-malloca$(EXEEXT): $(test_malloca_OBJECTS) $(test_malloca_DEPENDENCIES)
+ @rm -f test-malloca$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_malloca_OBJECTS) $(test_malloca_LDADD) $(LIBS)
+test-math$(EXEEXT): $(test_math_OBJECTS) $(test_math_DEPENDENCIES)
+ @rm -f test-math$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_math_OBJECTS) $(test_math_LDADD) $(LIBS)
+test-mbrtowc$(EXEEXT): $(test_mbrtowc_OBJECTS) $(test_mbrtowc_DEPENDENCIES)
+ @rm -f test-mbrtowc$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbrtowc_OBJECTS) $(test_mbrtowc_LDADD) $(LIBS)
+test-mbsinit$(EXEEXT): $(test_mbsinit_OBJECTS) $(test_mbsinit_DEPENDENCIES)
+ @rm -f test-mbsinit$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbsinit_OBJECTS) $(test_mbsinit_LDADD) $(LIBS)
+test-mbsstr1$(EXEEXT): $(test_mbsstr1_OBJECTS) $(test_mbsstr1_DEPENDENCIES)
+ @rm -f test-mbsstr1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbsstr1_OBJECTS) $(test_mbsstr1_LDADD) $(LIBS)
+test-mbsstr2$(EXEEXT): $(test_mbsstr2_OBJECTS) $(test_mbsstr2_DEPENDENCIES)
+ @rm -f test-mbsstr2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbsstr2_OBJECTS) $(test_mbsstr2_LDADD) $(LIBS)
+test-mbsstr3$(EXEEXT): $(test_mbsstr3_OBJECTS) $(test_mbsstr3_DEPENDENCIES)
+ @rm -f test-mbsstr3$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_mbsstr3_OBJECTS) $(test_mbsstr3_LDADD) $(LIBS)
+test-memchr$(EXEEXT): $(test_memchr_OBJECTS) $(test_memchr_DEPENDENCIES)
+ @rm -f test-memchr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_memchr_OBJECTS) $(test_memchr_LDADD) $(LIBS)
+test-memchr2$(EXEEXT): $(test_memchr2_OBJECTS) $(test_memchr2_DEPENDENCIES)
+ @rm -f test-memchr2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_memchr2_OBJECTS) $(test_memchr2_LDADD) $(LIBS)
+test-memmem$(EXEEXT): $(test_memmem_OBJECTS) $(test_memmem_DEPENDENCIES)
+ @rm -f test-memmem$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_memmem_OBJECTS) $(test_memmem_LDADD) $(LIBS)
+test-nl_langinfo$(EXEEXT): $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_DEPENDENCIES)
+ @rm -f test-nl_langinfo$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_nl_langinfo_OBJECTS) $(test_nl_langinfo_LDADD) $(LIBS)
+test-obstack-printf$(EXEEXT): $(test_obstack_printf_OBJECTS) $(test_obstack_printf_DEPENDENCIES)
+ @rm -f test-obstack-printf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_obstack_printf_OBJECTS) $(test_obstack_printf_LDADD) $(LIBS)
+test-open$(EXEEXT): $(test_open_OBJECTS) $(test_open_DEPENDENCIES)
+ @rm -f test-open$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_open_OBJECTS) $(test_open_LDADD) $(LIBS)
+test-pipe$(EXEEXT): $(test_pipe_OBJECTS) $(test_pipe_DEPENDENCIES)
+ @rm -f test-pipe$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_pipe_OBJECTS) $(test_pipe_LDADD) $(LIBS)
+test-pipe2$(EXEEXT): $(test_pipe2_OBJECTS) $(test_pipe2_DEPENDENCIES)
+ @rm -f test-pipe2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_pipe2_OBJECTS) $(test_pipe2_LDADD) $(LIBS)
+test-posix_spawn1$(EXEEXT): $(test_posix_spawn1_OBJECTS) $(test_posix_spawn1_DEPENDENCIES)
+ @rm -f test-posix_spawn1$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_posix_spawn1_OBJECTS) $(test_posix_spawn1_LDADD) $(LIBS)
+test-posix_spawn2$(EXEEXT): $(test_posix_spawn2_OBJECTS) $(test_posix_spawn2_DEPENDENCIES)
+ @rm -f test-posix_spawn2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_posix_spawn2_OBJECTS) $(test_posix_spawn2_LDADD) $(LIBS)
+test-printf-frexp$(EXEEXT): $(test_printf_frexp_OBJECTS) $(test_printf_frexp_DEPENDENCIES)
+ @rm -f test-printf-frexp$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_printf_frexp_OBJECTS) $(test_printf_frexp_LDADD) $(LIBS)
+test-printf-frexpl$(EXEEXT): $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_DEPENDENCIES)
+ @rm -f test-printf-frexpl$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_printf_frexpl_OBJECTS) $(test_printf_frexpl_LDADD) $(LIBS)
+test-quotearg$(EXEEXT): $(test_quotearg_OBJECTS) $(test_quotearg_DEPENDENCIES)
+ @rm -f test-quotearg$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_quotearg_OBJECTS) $(test_quotearg_LDADD) $(LIBS)
+test-rawmemchr$(EXEEXT): $(test_rawmemchr_OBJECTS) $(test_rawmemchr_DEPENDENCIES)
+ @rm -f test-rawmemchr$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_rawmemchr_OBJECTS) $(test_rawmemchr_LDADD) $(LIBS)
+test-readlink$(EXEEXT): $(test_readlink_OBJECTS) $(test_readlink_DEPENDENCIES)
+ @rm -f test-readlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_readlink_OBJECTS) $(test_readlink_LDADD) $(LIBS)
+test-rename$(EXEEXT): $(test_rename_OBJECTS) $(test_rename_DEPENDENCIES)
+ @rm -f test-rename$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_rename_OBJECTS) $(test_rename_LDADD) $(LIBS)
+test-rmdir$(EXEEXT): $(test_rmdir_OBJECTS) $(test_rmdir_DEPENDENCIES)
+ @rm -f test-rmdir$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_rmdir_OBJECTS) $(test_rmdir_LDADD) $(LIBS)
+test-sched$(EXEEXT): $(test_sched_OBJECTS) $(test_sched_DEPENDENCIES)
+ @rm -f test-sched$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sched_OBJECTS) $(test_sched_LDADD) $(LIBS)
+test-setenv$(EXEEXT): $(test_setenv_OBJECTS) $(test_setenv_DEPENDENCIES)
+ @rm -f test-setenv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_setenv_OBJECTS) $(test_setenv_LDADD) $(LIBS)
+test-sigaction$(EXEEXT): $(test_sigaction_OBJECTS) $(test_sigaction_DEPENDENCIES)
+ @rm -f test-sigaction$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sigaction_OBJECTS) $(test_sigaction_LDADD) $(LIBS)
+test-signal$(EXEEXT): $(test_signal_OBJECTS) $(test_signal_DEPENDENCIES)
+ @rm -f test-signal$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_signal_OBJECTS) $(test_signal_LDADD) $(LIBS)
+test-signbit$(EXEEXT): $(test_signbit_OBJECTS) $(test_signbit_DEPENDENCIES)
+ @rm -f test-signbit$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_signbit_OBJECTS) $(test_signbit_LDADD) $(LIBS)
+test-snprintf$(EXEEXT): $(test_snprintf_OBJECTS) $(test_snprintf_DEPENDENCIES)
+ @rm -f test-snprintf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_snprintf_OBJECTS) $(test_snprintf_LDADD) $(LIBS)
+test-snprintf-posix$(EXEEXT): $(test_snprintf_posix_OBJECTS) $(test_snprintf_posix_DEPENDENCIES)
+ @rm -f test-snprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_snprintf_posix_OBJECTS) $(test_snprintf_posix_LDADD) $(LIBS)
+test-spawn$(EXEEXT): $(test_spawn_OBJECTS) $(test_spawn_DEPENDENCIES)
+ @rm -f test-spawn$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_spawn_OBJECTS) $(test_spawn_LDADD) $(LIBS)
+test-sprintf-posix$(EXEEXT): $(test_sprintf_posix_OBJECTS) $(test_sprintf_posix_DEPENDENCIES)
+ @rm -f test-sprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sprintf_posix_OBJECTS) $(test_sprintf_posix_LDADD) $(LIBS)
+test-stat$(EXEEXT): $(test_stat_OBJECTS) $(test_stat_DEPENDENCIES)
+ @rm -f test-stat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stat_OBJECTS) $(test_stat_LDADD) $(LIBS)
+test-stdbool$(EXEEXT): $(test_stdbool_OBJECTS) $(test_stdbool_DEPENDENCIES)
+ @rm -f test-stdbool$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdbool_OBJECTS) $(test_stdbool_LDADD) $(LIBS)
+test-stddef$(EXEEXT): $(test_stddef_OBJECTS) $(test_stddef_DEPENDENCIES)
+ @rm -f test-stddef$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stddef_OBJECTS) $(test_stddef_LDADD) $(LIBS)
+test-stdint$(EXEEXT): $(test_stdint_OBJECTS) $(test_stdint_DEPENDENCIES)
+ @rm -f test-stdint$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdint_OBJECTS) $(test_stdint_LDADD) $(LIBS)
+test-stdio$(EXEEXT): $(test_stdio_OBJECTS) $(test_stdio_DEPENDENCIES)
+ @rm -f test-stdio$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdio_OBJECTS) $(test_stdio_LDADD) $(LIBS)
+test-stdlib$(EXEEXT): $(test_stdlib_OBJECTS) $(test_stdlib_DEPENDENCIES)
+ @rm -f test-stdlib$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_stdlib_OBJECTS) $(test_stdlib_LDADD) $(LIBS)
+test-strchrnul$(EXEEXT): $(test_strchrnul_OBJECTS) $(test_strchrnul_DEPENDENCIES)
+ @rm -f test-strchrnul$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strchrnul_OBJECTS) $(test_strchrnul_LDADD) $(LIBS)
+test-strerror$(EXEEXT): $(test_strerror_OBJECTS) $(test_strerror_DEPENDENCIES)
+ @rm -f test-strerror$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strerror_OBJECTS) $(test_strerror_LDADD) $(LIBS)
+test-striconv$(EXEEXT): $(test_striconv_OBJECTS) $(test_striconv_DEPENDENCIES)
+ @rm -f test-striconv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_striconv_OBJECTS) $(test_striconv_LDADD) $(LIBS)
+test-string$(EXEEXT): $(test_string_OBJECTS) $(test_string_DEPENDENCIES)
+ @rm -f test-string$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_string_OBJECTS) $(test_string_LDADD) $(LIBS)
+test-strtod$(EXEEXT): $(test_strtod_OBJECTS) $(test_strtod_DEPENDENCIES)
+ @rm -f test-strtod$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_strtod_OBJECTS) $(test_strtod_LDADD) $(LIBS)
+test-symlink$(EXEEXT): $(test_symlink_OBJECTS) $(test_symlink_DEPENDENCIES)
+ @rm -f test-symlink$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_symlink_OBJECTS) $(test_symlink_LDADD) $(LIBS)
+test-sys_stat$(EXEEXT): $(test_sys_stat_OBJECTS) $(test_sys_stat_DEPENDENCIES)
+ @rm -f test-sys_stat$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_stat_OBJECTS) $(test_sys_stat_LDADD) $(LIBS)
+test-sys_time$(EXEEXT): $(test_sys_time_OBJECTS) $(test_sys_time_DEPENDENCIES)
+ @rm -f test-sys_time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_time_OBJECTS) $(test_sys_time_LDADD) $(LIBS)
+test-sys_wait$(EXEEXT): $(test_sys_wait_OBJECTS) $(test_sys_wait_DEPENDENCIES)
+ @rm -f test-sys_wait$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_sys_wait_OBJECTS) $(test_sys_wait_LDADD) $(LIBS)
+test-time$(EXEEXT): $(test_time_OBJECTS) $(test_time_DEPENDENCIES)
+ @rm -f test-time$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_time_OBJECTS) $(test_time_LDADD) $(LIBS)
+uniwidth/$(am__dirstamp):
+ @$(MKDIR_P) uniwidth
+ @: > uniwidth/$(am__dirstamp)
+uniwidth/$(DEPDIR)/$(am__dirstamp):
+ @$(MKDIR_P) uniwidth/$(DEPDIR)
+ @: > uniwidth/$(DEPDIR)/$(am__dirstamp)
+uniwidth/test-uc_width.$(OBJEXT): uniwidth/$(am__dirstamp) \
+ uniwidth/$(DEPDIR)/$(am__dirstamp)
+test-uc_width$(EXEEXT): $(test_uc_width_OBJECTS) $(test_uc_width_DEPENDENCIES)
+ @rm -f test-uc_width$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_uc_width_OBJECTS) $(test_uc_width_LDADD) $(LIBS)
+uniwidth/test-uc_width2.$(OBJEXT): uniwidth/$(am__dirstamp) \
+ uniwidth/$(DEPDIR)/$(am__dirstamp)
+test-uc_width2$(EXEEXT): $(test_uc_width2_OBJECTS) $(test_uc_width2_DEPENDENCIES)
+ @rm -f test-uc_width2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_uc_width2_OBJECTS) $(test_uc_width2_LDADD) $(LIBS)
+test-unistd$(EXEEXT): $(test_unistd_OBJECTS) $(test_unistd_DEPENDENCIES)
+ @rm -f test-unistd$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_unistd_OBJECTS) $(test_unistd_LDADD) $(LIBS)
+test-unsetenv$(EXEEXT): $(test_unsetenv_OBJECTS) $(test_unsetenv_DEPENDENCIES)
+ @rm -f test-unsetenv$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_unsetenv_OBJECTS) $(test_unsetenv_LDADD) $(LIBS)
+test-vasnprintf$(EXEEXT): $(test_vasnprintf_OBJECTS) $(test_vasnprintf_DEPENDENCIES)
+ @rm -f test-vasnprintf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vasnprintf_OBJECTS) $(test_vasnprintf_LDADD) $(LIBS)
+test-vasnprintf-posix$(EXEEXT): $(test_vasnprintf_posix_OBJECTS) $(test_vasnprintf_posix_DEPENDENCIES)
+ @rm -f test-vasnprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vasnprintf_posix_OBJECTS) $(test_vasnprintf_posix_LDADD) $(LIBS)
+test-vasnprintf-posix2$(EXEEXT): $(test_vasnprintf_posix2_OBJECTS) $(test_vasnprintf_posix2_DEPENDENCIES)
+ @rm -f test-vasnprintf-posix2$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vasnprintf_posix2_OBJECTS) $(test_vasnprintf_posix2_LDADD) $(LIBS)
+test-vasprintf$(EXEEXT): $(test_vasprintf_OBJECTS) $(test_vasprintf_DEPENDENCIES)
+ @rm -f test-vasprintf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vasprintf_OBJECTS) $(test_vasprintf_LDADD) $(LIBS)
+test-vasprintf-posix$(EXEEXT): $(test_vasprintf_posix_OBJECTS) $(test_vasprintf_posix_DEPENDENCIES)
+ @rm -f test-vasprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vasprintf_posix_OBJECTS) $(test_vasprintf_posix_LDADD) $(LIBS)
+test-vfprintf-posix$(EXEEXT): $(test_vfprintf_posix_OBJECTS) $(test_vfprintf_posix_DEPENDENCIES)
+ @rm -f test-vfprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vfprintf_posix_OBJECTS) $(test_vfprintf_posix_LDADD) $(LIBS)
+test-vprintf-posix$(EXEEXT): $(test_vprintf_posix_OBJECTS) $(test_vprintf_posix_DEPENDENCIES)
+ @rm -f test-vprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_vprintf_posix_OBJECTS) $(test_vprintf_posix_LDADD) $(LIBS)
+test-wchar$(EXEEXT): $(test_wchar_OBJECTS) $(test_wchar_DEPENDENCIES)
+ @rm -f test-wchar$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wchar_OBJECTS) $(test_wchar_LDADD) $(LIBS)
+test-wcrtomb$(EXEEXT): $(test_wcrtomb_OBJECTS) $(test_wcrtomb_DEPENDENCIES)
+ @rm -f test-wcrtomb$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wcrtomb_OBJECTS) $(test_wcrtomb_LDADD) $(LIBS)
+test-wctype$(EXEEXT): $(test_wctype_OBJECTS) $(test_wctype_DEPENDENCIES)
+ @rm -f test-wctype$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wctype_OBJECTS) $(test_wctype_LDADD) $(LIBS)
+test-wcwidth$(EXEEXT): $(test_wcwidth_OBJECTS) $(test_wcwidth_DEPENDENCIES)
+ @rm -f test-wcwidth$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_wcwidth_OBJECTS) $(test_wcwidth_LDADD) $(LIBS)
+test-xalloc-die$(EXEEXT): $(test_xalloc_die_OBJECTS) $(test_xalloc_die_DEPENDENCIES)
+ @rm -f test-xalloc-die$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xalloc_die_OBJECTS) $(test_xalloc_die_LDADD) $(LIBS)
+test-xfprintf-posix$(EXEEXT): $(test_xfprintf_posix_OBJECTS) $(test_xfprintf_posix_DEPENDENCIES)
+ @rm -f test-xfprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xfprintf_posix_OBJECTS) $(test_xfprintf_posix_LDADD) $(LIBS)
+test-xmemdup0$(EXEEXT): $(test_xmemdup0_OBJECTS) $(test_xmemdup0_DEPENDENCIES)
+ @rm -f test-xmemdup0$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xmemdup0_OBJECTS) $(test_xmemdup0_LDADD) $(LIBS)
+test-xprintf-posix$(EXEEXT): $(test_xprintf_posix_OBJECTS) $(test_xprintf_posix_DEPENDENCIES)
+ @rm -f test-xprintf-posix$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xprintf_posix_OBJECTS) $(test_xprintf_posix_LDADD) $(LIBS)
+test-xvasprintf$(EXEEXT): $(test_xvasprintf_OBJECTS) $(test_xvasprintf_DEPENDENCIES)
+ @rm -f test-xvasprintf$(EXEEXT)
+ $(AM_V_CCLD)$(LINK) $(test_xvasprintf_OBJECTS) $(test_xvasprintf_LDADD) $(LIBS)
+
+mostlyclean-compile:
+ -rm -f *.$(OBJEXT)
+ -rm -f uniwidth/test-uc_width.$(OBJEXT)
+ -rm -f uniwidth/test-uc_width2.$(OBJEXT)
+
+distclean-compile:
+ -rm -f *.tab.c
+
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/getpagesize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_array_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gl_array_oset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/link.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/obstack_printf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/putenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/strdup.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/symlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-alloca-opt.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-array_oset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-avltree_oset.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-binary-io.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-bitrotate.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-btowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-ctype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strcasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-c-strncasecmp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-canonicalize-lgpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-cloexec.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-closein.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dirname.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-dup2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-environ.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-errno.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl-h.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fcntl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fflush2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-filenamecat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen-safer.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fopen.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpending.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fpurge.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadahead.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freading.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadptr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadptr2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-freadseek.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-frexpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseeko.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-fseterr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-ftello.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-getdtablesize.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-gettimeofday.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-iconv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-inttypes.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnand-nolibm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanf-nolibm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-isnanl-nolibm.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-link.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-linkedhash_list.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lseek.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-lstat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-malloca.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-math.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbrtowc.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsinit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-mbsstr3.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memchr2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-memmem.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-nl_langinfo.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-obstack-printf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-open.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-pipe2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn1.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-posix_spawn2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexp.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-printf-frexpl.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-quotearg.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rawmemchr.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-readlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rename.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-rmdir.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sched.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-setenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sigaction.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signal.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-signbit.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-snprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-spawn.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdbool.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stddef.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdint.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdio.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-stdlib.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strchrnul.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strerror.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-striconv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-string.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-strtod.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-symlink.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_stat.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-sys_wait.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-time.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unistd.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-unsetenv.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf-posix2.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasnprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vasprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vfprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-vprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wchar.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcrtomb.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wctype.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-wcwidth.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xalloc-die.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xfprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xmemdup0.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xprintf-posix.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test-xvasprintf.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wctob.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width.Po@am__quote@
+@AMDEP_TRUE@@am__include@ @am__quote@uniwidth/$(DEPDIR)/test-uc_width2.Po@am__quote@
+
+.c.o:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ $<
+
+.c.obj:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
+
+.c.lo:
+@am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\
+@am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo
+@am__fastdepCC_FALSE@ $(AM_V_CC) @AM_BACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
+@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
+
+mostlyclean-libtool:
+ -rm -f *.lo
+
+clean-libtool:
+ -rm -rf .libs _libs
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+# (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+$(RECURSIVE_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ target=`echo $@ | sed s/-recursive//`; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ dot_seen=yes; \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done; \
+ if test "$$dot_seen" = "no"; then \
+ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+ fi; test -z "$$fail"
+
+$(RECURSIVE_CLEAN_TARGETS):
+ @fail= failcom='exit 1'; \
+ for f in x $$MAKEFLAGS; do \
+ case $$f in \
+ *=* | --[!k]*);; \
+ *k*) failcom='fail=yes';; \
+ esac; \
+ done; \
+ dot_seen=no; \
+ case "$@" in \
+ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
+ *) list='$(SUBDIRS)' ;; \
+ esac; \
+ rev=''; for subdir in $$list; do \
+ if test "$$subdir" = "."; then :; else \
+ rev="$$subdir $$rev"; \
+ fi; \
+ done; \
+ rev="$$rev ."; \
+ target=`echo $@ | sed s/-recursive//`; \
+ for subdir in $$rev; do \
+ echo "Making $$target in $$subdir"; \
+ if test "$$subdir" = "."; then \
+ local_target="$$target-am"; \
+ else \
+ local_target="$$target"; \
+ fi; \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+ || eval $$failcom; \
+ done && test -z "$$fail"
+tags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+ done
+ctags-recursive:
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
+ done
+
+ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ mkid -fID $$unique
+tags: TAGS
+
+TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ set x; \
+ here=`pwd`; \
+ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
+ include_option=--etags-include; \
+ empty_fix=.; \
+ else \
+ include_option=--include; \
+ empty_fix=; \
+ fi; \
+ list='$(SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test ! -f $$subdir/TAGS || \
+ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
+ fi; \
+ done; \
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ shift; \
+ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
+ test -n "$$unique" || unique=$$empty_fix; \
+ if test $$# -gt 0; then \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ "$$@" $$unique; \
+ else \
+ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+ $$unique; \
+ fi; \
+ fi
+ctags: CTAGS
+CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
+ $(TAGS_FILES) $(LISP)
+ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
+ unique=`for i in $$list; do \
+ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
+ done | \
+ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \
+ END { if (nonempty) { for (i in files) print i; }; }'`; \
+ test -z "$(CTAGS_ARGS)$$unique" \
+ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+ $$unique
+
+GTAGS:
+ here=`$(am__cd) $(top_builddir) && pwd` \
+ && $(am__cd) $(top_srcdir) \
+ && gtags -i $(GTAGS_ARGS) "$$here"
+
+distclean-tags:
+ -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+
+# To be appended to the command running the test. Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post = \
+>$@-t 2>&1; \
+estatus=$$?; \
+if test -n '$(DISABLE_HARD_ERRORS)' \
+ && test $$estatus -eq 99; then \
+ estatus=1; \
+fi; \
+TERM=$$__SAVED_TERM; export TERM; \
+$(am__tty_colors); \
+xfailed=PASS; \
+case " $(XFAIL_TESTS) " in \
+ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \
+ xfailed=XFAIL;; \
+esac; \
+case $$estatus:$$xfailed in \
+ 0:XFAIL) col=$$red; res=XPASS;; \
+ 0:*) col=$$grn; res=PASS ;; \
+ 77:*) col=$$blu; res=SKIP ;; \
+ 99:*) col=$$red; res=FAIL ;; \
+ *:XFAIL) col=$$lgn; res=XFAIL;; \
+ *:*) col=$$red; res=FAIL ;; \
+esac; \
+echo "$${col}$$res$${std}: $$f"; \
+echo "$$res: $$f (exit: $$estatus)" | \
+ $(am__rst_section) >$@; \
+cat $@-t >>$@; \
+rm -f $@-t
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+ @$(am__sh_e_setup); \
+ list='$(TEST_LOGS)'; \
+ results=`for f in $$list; do \
+ read line < $$f && echo "$$line" || echo FAIL; \
+ done`; \
+ all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[ ]*//'`; \
+ fail=`echo "$$results" | grep -c '^FAIL'`; \
+ pass=`echo "$$results" | grep -c '^PASS'`; \
+ skip=`echo "$$results" | grep -c '^SKIP'`; \
+ xfail=`echo "$$results" | grep -c '^XFAIL'`; \
+ xpass=`echo "$$results" | grep -c '^XPASS'`; \
+ failures=`expr $$fail + $$xpass`; \
+ all=`expr $$all - $$skip`; \
+ if test "$$all" -eq 1; then tests=test; All=; \
+ else tests=tests; All="All "; fi; \
+ case fail=$$fail:xpass=$$xpass:xfail=$$xfail in \
+ fail=0:xpass=0:xfail=0) \
+ msg="$$All$$all $$tests passed. "; \
+ exit=true;; \
+ fail=0:xpass=0:xfail=*) \
+ msg="$$All$$all $$tests behaved as expected"; \
+ if test "$$xfail" -eq 1; then xfailures=failure; \
+ else xfailures=failures; fi; \
+ msg="$$msg ($$xfail expected $$xfailures). "; \
+ exit=true;; \
+ fail=*:xpass=0:xfail=*) \
+ msg="$$fail of $$all $$tests failed. "; \
+ exit=false;; \
+ fail=*:xpass=*:xfail=*) \
+ msg="$$failures of $$all $$tests did not behave as expected"; \
+ if test "$$xpass" -eq 1; then xpasses=pass; \
+ else xpasses=passes; fi; \
+ msg="$$msg ($$xpass unexpected $$xpasses). "; \
+ exit=false;; \
+ *) \
+ echo >&2 "incorrect case"; exit 4;; \
+ esac; \
+ if test "$$skip" -ne 0; then \
+ if test "$$skip" -eq 1; then \
+ msg="$$msg($$skip test was not run). "; \
+ else \
+ msg="$$msg($$skip tests were not run). "; \
+ fi; \
+ fi; \
+ { \
+ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \
+ $(am__rst_title); \
+ echo "$$msg"; \
+ echo; \
+ echo ".. contents:: :depth: 2"; \
+ echo; \
+ for f in $$list; do \
+ read line < $$f; \
+ case $$line in \
+ PASS:*|XFAIL:*);; \
+ *) echo; cat $$f;; \
+ esac; \
+ done; \
+ } >$(TEST_SUITE_LOG).tmp; \
+ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \
+ if test "$$failures" -ne 0; then \
+ msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG). "; \
+ if test -n "$(PACKAGE_BUGREPORT)"; then \
+ msg="$${msg}Please report to $(PACKAGE_BUGREPORT). "; \
+ fi; \
+ fi; \
+ test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG); \
+ $(am__tty_colors); \
+ if $$exit; then \
+ echo $(ECHO_N) "$$grn$(ECHO_C)"; \
+ else \
+ echo $(ECHO_N) "$$red$(ECHO_C)"; \
+ fi; \
+ echo "$$msg" | $(am__text_box); \
+ echo $(ECHO_N) "$$std$(ECHO_C)"; \
+ $$exit
+
+# Run all the tests.
+check-TESTS:
+ @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+ @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+ @list='$(TEST_LOGS)'; \
+ list=`for f in $$list; do \
+ test .log = $$f || echo $$f; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$list"
+
+.log.html:
+ @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py'; \
+ for r2h in $$list; do \
+ if ($$r2h --version) >/dev/null 2>&1; then \
+ R2H=$$r2h; \
+ fi; \
+ done; \
+ if test -z "$$R2H"; then \
+ echo >&2 "cannot find rst2html, cannot create $@"; \
+ exit 2; \
+ fi; \
+ $$R2H $< >$@.tmp
+ @mv $@.tmp $@
+
+# Be sure to run check first, and then to convert the result.
+# Beware of concurrent executions. Run "check" not "check-TESTS", as
+# check-SCRIPTS and other dependencies are rebuilt by the former only.
+# And expect check to fail.
+check-html:
+ @if $(MAKE) $(AM_MAKEFLAGS) check; then \
+ rv=0; else rv=$$?; \
+ fi; \
+ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4; \
+ exit $$rv
+recheck recheck-html:
+ @target=`echo $@ | sed 's,^re,,'`; \
+ list='$(TEST_LOGS)'; \
+ list=`for f in $$list; do \
+ test -f $$f || continue; \
+ if read line < $$f; then \
+ case $$line in FAIL*|XPASS*) echo $$f;; esac; \
+ else echo $$f; fi; \
+ done | tr '\012\015' ' '`; \
+ $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
+test-alloca-opt.log: test-alloca-opt$(EXEEXT)
+ @p='test-alloca-opt$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-array_list.log: test-array_list$(EXEEXT)
+ @p='test-array_list$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-array_oset.log: test-array_oset$(EXEEXT)
+ @p='test-array_oset$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-avltree_oset.log: test-avltree_oset$(EXEEXT)
+ @p='test-avltree_oset$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-binary-io.sh.log: test-binary-io.sh
+ @p='test-binary-io.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-bitrotate.log: test-bitrotate$(EXEEXT)
+ @p='test-bitrotate$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-btowc1.sh.log: test-btowc1.sh
+ @p='test-btowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-btowc2.sh.log: test-btowc2.sh
+ @p='test-btowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-c-ctype.log: test-c-ctype$(EXEEXT)
+ @p='test-c-ctype$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-c-strcase.sh.log: test-c-strcase.sh
+ @p='test-c-strcase.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-canonicalize-lgpl.log: test-canonicalize-lgpl$(EXEEXT)
+ @p='test-canonicalize-lgpl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-cloexec.log: test-cloexec$(EXEEXT)
+ @p='test-cloexec$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-closein.sh.log: test-closein.sh
+ @p='test-closein.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-dirname.log: test-dirname$(EXEEXT)
+ @p='test-dirname$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-dup2.log: test-dup2$(EXEEXT)
+ @p='test-dup2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-environ.log: test-environ$(EXEEXT)
+ @p='test-environ$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-errno.log: test-errno$(EXEEXT)
+ @p='test-errno$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fcntl-h.log: test-fcntl-h$(EXEEXT)
+ @p='test-fcntl-h$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fcntl.log: test-fcntl$(EXEEXT)
+ @p='test-fcntl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fflush.log: test-fflush$(EXEEXT)
+ @p='test-fflush$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fflush2.sh.log: test-fflush2.sh
+ @p='test-fflush2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-filenamecat.log: test-filenamecat$(EXEEXT)
+ @p='test-filenamecat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fopen-safer.log: test-fopen-safer$(EXEEXT)
+ @p='test-fopen-safer$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fopen.log: test-fopen$(EXEEXT)
+ @p='test-fopen$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fpending.sh.log: test-fpending.sh
+ @p='test-fpending.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fpurge.log: test-fpurge$(EXEEXT)
+ @p='test-fpurge$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-freadahead.sh.log: test-freadahead.sh
+ @p='test-freadahead.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-freading.log: test-freading$(EXEEXT)
+ @p='test-freading$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-freadptr.sh.log: test-freadptr.sh
+ @p='test-freadptr.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-freadptr2.sh.log: test-freadptr2.sh
+ @p='test-freadptr2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-freadseek.sh.log: test-freadseek.sh
+ @p='test-freadseek.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-frexp-nolibm.log: test-frexp-nolibm$(EXEEXT)
+ @p='test-frexp-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-frexpl-nolibm.log: test-frexpl-nolibm$(EXEEXT)
+ @p='test-frexpl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fseeko.sh.log: test-fseeko.sh
+ @p='test-fseeko.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fseeko2.sh.log: test-fseeko2.sh
+ @p='test-fseeko2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-fseterr.log: test-fseterr$(EXEEXT)
+ @p='test-fseterr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-ftello.sh.log: test-ftello.sh
+ @p='test-ftello.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-ftello2.sh.log: test-ftello2.sh
+ @p='test-ftello2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-getdtablesize.log: test-getdtablesize$(EXEEXT)
+ @p='test-getdtablesize$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-gettimeofday.log: test-gettimeofday$(EXEEXT)
+ @p='test-gettimeofday$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-iconv.log: test-iconv$(EXEEXT)
+ @p='test-iconv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-inttypes.log: test-inttypes$(EXEEXT)
+ @p='test-inttypes$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-isnand-nolibm.log: test-isnand-nolibm$(EXEEXT)
+ @p='test-isnand-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-isnanf-nolibm.log: test-isnanf-nolibm$(EXEEXT)
+ @p='test-isnanf-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-isnanl-nolibm.log: test-isnanl-nolibm$(EXEEXT)
+ @p='test-isnanl-nolibm$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-langinfo.log: test-langinfo$(EXEEXT)
+ @p='test-langinfo$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-link.log: test-link$(EXEEXT)
+ @p='test-link$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-linkedhash_list.log: test-linkedhash_list$(EXEEXT)
+ @p='test-linkedhash_list$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-lseek.sh.log: test-lseek.sh
+ @p='test-lseek.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-lstat.log: test-lstat$(EXEEXT)
+ @p='test-lstat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-malloca.log: test-malloca$(EXEEXT)
+ @p='test-malloca$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-math.log: test-math$(EXEEXT)
+ @p='test-math$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbrtowc1.sh.log: test-mbrtowc1.sh
+ @p='test-mbrtowc1.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbrtowc2.sh.log: test-mbrtowc2.sh
+ @p='test-mbrtowc2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbrtowc3.sh.log: test-mbrtowc3.sh
+ @p='test-mbrtowc3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbrtowc4.sh.log: test-mbrtowc4.sh
+ @p='test-mbrtowc4.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbsinit.sh.log: test-mbsinit.sh
+ @p='test-mbsinit.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbsstr1.log: test-mbsstr1$(EXEEXT)
+ @p='test-mbsstr1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbsstr2.sh.log: test-mbsstr2.sh
+ @p='test-mbsstr2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-mbsstr3.sh.log: test-mbsstr3.sh
+ @p='test-mbsstr3.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-memchr.log: test-memchr$(EXEEXT)
+ @p='test-memchr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-memchr2.log: test-memchr2$(EXEEXT)
+ @p='test-memchr2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-memmem.log: test-memmem$(EXEEXT)
+ @p='test-memmem$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-nl_langinfo.sh.log: test-nl_langinfo.sh
+ @p='test-nl_langinfo.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-obstack-printf.log: test-obstack-printf$(EXEEXT)
+ @p='test-obstack-printf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-open.log: test-open$(EXEEXT)
+ @p='test-open$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-pipe.sh.log: test-pipe.sh
+ @p='test-pipe.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-pipe2.log: test-pipe2$(EXEEXT)
+ @p='test-pipe2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-posix_spawn1.log: test-posix_spawn1$(EXEEXT)
+ @p='test-posix_spawn1$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-posix_spawn2.log: test-posix_spawn2$(EXEEXT)
+ @p='test-posix_spawn2$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-printf-frexp.log: test-printf-frexp$(EXEEXT)
+ @p='test-printf-frexp$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-printf-frexpl.log: test-printf-frexpl$(EXEEXT)
+ @p='test-printf-frexpl$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-quotearg.sh.log: test-quotearg.sh
+ @p='test-quotearg.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-rawmemchr.log: test-rawmemchr$(EXEEXT)
+ @p='test-rawmemchr$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-readlink.log: test-readlink$(EXEEXT)
+ @p='test-readlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-rename.log: test-rename$(EXEEXT)
+ @p='test-rename$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-rmdir.log: test-rmdir$(EXEEXT)
+ @p='test-rmdir$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sched.log: test-sched$(EXEEXT)
+ @p='test-sched$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-setenv.log: test-setenv$(EXEEXT)
+ @p='test-setenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sigaction.log: test-sigaction$(EXEEXT)
+ @p='test-sigaction$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-signal.log: test-signal$(EXEEXT)
+ @p='test-signal$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-signbit.log: test-signbit$(EXEEXT)
+ @p='test-signbit$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-snprintf-posix.log: test-snprintf-posix$(EXEEXT)
+ @p='test-snprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-snprintf.log: test-snprintf$(EXEEXT)
+ @p='test-snprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-spawn.log: test-spawn$(EXEEXT)
+ @p='test-spawn$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sprintf-posix.log: test-sprintf-posix$(EXEEXT)
+ @p='test-sprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stat.log: test-stat$(EXEEXT)
+ @p='test-stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stdbool.log: test-stdbool$(EXEEXT)
+ @p='test-stdbool$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stddef.log: test-stddef$(EXEEXT)
+ @p='test-stddef$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stdint.log: test-stdint$(EXEEXT)
+ @p='test-stdint$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stdio.log: test-stdio$(EXEEXT)
+ @p='test-stdio$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-stdlib.log: test-stdlib$(EXEEXT)
+ @p='test-stdlib$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-strchrnul.log: test-strchrnul$(EXEEXT)
+ @p='test-strchrnul$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-strerror.log: test-strerror$(EXEEXT)
+ @p='test-strerror$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-striconv.log: test-striconv$(EXEEXT)
+ @p='test-striconv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-string.log: test-string$(EXEEXT)
+ @p='test-string$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-strtod.log: test-strtod$(EXEEXT)
+ @p='test-strtod$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-symlink.log: test-symlink$(EXEEXT)
+ @p='test-symlink$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sys_stat.log: test-sys_stat$(EXEEXT)
+ @p='test-sys_stat$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sys_time.log: test-sys_time$(EXEEXT)
+ @p='test-sys_time$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-sys_wait.log: test-sys_wait$(EXEEXT)
+ @p='test-sys_wait$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-time.log: test-time$(EXEEXT)
+ @p='test-time$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-dup-safer.log: test-dup-safer$(EXEEXT)
+ @p='test-dup-safer$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-unistd.log: test-unistd$(EXEEXT)
+ @p='test-unistd$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-uc_width.log: test-uc_width$(EXEEXT)
+ @p='test-uc_width$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+uniwidth/test-uc_width2.sh.log: uniwidth/test-uc_width2.sh
+ @p='uniwidth/test-uc_width2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-unsetenv.log: test-unsetenv$(EXEEXT)
+ @p='test-unsetenv$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-update-copyright.sh.log: test-update-copyright.sh
+ @p='test-update-copyright.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vasnprintf-posix.log: test-vasnprintf-posix$(EXEEXT)
+ @p='test-vasnprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vasnprintf-posix2.sh.log: test-vasnprintf-posix2.sh
+ @p='test-vasnprintf-posix2.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vasnprintf.log: test-vasnprintf$(EXEEXT)
+ @p='test-vasnprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vasprintf-posix.log: test-vasprintf-posix$(EXEEXT)
+ @p='test-vasprintf-posix$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vasprintf.log: test-vasprintf$(EXEEXT)
+ @p='test-vasprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vc-list-files-git.sh.log: test-vc-list-files-git.sh
+ @p='test-vc-list-files-git.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vc-list-files-cvs.sh.log: test-vc-list-files-cvs.sh
+ @p='test-vc-list-files-cvs.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vfprintf-posix.sh.log: test-vfprintf-posix.sh
+ @p='test-vfprintf-posix.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-vprintf-posix.sh.log: test-vprintf-posix.sh
+ @p='test-vprintf-posix.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-wchar.log: test-wchar$(EXEEXT)
+ @p='test-wchar$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-wcrtomb.sh.log: test-wcrtomb.sh
+ @p='test-wcrtomb.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-wctype.log: test-wctype$(EXEEXT)
+ @p='test-wctype$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-wcwidth.log: test-wcwidth$(EXEEXT)
+ @p='test-wcwidth$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-xalloc-die.sh.log: test-xalloc-die.sh
+ @p='test-xalloc-die.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-xmemdup0.log: test-xmemdup0$(EXEEXT)
+ @p='test-xmemdup0$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-xprintf-posix.sh.log: test-xprintf-posix.sh
+ @p='test-xprintf-posix.sh'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+test-xvasprintf.log: test-xvasprintf$(EXEEXT)
+ @p='test-xvasprintf$(EXEEXT)'; $(am__check_pre) $(LOG_COMPILE) "$$tst" $(am__check_post)
+.test.log:
+ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+@am__EXEEXT_TRUE@.test$(EXEEXT).log:
+@am__EXEEXT_TRUE@ @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
+
+distdir: $(DISTFILES)
+ @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
+ list='$(DISTFILES)'; \
+ dist_files=`for file in $$list; do echo $$file; done | \
+ sed -e "s|^$$srcdirstrip/||;t" \
+ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
+ case $$dist_files in \
+ */*) $(MKDIR_P) `echo "$$dist_files" | \
+ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
+ sort -u` ;; \
+ esac; \
+ for file in $$dist_files; do \
+ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+ if test -d $$d/$$file; then \
+ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+ if test -d "$(distdir)/$$file"; then \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
+ fi; \
+ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
+ else \
+ test -f "$(distdir)/$$file" \
+ || cp -p $$d/$$file "$(distdir)/$$file" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ test -d "$(distdir)/$$subdir" \
+ || $(MKDIR_P) "$(distdir)/$$subdir" \
+ || exit 1; \
+ fi; \
+ done
+ @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+ if test "$$subdir" = .; then :; else \
+ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
+ $(am__relativize); \
+ new_distdir=$$reldir; \
+ dir1=$$subdir; dir2="$(top_distdir)"; \
+ $(am__relativize); \
+ new_top_distdir=$$reldir; \
+ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
+ ($(am__cd) $$subdir && \
+ $(MAKE) $(AM_MAKEFLAGS) \
+ top_distdir="$$new_top_distdir" \
+ distdir="$$new_distdir" \
+ am__remove_distdir=: \
+ am__skip_length_check=: \
+ am__skip_mode_fix=: \
+ distdir) \
+ || exit 1; \
+ fi; \
+ done
+check-am: all-am
+ $(MAKE) $(AM_MAKEFLAGS) $(check_LIBRARIES) $(check_PROGRAMS)
+ $(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) check-recursive
+all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+installdirs: installdirs-recursive
+installdirs-am:
+install: $(BUILT_SOURCES)
+ $(MAKE) $(AM_MAKEFLAGS) install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
+
+install-am: all-am
+ @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+
+installcheck: installcheck-recursive
+install-strip:
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ `test -z '$(STRIP)' || \
+ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+ -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
+ -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+ -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
+ -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
+ -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+
+clean-generic:
+ -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
+
+distclean-generic:
+ -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
+ -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
+ -rm -f uniwidth/$(DEPDIR)/$(am__dirstamp)
+ -rm -f uniwidth/$(am__dirstamp)
+ -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+maintainer-clean-generic:
+ @echo "This command is intended for maintainers to use"
+ @echo "it deletes files that may require special tools to rebuild."
+ -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
+ -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
+clean: clean-recursive
+
+clean-am: clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+ clean-libtool clean-local clean-noinstLIBRARIES \
+ clean-noinstPROGRAMS mostlyclean-am
+
+distclean: distclean-recursive
+ -rm -rf ./$(DEPDIR) uniwidth/$(DEPDIR)
+ -rm -f Makefile
+distclean-am: clean-am distclean-compile distclean-generic \
+ distclean-tags
+
+dvi: dvi-recursive
+
+dvi-am:
+
+html: html-recursive
+
+html-am:
+
+info: info-recursive
+
+info-am:
+
+install-data-am:
+
+install-dvi: install-dvi-recursive
+
+install-dvi-am:
+
+install-exec-am:
+
+install-html: install-html-recursive
+
+install-html-am:
+
+install-info: install-info-recursive
+
+install-info-am:
+
+install-man:
+
+install-pdf: install-pdf-recursive
+
+install-pdf-am:
+
+install-ps: install-ps-recursive
+
+install-ps-am:
+
+installcheck-am:
+
+maintainer-clean: maintainer-clean-recursive
+ -rm -rf ./$(DEPDIR) uniwidth/$(DEPDIR)
+ -rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
+
+mostlyclean: mostlyclean-recursive
+
+mostlyclean-am: mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local
+
+pdf: pdf-recursive
+
+pdf-am:
+
+ps: ps-recursive
+
+ps-am:
+
+uninstall-am:
+
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all check \
+ check-am check-html ctags-recursive install install-am \
+ install-strip recheck recheck-html tags-recursive
+
+.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
+ all all-am check check-TESTS check-am check-html clean \
+ clean-checkLIBRARIES clean-checkPROGRAMS clean-generic \
+ clean-libtool clean-local clean-noinstLIBRARIES \
+ clean-noinstPROGRAMS ctags ctags-recursive distclean \
+ distclean-compile distclean-generic distclean-libtool \
+ distclean-tags distdir dvi dvi-am html html-am info info-am \
+ install install-am install-data install-data-am install-dvi \
+ install-dvi-am install-exec install-exec-am install-html \
+ install-html-am install-info install-info-am install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ installdirs-am maintainer-clean maintainer-clean-generic \
+ mostlyclean mostlyclean-compile mostlyclean-generic \
+ mostlyclean-libtool mostlyclean-local pdf pdf-am ps ps-am \
+ recheck recheck-html tags tags-recursive uninstall \
+ uninstall-am
+
+# The arg-nonnull.h that gets inserted into generated .h files is the same as
+# build-aux/arg-nonnull.h, except that it has the copyright header cut off.
+arg-nonnull.h: $(top_srcdir)/build-aux/arg-nonnull.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/GL_ARG_NONNULL/,$$p' \
+ < $(top_srcdir)/build-aux/arg-nonnull.h \
+ > $@-t && \
+ mv $@-t $@
+@POSIX_SPAWN_PORTED_TRUE@test-posix_spawn1.sh: test-posix_spawn1.in.sh
+@POSIX_SPAWN_PORTED_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@POSIX_SPAWN_PORTED_TRUE@ cp $(srcdir)/test-posix_spawn1.in.sh $@-t && \
+@POSIX_SPAWN_PORTED_TRUE@ mv $@-t $@
+@POSIX_SPAWN_PORTED_TRUE@test-posix_spawn2.sh: test-posix_spawn2.in.sh
+@POSIX_SPAWN_PORTED_TRUE@ $(AM_V_GEN)rm -f $@-t $@ && \
+@POSIX_SPAWN_PORTED_TRUE@ cp $(srcdir)/test-posix_spawn2.in.sh $@-t && \
+@POSIX_SPAWN_PORTED_TRUE@ mv $@-t $@
+# The warn-on-use.h that gets inserted into generated .h files is the same as
+# build-aux/warn-on-use.h, except that it has the copyright header cut off.
+warn-on-use.h: $(top_srcdir)/build-aux/warn-on-use.h
+ $(AM_V_GEN)rm -f $@-t $@ && \
+ sed -n -e '/^.ifndef/,$$p' \
+ < $(top_srcdir)/build-aux/warn-on-use.h \
+ > $@-t && \
+ mv $@-t $@
+
+# Clean up after Solaris cc.
+clean-local:
+ rm -rf SunWS_cache
+
+mostlyclean-local: mostlyclean-generic
+ @for dir in '' $(MOSTLYCLEANDIRS); do \
+ if test -n "$$dir" && test -d $$dir; then \
+ echo "rmdir $$dir"; rmdir $$dir; \
+ fi; \
+ done; \
+ :
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/tests/gnu/getpagesize.c b/tests/gnu/getpagesize.c
new file mode 100755
index 00000000..cc252687
--- /dev/null
+++ b/tests/gnu/getpagesize.c
@@ -0,0 +1,39 @@
+/* getpagesize emulation for systems where it cannot be done in a C macro.
+
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible and Martin Lambers. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+/* This implementation is only for native Win32 systems. */
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+int
+getpagesize (void)
+{
+ SYSTEM_INFO system_info;
+ GetSystemInfo (&system_info);
+ return system_info.dwPageSize;
+}
+
+#endif
diff --git a/tests/gnu/gl_array_list.c b/tests/gnu/gl_array_list.c
new file mode 100755
index 00000000..106dc216
--- /dev/null
+++ b/tests/gnu/gl_array_list.c
@@ -0,0 +1,680 @@
+/* Sequential list data type implemented by an array.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_array_list.h"
+
+#include <stdlib.h>
+/* Get memcpy. */
+#include <string.h>
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+#ifndef uintptr_t
+# define uintptr_t unsigned long
+#endif
+
+/* -------------------------- gl_list_t Data Type -------------------------- */
+
+/* Concrete gl_list_impl type, valid for this file only. */
+struct gl_list_impl
+{
+ struct gl_list_impl_base base;
+ /* An array of ALLOCATED elements, of which the first COUNT are used.
+ 0 <= COUNT <= ALLOCATED. */
+ const void **elements;
+ size_t count;
+ size_t allocated;
+};
+
+/* struct gl_list_node_impl doesn't exist here. The pointers are actually
+ indices + 1. */
+#define INDEX_TO_NODE(index) (gl_list_node_t)(uintptr_t)(size_t)((index) + 1)
+#define NODE_TO_INDEX(node) ((uintptr_t)(node) - 1)
+
+static gl_list_t
+gl_array_nx_create_empty (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates)
+{
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
+
+ list->base.vtable = implementation;
+ list->base.equals_fn = equals_fn;
+ list->base.hashcode_fn = hashcode_fn;
+ list->base.dispose_fn = dispose_fn;
+ list->base.allow_duplicates = allow_duplicates;
+ list->elements = NULL;
+ list->count = 0;
+ list->allocated = 0;
+
+ return list;
+}
+
+static gl_list_t
+gl_array_nx_create (gl_list_implementation_t implementation,
+ gl_listelement_equals_fn equals_fn,
+ gl_listelement_hashcode_fn hashcode_fn,
+ gl_listelement_dispose_fn dispose_fn,
+ bool allow_duplicates,
+ size_t count, const void **contents)
+{
+ struct gl_list_impl *list =
+ (struct gl_list_impl *) malloc (sizeof (struct gl_list_impl));
+
+ if (list == NULL)
+ return NULL;
+
+ list->base.vtable = implementation;
+ list->base.equals_fn = equals_fn;
+ list->base.hashcode_fn = hashcode_fn;
+ list->base.dispose_fn = dispose_fn;
+ list->base.allow_duplicates = allow_duplicates;
+ if (count > 0)
+ {
+ if (size_overflow_p (xtimes (count, sizeof (const void *))))
+ goto fail;
+ list->elements = (const void **) malloc (count * sizeof (const void *));
+ if (list->elements == NULL)
+ goto fail;
+ memcpy (list->elements, contents, count * sizeof (const void *));
+ }
+ else
+ list->elements = NULL;
+ list->count = count;
+ list->allocated = count;
+
+ return list;
+
+ fail:
+ free (list);
+ return NULL;
+}
+
+static size_t
+gl_array_size (gl_list_t list)
+{
+ return list->count;
+}
+
+static const void *
+gl_array_node_value (gl_list_t list, gl_list_node_t node)
+{
+ uintptr_t index = NODE_TO_INDEX (node);
+ if (!(index < list->count))
+ /* Invalid argument. */
+ abort ();
+ return list->elements[index];
+}
+
+static int
+gl_array_node_nx_set_value (gl_list_t list, gl_list_node_t node,
+ const void *elt)
+{
+ uintptr_t index = NODE_TO_INDEX (node);
+ if (!(index < list->count))
+ /* Invalid argument. */
+ abort ();
+ list->elements[index] = elt;
+ return 0;
+}
+
+static gl_list_node_t
+gl_array_next_node (gl_list_t list, gl_list_node_t node)
+{
+ uintptr_t index = NODE_TO_INDEX (node);
+ if (!(index < list->count))
+ /* Invalid argument. */
+ abort ();
+ index++;
+ if (index < list->count)
+ return INDEX_TO_NODE (index);
+ else
+ return NULL;
+}
+
+static gl_list_node_t
+gl_array_previous_node (gl_list_t list, gl_list_node_t node)
+{
+ uintptr_t index = NODE_TO_INDEX (node);
+ if (!(index < list->count))
+ /* Invalid argument. */
+ abort ();
+ if (index > 0)
+ return INDEX_TO_NODE (index - 1);
+ else
+ return NULL;
+}
+
+static const void *
+gl_array_get_at (gl_list_t list, size_t position)
+{
+ size_t count = list->count;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ return list->elements[position];
+}
+
+static gl_list_node_t
+gl_array_nx_set_at (gl_list_t list, size_t position, const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ list->elements[position] = elt;
+ return INDEX_TO_NODE (position);
+}
+
+static size_t
+gl_array_indexof_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ size_t count = list->count;
+
+ if (!(start_index <= end_index && end_index <= count))
+ /* Invalid arguments. */
+ abort ();
+
+ if (start_index < end_index)
+ {
+ gl_listelement_equals_fn equals = list->base.equals_fn;
+ if (equals != NULL)
+ {
+ size_t i;
+
+ for (i = start_index;;)
+ {
+ if (equals (elt, list->elements[i]))
+ return i;
+ i++;
+ if (i == end_index)
+ break;
+ }
+ }
+ else
+ {
+ size_t i;
+
+ for (i = start_index;;)
+ {
+ if (elt == list->elements[i])
+ return i;
+ i++;
+ if (i == end_index)
+ break;
+ }
+ }
+ }
+ return (size_t)(-1);
+}
+
+static gl_list_node_t
+gl_array_search_from_to (gl_list_t list, size_t start_index, size_t end_index,
+ const void *elt)
+{
+ size_t index = gl_array_indexof_from_to (list, start_index, end_index, elt);
+ return INDEX_TO_NODE (index);
+}
+
+/* Ensure that list->allocated > list->count.
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
+grow (gl_list_t list)
+{
+ size_t new_allocated;
+ size_t memory_size;
+ const void **memory;
+
+ new_allocated = xtimes (list->allocated, 2);
+ new_allocated = xsum (new_allocated, 1);
+ memory_size = xtimes (new_allocated, sizeof (const void *));
+ if (size_overflow_p (memory_size))
+ /* Overflow, would lead to out of memory. */
+ return -1;
+ memory = (const void **) realloc (list->elements, memory_size);
+ if (memory == NULL)
+ /* Out of memory. */
+ return -1;
+ list->elements = memory;
+ list->allocated = new_allocated;
+ return 0;
+}
+
+static gl_list_node_t
+gl_array_nx_add_first (gl_list_t list, const void *elt)
+{
+ size_t count = list->count;
+ const void **elements;
+ size_t i;
+
+ if (count == list->allocated)
+ if (grow (list) < 0)
+ return NULL;
+ elements = list->elements;
+ for (i = count; i > 0; i--)
+ elements[i] = elements[i - 1];
+ elements[0] = elt;
+ list->count = count + 1;
+ return INDEX_TO_NODE (0);
+}
+
+static gl_list_node_t
+gl_array_nx_add_last (gl_list_t list, const void *elt)
+{
+ size_t count = list->count;
+
+ if (count == list->allocated)
+ if (grow (list) < 0)
+ return NULL;
+ list->elements[count] = elt;
+ list->count = count + 1;
+ return INDEX_TO_NODE (count);
+}
+
+static gl_list_node_t
+gl_array_nx_add_before (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ size_t count = list->count;
+ uintptr_t index = NODE_TO_INDEX (node);
+ size_t position;
+ const void **elements;
+ size_t i;
+
+ if (!(index < count))
+ /* Invalid argument. */
+ abort ();
+ position = index;
+ if (count == list->allocated)
+ if (grow (list) < 0)
+ return NULL;
+ elements = list->elements;
+ for (i = count; i > position; i--)
+ elements[i] = elements[i - 1];
+ elements[position] = elt;
+ list->count = count + 1;
+ return INDEX_TO_NODE (position);
+}
+
+static gl_list_node_t
+gl_array_nx_add_after (gl_list_t list, gl_list_node_t node, const void *elt)
+{
+ size_t count = list->count;
+ uintptr_t index = NODE_TO_INDEX (node);
+ size_t position;
+ const void **elements;
+ size_t i;
+
+ if (!(index < count))
+ /* Invalid argument. */
+ abort ();
+ position = index + 1;
+ if (count == list->allocated)
+ if (grow (list) < 0)
+ return NULL;
+ elements = list->elements;
+ for (i = count; i > position; i--)
+ elements[i] = elements[i - 1];
+ elements[position] = elt;
+ list->count = count + 1;
+ return INDEX_TO_NODE (position);
+}
+
+static gl_list_node_t
+gl_array_nx_add_at (gl_list_t list, size_t position, const void *elt)
+{
+ size_t count = list->count;
+ const void **elements;
+ size_t i;
+
+ if (!(position <= count))
+ /* Invalid argument. */
+ abort ();
+ if (count == list->allocated)
+ if (grow (list) < 0)
+ return NULL;
+ elements = list->elements;
+ for (i = count; i > position; i--)
+ elements[i] = elements[i - 1];
+ elements[position] = elt;
+ list->count = count + 1;
+ return INDEX_TO_NODE (position);
+}
+
+static bool
+gl_array_remove_node (gl_list_t list, gl_list_node_t node)
+{
+ size_t count = list->count;
+ uintptr_t index = NODE_TO_INDEX (node);
+ size_t position;
+ const void **elements;
+ size_t i;
+
+ if (!(index < count))
+ /* Invalid argument. */
+ abort ();
+ position = index;
+ elements = list->elements;
+ if (list->base.dispose_fn != NULL)
+ list->base.dispose_fn (elements[position]);
+ for (i = position + 1; i < count; i++)
+ elements[i - 1] = elements[i];
+ list->count = count - 1;
+ return true;
+}
+
+static bool
+gl_array_remove_at (gl_list_t list, size_t position)
+{
+ size_t count = list->count;
+ const void **elements;
+ size_t i;
+
+ if (!(position < count))
+ /* Invalid argument. */
+ abort ();
+ elements = list->elements;
+ if (list->base.dispose_fn != NULL)
+ list->base.dispose_fn (elements[position]);
+ for (i = position + 1; i < count; i++)
+ elements[i - 1] = elements[i];
+ list->count = count - 1;
+ return true;
+}
+
+static bool
+gl_array_remove (gl_list_t list, const void *elt)
+{
+ size_t position = gl_array_indexof_from_to (list, 0, list->count, elt);
+ if (position == (size_t)(-1))
+ return false;
+ else
+ return gl_array_remove_at (list, position);
+}
+
+static void
+gl_array_list_free (gl_list_t list)
+{
+ if (list->elements != NULL)
+ {
+ if (list->base.dispose_fn != NULL)
+ {
+ size_t count = list->count;
+
+ if (count > 0)
+ {
+ gl_listelement_dispose_fn dispose = list->base.dispose_fn;
+ const void **elements = list->elements;
+
+ do
+ dispose (*elements++);
+ while (--count > 0);
+ }
+ }
+ free (list->elements);
+ }
+ free (list);
+}
+
+/* --------------------- gl_list_iterator_t Data Type --------------------- */
+
+static gl_list_iterator_t
+gl_array_iterator (gl_list_t list)
+{
+ gl_list_iterator_t result;
+
+ result.vtable = list->base.vtable;
+ result.list = list;
+ result.count = list->count;
+ result.p = list->elements + 0;
+ result.q = list->elements + list->count;
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+#endif
+
+ return result;
+}
+
+static gl_list_iterator_t
+gl_array_iterator_from_to (gl_list_t list, size_t start_index, size_t end_index)
+{
+ gl_list_iterator_t result;
+
+ if (!(start_index <= end_index && end_index <= list->count))
+ /* Invalid arguments. */
+ abort ();
+ result.vtable = list->base.vtable;
+ result.list = list;
+ result.count = list->count;
+ result.p = list->elements + start_index;
+ result.q = list->elements + end_index;
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+#endif
+
+ return result;
+}
+
+static bool
+gl_array_iterator_next (gl_list_iterator_t *iterator,
+ const void **eltp, gl_list_node_t *nodep)
+{
+ gl_list_t list = iterator->list;
+ if (iterator->count != list->count)
+ {
+ if (iterator->count != list->count + 1)
+ /* Concurrent modifications were done on the list. */
+ abort ();
+ /* The last returned element was removed. */
+ iterator->count--;
+ iterator->p = (const void **) iterator->p - 1;
+ iterator->q = (const void **) iterator->q - 1;
+ }
+ if (iterator->p < iterator->q)
+ {
+ const void **p = (const void **) iterator->p;
+ *eltp = *p;
+ if (nodep != NULL)
+ *nodep = INDEX_TO_NODE (p - list->elements);
+ iterator->p = p + 1;
+ return true;
+ }
+ else
+ return false;
+}
+
+static void
+gl_array_iterator_free (gl_list_iterator_t *iterator)
+{
+}
+
+/* ---------------------- Sorted gl_list_t Data Type ---------------------- */
+
+static size_t
+gl_array_sortedlist_indexof_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t low, size_t high,
+ const void *elt)
+{
+ if (!(low <= high && high <= list->count))
+ /* Invalid arguments. */
+ abort ();
+ if (low < high)
+ {
+ /* At each loop iteration, low < high; for indices < low the values
+ are smaller than ELT; for indices >= high the values are greater
+ than ELT. So, if the element occurs in the list, it is at
+ low <= position < high. */
+ do
+ {
+ size_t mid = low + (high - low) / 2; /* low <= mid < high */
+ int cmp = compar (list->elements[mid], elt);
+
+ if (cmp < 0)
+ low = mid + 1;
+ else if (cmp > 0)
+ high = mid;
+ else /* cmp == 0 */
+ {
+ /* We have an element equal to ELT at index MID. But we need
+ the minimal such index. */
+ high = mid;
+ /* At each loop iteration, low <= high and
+ compar (list->elements[high], elt) == 0,
+ and we know that the first occurrence of the element is at
+ low <= position <= high. */
+ while (low < high)
+ {
+ size_t mid2 = low + (high - low) / 2; /* low <= mid2 < high */
+ int cmp2 = compar (list->elements[mid2], elt);
+
+ if (cmp2 < 0)
+ low = mid2 + 1;
+ else if (cmp2 > 0)
+ /* The list was not sorted. */
+ abort ();
+ else /* cmp2 == 0 */
+ {
+ if (mid2 == low)
+ break;
+ high = mid2 - 1;
+ }
+ }
+ return low;
+ }
+ }
+ while (low < high);
+ /* Here low == high. */
+ }
+ return (size_t)(-1);
+}
+
+static size_t
+gl_array_sortedlist_indexof (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ return gl_array_sortedlist_indexof_from_to (list, compar, 0, list->count,
+ elt);
+}
+
+static gl_list_node_t
+gl_array_sortedlist_search_from_to (gl_list_t list,
+ gl_listelement_compar_fn compar,
+ size_t low, size_t high,
+ const void *elt)
+{
+ size_t index =
+ gl_array_sortedlist_indexof_from_to (list, compar, low, high, elt);
+ return INDEX_TO_NODE (index);
+}
+
+static gl_list_node_t
+gl_array_sortedlist_search (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ size_t index =
+ gl_array_sortedlist_indexof_from_to (list, compar, 0, list->count, elt);
+ return INDEX_TO_NODE (index);
+}
+
+static gl_list_node_t
+gl_array_sortedlist_nx_add (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ size_t count = list->count;
+ size_t low = 0;
+ size_t high = count;
+
+ /* At each loop iteration, low <= high; for indices < low the values are
+ smaller than ELT; for indices >= high the values are greater than ELT. */
+ while (low < high)
+ {
+ size_t mid = low + (high - low) / 2; /* low <= mid < high */
+ int cmp = compar (list->elements[mid], elt);
+
+ if (cmp < 0)
+ low = mid + 1;
+ else if (cmp > 0)
+ high = mid;
+ else /* cmp == 0 */
+ {
+ low = mid;
+ break;
+ }
+ }
+ return gl_array_nx_add_at (list, low, elt);
+}
+
+static bool
+gl_array_sortedlist_remove (gl_list_t list, gl_listelement_compar_fn compar,
+ const void *elt)
+{
+ size_t index = gl_array_sortedlist_indexof (list, compar, elt);
+ if (index == (size_t)(-1))
+ return false;
+ else
+ return gl_array_remove_at (list, index);
+}
+
+
+const struct gl_list_implementation gl_array_list_implementation =
+ {
+ gl_array_nx_create_empty,
+ gl_array_nx_create,
+ gl_array_size,
+ gl_array_node_value,
+ gl_array_node_nx_set_value,
+ gl_array_next_node,
+ gl_array_previous_node,
+ gl_array_get_at,
+ gl_array_nx_set_at,
+ gl_array_search_from_to,
+ gl_array_indexof_from_to,
+ gl_array_nx_add_first,
+ gl_array_nx_add_last,
+ gl_array_nx_add_before,
+ gl_array_nx_add_after,
+ gl_array_nx_add_at,
+ gl_array_remove_node,
+ gl_array_remove_at,
+ gl_array_remove,
+ gl_array_list_free,
+ gl_array_iterator,
+ gl_array_iterator_from_to,
+ gl_array_iterator_next,
+ gl_array_iterator_free,
+ gl_array_sortedlist_search,
+ gl_array_sortedlist_search_from_to,
+ gl_array_sortedlist_indexof,
+ gl_array_sortedlist_indexof_from_to,
+ gl_array_sortedlist_nx_add,
+ gl_array_sortedlist_remove
+ };
diff --git a/tests/gnu/gl_array_list.h b/tests/gnu/gl_array_list.h
new file mode 100755
index 00000000..a763bca4
--- /dev/null
+++ b/tests/gnu/gl_array_list.h
@@ -0,0 +1,34 @@
+/* Sequential list data type implemented by an array.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_ARRAY_LIST_H
+#define _GL_ARRAY_LIST_H
+
+#include "gl_list.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const struct gl_list_implementation gl_array_list_implementation;
+#define GL_ARRAY_LIST &gl_array_list_implementation
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_ARRAY_LIST_H */
diff --git a/tests/gnu/gl_array_oset.c b/tests/gnu/gl_array_oset.c
new file mode 100755
index 00000000..a6d4584c
--- /dev/null
+++ b/tests/gnu/gl_array_oset.c
@@ -0,0 +1,357 @@
+/* Ordered set data type implemented by an array.
+ Copyright (C) 2006-2007, 2009-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include "gl_array_oset.h"
+
+#include <stdlib.h>
+
+/* Checked size_t computations. */
+#include "xsize.h"
+
+/* -------------------------- gl_oset_t Data Type -------------------------- */
+
+/* Concrete gl_oset_impl type, valid for this file only. */
+struct gl_oset_impl
+{
+ struct gl_oset_impl_base base;
+ /* An array of ALLOCATED elements, of which the first COUNT are used.
+ 0 <= COUNT <= ALLOCATED. */
+ const void **elements;
+ size_t count;
+ size_t allocated;
+};
+
+static gl_oset_t
+gl_array_nx_create_empty (gl_oset_implementation_t implementation,
+ gl_setelement_compar_fn compar_fn,
+ gl_setelement_dispose_fn dispose_fn)
+{
+ struct gl_oset_impl *set =
+ (struct gl_oset_impl *) malloc (sizeof (struct gl_oset_impl));
+
+ if (set == NULL)
+ return NULL;
+
+ set->base.vtable = implementation;
+ set->base.compar_fn = compar_fn;
+ set->base.dispose_fn = dispose_fn;
+ set->elements = NULL;
+ set->count = 0;
+ set->allocated = 0;
+
+ return set;
+}
+
+static size_t
+gl_array_size (gl_oset_t set)
+{
+ return set->count;
+}
+
+static size_t
+gl_array_indexof (gl_oset_t set, const void *elt)
+{
+ size_t count = set->count;
+
+ if (count > 0)
+ {
+ gl_setelement_compar_fn compar = set->base.compar_fn;
+ size_t low = 0;
+ size_t high = count;
+
+ /* At each loop iteration, low < high; for indices < low the values
+ are smaller than ELT; for indices >= high the values are greater
+ than ELT. So, if the element occurs in the list, it is at
+ low <= position < high. */
+ do
+ {
+ size_t mid = low + (high - low) / 2; /* low <= mid < high */
+ int cmp = (compar != NULL
+ ? compar (set->elements[mid], elt)
+ : (set->elements[mid] > elt ? 1 :
+ set->elements[mid] < elt ? -1 : 0));
+
+ if (cmp < 0)
+ low = mid + 1;
+ else if (cmp > 0)
+ high = mid;
+ else /* cmp == 0 */
+ /* We have an element equal to ELT at index MID. */
+ return mid;
+ }
+ while (low < high);
+ }
+ return (size_t)(-1);
+}
+
+static bool
+gl_array_search (gl_oset_t set, const void *elt)
+{
+ return gl_array_indexof (set, elt) != (size_t)(-1);
+}
+
+static bool
+gl_array_search_atleast (gl_oset_t set,
+ gl_setelement_threshold_fn threshold_fn,
+ const void *threshold,
+ const void **eltp)
+{
+ size_t count = set->count;
+
+ if (count > 0)
+ {
+ size_t low = 0;
+ size_t high = count;
+
+ /* At each loop iteration, low < high; for indices < low the values are
+ smaller than THRESHOLD; for indices >= high the values are nonexistent.
+ So, if an element >= THRESHOLD occurs in the list, it is at
+ low <= position < high. */
+ do
+ {
+ size_t mid = low + (high - low) / 2; /* low <= mid < high */
+
+ if (! threshold_fn (set->elements[mid], threshold))
+ low = mid + 1;
+ else
+ {
+ /* We have an element >= THRESHOLD at index MID. But we need the
+ minimal such index. */
+ high = mid;
+ /* At each loop iteration, low <= high and
+ compar (list->elements[high], value) >= 0,
+ and we know that the first occurrence of the element is at
+ low <= position <= high. */
+ while (low < high)
+ {
+ size_t mid2 = low + (high - low) / 2; /* low <= mid2 < high */
+
+ if (! threshold_fn (set->elements[mid2], threshold))
+ low = mid2 + 1;
+ else
+ high = mid2;
+ }
+ *eltp = set->elements[low];
+ return true;
+ }
+ }
+ while (low < high);
+ }
+ return false;
+}
+
+/* Ensure that set->allocated > set->count.
+ Return 0 upon success, -1 upon out-of-memory. */
+static int
+grow (gl_oset_t set)
+{
+ size_t new_allocated;
+ size_t memory_size;
+ const void **memory;
+
+ new_allocated = xtimes (set->allocated, 2);
+ new_allocated = xsum (new_allocated, 1);
+ memory_size = xtimes (new_allocated, sizeof (const void *));
+ if (size_overflow_p (memory_size))
+ /* Overflow, would lead to out of memory. */
+ return -1;
+ memory = (const void **) realloc (set->elements, memory_size);
+ if (memory == NULL)
+ /* Out of memory. */
+ return -1;
+ set->elements = memory;
+ set->allocated = new_allocated;
+ return 0;
+}
+
+/* Add the given element ELT at the given position,
+ 0 <= position <= gl_oset_size (set).
+ Return 1 upon success, -1 upon out-of-memory. */
+static inline int
+gl_array_nx_add_at (gl_oset_t set, size_t position, const void *elt)
+{
+ size_t count = set->count;
+ const void **elements;
+ size_t i;
+
+ if (count == set->allocated)
+ if (grow (set) < 0)
+ return -1;
+ elements = set->elements;
+ for (i = count; i > position; i--)
+ elements[i] = elements[i - 1];
+ elements[position] = elt;
+ set->count = count + 1;
+ return 1;
+}
+
+/* Remove the element at the given position,
+ 0 <= position < gl_oset_size (set). */
+static inline void
+gl_array_remove_at (gl_oset_t set, size_t position)
+{
+ size_t count = set->count;
+ const void **elements;
+ size_t i;
+
+ elements = set->elements;
+ if (set->base.dispose_fn != NULL)
+ set->base.dispose_fn (elements[position]);
+ for (i = position + 1; i < count; i++)
+ elements[i - 1] = elements[i];
+ set->count = count - 1;
+}
+
+static int
+gl_array_nx_add (gl_oset_t set, const void *elt)
+{
+ size_t count = set->count;
+ size_t low = 0;
+
+ if (count > 0)
+ {
+ gl_setelement_compar_fn compar = set->base.compar_fn;
+ size_t high = count;
+
+ /* At each loop iteration, low < high; for indices < low the values
+ are smaller than ELT; for indices >= high the values are greater
+ than ELT. So, if the element occurs in the list, it is at
+ low <= position < high. */
+ do
+ {
+ size_t mid = low + (high - low) / 2; /* low <= mid < high */
+ int cmp = (compar != NULL
+ ? compar (set->elements[mid], elt)
+ : (set->elements[mid] > elt ? 1 :
+ set->elements[mid] < elt ? -1 : 0));
+
+ if (cmp < 0)
+ low = mid + 1;
+ else if (cmp > 0)
+ high = mid;
+ else /* cmp == 0 */
+ return false;
+ }
+ while (low < high);
+ }
+ return gl_array_nx_add_at (set, low, elt);
+}
+
+static bool
+gl_array_remove (gl_oset_t set, const void *elt)
+{
+ size_t index = gl_array_indexof (set, elt);
+ if (index != (size_t)(-1))
+ {
+ gl_array_remove_at (set, index);
+ return true;
+ }
+ else
+ return false;
+}
+
+static void
+gl_array_free (gl_oset_t set)
+{
+ if (set->elements != NULL)
+ {
+ if (set->base.dispose_fn != NULL)
+ {
+ size_t count = set->count;
+
+ if (count > 0)
+ {
+ gl_setelement_dispose_fn dispose = set->base.dispose_fn;
+ const void **elements = set->elements;
+
+ do
+ dispose (*elements++);
+ while (--count > 0);
+ }
+ }
+ free (set->elements);
+ }
+ free (set);
+}
+
+/* --------------------- gl_oset_iterator_t Data Type --------------------- */
+
+static gl_oset_iterator_t
+gl_array_iterator (gl_oset_t set)
+{
+ gl_oset_iterator_t result;
+
+ result.vtable = set->base.vtable;
+ result.set = set;
+ result.count = set->count;
+ result.p = set->elements + 0;
+ result.q = set->elements + set->count;
+#ifdef lint
+ result.i = 0;
+ result.j = 0;
+#endif
+
+ return result;
+}
+
+static bool
+gl_array_iterator_next (gl_oset_iterator_t *iterator, const void **eltp)
+{
+ gl_oset_t set = iterator->set;
+ if (iterator->count != set->count)
+ {
+ if (iterator->count != set->count + 1)
+ /* Concurrent modifications were done on the set. */
+ abort ();
+ /* The last returned element was removed. */
+ iterator->count--;
+ iterator->p = (const void **) iterator->p - 1;
+ iterator->q = (const void **) iterator->q - 1;
+ }
+ if (iterator->p < iterator->q)
+ {
+ const void **p = (const void **) iterator->p;
+ *eltp = *p;
+ iterator->p = p + 1;
+ return true;
+ }
+ else
+ return false;
+}
+
+static void
+gl_array_iterator_free (gl_oset_iterator_t *iterator)
+{
+}
+
+
+const struct gl_oset_implementation gl_array_oset_implementation =
+ {
+ gl_array_nx_create_empty,
+ gl_array_size,
+ gl_array_search,
+ gl_array_search_atleast,
+ gl_array_nx_add,
+ gl_array_remove,
+ gl_array_free,
+ gl_array_iterator,
+ gl_array_iterator_next,
+ gl_array_iterator_free
+ };
diff --git a/tests/gnu/gl_array_oset.h b/tests/gnu/gl_array_oset.h
new file mode 100755
index 00000000..190a96bd
--- /dev/null
+++ b/tests/gnu/gl_array_oset.h
@@ -0,0 +1,34 @@
+/* Ordered set data type implemented by an array.
+ Copyright (C) 2006, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef _GL_ARRAY_OSET_H
+#define _GL_ARRAY_OSET_H
+
+#include "gl_oset.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern const struct gl_oset_implementation gl_array_oset_implementation;
+#define GL_ARRAY_OSET &gl_array_oset_implementation
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _GL_ARRAY_OSET_H */
diff --git a/tests/gnu/ignore-value.h b/tests/gnu/ignore-value.h
new file mode 100755
index 00000000..2eb6918d
--- /dev/null
+++ b/tests/gnu/ignore-value.h
@@ -0,0 +1,37 @@
+/* ignore a function return without a compiler warning
+
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+/* Use these functions to avoid a warning when using a function declared with
+ gcc's warn_unused_result attribute, but for which you really do want to
+ ignore the result. Traditionally, people have used a "(void)" cast to
+ indicate that a function's return value is deliberately unused. However,
+ if the function is declared with __attribute__((warn_unused_result)),
+ gcc issues a warning even with the cast.
+
+ Caution: most of the time, you really should heed gcc's warning, and
+ check the return value. However, in those exceptional cases in which
+ you're sure you know what you're doing, use this function.
+
+ For the record, here's one of the ignorable warnings:
+ "copy.c:233: warning: ignoring return value of 'fchown',
+ declared with attribute warn_unused_result". */
+
+static inline void ignore_value (int i) { (void) i; }
+static inline void ignore_ptr (void* p) { (void) p; }
+/* FIXME: what about aggregate types? */
diff --git a/tests/gnu/init.sh b/tests/gnu/init.sh
new file mode 100755
index 00000000..3154f595
--- /dev/null
+++ b/tests/gnu/init.sh
@@ -0,0 +1,345 @@
+# source this file; set up for tests
+
+# Copyright (C) 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 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 General Public License for more details.
+
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Using this file in a test
+# =========================
+#
+# The typical skeleton of a test looks like this:
+#
+# #!/bin/sh
+# : ${srcdir=.}
+# . "$srcdir/init.sh"; path_prepend_ .
+# Execute some commands.
+# Note that these commands are executed in a subdirectory, therefore you
+# need to prepend "../" to relative filenames in the build directory.
+# Set the exit code 0 for success, 77 for skipped, or 1 or other for failure.
+# Use the skip_ and fail_ functions to print a diagnostic and then exit
+# with the corresponding exit code.
+# Exit $?
+
+# Executing a test that uses this file
+# ====================================
+#
+# Running a single test:
+# $ make check TESTS=test-foo.sh
+#
+# Running a single test, with verbose output:
+# $ make check TESTS=test-foo.sh VERBOSE=yes
+#
+# Running a single test, with single-stepping:
+# 1. Go into a sub-shell:
+# $ bash
+# 2. Set relevant environment variables from TESTS_ENVIRONMENT in the
+# Makefile:
+# $ export srcdir=../../tests # this is an example
+# 3. Execute the commands from the test, copy&pasting them one by one:
+# $ . "$srcdir/init.sh"; path_prepend_ .
+# ...
+# 4. Finally
+# $ exit
+
+# We require $(...) support unconditionally.
+# We require a few additional shell features only when $EXEEXT is nonempty,
+# in order to support automatic $EXEEXT emulation:
+# - hyphen-containing alias names
+# - we prefer to use ${var#...} substitution, rather than having
+# to work around lack of support for that feature.
+# The following code attempts to find a shell with support for these features
+# and re-exec's it. If not, it skips the current test.
+
+gl_shell_test_script_='
+test $(echo y) = y || exit 1
+test -z "$EXEEXT" && exit 0
+shopt -s expand_aliases
+alias a-b="echo zoo"
+v=abx
+ test ${v%x} = ab \
+ && test ${v#a} = bx \
+ && test $(a-b) = zoo
+'
+
+if test "x$1" = "x--no-reexec"; then
+ shift
+else
+ for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh fail
+ do
+ test "$re_shell_" = no_shell && continue
+ test "$re_shell_" = fail && skip_ failed to find an adequate shell
+ if "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null; then
+ exec "$re_shell_" "$0" --no-reexec "$@"
+ echo "$ME_: exec failed" 1>&2
+ exit 127
+ fi
+ done
+fi
+
+test -n "$EXEEXT" && shopt -s expand_aliases
+
+# We use a trap below for cleanup. This requires us to go through
+# hoops to get the right exit status transported through the handler.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit () { set +e; (exit $1); exit $1; }
+
+fail_() { echo "$ME_: failed test: $@" 1>&2; Exit 1; }
+skip_() { echo "$ME_: skipped test: $@" 1>&2; Exit 77; }
+
+# This is a stub function that is run upon trap (upon regular exit and
+# interrupt). Override it with a per-test function, e.g., to unmount
+# a partition, or to undo any other global state changes.
+cleanup_() { :; }
+
+if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { diff -u "$@"; }
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { cmp -s "$@"; }
+else
+ compare() { cmp "$@"; }
+fi
+
+# An arbitrary prefix to help distinguish test directories.
+testdir_prefix_() { printf gt; }
+
+# Run the user-overridable cleanup_ function, remove the temporary
+# directory and exit with the incoming value of $?.
+remove_tmp_()
+{
+ __st=$?
+ cleanup_
+ # cd out of the directory we're about to remove
+ cd "$initial_cwd_" || cd / || cd /tmp
+ chmod -R u+rwx "$test_dir_"
+ # If removal fails and exit status was to be 0, then change it to 1.
+ rm -rf "$test_dir_" || { test $__st = 0 && __st=1; }
+ exit $__st
+}
+
+# Given a directory name, DIR, if every entry in it that matches *.exe
+# contains only the specified bytes (see the case stmt below), then print
+# a space-separated list of those names and return 0. Otherwise, don't
+# print anything and return 1. Naming constraints apply also to DIR.
+find_exe_basenames_()
+{
+ feb_dir_=$1
+ feb_fail_=0
+ feb_result_=
+ feb_sp_=
+ for feb_file_ in $feb_dir_/*.exe; do
+ case $feb_file_ in
+ *[!-a-zA-Z/0-9_.+]*) feb_fail_=1; break;;
+ *) # Remove leading file name components as well as the .exe suffix.
+ feb_file_=${feb_file_##*/}
+ feb_file_=${feb_file_%.exe}
+ feb_result_="$feb_result_$feb_sp_$feb_file_";;
+ esac
+ feb_sp_=' '
+ done
+ test $feb_fail_ = 0 && printf %s "$feb_result_"
+ return $feb_fail_
+}
+
+# Consider the files in directory, $1.
+# For each file name of the form PROG.exe, create an alias named
+# PROG that simply invokes PROG.exe, then return 0. If any selected
+# file name or the directory name, $1, contains an unexpected character,
+# define no function and return 1.
+create_exe_shims_()
+{
+ case $EXEEXT in
+ '') return 0 ;;
+ .exe) ;;
+ *) echo "$0: unexpected \$EXEEXT value: $EXEEXT" 1>&2; return 1 ;;
+ esac
+
+ base_names_=`find_exe_basenames_ $1` \
+ || { echo "$0 (exe_shim): skipping directory: $1" 1>&2; return 1; }
+
+ if test -n "$base_names_"; then
+ for base_ in $base_names_; do
+ alias "$base_"="$base_$EXEEXT"
+ done
+ fi
+
+ return 0
+}
+
+# Use this function to prepend to PATH an absolute name for each
+# specified, possibly-$initial_cwd_-relative, directory.
+path_prepend_()
+{
+ while test $# != 0; do
+ path_dir_=$1
+ case $path_dir_ in
+ '') fail_ "invalid path dir: '$1'";;
+ /*) abs_path_dir_=$path_dir_;;
+ *) abs_path_dir_=`cd "$initial_cwd_/$path_dir_" && echo "$PWD"` \
+ || fail_ "invalid path dir: $path_dir_";;
+ esac
+ case $abs_path_dir_ in
+ *:*) fail_ "invalid path dir: '$abs_path_dir_'";;
+ esac
+ PATH="$abs_path_dir_:$PATH"
+
+ # Create an alias, FOO, for each FOO.exe in this directory.
+ create_exe_shims_ "$abs_path_dir_" \
+ || fail_ "something failed (above): $abs_path_dir_"
+ shift
+ done
+ export PATH
+}
+
+setup_()
+{
+ test "$VERBOSE" = yes && set -x
+
+ initial_cwd_=$PWD
+ ME_=`expr "./$0" : '.*/\(.*\)$'`
+
+ pfx_=`testdir_prefix_`
+ test_dir_=`mktempd_ "$initial_cwd_" "$pfx_-$ME_.XXXX"` \
+ || fail_ "failed to create temporary directory in $initial_cwd_"
+ cd "$test_dir_"
+
+ # This pair of trap statements ensures that the temporary directory,
+ # $test_dir_, is removed upon exit as well as upon catchable signal.
+ trap remove_tmp_ 0
+ trap 'Exit $?' 1 2 13 15
+}
+
+# Create a temporary directory, much like mktemp -d does.
+# Written by Jim Meyering.
+#
+# Usage: mktempd_ /tmp phoey.XXXXXXXXXX
+#
+# First, try to use the mktemp program.
+# Failing that, we'll roll our own mktemp-like function:
+# - try to get random bytes from /dev/urandom
+# - failing that, generate output from a combination of quickly-varying
+# sources and gzip. Ignore non-varying gzip header, and extract
+# "random" bits from there.
+# - given those bits, map to file-name bytes using tr, and try to create
+# the desired directory.
+# - make only $MAX_TRIES_ attempts
+
+# Helper function. Print $N pseudo-random bytes from a-zA-Z0-9.
+rand_bytes_()
+{
+ n_=$1
+
+ # Maybe try openssl rand -base64 $n_prime_|tr '+/=\012' abcd first?
+ # But if they have openssl, they probably have mktemp, too.
+
+ chars_=abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789
+ dev_rand_=/dev/urandom
+ if test -r "$dev_rand_"; then
+ # Note: 256-length($chars_) == 194; 3 copies of $chars_ is 186 + 8 = 194.
+ dd ibs=$n_ count=1 if=$dev_rand_ 2>/dev/null \
+ | tr -c $chars_ 01234567$chars_$chars_$chars_
+ return
+ fi
+
+ n_plus_50_=`expr $n_ + 50`
+ cmds_='date; date +%N; free; who -a; w; ps auxww; ps ef; netstat -n'
+ data_=` (eval "$cmds_") 2>&1 | gzip `
+
+ # Ensure that $data_ has length at least 50+$n_
+ while :; do
+ len_=`echo "$data_"|wc -c`
+ test $n_plus_50_ -le $len_ && break;
+ data_=` (echo "$data_"; eval "$cmds_") 2>&1 | gzip `
+ done
+
+ echo "$data_" \
+ | dd bs=1 skip=50 count=$n_ 2>/dev/null \
+ | tr -c $chars_ 01234567$chars_$chars_$chars_
+}
+
+mktempd_()
+{
+ case $# in
+ 2);;
+ *) fail_ "Usage: $ME DIR TEMPLATE";;
+ esac
+
+ destdir_=$1
+ template_=$2
+
+ MAX_TRIES_=4
+
+ # Disallow any trailing slash on specified destdir:
+ # it would subvert the post-mktemp "case"-based destdir test.
+ case $destdir_ in
+ /) ;;
+ */) fail_ "invalid destination dir: remove trailing slash(es)";;
+ esac
+
+ case $template_ in
+ *XXXX) ;;
+ *) fail_ "invalid template: $template_ (must have a suffix of at least 4 X's)";;
+ esac
+
+ fail=0
+
+ # First, try to use mktemp.
+ d=`env -u TMPDIR mktemp -d -t -p "$destdir_" "$template_" 2>/dev/null` \
+ || fail=1
+
+ # The resulting name must be in the specified directory.
+ case $d in "$destdir_"*);; *) fail=1;; esac
+
+ # It must have created the directory.
+ test -d "$d" || fail=1
+
+ # It must have 0700 permissions. Handle sticky "S" bits.
+ perms=`ls -dgo "$d" 2>/dev/null|tr S -` || fail=1
+ case $perms in drwx------*) ;; *) fail=1;; esac
+
+ test $fail = 0 && {
+ echo "$d"
+ return
+ }
+
+ # If we reach this point, we'll have to create a directory manually.
+
+ # Get a copy of the template without its suffix of X's.
+ base_template_=`echo "$template_"|sed 's/XX*$//'`
+
+ # Calculate how many X's we've just removed.
+ template_length_=`echo "$template_" | wc -c`
+ nx_=`echo "$base_template_" | wc -c`
+ nx_=`expr $template_length_ - $nx_`
+
+ err_=
+ i_=1
+ while :; do
+ X_=`rand_bytes_ $nx_`
+ candidate_dir_="$destdir_/$base_template_$X_"
+ err_=`mkdir -m 0700 "$candidate_dir_" 2>&1` \
+ && { echo "$candidate_dir_"; return; }
+ test $MAX_TRIES_ -le $i_ && break;
+ i_=`expr $i_ + 1`
+ done
+ fail_ "$err_"
+}
+
+# If you want to override the testdir_prefix_ function,
+# or to add more utility functions, use this file.
+test -f "$srcdir/init.cfg" \
+ && . "$srcdir/init.cfg"
+
+setup_ "$@"
diff --git a/tests/gnu/link.c b/tests/gnu/link.c
new file mode 100755
index 00000000..b9635e5a
--- /dev/null
+++ b/tests/gnu/link.c
@@ -0,0 +1,203 @@
+/* Emulate link on platforms that lack it, namely native Windows platforms.
+
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#if !HAVE_LINK
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+
+/* CreateHardLink was introduced only in Windows 2000. */
+typedef BOOL (WINAPI * CreateHardLinkFuncType) (LPCTSTR lpFileName,
+ LPCTSTR lpExistingFileName,
+ LPSECURITY_ATTRIBUTES lpSecurityAttributes);
+static CreateHardLinkFuncType CreateHardLinkFunc = NULL;
+static BOOL initialized = FALSE;
+
+static void
+initialize (void)
+{
+ HMODULE kernel32 = GetModuleHandle ("kernel32.dll");
+ if (kernel32 != NULL)
+ {
+ CreateHardLinkFunc =
+ (CreateHardLinkFuncType) GetProcAddress (kernel32, "CreateHardLinkA");
+ }
+ initialized = TRUE;
+}
+
+int
+link (const char *file1, const char *file2)
+{
+ char *dir;
+ size_t len1 = strlen (file1);
+ size_t len2 = strlen (file2);
+ if (!initialized)
+ initialize ();
+ if (CreateHardLinkFunc == NULL)
+ {
+ /* System does not support hard links. */
+ errno = EPERM;
+ return -1;
+ }
+ /* Reject trailing slashes on non-directories; mingw does not
+ support hard-linking directories. */
+ if ((len1 && (file1[len1 - 1] == '/' || file1[len1 - 1] == '\\'))
+ || (len2 && (file2[len2 - 1] == '/' || file2[len2 - 1] == '\\')))
+ {
+ struct stat st;
+ if (stat (file1, &st) == 0 && S_ISDIR (st.st_mode))
+ errno = EPERM;
+ else
+ errno = ENOTDIR;
+ return -1;
+ }
+ /* CreateHardLink("b/.","a",NULL) creates file "b", so we must check
+ that dirname(file2) exists. */
+ dir = strdup (file2);
+ if (!dir)
+ return -1;
+ {
+ struct stat st;
+ char *p = strchr (dir, '\0');
+ while (dir < p && (*--p != '/' && *p != '\\'));
+ *p = '\0';
+ if (p != dir && stat (dir, &st) == -1)
+ {
+ int saved_errno = errno;
+ free (dir);
+ errno = saved_errno;
+ return -1;
+ }
+ free (dir);
+ }
+ /* Now create the link. */
+ if (CreateHardLinkFunc (file2, file1, NULL) == 0)
+ {
+ /* It is not documented which errors CreateHardLink() can produce.
+ * The following conversions are based on tests on a Windows XP SP2
+ * system. */
+ DWORD err = GetLastError ();
+ switch (err)
+ {
+ case ERROR_ACCESS_DENIED:
+ errno = EACCES;
+ break;
+
+ case ERROR_INVALID_FUNCTION: /* fs does not support hard links */
+ errno = EPERM;
+ break;
+
+ case ERROR_NOT_SAME_DEVICE:
+ errno = EXDEV;
+ break;
+
+ case ERROR_PATH_NOT_FOUND:
+ case ERROR_FILE_NOT_FOUND:
+ errno = ENOENT;
+ break;
+
+ case ERROR_INVALID_PARAMETER:
+ errno = ENAMETOOLONG;
+ break;
+
+ case ERROR_TOO_MANY_LINKS:
+ errno = EMLINK;
+ break;
+
+ case ERROR_ALREADY_EXISTS:
+ errno = EEXIST;
+ break;
+
+ default:
+ errno = EIO;
+ }
+ return -1;
+ }
+
+ return 0;
+}
+
+# else /* !Windows */
+
+# error "This platform lacks a link function, and Gnulib doesn't provide a replacement. This is a bug in Gnulib."
+
+# endif /* !Windows */
+#else /* HAVE_LINK */
+
+# undef link
+
+/* Create a hard link from FILE1 to FILE2, working around platform bugs. */
+int
+rpl_link (char const *file1, char const *file2)
+{
+ /* Reject trailing slashes on non-directories. */
+ size_t len1 = strlen (file1);
+ size_t len2 = strlen (file2);
+ if ((len1 && file1[len1 - 1] == '/')
+ || (len2 && file2[len2 - 1] == '/'))
+ {
+ /* Let link() decide whether hard-linking directories is legal.
+ If stat() fails, then link() should fail for the same reason
+ (although on Solaris 9, link("file/","oops") mistakenly
+ succeeds); if stat() succeeds, require a directory. */
+ struct stat st;
+ if (stat (file1, &st))
+ return -1;
+ if (!S_ISDIR (st.st_mode))
+ {
+ errno = ENOTDIR;
+ return -1;
+ }
+ }
+ else
+ {
+ /* Fix Cygwin 1.5.x bug where link("a","b/.") creates file "b". */
+ char *dir = strdup (file2);
+ struct stat st;
+ char *p;
+ if (!dir)
+ return -1;
+ /* We already know file2 does not end in slash. Strip off the
+ basename, then check that the dirname exists. */
+ p = strrchr (dir, '/');
+ if (p)
+ {
+ *p = '\0';
+ if (stat (dir, &st) == -1)
+ {
+ int saved_errno = errno;
+ free (dir);
+ errno = saved_errno;
+ return -1;
+ }
+ }
+ free (dir);
+ }
+ return link (file1, file2);
+}
+#endif /* HAVE_LINK */
diff --git a/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.mo b/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.mo
new file mode 100755
index 00000000..87e97e1e
--- /dev/null
+++ b/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.mo
Binary files differ
diff --git a/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.po b/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.po
new file mode 100755
index 00000000..1ea251f4
--- /dev/null
+++ b/tests/gnu/locale/fr/LC_MESSAGES/test-quotearg.po
@@ -0,0 +1,20 @@
+# Message catalog that maps the ASCII replacements for single-quote characters
+# to real single-quote characters.
+# The header entry is commented out on purpose, so that gettext() performs no
+# no character set conversion from the PO file's encoding to the locale
+# encoding. This allows us to use the same PO file in various locales.
+#msgid ""
+#msgstr ""
+#"Project-Id-Version: GNU gnulib\n"
+#"PO-Revision-Date: 2009-01-26 01:02+01:00\n"
+#"Last-Translator: Eric Blake <ebb9@byu.net>\n"
+#"Language-Team: Undetermined <und@li.org>\n"
+#"MIME-Version: 1.0\n"
+#"Content-Type: text/plain; charset=UTF-8\n"
+#"Content-Transfer-Encoding: 8bit\n"
+
+msgid "`"
+msgstr "\302\253"
+
+msgid "'"
+msgstr "\302\273"
diff --git a/tests/gnu/macros.h b/tests/gnu/macros.h
new file mode 100755
index 00000000..11db5a8a
--- /dev/null
+++ b/tests/gnu/macros.h
@@ -0,0 +1,64 @@
+/* Common macros used by gnulib tests.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+/* This file contains macros that are used by many gnulib tests.
+ Put here only frequently used macros, say, used by 10 tests or more. */
+
+#include <stdio.h>
+#include <stdlib.h>
+
+/* Define ASSERT_STREAM before including this file if ASSERT must
+ target a stream other than stderr. */
+#ifndef ASSERT_STREAM
+# define ASSERT_STREAM stderr
+#endif
+
+/* ASSERT (condition);
+ verifies that the specified condition is fulfilled. If not, a message
+ is printed to ASSERT_STREAM if defined (defaulting to stderr if
+ undefined) and the program is terminated with an error code.
+
+ This macro has the following properties:
+ - The programmer specifies the expected condition, not the failure
+ condition. This simplifies thinking.
+ - The condition is tested always, regardless of compilation flags.
+ (Unlike the macro from <assert.h>.)
+ - On Unix platforms, the tester can debug the test program with a
+ debugger (provided core dumps are enabled: "ulimit -c unlimited").
+ - For the sake of platforms where no debugger is available (such as
+ some mingw systems), an error message is printed on the error
+ stream that includes the source location of the ASSERT invocation.
+ */
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (ASSERT_STREAM, "%s:%d: assertion failed\n", \
+ __FILE__, __LINE__); \
+ fflush (ASSERT_STREAM); \
+ abort (); \
+ } \
+ } \
+ while (0)
+
+/* SIZEOF (array)
+ returns the number of elements of an array. It works for arrays that are
+ declared outside functions and for local variables of array type. It does
+ *not* work for function parameters of array type, because they are actually
+ parameters of pointer type. */
+#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
diff --git a/tests/gnu/nan.h b/tests/gnu/nan.h
new file mode 100755
index 00000000..611eed3e
--- /dev/null
+++ b/tests/gnu/nan.h
@@ -0,0 +1,60 @@
+/* Macros for not-a-number.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+
+/* NaNf () returns a 'float' not-a-number. */
+
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static float
+NaNf ()
+{
+ static float zero = 0.0f;
+ return zero / zero;
+}
+#else
+# define NaNf() (0.0f / 0.0f)
+#endif
+
+
+/* NaNd () returns a 'double' not-a-number. */
+
+/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */
+#ifdef __DECC
+static double
+NaNd ()
+{
+ static double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNd() (0.0 / 0.0)
+#endif
+
+
+/* NaNl () returns a 'long double' not-a-number. */
+
+/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
+ runtime type conversion. */
+#ifdef __sgi
+static long double NaNl ()
+{
+ double zero = 0.0;
+ return zero / zero;
+}
+#else
+# define NaNl() (0.0L / 0.0L)
+#endif
diff --git a/tests/gnu/obstack_printf.c b/tests/gnu/obstack_printf.c
new file mode 100755
index 00000000..b8e1114c
--- /dev/null
+++ b/tests/gnu/obstack_printf.c
@@ -0,0 +1,92 @@
+/* Formatted output to obstacks.
+ Copyright (C) 2008, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdio.h>
+
+#include "obstack.h"
+#include "vasnprintf.h"
+
+#include <errno.h>
+#include <stdarg.h>
+#include <stdlib.h>
+
+/* Grow an obstack with formatted output. Return the number of bytes
+ added to OBS. No trailing nul byte is added, and the object should
+ be closed with obstack_finish before use.
+
+ Upon memory allocation error, call obstack_alloc_failed_handler.
+ Upon other error, return -1. */
+int
+obstack_printf (struct obstack *obs, const char *format, ...)
+{
+ va_list args;
+ int result;
+
+ va_start (args, format);
+ result = obstack_vprintf (obs, format, args);
+ va_end (args);
+ return result;
+}
+
+/* Grow an obstack with formatted output. Return the number of bytes
+ added to OBS. No trailing nul byte is added, and the object should
+ be closed with obstack_finish before use.
+
+ Upon memory allocation error, call obstack_alloc_failed_handler.
+ Upon other error, return -1. */
+int
+obstack_vprintf (struct obstack *obs, const char *format, va_list args)
+{
+ /* If we are close to the end of the current obstack chunk, use a
+ stack-allocated buffer and copy, to reduce the likelihood of a
+ small-size malloc. Otherwise, print directly into the
+ obstack. */
+ enum { CUTOFF = 1024 };
+ char buf[CUTOFF];
+ char *base = obstack_next_free (obs);
+ size_t len = obstack_room (obs);
+ char *str;
+
+ if (len < CUTOFF)
+ {
+ base = buf;
+ len = CUTOFF;
+ }
+ str = vasnprintf (base, &len, format, args);
+ if (!str)
+ {
+ if (errno == ENOMEM)
+ obstack_alloc_failed_handler ();
+ return -1;
+ }
+ if (str == base && str != buf)
+ /* The output was already computed in place, but we need to
+ account for its size. */
+ obstack_blank_fast (obs, len);
+ else
+ {
+ /* The output exceeded available obstack space or we used buf;
+ copy the resulting string. */
+ obstack_grow (obs, str, len);
+ if (str != buf)
+ free (str);
+ }
+ return len;
+}
diff --git a/tests/gnu/putenv.c b/tests/gnu/putenv.c
new file mode 100755
index 00000000..030f5675
--- /dev/null
+++ b/tests/gnu/putenv.c
@@ -0,0 +1,132 @@
+/* Copyright (C) 1991, 1994, 1997-1998, 2000, 2003-2010 Free Software
+ Foundation, Inc.
+
+ NOTE: The canonical source of this file is maintained with the GNU C
+ Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu.
+
+ This program is free software: you can redistribute it and/or modify it
+ under the terms of the GNU General Public License as published by the
+ Free Software Foundation; either version 3 of the License, or 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <stdlib.h>
+
+#include <stddef.h>
+
+/* Include errno.h *after* sys/types.h to work around header problems
+ on AIX 3.2.5. */
+#include <errno.h>
+#ifndef __set_errno
+# define __set_errno(ev) ((errno) = (ev))
+#endif
+
+#include <string.h>
+#include <unistd.h>
+
+#if HAVE_GNU_LD
+# define environ __environ
+#else
+extern char **environ;
+#endif
+
+#if _LIBC
+/* This lock protects against simultaneous modifications of `environ'. */
+# include <bits/libc-lock.h>
+__libc_lock_define_initialized (static, envlock)
+# define LOCK __libc_lock_lock (envlock)
+# define UNLOCK __libc_lock_unlock (envlock)
+#else
+# define LOCK
+# define UNLOCK
+#endif
+
+static int
+_unsetenv (const char *name)
+{
+ size_t len;
+ char **ep;
+
+ if (name == NULL || *name == '\0' || strchr (name, '=') != NULL)
+ {
+ __set_errno (EINVAL);
+ return -1;
+ }
+
+ len = strlen (name);
+
+ LOCK;
+
+ ep = environ;
+ while (*ep != NULL)
+ if (!strncmp (*ep, name, len) && (*ep)[len] == '=')
+ {
+ /* Found it. Remove this pointer by moving later ones back. */
+ char **dp = ep;
+
+ do
+ dp[0] = dp[1];
+ while (*dp++);
+ /* Continue the loop in case NAME appears again. */
+ }
+ else
+ ++ep;
+
+ UNLOCK;
+
+ return 0;
+}
+
+
+/* Put STRING, which is of the form "NAME=VALUE", in the environment.
+ If STRING contains no `=', then remove STRING from the environment. */
+int
+putenv (char *string)
+{
+ const char *const name_end = strchr (string, '=');
+ register size_t size;
+ register char **ep;
+
+ if (name_end == NULL)
+ {
+ /* Remove the variable from the environment. */
+ return _unsetenv (string);
+ }
+
+ size = 0;
+ for (ep = environ; *ep != NULL; ++ep)
+ if (!strncmp (*ep, string, name_end - string) &&
+ (*ep)[name_end - string] == '=')
+ break;
+ else
+ ++size;
+
+ if (*ep == NULL)
+ {
+ static char **last_environ = NULL;
+ char **new_environ = (char **) malloc ((size + 2) * sizeof (char *));
+ if (new_environ == NULL)
+ return -1;
+ (void) memcpy ((void *) new_environ, (void *) environ,
+ size * sizeof (char *));
+ new_environ[size] = (char *) string;
+ new_environ[size + 1] = NULL;
+ free (last_environ);
+ last_environ = new_environ;
+ environ = new_environ;
+ }
+ else
+ *ep = string;
+
+ return 0;
+}
diff --git a/tests/gnu/signature.h b/tests/gnu/signature.h
new file mode 100755
index 00000000..6e15c43a
--- /dev/null
+++ b/tests/gnu/signature.h
@@ -0,0 +1,48 @@
+/* Macro for checking that a function declaration is compliant.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#ifndef SIGNATURE_CHECK
+
+/* Check that the function FN takes the specified arguments ARGS with
+ a return type of RET. This header is designed to be included after
+ <config.h> and the one system header that is supposed to contain
+ the function being checked, but prior to any other system headers
+ that are necessary for the unit test. Therefore, this file does
+ not include any system headers, nor reference anything outside of
+ the macro arguments. For an example, if foo.h should provide:
+
+ extern int foo (char, float);
+
+ then the unit test named test-foo.c would start out with:
+
+ #include <config.h>
+ #include <foo.h>
+ #include "signature.h"
+ SIGNATURE_CHECK (foo, int, (char, float));
+ #include <other.h>
+ ...
+*/
+# define SIGNATURE_CHECK(fn, ret, args) \
+ SIGNATURE_CHECK1 (fn, ret, args, __LINE__)
+
+/* Necessary to allow multiple SIGNATURE_CHECK lines in a unit test.
+ Note that the checks must not occupy the same line. */
+# define SIGNATURE_CHECK1(fn, ret, args, id) \
+ SIGNATURE_CHECK2 (fn, ret, args, id) /* macroexpand line */
+# define SIGNATURE_CHECK2(fn, ret, args, id) \
+ static ret (* _GL_UNUSED signature_check ## id) args = fn
+
+#endif /* SIGNATURE_CHECK */
diff --git a/tests/gnu/strdup.c b/tests/gnu/strdup.c
new file mode 100755
index 00000000..4b1794ec
--- /dev/null
+++ b/tests/gnu/strdup.c
@@ -0,0 +1,55 @@
+/* Copyright (C) 1991, 1996, 1997, 1998, 2002, 2003, 2004, 2006, 2007, 2009,
+ 2010 Free Software Foundation, Inc.
+
+ This file is part of the GNU C Library.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License along
+ with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#ifndef _LIBC
+# include <config.h>
+#endif
+
+/* Get specification. */
+#include <string.h>
+
+#include <stdlib.h>
+
+#undef __strdup
+#ifdef _LIBC
+# undef strdup
+#endif
+
+#ifndef weak_alias
+# define __strdup strdup
+#endif
+
+/* Duplicate S, returning an identical malloc'd string. */
+char *
+__strdup (const char *s)
+{
+ size_t len = strlen (s) + 1;
+ void *new = malloc (len);
+
+ if (new == NULL)
+ return NULL;
+
+ return (char *) memcpy (new, s, len);
+}
+#ifdef libc_hidden_def
+libc_hidden_def (__strdup)
+#endif
+#ifdef weak_alias
+weak_alias (__strdup, strdup)
+#endif
diff --git a/tests/gnu/symlink.c b/tests/gnu/symlink.c
new file mode 100755
index 00000000..40bbb804
--- /dev/null
+++ b/tests/gnu/symlink.c
@@ -0,0 +1,57 @@
+/* Stub for symlink().
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <unistd.h>
+
+#include <errno.h>
+#include <string.h>
+#include <sys/stat.h>
+
+
+#if HAVE_SYMLINK
+
+# undef symlink
+
+/* Create a symlink, but reject trailing slash. */
+int
+rpl_symlink (char const *contents, char const *name)
+{
+ size_t len = strlen (name);
+ if (len && name[len - 1] == '/')
+ {
+ struct stat st;
+ if (lstat (name, &st) == 0)
+ errno = EEXIST;
+ return -1;
+ }
+ return symlink (contents, name);
+}
+
+#else /* !HAVE_SYMLINK */
+
+/* The system does not support symlinks. */
+int
+symlink (char const *contents _GL_UNUSED,
+ char const *name _GL_UNUSED)
+{
+ errno = ENOSYS;
+ return -1;
+}
+
+#endif /* !HAVE_SYMLINK */
diff --git a/tests/gnu/test-alloca-opt.c b/tests/gnu/test-alloca-opt.c
new file mode 100755
index 00000000..cfbecafc
--- /dev/null
+++ b/tests/gnu/test-alloca-opt.c
@@ -0,0 +1,62 @@
+/* Test of optional automatic memory allocation.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <alloca.h>
+
+#if HAVE_ALLOCA
+
+static void
+do_allocation (int n)
+{
+ void *ptr = alloca (n);
+ (void) ptr;
+}
+
+void (*func) (int) = do_allocation;
+
+#endif
+
+int
+main ()
+{
+#if HAVE_ALLOCA
+ int i;
+
+ /* Repeat a lot of times, to make sure there's no memory leak. */
+ for (i = 0; i < 100000; i++)
+ {
+ /* Try various values.
+ n = 0 gave a crash on Alpha with gcc-2.5.8.
+ Some versions of MacOS X have a stack size limit of 512 KB. */
+ func (34);
+ func (134);
+ func (399);
+ func (510823);
+ func (129321);
+ func (0);
+ func (4070);
+ func (4095);
+ func (1);
+ func (16582);
+ }
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-array_list.c b/tests/gnu/test-array_list.c
new file mode 100755
index 00000000..d2987794
--- /dev/null
+++ b/tests/gnu/test-array_list.c
@@ -0,0 +1,329 @@
+/* Test of sequential list data type implementation.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "gl_array_list.h"
+
+#include <stdlib.h>
+
+#include "progname.h"
+#include "macros.h"
+
+static const char *objects[15] =
+ {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
+ };
+
+#define RANDOM(n) (rand () % (n))
+#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
+
+static void
+check_equals (gl_list_t list1, gl_list_t list2)
+{
+ size_t n, i;
+
+ n = gl_list_size (list1);
+ ASSERT (n == gl_list_size (list2));
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_list_get_at (list1, i) == gl_list_get_at (list2, i));
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ gl_list_t list1, list2;
+
+ set_program_name (argv[0]);
+
+ /* Allow the user to provide a non-default random seed on the command line. */
+ if (argc > 1)
+ srand (atoi (argv[1]));
+
+ {
+ size_t initial_size = RANDOM (50);
+ const void **contents =
+ (const void **) malloc (initial_size * sizeof (const void *));
+ size_t i;
+ unsigned int repeat;
+
+ for (i = 0; i < initial_size; i++)
+ contents[i] = RANDOM_OBJECT ();
+
+ /* Create list1. */
+ list1 = gl_list_nx_create (GL_ARRAY_LIST, NULL, NULL, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
+ /* Create list2. */
+ list2 = gl_list_nx_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, true);
+ ASSERT (list2 != NULL);
+ for (i = 0; i < initial_size; i++)
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
+
+ check_equals (list1, list2);
+
+ for (repeat = 0; repeat < 10000; repeat++)
+ {
+ unsigned int operation = RANDOM (16);
+ switch (operation)
+ {
+ case 0:
+ if (gl_list_size (list1) > 0)
+ {
+ size_t index = RANDOM (gl_list_size (list1));
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ ASSERT (gl_list_get_at (list1, index) == obj);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_get_at (list2, index) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+
+ if (index > 0)
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1))
+ == gl_list_get_at (list1, index - 1));
+ }
+ if (index + 1 < gl_list_size (list1))
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1))
+ == gl_list_get_at (list1, index + 1));
+ }
+ }
+ break;
+ case 1:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+ node1 = gl_list_search (list1, obj);
+ node2 = gl_list_search (list2, obj);
+ if (node1 == NULL)
+ {
+ ASSERT (node2 == NULL);
+ }
+ else
+ {
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ }
+ }
+ break;
+ case 2:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ size_t index1, index2;
+ index1 = gl_list_indexof (list1, obj);
+ index2 = gl_list_indexof (list2, obj);
+ if (index1 == (size_t)(-1))
+ {
+ ASSERT (index2 == (size_t)(-1));
+ }
+ else
+ {
+ ASSERT (index2 != (size_t)(-1));
+ ASSERT (gl_list_get_at (list1, index1) == obj);
+ ASSERT (gl_list_get_at (list2, index2) == obj);
+ ASSERT (index2 == index1);
+ }
+ }
+ break;
+ case 3: /* add 1 element */
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_get_at (list1, 0) == obj);
+ ASSERT (gl_list_get_at (list2, 0) == obj);
+ }
+ break;
+ case 4: /* add 1 element */
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_get_at (list1, gl_list_size (list1) - 1) == obj);
+ ASSERT (gl_list_get_at (list2, gl_list_size (list2) - 1) == obj);
+ }
+ break;
+ case 5: /* add 3 elements */
+ {
+ const char *obj0 = RANDOM_OBJECT ();
+ const char *obj1 = RANDOM_OBJECT ();
+ const char *obj2 = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj1);
+ ASSERT (gl_list_node_value (list2, node2) == obj1);
+ ASSERT (gl_list_get_at (list1, 0) == obj0);
+ ASSERT (gl_list_get_at (list1, 1) == obj1);
+ ASSERT (gl_list_get_at (list1, 2) == obj2);
+ ASSERT (gl_list_get_at (list2, 0) == obj0);
+ ASSERT (gl_list_get_at (list2, 1) == obj1);
+ ASSERT (gl_list_get_at (list2, 2) == obj2);
+ }
+ break;
+ case 6: /* add 1 element */
+ {
+ size_t index = RANDOM (gl_list_size (list1) + 1);
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2;
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_get_at (list1, index) == obj);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_get_at (list2, index) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ if (index > 0)
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1))
+ == gl_list_get_at (list1, index - 1));
+ }
+ if (index + 1 < gl_list_size (list1))
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1))
+ == gl_list_get_at (list1, index + 1));
+ }
+ }
+ break;
+ case 7: case 8: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = gl_list_get_at (list1, RANDOM (n));
+ gl_list_node_t node1, node2;
+ node1 = gl_list_search (list1, obj);
+ node2 = gl_list_search (list2, obj);
+ ASSERT (node1 != NULL);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_remove_node (list1, node1));
+ ASSERT (gl_list_remove_node (list2, node2));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 9: case 10: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ size_t index = RANDOM (n);
+ ASSERT (gl_list_remove_at (list1, index));
+ ASSERT (gl_list_remove_at (list2, index));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 11: case 12: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = gl_list_get_at (list1, RANDOM (n));
+ ASSERT (gl_list_remove (list1, obj));
+ ASSERT (gl_list_remove (list2, obj));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 13:
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = "xyzzy";
+ ASSERT (!gl_list_remove (list1, obj));
+ ASSERT (!gl_list_remove (list2, obj));
+ ASSERT (gl_list_size (list1) == n);
+ }
+ break;
+ case 14:
+ {
+ size_t n = gl_list_size (list1);
+ gl_list_iterator_t iter1, iter2;
+ const void *elt;
+ iter1 = gl_list_iterator (list1);
+ iter2 = gl_list_iterator (list2);
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (gl_list_get_at (list1, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (gl_list_get_at (list2, i) == elt);
+ }
+ ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL));
+ gl_list_iterator_free (&iter1);
+ gl_list_iterator_free (&iter2);
+ }
+ break;
+ case 15:
+ {
+ size_t end = RANDOM (gl_list_size (list1) + 1);
+ size_t start = RANDOM (end + 1);
+ gl_list_iterator_t iter1, iter2;
+ const void *elt;
+ iter1 = gl_list_iterator_from_to (list1, start, end);
+ iter2 = gl_list_iterator_from_to (list2, start, end);
+ for (i = start; i < end; i++)
+ {
+ ASSERT (gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (gl_list_get_at (list1, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (gl_list_get_at (list2, i) == elt);
+ }
+ ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL));
+ gl_list_iterator_free (&iter1);
+ gl_list_iterator_free (&iter2);
+ }
+ break;
+ }
+ check_equals (list1, list2);
+ }
+
+ gl_list_free (list1);
+ gl_list_free (list2);
+ free (contents);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-array_oset.c b/tests/gnu/test-array_oset.c
new file mode 100755
index 00000000..9ec6171c
--- /dev/null
+++ b/tests/gnu/test-array_oset.c
@@ -0,0 +1,144 @@
+/* Test of ordered set data type implementation.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2007.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "gl_array_oset.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gl_xlist.h"
+#include "gl_array_list.h"
+#include "progname.h"
+#include "macros.h"
+
+static const char *objects[30] =
+ {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
+ "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "<", ">", "[", "]"
+ };
+
+#define RANDOM(n) (rand () % (n))
+#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
+
+static void
+check_equals (gl_oset_t set1, gl_list_t set2)
+{
+ size_t n = gl_oset_size (set1);
+ gl_oset_iterator_t iter1;
+ gl_list_iterator_t iter2;
+ const void *elt1;
+ const void *elt2;
+ gl_list_node_t node2;
+ size_t i;
+
+ iter1 = gl_oset_iterator (set1);
+ iter2 = gl_list_iterator (set2);
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_oset_iterator_next (&iter1, &elt1));
+ ASSERT (gl_list_iterator_next (&iter2, &elt2, &node2));
+ ASSERT (elt1 == elt2);
+ }
+ ASSERT (!gl_oset_iterator_next (&iter1, &elt1));
+ ASSERT (!gl_list_iterator_next (&iter2, &elt2, &node2));
+ gl_oset_iterator_free (&iter1);
+ gl_list_iterator_free (&iter2);
+}
+
+static void
+check_all (gl_oset_t set1, gl_list_t set2)
+{
+ check_equals (set1, set2);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gl_oset_t set1;
+ gl_list_t set2;
+
+ set_program_name (argv[0]);
+
+ /* Allow the user to provide a non-default random seed on the command line. */
+ if (argc > 1)
+ srand (atoi (argv[1]));
+
+ {
+ size_t initial_size = RANDOM (20);
+ size_t i;
+ unsigned int repeat;
+
+ /* Create set1. */
+ set1 = gl_oset_nx_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set1 != NULL);
+
+ /* Create set2. */
+ set2 = gl_list_create_empty (GL_ARRAY_LIST, NULL, NULL, NULL, false);
+
+ check_all (set1, set2);
+
+ /* Initialize them. */
+ for (i = 0; i < initial_size; i++)
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_nx_add (set1, obj)
+ == (gl_sortedlist_search (set2, (gl_listelement_compar_fn)strcmp, obj) != NULL
+ ? false
+ : (gl_sortedlist_add (set2, (gl_listelement_compar_fn)strcmp, obj), true)));
+ check_all (set1, set2);
+ }
+
+ for (repeat = 0; repeat < 100000; repeat++)
+ {
+ unsigned int operation = RANDOM (3);
+ switch (operation)
+ {
+ case 0:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_search (set1, obj)
+ == (gl_sortedlist_search (set2, (gl_listelement_compar_fn)strcmp, obj) != NULL));
+ }
+ break;
+ case 1:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_nx_add (set1, obj)
+ == (gl_sortedlist_search (set2, (gl_listelement_compar_fn)strcmp, obj) != NULL
+ ? false
+ : (gl_sortedlist_add (set2, (gl_listelement_compar_fn)strcmp, obj), true)));
+ }
+ break;
+ case 2:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_remove (set1, obj)
+ == gl_sortedlist_remove (set2, (gl_listelement_compar_fn)strcmp, obj));
+ }
+ break;
+ }
+ check_all (set1, set2);
+ }
+
+ gl_oset_free (set1);
+ gl_list_free (set2);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-avltree_oset.c b/tests/gnu/test-avltree_oset.c
new file mode 100755
index 00000000..211c8332
--- /dev/null
+++ b/tests/gnu/test-avltree_oset.c
@@ -0,0 +1,136 @@
+/* Test of ordered set data type implementation.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "gl_avltree_oset.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "gl_array_oset.h"
+#include "progname.h"
+#include "macros.h"
+
+extern void gl_avltree_oset_check_invariants (gl_oset_t set);
+
+static const char *objects[30] =
+ {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o",
+ "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "<", ">", "[", "]"
+ };
+
+#define RANDOM(n) (rand () % (n))
+#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
+
+static void
+check_equals (gl_oset_t set1, gl_oset_t set2)
+{
+ size_t n = gl_oset_size (set1);
+ gl_oset_iterator_t iter1, iter2;
+ const void *elt1;
+ const void *elt2;
+ size_t i;
+
+ iter1 = gl_oset_iterator (set1);
+ iter2 = gl_oset_iterator (set2);
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_oset_iterator_next (&iter1, &elt1));
+ ASSERT (gl_oset_iterator_next (&iter2, &elt2));
+ ASSERT (elt1 == elt2);
+ }
+ ASSERT (!gl_oset_iterator_next (&iter1, &elt1));
+ ASSERT (!gl_oset_iterator_next (&iter2, &elt2));
+ gl_oset_iterator_free (&iter1);
+ gl_oset_iterator_free (&iter2);
+}
+
+static void
+check_all (gl_oset_t set1, gl_oset_t set2)
+{
+ gl_avltree_oset_check_invariants (set2);
+ check_equals (set1, set2);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gl_oset_t set1, set2;
+
+ set_program_name (argv[0]);
+
+ /* Allow the user to provide a non-default random seed on the command line. */
+ if (argc > 1)
+ srand (atoi (argv[1]));
+
+ {
+ size_t initial_size = RANDOM (20);
+ size_t i;
+ unsigned int repeat;
+
+ /* Create set1. */
+ set1 = gl_oset_nx_create_empty (GL_ARRAY_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set1 != NULL);
+
+ /* Create set2. */
+ set2 = gl_oset_nx_create_empty (GL_AVLTREE_OSET, (gl_setelement_compar_fn) strcmp, NULL);
+ ASSERT (set2 != NULL);
+
+ check_all (set1, set2);
+
+ /* Initialize them. */
+ for (i = 0; i < initial_size; i++)
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
+ check_all (set1, set2);
+ }
+
+ for (repeat = 0; repeat < 100000; repeat++)
+ {
+ unsigned int operation = RANDOM (3);
+ switch (operation)
+ {
+ case 0:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_search (set1, obj) == gl_oset_search (set2, obj));
+ }
+ break;
+ case 1:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_nx_add (set1, obj) == gl_oset_nx_add (set2, obj));
+ }
+ break;
+ case 2:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ ASSERT (gl_oset_remove (set1, obj) == gl_oset_remove (set2, obj));
+ }
+ break;
+ }
+ check_all (set1, set2);
+ }
+
+ gl_oset_free (set1);
+ gl_oset_free (set2);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-binary-io.c b/tests/gnu/test-binary-io.c
new file mode 100755
index 00000000..125150b2
--- /dev/null
+++ b/tests/gnu/test-binary-io.c
@@ -0,0 +1,64 @@
+/* Test of binary mode I/O.
+ Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "binary-io.h"
+
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* Test the O_BINARY macro. */
+ {
+ int fd =
+ open ("t-bin-out2.tmp", O_CREAT | O_TRUNC | O_RDWR | O_BINARY, 0600);
+ if (write (fd, "Hello\n", 6) < 0)
+ exit (1);
+ close (fd);
+ }
+ {
+ struct stat statbuf;
+ if (stat ("t-bin-out2.tmp", &statbuf) < 0)
+ exit (1);
+ ASSERT (statbuf.st_size == 6);
+ }
+ unlink ("t-bin-out2.tmp");
+
+ /* Test the SET_BINARY macro. */
+ SET_BINARY (1);
+ fputs ("Hello\n", stdout);
+ fclose (stdout);
+ fclose (stderr);
+ {
+ struct stat statbuf;
+ if (stat ("t-bin-out1.tmp", &statbuf) < 0)
+ exit (1);
+ ASSERT (statbuf.st_size == 6);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-binary-io.sh b/tests/gnu/test-binary-io.sh
new file mode 100755
index 00000000..33e128c3
--- /dev/null
+++ b/tests/gnu/test-binary-io.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-bin-out1.tmp t-bin-out2.tmp"
+./test-binary-io${EXEEXT} > t-bin-out1.tmp || exit 1
+
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/gnu/test-bitrotate.c b/tests/gnu/test-bitrotate.c
new file mode 100755
index 00000000..59c95a87
--- /dev/null
+++ b/tests/gnu/test-bitrotate.c
@@ -0,0 +1,279 @@
+/* Test of <bitrotate.h> substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson <simon@josefsson.org>, 2008. */
+
+#include <config.h>
+
+#include "bitrotate.h"
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (rotl8 (42, 0) == 42);
+ ASSERT (rotl8 (42, 1) == 84);
+ ASSERT (rotl8 (42, 2) == 168);
+ ASSERT (rotl8 (42, 3) == 81);
+ ASSERT (rotl8 (42, 4) == 162);
+ ASSERT (rotl8 (42, 5) == 69);
+ ASSERT (rotl8 (42, 6) == 138);
+ ASSERT (rotl8 (42, 7) == 21);
+ ASSERT (rotl8 (42, 8) == 42);
+
+ ASSERT (rotr8 (42, 0) == 42);
+ ASSERT (rotr8 (42, 1) == 21);
+ ASSERT (rotr8 (42, 2) == 138);
+ ASSERT (rotr8 (42, 3) == 69);
+ ASSERT (rotr8 (42, 4) == 162);
+ ASSERT (rotr8 (42, 5) == 81);
+ ASSERT (rotr8 (42, 6) == 168);
+ ASSERT (rotr8 (42, 7) == 84);
+ ASSERT (rotr8 (42, 8) == 42);
+
+ ASSERT (rotl16 (43981, 0) == 43981);
+ ASSERT (rotl16 (43981, 1) == 22427);
+ ASSERT (rotl16 (43981, 2) == 44854);
+ ASSERT (rotl16 (43981, 3) == 24173);
+ ASSERT (rotl16 (43981, 4) == 48346);
+ ASSERT (rotl16 (43981, 5) == 31157);
+ ASSERT (rotl16 (43981, 6) == 62314);
+ ASSERT (rotl16 (43981, 7) == 59093);
+ ASSERT (rotl16 (43981, 8) == 52651);
+ ASSERT (rotl16 (43981, 9) == 39767);
+ ASSERT (rotl16 (43981, 10) == 13999);
+ ASSERT (rotl16 (43981, 11) == 27998);
+ ASSERT (rotl16 (43981, 12) == 55996);
+ ASSERT (rotl16 (43981, 13) == 46457);
+ ASSERT (rotl16 (43981, 14) == 27379);
+ ASSERT (rotl16 (43981, 15) == 54758);
+ ASSERT (rotl16 (43981, 16) == 43981);
+
+ ASSERT (rotr16 (43981, 0) == 43981);
+ ASSERT (rotr16 (43981, 1) == 54758);
+ ASSERT (rotr16 (43981, 2) == 27379);
+ ASSERT (rotr16 (43981, 3) == 46457);
+ ASSERT (rotr16 (43981, 4) == 55996);
+ ASSERT (rotr16 (43981, 5) == 27998);
+ ASSERT (rotr16 (43981, 6) == 13999);
+ ASSERT (rotr16 (43981, 7) == 39767);
+ ASSERT (rotr16 (43981, 8) == 52651);
+ ASSERT (rotr16 (43981, 9) == 59093);
+ ASSERT (rotr16 (43981, 10) == 62314);
+ ASSERT (rotr16 (43981, 11) == 31157);
+ ASSERT (rotr16 (43981, 12) == 48346);
+ ASSERT (rotr16 (43981, 13) == 24173);
+ ASSERT (rotr16 (43981, 14) == 44854);
+ ASSERT (rotr16 (43981, 15) == 22427);
+ ASSERT (rotr16 (43981, 16) == 43981);
+
+ ASSERT (rotl32 (2309737967U, 1) == 324508639U);
+ ASSERT (rotl32 (2309737967U, 2) == 649017278U);
+ ASSERT (rotl32 (2309737967U, 3) == 1298034556U);
+ ASSERT (rotl32 (2309737967U, 4) == 2596069112U);
+ ASSERT (rotl32 (2309737967U, 5) == 897170929U);
+ ASSERT (rotl32 (2309737967U, 6) == 1794341858U);
+ ASSERT (rotl32 (2309737967U, 7) == 3588683716U);
+ ASSERT (rotl32 (2309737967U, 8) == 2882400137U);
+ ASSERT (rotl32 (2309737967U, 9) == 1469832979U);
+ ASSERT (rotl32 (2309737967U, 10) == 2939665958U);
+ ASSERT (rotl32 (2309737967U, 11) == 1584364621U);
+ ASSERT (rotl32 (2309737967U, 12) == 3168729242U);
+ ASSERT (rotl32 (2309737967U, 13) == 2042491189U);
+ ASSERT (rotl32 (2309737967U, 14) == 4084982378U);
+ ASSERT (rotl32 (2309737967U, 15) == 3874997461U);
+ ASSERT (rotl32 (2309737967U, 16) == 3455027627U);
+ ASSERT (rotl32 (2309737967U, 17) == 2615087959U);
+ ASSERT (rotl32 (2309737967U, 18) == 935208623U);
+ ASSERT (rotl32 (2309737967U, 19) == 1870417246U);
+ ASSERT (rotl32 (2309737967U, 20) == 3740834492U);
+ ASSERT (rotl32 (2309737967U, 21) == 3186701689U);
+ ASSERT (rotl32 (2309737967U, 22) == 2078436083U);
+ ASSERT (rotl32 (2309737967U, 23) == 4156872166U);
+ ASSERT (rotl32 (2309737967U, 24) == 4018777037U);
+ ASSERT (rotl32 (2309737967U, 25) == 3742586779U);
+ ASSERT (rotl32 (2309737967U, 26) == 3190206263U);
+ ASSERT (rotl32 (2309737967U, 27) == 2085445231U);
+ ASSERT (rotl32 (2309737967U, 28) == 4170890462U);
+ ASSERT (rotl32 (2309737967U, 29) == 4046813629U);
+ ASSERT (rotl32 (2309737967U, 30) == 3798659963U);
+ ASSERT (rotl32 (2309737967U, 31) == 3302352631U);
+
+ ASSERT (rotr32 (2309737967U, 1) == 3302352631lU);
+ ASSERT (rotr32 (2309737967U, 2) == 3798659963lU);
+ ASSERT (rotr32 (2309737967U, 3) == 4046813629lU);
+ ASSERT (rotr32 (2309737967U, 4) == 4170890462lU);
+ ASSERT (rotr32 (2309737967U, 5) == 2085445231lU);
+ ASSERT (rotr32 (2309737967U, 6) == 3190206263lU);
+ ASSERT (rotr32 (2309737967U, 7) == 3742586779lU);
+ ASSERT (rotr32 (2309737967U, 8) == 4018777037lU);
+ ASSERT (rotr32 (2309737967U, 9) == 4156872166lU);
+ ASSERT (rotr32 (2309737967U, 10) == 2078436083lU);
+ ASSERT (rotr32 (2309737967U, 11) == 3186701689lU);
+ ASSERT (rotr32 (2309737967U, 12) == 3740834492lU);
+ ASSERT (rotr32 (2309737967U, 13) == 1870417246lU);
+ ASSERT (rotr32 (2309737967U, 14) == 935208623lU);
+ ASSERT (rotr32 (2309737967U, 15) == 2615087959lU);
+ ASSERT (rotr32 (2309737967U, 16) == 3455027627lU);
+ ASSERT (rotr32 (2309737967U, 17) == 3874997461lU);
+ ASSERT (rotr32 (2309737967U, 18) == 4084982378lU);
+ ASSERT (rotr32 (2309737967U, 19) == 2042491189lU);
+ ASSERT (rotr32 (2309737967U, 20) == 3168729242lU);
+ ASSERT (rotr32 (2309737967U, 21) == 1584364621lU);
+ ASSERT (rotr32 (2309737967U, 22) == 2939665958lU);
+ ASSERT (rotr32 (2309737967U, 23) == 1469832979lU);
+ ASSERT (rotr32 (2309737967U, 24) == 2882400137lU);
+ ASSERT (rotr32 (2309737967U, 25) == 3588683716lU);
+ ASSERT (rotr32 (2309737967U, 26) == 1794341858lU);
+ ASSERT (rotr32 (2309737967U, 27) == 897170929lU);
+ ASSERT (rotr32 (2309737967U, 28) == 2596069112lU);
+ ASSERT (rotr32 (2309737967U, 29) == 1298034556lU);
+ ASSERT (rotr32 (2309737967U, 30) == 649017278lU);
+ ASSERT (rotr32 (2309737967U, 31) == 324508639lU);
+
+#ifdef UINT64_MAX
+ ASSERT (rotl64 (16045690984503098046ULL, 1) == 13644637895296644477ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 2) == 8842531716883737339ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 3) == 17685063433767474678ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 4) == 16923382793825397741ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 5) == 15400021513941243867ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 6) == 12353298954172936119ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 7) == 6259853834636320623ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 8) == 12519707669272641246ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 9) == 6592671264835730877ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 10) == 13185342529671461754ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 11) == 7923940985633371893ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 12) == 15847881971266743786ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 13) == 13249019868823935957ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 14) == 8051295663938320299ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 15) == 16102591327876640598ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 16) == 13758438582043729581ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 17) == 9070133090377907547ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 18) == 18140266180755815094ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 19) == 17833788287802078573ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 20) == 17220832501894605531ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 21) == 15994920930079659447ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 22) == 13543097786449767279ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 23) == 8639451499189982943ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 24) == 17278902998379965886ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 25) == 16111061923050380157ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 26) == 13775379772391208699ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 27) == 9104015471072865783ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 28) == 18208030942145731566ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 29) == 17969317810581911517ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 30) == 17491891547454271419ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 31) == 16537039021198991223ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 32) == 14627333968688430831ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 33) == 10807923863667310047ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 34) == 3169103653625068479ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 35) == 6338207307250136958ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 36) == 12676414614500273916ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 37) == 6906085155290996217ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 38) == 13812170310581992434ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 39) == 9177596547454433253ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 40) == 18355193094908866506ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 41) == 18263642116108181397ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 42) == 18080540158506811179ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 43) == 17714336243304070743ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 44) == 16981928412898589871ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 45) == 15517112752087628127ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 46) == 12587481430465704639ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 47) == 6728218787221857663ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 48) == 13456437574443715326ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 49) == 8466131075177879037ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 50) == 16932262150355758074ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 51) == 15417780227001964533ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 52) == 12388816380294377451ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 53) == 6330888686879203287ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 54) == 12661777373758406574ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 55) == 6876810673807261533ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 56) == 13753621347614523066ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 57) == 9060498621519494517ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 58) == 18120997243038989034ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 59) == 17795250412368426453ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 60) == 17143756751027301291ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 61) == 15840769428345050967ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 62) == 13234794782980550319ULL);
+ ASSERT (rotl64 (16045690984503098046ULL, 63) == 8022845492251549023ULL);
+
+ ASSERT (rotr64 (16045690984503098046ULL, 1) == 8022845492251549023ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 2) == 13234794782980550319ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 3) == 15840769428345050967ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 4) == 17143756751027301291ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 5) == 17795250412368426453ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 6) == 18120997243038989034ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 7) == 9060498621519494517ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 8) == 13753621347614523066ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 9) == 6876810673807261533ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 10) == 12661777373758406574ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 11) == 6330888686879203287ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 12) == 12388816380294377451ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 13) == 15417780227001964533ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 14) == 16932262150355758074ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 15) == 8466131075177879037ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 16) == 13456437574443715326ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 17) == 6728218787221857663ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 18) == 12587481430465704639ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 19) == 15517112752087628127ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 20) == 16981928412898589871ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 21) == 17714336243304070743ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 22) == 18080540158506811179ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 23) == 18263642116108181397ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 24) == 18355193094908866506ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 25) == 9177596547454433253ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 26) == 13812170310581992434ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 27) == 6906085155290996217ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 28) == 12676414614500273916ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 29) == 6338207307250136958ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 30) == 3169103653625068479ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 31) == 10807923863667310047ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 32) == 14627333968688430831ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 33) == 16537039021198991223ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 34) == 17491891547454271419ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 35) == 17969317810581911517ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 36) == 18208030942145731566ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 37) == 9104015471072865783ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 38) == 13775379772391208699ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 39) == 16111061923050380157ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 40) == 17278902998379965886ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 41) == 8639451499189982943ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 42) == 13543097786449767279ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 43) == 15994920930079659447ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 44) == 17220832501894605531ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 45) == 17833788287802078573ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 46) == 18140266180755815094ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 47) == 9070133090377907547ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 48) == 13758438582043729581ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 49) == 16102591327876640598ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 50) == 8051295663938320299ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 51) == 13249019868823935957ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 52) == 15847881971266743786ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 53) == 7923940985633371893ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 54) == 13185342529671461754ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 55) == 6592671264835730877ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 56) == 12519707669272641246ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 57) == 6259853834636320623ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 58) == 12353298954172936119ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 59) == 15400021513941243867ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 60) == 16923382793825397741ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 61) == 17685063433767474678ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 62) == 8842531716883737339ULL);
+ ASSERT (rotr64 (16045690984503098046ULL, 63) == 13644637895296644477ULL);
+#endif /* UINT64_MAX */
+
+ return 0;
+}
diff --git a/tests/gnu/test-btowc.c b/tests/gnu/test-btowc.c
new file mode 100755
index 00000000..9d115960
--- /dev/null
+++ b/tests/gnu/test-btowc.c
@@ -0,0 +1,63 @@
+/* Test of conversion of unibyte character to wide character.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (btowc, wint_t, (int));
+
+#include <locale.h>
+#include <stdio.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ int c;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ ASSERT (btowc (EOF) == WEOF);
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ for (c = 0; c < 0x80; c++)
+ ASSERT (btowc (c) == c);
+ for (c = 0xA0; c < 0x100; c++)
+ ASSERT (btowc (c) != WEOF);
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ for (c = 0; c < 0x80; c++)
+ ASSERT (btowc (c) == c);
+ for (c = 0x80; c < 0x100; c++)
+ ASSERT (btowc (c) == WEOF);
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/tests/gnu/test-btowc1.sh b/tests/gnu/test-btowc1.sh
new file mode 100755
index 00000000..aaef48d2
--- /dev/null
+++ b/tests/gnu/test-btowc1.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional french locale is installed"
+ else
+ echo "Skipping test: no traditional french locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-btowc${EXEEXT} 1
diff --git a/tests/gnu/test-btowc2.sh b/tests/gnu/test-btowc2.sh
new file mode 100755
index 00000000..2e060384
--- /dev/null
+++ b/tests/gnu/test-btowc2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-btowc${EXEEXT} 2
diff --git a/tests/gnu/test-c-ctype.c b/tests/gnu/test-c-ctype.c
new file mode 100755
index 00000000..ebe594dd
--- /dev/null
+++ b/tests/gnu/test-c-ctype.c
@@ -0,0 +1,386 @@
+/* Test of character handling in C locale.
+ Copyright (C) 2005, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "c-ctype.h"
+
+#include <locale.h>
+
+#include "macros.h"
+
+static void
+test_all (void)
+{
+ int c;
+
+ for (c = -0x80; c < 0x100; c++)
+ {
+ ASSERT (c_isascii (c) == (c >= 0 && c < 0x80));
+
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ ASSERT (c_isalnum (c) == 1);
+ break;
+ default:
+ ASSERT (c_isalnum (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ ASSERT (c_isalpha (c) == 1);
+ break;
+ default:
+ ASSERT (c_isalpha (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case '\t': case ' ':
+ ASSERT (c_isblank (c) == 1);
+ break;
+ default:
+ ASSERT (c_isblank (c) == 0);
+ break;
+ }
+
+ ASSERT (c_iscntrl (c) == ((c >= 0 && c < 0x20) || c == 0x7f));
+
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ ASSERT (c_isdigit (c) == 1);
+ break;
+ default:
+ ASSERT (c_isdigit (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ case 'g': case 'h': case 'i': case 'j': case 'k': case 'l':
+ case 'm': case 'n': case 'o': case 'p': case 'q': case 'r':
+ case 's': case 't': case 'u': case 'v': case 'w': case 'x':
+ case 'y': case 'z':
+ ASSERT (c_islower (c) == 1);
+ break;
+ default:
+ ASSERT (c_islower (c) == 0);
+ break;
+ }
+
+ ASSERT (c_isgraph (c) == ((c >= 0x20 && c < 0x7f) && c != ' '));
+
+ ASSERT (c_isprint (c) == (c >= 0x20 && c < 0x7f));
+
+ ASSERT (c_ispunct (c) == (c_isgraph (c) && !c_isalnum (c)));
+
+ switch (c)
+ {
+ case ' ': case '\t': case '\n': case '\v': case '\f': case '\r':
+ ASSERT (c_isspace (c) == 1);
+ break;
+ default:
+ ASSERT (c_isspace (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'G': case 'H': case 'I': case 'J': case 'K': case 'L':
+ case 'M': case 'N': case 'O': case 'P': case 'Q': case 'R':
+ case 'S': case 'T': case 'U': case 'V': case 'W': case 'X':
+ case 'Y': case 'Z':
+ ASSERT (c_isupper (c) == 1);
+ break;
+ default:
+ ASSERT (c_isupper (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case '0': case '1': case '2': case '3': case '4': case '5':
+ case '6': case '7': case '8': case '9':
+ case 'A': case 'B': case 'C': case 'D': case 'E': case 'F':
+ case 'a': case 'b': case 'c': case 'd': case 'e': case 'f':
+ ASSERT (c_isxdigit (c) == 1);
+ break;
+ default:
+ ASSERT (c_isxdigit (c) == 0);
+ break;
+ }
+
+ switch (c)
+ {
+ case 'A':
+ ASSERT (c_tolower (c) == 'a');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'B':
+ ASSERT (c_tolower (c) == 'b');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'C':
+ ASSERT (c_tolower (c) == 'c');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'D':
+ ASSERT (c_tolower (c) == 'd');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'E':
+ ASSERT (c_tolower (c) == 'e');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'F':
+ ASSERT (c_tolower (c) == 'f');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'G':
+ ASSERT (c_tolower (c) == 'g');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'H':
+ ASSERT (c_tolower (c) == 'h');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'I':
+ ASSERT (c_tolower (c) == 'i');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'J':
+ ASSERT (c_tolower (c) == 'j');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'K':
+ ASSERT (c_tolower (c) == 'k');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'L':
+ ASSERT (c_tolower (c) == 'l');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'M':
+ ASSERT (c_tolower (c) == 'm');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'N':
+ ASSERT (c_tolower (c) == 'n');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'O':
+ ASSERT (c_tolower (c) == 'o');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'P':
+ ASSERT (c_tolower (c) == 'p');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'Q':
+ ASSERT (c_tolower (c) == 'q');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'R':
+ ASSERT (c_tolower (c) == 'r');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'S':
+ ASSERT (c_tolower (c) == 's');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'T':
+ ASSERT (c_tolower (c) == 't');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'U':
+ ASSERT (c_tolower (c) == 'u');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'V':
+ ASSERT (c_tolower (c) == 'v');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'W':
+ ASSERT (c_tolower (c) == 'w');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'X':
+ ASSERT (c_tolower (c) == 'x');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'Y':
+ ASSERT (c_tolower (c) == 'y');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'Z':
+ ASSERT (c_tolower (c) == 'z');
+ ASSERT (c_toupper (c) == c);
+ break;
+ case 'a':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'A');
+ break;
+ case 'b':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'B');
+ break;
+ case 'c':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'C');
+ break;
+ case 'd':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'D');
+ break;
+ case 'e':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'E');
+ break;
+ case 'f':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'F');
+ break;
+ case 'g':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'G');
+ break;
+ case 'h':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'H');
+ break;
+ case 'i':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'I');
+ break;
+ case 'j':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'J');
+ break;
+ case 'k':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'K');
+ break;
+ case 'l':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'L');
+ break;
+ case 'm':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'M');
+ break;
+ case 'n':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'N');
+ break;
+ case 'o':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'O');
+ break;
+ case 'p':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'P');
+ break;
+ case 'q':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'Q');
+ break;
+ case 'r':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'R');
+ break;
+ case 's':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'S');
+ break;
+ case 't':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'T');
+ break;
+ case 'u':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'U');
+ break;
+ case 'v':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'V');
+ break;
+ case 'w':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'W');
+ break;
+ case 'x':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'X');
+ break;
+ case 'y':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'Y');
+ break;
+ case 'z':
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == 'Z');
+ break;
+ default:
+ ASSERT (c_tolower (c) == c);
+ ASSERT (c_toupper (c) == c);
+ break;
+ }
+ }
+}
+
+int
+main ()
+{
+ test_all ();
+
+ setlocale (LC_ALL, "de_DE");
+ test_all ();
+
+ setlocale (LC_ALL, "ja_JP.EUC-JP");
+ test_all ();
+
+ return 0;
+}
diff --git a/tests/gnu/test-c-strcase.sh b/tests/gnu/test-c-strcase.sh
new file mode 100755
index 00000000..5fcf906b
--- /dev/null
+++ b/tests/gnu/test-c-strcase.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# Test in the C locale.
+./test-c-strcasecmp${EXEEXT} || exit 1
+./test-c-strncasecmp${EXEEXT} || exit 1
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-c-strcasecmp${EXEEXT} locale || exit 1
+ LC_ALL=$LOCALE_FR ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+# Test in a Turkish UTF-8 locale.
+: ${LOCALE_TR_UTF8=tr_TR.UTF-8}
+if test $LOCALE_TR_UTF8 != none; then
+ LC_ALL=$LOCALE_TR_UTF8 ./test-c-strcasecmp${EXEEXT} locale || exit 1
+ LC_ALL=$LOCALE_TR_UTF8 ./test-c-strncasecmp${EXEEXT} locale || exit 1
+fi
+
+exit 0
diff --git a/tests/gnu/test-c-strcasecmp.c b/tests/gnu/test-c-strcasecmp.c
new file mode 100755
index 00000000..84ea9b55
--- /dev/null
+++ b/tests/gnu/test-c-strcasecmp.c
@@ -0,0 +1,65 @@
+/* Test of case-insensitive string comparison function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "c-strcase.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ if (argc > 1)
+ {
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+ }
+
+ ASSERT (c_strcasecmp ("paragraph", "Paragraph") == 0);
+
+ ASSERT (c_strcasecmp ("paragrapH", "parAgRaph") == 0);
+
+ ASSERT (c_strcasecmp ("paragraph", "paraLyzed") < 0);
+ ASSERT (c_strcasecmp ("paraLyzed", "paragraph") > 0);
+
+ ASSERT (c_strcasecmp ("para", "paragraph") < 0);
+ ASSERT (c_strcasecmp ("paragraph", "para") > 0);
+
+ /* The following tests shows how c_strcasecmp() is different from
+ strcasecmp(). */
+
+ ASSERT (c_strcasecmp ("\311mile", "\351mile") < 0);
+ ASSERT (c_strcasecmp ("\351mile", "\311mile") > 0);
+
+ /* The following tests shows how c_strcasecmp() is different from
+ mbscasecmp(). */
+
+ ASSERT (c_strcasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R") > 0); /* özgür */
+ ASSERT (c_strcasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r") < 0); /* özgür */
+
+ /* This test shows how strings of different size cannot compare equal. */
+ ASSERT (c_strcasecmp ("turkish", "TURK\304\260SH") < 0);
+ ASSERT (c_strcasecmp ("TURK\304\260SH", "turkish") > 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-c-strncasecmp.c b/tests/gnu/test-c-strncasecmp.c
new file mode 100755
index 00000000..f02cb2d6
--- /dev/null
+++ b/tests/gnu/test-c-strncasecmp.c
@@ -0,0 +1,79 @@
+/* Test of case-insensitive string comparison function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "c-strcase.h"
+
+#include <locale.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ if (argc > 1)
+ {
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+ }
+
+ ASSERT (c_strncasecmp ("paragraph", "Paragraph", 1000000) == 0);
+ ASSERT (c_strncasecmp ("paragraph", "Paragraph", 9) == 0);
+
+ ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 1000000) == 0);
+ ASSERT (c_strncasecmp ("paragrapH", "parAgRaph", 9) == 0);
+
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 10) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 9) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 5) < 0);
+ ASSERT (c_strncasecmp ("paragraph", "paraLyzed", 4) == 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 10) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 9) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 5) > 0);
+ ASSERT (c_strncasecmp ("paraLyzed", "paragraph", 4) == 0);
+
+ ASSERT (c_strncasecmp ("para", "paragraph", 10) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 9) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 5) < 0);
+ ASSERT (c_strncasecmp ("para", "paragraph", 4) == 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 10) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 9) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 5) > 0);
+ ASSERT (c_strncasecmp ("paragraph", "para", 4) == 0);
+
+ /* The following tests shows how c_strncasecmp() is different from
+ strncasecmp(). */
+
+ ASSERT (c_strncasecmp ("\311mily", "\351mile", 4) < 0);
+ ASSERT (c_strncasecmp ("\351mile", "\311mily", 4) > 0);
+
+ /* The following tests shows how c_strncasecmp() is different from
+ mbsncasecmp(). */
+
+ ASSERT (c_strncasecmp ("\303\266zg\303\274r", "\303\226ZG\303\234R", 99) > 0); /* özgür */
+ ASSERT (c_strncasecmp ("\303\226ZG\303\234R", "\303\266zg\303\274r", 99) < 0); /* özgür */
+
+ /* This test shows how strings of different size cannot compare equal. */
+ ASSERT (c_strncasecmp ("turkish", "TURK\304\260SH", 7) < 0);
+ ASSERT (c_strncasecmp ("TURK\304\260SH", "turkish", 7) > 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-canonicalize-lgpl.c b/tests/gnu/test-canonicalize-lgpl.c
new file mode 100755
index 00000000..cbf481d3
--- /dev/null
+++ b/tests/gnu/test-canonicalize-lgpl.c
@@ -0,0 +1,222 @@
+/* Test of execution of program termination handlers.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (realpath, char *, (const char *, char *));
+SIGNATURE_CHECK (canonicalize_file_name, char *, (const char *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdio.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "t-can-lgpl.tmp"
+
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
+
+int
+main (void)
+{
+#ifdef GNULIB_CANONICALIZE
+ /* No need to test canonicalize-lgpl module if canonicalize is also
+ in use. */
+ return 0;
+#endif
+
+ /* Setup some hierarchy to be used by this test. Start by removing
+ any leftovers from a previous partial run. */
+ {
+ int fd;
+ ignore_value (system ("rm -rf " BASE " ise"));
+ ASSERT (mkdir (BASE, 0700) == 0);
+ fd = creat (BASE "/tra", 0600);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Check for ., .., intermediate // handling, and for error cases. */
+ {
+ char *result = canonicalize_file_name (BASE "//./..//" BASE "/tra");
+ ASSERT (result != NULL);
+ ASSERT (strstr (result, "/" BASE "/tra")
+ == result + strlen (result) - strlen ("/" BASE "/tra"));
+ free (result);
+ errno = 0;
+ result = canonicalize_file_name ("");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ result = canonicalize_file_name (null_ptr ());
+ ASSERT (result == NULL);
+ ASSERT (errno == EINVAL);
+ }
+
+ /* Check that a non-directory with trailing slash yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/tra/");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOTDIR);
+ }
+
+ /* Check that a missing directory yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/zzz/..");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* From here on out, tests involve symlinks. */
+ if (symlink (BASE "/ket", "ise") != 0)
+ {
+ ASSERT (remove (BASE "/tra") == 0);
+ ASSERT (rmdir (BASE) == 0);
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink ("bef", BASE "/plo") == 0);
+ ASSERT (symlink ("tra", BASE "/huk") == 0);
+ ASSERT (symlink ("lum", BASE "/bef") == 0);
+ ASSERT (symlink ("wum", BASE "/ouk") == 0);
+ ASSERT (symlink ("../ise", BASE "/ket") == 0);
+ ASSERT (mkdir (BASE "/lum", 0700) == 0);
+ ASSERT (symlink ("//.//../..", BASE "/droot") == 0);
+
+ /* Check that the symbolic link to a file can be resolved. */
+ {
+ char *result1 = canonicalize_file_name (BASE "/huk");
+ char *result2 = canonicalize_file_name (BASE "/tra");
+ ASSERT (result1 != NULL);
+ ASSERT (result2 != NULL);
+ ASSERT (strcmp (result1, result2) == 0);
+ ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/tra"),
+ "/" BASE "/tra") == 0);
+ free (result1);
+ free (result2);
+ }
+
+ /* Check that the symbolic link to a directory can be resolved. */
+ {
+ char *result1 = canonicalize_file_name (BASE "/plo");
+ char *result2 = canonicalize_file_name (BASE "/bef");
+ char *result3 = canonicalize_file_name (BASE "/lum");
+ ASSERT (result1 != NULL);
+ ASSERT (result2 != NULL);
+ ASSERT (result3 != NULL);
+ ASSERT (strcmp (result1, result2) == 0);
+ ASSERT (strcmp (result2, result3) == 0);
+ ASSERT (strcmp (result1 + strlen (result1) - strlen ("/" BASE "/lum"),
+ "/" BASE "/lum") == 0);
+ free (result1);
+ free (result2);
+ free (result3);
+ }
+
+ /* Check that a symbolic link to a nonexistent file yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/ouk");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* Check that a non-directory symlink with trailing slash yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/huk/");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOTDIR);
+ }
+
+ /* Check that a missing directory via symlink yields NULL. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name (BASE "/ouk/..");
+ ASSERT (result == NULL);
+ ASSERT (errno == ENOENT);
+ }
+
+ /* Check that a loop of symbolic links is detected. */
+ {
+ char *result;
+ errno = 0;
+ result = canonicalize_file_name ("ise");
+ ASSERT (result == NULL);
+ ASSERT (errno == ELOOP);
+ }
+
+ /* Check that leading // is honored correctly. */
+ {
+ struct stat st1;
+ struct stat st2;
+ char *result1 = canonicalize_file_name ("//.");
+ char *result2 = canonicalize_file_name (BASE "/droot");
+ ASSERT (result1);
+ ASSERT (result2);
+ ASSERT (stat ("/", &st1) == 0);
+ ASSERT (stat ("//", &st2) == 0);
+ if (SAME_INODE (st1, st2))
+ {
+ ASSERT (strcmp (result1, "/") == 0);
+ ASSERT (strcmp (result2, "/") == 0);
+ }
+ else
+ {
+ ASSERT (strcmp (result1, "//") == 0);
+ ASSERT (strcmp (result2, "//") == 0);
+ }
+ free (result1);
+ free (result2);
+ }
+
+
+ /* Cleanup. */
+ ASSERT (remove (BASE "/droot") == 0);
+ ASSERT (remove (BASE "/plo") == 0);
+ ASSERT (remove (BASE "/huk") == 0);
+ ASSERT (remove (BASE "/bef") == 0);
+ ASSERT (remove (BASE "/ouk") == 0);
+ ASSERT (remove (BASE "/ket") == 0);
+ ASSERT (remove (BASE "/lum") == 0);
+ ASSERT (remove (BASE "/tra") == 0);
+ ASSERT (remove (BASE) == 0);
+ ASSERT (remove ("ise") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-cloexec.c b/tests/gnu/test-cloexec.c
new file mode 100755
index 00000000..801ac232
--- /dev/null
+++ b/tests/gnu/test-cloexec.c
@@ -0,0 +1,141 @@
+/* Test duplicating non-inheritable file descriptors.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include "cloexec.h"
+
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Return non-zero if FD is open and inheritable across exec/spawn. */
+static int
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return 0;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static int
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+int
+main (void)
+{
+ const char *file = "test-cloexec.tmp";
+ int fd = creat (file, 0600);
+ int fd2;
+
+ /* Assume std descriptors were provided by invoker. */
+ ASSERT (STDERR_FILENO < fd);
+ ASSERT (is_inheritable (fd));
+
+ /* Normal use of set_cloexec_flag. */
+ ASSERT (set_cloexec_flag (fd, true) == 0);
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ ASSERT (!is_inheritable (fd));
+#endif
+ ASSERT (set_cloexec_flag (fd, false) == 0);
+ ASSERT (is_inheritable (fd));
+
+ /* Normal use of dup_cloexec. */
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (!is_inheritable (fd2));
+ ASSERT (close (fd) == 0);
+ ASSERT (dup_cloexec (fd2) == fd);
+ ASSERT (!is_inheritable (fd));
+ ASSERT (close (fd2) == 0);
+
+ /* On systems that distinguish between text and binary mode,
+ dup_cloexec reuses the mode of the source. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_mode (fd, O_BINARY));
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (is_mode (fd2, O_BINARY));
+ ASSERT (close (fd2) == 0);
+ setmode (fd, O_TEXT);
+ ASSERT (is_mode (fd, O_TEXT));
+ fd2 = dup_cloexec (fd);
+ ASSERT (fd < fd2);
+ ASSERT (is_mode (fd2, O_TEXT));
+ ASSERT (close (fd2) == 0);
+
+ /* Test error handling. */
+ errno = 0;
+ ASSERT (set_cloexec_flag (-1, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (set_cloexec_flag (10000000, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (set_cloexec_flag (fd2, false) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (-1) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (10000000) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup_cloexec (fd2) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Clean up. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-closein.c b/tests/gnu/test-closein.c
new file mode 100755
index 00000000..6b99b186
--- /dev/null
+++ b/tests/gnu/test-closein.c
@@ -0,0 +1,53 @@
+/* Test of closein module.
+ Copyright (C) 2007, 2008, 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake. */
+
+#include <config.h>
+
+#include "closein.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "binary-io.h"
+#include "ignore-value.h"
+
+char *program_name;
+
+/* With no arguments, do nothing. With arguments, attempt to consume
+ first 6 bytes of stdin. In either case, let exit() take care of
+ closing std streams and changing exit status if ferror(stdin). */
+int
+main (int argc, char **argv)
+{
+ char buf[7];
+ atexit (close_stdin);
+ program_name = argv[0];
+
+ /* close_stdin currently relies on ftell, but mingw ftell is
+ unreliable on text mode input. */
+ SET_BINARY (0);
+
+ if (argc > 2)
+ close (0);
+
+ if (argc > 1)
+ ignore_value (fread (buf, 1, 6, stdin));
+ return 0;
+}
diff --git a/tests/gnu/test-closein.sh b/tests/gnu/test-closein.sh
new file mode 100755
index 00000000..a75929a2
--- /dev/null
+++ b/tests/gnu/test-closein.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+p=t-closein-
+tmpfiles="${p}in.tmp ${p}xout.tmp ${p}out1.tmp ${p}out2.tmp"
+
+echo Hello world > ${p}in.tmp
+echo world > ${p}xout.tmp
+
+# Test with seekable stdin; followon process must see remaining data
+(./test-closein${EXEEXT}; cat) < ${p}in.tmp > ${p}out1.tmp || exit 1
+cmp ${p}out1.tmp ${p}in.tmp || exit 1
+
+(./test-closein${EXEEXT} consume; cat) < ${p}in.tmp > ${p}out2.tmp || exit 1
+cmp ${p}out2.tmp ${p}xout.tmp || exit 1
+
+# Test for lack of error on pipe. Ignore any EPIPE failures from cat.
+cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} || exit 1
+
+cat ${p}in.tmp 2>/dev/null | ./test-closein${EXEEXT} consume || exit 1
+
+# Test for lack of error when nothing is read
+./test-closein${EXEEXT} </dev/null || exit 1
+
+./test-closein${EXEEXT} <&- || exit 1
+
+# Test for no error when EOF is read early
+./test-closein${EXEEXT} consume </dev/null || exit 1
+
+# Test for error when read fails because no file available
+./test-closein${EXEEXT} consume close <&- 2>/dev/null && exit 1
+
+# Cleanup
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/gnu/test-dirname.c b/tests/gnu/test-dirname.c
new file mode 100755
index 00000000..88cb8d65
--- /dev/null
+++ b/tests/gnu/test-dirname.c
@@ -0,0 +1,191 @@
+/* Test the gnulib dirname module.
+ Copyright (C) 2005, 2006, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "dirname.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+struct test {
+ const char *name; /* Name under test. */
+ const char *dir; /* dir_name (name). */
+ const char *last; /* last_component (name). */
+ const char *base; /* base_name (name). */
+ const char *stripped; /* name after strip_trailing_slashes (name). */
+ bool modified; /* result of strip_trailing_slashes (name). */
+ bool absolute; /* IS_ABSOLUTE_FILE_NAME (name). */
+};
+
+static struct test tests[] = {
+ {"d/f", "d", "f", "f", "d/f", false, false},
+ {"/d/f", "/d", "f", "f", "/d/f", false, true},
+ {"d/f/", "d", "f/", "f/", "d/f", true, false},
+ {"d/f//", "d", "f//", "f/", "d/f", true, false},
+ {"f", ".", "f", "f", "f", false, false},
+ {"/", "/", "", "/", "/", false, true},
+#if DOUBLE_SLASH_IS_DISTINCT_ROOT
+ {"//", "//", "", "//", "//", false, true},
+ {"//d", "//", "d", "d", "//d", false, true},
+#else
+ {"//", "/", "", "/", "/", true, true},
+ {"//d", "/", "d", "d", "//d", false, true},
+#endif
+ {"///", "/", "", "/", "/", true, true},
+ {"///a///", "/", "a///", "a/", "///a", true, true},
+ /* POSIX requires dirname("") and basename("") to both return ".",
+ but dir_name and base_name are defined differently. */
+ {"", ".", "", "", "", false, false},
+ {".", ".", ".", ".", ".", false, false},
+ {"..", ".", "..", "..", "..", false, false},
+#if FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR
+ {"a\\", ".", "a\\", "a\\", "a", true, false},
+ {"a\\b", "a", "b", "b", "a\\b", false, false},
+ {"\\", "\\", "", "\\", "\\", false, true},
+ {"\\/\\", "\\", "", "\\", "\\", true, true},
+ {"\\\\/", "\\", "", "\\", "\\", true, true},
+ {"\\//", "\\", "", "\\", "\\", true, true},
+ {"//\\", "/", "", "/", "/", true, true},
+#else
+ {"a\\", ".", "a\\", "a\\", "a\\", false, false},
+ {"a\\b", ".", "a\\b", "a\\b", "a\\b", false, false},
+ {"\\", ".", "\\", "\\", "\\", false, false},
+ {"\\/\\", "\\", "\\", "\\", "\\/\\",false, false},
+ {"\\\\/", ".", "\\\\/","\\\\/","\\\\", true, false},
+ {"\\//", ".", "\\//", "\\/", "\\", true, false},
+# if DOUBLE_SLASH_IS_DISTINCT_ROOT
+ {"//\\", "//", "\\", "\\", "//\\", false, true},
+# else
+ {"//\\", "/", "\\", "\\", "//\\", false, true},
+# endif
+#endif
+#if FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX
+# if FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE
+ {"c:", "c:", "", "c:", "c:", false, false},
+ {"c:/", "c:/", "", "c:/", "c:/", false, true},
+ {"c://", "c:/", "", "c:/", "c:/", true, true},
+ {"c:/d", "c:/", "d", "d", "c:/d", false, true},
+ {"c://d", "c:/", "d", "d", "c://d",false, true},
+ {"c:/d/", "c:/", "d/", "d/", "c:/d", true, true},
+ {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true},
+ {"c:d", "c:.", "d", "d", "c:d", false, false},
+ {"c:d/", "c:.", "d/", "d/", "c:d", true, false},
+ {"c:d/f", "c:d", "f", "f", "c:d/f",false, false},
+ {"a:b:c", "a:.", "b:c", "./b:c","a:b:c",false, false},
+ {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false},
+ {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false},
+# else /* ! FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE */
+ {"c:", "c:", "", "c:", "c:", false, true},
+ {"c:/", "c:", "", "c:", "c:", true, true},
+ {"c://", "c:", "", "c:", "c:", true, true},
+ {"c:/d", "c:", "d", "d", "c:/d", false, true},
+ {"c://d", "c:", "d", "d", "c://d",false, true},
+ {"c:/d/", "c:", "d/", "d/", "c:/d", true, true},
+ {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, true},
+ {"c:d", "c:", "d", "d", "c:d", false, true},
+ {"c:d/", "c:", "d/", "d/", "c:d", true, true},
+ {"c:d/f", "c:d", "f", "f", "c:d/f",false, true},
+ {"a:b:c", "a:", "b:c", "./b:c","a:b:c",false, true},
+ {"a/b:c", "a", "b:c", "./b:c","a/b:c",false, false},
+ {"a/b:c/", "a", "b:c/", "./b:c/","a/b:c",true, false},
+# endif
+#else /* ! FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX */
+ {"c:", ".", "c:", "c:", "c:", false, false},
+ {"c:/", ".", "c:/", "c:/", "c:", true, false},
+ {"c://", ".", "c://", "c:/", "c:", true, false},
+ {"c:/d", "c:", "d", "d", "c:/d", false, false},
+ {"c://d", "c:", "d", "d", "c://d",false, false},
+ {"c:/d/", "c:", "d/", "d/", "c:/d", true, false},
+ {"c:/d/f", "c:/d", "f", "f", "c:/d/f",false, false},
+ {"c:d", ".", "c:d", "c:d", "c:d", false, false},
+ {"c:d/", ".", "c:d/", "c:d/", "c:d", true, false},
+ {"c:d/f", "c:d", "f", "f", "c:d/f",false, false},
+ {"a:b:c", ".", "a:b:c","a:b:c","a:b:c",false, false},
+ {"a/b:c", "a", "b:c", "b:c", "a/b:c",false, false},
+ {"a/b:c/", "a", "b:c/", "b:c/", "a/b:c",true, false},
+#endif
+ {"1:", ".", "1:", "1:", "1:", false, false},
+ {"1:/", ".", "1:/", "1:/", "1:", true, false},
+ {"/:", "/", ":", ":", "/:", false, true},
+ {"/:/", "/", ":/", ":/", "/:", true, true},
+ /* End sentinel. */
+ {NULL, NULL, NULL, NULL, NULL, false, false}
+};
+
+int
+main (void)
+{
+ struct test *t;
+ bool ok = true;
+
+ for (t = tests; t->name; t++)
+ {
+ char *dir = dir_name (t->name);
+ int dirlen = dir_len (t->name);
+ char *last = last_component (t->name);
+ char *base = base_name (t->name);
+ int baselen = base_len (base);
+ char *stripped = strdup (t->name);
+ bool modified = strip_trailing_slashes (stripped);
+ bool absolute = IS_ABSOLUTE_FILE_NAME (t->name);
+ if (! (strcmp (dir, t->dir) == 0
+ && (dirlen == strlen (dir)
+ || (dirlen + 1 == strlen (dir) && dir[dirlen] == '.'))))
+ {
+ ok = false;
+ printf ("dir_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+ t->name, dir, dirlen,
+ t->dir, (unsigned long) strlen (t->dir));
+ }
+ if (strcmp (last, t->last))
+ {
+ ok = false;
+ printf ("last_component `%s': got `%s', expected `%s'\n",
+ t->name, last, t->last);
+ }
+ if (! (strcmp (base, t->base) == 0
+ && (baselen == strlen (base)
+ || (baselen + 1 == strlen (base)
+ && ISSLASH (base[baselen])))))
+ {
+ ok = false;
+ printf ("base_name `%s': got `%s' len %d, expected `%s' len %ld\n",
+ t->name, base, baselen,
+ t->base, (unsigned long) strlen (t->base));
+ }
+ if (strcmp (stripped, t->stripped) || modified != t->modified)
+ {
+ ok = false;
+ printf ("strip_trailing_slashes `%s': got %s %s, expected %s %s\n",
+ t->name, stripped, modified ? "changed" : "unchanged",
+ t->stripped, t->modified ? "changed" : "unchanged");
+ }
+ if (t->absolute != absolute)
+ {
+ ok = false;
+ printf ("`%s': got %s, expected %s\n", t->name,
+ absolute ? "absolute" : "relative",
+ t->absolute ? "absolute" : "relative");
+ }
+ free (dir);
+ free (base);
+ free (stripped);
+ }
+ return ok ? 0 : 1;
+}
diff --git a/tests/gnu/test-dup-safer.c b/tests/gnu/test-dup-safer.c
new file mode 100755
index 00000000..28f13177
--- /dev/null
+++ b/tests/gnu/test-dup-safer.c
@@ -0,0 +1,175 @@
+/* Test that dup_safer leaves standard fds alone.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include "unistd--.h"
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+
+#include "binary-io.h"
+#include "cloexec.h"
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+/* This test intentionally closes stderr. So, we arrange to have fd 10
+ (outside the range of interesting fd's during the test) set up to
+ duplicate the original stderr. */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn. */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return 0;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return true if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static bool
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+#define witness "test-dup-safer.txt"
+
+int
+main (void)
+{
+ int i;
+ int fd;
+
+ /* We close fd 2 later, so save it in fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
+
+ /* Create file for later checks. */
+ fd = creat (witness, 0600);
+ ASSERT (STDERR_FILENO < fd);
+
+ /* Four iterations, with progressively more standard descriptors
+ closed. */
+ for (i = -1; i <= STDERR_FILENO; i++)
+ {
+ if (0 <= i)
+ ASSERT (close (i) == 0);
+
+ /* Detect errors. */
+ errno = 0;
+ ASSERT (dup (-1) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup (10000000) == -1);
+ ASSERT (errno == EBADF);
+ close (fd + 1);
+ errno = 0;
+ ASSERT (dup (fd + 1) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Preserve text vs. binary. */
+ setmode (fd, O_BINARY);
+ ASSERT (dup (fd) == fd + 1);
+ ASSERT (is_open (fd + 1));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (is_mode (fd + 1, O_BINARY));
+
+ ASSERT (close (fd + 1) == 0);
+ setmode (fd, O_TEXT);
+ ASSERT (dup (fd) == fd + 1);
+ ASSERT (is_open (fd + 1));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (is_mode (fd + 1, O_TEXT));
+
+ /* Create cloexec copy. */
+ ASSERT (close (fd + 1) == 0);
+ ASSERT (fd_safer_flag (dup_cloexec (fd), O_CLOEXEC) == fd + 1);
+ ASSERT (set_cloexec_flag (fd + 1, true) == 0);
+ ASSERT (is_open (fd + 1));
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (close (fd) == 0);
+
+ /* dup always creates inheritable copies. Also, check that
+ earliest slot past std fds is used. */
+ ASSERT (dup (fd + 1) == fd);
+ ASSERT (is_open (fd));
+ ASSERT (is_inheritable (fd));
+ ASSERT (close (fd + 1) == 0);
+ }
+
+ /* Cleanup. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (witness) == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-dup2.c b/tests/gnu/test-dup2.c
new file mode 100755
index 00000000..3bad63a0
--- /dev/null
+++ b/tests/gnu/test-dup2.c
@@ -0,0 +1,193 @@
+/* Test duplicating file descriptors.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (dup2, int, (int, int));
+
+#include <errno.h>
+#include <fcntl.h>
+
+#include "binary-io.h"
+
+#if GNULIB_CLOEXEC
+# include "cloexec.h"
+#endif
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "macros.h"
+
+/* Return non-zero if FD is open. */
+static int
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+#if GNULIB_CLOEXEC
+/* Return non-zero if FD is open and inheritable across exec/spawn. */
+static int
+is_inheritable (int fd)
+{
+# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return 0;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+# else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+# endif
+}
+#endif /* GNULIB_CLOEXEC */
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static int
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+int
+main (void)
+{
+ const char *file = "test-dup2.tmp";
+ char buffer[1];
+ int fd = open (file, O_CREAT | O_TRUNC | O_RDWR, 0600);
+
+ /* Assume std descriptors were provided by invoker. */
+ ASSERT (STDERR_FILENO < fd);
+ ASSERT (is_open (fd));
+ /* Ignore any other fd's leaked into this process. */
+ close (fd + 1);
+ close (fd + 2);
+ ASSERT (!is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+
+ /* Assigning to self must be a no-op. */
+ ASSERT (dup2 (fd, fd) == fd);
+ ASSERT (is_open (fd));
+
+ /* The source must be valid. */
+ errno = 0;
+ ASSERT (dup2 (-1, fd) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup2 (AT_FDCWD, fd) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (is_open (fd));
+
+ /* If the source is not open, then the destination is unaffected. */
+ errno = 0;
+ ASSERT (dup2 (fd + 1, fd + 1) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (!is_open (fd + 1));
+ errno = 0;
+ ASSERT (dup2 (fd + 1, fd) == -1);
+ ASSERT (errno == EBADF);
+ ASSERT (is_open (fd));
+
+ /* The destination must be valid. */
+ errno = 0;
+ ASSERT (dup2 (fd, -2) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (dup2 (fd, 10000000) == -1);
+ ASSERT (errno == EBADF);
+
+ /* Using dup2 can skip fds. */
+ ASSERT (dup2 (fd, fd + 2) == fd + 2);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+
+ /* Verify that dup2 closes the previous occupant of a fd. */
+ ASSERT (open ("/dev/null", O_WRONLY, 0600) == fd + 1);
+ ASSERT (dup2 (fd + 1, fd) == fd);
+ ASSERT (close (fd + 1) == 0);
+ ASSERT (write (fd, "1", 1) == 1);
+ ASSERT (dup2 (fd + 2, fd) == fd);
+ ASSERT (lseek (fd, 0, SEEK_END) == 0);
+ ASSERT (write (fd + 2, "2", 1) == 1);
+ ASSERT (lseek (fd, 0, SEEK_SET) == 0);
+ ASSERT (read (fd, buffer, 1) == 1);
+ ASSERT (*buffer == '2');
+
+#if GNULIB_CLOEXEC
+ /* Any new fd created by dup2 must not be cloexec. */
+ ASSERT (close (fd + 2) == 0);
+ ASSERT (dup_cloexec (fd) == fd + 1);
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (dup2 (fd + 1, fd + 1) == fd + 1);
+ ASSERT (!is_inheritable (fd + 1));
+ ASSERT (dup2 (fd + 1, fd + 2) == fd + 2);
+ ASSERT (is_inheritable (fd + 2));
+#endif
+
+ /* On systems that distinguish between text and binary mode, dup2
+ reuses the mode of the source. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (dup2 (fd, fd + 1) == fd + 1);
+ ASSERT (is_mode (fd + 1, O_BINARY));
+ setmode (fd, O_TEXT);
+ ASSERT (is_mode (fd, O_TEXT));
+ ASSERT (dup2 (fd, fd + 1) == fd + 1);
+ ASSERT (is_mode (fd + 1, O_TEXT));
+
+ /* Clean up. */
+ ASSERT (close (fd + 2) == 0);
+ ASSERT (close (fd + 1) == 0);
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-environ.c b/tests/gnu/test-environ.c
new file mode 100755
index 00000000..534c4e60
--- /dev/null
+++ b/tests/gnu/test-environ.c
@@ -0,0 +1,44 @@
+/* Test of environ variable.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include <string.h>
+
+int
+main ()
+{
+ /* The environment variables that are set even in the weirdest situations
+ are HOME and PATH.
+ POSIX says that HOME is initialized by the system, and that PATH may be
+ unset. But in practice it's more frequent to see HOME unset and PATH
+ set. So we test the presence of PATH. */
+ char **remaining_variables = environ;
+ char *string;
+
+ for (; (string = *remaining_variables) != NULL; remaining_variables++)
+ {
+ if (strncmp (string, "PATH=", 5) == 0)
+ /* Found the PATH environment variable. */
+ return 0;
+ }
+ /* Failed to find the PATH environment variable. */
+ return 1;
+}
diff --git a/tests/gnu/test-errno.c b/tests/gnu/test-errno.c
new file mode 100755
index 00000000..129b236f
--- /dev/null
+++ b/tests/gnu/test-errno.c
@@ -0,0 +1,117 @@
+/* Test of <errno.h> substitute.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <errno.h>
+
+/* Verify that the POSIX mandated errno values exist and can be used as
+ initializers outside of a function.
+ The variable names happen to match the Linux/x86 error numbers. */
+int e1 = EPERM;
+int e2 = ENOENT;
+int e3 = ESRCH;
+int e4 = EINTR;
+int e5 = EIO;
+int e6 = ENXIO;
+int e7 = E2BIG;
+int e8 = ENOEXEC;
+int e9 = EBADF;
+int e10 = ECHILD;
+int e11 = EAGAIN;
+int e11a = EWOULDBLOCK;
+int e12 = ENOMEM;
+int e13 = EACCES;
+int e14 = EFAULT;
+int e16 = EBUSY;
+int e17 = EEXIST;
+int e18 = EXDEV;
+int e19 = ENODEV;
+int e20 = ENOTDIR;
+int e21 = EISDIR;
+int e22 = EINVAL;
+int e23 = ENFILE;
+int e24 = EMFILE;
+int e25 = ENOTTY;
+int e26 = ETXTBSY;
+int e27 = EFBIG;
+int e28 = ENOSPC;
+int e29 = ESPIPE;
+int e30 = EROFS;
+int e31 = EMLINK;
+int e32 = EPIPE;
+int e33 = EDOM;
+int e34 = ERANGE;
+int e35 = EDEADLK;
+int e36 = ENAMETOOLONG;
+int e37 = ENOLCK;
+int e38 = ENOSYS;
+int e39 = ENOTEMPTY;
+int e40 = ELOOP;
+int e42 = ENOMSG;
+int e43 = EIDRM;
+int e67 = ENOLINK;
+int e71 = EPROTO;
+int e72 = EMULTIHOP;
+int e74 = EBADMSG;
+int e75 = EOVERFLOW;
+int e84 = EILSEQ;
+int e88 = ENOTSOCK;
+int e89 = EDESTADDRREQ;
+int e90 = EMSGSIZE;
+int e91 = EPROTOTYPE;
+int e92 = ENOPROTOOPT;
+int e93 = EPROTONOSUPPORT;
+int e95 = EOPNOTSUPP;
+int e95a = ENOTSUP;
+int e97 = EAFNOSUPPORT;
+int e98 = EADDRINUSE;
+int e99 = EADDRNOTAVAIL;
+int e100 = ENETDOWN;
+int e101 = ENETUNREACH;
+int e102 = ENETRESET;
+int e103 = ECONNABORTED;
+int e104 = ECONNRESET;
+int e105 = ENOBUFS;
+int e106 = EISCONN;
+int e107 = ENOTCONN;
+int e110 = ETIMEDOUT;
+int e111 = ECONNREFUSED;
+int e113 = EHOSTUNREACH;
+int e114 = EALREADY;
+int e115 = EINPROGRESS;
+int e116 = ESTALE;
+int e122 = EDQUOT;
+int e125 = ECANCELED;
+
+/* Don't verify that these errno values are all different, except for possibly
+ EWOULDBLOCK == EAGAIN. Even Linux/x86 does not pass this check: it has
+ ENOTSUP == EOPNOTSUPP. */
+
+int
+main ()
+{
+ /* Verify that errno can be assigned. */
+ errno = EOVERFLOW;
+
+ /* snprintf() callers want to distinguish EINVAL and EOVERFLOW. */
+ if (errno == EINVAL)
+ return 1;
+
+ return 0;
+}
diff --git a/tests/gnu/test-fcntl-h.c b/tests/gnu/test-fcntl-h.c
new file mode 100755
index 00000000..0ce33f0d
--- /dev/null
+++ b/tests/gnu/test-fcntl-h.c
@@ -0,0 +1,38 @@
+/* Test of <fcntl.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+/* Check that the various O_* macros are defined. */
+int o = O_DIRECT | O_DIRECTORY | O_DSYNC | O_NDELAY | O_NOATIME | O_NONBLOCK
+ | O_NOCTTY | O_NOFOLLOW | O_NOLINKS | O_RSYNC | O_SYNC | O_TTY_INIT
+ | O_BINARY | O_TEXT;
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the FD_* macros are defined. */
+int fd = FD_CLOEXEC;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-fcntl.c b/tests/gnu/test-fcntl.c
new file mode 100755
index 00000000..71dfb986
--- /dev/null
+++ b/tests/gnu/test-fcntl.c
@@ -0,0 +1,346 @@
+/* Test of fcntl(2).
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+/* Specification. */
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fcntl, int, (int, int, ...));
+
+/* Helpers. */
+#include <errno.h>
+#include <stdarg.h>
+#include <stdbool.h>
+#include <unistd.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Use O_CLOEXEC if available, but test works without it. */
+#ifndef O_CLOEXEC
+# define O_CLOEXEC 0
+#endif
+
+#if !O_BINARY
+# define setmode(f,m) zero ()
+static int zero (void) { return 0; }
+#endif
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is open and inheritable across exec/spawn. */
+static bool
+is_inheritable (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ if (h == INVALID_HANDLE_VALUE || GetHandleInformation (h, &flags) == 0)
+ return false;
+ return (flags & HANDLE_FLAG_INHERIT) != 0;
+#else
+# ifndef F_GETFD
+# error Please port fcntl to your platform
+# endif
+ int i = fcntl (fd, F_GETFD);
+ return 0 <= i && (i & FD_CLOEXEC) == 0;
+#endif
+}
+
+/* Return non-zero if FD is open in the given MODE, which is either
+ O_TEXT or O_BINARY. */
+static bool
+is_mode (int fd, int mode)
+{
+ int value = setmode (fd, O_BINARY);
+ setmode (fd, value);
+ return mode == value;
+}
+
+/* Since native fcntl can have more supported operations than our
+ replacement is aware of, and since various operations assign
+ different types to the vararg argument, a wrapper around fcntl must
+ be able to pass a vararg of unknown type on through to the original
+ fcntl. Make sure that this works properly: func1 behaves like the
+ original fcntl interpreting the vararg as an int or a pointer to a
+ struct, and func2 behaves like rpl_fcntl that doesn't know what
+ type to forward. */
+struct dummy_struct
+{
+ long filler;
+ int value;
+};
+static int
+func1 (int a, ...)
+{
+ va_list arg;
+ int i;
+ va_start (arg, a);
+ if (a < 4)
+ i = va_arg (arg, int);
+ else
+ {
+ struct dummy_struct *s = va_arg (arg, struct dummy_struct *);
+ i = s->value;
+ }
+ va_end (arg);
+ return i;
+}
+static int
+func2 (int a, ...)
+{
+ va_list arg;
+ void *p;
+ va_start (arg, a);
+ p = va_arg (arg, void *);
+ va_end (arg);
+ return func1 (a, p);
+}
+
+/* Ensure that all supported fcntl actions are distinct, and
+ usable in preprocessor expressions. */
+static void
+check_flags (void)
+{
+ switch (0)
+ {
+ case F_DUPFD:
+#if F_DUPFD
+#endif
+
+ case F_DUPFD_CLOEXEC:
+#if F_DUPFD_CLOEXEC
+#endif
+
+ case F_GETFD:
+#if F_GETFD
+#endif
+
+#ifdef F_SETFD
+ case F_SETFD:
+# if F_SETFD
+# endif
+#endif
+
+#ifdef F_GETFL
+ case F_GETFL:
+# if F_GETFL
+# endif
+#endif
+
+#ifdef F_SETFL
+ case F_SETFL:
+# if F_SETFL
+# endif
+#endif
+
+#ifdef F_GETOWN
+ case F_GETOWN:
+# if F_GETOWN
+# endif
+#endif
+
+#ifdef F_SETOWN
+ case F_SETOWN:
+# if F_SETOWN
+# endif
+#endif
+
+#ifdef F_GETLK
+ case F_GETLK:
+# if F_GETLK
+# endif
+#endif
+
+#ifdef F_SETLK
+ case F_SETLK:
+# if F_SETLK
+# endif
+#endif
+
+#ifdef F_SETLKW
+ case F_SETLKW:
+# if F_SETLKW
+# endif
+#endif
+
+ ;
+ }
+}
+
+int
+main (void)
+{
+ const char *file = "test-fcntl.tmp";
+ int fd;
+
+ /* Sanity check that rpl_fcntl is likely to work. */
+ ASSERT (func2 (1, 2) == 2);
+ ASSERT (func2 (2, -2) == -2);
+ ASSERT (func2 (3, 0x80000000) == 0x80000000);
+ {
+ struct dummy_struct s = { 0L, 4 };
+ ASSERT (func2 (4, &s) == 4);
+ }
+ check_flags ();
+
+ /* Assume std descriptors were provided by invoker, and ignore fds
+ that might have been inherited. */
+ fd = creat (file, 0600);
+ ASSERT (STDERR_FILENO < fd);
+ close (fd + 1);
+ close (fd + 2);
+
+ /* For F_DUPFD*, the source must be valid. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_DUPFD, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (-1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_DUPFD_CLOEXEC, 0) == -1);
+ ASSERT (errno == EBADF);
+
+ /* For F_DUPFD*, the destination must be valid. */
+ ASSERT (getdtablesize () < 10000000);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD, 10000000) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (getdtablesize () < 10000000);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, -1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, 10000000) == -1);
+ ASSERT (errno == EINVAL);
+
+ /* For F_DUPFD*, check for correct inheritance, as well as
+ preservation of text vs. binary. */
+ setmode (fd, O_BINARY);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (is_mode (fd, O_BINARY));
+
+ ASSERT (fcntl (fd, F_DUPFD, fd) == fd + 1);
+ ASSERT (is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (!is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 1, O_BINARY));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd, F_DUPFD_CLOEXEC, fd + 2) == fd + 2);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_BINARY));
+ ASSERT (is_mode (fd + 2, O_BINARY));
+ ASSERT (close (fd) == 0);
+
+ setmode (fd + 2, O_TEXT);
+ ASSERT (fcntl (fd + 2, F_DUPFD, fd + 1) == fd + 1);
+ ASSERT (!is_open (fd));
+ ASSERT (is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (is_inheritable (fd + 1));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd + 1, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 1) == 0);
+
+ ASSERT (fcntl (fd + 2, F_DUPFD_CLOEXEC, 0) == fd);
+ ASSERT (is_open (fd));
+ ASSERT (!is_open (fd + 1));
+ ASSERT (is_open (fd + 2));
+ ASSERT (!is_inheritable (fd));
+ ASSERT (!is_inheritable (fd + 2));
+ ASSERT (is_mode (fd, O_TEXT));
+ ASSERT (is_mode (fd + 2, O_TEXT));
+ ASSERT (close (fd + 2) == 0);
+
+ /* Test F_GETFD. */
+ errno = 0;
+ ASSERT (fcntl (-1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (fd + 1, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (fcntl (10000000, F_GETFD) == -1);
+ ASSERT (errno == EBADF);
+ {
+ int result = fcntl (fd, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == FD_CLOEXEC);
+ ASSERT (dup (fd) == fd + 1);
+ result = fcntl (fd + 1, F_GETFD);
+ ASSERT (0 <= result);
+ ASSERT ((result & FD_CLOEXEC) == 0);
+ ASSERT (close (fd + 1) == 0);
+ }
+
+ /* Cleanup. */
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (file) == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-fflush.c b/tests/gnu/test-fflush.c
new file mode 100755
index 00000000..12403e2a
--- /dev/null
+++ b/tests/gnu/test-fflush.c
@@ -0,0 +1,145 @@
+/* Test of POSIX compatible fflush() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ ftell link warning if we are not using the gnulib ftell module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fflush, int, (FILE *));
+
+#include <unistd.h>
+
+int
+main (void)
+{
+ FILE *f;
+ char buffer[10];
+ int fd;
+
+ /* Create test file. */
+ f = fopen ("test-fflush.txt", "w");
+ if (!f || fwrite ("1234567890ABCDEFG", 1, 17, f) != 17 || fclose (f) != 0)
+ {
+ fputs ("Failed to create sample file.\n", stderr);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+
+ /* Test fflush. */
+ f = fopen ("test-fflush.txt", "r");
+ fd = fileno (f);
+ if (!f || 0 > fd || fread (buffer, 1, 5, f) != 5)
+ {
+ fputs ("Failed initial read of sample file.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* For deterministic results, ensure f read a bigger buffer.
+ This is not the case on BeOS, nor on uClibc. */
+#if !(defined __BEOS__ || defined __UCLIBC__)
+ if (lseek (fd, 0, SEEK_CUR) == 5)
+ {
+ fputs ("Sample file was not buffered after fread.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+#endif
+ /* POSIX requires fflush-fseek to set file offset of fd. */
+ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+ {
+ fputs ("Failed to flush-fseek sample file.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that offset is correct. */
+ if (lseek (fd, 0, SEEK_CUR) != 5)
+ {
+ fprintf (stderr, "File offset is wrong after fseek: %ld.\n",
+ (long) lseek (fd, 0, SEEK_CUR));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ if (ftell (f) != 5)
+ {
+ fprintf (stderr, "ftell result is wrong after fseek: %ld.\n",
+ (long) ftell (f));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that file reading resumes at correct location. */
+ if (fgetc (f) != '6')
+ {
+ fputs ("Failed to read next byte after fseek.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* For deterministic results, ensure f read a bigger buffer. */
+ if (lseek (fd, 0, SEEK_CUR) == 6)
+ {
+ fputs ("Sample file was not buffered after fgetc.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* POSIX requires fflush-fseeko to set file offset of fd. */
+ if (fflush (f) != 0 || fseeko (f, 0, SEEK_CUR) != 0)
+ {
+ fputs ("Failed to flush-fseeko sample file.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that offset is correct. */
+ if (lseek (fd, 0, SEEK_CUR) != 6)
+ {
+ fprintf (stderr, "File offset is wrong after fseeko: %ld.\n",
+ (long) lseek (fd, 0, SEEK_CUR));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ if (ftell (f) != 6)
+ {
+ fprintf (stderr, "ftell result is wrong after fseeko: %ld.\n",
+ (long) ftell (f));
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ /* Check that file reading resumes at correct location. */
+ if (fgetc (f) != '7')
+ {
+ fputs ("Failed to read next byte after fseeko.\n", stderr);
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 1;
+ }
+ fclose (f);
+ unlink ("test-fflush.txt");
+ return 0;
+}
diff --git a/tests/gnu/test-fflush2.c b/tests/gnu/test-fflush2.c
new file mode 100755
index 00000000..c89dc912
--- /dev/null
+++ b/tests/gnu/test-fflush2.c
@@ -0,0 +1,108 @@
+/* Test of POSIX compatible fflush() function.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "binary-io.h"
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int c;
+
+ /* Avoid the well-known bugs of fflush() on streams in O_TEXT mode
+ on native Windows platforms. */
+ SET_BINARY (0);
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Check fflush after a backup ungetc() call. This is case 1a in
+ terms of
+ <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+ according to the Austin Group's resolution on 2009-01-08. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '#');
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ /* Here the file-position indicator must be 2. */
+
+ c = ungetc ('!', stdin);
+ ASSERT (c == '!');
+
+ fflush (stdin);
+
+ /* Here the file-position indicator must be 1. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ c = fgetc (stdin);
+ ASSERT (c == '/');
+
+ return 0;
+
+ case '2':
+ /* Check fflush after a non-backup ungetc() call. This is case 2a in
+ terms of
+ <http://lists.gnu.org/archive/html/bug-gnulib/2008-03/msg00131.html>,
+ according to the Austin Group's resolution on 2009-01-08. */
+ /* Check that fflush after a non-backup ungetc() call discards the
+ ungetc buffer. This is mandated by POSIX
+ <http://www.opengroup.org/susv3/functions/ungetc.html>:
+ "The value of the file-position indicator for the stream after
+ reading or discarding all pushed-back bytes shall be the same
+ as it was before the bytes were pushed back."
+ <http://www.opengroup.org/austin/aardvark/latest/xshbug3.txt>
+ "[After fflush(),] the file offset of the underlying open file
+ description shall be set to the file position of the stream, and
+ any characters pushed back onto the stream by ungetc() or
+ ungetwc() that have not subsequently been read from the stream
+ shall be discarded." */
+
+ c = fgetc (stdin);
+ ASSERT (c == '#');
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ /* Here the file-position indicator must be 2. */
+
+ c = ungetc ('@', stdin);
+ ASSERT (c == '@');
+
+ fflush (stdin);
+
+ /* Here the file-position indicator must be 1. */
+
+ c = fgetc (stdin);
+ ASSERT (c == '!');
+
+ c = fgetc (stdin);
+ ASSERT (c == '/');
+
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/tests/gnu/test-fflush2.sh b/tests/gnu/test-fflush2.sh
new file mode 100755
index 00000000..ef77fa48
--- /dev/null
+++ b/tests/gnu/test-fflush2.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Execute the test only with seekable input stream.
+# The behaviour of fflush() on a non-seekable input stream is undefined.
+./test-fflush2${EXEEXT} 1 < "$srcdir/test-fflush2.sh" || exit $?
+./test-fflush2${EXEEXT} 2 < "$srcdir/test-fflush2.sh" || exit $?
+#cat "$srcdir/test-fflush2.sh" | ./test-fflush2${EXEEXT} || exit $?
+
+exit 0
diff --git a/tests/gnu/test-filenamecat.c b/tests/gnu/test-filenamecat.c
new file mode 100755
index 00000000..b01645a4
--- /dev/null
+++ b/tests/gnu/test-filenamecat.c
@@ -0,0 +1,66 @@
+/* Test of concatenation of two arbitrary file names.
+
+ Copyright (C) 1996-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Jim Meyering. */
+
+#include <config.h>
+
+#include "filenamecat.h"
+
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ static char const *const tests[][3] =
+ {
+ {"a", "b", "a/b"},
+ {"a/", "b", "a/b"},
+ {"a/", "/b", "a/b"},
+ {"a", "/b", "a/b"},
+
+ {"/", "b", "/b"},
+ {"/", "/b", "/b"},
+ {"/", "/", "/"},
+ {"a", "/", "a/"}, /* this might deserve a diagnostic */
+ {"/a", "/", "/a/"}, /* this might deserve a diagnostic */
+ {"a", "//b", "a/b"},
+ {"", "a", "a"}, /* this might deserve a diagnostic */
+ };
+ unsigned int i;
+ bool fail = false;
+
+ set_program_name (argv[0]);
+
+ for (i = 0; i < sizeof tests / sizeof tests[0]; i++)
+ {
+ char *base_in_result;
+ char const *const *t = tests[i];
+ char *res = file_name_concat (t[0], t[1], &base_in_result);
+ if (strcmp (res, t[2]) != 0)
+ {
+ fprintf (stderr, "test #%u: got %s, expected %s\n", i, res, t[2]);
+ fail = true;
+ }
+ }
+ exit (fail ? EXIT_FAILURE : EXIT_SUCCESS);
+}
diff --git a/tests/gnu/test-fopen-safer.c b/tests/gnu/test-fopen-safer.c
new file mode 100755
index 00000000..c12080dc
--- /dev/null
+++ b/tests/gnu/test-fopen-safer.c
@@ -0,0 +1,31 @@
+/* Test of opening a file stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "stdio--.h"
+
+#define BASE "test-fopen-safer.t"
+
+#include "test-fopen.h"
+
+int
+main (void)
+{
+ return test_fopen ();
+}
diff --git a/tests/gnu/test-fopen.c b/tests/gnu/test-fopen.c
new file mode 100755
index 00000000..d788d84e
--- /dev/null
+++ b/tests/gnu/test-fopen.c
@@ -0,0 +1,34 @@
+/* Test of opening a file stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fopen, FILE *, (char const *, char const *));
+
+#define BASE "test-fopen.t"
+
+#include "test-fopen.h"
+
+int
+main (void)
+{
+ return test_fopen ();
+}
diff --git a/tests/gnu/test-fopen.h b/tests/gnu/test-fopen.h
new file mode 100755
index 00000000..765f2f8a
--- /dev/null
+++ b/tests/gnu/test-fopen.h
@@ -0,0 +1,73 @@
+/* Test of opening a file stream.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+/* Include <config.h> and a form of <stdio.h> first. */
+
+#include <errno.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+/* Test fopen. Assumes BASE is defined. */
+
+static int
+test_fopen (void)
+{
+ FILE *f;
+ /* Remove anything from prior partial run. */
+ unlink (BASE "file");
+
+ /* Read requires existing file. */
+ errno = 0;
+ ASSERT (fopen (BASE "file", "r") == NULL);
+ ASSERT (errno == ENOENT);
+
+ /* Write can create a file. */
+ f = fopen (BASE "file", "w");
+ ASSERT (f);
+ ASSERT (fclose (f) == 0);
+
+ /* Trailing slash is invalid on non-directory. */
+ errno = 0;
+ ASSERT (fopen (BASE "file/", "r") == NULL);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+ /* Cannot create a directory. */
+ errno = 0;
+ ASSERT (fopen ("nonexist.ent/", "w") == NULL);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+ || errno == EINVAL);
+
+ /* Directories cannot be opened for writing. */
+ errno = 0;
+ ASSERT (fopen (".", "w") == NULL);
+ ASSERT (errno == EISDIR || errno == EINVAL || errno == EACCES);
+
+ /* /dev/null must exist, and be writable. */
+ f = fopen ("/dev/null", "r");
+ ASSERT (f);
+ ASSERT (fclose (f) == 0);
+ f = fopen ("/dev/null", "w");
+ ASSERT (f);
+ ASSERT (fclose (f) == 0);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-fpending.c b/tests/gnu/test-fpending.c
new file mode 100755
index 00000000..d79a2083
--- /dev/null
+++ b/tests/gnu/test-fpending.c
@@ -0,0 +1,41 @@
+/* Ensure that __fpending works.
+
+ Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+ Written by Jim Meyering. */
+
+#include <config.h>
+
+#include "fpending.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ ASSERT (__fpending (stdout) == 0);
+
+ fputs ("foo", stdout);
+ ASSERT (__fpending (stdout) == 3);
+
+ fflush (stdout);
+ ASSERT (__fpending (stdout) == 0);
+
+ exit (0);
+}
diff --git a/tests/gnu/test-fpending.sh b/tests/gnu/test-fpending.sh
new file mode 100755
index 00000000..636af25a
--- /dev/null
+++ b/tests/gnu/test-fpending.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+
+tmpfile=
+trap 'rm -fr $tmpfile' 1 2 3 15
+
+tmpfile=test-fpending.t
+
+./test-fpending${EXEEXT} > $tmpfile || exit 1
+
+rm -fr $tmpfile
+
+exit 0
diff --git a/tests/gnu/test-fprintf-posix.h b/tests/gnu/test-fprintf-posix.h
new file mode 100755
index 00000000..dcd65021
--- /dev/null
+++ b/tests/gnu/test-fprintf-posix.h
@@ -0,0 +1,151 @@
+/* Test of POSIX compatible vsprintf() and sprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+static void
+test_function (int (*my_fprintf) (FILE *, const char *, ...))
+{
+ /* Here we don't test output that may be platform dependent.
+ The bulk of the tests is done as part of the 'vasnprintf-posix' module. */
+
+ /* Test support of size specifiers as in C99. */
+
+ my_fprintf (stdout, "%ju %d\n", (uintmax_t) 12345671, 33, 44, 55);
+
+ my_fprintf (stdout, "%zu %d\n", (size_t) 12345672, 33, 44, 55);
+
+ my_fprintf (stdout, "%tu %d\n", (ptrdiff_t) 12345673, 33, 44, 55);
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ /* Positive zero. */
+ my_fprintf (stdout, "%a %d\n", 0.0, 33, 44, 55);
+
+ /* Positive infinity. */
+ my_fprintf (stdout, "%a %d\n", 1.0 / 0.0, 33, 44, 55);
+
+ /* Negative infinity. */
+ my_fprintf (stdout, "%a %d\n", -1.0 / 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO with infinite number. */
+ my_fprintf (stdout, "%010a %d\n", 1.0 / 0.0, 33, 44, 55);
+
+ /* Test the support of the %f format directive. */
+
+ /* A positive number. */
+ my_fprintf (stdout, "%f %d\n", 12.75, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_fprintf (stdout, "%f %d\n", 1234567.0, 33, 44, 55);
+
+ /* A negative number. */
+ my_fprintf (stdout, "%f %d\n", -0.03125, 33, 44, 55);
+
+ /* Positive zero. */
+ my_fprintf (stdout, "%f %d\n", 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_fprintf (stdout, "%015f %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision. */
+ my_fprintf (stdout, "%.f %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_fprintf (stdout, "%.2f %d\n", 999.95, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_fprintf (stdout, "%.2f %d\n", 999.996, 33, 44, 55);
+
+ /* A positive number. */
+ my_fprintf (stdout, "%Lf %d\n", 12.75L, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_fprintf (stdout, "%Lf %d\n", 1234567.0L, 33, 44, 55);
+
+ /* A negative number. */
+ my_fprintf (stdout, "%Lf %d\n", -0.03125L, 33, 44, 55);
+
+ /* Positive zero. */
+ my_fprintf (stdout, "%Lf %d\n", 0.0L, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_fprintf (stdout, "%015Lf %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision. */
+ my_fprintf (stdout, "%.Lf %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_fprintf (stdout, "%.2Lf %d\n", 999.95L, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_fprintf (stdout, "%.2Lf %d\n", 999.996L, 33, 44, 55);
+
+ /* Test the support of the %F format directive. */
+
+ /* A positive number. */
+ my_fprintf (stdout, "%F %d\n", 12.75, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_fprintf (stdout, "%F %d\n", 1234567.0, 33, 44, 55);
+
+ /* A negative number. */
+ my_fprintf (stdout, "%F %d\n", -0.03125, 33, 44, 55);
+
+ /* Positive zero. */
+ my_fprintf (stdout, "%F %d\n", 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_fprintf (stdout, "%015F %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision. */
+ my_fprintf (stdout, "%.F %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_fprintf (stdout, "%.2F %d\n", 999.95, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_fprintf (stdout, "%.2F %d\n", 999.996, 33, 44, 55);
+
+ /* A positive number. */
+ my_fprintf (stdout, "%LF %d\n", 12.75L, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_fprintf (stdout, "%LF %d\n", 1234567.0L, 33, 44, 55);
+
+ /* A negative number. */
+ my_fprintf (stdout, "%LF %d\n", -0.03125L, 33, 44, 55);
+
+ /* Positive zero. */
+ my_fprintf (stdout, "%LF %d\n", 0.0L, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_fprintf (stdout, "%015LF %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision. */
+ my_fprintf (stdout, "%.LF %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_fprintf (stdout, "%.2LF %d\n", 999.95L, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_fprintf (stdout, "%.2LF %d\n", 999.996L, 33, 44, 55);
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ my_fprintf (stdout, "%2$d %1$d\n", 33, 55);
+}
diff --git a/tests/gnu/test-fpurge.c b/tests/gnu/test-fpurge.c
new file mode 100755
index 00000000..89fe8c0c
--- /dev/null
+++ b/tests/gnu/test-fpurge.c
@@ -0,0 +1,132 @@
+/* Test of fpurge() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include <string.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-fpurge.tmp"
+
+int
+main (void)
+{
+ int check_filepos;
+
+ for (check_filepos = 0; check_filepos <= 1; check_filepos++)
+ {
+ FILE *fp;
+
+ /* Create a file with some contents. */
+ fp = fopen (TESTFILE, "w");
+ if (fp == NULL)
+ goto skip;
+ if (fwrite ("foobarsh", 1, 8, fp) < 8)
+ goto skip;
+ if (fclose (fp))
+ goto skip;
+
+ /* The file's contents is now "foobarsh". */
+
+ /* Open it in read-write mode. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, 3, SEEK_CUR))
+ goto skip;
+ if (fwrite ("g", 1, 1, fp) < 1)
+ goto skip;
+ if (fflush (fp))
+ goto skip;
+ if (fwrite ("bz", 1, 2, fp) < 2)
+ goto skip;
+ /* Discard pending write. */
+ ASSERT (fpurge (fp) == 0);
+ /* Verify that when discarding pending output, the file position is set
+ back to where it was before the write calls. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 4);
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-only mode. */
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ /* Verify that the pending writes before the fpurge were really
+ discarded. */
+ {
+ char buf[8];
+ if (fread (buf, 1, 7, fp) < 7)
+ goto skip;
+ ASSERT (memcmp (buf, "foogars", 7) == 0);
+ }
+ /* Discard the buffered 'h'. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 7);
+ ASSERT (fpurge (fp) == 0);
+ /* Verify that when discarding pending input, the file position is
+ advanced to match the end of the previously read input. */
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (getc (fp) == EOF);
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh". */
+
+ /* Ensure that purging a read does not corrupt subsequent writes. */
+ fp = fopen (TESTFILE, "r+");
+ if (fp == NULL)
+ goto skip;
+ if (fseek (fp, -1, SEEK_END))
+ goto skip;
+ ASSERT (getc (fp) == 'h');
+ ASSERT (getc (fp) == EOF);
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (fpurge (fp) == 0);
+ if (check_filepos)
+ ASSERT (ftell (fp) == 8);
+ ASSERT (putc ('!', fp) == '!');
+ ASSERT (fclose (fp) == 0);
+ fp = fopen (TESTFILE, "r");
+ if (fp == NULL)
+ goto skip;
+ {
+ char buf[10];
+ ASSERT (fread (buf, 1, 10, fp) == 9);
+ ASSERT (memcmp (buf, "foogarsh!", 9) == 0);
+ }
+ ASSERT (fclose (fp) == 0);
+
+ /* The file's contents is now "foogarsh!". */
+ }
+
+ remove (TESTFILE);
+ return 0;
+
+ skip:
+ fprintf (stderr, "Skipping test: prerequisite file operations failed.\n");
+ remove (TESTFILE);
+ return 77;
+}
diff --git a/tests/gnu/test-freadahead.c b/tests/gnu/test-freadahead.c
new file mode 100755
index 00000000..3f34a421
--- /dev/null
+++ b/tests/gnu/test-freadahead.c
@@ -0,0 +1,73 @@
+/* Test of freadahead() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "freadahead.h"
+
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int nbytes = atoi (argv[1]);
+ if (nbytes > 0)
+ {
+ void *buf = malloc (nbytes);
+ ASSERT (fread (buf, 1, nbytes, stdin) == nbytes);
+ }
+
+ if (nbytes == 0)
+ ASSERT (freadahead (stdin) == 0);
+ else
+ {
+ if (lseek (0, 0, SEEK_CUR) == nbytes)
+ /* An unbuffered stdio, such as BeOS or on uClibc compiled without
+ __STDIO_BUFFERS. */
+ ASSERT (freadahead (stdin) == 0);
+ else
+ {
+ /* Normal buffered stdio. */
+ size_t buffered;
+ int c, c2;
+
+ ASSERT (freadahead (stdin) != 0);
+ buffered = freadahead (stdin);
+
+ c = fgetc (stdin);
+ ASSERT (freadahead (stdin) == buffered - 1);
+ ungetc (c, stdin);
+ ASSERT (freadahead (stdin) == buffered);
+ c2 = fgetc (stdin);
+ ASSERT (c2 == c);
+ ASSERT (freadahead (stdin) == buffered - 1);
+
+ c = '@';
+ ungetc (c, stdin);
+ ASSERT (freadahead (stdin) == buffered);
+ c2 = fgetc (stdin);
+ ASSERT (c2 == c);
+ ASSERT (freadahead (stdin) == buffered - 1);
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-freadahead.sh b/tests/gnu/test-freadahead.sh
new file mode 100755
index 00000000..27cf5504
--- /dev/null
+++ b/tests/gnu/test-freadahead.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-freadahead${EXEEXT} 0 < "$srcdir/test-freadahead.sh" || exit 1
+./test-freadahead${EXEEXT} 5 < "$srcdir/test-freadahead.sh" || exit 1
+exit 0
diff --git a/tests/gnu/test-freading.c b/tests/gnu/test-freading.c
new file mode 100755
index 00000000..fee82284
--- /dev/null
+++ b/tests/gnu/test-freading.c
@@ -0,0 +1,130 @@
+/* Test of freading() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include "freading.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+#define TESTFILE "t-freading.tmp"
+
+int
+main (void)
+{
+ FILE *fp;
+
+ /* Create a file with some contents. Write-only file is never reading. */
+ fp = fopen (TESTFILE, "w");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fwrite ("foobarsh", 1, 8, fp) == 8);
+ ASSERT (!freading (fp));
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-only mode. Read-only file is always reading. */
+ fp = fopen (TESTFILE, "r");
+ ASSERT (fp);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ fflush (fp);
+ ASSERT (freading (fp));
+ ASSERT (fgetc (fp) == 'a');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ ASSERT (freading (fp));
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or EOF when transitioning from read to write;
+ freading is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ at EOF. */
+ /* First a scenario with only fgetc, fseek, fputc. */
+ fp = fopen (TESTFILE, "r+");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fputc ('x', fp) == 'x');
+ ASSERT (!freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in read-write mode. POSIX requires a reposition (fseek,
+ fsetpos, rewind) or EOF when transitioning from read to write;
+ freading is only deterministic after input or output, but this
+ test case should be portable even on open, after reposition, and
+ at EOF. */
+ /* Here a scenario that includes fflush. */
+ fp = fopen (TESTFILE, "r+");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fgetc (fp) == 'f');
+ ASSERT (freading (fp));
+ ASSERT (fseek (fp, 2, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'b');
+ ASSERT (freading (fp));
+ fflush (fp);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fgetc (fp) == 'x');
+ ASSERT (freading (fp));
+ /* This fseek call is necessary when switching from reading to writing.
+ See the description of fopen(), ISO C 99 7.19.5.3.(6). */
+ ASSERT (fseek (fp, 0, SEEK_CUR) == 0);
+ /* freading (fp) is undefined here, but fwriting (fp) is false. */
+ ASSERT (fputc ('z', fp) == 'z');
+ ASSERT (!freading (fp));
+ ASSERT (fseek (fp, 0, SEEK_END) == 0);
+ /* freading (fp) is undefined here, because on some implementations (e.g.
+ glibc) fseek causes a buffer to be read.
+ fwriting (fp) is undefined as well. */
+ ASSERT (fclose (fp) == 0);
+
+ /* Open it in append mode. Write-only file is never reading. */
+ fp = fopen (TESTFILE, "a");
+ ASSERT (fp);
+ ASSERT (!freading (fp));
+ ASSERT (fwrite ("bla", 1, 3, fp) == 3);
+ ASSERT (!freading (fp));
+ ASSERT (fclose (fp) == 0);
+ ASSERT (remove (TESTFILE) == 0);
+ return 0;
+}
diff --git a/tests/gnu/test-freadptr.c b/tests/gnu/test-freadptr.c
new file mode 100755
index 00000000..f73b0fcd
--- /dev/null
+++ b/tests/gnu/test-freadptr.c
@@ -0,0 +1,94 @@
+/* Test of freadptr() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "freadptr.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ int nbytes = atoi (argv[1]);
+ void *buf = malloc (nbytes);
+ ASSERT (fread (buf, 1, nbytes, stdin) == nbytes);
+
+ if (lseek (0, 0, SEEK_CUR) == nbytes)
+ {
+ /* An unbuffered stdio, such as BeOS or on uClibc compiled without
+ __STDIO_BUFFERS. Or stdin is a pipe. */
+ size_t size;
+ ASSERT (freadptr (stdin, &size) == NULL);
+ }
+ else
+ {
+ /* Normal buffered stdio. */
+ const char stdin_contents[] =
+ "#!/bin/sh\n\n./test-freadptr${EXEEXT} 5 < \"$srcdir/test-freadptr.sh\" || exit 1\ncat \"$srcdir/test-freadptr.sh\" | ./test-freadptr${EXEEXT} 5 || exit 1\nexit 0\n";
+ const char *expected = stdin_contents + nbytes;
+ size_t available1;
+ size_t available2;
+ size_t available3;
+
+ /* Test normal behaviour. */
+ {
+ const char *ptr = freadptr (stdin, &available1);
+
+ ASSERT (ptr != NULL);
+ ASSERT (available1 != 0);
+ ASSERT (available1 <= strlen (expected));
+ ASSERT (memcmp (ptr, expected, available1) == 0);
+ }
+
+ /* Test behaviour after normal ungetc. */
+ ungetc (fgetc (stdin), stdin);
+ {
+ const char *ptr = freadptr (stdin, &available2);
+
+ if (ptr != NULL)
+ {
+ ASSERT (available2 == available1);
+ ASSERT (memcmp (ptr, expected, available2) == 0);
+ }
+ }
+
+ /* Test behaviour after arbitrary ungetc. */
+ fgetc (stdin);
+ ungetc ('@', stdin);
+ {
+ const char *ptr = freadptr (stdin, &available3);
+
+ if (ptr != NULL)
+ {
+ ASSERT (available3 == 1 || available3 == available1);
+ ASSERT (ptr[0] == '@');
+ if (available3 > 1)
+ {
+ ASSERT (memcmp (ptr + 1, expected + 1, available3 - 1) == 0);
+ }
+ }
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-freadptr.sh b/tests/gnu/test-freadptr.sh
new file mode 100755
index 00000000..97819b29
--- /dev/null
+++ b/tests/gnu/test-freadptr.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-freadptr${EXEEXT} 5 < "$srcdir/test-freadptr.sh" || exit 1
+cat "$srcdir/test-freadptr.sh" | ./test-freadptr${EXEEXT} 5 || exit 1
+exit 0
diff --git a/tests/gnu/test-freadptr2.c b/tests/gnu/test-freadptr2.c
new file mode 100755
index 00000000..cec011c5
--- /dev/null
+++ b/tests/gnu/test-freadptr2.c
@@ -0,0 +1,62 @@
+/* Test of freadptr() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "freadptr.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+static int
+freadptrbufsize (FILE *fp)
+{
+ size_t size = 0;
+
+ freadptr (fp, &size);
+ return size;
+}
+
+int
+main (int argc, char **argv)
+{
+ int nbytes = atoi (argv[1]);
+ if (nbytes > 0)
+ {
+ void *buf = malloc (nbytes);
+ ASSERT (fread (buf, 1, nbytes, stdin) == nbytes);
+ }
+
+ if (nbytes == 0)
+ ASSERT (freadptrbufsize (stdin) == 0);
+ else
+ {
+ if (lseek (0, 0, SEEK_CUR) == nbytes)
+ /* An unbuffered stdio, such as BeOS or on uClibc compiled without
+ __STDIO_BUFFERS. */
+ ASSERT (freadptrbufsize (stdin) == 0);
+ else
+ /* Normal buffered stdio. */
+ ASSERT (freadptrbufsize (stdin) != 0);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-freadptr2.sh b/tests/gnu/test-freadptr2.sh
new file mode 100755
index 00000000..7634d85f
--- /dev/null
+++ b/tests/gnu/test-freadptr2.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-freadptr2${EXEEXT} 0 < "$srcdir/test-freadptr2.sh" || exit 1
+./test-freadptr2${EXEEXT} 5 < "$srcdir/test-freadptr2.sh" || exit 1
+exit 0
diff --git a/tests/gnu/test-freadseek.c b/tests/gnu/test-freadseek.c
new file mode 100755
index 00000000..1da24c18
--- /dev/null
+++ b/tests/gnu/test-freadseek.c
@@ -0,0 +1,93 @@
+/* Test of freadseek() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "freadseek.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ static const char stdin_contents[] =
+ "#!/bin/sh\n\n./test-freadseek${EXEEXT} 5 19 6 7 18 9 19 < \"$srcdir/test-freadseek.sh\" || exit 1\ncat \"$srcdir/test-freadseek.sh\" | ./test-freadseek${EXEEXT} 5 19 6 7 18 9 19 || exit 1\nexit 0\n";
+ int nbytes1 = atoi (argv[1]);
+ int nbytes2 = atoi (argv[2]);
+ int nbytes3 = atoi (argv[3]);
+ int nbytes4 = atoi (argv[4]);
+ int nbytes5 = atoi (argv[5]);
+ int nbytes6 = atoi (argv[6]);
+ int nbytes7 = atoi (argv[7]);
+ void *buf1 = malloc (nbytes1);
+ void *buf3 = malloc (nbytes3);
+ void *buf5 = malloc (nbytes5);
+ void *buf7 = malloc (nbytes7);
+ /* A private variable to keep track of the position. */
+ size_t position = 0;
+
+ ASSERT (fread (buf1, 1, nbytes1, stdin) == nbytes1);
+ ASSERT (memcmp (buf1, stdin_contents + position, nbytes1) == 0);
+ position += nbytes1;
+
+ /* Test normal behaviour. */
+ ASSERT (freadseek (stdin, nbytes2) == 0);
+ position += nbytes2;
+
+ ASSERT (fread (buf3, 1, nbytes3, stdin) == nbytes3);
+ ASSERT (memcmp (buf3, stdin_contents + position, nbytes3) == 0);
+ position += nbytes3;
+
+ /* Test behaviour after normal ungetc. */
+ ungetc (fgetc (stdin), stdin);
+ ASSERT (freadseek (stdin, nbytes4) == 0);
+ position += nbytes4;
+
+ ASSERT (fread (buf5, 1, nbytes5, stdin) == nbytes5);
+ ASSERT (memcmp (buf5, stdin_contents + position, nbytes5) == 0);
+ position += nbytes5;
+
+ /* Test behaviour after arbitrary ungetc. */
+ fgetc (stdin);
+ ungetc ('@', stdin);
+ ASSERT (freadseek (stdin, nbytes6) == 0);
+ position += nbytes6;
+
+ ASSERT (fread (buf7, 1, nbytes7, stdin) == nbytes7);
+ ASSERT (memcmp (buf7, stdin_contents + position, nbytes7) == 0);
+ position += nbytes7;
+
+ /* Test move to end of file. */
+ ASSERT (freadseek (stdin, strlen (stdin_contents) - position) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ ASSERT (!ferror (stdin));
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+ /* Test move beyond end of file. */
+ ASSERT (freadseek (stdin, 1000000) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ ASSERT (!ferror (stdin));
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-freadseek.sh b/tests/gnu/test-freadseek.sh
new file mode 100755
index 00000000..453cadfd
--- /dev/null
+++ b/tests/gnu/test-freadseek.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-freadseek${EXEEXT} 5 19 6 7 18 9 19 < "$srcdir/test-freadseek.sh" || exit 1
+cat "$srcdir/test-freadseek.sh" | ./test-freadseek${EXEEXT} 5 19 6 7 18 9 19 || exit 1
+exit 0
diff --git a/tests/gnu/test-frexp.c b/tests/gnu/test-frexp.c
new file mode 100755
index 00000000..d5ab7e50
--- /dev/null
+++ b/tests/gnu/test-frexp.c
@@ -0,0 +1,199 @@
+/* Test of splitting a double into fraction and mantissa.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (frexp, double, (double, int *));
+
+#include <float.h>
+
+#include "isnand-nolibm.h"
+#include "nan.h"
+#include "macros.h"
+
+/* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() function. */
+#undef exp
+#define exp exponent
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+double zero = 0.0;
+
+static double
+my_ldexp (double x, int d)
+{
+ for (; d > 0; d--)
+ x *= 2.0;
+ for (; d < 0; d++)
+ x *= 0.5;
+ return x;
+}
+
+int
+main ()
+{
+ int i;
+ /* The use of 'volatile' guarantees that excess precision bits are dropped
+ when dealing with denormalized numbers. It is necessary on x86 systems
+ where double-floats are not IEEE compliant by default, to avoid that the
+ results become platform and compiler option dependent. 'volatile' is a
+ portable alternative to gcc's -ffloat-store option. */
+ volatile double x;
+
+ { /* NaN. */
+ int exp = -9999;
+ double mantissa;
+ x = NaNd ();
+ mantissa = frexp (x, &exp);
+ ASSERT (isnand (mantissa));
+ }
+
+ { /* Positive infinity. */
+ int exp = -9999;
+ double mantissa;
+ x = 1.0 / 0.0;
+ mantissa = frexp (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Negative infinity. */
+ int exp = -9999;
+ double mantissa;
+ x = -1.0 / 0.0;
+ mantissa = frexp (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Positive zero. */
+ int exp = -9999;
+ double mantissa;
+ x = 0.0;
+ mantissa = frexp (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (!signbit (mantissa));
+ }
+
+ { /* Negative zero. */
+ int exp = -9999;
+ double mantissa;
+ x = -zero;
+ mantissa = frexp (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (signbit (mantissa));
+ }
+
+ for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5);
+ }
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5);
+ }
+
+ for (i = 1, x = -1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5);
+ }
+ for (i = 1, x = -1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x < 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5);
+ }
+
+ for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.505);
+ }
+ for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.505);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa >= 0.5);
+ ASSERT (mantissa < 1.0);
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.866025);
+ }
+ for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.866025);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = frexp (x, &exp);
+ ASSERT (exp == i || exp == i + 1);
+ ASSERT (mantissa >= 0.5);
+ ASSERT (mantissa < 1.0);
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-frexpl.c b/tests/gnu/test-frexpl.c
new file mode 100755
index 00000000..8d9d41d2
--- /dev/null
+++ b/tests/gnu/test-frexpl.c
@@ -0,0 +1,223 @@
+/* Test of splitting a 'long double' into fraction and mantissa.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <math.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (frexpl, long double, (long double, int *));
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "isnanl-nolibm.h"
+#include "nan.h"
+#include "macros.h"
+
+/* Avoid some warnings from "gcc -Wshadow".
+ This file doesn't use the exp() function. */
+#undef exp
+#define exp exponent
+
+/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
+ exponent for 'long double' is -964. Similarly, on PowerPC machines,
+ LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+ is -968. For exponents below that, the precision may be truncated to the
+ precision used for 'double'. */
+#ifdef __sgi
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+#else
+# define MIN_NORMAL_EXP LDBL_MIN_EXP
+#endif
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
+#else
+long double minus_zero = -0.0L;
+#endif
+
+static long double
+my_ldexp (long double x, int d)
+{
+ for (; d > 0; d--)
+ x *= 2.0L;
+ for (; d < 0; d++)
+ x *= 0.5L;
+ return x;
+}
+
+int
+main ()
+{
+ int i;
+ long double x;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ { /* NaN. */
+ int exp = -9999;
+ long double mantissa;
+ x = NaNl ();
+ mantissa = frexpl (x, &exp);
+ ASSERT (isnanl (mantissa));
+ }
+
+ { /* Positive infinity. */
+ int exp = -9999;
+ long double mantissa;
+ x = 1.0L / 0.0L;
+ mantissa = frexpl (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Negative infinity. */
+ int exp = -9999;
+ long double mantissa;
+ x = -1.0L / 0.0L;
+ mantissa = frexpl (x, &exp);
+ ASSERT (mantissa == x);
+ }
+
+ { /* Positive zero. */
+ int exp = -9999;
+ long double mantissa;
+ x = 0.0L;
+ mantissa = frexpl (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (!signbit (mantissa));
+ }
+
+ { /* Negative zero. */
+ int exp = -9999;
+ long double mantissa;
+ x = minus_zero;
+ mantissa = frexpl (x, &exp);
+ ASSERT (exp == 0);
+ ASSERT (mantissa == x);
+ ASSERT (signbit (mantissa));
+ }
+
+ for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5L);
+ }
+ for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5L);
+ }
+ for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.5L);
+ }
+
+ for (i = 1, x = -1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5L);
+ }
+ for (i = 1, x = -1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5L);
+ }
+ for (; i >= LDBL_MIN_EXP - 100 && x < 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == -0.5L);
+ }
+
+ for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.505L);
+ }
+ for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.505L);
+ }
+ for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa >= 0.5L);
+ ASSERT (mantissa < 1.0L);
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.866025L);
+ }
+ for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i);
+ ASSERT (mantissa == 0.866025L);
+ }
+ for (; i >= LDBL_MIN_EXP - 100 && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = frexpl (x, &exp);
+ ASSERT (exp == i || exp == i + 1);
+ ASSERT (mantissa >= 0.5L);
+ ASSERT (mantissa < 1.0L);
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-fseeko.c b/tests/gnu/test-fseeko.c
new file mode 100755
index 00000000..be2a78dc
--- /dev/null
+++ b/tests/gnu/test-fseeko.c
@@ -0,0 +1,74 @@
+/* Test of fseeko() function.
+ Copyright (C) 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (fseeko, int, (FILE *, off_t, int));
+
+
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+ /* Assume stdin is non-empty, seekable, and starts with '#!/bin/sh'
+ iff argc > 1. */
+ int expected = argc > 1 ? 0 : -1;
+ /* Exit with success only if fseek/fseeko agree. */
+ int r1 = fseeko (stdin, 0, SEEK_CUR);
+ int r2 = fseek (stdin, 0, SEEK_CUR);
+ ASSERT (r1 == r2 && r1 == expected);
+ if (argc > 1)
+ {
+ /* Test that fseek discards previously read ungetc data. */
+ int ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ungetc (ch, stdin) == ch);
+ ASSERT (fseeko (stdin, 2, SEEK_SET) == 0);
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test that fseek discards random ungetc data. */
+ ASSERT (ungetc (ch ^ 0xff, stdin) == (ch ^ 0xff));
+ }
+ ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+ ASSERT (fgetc (stdin) == EOF);
+ /* Test that fseek resets end-of-file marker. */
+ ASSERT (feof (stdin));
+ ASSERT (fseeko (stdin, 0, SEEK_END) == 0);
+ ASSERT (!feof (stdin));
+ }
+ return 0;
+}
diff --git a/tests/gnu/test-fseeko.sh b/tests/gnu/test-fseeko.sh
new file mode 100755
index 00000000..5c558272
--- /dev/null
+++ b/tests/gnu/test-fseeko.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-fseeko${EXEEXT} 1 < "$srcdir/test-fseeko.sh" || exit 1
+echo hi | ./test-fseeko${EXEEXT} || exit 1
+exit 0
diff --git a/tests/gnu/test-fseeko2.sh b/tests/gnu/test-fseeko2.sh
new file mode 100755
index 00000000..6e1130cf
--- /dev/null
+++ b/tests/gnu/test-fseeko2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-fseeko${EXEEXT} 1 2 < "$srcdir/test-fseeko2.sh"
diff --git a/tests/gnu/test-fseterr.c b/tests/gnu/test-fseterr.c
new file mode 100755
index 00000000..c114f1a1
--- /dev/null
+++ b/tests/gnu/test-fseterr.c
@@ -0,0 +1,44 @@
+/* Test setting the error indicator of a stream.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "fseterr.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+main ()
+{
+ /* All streams are initially created with the error indicator cleared. */
+ if (ferror (stdout))
+ abort ();
+
+ /* Verify that fseterr() works. */
+ fseterr (stdout);
+ if (!ferror (stdout))
+ abort ();
+
+ /* Verify fseterr's effect can be undone by clearerr(). */
+ clearerr (stdout);
+ if (ferror (stdout))
+ abort ();
+
+ return 0;
+}
diff --git a/tests/gnu/test-ftello.c b/tests/gnu/test-ftello.c
new file mode 100755
index 00000000..5fae570f
--- /dev/null
+++ b/tests/gnu/test-ftello.c
@@ -0,0 +1,118 @@
+/* Test of ftello() function.
+ Copyright (C) 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+/* None of the files accessed by this test are large, so disable the
+ fseek link warning if we are not using the gnulib fseek module. */
+#define _GL_NO_LARGE_FILES
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (ftello, off_t, (FILE *));
+
+#include "binary-io.h"
+#include "macros.h"
+
+#ifndef FUNC_UNGETC_BROKEN
+# define FUNC_UNGETC_BROKEN 0
+#endif
+
+int
+main (int argc, char **argv _GL_UNUSED)
+{
+ int ch;
+ /* Assume stdin is seekable iff argc > 1. */
+ if (argc == 1)
+ {
+ ASSERT (ftell (stdin) == -1);
+ ASSERT (ftello (stdin) == -1);
+ return 0;
+ }
+
+ /* mingw ftell is unreliable on text mode input. */
+ SET_BINARY (0);
+
+ /* Simple tests. For each test, make sure ftell and ftello agree. */
+ ASSERT (ftell (stdin) == 0);
+ ASSERT (ftello (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+ ASSERT (ftello (stdin) == 1);
+
+ /* Test ftell after ungetc of read input. */
+ ch = ungetc ('#', stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 0);
+ ASSERT (ftello (stdin) == 0);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '#');
+ ASSERT (ftell (stdin) == 1);
+ ASSERT (ftello (stdin) == 1);
+
+ /* Test ftell after fseek. */
+ ASSERT (fseek (stdin, 2, SEEK_SET) == 0);
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+
+ /* Test ftell after random ungetc. */
+ ch = fgetc (stdin);
+ ASSERT (ch == '/');
+ ch = ungetc ('@', stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+
+ ch = fgetc (stdin);
+ ASSERT (ch == '@');
+ ASSERT (ftell (stdin) == 3);
+ ASSERT (ftello (stdin) == 3);
+
+ if (2 < argc)
+ {
+ if (FUNC_UNGETC_BROKEN)
+ {
+ fputs ("Skipping test: ungetc cannot handle arbitrary bytes\n",
+ stderr);
+ return 77;
+ }
+ /* Test ftell after ungetc without read. */
+ ASSERT (fseek (stdin, 0, SEEK_CUR) == 0);
+ ASSERT (ftell (stdin) == 3);
+ ASSERT (ftello (stdin) == 3);
+
+ ch = ungetc ('~', stdin);
+ ASSERT (ch == '~');
+ ASSERT (ftell (stdin) == 2);
+ ASSERT (ftello (stdin) == 2);
+ }
+
+#if !defined __MINT__ /* FreeMiNT has problems seeking past end of file */
+ /* Test ftell beyond end of file. */
+ ASSERT (fseek (stdin, 0, SEEK_END) == 0);
+ ch = ftello (stdin);
+ ASSERT (fseek (stdin, 10, SEEK_END) == 0);
+ ASSERT (ftell (stdin) == ch + 10);
+ ASSERT (ftello (stdin) == ch + 10);
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-ftello.sh b/tests/gnu/test-ftello.sh
new file mode 100755
index 00000000..33d2e838
--- /dev/null
+++ b/tests/gnu/test-ftello.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+./test-ftello${EXEEXT} 1 < "$srcdir/test-ftello.sh" || exit 1
+echo hi | ./test-ftello${EXEEXT} || exit 1
+exit 0
diff --git a/tests/gnu/test-ftello2.sh b/tests/gnu/test-ftello2.sh
new file mode 100755
index 00000000..ba750b00
--- /dev/null
+++ b/tests/gnu/test-ftello2.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-ftello${EXEEXT} 1 2 < "$srcdir/test-ftello2.sh"
diff --git a/tests/gnu/test-getdtablesize.c b/tests/gnu/test-getdtablesize.c
new file mode 100755
index 00000000..20e18732
--- /dev/null
+++ b/tests/gnu/test-getdtablesize.c
@@ -0,0 +1,34 @@
+/* Test of getdtablesize() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (getdtablesize, int, (void));
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ ASSERT (getdtablesize () >= 3);
+
+ return 0;
+}
diff --git a/tests/gnu/test-gettimeofday.c b/tests/gnu/test-gettimeofday.c
new file mode 100755
index 00000000..ff2bc72b
--- /dev/null
+++ b/tests/gnu/test-gettimeofday.c
@@ -0,0 +1,47 @@
+/*
+ * Copyright (C) 2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+ * Written by Jim Meyering.
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <sys/time.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (gettimeofday, int,
+ (struct timeval *, GETTIMEOFDAY_TIMEZONE *));
+
+#include <time.h>
+
+#include <stdio.h>
+#include <string.h>
+
+int
+main (void)
+{
+ time_t t = 0;
+ struct tm *lt;
+ struct tm saved_lt;
+ struct timeval tv;
+ lt = localtime (&t);
+ saved_lt = *lt;
+ gettimeofday (&tv, NULL);
+ if (memcmp (lt, &saved_lt, sizeof (struct tm)) != 0)
+ {
+ fprintf (stderr, "gettimeofday still clobbers the localtime buffer!\n");
+ return 1;
+ }
+ return 0;
+}
diff --git a/tests/gnu/test-iconv.c b/tests/gnu/test-iconv.c
new file mode 100755
index 00000000..cf00ac89
--- /dev/null
+++ b/tests/gnu/test-iconv.c
@@ -0,0 +1,148 @@
+/* Test of character set conversion.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#if HAVE_ICONV
+# include <iconv.h>
+
+# ifndef ICONV_CONST
+# define ICONV_CONST /* empty */
+# endif
+
+#include "signature.h"
+SIGNATURE_CHECK (iconv, size_t, (iconv_t, ICONV_CONST char **, size_t *,
+ char **, size_t *));
+SIGNATURE_CHECK (iconv_close, int, (iconv_t x));
+SIGNATURE_CHECK (iconv_open, iconv_t, (char const *, char const *));
+
+#endif
+
+#include <errno.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+#if HAVE_ICONV
+ /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
+ and UTF-8. */
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+
+ ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
+ ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
+
+ /* Test conversion from ISO-8859-1 to UTF-8 with no errors. */
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static const char expected[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + strlen (expected));
+ ASSERT (memcmp (buf, expected, strlen (expected)) == 0);
+ }
+
+ /* Test conversion from ISO-8859-1 to UTF-8 with E2BIG. */
+ {
+ static const char input[] = "\304";
+ static char buf[2] = { (char)0xDE, (char)0xAD };
+ const char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = 1;
+ size_t res = iconv (cd_88591_to_utf8,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == (size_t)(-1) && errno == E2BIG);
+ ASSERT (inbytesleft == 1);
+ ASSERT (outbytesleft == 1);
+ ASSERT ((unsigned char) buf[1] == 0xAD);
+ ASSERT ((unsigned char) buf[0] == 0xDE);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with no errors. */
+ {
+ static const char input[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ static const char expected[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == 0 && inbytesleft == 0);
+ ASSERT (outptr == buf + strlen (expected));
+ ASSERT (memcmp (buf, expected, strlen (expected)) == 0);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EILSEQ. */
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == (size_t)(-1))
+ {
+ ASSERT (errno == EILSEQ);
+ ASSERT (inbytesleft == strlen (input) && outptr == buf);
+ }
+ else
+ {
+ ASSERT (res == 1);
+ ASSERT (inbytesleft == 0);
+ }
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EINVAL. */
+ {
+ static const char input[] = "\342";
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = 1;
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (ICONV_CONST char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ ASSERT (res == (size_t)(-1) && errno == EINVAL);
+ ASSERT (inbytesleft == 1 && outptr == buf);
+ }
+
+ iconv_close (cd_88591_to_utf8);
+ iconv_close (cd_utf8_to_88591);
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-inttypes.c b/tests/gnu/test-inttypes.c
new file mode 100755
index 00000000..f055a4e8
--- /dev/null
+++ b/tests/gnu/test-inttypes.c
@@ -0,0 +1,121 @@
+/* Test of <inttypes.h> substitute.
+ Copyright (C) 2006-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_CONSTANT_MACROS 1 /* to make it work also in C++ mode */
+#define __STDC_FORMAT_MACROS 1 /* to make it work also in C++ mode */
+#include <inttypes.h>
+
+#include <stddef.h>
+
+/* Tests for macros supposed to be defined in inttypes.h. */
+
+const char *k = /* implicit string concatenation */
+#ifdef INT8_MAX
+ PRId8 PRIi8
+#endif
+#ifdef UINT8_MAX
+ PRIo8 PRIu8 PRIx8 PRIX8
+#endif
+#ifdef INT16_MAX
+ PRId16 PRIi16
+#endif
+#ifdef UINT16_MAX
+ PRIo16 PRIu16 PRIx16 PRIX16
+#endif
+#ifdef INT32_MAX
+ PRId32 PRIi32
+#endif
+#ifdef UINT32_MAX
+ PRIo32 PRIu32 PRIx32 PRIX32
+#endif
+#ifdef INT64_MAX
+ PRId64 PRIi64
+#endif
+#ifdef UINT64_MAX
+ PRIo64 PRIu64 PRIx64 PRIX64
+#endif
+ PRIdLEAST8 PRIiLEAST8 PRIoLEAST8 PRIuLEAST8 PRIxLEAST8 PRIXLEAST8
+ PRIdLEAST16 PRIiLEAST16 PRIoLEAST16 PRIuLEAST16 PRIxLEAST16 PRIXLEAST16
+ PRIdLEAST32 PRIiLEAST32 PRIoLEAST32 PRIuLEAST32 PRIxLEAST32 PRIXLEAST32
+ PRIdLEAST64 PRIiLEAST64
+ PRIoLEAST64 PRIuLEAST64 PRIxLEAST64 PRIXLEAST64
+ PRIdFAST8 PRIiFAST8 PRIoFAST8 PRIuFAST8 PRIxFAST8 PRIXFAST8
+ PRIdFAST16 PRIiFAST16 PRIoFAST16 PRIuFAST16 PRIxFAST16 PRIXFAST16
+ PRIdFAST32 PRIiFAST32 PRIoFAST32 PRIuFAST32 PRIxFAST32 PRIXFAST32
+ PRIdFAST64 PRIiFAST64
+ PRIoFAST64 PRIuFAST64 PRIxFAST64 PRIXFAST64
+ PRIdMAX PRIiMAX PRIoMAX PRIuMAX PRIxMAX PRIXMAX
+#ifdef INTPTR_MAX
+ PRIdPTR PRIiPTR
+#endif
+#ifdef UINTPTR_MAX
+ PRIoPTR PRIuPTR PRIxPTR PRIXPTR
+#endif
+ ;
+const char *l = /* implicit string concatenation */
+#ifdef INT8_MAX
+ SCNd8 SCNi8
+#endif
+#ifdef UINT8_MAX
+ SCNo8 SCNu8 SCNx8
+#endif
+#ifdef INT16_MAX
+ SCNd16 SCNi16
+#endif
+#ifdef UINT16_MAX
+ SCNo16 SCNu16 SCNx16
+#endif
+#ifdef INT32_MAX
+ SCNd32 SCNi32
+#endif
+#ifdef UINT32_MAX
+ SCNo32 SCNu32 SCNx32
+#endif
+#ifdef INT64_MAX
+ SCNd64 SCNi64
+#endif
+#ifdef UINT64_MAX
+ SCNo64 SCNu64 SCNx64
+#endif
+ SCNdLEAST8 SCNiLEAST8 SCNoLEAST8 SCNuLEAST8 SCNxLEAST8
+ SCNdLEAST16 SCNiLEAST16 SCNoLEAST16 SCNuLEAST16 SCNxLEAST16
+ SCNdLEAST32 SCNiLEAST32 SCNoLEAST32 SCNuLEAST32 SCNxLEAST32
+ SCNdLEAST64 SCNiLEAST64
+ SCNoLEAST64 SCNuLEAST64 SCNxLEAST64
+ SCNdFAST8 SCNiFAST8 SCNoFAST8 SCNuFAST8 SCNxFAST8
+ SCNdFAST16 SCNiFAST16 SCNoFAST16 SCNuFAST16 SCNxFAST16
+ SCNdFAST32 SCNiFAST32 SCNoFAST32 SCNuFAST32 SCNxFAST32
+ SCNdFAST64 SCNiFAST64
+ SCNoFAST64 SCNuFAST64 SCNxFAST64
+ SCNdMAX SCNiMAX SCNoMAX SCNuMAX SCNxMAX
+#ifdef INTPTR_MAX
+ SCNdPTR SCNiPTR
+#endif
+#ifdef UINTPTR_MAX
+ SCNoPTR SCNuPTR SCNxPTR
+#endif
+ ;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-isnand-nolibm.c b/tests/gnu/test-isnand-nolibm.c
new file mode 100755
index 00000000..b0ac0ba4
--- /dev/null
+++ b/tests/gnu/test-isnand-nolibm.c
@@ -0,0 +1,22 @@
+/* Test of isnand() substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "isnand-nolibm.h"
+
+#include "test-isnand.h"
+
diff --git a/tests/gnu/test-isnand.h b/tests/gnu/test-isnand.h
new file mode 100755
index 00000000..f9866217
--- /dev/null
+++ b/tests/gnu/test-isnand.h
@@ -0,0 +1,65 @@
+/* Test of isnand() substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <limits.h>
+
+#include "nan.h"
+#include "macros.h"
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+double zero = 0.0;
+
+int
+main ()
+{
+ /* Finite values. */
+ ASSERT (!isnand (3.141));
+ ASSERT (!isnand (3.141e30));
+ ASSERT (!isnand (3.141e-30));
+ ASSERT (!isnand (-2.718));
+ ASSERT (!isnand (-2.718e30));
+ ASSERT (!isnand (-2.718e-30));
+ ASSERT (!isnand (0.0));
+ ASSERT (!isnand (-zero));
+ /* Infinite values. */
+ ASSERT (!isnand (1.0 / 0.0));
+ ASSERT (!isnand (-1.0 / 0.0));
+ /* Quiet NaN. */
+ ASSERT (isnand (NaNd ()));
+#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+ memory_double m;
+ m.value = NaNd ();
+# if DBL_EXPBIT0_BIT > 0
+ m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1);
+# else
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ |= (unsigned int) 1 << DBL_EXPBIT0_BIT;
+ ASSERT (isnand (m.value));
+ }
+#endif
+ return 0;
+}
diff --git a/tests/gnu/test-isnanf-nolibm.c b/tests/gnu/test-isnanf-nolibm.c
new file mode 100755
index 00000000..6ac69e0d
--- /dev/null
+++ b/tests/gnu/test-isnanf-nolibm.c
@@ -0,0 +1,21 @@
+/* Test of isnanf() substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "isnanf-nolibm.h"
+
+#include "test-isnanf.h"
diff --git a/tests/gnu/test-isnanf.h b/tests/gnu/test-isnanf.h
new file mode 100755
index 00000000..d071b2cc
--- /dev/null
+++ b/tests/gnu/test-isnanf.h
@@ -0,0 +1,67 @@
+/* Test of isnanf() substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <limits.h>
+
+#include "nan.h"
+#include "macros.h"
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
+ So we use -zero instead. */
+float zero = 0.0f;
+
+int
+main ()
+{
+ /* Finite values. */
+ ASSERT (!isnanf (3.141f));
+ ASSERT (!isnanf (3.141e30f));
+ ASSERT (!isnanf (3.141e-30f));
+ ASSERT (!isnanf (-2.718f));
+ ASSERT (!isnanf (-2.718e30f));
+ ASSERT (!isnanf (-2.718e-30f));
+ ASSERT (!isnanf (0.0f));
+ ASSERT (!isnanf (-zero));
+ /* Infinite values. */
+ ASSERT (!isnanf (1.0f / 0.0f));
+ ASSERT (!isnanf (-1.0f / 0.0f));
+ /* Quiet NaN. */
+ ASSERT (isnanf (NaNf ()));
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+ memory_float m;
+ m.value = NaNf ();
+# if FLT_EXPBIT0_BIT > 0
+ m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1);
+# else
+ m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ if (FLT_EXPBIT0_WORD < NWORDS / 2)
+ m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT;
+ else
+ m.word[0] |= (unsigned int) 1;
+ ASSERT (isnanf (m.value));
+ }
+#endif
+ return 0;
+}
diff --git a/tests/gnu/test-isnanl-nolibm.c b/tests/gnu/test-isnanl-nolibm.c
new file mode 100755
index 00000000..eeca6d8f
--- /dev/null
+++ b/tests/gnu/test-isnanl-nolibm.c
@@ -0,0 +1,23 @@
+/* Test of isnanl() substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "isnanl-nolibm.h"
+
+#include "test-isnanl.h"
diff --git a/tests/gnu/test-isnanl.h b/tests/gnu/test-isnanl.h
new file mode 100755
index 00000000..1665cf41
--- /dev/null
+++ b/tests/gnu/test-isnanl.h
@@ -0,0 +1,141 @@
+/* Test of isnanl() substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <float.h>
+#include <limits.h>
+
+#include "nan.h"
+#include "macros.h"
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zero instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zero (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zero compute_minus_zero ()
+#else
+long double minus_zero = -0.0L;
+#endif
+
+int
+main ()
+{
+ #define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { unsigned int word[NWORDS]; long double value; }
+ memory_long_double;
+
+ /* Finite values. */
+ ASSERT (!isnanl (3.141L));
+ ASSERT (!isnanl (3.141e30L));
+ ASSERT (!isnanl (3.141e-30L));
+ ASSERT (!isnanl (-2.718L));
+ ASSERT (!isnanl (-2.718e30L));
+ ASSERT (!isnanl (-2.718e-30L));
+ ASSERT (!isnanl (0.0L));
+ ASSERT (!isnanl (minus_zero));
+ /* Infinite values. */
+ ASSERT (!isnanl (1.0L / 0.0L));
+ ASSERT (!isnanl (-1.0L / 0.0L));
+ /* Quiet NaN. */
+ ASSERT (isnanl (NaNl ()));
+
+#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+ /* A bit pattern that is different from a Quiet NaN. With a bit of luck,
+ it's a Signalling NaN. */
+ {
+ memory_long_double m;
+ m.value = NaNl ();
+# if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+# else
+ m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ ASSERT (isnanl (m.value));
+ }
+#endif
+
+#if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+# ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+# else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+# endif
+ { /* Quiet NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ {
+ /* Signalling NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ { /* Pseudo-Infinity. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ { /* Pseudo-Zero. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ { /* Unnormalized number. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+ { /* Pseudo-Denormal. */
+ static memory_long_double x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ ASSERT (isnanl (x.value));
+ }
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-langinfo.c b/tests/gnu/test-langinfo.c
new file mode 100755
index 00000000..7547f3bf
--- /dev/null
+++ b/tests/gnu/test-langinfo.c
@@ -0,0 +1,92 @@
+/* Test of <langinfo.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+/* Check that all the nl_item values are defined. */
+int items[] =
+ {
+ /* nl_langinfo items of the LC_CTYPE category */
+ CODESET,
+ /* nl_langinfo items of the LC_NUMERIC category */
+ RADIXCHAR,
+ THOUSEP,
+ /* nl_langinfo items of the LC_TIME category */
+ D_T_FMT,
+ D_FMT,
+ T_FMT,
+ T_FMT_AMPM,
+ AM_STR,
+ PM_STR,
+ DAY_1,
+ DAY_2,
+ DAY_3,
+ DAY_4,
+ DAY_5,
+ DAY_6,
+ DAY_7,
+ ABDAY_1,
+ ABDAY_2,
+ ABDAY_3,
+ ABDAY_4,
+ ABDAY_5,
+ ABDAY_6,
+ ABDAY_7,
+ MON_1,
+ MON_2,
+ MON_3,
+ MON_4,
+ MON_5,
+ MON_6,
+ MON_7,
+ MON_8,
+ MON_9,
+ MON_10,
+ MON_11,
+ MON_12,
+ ABMON_1,
+ ABMON_2,
+ ABMON_3,
+ ABMON_4,
+ ABMON_5,
+ ABMON_6,
+ ABMON_7,
+ ABMON_8,
+ ABMON_9,
+ ABMON_10,
+ ABMON_11,
+ ABMON_12,
+ ERA,
+ ERA_D_FMT,
+ ERA_D_T_FMT,
+ ERA_T_FMT,
+ ALT_DIGITS,
+ /* nl_langinfo items of the LC_MONETARY category */
+ CRNCYSTR,
+ /* nl_langinfo items of the LC_MESSAGES category */
+ YESEXPR,
+ NOEXPR
+ };
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-link.c b/tests/gnu/test-link.c
new file mode 100755
index 00000000..65ee9e09
--- /dev/null
+++ b/tests/gnu/test-link.c
@@ -0,0 +1,47 @@
+/* Test of link() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (link, int, (char const *, char const *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-link.t"
+
+#include "test-link.h"
+
+int
+main (void)
+{
+ /* Remove any garbage left from previous partial runs. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_link (link, true);
+}
diff --git a/tests/gnu/test-link.h b/tests/gnu/test-link.h
new file mode 100755
index 00000000..28bdcc13
--- /dev/null
+++ b/tests/gnu/test-link.h
@@ -0,0 +1,176 @@
+/* Test of link() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file is designed to test both link(a,b) and
+ linkat(AT_FDCWD,a,AT_FDCWD,b,0). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping tests with status 77. This test does not try to create
+ hard links to symlinks, but does test other aspects of symlink. */
+
+static int
+test_link (int (*func) (char const *, char const *), bool print)
+{
+ int fd;
+ int ret;
+
+ /* Create first file. */
+ fd = open (BASE "a", O_CREAT | O_EXCL | O_WRONLY, 0600);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "hello", 5) == 5);
+ ASSERT (close (fd) == 0);
+
+ /* Not all file systems support link. Mingw doesn't have reliable
+ st_nlink on hard links, but our implementation does fail with
+ EPERM on poor file systems, and we can detect the inferior stat()
+ via st_ino. Cygwin 1.5.x copies rather than links files on those
+ file systems, but there, st_nlink and st_ino are reliable. */
+ ret = func (BASE "a", BASE "b");
+ if (!ret)
+ {
+ struct stat st;
+ ASSERT (stat (BASE "b", &st) == 0);
+ if (st.st_ino && st.st_nlink != 2)
+ {
+ ASSERT (unlink (BASE "b") == 0);
+ errno = EPERM;
+ ret = -1;
+ }
+ }
+ if (ret == -1)
+ {
+ /* If the device does not support hard links, errno is
+ EPERM on Linux, EOPNOTSUPP on FreeBSD. */
+ switch (errno)
+ {
+ case EPERM:
+ case EOPNOTSUPP:
+ if (print)
+ fputs ("skipping test: "
+ "hard links not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "a") == 0);
+ return 77;
+ default:
+ perror ("link");
+ return 1;
+ }
+ }
+ ASSERT (ret == 0);
+
+ /* Now, for some behavior tests. Modify the contents of 'b', and
+ ensure that 'a' can see it, both while 'b' exists and after. */
+ fd = open (BASE "b", O_APPEND | O_WRONLY);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "world", 5) == 5);
+ ASSERT (close (fd) == 0);
+ {
+ char buf[11] = { 0 };
+ fd = open (BASE "a", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (read (fd, buf, 10) == 10);
+ ASSERT (strcmp (buf, "helloworld") == 0);
+ ASSERT (close (fd) == 0);
+ ASSERT (unlink (BASE "b") == 0);
+ fd = open (BASE "a", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (read (fd, buf, 10) == 10);
+ ASSERT (strcmp (buf, "helloworld") == 0);
+ ASSERT (close (fd) == 0);
+ }
+
+ /* Test for various error conditions. */
+ ASSERT (mkdir (BASE "d", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "a", ".") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "a") == -1);
+ ASSERT (errno == EEXIST);
+ ASSERT (func (BASE "a", BASE "b") == 0);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "b") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "d") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func (BASE "c", BASE "e") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "c/.") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "a/", BASE "c") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "a", BASE "c/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+
+ /* Most platforms reject hard links to directories, and even on
+ those that do permit it, most users can't create them. We assume
+ that if this test is run as root and we managed to create a hard
+ link, then unlink better be able to clean it up. */
+ {
+ int result;
+ errno = 0;
+ result = func (BASE "d", BASE "c");
+ if (result == 0)
+ {
+ /* Probably root on Solaris. */
+ ASSERT (unlink (BASE "c") == 0);
+ }
+ else
+ {
+ /* Most everyone else. */
+ ASSERT (errno == EPERM || errno == EACCES);
+ errno = 0;
+ ASSERT (func (BASE "d/.", BASE "c") == -1);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "d/.//", BASE "c") == -1);
+ ASSERT (errno == EPERM || errno == EACCES || errno == EINVAL);
+ }
+ }
+ ASSERT (unlink (BASE "a") == 0);
+ errno = 0;
+ ASSERT (unlink (BASE "c") == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (rmdir (BASE "d") == 0);
+
+ /* Test invalid use of symlink. */
+ if (symlink (BASE "a", BASE "link") != 0)
+ {
+ ASSERT (unlink (BASE "b") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ errno = 0;
+ ASSERT (func (BASE "b", BASE "link/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT || errno == EEXIST);
+ ASSERT (rename (BASE "b", BASE "a") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link/", BASE "b") == -1);
+ ASSERT (errno == ENOTDIR || errno == EEXIST);
+
+ /* Clean up. */
+ ASSERT (unlink (BASE "a") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-linkedhash_list.c b/tests/gnu/test-linkedhash_list.c
new file mode 100755
index 00000000..9139c212
--- /dev/null
+++ b/tests/gnu/test-linkedhash_list.c
@@ -0,0 +1,441 @@
+/* Test of sequential list data type implementation.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2006.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "gl_linkedhash_list.h"
+
+#include <limits.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "gl_array_list.h"
+#include "progname.h"
+#include "macros.h"
+
+static const char *objects[15] =
+ {
+ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o"
+ };
+
+#define SIZE_BITS (sizeof (size_t) * CHAR_BIT)
+
+static bool
+string_equals (const void *x1, const void *x2)
+{
+ const char *s1 = x1;
+ const char *s2 = x2;
+ return strcmp (s1, s2) == 0;
+}
+
+/* A hash function for NUL-terminated char* strings using
+ the method described by Bruno Haible.
+ See http://www.haible.de/bruno/hashfunc.html. */
+static size_t
+string_hash (const void *x)
+{
+ const char *s = x;
+ size_t h = 0;
+
+ for (; *s; s++)
+ h = *s + ((h << 9) | (h >> (SIZE_BITS - 9)));
+
+ return h;
+}
+
+#define RANDOM(n) (rand () % (n))
+#define RANDOM_OBJECT() objects[RANDOM (SIZEOF (objects))]
+
+static void
+check_equals (gl_list_t list1, gl_list_t list2)
+{
+ size_t n, i;
+
+ n = gl_list_size (list1);
+ ASSERT (n == gl_list_size (list2));
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_list_get_at (list1, i) == gl_list_get_at (list2, i));
+ }
+}
+
+static void
+check_all (gl_list_t list1, gl_list_t list2, gl_list_t list3)
+{
+ check_equals (list1, list2);
+ check_equals (list1, list3);
+}
+
+int
+main (int argc, char *argv[])
+{
+ gl_list_t list1, list2, list3;
+
+ set_program_name (argv[0]);
+
+ /* Allow the user to provide a non-default random seed on the command line. */
+ if (argc > 1)
+ srand (atoi (argv[1]));
+
+ {
+ size_t initial_size = RANDOM (50);
+ const void **contents =
+ (const void **) malloc (initial_size * sizeof (const void *));
+ size_t i;
+ unsigned int repeat;
+
+ for (i = 0; i < initial_size; i++)
+ contents[i] = RANDOM_OBJECT ();
+
+ /* Create list1. */
+ list1 = gl_list_nx_create (GL_ARRAY_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list1 != NULL);
+ /* Create list2. */
+ list2 = gl_list_nx_create_empty (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL, true);
+ ASSERT (list2 != NULL);
+ for (i = 0; i < initial_size; i++)
+ ASSERT (gl_list_nx_add_last (list2, contents[i]) != NULL);
+
+ /* Create list3. */
+ list3 = gl_list_nx_create (GL_LINKEDHASH_LIST,
+ string_equals, string_hash, NULL, true,
+ initial_size, contents);
+ ASSERT (list3 != NULL);
+
+ check_all (list1, list2, list3);
+
+ for (repeat = 0; repeat < 10000; repeat++)
+ {
+ unsigned int operation = RANDOM (16);
+ switch (operation)
+ {
+ case 0:
+ if (gl_list_size (list1) > 0)
+ {
+ size_t index = RANDOM (gl_list_size (list1));
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+
+ node1 = gl_list_nx_set_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ ASSERT (gl_list_get_at (list1, index) == obj);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+
+ node2 = gl_list_nx_set_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ ASSERT (gl_list_get_at (list2, index) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+
+ node3 = gl_list_nx_set_at (list3, index, obj);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_get_at (list3, index) == obj);
+ ASSERT (gl_list_node_value (list3, node3) == obj);
+
+ if (index > 0)
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1))
+ == gl_list_get_at (list1, index - 1));
+ ASSERT (gl_list_node_value (list2, gl_list_previous_node (list3, node3))
+ == gl_list_get_at (list2, index - 1));
+ ASSERT (gl_list_node_value (list3, gl_list_previous_node (list3, node3))
+ == gl_list_get_at (list2, index - 1));
+ }
+ if (index + 1 < gl_list_size (list1))
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1))
+ == gl_list_get_at (list1, index + 1));
+ ASSERT (gl_list_node_value (list2, gl_list_next_node (list3, node3))
+ == gl_list_get_at (list2, index + 1));
+ ASSERT (gl_list_node_value (list3, gl_list_next_node (list3, node3))
+ == gl_list_get_at (list2, index + 1));
+ }
+ }
+ break;
+ case 1:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_search (list1, obj);
+ node2 = gl_list_search (list2, obj);
+ node3 = gl_list_search (list3, obj);
+ if (node1 == NULL)
+ {
+ ASSERT (node2 == NULL);
+ ASSERT (node3 == NULL);
+ }
+ else
+ {
+ ASSERT (node2 != NULL);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_node_value (list3, node3) == obj);
+ }
+ }
+ break;
+ case 2:
+ {
+ const char *obj = RANDOM_OBJECT ();
+ size_t index1, index2, index3;
+ index1 = gl_list_indexof (list1, obj);
+ index2 = gl_list_indexof (list2, obj);
+ index3 = gl_list_indexof (list3, obj);
+ if (index1 == (size_t)(-1))
+ {
+ ASSERT (index2 == (size_t)(-1));
+ ASSERT (index3 == (size_t)(-1));
+ }
+ else
+ {
+ ASSERT (index2 != (size_t)(-1));
+ ASSERT (index3 != (size_t)(-1));
+ ASSERT (gl_list_get_at (list1, index1) == obj);
+ ASSERT (gl_list_get_at (list2, index2) == obj);
+ ASSERT (gl_list_get_at (list3, index3) == obj);
+ ASSERT (index2 == index1);
+ ASSERT (index3 == index1);
+ }
+ }
+ break;
+ case 3: /* add 1 element */
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_nx_add_first (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_node_value (list3, node3) == obj);
+ ASSERT (gl_list_get_at (list1, 0) == obj);
+ ASSERT (gl_list_get_at (list2, 0) == obj);
+ ASSERT (gl_list_get_at (list3, 0) == obj);
+ }
+ break;
+ case 4: /* add 1 element */
+ {
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_nx_add_last (list1, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_last (list2, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_last (list3, obj);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_node_value (list3, node3) == obj);
+ ASSERT (gl_list_get_at (list1, gl_list_size (list1) - 1) == obj);
+ ASSERT (gl_list_get_at (list2, gl_list_size (list2) - 1) == obj);
+ ASSERT (gl_list_get_at (list3, gl_list_size (list3) - 1) == obj);
+ }
+ break;
+ case 5: /* add 3 elements */
+ {
+ const char *obj0 = RANDOM_OBJECT ();
+ const char *obj1 = RANDOM_OBJECT ();
+ const char *obj2 = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_nx_add_first (list1, obj2);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_before (list1, node1, obj0);
+ ASSERT (node1 != NULL);
+ node1 = gl_list_nx_add_after (list1, node1, obj1);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_first (list2, obj2);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_before (list2, node2, obj0);
+ ASSERT (node2 != NULL);
+ node2 = gl_list_nx_add_after (list2, node2, obj1);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_first (list3, obj2);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_before (list3, node3, obj0);
+ ASSERT (node3 != NULL);
+ node3 = gl_list_nx_add_after (list3, node3, obj1);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_node_value (list1, node1) == obj1);
+ ASSERT (gl_list_node_value (list2, node2) == obj1);
+ ASSERT (gl_list_node_value (list3, node3) == obj1);
+ ASSERT (gl_list_get_at (list1, 0) == obj0);
+ ASSERT (gl_list_get_at (list1, 1) == obj1);
+ ASSERT (gl_list_get_at (list1, 2) == obj2);
+ ASSERT (gl_list_get_at (list2, 0) == obj0);
+ ASSERT (gl_list_get_at (list2, 1) == obj1);
+ ASSERT (gl_list_get_at (list2, 2) == obj2);
+ ASSERT (gl_list_get_at (list3, 0) == obj0);
+ ASSERT (gl_list_get_at (list3, 1) == obj1);
+ ASSERT (gl_list_get_at (list3, 2) == obj2);
+ }
+ break;
+ case 6: /* add 1 element */
+ {
+ size_t index = RANDOM (gl_list_size (list1) + 1);
+ const char *obj = RANDOM_OBJECT ();
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_nx_add_at (list1, index, obj);
+ ASSERT (node1 != NULL);
+ node2 = gl_list_nx_add_at (list2, index, obj);
+ ASSERT (node2 != NULL);
+ node3 = gl_list_nx_add_at (list3, index, obj);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_get_at (list1, index) == obj);
+ ASSERT (gl_list_node_value (list1, node1) == obj);
+ ASSERT (gl_list_get_at (list2, index) == obj);
+ ASSERT (gl_list_node_value (list2, node2) == obj);
+ ASSERT (gl_list_get_at (list3, index) == obj);
+ ASSERT (gl_list_node_value (list3, node3) == obj);
+ if (index > 0)
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_previous_node (list1, node1))
+ == gl_list_get_at (list1, index - 1));
+ ASSERT (gl_list_node_value (list2, gl_list_previous_node (list3, node3))
+ == gl_list_get_at (list2, index - 1));
+ ASSERT (gl_list_node_value (list3, gl_list_previous_node (list3, node3))
+ == gl_list_get_at (list2, index - 1));
+ }
+ if (index + 1 < gl_list_size (list1))
+ {
+ ASSERT (gl_list_node_value (list1, gl_list_next_node (list1, node1))
+ == gl_list_get_at (list1, index + 1));
+ ASSERT (gl_list_node_value (list2, gl_list_next_node (list3, node3))
+ == gl_list_get_at (list2, index + 1));
+ ASSERT (gl_list_node_value (list3, gl_list_next_node (list3, node3))
+ == gl_list_get_at (list2, index + 1));
+ }
+ }
+ break;
+ case 7: case 8: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = gl_list_get_at (list1, RANDOM (n));
+ gl_list_node_t node1, node2, node3;
+ node1 = gl_list_search (list1, obj);
+ node2 = gl_list_search (list2, obj);
+ node3 = gl_list_search (list3, obj);
+ ASSERT (node1 != NULL);
+ ASSERT (node2 != NULL);
+ ASSERT (node3 != NULL);
+ ASSERT (gl_list_remove_node (list1, node1));
+ ASSERT (gl_list_remove_node (list2, node2));
+ ASSERT (gl_list_remove_node (list3, node3));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 9: case 10: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ size_t index = RANDOM (n);
+ ASSERT (gl_list_remove_at (list1, index));
+ ASSERT (gl_list_remove_at (list2, index));
+ ASSERT (gl_list_remove_at (list3, index));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 11: case 12: /* remove 1 element */
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = gl_list_get_at (list1, RANDOM (n));
+ ASSERT (gl_list_remove (list1, obj));
+ ASSERT (gl_list_remove (list2, obj));
+ ASSERT (gl_list_remove (list3, obj));
+ ASSERT (gl_list_size (list1) == n - 1);
+ }
+ break;
+ case 13:
+ if (gl_list_size (list1) > 0)
+ {
+ size_t n = gl_list_size (list1);
+ const char *obj = "xyzzy";
+ ASSERT (!gl_list_remove (list1, obj));
+ ASSERT (!gl_list_remove (list2, obj));
+ ASSERT (!gl_list_remove (list3, obj));
+ ASSERT (gl_list_size (list1) == n);
+ }
+ break;
+ case 14:
+ {
+ size_t n = gl_list_size (list1);
+ gl_list_iterator_t iter1, iter2, iter3;
+ const void *elt;
+ iter1 = gl_list_iterator (list1);
+ iter2 = gl_list_iterator (list2);
+ iter3 = gl_list_iterator (list3);
+ for (i = 0; i < n; i++)
+ {
+ ASSERT (gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (gl_list_get_at (list1, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (gl_list_get_at (list2, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter3, &elt, NULL));
+ ASSERT (gl_list_get_at (list3, i) == elt);
+ }
+ ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter3, &elt, NULL));
+ gl_list_iterator_free (&iter1);
+ gl_list_iterator_free (&iter2);
+ gl_list_iterator_free (&iter3);
+ }
+ break;
+ case 15:
+ {
+ size_t end = RANDOM (gl_list_size (list1) + 1);
+ size_t start = RANDOM (end + 1);
+ gl_list_iterator_t iter1, iter2, iter3;
+ const void *elt;
+ iter1 = gl_list_iterator_from_to (list1, start, end);
+ iter2 = gl_list_iterator_from_to (list2, start, end);
+ iter3 = gl_list_iterator_from_to (list3, start, end);
+ for (i = start; i < end; i++)
+ {
+ ASSERT (gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (gl_list_get_at (list1, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (gl_list_get_at (list2, i) == elt);
+ ASSERT (gl_list_iterator_next (&iter3, &elt, NULL));
+ ASSERT (gl_list_get_at (list3, i) == elt);
+ }
+ ASSERT (!gl_list_iterator_next (&iter1, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter2, &elt, NULL));
+ ASSERT (!gl_list_iterator_next (&iter3, &elt, NULL));
+ gl_list_iterator_free (&iter1);
+ gl_list_iterator_free (&iter2);
+ gl_list_iterator_free (&iter3);
+ }
+ break;
+ }
+ check_all (list1, list2, list3);
+ }
+
+ gl_list_free (list1);
+ gl_list_free (list2);
+ gl_list_free (list3);
+ free (contents);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-lseek.c b/tests/gnu/test-lseek.c
new file mode 100755
index 00000000..bafa9b58
--- /dev/null
+++ b/tests/gnu/test-lseek.c
@@ -0,0 +1,96 @@
+/* Test of lseek() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (lseek, off_t, (int, off_t, int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+/* ARGC must be 2; *ARGV[1] is '0' if stdin and stdout are files, '1'
+ if they are pipes, and '2' if they are closed. Check for proper
+ semantics of lseek. */
+int
+main (int argc, char **argv)
+{
+ if (argc != 2)
+ return 2;
+ switch (*argv[1])
+ {
+ case '0': /* regular files */
+ ASSERT (lseek (0, (off_t)2, SEEK_SET) == 2);
+ ASSERT (lseek (0, (off_t)-4, SEEK_CUR) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+#if ! defined __BEOS__
+ /* POSIX says that the last lseek call, when failing, does not change
+ the current offset. But BeOS sets it to 0. */
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+ ASSERT (lseek (0, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+ ASSERT (lseek (1, (off_t)2, SEEK_SET) == 2);
+ errno = 0;
+ ASSERT (lseek (1, (off_t)-4, SEEK_CUR) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+#if ! defined __BEOS__
+ /* POSIX says that the last lseek call, when failing, does not change
+ the current offset. But BeOS sets it to 0. */
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == 2);
+#endif
+#if 0 /* leads to SIGSYS on IRIX 6.5 */
+ ASSERT (lseek (1, (off_t)0, (SEEK_SET | SEEK_CUR | SEEK_END) + 1) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+ break;
+
+ case '1': /* pipes */
+ errno = 0;
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == ESPIPE);
+ errno = 0;
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == ESPIPE);
+ break;
+
+ case '2': /* closed */
+ /* Explicitly close file descriptors 0 and 1. The <&- and >&- in the
+ invoking shell are not enough on HP-UX. */
+ close (0);
+ close (1);
+ errno = 0;
+ ASSERT (lseek (0, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+ errno = 0;
+ ASSERT (lseek (1, (off_t)0, SEEK_CUR) == -1);
+ ASSERT (errno == EBADF);
+ break;
+
+ default:
+ return 1;
+ }
+ return 0;
+}
diff --git a/tests/gnu/test-lseek.sh b/tests/gnu/test-lseek.sh
new file mode 100755
index 00000000..e84c2bb4
--- /dev/null
+++ b/tests/gnu/test-lseek.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+tmpfiles=
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles=t-lseek.tmp
+# seekable files
+./test-lseek${EXEEXT} 0 < "$srcdir/test-lseek.sh" > t-lseek.tmp || exit 1
+
+# pipes
+echo hi | ./test-lseek${EXEEXT} 1 | cat || exit 1
+
+# closed descriptors
+./test-lseek${EXEEXT} 2 <&- >&- || exit 1
+
+rm -rf $tmpfiles
+exit 0
diff --git a/tests/gnu/test-lstat.c b/tests/gnu/test-lstat.c
new file mode 100755
index 00000000..b8f9237e
--- /dev/null
+++ b/tests/gnu/test-lstat.c
@@ -0,0 +1,60 @@
+/* Test of lstat() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: lstat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) lstat rather than rpl_lstat. Most code should not use the
+ address of lstat. */
+#include "signature.h"
+SIGNATURE_CHECK (lstat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "same-inode.h"
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-lstat.t"
+
+#include "test-lstat.h"
+
+/* Wrapper around lstat, which works even if lstat is a function-like
+ macro, where test_lstat_func(lstat) would do the wrong thing. */
+static int
+do_lstat (char const *name, struct stat *st)
+{
+ return lstat (name, st);
+}
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_lstat_func (do_lstat, true);
+}
diff --git a/tests/gnu/test-lstat.h b/tests/gnu/test-lstat.h
new file mode 100755
index 00000000..f120f4c5
--- /dev/null
+++ b/tests/gnu/test-lstat.h
@@ -0,0 +1,116 @@
+/* Test of lstat() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson, 2008; and Eric Blake, 2009. */
+
+/* This file is designed to test both lstat(n,buf) and
+ fstatat(AT_FDCWD,n,buf,AT_SYMLINK_NOFOLLOW). FUNC is the function
+ to test. Assumes that BASE and ASSERT are already defined, and
+ that appropriate headers are already included. If PRINT, warn
+ before skipping symlink tests with status 77. */
+
+static int
+test_lstat_func (int (*func) (char const *, struct stat *), bool print)
+{
+ struct stat st1;
+ struct stat st2;
+
+ /* Test for common directories. */
+ ASSERT (func (".", &st1) == 0);
+ ASSERT (func ("./", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (func ("/", &st1) == 0);
+ ASSERT (func ("///", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (func ("..", &st1) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+
+ /* Test for error conditions. */
+ errno = 0;
+ ASSERT (func ("", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ ASSERT (func (BASE "file", &st1) == 0);
+ ASSERT (S_ISREG (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "file/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Now for some symlink tests, where supported. We set up:
+ link1 -> directory
+ link2 -> file
+ link3 -> dangling
+ link4 -> loop
+ then test behavior both with and without trailing slash.
+ */
+ if (symlink (".", BASE "link1") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+ ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+ ASSERT (func (BASE "link1", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ ASSERT (func (BASE "link1/", &st1) == 0);
+ ASSERT (stat (BASE "link1", &st2) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+ ASSERT (S_ISDIR (st2.st_mode));
+ ASSERT (SAME_INODE (st1, st2));
+
+ ASSERT (func (BASE "link2", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link2/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ ASSERT (func (BASE "link3", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link3/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (func (BASE "link4", &st1) == 0);
+ ASSERT (S_ISLNK (st1.st_mode));
+ errno = 0;
+ ASSERT (func (BASE "link4/", &st1) == -1);
+ ASSERT (errno == ELOOP);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (unlink (BASE "link4") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-malloca.c b/tests/gnu/test-malloca.c
new file mode 100755
index 00000000..14ef3a9d
--- /dev/null
+++ b/tests/gnu/test-malloca.c
@@ -0,0 +1,59 @@
+/* Test of safe automatic memory allocation.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2005. */
+
+#include <config.h>
+
+#include "malloca.h"
+
+#include <stdlib.h>
+
+static void
+do_allocation (int n)
+{
+ void *ptr = malloca (n);
+ freea (ptr);
+ ptr = safe_alloca (n);
+}
+
+void (*func) (int) = do_allocation;
+
+int
+main ()
+{
+ int i;
+
+ /* Repeat a lot of times, to make sure there's no memory leak. */
+ for (i = 0; i < 50000; i++)
+ {
+ /* Try various values.
+ n = 0 gave a crash on Alpha with gcc-2.5.8.
+ Some versions of MacOS X have a stack size limit of 512 KB. */
+ func (34);
+ func (134);
+ func (399);
+ func (510823);
+ func (129321);
+ func (0);
+ func (4070);
+ func (4095);
+ func (1);
+ func (16582);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-math.c b/tests/gnu/test-math.c
new file mode 100755
index 00000000..f940a249
--- /dev/null
+++ b/tests/gnu/test-math.c
@@ -0,0 +1,53 @@
+/* Test of <math.h> substitute.
+ Copyright (C) 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <math.h>
+
+#ifndef NAN
+# error NAN should be defined
+choke me
+#endif
+
+#if 0
+/* Check that NAN expands into a constant expression. */
+static float n = NAN;
+#endif
+
+/* Compare two numbers with ==.
+ This is a separate function because IRIX 6.5 "cc -O" miscompiles an
+ 'x == x' test. */
+static int
+numeric_equal (double x, double y)
+{
+ return x == y;
+}
+
+int
+main (void)
+{
+ double d = NAN;
+ double zero = 0.0;
+ if (numeric_equal (d, d))
+ return 1;
+ d = HUGE_VAL;
+ if (!numeric_equal (d, 1.0 / zero))
+ return 1;
+ return 0;
+}
diff --git a/tests/gnu/test-mbrtowc.c b/tests/gnu/test-mbrtowc.c
new file mode 100755
index 00000000..5477677c
--- /dev/null
+++ b/tests/gnu/test-mbrtowc.c
@@ -0,0 +1,323 @@
+/* Test of conversion of multibyte character to wide character.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbrtowc, size_t, (wchar_t *, char const *, size_t,
+ mbstate_t *));
+
+#include <locale.h>
+#include <stdio.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ mbstate_t state;
+ wchar_t wc;
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Test zero-length input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "x", 0, &state);
+ /* gnulib's implementation returns (size_t)(-2).
+ The AIX 5.1 implementation returns (size_t)(-1).
+ glibc's implementation returns 0. */
+ ASSERT (ret == (size_t)(-2) || ret == (size_t)(-1) || ret == 0);
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test NUL byte input. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == 0);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, "", 1, &state);
+ ASSERT (ret == 0);
+ ASSERT (mbsinit (&state));
+ }
+
+ /* Test single-byte input. */
+ {
+ int c;
+ char buf[1];
+
+ memset (&state, '\0', sizeof (mbstate_t));
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set". */
+ buf[0] = c;
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == c);
+ ASSERT (mbsinit (&state));
+ ret = mbrtowc (NULL, buf, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (mbsinit (&state));
+ break;
+ }
+ }
+
+ /* Test special calling convention, passing a NULL pointer. */
+ {
+ memset (&state, '\0', sizeof (mbstate_t));
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, NULL, 5, &state);
+ ASSERT (ret == 0);
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (mbsinit (&state));
+ }
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ {
+ char input[] = "B\374\337er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\374');
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 3, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == (unsigned char) '\337');
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ {
+ char input[] = "B\303\274\303\237er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 5, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 4, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 6, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '3':
+ /* Locale encoding is EUC-JP. */
+ {
+ char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '<');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 2, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[1] = '\0';
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[3] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 4, 4, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[4] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 5, 3, &state);
+ ASSERT (ret == 2);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == '>');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+
+ case '4':
+ /* Locale encoding is GB18030. */
+ {
+ char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+ memset (&state, '\0', sizeof (mbstate_t));
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'B');
+ ASSERT (mbsinit (&state));
+ input[0] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 1, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (wc == (wchar_t) 0xBADFACE);
+ ASSERT (!mbsinit (&state));
+ input[1] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 2, 7, &state);
+ ASSERT (ret == 1);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[2] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 3, 6, &state);
+ ASSERT (ret == 4);
+ ASSERT (wctob (wc) == EOF);
+ ASSERT (mbsinit (&state));
+ input[3] = '\0';
+ input[4] = '\0';
+ input[5] = '\0';
+ input[6] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 7, 2, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'e');
+ ASSERT (mbsinit (&state));
+ input[5] = '\0';
+
+ wc = (wchar_t) 0xBADFACE;
+ ret = mbrtowc (&wc, input + 8, 1, &state);
+ ASSERT (ret == 1);
+ ASSERT (wc == 'r');
+ ASSERT (mbsinit (&state));
+ }
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/tests/gnu/test-mbrtowc1.sh b/tests/gnu/test-mbrtowc1.sh
new file mode 100755
index 00000000..3becba3a
--- /dev/null
+++ b/tests/gnu/test-mbrtowc1.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional french locale is installed"
+ else
+ echo "Skipping test: no traditional french locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR \
+./test-mbrtowc${EXEEXT} 1
diff --git a/tests/gnu/test-mbrtowc2.sh b/tests/gnu/test-mbrtowc2.sh
new file mode 100755
index 00000000..0405abaf
--- /dev/null
+++ b/tests/gnu/test-mbrtowc2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbrtowc${EXEEXT} 2
diff --git a/tests/gnu/test-mbrtowc3.sh b/tests/gnu/test-mbrtowc3.sh
new file mode 100755
index 00000000..63a89a2e
--- /dev/null
+++ b/tests/gnu/test-mbrtowc3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no traditional japanese locale is installed"
+ else
+ echo "Skipping test: no traditional japanese locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_JA \
+./test-mbrtowc${EXEEXT} 3
diff --git a/tests/gnu/test-mbrtowc4.sh b/tests/gnu/test-mbrtowc4.sh
new file mode 100755
index 00000000..b299a2c4
--- /dev/null
+++ b/tests/gnu/test-mbrtowc4.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no transitional chinese locale is installed"
+ else
+ echo "Skipping test: no transitional chinese locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbrtowc${EXEEXT} 4
diff --git a/tests/gnu/test-mbsinit.c b/tests/gnu/test-mbsinit.c
new file mode 100755
index 00000000..4ca0fc37
--- /dev/null
+++ b/tests/gnu/test-mbsinit.c
@@ -0,0 +1,53 @@
+/* Test of test for initial conversion state.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (mbsinit, int, (const mbstate_t *));
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ static mbstate_t state;
+
+ ASSERT (mbsinit (&state));
+
+ if (argc > 1)
+ {
+ static const char input[1] = "\303";
+ wchar_t wc;
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ ret = mbrtowc (&wc, input, 1, &state);
+ ASSERT (ret == (size_t)(-2));
+ ASSERT (!mbsinit (&state));
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-mbsinit.sh b/tests/gnu/test-mbsinit.sh
new file mode 100755
index 00000000..bbda48d2
--- /dev/null
+++ b/tests/gnu/test-mbsinit.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsinit${EXEEXT}
diff --git a/tests/gnu/test-mbsstr1.c b/tests/gnu/test-mbsstr1.c
new file mode 100755
index 00000000..e9fb50ea
--- /dev/null
+++ b/tests/gnu/test-mbsstr1.c
@@ -0,0 +1,128 @@
+/* Test of searching in a string.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* This test is executed in the C locale. */
+
+ {
+ const char input[] = "foo";
+ const char *result = mbsstr (input, "");
+ ASSERT (result == input);
+ }
+
+ {
+ const char input[] = "foo";
+ const char *result = mbsstr (input, "o");
+ ASSERT (result == input + 1);
+ }
+
+ {
+ const char input[] = "ABC ABCDAB ABCDABCDABDE";
+ const char *result = mbsstr (input, "ABCDABD");
+ ASSERT (result == input + 15);
+ }
+
+ {
+ const char input[] = "ABC ABCDAB ABCDABCDABDE";
+ const char *result = mbsstr (input, "ABCDABE");
+ ASSERT (result == NULL);
+ }
+
+ /* Check that a very long haystack is handled quickly if the needle is
+ short and occurs near the beginning. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *needle =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+ char *haystack = (char *) malloc (m + 1);
+ if (haystack != NULL)
+ {
+ memset (haystack, 'A', m);
+ haystack[0] = 'B';
+ haystack[m] = '\0';
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == haystack + 1);
+ }
+
+ free (haystack);
+ }
+ }
+
+ /* Check that a very long needle is discarded quickly if the haystack is
+ short. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *haystack =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+ char *needle = (char *) malloc (m + 1);
+ if (needle != NULL)
+ {
+ memset (needle, 'A', m);
+ needle[m] = '\0';
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == NULL);
+ }
+
+ free (needle);
+ }
+ }
+
+ /* Check that the asymptotic worst-case complexity is not quadratic. */
+ {
+ size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 2);
+ char *needle = (char *) malloc (m + 2);
+ if (haystack != NULL && needle != NULL)
+ {
+ const char *result;
+
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+ haystack[2 * m + 1] = '\0';
+
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+ needle[m + 1] = '\0';
+
+ result = mbsstr (haystack, needle);
+ ASSERT (result == haystack + m);
+ }
+ free (needle);
+ free (haystack);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-mbsstr2.c b/tests/gnu/test-mbsstr2.c
new file mode 100755
index 00000000..488b2108
--- /dev/null
+++ b/tests/gnu/test-mbsstr2.c
@@ -0,0 +1,141 @@
+/* Test of searching in a string.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ {
+ const char input[] = "f\303\266\303\266";
+ const char *result = mbsstr (input, "");
+ ASSERT (result == input);
+ }
+
+ {
+ const char input[] = "f\303\266\303\266";
+ const char *result = mbsstr (input, "\303\266");
+ ASSERT (result == input + 1);
+ }
+
+ {
+ const char input[] = "f\303\266\303\266";
+ const char *result = mbsstr (input, "\266\303");
+ ASSERT (result == NULL);
+ }
+
+ {
+ const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+ const char *result = mbsstr (input, "\303\204BCD\303\204BD"); /* "ÄBCDÄBD" */
+ ASSERT (result == input + 19);
+ }
+
+ {
+ const char input[] = "\303\204BC \303\204BCD\303\204B \303\204BCD\303\204BCD\303\204BDE"; /* "ÄBC ÄBCDÄB ÄBCDÄBCDÄBDE" */
+ const char *result = mbsstr (input, "\303\204BCD\303\204BE"); /* "ÄBCDÄBE" */
+ ASSERT (result == NULL);
+ }
+
+ /* Check that a very long haystack is handled quickly if the needle is
+ short and occurs near the beginning. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *needle =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+ char *haystack = (char *) malloc (m + 1);
+ if (haystack != NULL)
+ {
+ memset (haystack, 'A', m);
+ haystack[0] = '\303'; haystack[1] = '\204';
+ haystack[m] = '\0';
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == haystack + 2);
+ }
+
+ free (haystack);
+ }
+ }
+
+ /* Check that a very long needle is discarded quickly if the haystack is
+ short. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *haystack =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+ "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+ "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+ "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207"
+ "A\303\207A\303\207A\303\207A\303\207A\303\207A\303\207";
+ char *needle = (char *) malloc (m + 1);
+ if (needle != NULL)
+ {
+ memset (needle, 'A', m);
+ needle[m] = '\0';
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (mbsstr (haystack, needle) == NULL);
+ }
+
+ free (needle);
+ }
+ }
+
+ /* Check that the asymptotic worst-case complexity is not quadratic. */
+ {
+ size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 3);
+ char *needle = (char *) malloc (m + 3);
+ if (haystack != NULL && needle != NULL)
+ {
+ const char *result;
+
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = '\303'; haystack[2 * m + 1] = '\207';
+ haystack[2 * m + 2] = '\0';
+
+ memset (needle, 'A', m);
+ needle[m] = '\303'; needle[m + 1] = '\207';
+ needle[m + 2] = '\0';
+
+ result = mbsstr (haystack, needle);
+ ASSERT (result == haystack + m);
+ }
+ free (needle);
+ free (haystack);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-mbsstr2.sh b/tests/gnu/test-mbsstr2.sh
new file mode 100755
index 00000000..79d06df6
--- /dev/null
+++ b/tests/gnu/test-mbsstr2.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french Unicode locale is installed"
+ else
+ echo "Skipping test: no french Unicode locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_FR_UTF8 \
+./test-mbsstr2${EXEEXT}
diff --git a/tests/gnu/test-mbsstr3.c b/tests/gnu/test-mbsstr3.c
new file mode 100755
index 00000000..a1479be4
--- /dev/null
+++ b/tests/gnu/test-mbsstr3.c
@@ -0,0 +1,81 @@
+/* Test of searching in a string.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include <locale.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Tests with a character < 0x30. */
+ {
+ const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+ const char *result = mbsstr (input, " ");
+ ASSERT (result == input + 4);
+ }
+
+ {
+ const char input[] = "\312\276\300\375"; /* "示例" */
+ const char *result = mbsstr (input, " ");
+ ASSERT (result == NULL);
+ }
+
+ /* Tests with a character >= 0x30. */
+ {
+ const char input[] = "\272\305123\324\313\320\320\241\243"; /* "号123运行。" */
+ const char *result = mbsstr (input, "2");
+ ASSERT (result == input + 3);
+ }
+
+ /* The following tests show how mbsstr() is different from strstr(). */
+
+ {
+ const char input[] = "\313\320\320\320"; /* "诵行" */
+ const char *result = mbsstr (input, "\320\320"); /* "行" */
+ ASSERT (result == input + 2);
+ }
+
+ {
+ const char input[] = "\203\062\332\066123\324\313\320\320\241\243"; /* "씋123运行。" */
+ const char *result = mbsstr (input, "2");
+ ASSERT (result == input + 5);
+ }
+
+ {
+ const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+ const char *result = mbsstr (input, "\276\300"); /* "纠" */
+ ASSERT (result == NULL);
+ }
+
+ {
+ const char input[] = "\312\276\300\375 \312\276\300\375 \312\276\300\375"; /* "示例 示例 示例" */
+ const char *result = mbsstr (input, "\375 "); /* invalid multibyte sequence */
+ ASSERT (result == NULL);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-mbsstr3.sh b/tests/gnu/test-mbsstr3.sh
new file mode 100755
index 00000000..732c01fd
--- /dev/null
+++ b/tests/gnu/test-mbsstr3.sh
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN = none; then
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no chinese GB18030 locale is installed"
+ else
+ echo "Skipping test: no chinese GB18030 locale is supported"
+ fi
+ exit 77
+fi
+
+LC_ALL=$LOCALE_ZH_CN \
+./test-mbsstr3${EXEEXT}
diff --git a/tests/gnu/test-memchr.c b/tests/gnu/test-memchr.c
new file mode 100755
index 00000000..a8016140
--- /dev/null
+++ b/tests/gnu/test-memchr.c
@@ -0,0 +1,119 @@
+/*
+ * Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memchr, void *, (void const *, int, size_t));
+
+#include <stdlib.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+ to char * to make the tests easier to write. */
+#define MEMCHR (char *) memchr
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n);
+ ASSERT (input);
+
+ input[0] = 'a';
+ input[1] = 'b';
+ memset (input + 2, 'c', 1024);
+ memset (input + 1026, 'd', n - 1028);
+ input[n - 2] = 'e';
+ input[n - 1] = 'a';
+
+ /* Basic behavior tests. */
+ ASSERT (MEMCHR (input, 'a', n) == input);
+
+ ASSERT (MEMCHR (input, 'a', 0) == NULL);
+ ASSERT (MEMCHR (zerosize_ptr (), 'a', 0) == NULL);
+
+ ASSERT (MEMCHR (input, 'b', n) == input + 1);
+ ASSERT (MEMCHR (input, 'c', n) == input + 2);
+ ASSERT (MEMCHR (input, 'd', n) == input + 1026);
+
+ ASSERT (MEMCHR (input + 1, 'a', n - 1) == input + n - 1);
+ ASSERT (MEMCHR (input + 1, 'e', n - 1) == input + n - 2);
+
+ ASSERT (MEMCHR (input, 'f', n) == NULL);
+ ASSERT (MEMCHR (input, '\0', n) == NULL);
+
+ /* Check that a very long haystack is handled quickly if the byte is
+ found near the beginning. */
+ {
+ size_t repeat = 10000;
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (MEMCHR (input, 'c', n) == input + 2);
+ }
+ }
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = j;
+ for (j = 0; j < 256; j++)
+ {
+ ASSERT (MEMCHR (input + i, j, 256) == input + i + j);
+ }
+ }
+ }
+
+ /* Check that memchr() does not read past the first occurrence of the
+ byte being searched. See the Austin Group's clarification
+ <http://www.opengroup.org/austin/docs/austin_454.txt>. */
+ {
+ char *page_boundary = (char *) zerosize_ptr ();
+
+ if (page_boundary != NULL)
+ {
+ for (n = 1; n <= 500; n++)
+ {
+ char *mem = page_boundary - n;
+ memset (mem, 'X', n);
+ ASSERT (MEMCHR (mem, 'U', n) == NULL);
+
+ {
+ size_t i;
+
+ for (i = 0; i < n; i++)
+ {
+ mem[i] = 'U';
+ ASSERT (MEMCHR (mem, 'U', 4000) == mem + i);
+ mem[i] = 'X';
+ }
+ }
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/tests/gnu/test-memchr2.c b/tests/gnu/test-memchr2.c
new file mode 100755
index 00000000..bb81c0b4
--- /dev/null
+++ b/tests/gnu/test-memchr2.c
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 2008-2010 Free Software Foundation, Inc.
+ * Written by Eric Blake
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include "memchr2.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+ to char * to make the tests easier to write. */
+#define MEMCHR2 (char *) memchr2
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n);
+ ASSERT (input);
+
+ input[0] = 'a';
+ input[1] = 'b';
+ memset (input + 2, 'c', 1024);
+ memset (input + 1026, 'd', n - 1028);
+ input[n - 2] = 'e';
+ input[n - 1] = 'a';
+
+ /* Basic behavior tests. */
+ ASSERT (MEMCHR2 (input, 'a', 'b', n) == input);
+ ASSERT (MEMCHR2 (input, 'b', 'a', n) == input);
+
+ ASSERT (MEMCHR2 (input, 'a', 'b', 0) == NULL);
+ ASSERT (MEMCHR2 (zerosize_ptr (), 'a', 'b', 0) == NULL);
+
+ ASSERT (MEMCHR2 (input, 'b', 'd', n) == input + 1);
+ ASSERT (MEMCHR2 (input + 2, 'b', 'd', n - 2) == input + 1026);
+
+ ASSERT (MEMCHR2 (input, 'd', 'e', n) == input + 1026);
+ ASSERT (MEMCHR2 (input, 'e', 'd', n) == input + 1026);
+
+ ASSERT (MEMCHR2 (input + 1, 'a', 'e', n - 1) == input + n - 2);
+ ASSERT (MEMCHR2 (input + 1, 'e', 'a', n - 1) == input + n - 2);
+
+ ASSERT (MEMCHR2 (input, 'f', 'g', n) == NULL);
+ ASSERT (MEMCHR2 (input, 'f', '\0', n) == NULL);
+
+ ASSERT (MEMCHR2 (input, 'a', 'a', n) == input);
+ ASSERT (MEMCHR2 (input + 1, 'a', 'a', n - 1) == input + n - 1);
+ ASSERT (MEMCHR2 (input, 'f', 'f', n) == NULL);
+
+ /* Check that a very long haystack is handled quickly if one of the
+ two bytes is found near the beginning. */
+ {
+ size_t repeat = 10000;
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (MEMCHR2 (input, 'c', 'e', n) == input + 2);
+ ASSERT (MEMCHR2 (input, 'e', 'c', n) == input + 2);
+ ASSERT (MEMCHR2 (input, 'c', '\0', n) == input + 2);
+ ASSERT (MEMCHR2 (input, '\0', 'c', n) == input + 2);
+ }
+ }
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = j;
+ for (j = 0; j < 256; j++)
+ {
+ ASSERT (MEMCHR2 (input + i, j, 0xff, 256) == input + i + j);
+ ASSERT (MEMCHR2 (input + i, 0xff, j, 256) == input + i + j);
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/tests/gnu/test-memmem.c b/tests/gnu/test-memmem.c
new file mode 100755
index 00000000..a9d3558c
--- /dev/null
+++ b/tests/gnu/test-memmem.c
@@ -0,0 +1,187 @@
+/*
+ * Copyright (C) 2004, 2007-2010 Free Software Foundation, Inc.
+ * Written by Bruno Haible and Eric Blake
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (memmem, void *, (void const *, size_t, void const *, size_t));
+
+#include <signal.h>
+#include <stdlib.h>
+#include <unistd.h>
+
+#include "zerosize-ptr.h"
+#include "macros.h"
+
+static void *
+null_ptr (void)
+{
+ return NULL;
+}
+
+int
+main (int argc, char *argv[])
+{
+#if HAVE_DECL_ALARM
+ /* Declare failure if test takes too long, by using default abort
+ caused by SIGALRM. All known platforms that lack alarm also lack
+ memmem, and the replacement memmem is known to not take too
+ long. */
+ signal (SIGALRM, SIG_DFL);
+ alarm (100);
+#endif
+
+ {
+ const char input[] = "foo";
+ const char *result = memmem (input, strlen (input), "", 0);
+ ASSERT (result == input);
+ }
+
+ {
+ const char input[] = "foo";
+ const char *result = memmem (input, strlen (input), "o", 1);
+ ASSERT (result == input + 1);
+ }
+
+ {
+ const char input[] = "ABC ABCDAB ABCDABCDABDE";
+ const char *result = memmem (input, strlen (input), "ABCDABD", 7);
+ ASSERT (result == input + 15);
+ }
+
+ {
+ const char input[] = "ABC ABCDAB ABCDABCDABDE";
+ const char *result = memmem (input, strlen (input), "ABCDABE", 7);
+ ASSERT (result == NULL);
+ }
+
+ {
+ const char input[] = "ABC ABCDAB ABCDABCDABDE";
+ const char *result = memmem (input, strlen (input), "ABCDABCD", 8);
+ ASSERT (result == input + 11);
+ }
+
+ /* Check that length 0 does not dereference the pointer. */
+ {
+ const char *result = memmem (zerosize_ptr (), 0, "foo", 3);
+ ASSERT (result == NULL);
+ }
+
+ {
+ const char input[] = "foo";
+ const char *result = memmem (input, strlen (input), null_ptr (), 0);
+ ASSERT (result == input);
+ }
+
+ /* Check that a very long haystack is handled quickly if the needle is
+ short and occurs near the beginning. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *needle =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA";
+ size_t n = strlen (needle);
+ char *haystack = (char *) malloc (m + 1);
+ if (haystack != NULL)
+ {
+ memset (haystack, 'A', m);
+ haystack[0] = 'B';
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (memmem (haystack, m, needle, n) == haystack + 1);
+ }
+
+ free (haystack);
+ }
+ }
+
+ /* Check that a very long needle is discarded quickly if the haystack is
+ short. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ char *haystack =
+ "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"
+ "ABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABABAB";
+ size_t n = strlen (haystack);
+ char *needle = (char *) malloc (m + 1);
+ if (needle != NULL)
+ {
+ memset (needle, 'A', m);
+
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (memmem (haystack, n, needle, m) == NULL);
+ }
+
+ free (needle);
+ }
+ }
+
+ /* Check that the asymptotic worst-case complexity is not quadratic. */
+ {
+ size_t m = 1000000;
+ char *haystack = (char *) malloc (2 * m + 1);
+ char *needle = (char *) malloc (m + 1);
+ if (haystack != NULL && needle != NULL)
+ {
+ const char *result;
+
+ memset (haystack, 'A', 2 * m);
+ haystack[2 * m] = 'B';
+
+ memset (needle, 'A', m);
+ needle[m] = 'B';
+
+ result = memmem (haystack, 2 * m + 1, needle, m + 1);
+ ASSERT (result == haystack + m);
+ }
+ free (needle);
+ free (haystack);
+ }
+
+ /* Check that long needles not present in a haystack can be handled
+ with sublinear speed. */
+ {
+ size_t repeat = 10000;
+ size_t m = 1000000;
+ size_t n = 1000;
+ char *haystack = (char *) malloc (m);
+ char *needle = (char *) malloc (n);
+ if (haystack != NULL && needle != NULL)
+ {
+ const char *result;
+
+ memset (haystack, 'A', m);
+ memset (needle, 'B', n);
+
+ for (; repeat > 0; repeat--)
+ {
+ result = memmem (haystack, m, needle, n);
+ ASSERT (result == NULL);
+ }
+ }
+ free (haystack);
+ free (needle);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-nl_langinfo.c b/tests/gnu/test-nl_langinfo.c
new file mode 100755
index 00000000..ec89b3f7
--- /dev/null
+++ b/tests/gnu/test-nl_langinfo.c
@@ -0,0 +1,115 @@
+/* Test of nl_langinfo replacement.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2009. */
+
+#include <config.h>
+
+#include <langinfo.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (nl_langinfo, char *, (nl_item));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "c-strcase.h"
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ int pass = atoi (argv[1]);
+ /* pass locale
+ 0 C
+ 1 traditional French locale
+ 2 French UTF-8 locale
+ */
+
+ setlocale (LC_ALL, "");
+
+ /* nl_langinfo items of the LC_CTYPE category */
+ ASSERT (strlen (nl_langinfo (CODESET)) > 0);
+ if (pass == 2)
+ {
+ const char *codeset = nl_langinfo (CODESET);
+ ASSERT (c_strcasecmp (codeset, "UTF-8") == 0 || c_strcasecmp (codeset, "UTF8") == 0);
+ }
+ /* nl_langinfo items of the LC_NUMERIC category */
+ ASSERT (strlen (nl_langinfo (RADIXCHAR)) > 0);
+ ASSERT (strlen (nl_langinfo (THOUSEP)) >= 0);
+ /* nl_langinfo items of the LC_TIME category */
+ ASSERT (strlen (nl_langinfo (D_T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (D_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT)) > 0);
+ ASSERT (strlen (nl_langinfo (T_FMT_AMPM)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (AM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (PM_STR)) >= (pass == 0 ? 1 : 0));
+ ASSERT (strlen (nl_langinfo (DAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (DAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABDAY_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (MON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_1)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_2)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_3)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_4)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_5)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_6)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_7)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_8)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_9)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_10)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_11)) > 0);
+ ASSERT (strlen (nl_langinfo (ABMON_12)) > 0);
+ ASSERT (strlen (nl_langinfo (ERA)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_D_T_FMT)) >= 0);
+ ASSERT (strlen (nl_langinfo (ERA_T_FMT)) >= 0);
+ ASSERT (nl_langinfo (ALT_DIGITS) != NULL);
+ /* nl_langinfo items of the LC_MONETARY category */
+ {
+ const char *currency = nl_langinfo (CRNCYSTR);
+ ASSERT (strlen (currency) >= (pass > 0 ? 1 : 0));
+ }
+ /* nl_langinfo items of the LC_MESSAGES category */
+ ASSERT (strlen (nl_langinfo (YESEXPR)) > 0);
+ ASSERT (strlen (nl_langinfo (NOEXPR)) > 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-nl_langinfo.sh b/tests/gnu/test-nl_langinfo.sh
new file mode 100755
index 00000000..3168f426
--- /dev/null
+++ b/tests/gnu/test-nl_langinfo.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+LC_ALL=C ./test-nl_langinfo${EXEEXT} 0 || exit 1
+
+# Test whether a specific traditional locale is installed.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR ./test-nl_langinfo${EXEEXT} 1 || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 ./test-nl_langinfo${EXEEXT} 2 || exit 1
+fi
+
+exit 0
diff --git a/tests/gnu/test-obstack-printf.c b/tests/gnu/test-obstack-printf.c
new file mode 100755
index 00000000..6d2aceca
--- /dev/null
+++ b/tests/gnu/test-obstack-printf.c
@@ -0,0 +1,138 @@
+/* Test of obstack_printf() and obstack_vprintf() functions.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (obstack_printf, int, (struct obstack *, char const *, ...));
+SIGNATURE_CHECK (obstack_vprintf, int, (struct obstack *, char const *,
+ va_list));
+
+#include "obstack.h"
+#include "xalloc.h"
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+#define obstack_chunk_alloc xmalloc
+#define obstack_chunk_free free
+
+static void
+test_function (int (*my_obstack_printf) (struct obstack *, const char *, ...))
+{
+ struct obstack obs;
+ obstack_init (&obs);
+ /* In general, be careful that arguments to obstack_* don't have
+ side effects, as not all compilers evaluate macro arguments only
+ once. */
+
+ /* Grow the obstack to near its boundary, then check that short
+ output longer than the obstack free space grows the obstack. */
+ {
+ char *base = obstack_base (&obs);
+ char *new_base;
+ int result;
+ int room = obstack_room (&obs) - 4;
+
+ obstack_blank_fast (&obs, room);
+ result = my_obstack_printf (&obs, "%d %s", 123, "456");
+ ASSERT (result == 7);
+ ASSERT (result + room == obstack_object_size (&obs));
+ obstack_1grow (&obs, 0);
+ new_base = obstack_finish (&obs);
+ ASSERT (base != new_base);
+ ASSERT (strcmp (new_base + room, "123 456") == 0);
+ }
+
+ /* Check that strings shorter than the obstack free space don't
+ cause a reshuffling of the obstack. */
+ {
+ char *base = obstack_base (&obs);
+ char *new_base;
+ int result;
+ int room = obstack_room (&obs);
+
+ ASSERT (8 < room);
+ result = my_obstack_printf (&obs, "%d %s", 123, "456");
+ ASSERT (result == 7);
+ ASSERT (result == obstack_object_size (&obs));
+ new_base = obstack_base (&obs);
+ ASSERT (base == new_base);
+ ASSERT (strncmp (base, "123 456", result) == 0);
+ obstack_finish (&obs);
+ }
+
+ /* Check for generating much more output than a chunk size. */
+ {
+ char *base = obstack_base (&obs);
+ char *new_base;
+ int result;
+ int i;
+
+ ASSERT (obstack_chunk_size (&obs) < 10000);
+ result = my_obstack_printf (&obs, "%010000d", 0);
+ ASSERT (result == 10000);
+ ASSERT (result == obstack_object_size (&obs));
+ new_base = obstack_base (&obs);
+ ASSERT (base != new_base);
+ for (i = 0; i < 10000; i++)
+ ASSERT (new_base[i] == '0');
+ }
+
+ obstack_free (&obs, NULL);
+}
+
+static int
+my_obstack_printf (struct obstack *obs, const char *format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start (args, format);
+ ret = obstack_vprintf (obs, format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_obstack_vprintf ()
+{
+ test_function (my_obstack_printf);
+}
+
+static void
+test_obstack_printf ()
+{
+ test_function (obstack_printf);
+}
+
+int
+main (int argc, char *argv[])
+{
+ set_program_name (argv[0]);
+
+ test_obstack_vprintf ();
+ test_obstack_printf ();
+ return 0;
+}
diff --git a/tests/gnu/test-open.c b/tests/gnu/test-open.c
new file mode 100755
index 00000000..ae9b3aca
--- /dev/null
+++ b/tests/gnu/test-open.c
@@ -0,0 +1,41 @@
+/* Test of opening a file descriptor.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <fcntl.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (open, int, (char const *, int, ...));
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+#define BASE "test-open.t"
+
+#include "test-open.h"
+
+int
+main (void)
+{
+ return test_open (open, true);
+}
diff --git a/tests/gnu/test-open.h b/tests/gnu/test-open.h
new file mode 100755
index 00000000..6341a635
--- /dev/null
+++ b/tests/gnu/test-open.h
@@ -0,0 +1,87 @@
+/* Test of opening a file descriptor.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+/* This file is designed to test both open(n,buf[,mode]) and
+ openat(AT_FDCWD,n,buf[,mode]). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping symlink tests with status 77. */
+
+static int
+test_open (int (*func) (char const *, int, ...), bool print)
+{
+ int fd;
+ /* Remove anything from prior partial run. */
+ unlink (BASE "file");
+
+ /* Cannot create directory. */
+ errno = 0;
+ ASSERT (func ("nonexist.ent/", O_CREAT | O_RDONLY, 0600) == -1);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == ENOENT
+ || errno == EINVAL);
+
+ /* Create a regular file. */
+ fd = func (BASE "file", O_CREAT | O_RDONLY, 0600);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
+ /* Trailing slash handling. */
+ errno = 0;
+ ASSERT (func (BASE "file/", O_RDONLY) == -1);
+ ASSERT (errno == ENOTDIR || errno == EISDIR || errno == EINVAL);
+
+ /* Directories cannot be opened for writing. */
+ errno = 0;
+ ASSERT (func (".", O_WRONLY) == -1);
+ ASSERT (errno == EISDIR || errno == EACCES);
+
+ /* /dev/null must exist, and be writable. */
+ fd = func ("/dev/null", O_RDONLY);
+ ASSERT (0 <= fd);
+ {
+ char c;
+ ASSERT (read (fd, &c, 1) == 0);
+ }
+ ASSERT (close (fd) == 0);
+ fd = func ("/dev/null", O_WRONLY);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "c", 1) == 1);
+ ASSERT (close (fd) == 0);
+
+ /* Symlink handling, where supported. */
+ if (symlink (BASE "file", BASE "link") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ errno = 0;
+ ASSERT (func (BASE "link/", O_RDONLY) == -1);
+ ASSERT (errno == ENOTDIR);
+ fd = func (BASE "link", O_RDONLY);
+ ASSERT (0 <= fd);
+ ASSERT (close (fd) == 0);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-pipe.c b/tests/gnu/test-pipe.c
new file mode 100755
index 00000000..2dcab58b
--- /dev/null
+++ b/tests/gnu/test-pipe.c
@@ -0,0 +1,204 @@
+/* Test of create_pipe_bidi/wait_subprocess.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include "pipe.h"
+#include "wait-process.h"
+
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+/* Depending on arguments, this test intentionally closes stderr or
+ starts life with stderr closed. So, we arrange to have fd 10
+ (outside the range of interesting fd's during the test) set up to
+ duplicate the original stderr. */
+
+#define BACKUP_STDERR_FILENO 10
+#define ASSERT_STREAM myerr
+#include "macros.h"
+
+static FILE *myerr;
+
+/* Code executed by the child process. argv[1] = "child". */
+static int
+child_main (int argc, char *argv[])
+{
+ char buffer[2] = { 's', 't' };
+ int fd;
+ int ret;
+
+ ASSERT (argc == 3);
+
+ /* Read one byte from fd 0, and write its value plus one to fd 1.
+ fd 2 should be closed iff the argument is 1. Check that no other file
+ descriptors leaked. */
+
+ ASSERT (read (STDIN_FILENO, buffer, 2) == 1);
+
+ buffer[0]++;
+ ASSERT (write (STDOUT_FILENO, buffer, 1) == 1);
+
+ errno = 0;
+ ret = dup2 (STDERR_FILENO, STDERR_FILENO);
+ switch (atoi (argv[2]))
+ {
+ case 0:
+ /* Expect fd 2 is open. */
+ ASSERT (ret == STDERR_FILENO);
+ break;
+ case 1:
+ /* Expect fd 2 is closed. */
+ ASSERT (ret == -1);
+ ASSERT (errno == EBADF);
+ break;
+ default:
+ ASSERT (false);
+ }
+
+ for (fd = 3; fd < 7; fd++)
+ {
+ errno = 0;
+ ASSERT (close (fd) == -1);
+ ASSERT (errno == EBADF);
+ }
+
+ return 0;
+}
+
+/* Create a bi-directional pipe to a test child, and validate that the
+ child program returns the expected output. The child is the same
+ program as the parent ARGV0, but with different arguments.
+ STDERR_CLOSED is true if we have already closed fd 2. */
+static void
+test_pipe (const char *argv0, bool stderr_closed)
+{
+ int fd[2];
+ char *argv[4];
+ pid_t pid;
+ char buffer[2] = { 'a', 't' };
+
+ /* Set up child. */
+ argv[0] = (char *) argv0;
+ argv[1] = (char *) "child";
+ argv[2] = (char *) (stderr_closed ? "1" : "0");
+ argv[3] = NULL;
+ pid = create_pipe_bidi (argv0, argv0, argv, false, true, true, fd);
+ ASSERT (0 <= pid);
+ ASSERT (STDERR_FILENO < fd[0]);
+ ASSERT (STDERR_FILENO < fd[1]);
+
+ /* Push child's input. */
+ ASSERT (write (fd[1], buffer, 1) == 1);
+ ASSERT (close (fd[1]) == 0);
+
+ /* Get child's output. */
+ ASSERT (read (fd[0], buffer, 2) == 1);
+
+ /* Wait for child. */
+ ASSERT (wait_subprocess (pid, argv0, true, false, true, true, NULL) == 0);
+ ASSERT (close (fd[0]) == 0);
+
+ /* Check the result. */
+ ASSERT (buffer[0] == 'b');
+ ASSERT (buffer[1] == 't');
+}
+
+/* Code executed by the parent process. */
+static int
+parent_main (int argc, char *argv[])
+{
+ int test;
+ int fd;
+
+ ASSERT (argc == 2);
+
+ /* Selectively close various standard fds, to verify the child process is
+ not impacted by this. */
+ test = atoi (argv[1]);
+ switch (test)
+ {
+ case 0:
+ break;
+ case 1:
+ close (0);
+ break;
+ case 2:
+ close (1);
+ break;
+ case 3:
+ close (0);
+ close (1);
+ break;
+ case 4:
+ close (2);
+ break;
+ case 5:
+ close (0);
+ close (2);
+ break;
+ case 6:
+ close (1);
+ close (2);
+ break;
+ case 7:
+ close (0);
+ close (1);
+ close (2);
+ break;
+ default:
+ ASSERT (false);
+ }
+
+ /* Plug any file descriptor leaks inherited from outside world before
+ starting, so that child has a clean slate (at least for the fds that we
+ might be manipulating). */
+ for (fd = 3; fd < 7; fd++)
+ close (fd);
+
+ test_pipe (argv[0], test >= 4);
+
+ return 0;
+}
+
+int
+main (int argc, char *argv[])
+{
+ if (argc < 2)
+ {
+ fprintf (stderr, "%s: need arguments\n", argv[0]);
+ return 2;
+ }
+ if (strcmp (argv[1], "child") == 0)
+ {
+ /* fd 2 might be closed, but fd BACKUP_STDERR_FILENO is the original
+ stderr. */
+ myerr = fdopen (BACKUP_STDERR_FILENO, "w");
+ if (!myerr)
+ return 2;
+ return child_main (argc, argv);
+ }
+ /* We might close fd 2 later, so save it in fd 10. */
+ if (dup2 (STDERR_FILENO, BACKUP_STDERR_FILENO) != BACKUP_STDERR_FILENO
+ || (myerr = fdopen (BACKUP_STDERR_FILENO, "w")) == NULL)
+ return 2;
+ return parent_main (argc, argv);
+}
diff --git a/tests/gnu/test-pipe.sh b/tests/gnu/test-pipe.sh
new file mode 100755
index 00000000..323c90fb
--- /dev/null
+++ b/tests/gnu/test-pipe.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+st=0
+for i in 0 1 2 3 4 5 6 7 ; do
+ ./test-pipe${EXEEXT} $i \
+ || { echo test-pipe.sh: iteration $i failed >&2; st=1; }
+done
+exit $st
diff --git a/tests/gnu/test-pipe2.c b/tests/gnu/test-pipe2.c
new file mode 100755
index 00000000..bd6df7ce
--- /dev/null
+++ b/tests/gnu/test-pipe2.c
@@ -0,0 +1,145 @@
+/* Test of pipe2.
+ Copyright (C) 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 General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (pipe2, int, (int[2], int));
+
+#include <fcntl.h>
+#include <stdbool.h>
+
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+/* Get declarations of the Win32 API functions. */
+# define WIN32_LEAN_AND_MEAN
+# include <windows.h>
+#endif
+
+#include "binary-io.h"
+#include "macros.h"
+
+/* Return true if FD is open. */
+static bool
+is_open (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* On Win32, the initial state of unassigned standard file
+ descriptors is that they are open but point to an
+ INVALID_HANDLE_VALUE, and there is no fcntl. */
+ return (HANDLE) _get_osfhandle (fd) != INVALID_HANDLE_VALUE;
+#else
+# ifndef F_GETFL
+# error Please port fcntl to your platform
+# endif
+ return 0 <= fcntl (fd, F_GETFL);
+#endif
+}
+
+/* Return true if FD is not inherited to child processes. */
+static bool
+is_cloexec (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ HANDLE h = (HANDLE) _get_osfhandle (fd);
+ DWORD flags;
+ ASSERT (GetHandleInformation (h, &flags));
+ return (flags & HANDLE_FLAG_INHERIT) == 0;
+#else
+ int flags;
+ ASSERT ((flags = fcntl (fd, F_GETFD)) >= 0);
+ return (flags & FD_CLOEXEC) != 0;
+#endif
+}
+
+/* Return true if FD is in non-blocking mode. */
+static bool
+is_nonblocking (int fd)
+{
+#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
+ /* We don't use the non-blocking mode for sockets here. */
+ return 0;
+#else
+ int flags;
+ ASSERT ((flags = fcntl (fd, F_GETFL)) >= 0);
+ return (flags & O_NONBLOCK) != 0;
+#endif
+}
+
+int
+main ()
+{
+ int use_nonblocking;
+ int use_cloexec;
+
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ for (use_nonblocking = 0; use_nonblocking <= 1; use_nonblocking++)
+#else
+ use_nonblocking = 0;
+#endif
+#if defined O_CLOEXEC
+ for (use_cloexec = 0; use_cloexec <= 1; use_cloexec++)
+#else
+ use_cloexec = 0;
+#endif
+ {
+ int o_flags;
+ int fd[2];
+
+ o_flags = 0;
+#if !((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)
+ if (use_nonblocking)
+ o_flags |= O_NONBLOCK;
+#endif
+#if defined O_CLOEXEC
+ if (use_cloexec)
+ o_flags |= O_CLOEXEC;
+#endif
+
+ fd[0] = -1;
+ fd[1] = -1;
+ ASSERT (pipe2 (fd, o_flags) >= 0);
+ ASSERT (fd[0] >= 0);
+ ASSERT (fd[1] >= 0);
+ ASSERT (fd[0] != fd[1]);
+ ASSERT (is_open (fd[0]) >= 0);
+ ASSERT (is_open (fd[1]) >= 0);
+ if (use_cloexec)
+ {
+ ASSERT (is_cloexec (fd[0]));
+ ASSERT (is_cloexec (fd[1]));
+ }
+ else
+ {
+ ASSERT (!is_cloexec (fd[0]));
+ ASSERT (!is_cloexec (fd[1]));
+ }
+ if (use_nonblocking)
+ {
+ ASSERT (is_nonblocking (fd[0]));
+ ASSERT (is_nonblocking (fd[1]));
+ }
+ else
+ {
+ ASSERT (!is_nonblocking (fd[0]));
+ ASSERT (!is_nonblocking (fd[1]));
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-posix_spawn1.c b/tests/gnu/test-posix_spawn1.c
new file mode 100755
index 00000000..659d76a1
--- /dev/null
+++ b/tests/gnu/test-posix_spawn1.c
@@ -0,0 +1,166 @@
+/* Test of posix_spawn() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (posix_spawnp, int, (pid_t *, char const *,
+ posix_spawn_file_actions_t const *,
+ posix_spawnattr_t const *,
+ char *const[], char *const[]));
+SIGNATURE_CHECK (posix_spawnattr_init, int, (posix_spawnattr_t *));
+SIGNATURE_CHECK (posix_spawnattr_destroy, int, (posix_spawnattr_t *));
+SIGNATURE_CHECK (posix_spawnattr_setsigmask, int, (posix_spawnattr_t *,
+ sigset_t const *));
+SIGNATURE_CHECK (posix_spawnattr_setflags, int, (posix_spawnattr_t *, short));
+SIGNATURE_CHECK (posix_spawn_file_actions_init, int,
+ (posix_spawn_file_actions_t *));
+SIGNATURE_CHECK (posix_spawn_file_actions_destroy, int,
+ (posix_spawn_file_actions_t *));
+SIGNATURE_CHECK (posix_spawn_file_actions_addclose, int,
+ (posix_spawn_file_actions_t *, int));
+SIGNATURE_CHECK (posix_spawn_file_actions_addopen, int,
+ (posix_spawn_file_actions_t *, int, char const *, int,
+ mode_t));
+SIGNATURE_CHECK (posix_spawn_file_actions_adddup2, int,
+ (posix_spawn_file_actions_t *, int, int));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#define CHILD_PROGRAM_FILENAME "test-posix_spawn1.sh"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ int ifd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int fd;
+ FILE *fp;
+ char line[80];
+ int status;
+ int exitstatus;
+
+ if (pipe (ifd) < 0 || (ifd[0] = fd_safer (ifd[0])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ifd[1], STDOUT_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ifd[1])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ifd[0])) != 0
+ || (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, "/dev/null", O_RDONLY, 0)) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, "/bin/sh", &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ifd[1]);
+ fd = ifd[0];
+ fp = fdopen (fd, "r");
+ if (fp == NULL)
+ {
+ fprintf (stderr, "fdopen() failed\n");
+ exit (1);
+ }
+ if (fread (line, 1, 80, fp) < 12)
+ {
+ fprintf (stderr, "could not read expected output\n");
+ exit (1);
+ }
+ if (memcmp (line, "Halle Potta", 11) != 0)
+ {
+ fprintf (stderr, "read output is not the expected output");
+ exit (1);
+ }
+ fclose (fp);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
diff --git a/tests/gnu/test-posix_spawn1.in.sh b/tests/gnu/test-posix_spawn1.in.sh
new file mode 100755
index 00000000..b370856d
--- /dev/null
+++ b/tests/gnu/test-posix_spawn1.in.sh
@@ -0,0 +1,2 @@
+#!/bin/sh
+echo "Halle Potta"
diff --git a/tests/gnu/test-posix_spawn2.c b/tests/gnu/test-posix_spawn2.c
new file mode 100755
index 00000000..d76c25c4
--- /dev/null
+++ b/tests/gnu/test-posix_spawn2.c
@@ -0,0 +1,139 @@
+/* Test of posix_spawn() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+#include <errno.h>
+#include <fcntl.h>
+#include <signal.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/wait.h>
+
+extern char **environ;
+
+#define CHILD_PROGRAM_FILENAME "test-posix_spawn2.sh"
+
+static int
+fd_safer (int fd)
+{
+ if (0 <= fd && fd <= 2)
+ {
+ int f = fd_safer (dup (fd));
+ int e = errno;
+ close (fd);
+ errno = e;
+ fd = f;
+ }
+
+ return fd;
+}
+
+int
+main ()
+{
+ char *argv[3] = { "/bin/sh", CHILD_PROGRAM_FILENAME, NULL };
+ int ofd[2];
+ sigset_t blocked_signals;
+ sigset_t fatal_signal_set;
+ posix_spawn_file_actions_t actions;
+ bool actions_allocated;
+ posix_spawnattr_t attrs;
+ bool attrs_allocated;
+ int err;
+ pid_t child;
+ int fd;
+ FILE *fp;
+ int written;
+ int status;
+ int exitstatus;
+
+ if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0)
+ {
+ perror ("cannot create pipe");
+ exit (1);
+ }
+ sigprocmask (SIG_SETMASK, NULL, &blocked_signals);
+ sigemptyset (&fatal_signal_set);
+ sigaddset (&fatal_signal_set, SIGINT);
+ sigaddset (&fatal_signal_set, SIGTERM);
+ sigaddset (&fatal_signal_set, SIGHUP);
+ sigaddset (&fatal_signal_set, SIGPIPE);
+ sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL);
+ actions_allocated = false;
+ attrs_allocated = false;
+ if ((err = posix_spawn_file_actions_init (&actions)) != 0
+ || (actions_allocated = true,
+ (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0
+ || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0
+ || (err = posix_spawnattr_init (&attrs)) != 0
+ || (attrs_allocated = true,
+ (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0
+ || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0)
+ || (err = posix_spawnp (&child, "/bin/sh", &actions, &attrs, argv, environ)) != 0))
+ {
+ if (actions_allocated)
+ posix_spawn_file_actions_destroy (&actions);
+ if (attrs_allocated)
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ errno = err;
+ perror ("subprocess failed");
+ exit (1);
+ }
+ posix_spawn_file_actions_destroy (&actions);
+ posix_spawnattr_destroy (&attrs);
+ sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL);
+ close (ofd[0]);
+ fd = ofd[1];
+ fp = fdopen (fd, "w");
+ if (fp == NULL)
+ {
+ fprintf (stderr, "fdopen() failed\n");
+ exit (1);
+ }
+ written = fwrite ("Halle Potta\n", 1, 12, fp);
+ if (written < 12)
+ {
+ fprintf (stderr, "could not write input\n");
+ exit (1);
+ }
+ fclose (fp);
+ status = 0;
+ while (waitpid (child, &status, 0) != child)
+ ;
+ if (!WIFEXITED (status))
+ {
+ fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status);
+ exit (1);
+ }
+ exitstatus = WEXITSTATUS (status);
+ if (exitstatus != 0)
+ {
+ fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus);
+ exit (1);
+ }
+ return 0;
+}
diff --git a/tests/gnu/test-posix_spawn2.in.sh b/tests/gnu/test-posix_spawn2.in.sh
new file mode 100755
index 00000000..29a9b28f
--- /dev/null
+++ b/tests/gnu/test-posix_spawn2.in.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+read line
+test "$line" = "Halle Potta"
diff --git a/tests/gnu/test-printf-frexp.c b/tests/gnu/test-printf-frexp.c
new file mode 100755
index 00000000..13e1c30e
--- /dev/null
+++ b/tests/gnu/test-printf-frexp.c
@@ -0,0 +1,119 @@
+/* Test of splitting a double into fraction and mantissa.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "printf-frexp.h"
+
+#include <float.h>
+
+#include "macros.h"
+
+static double
+my_ldexp (double x, int d)
+{
+ for (; d > 0; d--)
+ x *= 2.0;
+ for (; d < 0; d++)
+ x *= 0.5;
+ return x;
+}
+
+int
+main ()
+{
+ int i;
+ /* The use of 'volatile' guarantees that excess precision bits are dropped
+ when dealing with denormalized numbers. It is necessary on x86 systems
+ where double-floats are not IEEE compliant by default, to avoid that the
+ results become platform and compiler option dependent. 'volatile' is a
+ portable alternative to gcc's -ffloat-store option. */
+ volatile double x;
+
+ for (i = 1, x = 1.0; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.0);
+ }
+ for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.0);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == DBL_MIN_EXP - 1);
+ ASSERT (mantissa == my_ldexp (1.0, i - DBL_MIN_EXP));
+ }
+
+ for (i = 1, x = 1.01; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.01);
+ }
+ for (i = 1, x = 1.01; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.01);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == DBL_MIN_EXP - 1);
+ ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP));
+ ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = 1.73205; i <= DBL_MAX_EXP; i++, x *= 2.0)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.73205);
+ }
+ for (i = 1, x = 1.73205; i >= DBL_MIN_EXP; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.73205);
+ }
+ for (; i >= DBL_MIN_EXP - 100 && x > 0.0; i--, x *= 0.5)
+ {
+ int exp = -9999;
+ double mantissa = printf_frexp (x, &exp);
+ ASSERT (exp == DBL_MIN_EXP - 1);
+ ASSERT (mantissa >= my_ldexp (1.0, i - DBL_MIN_EXP));
+ ASSERT (mantissa <= my_ldexp (2.0, i - DBL_MIN_EXP));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-printf-frexpl.c b/tests/gnu/test-printf-frexpl.c
new file mode 100755
index 00000000..6f7e4f7e
--- /dev/null
+++ b/tests/gnu/test-printf-frexpl.c
@@ -0,0 +1,134 @@
+/* Test of splitting a 'long double' into fraction and mantissa.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "printf-frexpl.h"
+
+#include <float.h>
+
+#include "fpucw.h"
+#include "macros.h"
+
+/* On MIPS IRIX machines, LDBL_MIN_EXP is -1021, but the smallest reliable
+ exponent for 'long double' is -964. Similarly, on PowerPC machines,
+ LDBL_MIN_EXP is -1021, but the smallest reliable exponent for 'long double'
+ is -968. For exponents below that, the precision may be truncated to the
+ precision used for 'double'. */
+#ifdef __sgi
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 57)
+# define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
+#elif defined __ppc || defined __ppc__ || defined __powerpc || defined __powerpc__
+# define MIN_NORMAL_EXP (LDBL_MIN_EXP + 53)
+# define MIN_SUBNORMAL_EXP MIN_NORMAL_EXP
+#else
+# define MIN_NORMAL_EXP LDBL_MIN_EXP
+# define MIN_SUBNORMAL_EXP (LDBL_MIN_EXP - 100)
+#endif
+
+static long double
+my_ldexp (long double x, int d)
+{
+ for (; d > 0; d--)
+ x *= 2.0L;
+ for (; d < 0; d++)
+ x *= 0.5L;
+ return x;
+}
+
+int
+main ()
+{
+ int i;
+ long double x;
+ DECL_LONG_DOUBLE_ROUNDING
+
+ BEGIN_LONG_DOUBLE_ROUNDING ();
+
+ for (i = 1, x = 1.0L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.0L);
+ }
+ for (i = 1, x = 1.0L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.0L);
+ }
+ for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == LDBL_MIN_EXP - 1);
+ ASSERT (mantissa == my_ldexp (1.0L, i - LDBL_MIN_EXP));
+ }
+
+ for (i = 1, x = 1.01L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.01L);
+ }
+ for (i = 1, x = 1.01L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.01L);
+ }
+ for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == LDBL_MIN_EXP - 1);
+ ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP));
+ ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ for (i = 1, x = 1.73205L; i <= LDBL_MAX_EXP; i++, x *= 2.0L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.73205L);
+ }
+ for (i = 1, x = 1.73205L; i >= MIN_NORMAL_EXP; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == i - 1);
+ ASSERT (mantissa == 1.73205L);
+ }
+ for (; i >= MIN_SUBNORMAL_EXP && x > 0.0L; i--, x *= 0.5L)
+ {
+ int exp = -9999;
+ long double mantissa = printf_frexpl (x, &exp);
+ ASSERT (exp == LDBL_MIN_EXP - 1);
+ ASSERT (mantissa >= my_ldexp (1.0L, i - LDBL_MIN_EXP));
+ ASSERT (mantissa <= my_ldexp (2.0L, i - LDBL_MIN_EXP));
+ ASSERT (mantissa == my_ldexp (x, - exp));
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-printf-posix.h b/tests/gnu/test-printf-posix.h
new file mode 100755
index 00000000..32e6468f
--- /dev/null
+++ b/tests/gnu/test-printf-posix.h
@@ -0,0 +1,153 @@
+/* Test of POSIX compatible vsprintf() and sprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+static void
+test_function (int (*my_printf) (const char *, ...))
+{
+ /* Here we don't test output that may be platform dependent.
+ The bulk of the tests is done as part of the 'vasnprintf-posix' module. */
+
+ /* Test support of size specifiers as in C99. */
+
+ my_printf ("%ju %d\n", (uintmax_t) 12345671, 33, 44, 55);
+
+ my_printf ("%zu %d\n", (size_t) 12345672, 33, 44, 55);
+
+ my_printf ("%tu %d\n", (ptrdiff_t) 12345673, 33, 44, 55);
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ /* Positive zero. */
+ my_printf ("%a %d\n", 0.0, 33, 44, 55);
+
+ /* Positive infinity. */
+ my_printf ("%a %d\n", 1.0 / 0.0, 33, 44, 55);
+
+ /* Negative infinity. */
+ my_printf ("%a %d\n", -1.0 / 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO with infinite number. */
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ my_printf ("%010a %d\n", 1.0 / 0.0, 33, 44, 55);
+
+ /* Test the support of the %f format directive. */
+
+ /* A positive number. */
+ my_printf ("%f %d\n", 12.75, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_printf ("%f %d\n", 1234567.0, 33, 44, 55);
+
+ /* A negative number. */
+ my_printf ("%f %d\n", -0.03125, 33, 44, 55);
+
+ /* Positive zero. */
+ my_printf ("%f %d\n", 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_printf ("%015f %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision. */
+ my_printf ("%.f %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_printf ("%.2f %d\n", 999.95, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_printf ("%.2f %d\n", 999.996, 33, 44, 55);
+
+ /* A positive number. */
+ my_printf ("%Lf %d\n", 12.75L, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_printf ("%Lf %d\n", 1234567.0L, 33, 44, 55);
+
+ /* A negative number. */
+ my_printf ("%Lf %d\n", -0.03125L, 33, 44, 55);
+
+ /* Positive zero. */
+ my_printf ("%Lf %d\n", 0.0L, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_printf ("%015Lf %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision. */
+ my_printf ("%.Lf %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_printf ("%.2Lf %d\n", 999.95L, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_printf ("%.2Lf %d\n", 999.996L, 33, 44, 55);
+
+ /* Test the support of the %F format directive. */
+
+ /* A positive number. */
+ my_printf ("%F %d\n", 12.75, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_printf ("%F %d\n", 1234567.0, 33, 44, 55);
+
+ /* A negative number. */
+ my_printf ("%F %d\n", -0.03125, 33, 44, 55);
+
+ /* Positive zero. */
+ my_printf ("%F %d\n", 0.0, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_printf ("%015F %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision. */
+ my_printf ("%.F %d\n", 1234.0, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_printf ("%.2F %d\n", 999.95, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_printf ("%.2F %d\n", 999.996, 33, 44, 55);
+
+ /* A positive number. */
+ my_printf ("%LF %d\n", 12.75L, 33, 44, 55);
+
+ /* A larger positive number. */
+ my_printf ("%LF %d\n", 1234567.0L, 33, 44, 55);
+
+ /* A negative number. */
+ my_printf ("%LF %d\n", -0.03125L, 33, 44, 55);
+
+ /* Positive zero. */
+ my_printf ("%LF %d\n", 0.0L, 33, 44, 55);
+
+ /* FLAG_ZERO. */
+ my_printf ("%015LF %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision. */
+ my_printf ("%.LF %d\n", 1234.0L, 33, 44, 55);
+
+ /* Precision with no rounding. */
+ my_printf ("%.2LF %d\n", 999.95L, 33, 44, 55);
+
+ /* Precision with rounding. */
+ my_printf ("%.2LF %d\n", 999.996L, 33, 44, 55);
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ my_printf ("%2$d %1$d\n", 33, 55);
+}
diff --git a/tests/gnu/test-printf-posix.output b/tests/gnu/test-printf-posix.output
new file mode 100755
index 00000000..618825bb
--- /dev/null
+++ b/tests/gnu/test-printf-posix.output
@@ -0,0 +1,40 @@
+12345671 33
+12345672 33
+12345673 33
+0x0p+0 33
+inf 33
+-inf 33
+ inf 33
+12.750000 33
+1234567.000000 33
+-0.031250 33
+0.000000 33
+00001234.000000 33
+1234 33
+999.95 33
+1000.00 33
+12.750000 33
+1234567.000000 33
+-0.031250 33
+0.000000 33
+00001234.000000 33
+1234 33
+999.95 33
+1000.00 33
+12.750000 33
+1234567.000000 33
+-0.031250 33
+0.000000 33
+00001234.000000 33
+1234 33
+999.95 33
+1000.00 33
+12.750000 33
+1234567.000000 33
+-0.031250 33
+0.000000 33
+00001234.000000 33
+1234 33
+999.95 33
+1000.00 33
+55 33
diff --git a/tests/gnu/test-quotearg.c b/tests/gnu/test-quotearg.c
new file mode 100755
index 00000000..1928679f
--- /dev/null
+++ b/tests/gnu/test-quotearg.c
@@ -0,0 +1,471 @@
+/* Test of quotearg family of functions.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include "quotearg.h"
+
+#include <ctype.h>
+#include <locale.h>
+#include <stdbool.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "gettext.h"
+#include "macros.h"
+
+struct result_strings {
+ char const *str1; /* Translation of "". */
+ char const *str2; /* Translation of "\0""1\0". */
+ size_t len2; /* Length of str2. */
+ char const *str3; /* Translation of "simple". */
+ char const *str4; /* Translation of " \t\n'\"\033?""?/\\". */
+ char const *str5; /* Translation of "a:b". */
+ char const *str6; /* Translation of "a\\b". */
+ char const *str7a; /* Translation of LQ RQ, in ASCII charset. */
+ char const *str7b; /* Translation of LQ RQ, in Latin1 or UTF-8 charset. */
+};
+
+struct result_groups {
+ struct result_strings group1; /* Via quotearg_buffer. */
+ struct result_strings group2; /* Via quotearg{,_mem}. */
+ struct result_strings group3; /* Via quotearg_colon{,_mem}. */
+};
+
+/* These quotes are borrowed from a pt_PT.utf8 translation. */
+# define LQ "\302\253"
+# define RQ "\302\273"
+# define LQ_ENC "\\302\\253"
+# define RQ_ENC "\\302\\273"
+# define RQ_ESC "\\\302\273"
+
+static struct result_strings inputs = {
+ "", "\0001\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ LQ RQ, NULL
+};
+
+static struct result_groups results_g[] = {
+ /* literal_quoting_style */
+ { { "", "\0""1\0", 3, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ LQ RQ, LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b",
+ LQ RQ, LQ RQ } },
+
+ /* shell_quoting_style */
+ { { "''", "\0""1\0", 3, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+ "'a\\b'", LQ RQ, LQ RQ },
+ { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "a:b",
+ "'a\\b'", LQ RQ, LQ RQ },
+ { "''", "1", 1, "simple", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", LQ RQ, LQ RQ } },
+
+ /* shell_always_quoting_style */
+ { { "''", "'\0""1\0'", 5, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" },
+ { "''", "'1'", 3, "'simple'", "' \t\n'\\''\"\033?""?/\\'", "'a:b'",
+ "'a\\b'", "'" LQ RQ "'", "'" LQ RQ "'" } },
+
+ /* c_quoting_style */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } },
+
+ /* c_maybe_quoting_style */
+ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+ /* escape_quoting_style */
+ { { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a:b",
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple", " \\t\\n'\"\\033?""?/\\\\", "a\\:b",
+ "a\\\\b", LQ_ENC RQ_ENC, LQ RQ } },
+
+ /* locale_quoting_style */
+ { { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+ "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
+ { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+ "`a:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" },
+ { "`'", "`\\0001\\0'", 9, "`simple'", "` \\t\\n\\'\"\\033?""?/\\\\'",
+ "`a\\:b'", "`a\\\\b'", "`" LQ_ENC RQ_ENC "'", "`" LQ RQ "'" } },
+
+ /* clocale_quoting_style */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?""?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+static struct result_groups flag_results[] = {
+ /* literal_quoting_style and QA_ELIDE_NULL_BYTES */
+ { { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ },
+ { "", "1", 1, "simple", " \t\n'\"\033?""?/\\", "a:b", "a\\b", LQ RQ,
+ LQ RQ } },
+
+ /* c_quoting_style and QA_ELIDE_OUTER_QUOTES */
+ { { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "a:b", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ },
+ { "", "\"\\0001\\0\"", 9, "simple", "\" \\t\\n'\\\"\\033?""?/\\\\\"",
+ "\"a:b\"", "a\\b", "\"" LQ_ENC RQ_ENC "\"", LQ RQ } },
+
+ /* c_quoting_style and QA_SPLIT_TRIGRAPHS */
+ { { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" },
+ { "\"\"", "\"\\0001\\0\"", 9, "\"simple\"",
+ "\" \\t\\n'\\\"\\033?\"\"?/\\\\\"", "\"a\\:b\"", "\"a\\\\b\"",
+ "\"" LQ_ENC RQ_ENC "\"", "\"" LQ RQ "\"" } }
+};
+
+#if ENABLE_NLS
+
+static struct result_groups locale_results[] = {
+ /* locale_quoting_style */
+ { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ},
+ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } },
+
+ /* clocale_quoting_style */
+ { { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ },
+ { LQ RQ, LQ "\\0001\\0" RQ, 11, LQ "simple" RQ,
+ LQ " \\t\\n'\"\\033?""?/\\\\" RQ, LQ "a\\:b" RQ, LQ "a\\\\b" RQ,
+ LQ LQ RQ_ESC RQ, LQ LQ RQ_ESC RQ } }
+};
+
+#endif /* ENABLE_NLS */
+
+static char const *custom_quotes[][2] = {
+ { "", "" },
+ { "'", "'" },
+ { "(", ")" },
+ { ":", " " },
+ { " ", ":" },
+ { "# ", "\n" },
+ { "\"'", "'\"" }
+};
+
+static struct result_groups custom_results[] = {
+ /* left_quote = right_quote = "" */
+ { { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+ LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a:b", "a\\\\b",
+ LQ_ENC RQ_ENC, LQ RQ },
+ { "", "\\0001\\0", 7, "simple",
+ " \\t\\n'\"\\033?""?/\\\\", "a\\:b", "a\\\\b",
+ LQ_ENC RQ_ENC, LQ RQ } },
+
+ /* left_quote = right_quote = "'" */
+ { { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a:b'", "'a\\\\b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" },
+ { "''", "'\\0001\\0'", 9, "'simple'",
+ "' \\t\\n\\'\"\\033?""?/\\\\'", "'a\\:b'", "'a\\\\b'",
+ "'" LQ_ENC RQ_ENC "'", "'" LQ RQ "'" } },
+
+ /* left_quote = "(" and right_quote = ")" */
+ { { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a:b)", "(a\\\\b)",
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" },
+ { "()", "(\\0001\\0)", 9, "(simple)",
+ "( \\t\\n'\"\\033?""?/\\\\)", "(a\\:b)", "(a\\\\b)",
+ "(" LQ_ENC RQ_ENC ")", "(" LQ RQ ")" } },
+
+ /* left_quote = ":" and right_quote = " " */
+ { { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a:b ", ":a\\\\b ",
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " },
+ { ": ", ":\\0001\\0 ", 9, ":simple ",
+ ":\\ \\t\\n'\"\\033?""?/\\\\ ", ":a\\:b ", ":a\\\\b ",
+ ":" LQ_ENC RQ_ENC " ", ":" LQ RQ " " } },
+
+ /* left_quote = " " and right_quote = ":" */
+ { { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" },
+ { " :", " \\0001\\0:", 9, " simple:",
+ " \\t\\n'\"\\033?""?/\\\\:", " a\\:b:", " a\\\\b:",
+ " " LQ_ENC RQ_ENC ":", " " LQ RQ ":" } },
+
+ /* left_quote = "# " and right_quote = "\n" */
+ { { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a:b\n", "# a\\\\b\n",
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" },
+ { "# \n", "# \\0001\\0\n", 10, "# simple\n",
+ "# \\t\\n'\"\\033?""?/\\\\\n", "# a\\:b\n", "# a\\\\b\n",
+ "# " LQ_ENC RQ_ENC "\n", "# " LQ RQ "\n" } },
+
+ /* left_quote = "\"'" and right_quote = "'\"" */
+ { { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a:b'\"", "\"'a\\\\b'\"",
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" },
+ { "\"''\"", "\"'\\0001\\0'\"", 11, "\"'simple'\"",
+ "\"' \\t\\n\\'\"\\033?""?/\\\\'\"", "\"'a\\:b'\"", "\"'a\\\\b'\"",
+ "\"'" LQ_ENC RQ_ENC "'\"", "\"'" LQ RQ "'\"" } }
+};
+
+static void
+compare (char const *a, size_t la, char const *b, size_t lb)
+{
+ ASSERT (la == lb);
+ ASSERT (memcmp (a, b, la) == 0);
+ ASSERT (b[lb] == '\0');
+}
+
+static void
+compare_strings (char *(func) (char const *, size_t *),
+ struct result_strings *results, bool ascii_only)
+{
+ size_t len;
+ char *p;
+
+ len = 0;
+ p = func (inputs.str1, &len);
+ compare (results->str1, strlen (results->str1), p, len);
+
+ len = inputs.len2;
+ p = func (inputs.str2, &len);
+ compare (results->str2, results->len2, p, len);
+
+ len = SIZE_MAX;
+ p = func (inputs.str3, &len);
+ compare (results->str3, strlen (results->str3), p, len);
+
+ len = strlen (inputs.str4);
+ p = func (inputs.str4, &len);
+ compare (results->str4, strlen (results->str4), p, len);
+
+ len = SIZE_MAX;
+ p = func (inputs.str5, &len);
+ compare (results->str5, strlen (results->str5), p, len);
+
+ len = strlen (inputs.str6);
+ p = func (inputs.str6, &len);
+ compare (results->str6, strlen (results->str6), p, len);
+
+ len = strlen (inputs.str7a);
+ p = func (inputs.str7a, &len);
+ if (ascii_only)
+ compare (results->str7a, strlen (results->str7a), p, len);
+ else
+ compare (results->str7b, strlen (results->str7b), p, len);
+}
+
+static char *
+use_quotearg_buffer (const char *str, size_t *len)
+{
+ static char buf[100];
+ size_t size;
+ memset (buf, 0xa5, 100);
+ size = quotearg_buffer (buf, 100, str, *len, NULL);
+ *len = size;
+ ASSERT ((unsigned char) buf[size + 1] == 0xa5);
+ return buf;
+}
+
+static char *
+use_quotearg (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg (str) : quotearg_mem (str, *len);
+ *len = strlen (p);
+ return p;
+}
+
+static char *
+use_quote_double_quotes (const char *str, size_t *len)
+{
+ char *p = *len == SIZE_MAX ? quotearg_char (str, '"')
+ : quotearg_char_mem (str, *len, '"');
+ *len = strlen (p);
+ return p;
+}
+
+static char *
+use_quotearg_colon (const char *str, size_t *len)
+{
+ char *p = (*len == SIZE_MAX ? quotearg_colon (str)
+ : quotearg_colon_mem (str, *len));
+ *len = strlen (p);
+ return p;
+}
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ int i;
+ bool ascii_only = MB_CUR_MAX == 1 && !isprint ((unsigned char) LQ[0]);
+
+ set_program_name (argv[0]);
+
+ /* This part of the program is hard-wired to the C locale since it
+ does not call setlocale. However, according to POSIX, the use of
+ 8-bit bytes in a character context in the C locale gives
+ unspecified results (that is, the C locale charset is allowed to
+ be unibyte with 8-bit bytes rejected [ASCII], unibyte with 8-bit
+ bytes being characters [often ISO-8859-1], or multibyte [often
+ UTF-8]). We assume that the latter two cases will be
+ indistinguishable in this test - that is, the LQ and RQ sequences
+ will pass through unchanged in either type of charset. So when
+ testing for quoting of str7, use the ascii_only flag to decide
+ what to expect for the 8-bit data being quoted. */
+ ASSERT (!isprint ('\033'));
+ for (i = literal_quoting_style; i <= clocale_quoting_style; i++)
+ {
+ set_quoting_style (NULL, i);
+ compare_strings (use_quotearg_buffer, &results_g[i].group1, ascii_only);
+ compare_strings (use_quotearg, &results_g[i].group2, ascii_only);
+ if (i == c_quoting_style)
+ compare_strings (use_quote_double_quotes, &results_g[i].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &results_g[i].group3, ascii_only);
+ }
+
+ set_quoting_style (NULL, literal_quoting_style);
+ ASSERT (set_quoting_flags (NULL, QA_ELIDE_NULL_BYTES) == 0);
+ compare_strings (use_quotearg_buffer, &flag_results[0].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[0].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[0].group3, ascii_only);
+
+ set_quoting_style (NULL, c_quoting_style);
+ ASSERT (set_quoting_flags (NULL, QA_ELIDE_OUTER_QUOTES)
+ == QA_ELIDE_NULL_BYTES);
+ compare_strings (use_quotearg_buffer, &flag_results[1].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[1].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[1].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[1].group3, ascii_only);
+
+ ASSERT (set_quoting_flags (NULL, QA_SPLIT_TRIGRAPHS)
+ == QA_ELIDE_OUTER_QUOTES);
+ compare_strings (use_quotearg_buffer, &flag_results[2].group1, ascii_only);
+ compare_strings (use_quotearg, &flag_results[2].group2, ascii_only);
+ compare_strings (use_quote_double_quotes, &flag_results[2].group2,
+ ascii_only);
+ compare_strings (use_quotearg_colon, &flag_results[2].group3, ascii_only);
+
+ ASSERT (set_quoting_flags (NULL, 0) == QA_SPLIT_TRIGRAPHS);
+
+ for (i = 0; i < sizeof custom_quotes / sizeof *custom_quotes; ++i)
+ {
+ set_custom_quoting (NULL,
+ custom_quotes[i][0], custom_quotes[i][1]);
+ compare_strings (use_quotearg_buffer, &custom_results[i].group1,
+ ascii_only);
+ compare_strings (use_quotearg, &custom_results[i].group2, ascii_only);
+ compare_strings (use_quotearg_colon, &custom_results[i].group3,
+ ascii_only);
+ }
+
+#if ENABLE_NLS
+ /* Clean up environment. */
+ unsetenv ("LANGUAGE");
+ unsetenv ("LC_ALL");
+ unsetenv ("LC_MESSAGES");
+ unsetenv ("LC_CTYPE");
+ unsetenv ("LANG");
+ unsetenv ("OUTPUT_CHARSET");
+
+ /* This program part runs in a French UTF-8 locale. It uses
+ the test-quotearg.mo message catalog. */
+ {
+ const char *locale_name = getenv ("LOCALE");
+
+ if (locale_name != NULL && strcmp (locale_name, "none") != 0
+ && setenv ("LC_ALL", locale_name, 1) == 0
+ && setlocale (LC_ALL, "") != NULL)
+ {
+ textdomain ("test-quotearg");
+ bindtextdomain ("test-quotearg", getenv ("LOCALEDIR"));
+
+ set_quoting_style (NULL, locale_quoting_style);
+ compare_strings (use_quotearg_buffer, &locale_results[0].group1, false);
+ compare_strings (use_quotearg, &locale_results[0].group2, false);
+ compare_strings (use_quotearg_colon, &locale_results[0].group3, false);
+
+ set_quoting_style (NULL, clocale_quoting_style);
+ compare_strings (use_quotearg_buffer, &locale_results[1].group1, false);
+ compare_strings (use_quotearg, &locale_results[1].group2, false);
+ compare_strings (use_quotearg_colon, &locale_results[1].group3, false);
+ }
+ }
+#endif /* ENABLE_NLS */
+
+ quotearg_free ();
+ return 0;
+}
diff --git a/tests/gnu/test-quotearg.sh b/tests/gnu/test-quotearg.sh
new file mode 100755
index 00000000..e050d078
--- /dev/null
+++ b/tests/gnu/test-quotearg.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# Choose an existing locale. The locale encoding does not matter; see the
+# comment in test-quotearg.po.
+if test $LOCALE_FR_UTF8 != none; then
+ locale=$LOCALE_FR_UTF8
+else
+ if test $LOCALE_FR != none; then
+ locale=$LOCALE_FR
+ else
+ locale=none
+ fi
+fi
+
+LOCALE=$locale LOCALEDIR="$srcdir/locale" \
+./test-quotearg${EXEEXT}
diff --git a/tests/gnu/test-rawmemchr.c b/tests/gnu/test-rawmemchr.c
new file mode 100755
index 00000000..94768183
--- /dev/null
+++ b/tests/gnu/test-rawmemchr.c
@@ -0,0 +1,76 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rawmemchr, void *, (void const *, int));
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+/* Calculating void * + int is not portable, so this wrapper converts
+ to char * to make the tests easier to write. */
+#define RAWMEMCHR (char *) rawmemchr
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n + 1);
+ ASSERT (input);
+
+ input[0] = 'a';
+ input[1] = 'b';
+ memset (input + 2, 'c', 1024);
+ memset (input + 1026, 'd', n - 1028);
+ input[n - 2] = 'e';
+ input[n - 1] = 'a';
+ input[n] = '\0';
+
+ /* Basic behavior tests. */
+ ASSERT (RAWMEMCHR (input, 'a') == input);
+ ASSERT (RAWMEMCHR (input, 'b') == input + 1);
+ ASSERT (RAWMEMCHR (input, 'c') == input + 2);
+ ASSERT (RAWMEMCHR (input, 'd') == input + 1026);
+
+ ASSERT (RAWMEMCHR (input + 1, 'a') == input + n - 1);
+ ASSERT (RAWMEMCHR (input + 1, 'e') == input + n - 2);
+
+ ASSERT (RAWMEMCHR (input, '\0') == input + n);
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = j;
+ for (j = 0; j < 256; j++)
+ {
+ ASSERT (RAWMEMCHR (input + i, j) == input + i + j);
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/tests/gnu/test-readlink.c b/tests/gnu/test-readlink.c
new file mode 100755
index 00000000..a144964f
--- /dev/null
+++ b/tests/gnu/test-readlink.c
@@ -0,0 +1,48 @@
+/* Tests of readlink.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (readlink, ssize_t, (char const *, char *, size_t));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-readlink.t"
+
+#include "test-readlink.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_readlink (readlink, true);
+}
diff --git a/tests/gnu/test-readlink.h b/tests/gnu/test-readlink.h
new file mode 100755
index 00000000..1e482dfe
--- /dev/null
+++ b/tests/gnu/test-readlink.h
@@ -0,0 +1,119 @@
+/* Tests of readlink.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both readlink(a,b,c) and
+ readlinkat(AT_FDCWD,a,b,c). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_readlink (ssize_t (*func) (char const *, char *, size_t), bool print)
+{
+ char buf[80];
+
+ /* Sanity checks of failures. Mingw lacks symlink, but readlink can
+ still distinguish between various errors. */
+ memset (buf, 0xff, sizeof buf);
+ errno = 0;
+ ASSERT (func ("no_such", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("no_such/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (".", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (func ("./", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (func (BASE "file/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Now test actual symlinks. */
+ if (symlink (BASE "dir", BASE "link"))
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "link/", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (symlink (BASE "link", BASE "link2") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link2/", buf, sizeof buf) == -1);
+ ASSERT (errno == ENOTDIR);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ {
+ /* Up till now, no readlink has been successful, so buf should be
+ unchanged. */
+ int i;
+ for (i = 0; i < sizeof buf; i++)
+ ASSERT (buf[i] == (char) 0xff);
+ }
+ {
+ size_t len = strlen (BASE "dir");
+ /* When passing too small of a buffer, expect the truncated
+ length, or an ERANGE failure. However, a size of 0 is not
+ portable enough to test. */
+ ssize_t result;
+ errno = 0;
+ result = readlink (BASE "link", buf, 1);
+ if (result == -1)
+ {
+ ASSERT (errno == ERANGE);
+ ASSERT (buf[0] == (char) 0xff);
+ }
+ else
+ {
+ ASSERT (result == 1);
+ ASSERT (buf[0] == BASE[0]);
+ }
+ ASSERT (buf[1] == (char) 0xff);
+ ASSERT (func (BASE "link", buf, len) == len);
+ ASSERT (strncmp (buf, BASE "dir", len) == 0);
+ ASSERT (buf[len] == (char) 0xff);
+ ASSERT (func (BASE "link", buf, sizeof buf) == len);
+ ASSERT (strncmp (buf, BASE "dir", len) == 0);
+ /* POSIX says rest of buf is unspecified; but in practice, it is
+ either left alone, or NUL-terminated. */
+ ASSERT (buf[len] == '\0' || buf[len] == (char) 0xff);
+ }
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-rename.c b/tests/gnu/test-rename.c
new file mode 100755
index 00000000..c5c6c439
--- /dev/null
+++ b/tests/gnu/test-rename.c
@@ -0,0 +1,46 @@
+/* Test of rename() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rename, int, (char const *, char const *));
+
+#include <errno.h>
+#include <fcntl.h>
+#include <stdbool.h>
+#include <stdlib.h>
+#include <string.h>
+#include <sys/stat.h>
+#include <unistd.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-rename.t"
+
+#include "test-rename.h"
+
+int
+main (void)
+{
+ /* Remove any garbage left from previous partial runs. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_rename (rename, true);
+}
diff --git a/tests/gnu/test-rename.h b/tests/gnu/test-rename.h
new file mode 100755
index 00000000..9a3f4ecf
--- /dev/null
+++ b/tests/gnu/test-rename.h
@@ -0,0 +1,446 @@
+/* Test of rename() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* This file is designed to test both rename(a,b) and
+ renameat(AT_FDCWD,a,AT_FDCWD,b). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, warn before
+ skipping symlink tests with status 77. */
+
+static int
+test_rename (int (*func) (char const *, char const *), bool print)
+{
+ /* Setup. */
+ struct stat st;
+ int fd = creat (BASE "file", 0600);
+ ASSERT (0 <= fd);
+ ASSERT (write (fd, "hi", 2) == 2);
+ ASSERT (close (fd) == 0);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+
+ /* Obvious errors. */
+
+ errno = 0; /* Missing source. */
+ ASSERT (func (BASE "missing", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "missing/", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "missing", BASE "missing/") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0; /* Empty operand. */
+ ASSERT (func ("", BASE "missing") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "file", "") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "", "") == -1);
+ ASSERT (errno == ENOENT);
+
+ /* Files. */
+ errno = 0; /* Trailing slash. */
+ ASSERT (func (BASE "file", BASE "file2/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "file/", BASE "file2") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (func (BASE "file", BASE "file2") == 0); /* Simple rename. */
+ errno = 0;
+ ASSERT (stat (BASE "file", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ ASSERT (st.st_size == 2);
+ ASSERT (close (creat (BASE "file", 0600)) == 0); /* Overwrite. */
+ errno = 0;
+ ASSERT (func (BASE "file2", BASE "file/") == -1);
+ ASSERT (errno == ENOTDIR);
+ ASSERT (func (BASE "file2", BASE "file") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+
+ /* Directories. */
+ ASSERT (func (BASE "dir", BASE "dir2/") == 0); /* Simple rename. */
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2", &st) == 0);
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ ASSERT (stat (BASE "dir", &st) == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (func (BASE "dir", BASE "dir2") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2", &st) == 0);
+ ASSERT (mkdir (BASE "dir", 0700) == 0); /* Empty onto empty. */
+ ASSERT (func (BASE "dir2", BASE "dir") == 0);
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ ASSERT (func (BASE "dir2", BASE "dir/") == 0);
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0); /* Empty onto full. */
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ errno = 0;
+ ASSERT (func (BASE "dir2/", BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+ ASSERT (func (BASE "dir", BASE "dir2") == 0); /* Full onto empty. */
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2/file", &st) == 0);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ ASSERT (func (BASE "dir2/", BASE "dir") == 0);
+ ASSERT (stat (BASE "dir/file", &st) == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (mkdir (BASE "dir2", 0700) == 0);
+ ASSERT (func (BASE "dir", BASE "dir2/") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (stat (BASE "dir2/file", &st) == 0);
+ ASSERT (unlink (BASE "dir2/file") == 0);
+ errno = 0; /* Reject trailing dot. */
+ ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
+ ASSERT (errno == EINVAL || errno == ENOENT);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
+ || errno == ENOTEMPTY);
+ errno = 0;
+ ASSERT (func (BASE "dir2/.", BASE "dir") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY);
+ ASSERT (rmdir (BASE "dir") == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == ENOENT);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir2", BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY || errno == EISDIR
+ || errno == ENOTEMPTY);
+ errno = 0;
+ ASSERT (func (BASE "dir2/.//", BASE "dir") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY);
+ ASSERT (rmdir (BASE "dir2") == 0);
+ errno = 0; /* Move into subdir. */
+ ASSERT (func (BASE "dir", BASE "dir/sub") == -1);
+ ASSERT (errno == EINVAL || errno == EACCES);
+ errno = 0;
+ ASSERT (stat (BASE "dir/sub", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (mkdir (BASE "dir/sub", 0700) == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "dir/sub") == -1);
+ ASSERT (errno == EINVAL);
+ ASSERT (stat (BASE "dir/sub", &st) == 0);
+ ASSERT (rmdir (BASE "dir/sub") == 0);
+
+ /* Mixing file and directory. */
+ errno = 0; /* File onto dir. */
+ ASSERT (func (BASE "file", BASE "dir") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "dir/") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ errno = 0; /* Dir onto file. */
+ ASSERT (func (BASE "dir", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "dir/", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Hard links. */
+ ASSERT (func (BASE "file", BASE "file") == 0); /* File onto self. */
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ ASSERT (func (BASE "dir", BASE "dir") == 0); /* Empty dir onto self. */
+ ASSERT (stat (BASE "dir", &st) == 0);
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+ ASSERT (func (BASE "dir", BASE "dir") == 0); /* Full dir onto self. */
+ ASSERT (unlink (BASE "dir/file") == 0);
+ {
+ /* Not all file systems support link. Mingw doesn't have
+ reliable st_nlink on hard links, but our implementation does
+ fail with EPERM on poor file systems, and we can detect the
+ inferior stat() via st_ino. Cygwin 1.5.x copies rather than
+ links files on those file systems, but there, st_nlink and
+ st_ino are reliable. */
+ int ret = link (BASE "file", BASE "file2");
+ if (!ret)
+ {
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ if (st.st_ino && st.st_nlink != 2)
+ {
+ ASSERT (unlink (BASE "file2") == 0);
+ errno = EPERM;
+ ret = -1;
+ }
+ }
+ if (ret == -1)
+ {
+ /* If the device does not support hard links, errno is
+ EPERM on Linux, EOPNOTSUPP on FreeBSD. */
+ switch (errno)
+ {
+ case EPERM:
+ case EOPNOTSUPP:
+ if (print)
+ fputs ("skipping test: "
+ "hard links not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ return 77;
+ default:
+ perror ("link");
+ return 1;
+ }
+ }
+ ASSERT (ret == 0);
+ }
+ ASSERT (func (BASE "file", BASE "file2") == 0); /* File onto hard link. */
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file", &st) == 0);
+ ASSERT (st.st_size == 2);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "file2", &st) == 0);
+ ASSERT (st.st_size == 2);
+ ASSERT (unlink (BASE "file2") == 0);
+
+ /* Symlinks. */
+ if (symlink (BASE "file", BASE "link1"))
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ return 77;
+ }
+ ASSERT (func (BASE "link1", BASE "link2") == 0); /* Simple rename. */
+ ASSERT (stat (BASE "file", &st) == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link1", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ ASSERT (symlink (BASE "nowhere", BASE "link1") == 0); /* Overwrite. */
+ ASSERT (func (BASE "link2", BASE "link1") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (stat (BASE "link1", &st) == 0);
+ ASSERT (st.st_size == 2);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ ASSERT (symlink (BASE "link2", BASE "link2") == 0); /* Symlink loop. */
+ ASSERT (func (BASE "link2", BASE "link2") == 0);
+ errno = 0;
+ ASSERT (func (BASE "link2/", BASE "link2") == -1);
+ ASSERT (errno == ELOOP || errno == ENOTDIR);
+ ASSERT (func (BASE "link2", BASE "link3") == 0);
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (symlink (BASE "nowhere", BASE "link2") == 0); /* Dangling link. */
+ ASSERT (func (BASE "link2", BASE "link3") == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ errno = 0; /* Trailing slash on dangling. */
+ ASSERT (func (BASE "link3/", BASE "link2") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "link3", BASE "link2/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ errno = 0; /* Trailing slash on link to file. */
+ ASSERT (func (BASE "link1/", BASE "link2") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "link3/") == -1);
+ ASSERT (errno == ENOENT || errno == ENOTDIR);
+
+ /* Mixing symlink and file. */
+ ASSERT (close (creat (BASE "file2", 0600)) == 0); /* File onto link. */
+ ASSERT (func (BASE "file2", BASE "link3") == 0);
+ errno = 0;
+ ASSERT (stat (BASE "file2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link3", &st) == 0);
+ ASSERT (S_ISREG (st.st_mode));
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (symlink (BASE "nowhere", BASE "link2") == 0); /* Link onto file. */
+ ASSERT (close (creat (BASE "file2", 0600)) == 0);
+ ASSERT (func (BASE "link2", BASE "file2") == 0);
+ errno = 0;
+ ASSERT (lstat (BASE "link2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "file2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ ASSERT (unlink (BASE "file2") == 0);
+ errno = 0; /* Trailing slash. */
+ ASSERT (func (BASE "file/", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "file", BASE "link1/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "link1/", BASE "file") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "file/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "file", &st) == 0);
+ ASSERT (S_ISREG (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link1", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+
+ /* Mixing symlink and directory. */
+ errno = 0; /* Directory onto link. */
+ ASSERT (func (BASE "dir", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "dir/", BASE "link1") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "dir", BASE "link1/") == -1);
+ ASSERT (errno == ENOTDIR);
+ errno = 0; /* Link onto directory. */
+ ASSERT (func (BASE "link1", BASE "dir") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "link1", BASE "dir/") == -1);
+ ASSERT (errno == EISDIR || errno == ENOTDIR);
+ errno = 0;
+ ASSERT (func (BASE "link1/", BASE "dir") == -1);
+ ASSERT (errno == ENOTDIR);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link1", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+
+ /* POSIX requires rename("link-to-dir/","other") to rename "dir" and
+ leave "link-to-dir" dangling, but GNU rejects this. POSIX
+ requires rename("dir","dangling/") to create the directory so
+ that "dangling/" now resolves, but GNU rejects this. While we
+ prefer GNU behavior, we don't enforce it. However, we do test
+ that the system either follows POSIX in both cases, or follows
+ GNU. */
+ {
+ int result;
+ ASSERT (symlink (BASE "dir2", BASE "link2") == 0);
+ errno = 0;
+ result = func (BASE "dir", BASE "link2/");
+ if (result == 0)
+ {
+ /* POSIX. */
+ errno = 0;
+ ASSERT (lstat (BASE "dir", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir2", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ ASSERT (func (BASE "link2/", BASE "dir") == 0);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ else
+ {
+ /* GNU. */
+ ASSERT (result == -1);
+ ASSERT (errno == ENOTDIR);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (symlink (BASE "dir", BASE "link2") == 0);
+ errno = 0; /* OpenBSD notices that link2/ and dir are the same. */
+ result = func (BASE "link2/", BASE "dir");
+ if (result) /* GNU/Linux rejects attempts to use link2/. */
+ {
+ ASSERT (result == -1);
+ ASSERT (errno == ENOTDIR);
+ }
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "dir", &st) == 0);
+ ASSERT (S_ISDIR (st.st_mode));
+ errno = 0;
+ ASSERT (lstat (BASE "dir2", &st) == -1);
+ ASSERT (errno == ENOENT);
+ memset (&st, 0, sizeof st);
+ ASSERT (lstat (BASE "link2", &st) == 0);
+ ASSERT (S_ISLNK (st.st_mode));
+ }
+ }
+
+ /* Clean up. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-rmdir.c b/tests/gnu/test-rmdir.c
new file mode 100755
index 00000000..7b1ef37d
--- /dev/null
+++ b/tests/gnu/test-rmdir.c
@@ -0,0 +1,47 @@
+/* Tests of rmdir.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (rmdir, int, (char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-rmdir.t"
+
+#include "test-rmdir.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_rmdir_func (rmdir, true);
+}
diff --git a/tests/gnu/test-rmdir.h b/tests/gnu/test-rmdir.h
new file mode 100755
index 00000000..6d5d56ef
--- /dev/null
+++ b/tests/gnu/test-rmdir.h
@@ -0,0 +1,101 @@
+/* Tests of rmdir.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both rmdir(n) and
+ unlinkat(AT_FDCWD,n,AT_REMOVEDIR). FUNC is the function to test.
+ Assumes that BASE and ASSERT are already defined, and that
+ appropriate headers are already included. If PRINT, then warn
+ before returning status 77 when symlinks are unsupported. */
+
+static int
+test_rmdir_func (int (*func) (char const *name), bool print)
+{
+ /* Setup. */
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ ASSERT (close (creat (BASE "dir/file", 0600)) == 0);
+
+ /* Basic error conditions. */
+ errno = 0;
+ ASSERT (func ("") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "nosuch") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (BASE "nosuch/") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func (".") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY);
+ /* Resulting errno after ".." or "/" is too varied to test; it is
+ reasonable to see any of EINVAL, EBUSY, EEXIST, ENOTEMPTY,
+ EACCES, EPERM. */
+ ASSERT (func ("..") == -1);
+ ASSERT (func ("/") == -1);
+ ASSERT (func ("///") == -1);
+ errno = 0;
+ ASSERT (func (BASE "dir/file/") == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Non-empty directory. */
+ errno = 0;
+ ASSERT (func (BASE "dir") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTEMPTY);
+
+ /* Non-directory. */
+ errno = 0;
+ ASSERT (func (BASE "dir/file") == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Empty directory. */
+ ASSERT (unlink (BASE "dir/file") == 0);
+ errno = 0;
+ ASSERT (func (BASE "dir/.//") == -1);
+ ASSERT (errno == EINVAL || errno == EBUSY);
+ ASSERT (func (BASE "dir") == 0);
+
+ /* Test symlink behavior. Specifying trailing slash should remove
+ referent directory (POSIX), or cause ENOTDIR failure (Linux), but
+ not touch symlink. We prefer the Linux behavior for its
+ intuitiveness (especially compared to rmdir("symlink-to-file/")),
+ but not enough to penalize POSIX systems with an rpl_rmdir. */
+ if (symlink (BASE "dir", BASE "link") != 0)
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ if (func (BASE "link/") == 0)
+ {
+ struct stat st;
+ errno = 0;
+ ASSERT (stat (BASE "link", &st) == -1);
+ ASSERT (errno == ENOENT);
+ }
+ else
+ {
+ ASSERT (errno == ENOTDIR);
+ ASSERT (func (BASE "dir") == 0);
+ }
+ ASSERT (unlink (BASE "link") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-sched.c b/tests/gnu/test-sched.c
new file mode 100755
index 00000000..15680d41
--- /dev/null
+++ b/tests/gnu/test-sched.c
@@ -0,0 +1,38 @@
+/* Test of <sched.h> substitute.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <sched.h>
+
+/* Check that 'struct sched_param' is defined. */
+static struct sched_param a;
+
+/* Check that the SCHED_* macros are defined and compile-time constants. */
+int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER };
+
+static int f1;
+
+int
+main ()
+{
+ /* Check fields of 'struct sched_param'. */
+ f1 = a.sched_priority;
+
+ return 0;
+}
diff --git a/tests/gnu/test-setenv.c b/tests/gnu/test-setenv.c
new file mode 100755
index 00000000..de589c1b
--- /dev/null
+++ b/tests/gnu/test-setenv.c
@@ -0,0 +1,56 @@
+/* Tests of setenv.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (setenv, int, (char const *, char const *, int));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ /* Test overwriting. */
+ ASSERT (setenv ("a", "==", -1) == 0);
+ ASSERT (setenv ("a", "2", 0) == 0);
+ ASSERT (strcmp (getenv ("a"), "==") == 0);
+
+ /* Required to fail with EINVAL. */
+ errno = 0;
+ ASSERT (setenv ("", "", 1) == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (setenv ("a=b", "", 0) == -1);
+ ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
+ errno = 0;
+ ASSERT (setenv (NULL, "", 0) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-sigaction.c b/tests/gnu/test-sigaction.c
new file mode 100755
index 00000000..73579d96
--- /dev/null
+++ b/tests/gnu/test-sigaction.c
@@ -0,0 +1,116 @@
+/* Test of sigaction() function.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include <signal.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sigaction, int, (int, struct sigaction const *,
+ struct sigaction *));
+
+#include <stddef.h>
+
+#include "macros.h"
+
+#ifndef SA_NOCLDSTOP
+# define SA_NOCLDSTOP 0
+#endif
+#ifndef SA_ONSTACK
+# define SA_ONSTACK 0
+#endif
+#ifndef SA_SIGINFO
+# define SA_SIGINFO 0
+#endif
+#ifndef SA_NOCLDWAIT
+# define SA_NOCLDWAIT 0
+#endif
+
+/* Define a mask of flags required by POSIX. Some implementations
+ provide other flags as extensions, such as SA_RESTORER, that we
+ must ignore in this test. */
+#define MASK_SA_FLAGS (SA_NOCLDSTOP | SA_ONSTACK | SA_RESETHAND | SA_RESTART \
+ | SA_SIGINFO | SA_NOCLDWAIT | SA_NODEFER)
+
+/* This test is unsafe in the presence of an asynchronous SIGABRT,
+ because we install a signal-handler that is intentionally not
+ async-safe. Hopefully, this does not lead to too many reports of
+ false failures, since people don't generally use 'kill -s SIGABRT'
+ to end a runaway program. */
+
+static void
+handler (int sig)
+{
+ static int entry_count;
+ struct sigaction sa;
+ ASSERT (sig == SIGABRT);
+ ASSERT (sigaction (SIGABRT, NULL, &sa) == 0);
+ ASSERT ((sa.sa_flags & SA_SIGINFO) == 0);
+ switch (entry_count++)
+ {
+ case 0:
+ ASSERT ((sa.sa_flags & SA_RESETHAND) == 0);
+ ASSERT (sa.sa_handler == handler);
+ break;
+ case 1:
+ /* This assertion fails on glibc-2.3.6 systems with LinuxThreads,
+ when this program is linked with -lpthread, due to the sigaction()
+ override in libpthread.so. */
+#if !defined __GLIBC__
+ ASSERT (sa.sa_handler == SIG_DFL);
+#endif
+ break;
+ default:
+ ASSERT (0);
+ }
+}
+
+int
+main (void)
+{
+ struct sigaction sa;
+ struct sigaction old_sa;
+ sa.sa_handler = handler;
+
+ sa.sa_flags = 0;
+ ASSERT (sigemptyset (&sa.sa_mask) == 0);
+ ASSERT (sigaction (SIGABRT, &sa, NULL) == 0);
+ ASSERT (raise (SIGABRT) == 0);
+
+ sa.sa_flags = SA_RESETHAND | SA_NODEFER;
+ ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
+ ASSERT ((old_sa.sa_flags & MASK_SA_FLAGS) == 0);
+ ASSERT (old_sa.sa_handler == handler);
+ ASSERT (raise (SIGABRT) == 0);
+
+ sa.sa_handler = SIG_DFL;
+ ASSERT (sigaction (SIGABRT, &sa, &old_sa) == 0);
+ ASSERT ((old_sa.sa_flags & SA_SIGINFO) == 0);
+#if !defined __GLIBC__ /* see above */
+ ASSERT (old_sa.sa_handler == SIG_DFL);
+#endif
+
+ sa.sa_handler = SIG_IGN;
+ ASSERT (sigaction (SIGABRT, &sa, NULL) == 0);
+ ASSERT (raise (SIGABRT) == 0);
+ ASSERT (sigaction (SIGABRT, NULL, &old_sa) == 0);
+ ASSERT (old_sa.sa_handler == SIG_IGN);
+ ASSERT (raise (SIGABRT) == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-signal.c b/tests/gnu/test-signal.c
new file mode 100755
index 00000000..e4258d3b
--- /dev/null
+++ b/tests/gnu/test-signal.c
@@ -0,0 +1,125 @@
+/* Test of <signal.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <signal.h>
+
+/* Check for required types. */
+struct
+{
+ size_t a;
+ uid_t b;
+ volatile sig_atomic_t c;
+ sigset_t d;
+ pid_t e;
+#if 0
+ /* Not guaranteed by gnulib. */
+ pthread_t f;
+ struct timespec g;
+#endif
+} s;
+
+int
+main (void)
+{
+ switch (0)
+ {
+ /* The following are guaranteed by C. */
+ case 0:
+ case SIGABRT:
+ case SIGFPE:
+ case SIGILL:
+ case SIGINT:
+ case SIGSEGV:
+ case SIGTERM:
+ /* The following is guaranteed by gnulib. */
+#if GNULIB_SIGPIPE || defined SIGPIPE
+ case SIGPIPE:
+#endif
+ /* Ensure no conflict with other standardized names. */
+#ifdef SIGALRM
+ case SIGALRM:
+#endif
+#ifdef SIGBUS
+ case SIGBUS:
+#endif
+#ifdef SIGCHLD
+ case SIGCHLD:
+#endif
+#ifdef SIGCONT
+ case SIGCONT:
+#endif
+#ifdef SIGHUP
+ case SIGHUP:
+#endif
+#ifdef SIGKILL
+ case SIGKILL:
+#endif
+#ifdef SIGQUIT
+ case SIGQUIT:
+#endif
+#ifdef SIGSTOP
+ case SIGSTOP:
+#endif
+#ifdef SIGTSTP
+ case SIGTSTP:
+#endif
+#ifdef SIGTTIN
+ case SIGTTIN:
+#endif
+#ifdef SIGTTOU
+ case SIGTTOU:
+#endif
+#ifdef SIGUSR1
+ case SIGUSR1:
+#endif
+#ifdef SIGUSR2
+ case SIGUSR2:
+#endif
+#ifdef SIGSYS
+ case SIGSYS:
+#endif
+#ifdef SIGTRAP
+ case SIGTRAP:
+#endif
+#ifdef SIGURG
+ case SIGURG:
+#endif
+#ifdef SIGVTALRM
+ case SIGVTALRM:
+#endif
+#ifdef SIGXCPU
+ case SIGXCPU:
+#endif
+#ifdef SIGXFSZ
+ case SIGXFSZ:
+#endif
+ /* SIGRTMIN and SIGRTMAX need not be compile-time constants. */
+#if 0
+# ifdef SIGRTMIN
+ case SIGRTMIN:
+# endif
+# ifdef SIGRTMAX
+ case SIGRTMAX:
+# endif
+#endif
+ ;
+ }
+ return s.a + s.b + s.c + s.e;
+}
diff --git a/tests/gnu/test-signbit.c b/tests/gnu/test-signbit.c
new file mode 100755
index 00000000..9581190c
--- /dev/null
+++ b/tests/gnu/test-signbit.c
@@ -0,0 +1,197 @@
+/* Test of signbit() substitute.
+ Copyright (C) 2007, 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <math.h>
+
+/* signbit must be a macro. */
+#ifndef signbit
+# error missing declaration
+#endif
+
+#include <float.h>
+#include <limits.h>
+
+#include "macros.h"
+
+float zerof = 0.0f;
+double zerod = 0.0;
+long double zerol = 0.0L;
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0f.
+ So we use -zerof instead. */
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zerod instead. */
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
+#else
+long double minus_zerol = -0.0L;
+#endif
+
+static void
+test_signbitf ()
+{
+ /* Finite values. */
+ ASSERT (!signbit (3.141f));
+ ASSERT (!signbit (3.141e30f));
+ ASSERT (!signbit (3.141e-30f));
+ ASSERT (signbit (-2.718f));
+ ASSERT (signbit (-2.718e30f));
+ ASSERT (signbit (-2.718e-30f));
+ /* Zeros. */
+ ASSERT (!signbit (0.0f));
+ if (1.0f / -zerof < 0)
+ ASSERT (signbit (-zerof));
+ else
+ ASSERT (!signbit (-zerof));
+ /* Infinite values. */
+ ASSERT (!signbit (1.0f / 0.0f));
+ ASSERT (signbit (-1.0f / 0.0f));
+ /* Quiet NaN. */
+ (void) signbit (zerof / zerof);
+#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { float value; unsigned int word[NWORDS]; } memory_float;
+ memory_float m;
+ m.value = zerof / zerof;
+# if FLT_EXPBIT0_BIT > 0
+ m.word[FLT_EXPBIT0_WORD] ^= (unsigned int) 1 << (FLT_EXPBIT0_BIT - 1);
+# else
+ m.word[FLT_EXPBIT0_WORD + (FLT_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ if (FLT_EXPBIT0_WORD < NWORDS / 2)
+ m.word[FLT_EXPBIT0_WORD + 1] |= (unsigned int) 1 << FLT_EXPBIT0_BIT;
+ else
+ m.word[0] |= (unsigned int) 1;
+ (void) signbit (m.value);
+ #undef NWORDS
+ }
+#endif
+}
+
+static void
+test_signbitd ()
+{
+ /* Finite values. */
+ ASSERT (!signbit (3.141));
+ ASSERT (!signbit (3.141e30));
+ ASSERT (!signbit (3.141e-30));
+ ASSERT (signbit (-2.718));
+ ASSERT (signbit (-2.718e30));
+ ASSERT (signbit (-2.718e-30));
+ /* Zeros. */
+ ASSERT (!signbit (0.0));
+ if (1.0 / -zerod < 0)
+ ASSERT (signbit (-zerod));
+ else
+ ASSERT (!signbit (-zerod));
+ /* Infinite values. */
+ ASSERT (!signbit (1.0 / 0.0));
+ ASSERT (signbit (-1.0 / 0.0));
+ /* Quiet NaN. */
+ (void) signbit (zerod / zerod);
+#if defined DBL_EXPBIT0_WORD && defined DBL_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { double value; unsigned int word[NWORDS]; } memory_double;
+ memory_double m;
+ m.value = zerod / zerod;
+# if DBL_EXPBIT0_BIT > 0
+ m.word[DBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (DBL_EXPBIT0_BIT - 1);
+# else
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ m.word[DBL_EXPBIT0_WORD + (DBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ |= (unsigned int) 1 << DBL_EXPBIT0_BIT;
+ (void) signbit (m.value);
+ #undef NWORDS
+ }
+#endif
+}
+
+static void
+test_signbitl ()
+{
+ /* Finite values. */
+ ASSERT (!signbit (3.141L));
+ ASSERT (!signbit (3.141e30L));
+ ASSERT (!signbit (3.141e-30L));
+ ASSERT (signbit (-2.718L));
+ ASSERT (signbit (-2.718e30L));
+ ASSERT (signbit (-2.718e-30L));
+ /* Zeros. */
+ ASSERT (!signbit (0.0L));
+ if (1.0L / minus_zerol < 0)
+ ASSERT (signbit (minus_zerol));
+ else
+ ASSERT (!signbit (minus_zerol));
+ /* Infinite values. */
+ ASSERT (!signbit (1.0L / 0.0L));
+ ASSERT (signbit (-1.0L / 0.0L));
+ /* Quiet NaN. */
+ (void) signbit (zerol / zerol);
+#if defined LDBL_EXPBIT0_WORD && defined LDBL_EXPBIT0_BIT
+ /* Signalling NaN. */
+ {
+ #define NWORDS \
+ ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
+ typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double;
+ memory_long_double m;
+ m.value = zerol / zerol;
+# if LDBL_EXPBIT0_BIT > 0
+ m.word[LDBL_EXPBIT0_WORD] ^= (unsigned int) 1 << (LDBL_EXPBIT0_BIT - 1);
+# else
+ m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
+# endif
+ m.word[LDBL_EXPBIT0_WORD + (LDBL_EXPBIT0_WORD < NWORDS / 2 ? 1 : - 1)]
+ |= (unsigned int) 1 << LDBL_EXPBIT0_BIT;
+ (void) signbit (m.value);
+ #undef NWORDS
+ }
+#endif
+}
+
+int
+main ()
+{
+ test_signbitf ();
+ test_signbitd ();
+ test_signbitl ();
+ return 0;
+}
diff --git a/tests/gnu/test-snprintf-posix.c b/tests/gnu/test-snprintf-posix.c
new file mode 100755
index 00000000..452e90ce
--- /dev/null
+++ b/tests/gnu/test-snprintf-posix.c
@@ -0,0 +1,38 @@
+/* Test of POSIX compatible snprintf() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <float.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#include "test-snprintf-posix.h"
+
+int
+main (int argc, char *argv[])
+{
+ test_function (snprintf);
+ return 0;
+}
diff --git a/tests/gnu/test-snprintf-posix.h b/tests/gnu/test-snprintf-posix.h
new file mode 100755
index 00000000..b796d5ba
--- /dev/null
+++ b/tests/gnu/test-snprintf-posix.h
@@ -0,0 +1,3113 @@
+/* Test of POSIX compatible vsnprintf() and snprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include "nan.h"
+
+/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zerod instead. */
+double zerod = 0.0;
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
+#else
+long double minus_zerol = -0.0L;
+#endif
+
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+#ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+#else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+#endif
+
+static int
+strmatch (const char *pattern, const char *string)
+{
+ if (strlen (pattern) != strlen (string))
+ return 0;
+ for (; *pattern != '\0'; pattern++, string++)
+ if (*pattern != '*' && *string != *pattern)
+ return 0;
+ return 1;
+}
+
+/* Test whether string[start_index..end_index-1] is a valid textual
+ representation of NaN. */
+static int
+strisnan (const char *string, size_t start_index, size_t end_index, int uppercase)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void
+test_function (int (*my_snprintf) (char *, size_t, const char *, ...))
+{
+ char buf[8];
+ int size;
+
+ /* Test return value convention. */
+
+ for (size = 0; size <= 8; size++)
+ {
+ int retval;
+
+ memcpy (buf, "DEADBEEF", 8);
+ retval = my_snprintf (buf, size, "%d", 12345);
+ ASSERT (retval == 5);
+ if (size < 6)
+ {
+ if (size > 0)
+ {
+ ASSERT (memcmp (buf, "12345", size - 1) == 0);
+ ASSERT (buf[size - 1] == '\0');
+ }
+ ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ }
+ else
+ {
+ ASSERT (memcmp (buf, "12345\0EF", 8) == 0);
+ }
+ }
+
+ /* Test support of size specifiers as in C99. */
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%ju %d", (uintmax_t) 12345671, 33, 44, 55);
+ ASSERT (strcmp (result, "12345671 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%zu %d", (size_t) 12345672, 33, 44, 55);
+ ASSERT (strcmp (result, "12345672 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55);
+ ASSERT (strcmp (result, "12345673 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", (long double) 1.5, 33, 44, 55);
+ ASSERT (strcmp (result, "1.5 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", 3.1416015625, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%A %d", -3.1416015625, 33, 44, 55);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%a %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding near the decimal point. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.0a %d", 1.5, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 0. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.0a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 1. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.1a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 2. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 3. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.3a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.3a %d", 1.49999, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.1a %d", 1.999, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Large precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.50a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#a %d", 1.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010a %d", 1.0 / 0.0, 33, 44, 55);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050a %d", NaNd (), 33, 44, 55);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", 3.1416015625L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LA %d", -3.1416015625L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Rounding near the decimal point. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.0La %d", 1.5L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 0. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.0La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 1. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.1La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 2. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 3. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.3La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.3La %d", 1.49999L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.1La %d", 1.999L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Large precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.50La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#La %d", 1.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010La %d", 1.0L / 0.0L, 33, 44, 55);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050La %d", NaNl (), 33, 44, 55);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %f format directive. */
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "0.000000" },
+ { 1.234321234321234e-36, "0.000000" },
+ { 1.234321234321234e-35, "0.000000" },
+ { 1.234321234321234e-34, "0.000000" },
+ { 1.234321234321234e-33, "0.000000" },
+ { 1.234321234321234e-32, "0.000000" },
+ { 1.234321234321234e-31, "0.000000" },
+ { 1.234321234321234e-30, "0.000000" },
+ { 1.234321234321234e-29, "0.000000" },
+ { 1.234321234321234e-28, "0.000000" },
+ { 1.234321234321234e-27, "0.000000" },
+ { 1.234321234321234e-26, "0.000000" },
+ { 1.234321234321234e-25, "0.000000" },
+ { 1.234321234321234e-24, "0.000000" },
+ { 1.234321234321234e-23, "0.000000" },
+ { 1.234321234321234e-22, "0.000000" },
+ { 1.234321234321234e-21, "0.000000" },
+ { 1.234321234321234e-20, "0.000000" },
+ { 1.234321234321234e-19, "0.000000" },
+ { 1.234321234321234e-18, "0.000000" },
+ { 1.234321234321234e-17, "0.000000" },
+ { 1.234321234321234e-16, "0.000000" },
+ { 1.234321234321234e-15, "0.000000" },
+ { 1.234321234321234e-14, "0.000000" },
+ { 1.234321234321234e-13, "0.000000" },
+ { 1.234321234321234e-12, "0.000000" },
+ { 1.234321234321234e-11, "0.000000" },
+ { 1.234321234321234e-10, "0.000000" },
+ { 1.234321234321234e-9, "0.000000" },
+ { 1.234321234321234e-8, "0.000000" },
+ { 1.234321234321234e-7, "0.000000" },
+ { 1.234321234321234e-6, "0.000001" },
+ { 1.234321234321234e-5, "0.000012" },
+ { 1.234321234321234e-4, "0.000123" },
+ { 1.234321234321234e-3, "0.001234" },
+ { 1.234321234321234e-2, "0.012343" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.234321" },
+ { 1.234321234321234e1, "12.343212" },
+ { 1.234321234321234e2, "123.432123" },
+ { 1.234321234321234e3, "1234.321234" },
+ { 1.234321234321234e4, "12343.212343" },
+ { 1.234321234321234e5, "123432.123432" },
+ { 1.234321234321234e6, "1234321.234321" },
+ { 1.234321234321234e7, "12343212.343212" },
+ { 1.234321234321234e8, "123432123.432123" },
+ { 1.234321234321234e9, "1234321234.321234" },
+ { 1.234321234321234e10, "12343212343.2123**" },
+ { 1.234321234321234e11, "123432123432.123***" },
+ { 1.234321234321234e12, "1234321234321.23****" },
+ { 1.234321234321234e13, "12343212343212.3*****" },
+ { 1.234321234321234e14, "123432123432123.******" },
+ { 1.234321234321234e15, "1234321234321234.000000" },
+ { 1.234321234321234e16, "123432123432123**.000000" },
+ { 1.234321234321234e17, "123432123432123***.000000" },
+ { 1.234321234321234e18, "123432123432123****.000000" },
+ { 1.234321234321234e19, "123432123432123*****.000000" },
+ { 1.234321234321234e20, "123432123432123******.000000" },
+ { 1.234321234321234e21, "123432123432123*******.000000" },
+ { 1.234321234321234e22, "123432123432123********.000000" },
+ { 1.234321234321234e23, "123432123432123*********.000000" },
+ { 1.234321234321234e24, "123432123432123**********.000000" },
+ { 1.234321234321234e25, "123432123432123***********.000000" },
+ { 1.234321234321234e26, "123432123432123************.000000" },
+ { 1.234321234321234e27, "123432123432123*************.000000" },
+ { 1.234321234321234e28, "123432123432123**************.000000" },
+ { 1.234321234321234e29, "123432123432123***************.000000" },
+ { 1.234321234321234e30, "123432123432123****************.000000" },
+ { 1.234321234321234e31, "123432123432123*****************.000000" },
+ { 1.234321234321234e32, "123432123432123******************.000000" },
+ { 1.234321234321234e33, "123432123432123*******************.000000" },
+ { 1.234321234321234e34, "123432123432123********************.000000" },
+ { 1.234321234321234e35, "123432123432123*********************.000000" },
+ { 1.234321234321234e36, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f", data[k].value);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%f %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015f %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050f %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.f %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2f %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2f %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "0.000000" },
+ { 1.234321234321234e-36L, "0.000000" },
+ { 1.234321234321234e-35L, "0.000000" },
+ { 1.234321234321234e-34L, "0.000000" },
+ { 1.234321234321234e-33L, "0.000000" },
+ { 1.234321234321234e-32L, "0.000000" },
+ { 1.234321234321234e-31L, "0.000000" },
+ { 1.234321234321234e-30L, "0.000000" },
+ { 1.234321234321234e-29L, "0.000000" },
+ { 1.234321234321234e-28L, "0.000000" },
+ { 1.234321234321234e-27L, "0.000000" },
+ { 1.234321234321234e-26L, "0.000000" },
+ { 1.234321234321234e-25L, "0.000000" },
+ { 1.234321234321234e-24L, "0.000000" },
+ { 1.234321234321234e-23L, "0.000000" },
+ { 1.234321234321234e-22L, "0.000000" },
+ { 1.234321234321234e-21L, "0.000000" },
+ { 1.234321234321234e-20L, "0.000000" },
+ { 1.234321234321234e-19L, "0.000000" },
+ { 1.234321234321234e-18L, "0.000000" },
+ { 1.234321234321234e-17L, "0.000000" },
+ { 1.234321234321234e-16L, "0.000000" },
+ { 1.234321234321234e-15L, "0.000000" },
+ { 1.234321234321234e-14L, "0.000000" },
+ { 1.234321234321234e-13L, "0.000000" },
+ { 1.234321234321234e-12L, "0.000000" },
+ { 1.234321234321234e-11L, "0.000000" },
+ { 1.234321234321234e-10L, "0.000000" },
+ { 1.234321234321234e-9L, "0.000000" },
+ { 1.234321234321234e-8L, "0.000000" },
+ { 1.234321234321234e-7L, "0.000000" },
+ { 1.234321234321234e-6L, "0.000001" },
+ { 1.234321234321234e-5L, "0.000012" },
+ { 1.234321234321234e-4L, "0.000123" },
+ { 1.234321234321234e-3L, "0.001234" },
+ { 1.234321234321234e-2L, "0.012343" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.234321" },
+ { 1.234321234321234e1L, "12.343212" },
+ { 1.234321234321234e2L, "123.432123" },
+ { 1.234321234321234e3L, "1234.321234" },
+ { 1.234321234321234e4L, "12343.212343" },
+ { 1.234321234321234e5L, "123432.123432" },
+ { 1.234321234321234e6L, "1234321.234321" },
+ { 1.234321234321234e7L, "12343212.343212" },
+ { 1.234321234321234e8L, "123432123.432123" },
+ { 1.234321234321234e9L, "1234321234.321234" },
+ { 1.234321234321234e10L, "12343212343.2123**" },
+ { 1.234321234321234e11L, "123432123432.123***" },
+ { 1.234321234321234e12L, "1234321234321.23****" },
+ { 1.234321234321234e13L, "12343212343212.3*****" },
+ { 1.234321234321234e14L, "123432123432123.******" },
+ { 1.234321234321234e15L, "1234321234321234.000000" },
+ { 1.234321234321234e16L, "123432123432123**.000000" },
+ { 1.234321234321234e17L, "123432123432123***.000000" },
+ { 1.234321234321234e18L, "123432123432123****.000000" },
+ { 1.234321234321234e19L, "123432123432123*****.000000" },
+ { 1.234321234321234e20L, "123432123432123******.000000" },
+ { 1.234321234321234e21L, "123432123432123*******.000000" },
+ { 1.234321234321234e22L, "123432123432123********.000000" },
+ { 1.234321234321234e23L, "123432123432123*********.000000" },
+ { 1.234321234321234e24L, "123432123432123**********.000000" },
+ { 1.234321234321234e25L, "123432123432123***********.000000" },
+ { 1.234321234321234e26L, "123432123432123************.000000" },
+ { 1.234321234321234e27L, "123432123432123*************.000000" },
+ { 1.234321234321234e28L, "123432123432123**************.000000" },
+ { 1.234321234321234e29L, "123432123432123***************.000000" },
+ { 1.234321234321234e30L, "123432123432123****************.000000" },
+ { 1.234321234321234e31L, "123432123432123*****************.000000" },
+ { 1.234321234321234e32L, "123432123432123******************.000000" },
+ { 1.234321234321234e33L, "123432123432123*******************.000000" },
+ { 1.234321234321234e34L, "123432123432123********************.000000" },
+ { 1.234321234321234e35L, "123432123432123*********************.000000" },
+ { 1.234321234321234e36L, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf", data[k].value);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2Lf %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2Lf %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %F format directive. */
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%F %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015F %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.F %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2F %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2F %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%LF %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2LF %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.2LF %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %e format directive. */
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.234321e-37" },
+ { 1.234321234321234e-36, "1.234321e-36" },
+ { 1.234321234321234e-35, "1.234321e-35" },
+ { 1.234321234321234e-34, "1.234321e-34" },
+ { 1.234321234321234e-33, "1.234321e-33" },
+ { 1.234321234321234e-32, "1.234321e-32" },
+ { 1.234321234321234e-31, "1.234321e-31" },
+ { 1.234321234321234e-30, "1.234321e-30" },
+ { 1.234321234321234e-29, "1.234321e-29" },
+ { 1.234321234321234e-28, "1.234321e-28" },
+ { 1.234321234321234e-27, "1.234321e-27" },
+ { 1.234321234321234e-26, "1.234321e-26" },
+ { 1.234321234321234e-25, "1.234321e-25" },
+ { 1.234321234321234e-24, "1.234321e-24" },
+ { 1.234321234321234e-23, "1.234321e-23" },
+ { 1.234321234321234e-22, "1.234321e-22" },
+ { 1.234321234321234e-21, "1.234321e-21" },
+ { 1.234321234321234e-20, "1.234321e-20" },
+ { 1.234321234321234e-19, "1.234321e-19" },
+ { 1.234321234321234e-18, "1.234321e-18" },
+ { 1.234321234321234e-17, "1.234321e-17" },
+ { 1.234321234321234e-16, "1.234321e-16" },
+ { 1.234321234321234e-15, "1.234321e-15" },
+ { 1.234321234321234e-14, "1.234321e-14" },
+ { 1.234321234321234e-13, "1.234321e-13" },
+ { 1.234321234321234e-12, "1.234321e-12" },
+ { 1.234321234321234e-11, "1.234321e-11" },
+ { 1.234321234321234e-10, "1.234321e-10" },
+ { 1.234321234321234e-9, "1.234321e-09" },
+ { 1.234321234321234e-8, "1.234321e-08" },
+ { 1.234321234321234e-7, "1.234321e-07" },
+ { 1.234321234321234e-6, "1.234321e-06" },
+ { 1.234321234321234e-5, "1.234321e-05" },
+ { 1.234321234321234e-4, "1.234321e-04" },
+ { 1.234321234321234e-3, "1.234321e-03" },
+ { 1.234321234321234e-2, "1.234321e-02" },
+ { 1.234321234321234e-1, "1.234321e-01" },
+ { 1.234321234321234, "1.234321e+00" },
+ { 1.234321234321234e1, "1.234321e+01" },
+ { 1.234321234321234e2, "1.234321e+02" },
+ { 1.234321234321234e3, "1.234321e+03" },
+ { 1.234321234321234e4, "1.234321e+04" },
+ { 1.234321234321234e5, "1.234321e+05" },
+ { 1.234321234321234e6, "1.234321e+06" },
+ { 1.234321234321234e7, "1.234321e+07" },
+ { 1.234321234321234e8, "1.234321e+08" },
+ { 1.234321234321234e9, "1.234321e+09" },
+ { 1.234321234321234e10, "1.234321e+10" },
+ { 1.234321234321234e11, "1.234321e+11" },
+ { 1.234321234321234e12, "1.234321e+12" },
+ { 1.234321234321234e13, "1.234321e+13" },
+ { 1.234321234321234e14, "1.234321e+14" },
+ { 1.234321234321234e15, "1.234321e+15" },
+ { 1.234321234321234e16, "1.234321e+16" },
+ { 1.234321234321234e17, "1.234321e+17" },
+ { 1.234321234321234e18, "1.234321e+18" },
+ { 1.234321234321234e19, "1.234321e+19" },
+ { 1.234321234321234e20, "1.234321e+20" },
+ { 1.234321234321234e21, "1.234321e+21" },
+ { 1.234321234321234e22, "1.234321e+22" },
+ { 1.234321234321234e23, "1.234321e+23" },
+ { 1.234321234321234e24, "1.234321e+24" },
+ { 1.234321234321234e25, "1.234321e+25" },
+ { 1.234321234321234e26, "1.234321e+26" },
+ { 1.234321234321234e27, "1.234321e+27" },
+ { 1.234321234321234e28, "1.234321e+28" },
+ { 1.234321234321234e29, "1.234321e+29" },
+ { 1.234321234321234e30, "1.234321e+30" },
+ { 1.234321234321234e31, "1.234321e+31" },
+ { 1.234321234321234e32, "1.234321e+32" },
+ { 1.234321234321234e33, "1.234321e+33" },
+ { 1.234321234321234e34, "1.234321e+34" },
+ { 1.234321234321234e35, "1.234321e+35" },
+ { 1.234321234321234e36, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%e %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%15e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-15e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.e %d", 9.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015e %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050e %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.e %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4e %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4e %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.234321e-37" },
+ { 1.234321234321234e-36L, "1.234321e-36" },
+ { 1.234321234321234e-35L, "1.234321e-35" },
+ { 1.234321234321234e-34L, "1.234321e-34" },
+ { 1.234321234321234e-33L, "1.234321e-33" },
+ { 1.234321234321234e-32L, "1.234321e-32" },
+ { 1.234321234321234e-31L, "1.234321e-31" },
+ { 1.234321234321234e-30L, "1.234321e-30" },
+ { 1.234321234321234e-29L, "1.234321e-29" },
+ { 1.234321234321234e-28L, "1.234321e-28" },
+ { 1.234321234321234e-27L, "1.234321e-27" },
+ { 1.234321234321234e-26L, "1.234321e-26" },
+ { 1.234321234321234e-25L, "1.234321e-25" },
+ { 1.234321234321234e-24L, "1.234321e-24" },
+ { 1.234321234321234e-23L, "1.234321e-23" },
+ { 1.234321234321234e-22L, "1.234321e-22" },
+ { 1.234321234321234e-21L, "1.234321e-21" },
+ { 1.234321234321234e-20L, "1.234321e-20" },
+ { 1.234321234321234e-19L, "1.234321e-19" },
+ { 1.234321234321234e-18L, "1.234321e-18" },
+ { 1.234321234321234e-17L, "1.234321e-17" },
+ { 1.234321234321234e-16L, "1.234321e-16" },
+ { 1.234321234321234e-15L, "1.234321e-15" },
+ { 1.234321234321234e-14L, "1.234321e-14" },
+ { 1.234321234321234e-13L, "1.234321e-13" },
+ { 1.234321234321234e-12L, "1.234321e-12" },
+ { 1.234321234321234e-11L, "1.234321e-11" },
+ { 1.234321234321234e-10L, "1.234321e-10" },
+ { 1.234321234321234e-9L, "1.234321e-09" },
+ { 1.234321234321234e-8L, "1.234321e-08" },
+ { 1.234321234321234e-7L, "1.234321e-07" },
+ { 1.234321234321234e-6L, "1.234321e-06" },
+ { 1.234321234321234e-5L, "1.234321e-05" },
+ { 1.234321234321234e-4L, "1.234321e-04" },
+ { 1.234321234321234e-3L, "1.234321e-03" },
+ { 1.234321234321234e-2L, "1.234321e-02" },
+ { 1.234321234321234e-1L, "1.234321e-01" },
+ { 1.234321234321234L, "1.234321e+00" },
+ { 1.234321234321234e1L, "1.234321e+01" },
+ { 1.234321234321234e2L, "1.234321e+02" },
+ { 1.234321234321234e3L, "1.234321e+03" },
+ { 1.234321234321234e4L, "1.234321e+04" },
+ { 1.234321234321234e5L, "1.234321e+05" },
+ { 1.234321234321234e6L, "1.234321e+06" },
+ { 1.234321234321234e7L, "1.234321e+07" },
+ { 1.234321234321234e8L, "1.234321e+08" },
+ { 1.234321234321234e9L, "1.234321e+09" },
+ { 1.234321234321234e10L, "1.234321e+10" },
+ { 1.234321234321234e11L, "1.234321e+11" },
+ { 1.234321234321234e12L, "1.234321e+12" },
+ { 1.234321234321234e13L, "1.234321e+13" },
+ { 1.234321234321234e14L, "1.234321e+14" },
+ { 1.234321234321234e15L, "1.234321e+15" },
+ { 1.234321234321234e16L, "1.234321e+16" },
+ { 1.234321234321234e17L, "1.234321e+17" },
+ { 1.234321234321234e18L, "1.234321e+18" },
+ { 1.234321234321234e19L, "1.234321e+19" },
+ { 1.234321234321234e20L, "1.234321e+20" },
+ { 1.234321234321234e21L, "1.234321e+21" },
+ { 1.234321234321234e22L, "1.234321e+22" },
+ { 1.234321234321234e23L, "1.234321e+23" },
+ { 1.234321234321234e24L, "1.234321e+24" },
+ { 1.234321234321234e25L, "1.234321e+25" },
+ { 1.234321234321234e26L, "1.234321e+26" },
+ { 1.234321234321234e27L, "1.234321e+27" },
+ { 1.234321234321234e28L, "1.234321e+28" },
+ { 1.234321234321234e29L, "1.234321e+29" },
+ { 1.234321234321234e30L, "1.234321e+30" },
+ { 1.234321234321234e31L, "1.234321e+31" },
+ { 1.234321234321234e32L, "1.234321e+32" },
+ { 1.234321234321234e33L, "1.234321e+33" },
+ { 1.234321234321234e34L, "1.234321e+34" },
+ { 1.234321234321234e35L, "1.234321e+35" },
+ { 1.234321234321234e36L, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.Le %d", 9.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050Le %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4Le %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4Le %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %g format directive. */
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.23432e-37" },
+ { 1.234321234321234e-36, "1.23432e-36" },
+ { 1.234321234321234e-35, "1.23432e-35" },
+ { 1.234321234321234e-34, "1.23432e-34" },
+ { 1.234321234321234e-33, "1.23432e-33" },
+ { 1.234321234321234e-32, "1.23432e-32" },
+ { 1.234321234321234e-31, "1.23432e-31" },
+ { 1.234321234321234e-30, "1.23432e-30" },
+ { 1.234321234321234e-29, "1.23432e-29" },
+ { 1.234321234321234e-28, "1.23432e-28" },
+ { 1.234321234321234e-27, "1.23432e-27" },
+ { 1.234321234321234e-26, "1.23432e-26" },
+ { 1.234321234321234e-25, "1.23432e-25" },
+ { 1.234321234321234e-24, "1.23432e-24" },
+ { 1.234321234321234e-23, "1.23432e-23" },
+ { 1.234321234321234e-22, "1.23432e-22" },
+ { 1.234321234321234e-21, "1.23432e-21" },
+ { 1.234321234321234e-20, "1.23432e-20" },
+ { 1.234321234321234e-19, "1.23432e-19" },
+ { 1.234321234321234e-18, "1.23432e-18" },
+ { 1.234321234321234e-17, "1.23432e-17" },
+ { 1.234321234321234e-16, "1.23432e-16" },
+ { 1.234321234321234e-15, "1.23432e-15" },
+ { 1.234321234321234e-14, "1.23432e-14" },
+ { 1.234321234321234e-13, "1.23432e-13" },
+ { 1.234321234321234e-12, "1.23432e-12" },
+ { 1.234321234321234e-11, "1.23432e-11" },
+ { 1.234321234321234e-10, "1.23432e-10" },
+ { 1.234321234321234e-9, "1.23432e-09" },
+ { 1.234321234321234e-8, "1.23432e-08" },
+ { 1.234321234321234e-7, "1.23432e-07" },
+ { 1.234321234321234e-6, "1.23432e-06" },
+ { 1.234321234321234e-5, "1.23432e-05" },
+ { 1.234321234321234e-4, "0.000123432" },
+ { 1.234321234321234e-3, "0.00123432" },
+ { 1.234321234321234e-2, "0.0123432" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.23432" },
+ { 1.234321234321234e1, "12.3432" },
+ { 1.234321234321234e2, "123.432" },
+ { 1.234321234321234e3, "1234.32" },
+ { 1.234321234321234e4, "12343.2" },
+ { 1.234321234321234e5, "123432" },
+ { 1.234321234321234e6, "1.23432e+06" },
+ { 1.234321234321234e7, "1.23432e+07" },
+ { 1.234321234321234e8, "1.23432e+08" },
+ { 1.234321234321234e9, "1.23432e+09" },
+ { 1.234321234321234e10, "1.23432e+10" },
+ { 1.234321234321234e11, "1.23432e+11" },
+ { 1.234321234321234e12, "1.23432e+12" },
+ { 1.234321234321234e13, "1.23432e+13" },
+ { 1.234321234321234e14, "1.23432e+14" },
+ { 1.234321234321234e15, "1.23432e+15" },
+ { 1.234321234321234e16, "1.23432e+16" },
+ { 1.234321234321234e17, "1.23432e+17" },
+ { 1.234321234321234e18, "1.23432e+18" },
+ { 1.234321234321234e19, "1.23432e+19" },
+ { 1.234321234321234e20, "1.23432e+20" },
+ { 1.234321234321234e21, "1.23432e+21" },
+ { 1.234321234321234e22, "1.23432e+22" },
+ { 1.234321234321234e23, "1.23432e+23" },
+ { 1.234321234321234e24, "1.23432e+24" },
+ { 1.234321234321234e25, "1.23432e+25" },
+ { 1.234321234321234e26, "1.23432e+26" },
+ { 1.234321234321234e27, "1.23432e+27" },
+ { 1.234321234321234e28, "1.23432e+28" },
+ { 1.234321234321234e29, "1.23432e+29" },
+ { 1.234321234321234e30, "1.23432e+30" },
+ { 1.234321234321234e31, "1.23432e+31" },
+ { 1.234321234321234e32, "1.23432e+32" },
+ { 1.234321234321234e33, "1.23432e+33" },
+ { 1.234321234321234e34, "1.23432e+34" },
+ { 1.234321234321234e35, "1.23432e+35" },
+ { 1.234321234321234e36, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%g %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.g %d", 9.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010g %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050g %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.g %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.5g %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.5g %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.23432e-37" },
+ { 1.234321234321234e-36L, "1.23432e-36" },
+ { 1.234321234321234e-35L, "1.23432e-35" },
+ { 1.234321234321234e-34L, "1.23432e-34" },
+ { 1.234321234321234e-33L, "1.23432e-33" },
+ { 1.234321234321234e-32L, "1.23432e-32" },
+ { 1.234321234321234e-31L, "1.23432e-31" },
+ { 1.234321234321234e-30L, "1.23432e-30" },
+ { 1.234321234321234e-29L, "1.23432e-29" },
+ { 1.234321234321234e-28L, "1.23432e-28" },
+ { 1.234321234321234e-27L, "1.23432e-27" },
+ { 1.234321234321234e-26L, "1.23432e-26" },
+ { 1.234321234321234e-25L, "1.23432e-25" },
+ { 1.234321234321234e-24L, "1.23432e-24" },
+ { 1.234321234321234e-23L, "1.23432e-23" },
+ { 1.234321234321234e-22L, "1.23432e-22" },
+ { 1.234321234321234e-21L, "1.23432e-21" },
+ { 1.234321234321234e-20L, "1.23432e-20" },
+ { 1.234321234321234e-19L, "1.23432e-19" },
+ { 1.234321234321234e-18L, "1.23432e-18" },
+ { 1.234321234321234e-17L, "1.23432e-17" },
+ { 1.234321234321234e-16L, "1.23432e-16" },
+ { 1.234321234321234e-15L, "1.23432e-15" },
+ { 1.234321234321234e-14L, "1.23432e-14" },
+ { 1.234321234321234e-13L, "1.23432e-13" },
+ { 1.234321234321234e-12L, "1.23432e-12" },
+ { 1.234321234321234e-11L, "1.23432e-11" },
+ { 1.234321234321234e-10L, "1.23432e-10" },
+ { 1.234321234321234e-9L, "1.23432e-09" },
+ { 1.234321234321234e-8L, "1.23432e-08" },
+ { 1.234321234321234e-7L, "1.23432e-07" },
+ { 1.234321234321234e-6L, "1.23432e-06" },
+ { 1.234321234321234e-5L, "1.23432e-05" },
+ { 1.234321234321234e-4L, "0.000123432" },
+ { 1.234321234321234e-3L, "0.00123432" },
+ { 1.234321234321234e-2L, "0.0123432" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.23432" },
+ { 1.234321234321234e1L, "12.3432" },
+ { 1.234321234321234e2L, "123.432" },
+ { 1.234321234321234e3L, "1234.32" },
+ { 1.234321234321234e4L, "12343.2" },
+ { 1.234321234321234e5L, "123432" },
+ { 1.234321234321234e6L, "1.23432e+06" },
+ { 1.234321234321234e7L, "1.23432e+07" },
+ { 1.234321234321234e8L, "1.23432e+08" },
+ { 1.234321234321234e9L, "1.23432e+09" },
+ { 1.234321234321234e10L, "1.23432e+10" },
+ { 1.234321234321234e11L, "1.23432e+11" },
+ { 1.234321234321234e12L, "1.23432e+12" },
+ { 1.234321234321234e13L, "1.23432e+13" },
+ { 1.234321234321234e14L, "1.23432e+14" },
+ { 1.234321234321234e15L, "1.23432e+15" },
+ { 1.234321234321234e16L, "1.23432e+16" },
+ { 1.234321234321234e17L, "1.23432e+17" },
+ { 1.234321234321234e18L, "1.23432e+18" },
+ { 1.234321234321234e19L, "1.23432e+19" },
+ { 1.234321234321234e20L, "1.23432e+20" },
+ { 1.234321234321234e21L, "1.23432e+21" },
+ { 1.234321234321234e22L, "1.23432e+22" },
+ { 1.234321234321234e23L, "1.23432e+23" },
+ { 1.234321234321234e24L, "1.23432e+24" },
+ { 1.234321234321234e25L, "1.23432e+25" },
+ { 1.234321234321234e26L, "1.23432e+26" },
+ { 1.234321234321234e27L, "1.23432e+27" },
+ { 1.234321234321234e28L, "1.23432e+28" },
+ { 1.234321234321234e29L, "1.23432e+29" },
+ { 1.234321234321234e30L, "1.23432e+30" },
+ { 1.234321234321234e31L, "1.23432e+31" },
+ { 1.234321234321234e32L, "1.23432e+32" },
+ { 1.234321234321234e33L, "1.23432e+33" },
+ { 1.234321234321234e34L, "1.23432e+34" },
+ { 1.234321234321234e35L, "1.23432e+35" },
+ { 1.234321234321234e36L, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%-10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%+Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "% Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.Lg %d", 9.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%010Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%015Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%050Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.5Lg %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.5Lg %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %n format directive. */
+
+ {
+ int count = -1;
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%d %n", 123, &count, 33, 44, 55);
+ ASSERT (strcmp (result, "123 ") == 0);
+ ASSERT (retval == strlen (result));
+ ASSERT (count == 4);
+ }
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%2$d %1$d", 33, 55);
+ ASSERT (strcmp (result, "55 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the grouping flag. */
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "%'d %d", 1234567, 99);
+ ASSERT (result[strlen (result) - 1] == '9');
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the left-adjust flag. */
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "a%*sc", -3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "a%-*sc", 3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[100];
+ int retval =
+ my_snprintf (result, sizeof (result), "a%-*sc", -3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of large precision. */
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4000d %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.*d %d", 4000, 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4000d %d", -1234567, 99);
+ size_t i;
+ ASSERT (result[0] == '-');
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[1 + i] == '0');
+ ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4000u %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4000o %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%.4000x %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_snprintf (result, sizeof (result), "%#.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result[0] == '0');
+ ASSERT (result[1] == 'x');
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[2 + i] == '0');
+ ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char input[5000];
+ char result[5000];
+ int retval;
+ size_t i;
+
+ for (i = 0; i < sizeof (input) - 1; i++)
+ input[i] = 'a' + ((1000000 / (i + 1)) % 26);
+ input[i] = '\0';
+ retval = my_snprintf (result, sizeof (result), "%.4000s %d", input, 99);
+ ASSERT (memcmp (result, input, 4000) == 0);
+ ASSERT (strcmp (result + 4000, " 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %s format directive. */
+
+ /* To verify that these tests succeed, it is necessary to run them under
+ a tool that checks against invalid memory accesses, such as ElectricFence
+ or "valgrind --tool=memcheck". */
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ char *block;
+ char result[5000];
+ int retval;
+
+ block = (char *) malloc (i);
+ memcpy (block, "abcdefgh", i);
+ retval = my_snprintf (result, sizeof (result), "%.*s", (int) i, block);
+ ASSERT (memcmp (result, block, i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (block);
+ }
+ }
+#if HAVE_WCHAR_T
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ wchar_t *block;
+ size_t j;
+ char result[5000];
+ int retval;
+
+ block = (wchar_t *) malloc (i * sizeof (wchar_t));
+ for (j = 0; j < i; j++)
+ block[j] = "abcdefgh"[j];
+ retval = my_snprintf (result, sizeof (result), "%.*ls", (int) i, block);
+ ASSERT (memcmp (result, "abcdefgh", i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (block);
+ }
+ }
+#endif
+}
diff --git a/tests/gnu/test-snprintf.c b/tests/gnu/test-snprintf.c
new file mode 100755
index 00000000..62a411bf
--- /dev/null
+++ b/tests/gnu/test-snprintf.c
@@ -0,0 +1,64 @@
+/* Test of snprintf() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (snprintf, int, (char *, size_t, char const *, ...));
+
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ char buf[8];
+ int size;
+ int retval;
+
+ for (size = 0; size <= 8; size++)
+ {
+ memcpy (buf, "DEADBEEF", 8);
+ retval = snprintf (buf, size, "%d", 12345);
+ if (size < 6)
+ {
+#if CHECK_SNPRINTF_POSIX
+ ASSERT (retval < 0 || retval >= size);
+#endif
+ if (size > 0)
+ {
+ ASSERT (memcmp (buf, "12345", size - 1) == 0);
+ ASSERT (buf[size - 1] == '\0' || buf[size - 1] == '0' + size);
+ }
+#if !CHECK_SNPRINTF_POSIX
+ if (size > 0)
+#endif
+ ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ }
+ else
+ {
+ ASSERT (retval == 5);
+ ASSERT (memcmp (buf, "12345\0EF", 8) == 0);
+ }
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-spawn.c b/tests/gnu/test-spawn.c
new file mode 100755
index 00000000..dc6b0a8e
--- /dev/null
+++ b/tests/gnu/test-spawn.c
@@ -0,0 +1,54 @@
+/* Test of <spawn.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <spawn.h>
+
+/* Check for existence of required types. */
+struct check
+{
+ posix_spawnattr_t a;
+ posix_spawn_file_actions_t b;
+ mode_t c;
+ pid_t d;
+ sigset_t e;
+} s;
+
+/* struct sched_param is allowed to be an incomplete type without
+ <sched.h>, but must have a forward declaration to avoid a
+ compilation error in the following usage. */
+extern void f (struct sched_param *g);
+#include <sched.h>
+extern void f (struct sched_param *g);
+
+int
+main (void)
+{
+ switch (0)
+ {
+ case POSIX_SPAWN_RESETIDS:
+ case POSIX_SPAWN_SETPGROUP:
+ case POSIX_SPAWN_SETSIGDEF:
+ case POSIX_SPAWN_SETSIGMASK:
+ case POSIX_SPAWN_SETSCHEDPARAM:
+ case POSIX_SPAWN_SETSCHEDULER:
+ ;
+ }
+ return s.c + s.d;
+}
diff --git a/tests/gnu/test-sprintf-posix.c b/tests/gnu/test-sprintf-posix.c
new file mode 100755
index 00000000..db943da2
--- /dev/null
+++ b/tests/gnu/test-sprintf-posix.c
@@ -0,0 +1,41 @@
+/* Test of POSIX compatible sprintf() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (sprintf, int, (char *, char const *, ...));
+
+#include <float.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+#include "test-sprintf-posix.h"
+
+int
+main (int argc, char *argv[])
+{
+ test_function (sprintf);
+ return 0;
+}
diff --git a/tests/gnu/test-sprintf-posix.h b/tests/gnu/test-sprintf-posix.h
new file mode 100755
index 00000000..a50e57ca
--- /dev/null
+++ b/tests/gnu/test-sprintf-posix.h
@@ -0,0 +1,3099 @@
+/* Test of POSIX compatible vsprintf() and sprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include "nan.h"
+
+/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zerod instead. */
+double zerod = 0.0;
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
+#else
+long double minus_zerol = -0.0L;
+#endif
+
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+#ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+#else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+#endif
+
+static int
+strmatch (const char *pattern, const char *string)
+{
+ if (strlen (pattern) != strlen (string))
+ return 0;
+ for (; *pattern != '\0'; pattern++, string++)
+ if (*pattern != '*' && *string != *pattern)
+ return 0;
+ return 1;
+}
+
+/* Test whether string[start_index..end_index-1] is a valid textual
+ representation of NaN. */
+static int
+strisnan (const char *string, size_t start_index, size_t end_index, int uppercase)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void
+test_function (int (*my_sprintf) (char *, const char *, ...))
+{
+ char buf[8];
+
+ /* Test return value convention. */
+
+ {
+ int retval;
+
+ memcpy (buf, "DEADBEEF", 8);
+ retval = my_sprintf (buf, "%d", 12345);
+ ASSERT (retval == 5);
+ ASSERT (memcmp (buf, "12345\0EF", 8) == 0);
+ }
+
+ /* Test support of size specifiers as in C99. */
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%ju %d", (uintmax_t) 12345671, 33, 44, 55);
+ ASSERT (strcmp (result, "12345671 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%zu %d", (size_t) 12345672, 33, 44, 55);
+ ASSERT (strcmp (result, "12345672 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55);
+ ASSERT (strcmp (result, "12345673 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", (long double) 1.5, 33, 44, 55);
+ ASSERT (strcmp (result, "1.5 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", 3.1416015625, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%A %d", -3.1416015625, 33, 44, 55);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%a %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding near the decimal point. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.0a %d", 1.5, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 0. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.0a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 1. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.1a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 2. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.2a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 3. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.3a %d", 1.51, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.3a %d", 1.49999, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.1a %d", 1.999, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Large precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.50a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#a %d", 1.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010a %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010a %d", 1.0 / 0.0, 33, 44, 55);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050a %d", NaNd (), 33, 44, 55);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", 3.1416015625L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LA %d", -3.1416015625L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Rounding near the decimal point. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.0La %d", 1.5L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 0. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.0La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 1. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.1La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 2. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.2La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding with precision 3. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.3La %d", 1.51L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.3La %d", 1.49999L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.1La %d", 1.999L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Large precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.50La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#La %d", 1.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010La %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010La %d", 1.0L / 0.0L, 33, 44, 55);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050La %d", NaNl (), 33, 44, 55);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %f format directive. */
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "0.000000" },
+ { 1.234321234321234e-36, "0.000000" },
+ { 1.234321234321234e-35, "0.000000" },
+ { 1.234321234321234e-34, "0.000000" },
+ { 1.234321234321234e-33, "0.000000" },
+ { 1.234321234321234e-32, "0.000000" },
+ { 1.234321234321234e-31, "0.000000" },
+ { 1.234321234321234e-30, "0.000000" },
+ { 1.234321234321234e-29, "0.000000" },
+ { 1.234321234321234e-28, "0.000000" },
+ { 1.234321234321234e-27, "0.000000" },
+ { 1.234321234321234e-26, "0.000000" },
+ { 1.234321234321234e-25, "0.000000" },
+ { 1.234321234321234e-24, "0.000000" },
+ { 1.234321234321234e-23, "0.000000" },
+ { 1.234321234321234e-22, "0.000000" },
+ { 1.234321234321234e-21, "0.000000" },
+ { 1.234321234321234e-20, "0.000000" },
+ { 1.234321234321234e-19, "0.000000" },
+ { 1.234321234321234e-18, "0.000000" },
+ { 1.234321234321234e-17, "0.000000" },
+ { 1.234321234321234e-16, "0.000000" },
+ { 1.234321234321234e-15, "0.000000" },
+ { 1.234321234321234e-14, "0.000000" },
+ { 1.234321234321234e-13, "0.000000" },
+ { 1.234321234321234e-12, "0.000000" },
+ { 1.234321234321234e-11, "0.000000" },
+ { 1.234321234321234e-10, "0.000000" },
+ { 1.234321234321234e-9, "0.000000" },
+ { 1.234321234321234e-8, "0.000000" },
+ { 1.234321234321234e-7, "0.000000" },
+ { 1.234321234321234e-6, "0.000001" },
+ { 1.234321234321234e-5, "0.000012" },
+ { 1.234321234321234e-4, "0.000123" },
+ { 1.234321234321234e-3, "0.001234" },
+ { 1.234321234321234e-2, "0.012343" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.234321" },
+ { 1.234321234321234e1, "12.343212" },
+ { 1.234321234321234e2, "123.432123" },
+ { 1.234321234321234e3, "1234.321234" },
+ { 1.234321234321234e4, "12343.212343" },
+ { 1.234321234321234e5, "123432.123432" },
+ { 1.234321234321234e6, "1234321.234321" },
+ { 1.234321234321234e7, "12343212.343212" },
+ { 1.234321234321234e8, "123432123.432123" },
+ { 1.234321234321234e9, "1234321234.321234" },
+ { 1.234321234321234e10, "12343212343.2123**" },
+ { 1.234321234321234e11, "123432123432.123***" },
+ { 1.234321234321234e12, "1234321234321.23****" },
+ { 1.234321234321234e13, "12343212343212.3*****" },
+ { 1.234321234321234e14, "123432123432123.******" },
+ { 1.234321234321234e15, "1234321234321234.000000" },
+ { 1.234321234321234e16, "123432123432123**.000000" },
+ { 1.234321234321234e17, "123432123432123***.000000" },
+ { 1.234321234321234e18, "123432123432123****.000000" },
+ { 1.234321234321234e19, "123432123432123*****.000000" },
+ { 1.234321234321234e20, "123432123432123******.000000" },
+ { 1.234321234321234e21, "123432123432123*******.000000" },
+ { 1.234321234321234e22, "123432123432123********.000000" },
+ { 1.234321234321234e23, "123432123432123*********.000000" },
+ { 1.234321234321234e24, "123432123432123**********.000000" },
+ { 1.234321234321234e25, "123432123432123***********.000000" },
+ { 1.234321234321234e26, "123432123432123************.000000" },
+ { 1.234321234321234e27, "123432123432123*************.000000" },
+ { 1.234321234321234e28, "123432123432123**************.000000" },
+ { 1.234321234321234e29, "123432123432123***************.000000" },
+ { 1.234321234321234e30, "123432123432123****************.000000" },
+ { 1.234321234321234e31, "123432123432123*****************.000000" },
+ { 1.234321234321234e32, "123432123432123******************.000000" },
+ { 1.234321234321234e33, "123432123432123*******************.000000" },
+ { 1.234321234321234e34, "123432123432123********************.000000" },
+ { 1.234321234321234e35, "123432123432123*********************.000000" },
+ { 1.234321234321234e36, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f", data[k].value);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%f %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.f %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015f %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050f %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.f %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2f %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2f %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "0.000000" },
+ { 1.234321234321234e-36L, "0.000000" },
+ { 1.234321234321234e-35L, "0.000000" },
+ { 1.234321234321234e-34L, "0.000000" },
+ { 1.234321234321234e-33L, "0.000000" },
+ { 1.234321234321234e-32L, "0.000000" },
+ { 1.234321234321234e-31L, "0.000000" },
+ { 1.234321234321234e-30L, "0.000000" },
+ { 1.234321234321234e-29L, "0.000000" },
+ { 1.234321234321234e-28L, "0.000000" },
+ { 1.234321234321234e-27L, "0.000000" },
+ { 1.234321234321234e-26L, "0.000000" },
+ { 1.234321234321234e-25L, "0.000000" },
+ { 1.234321234321234e-24L, "0.000000" },
+ { 1.234321234321234e-23L, "0.000000" },
+ { 1.234321234321234e-22L, "0.000000" },
+ { 1.234321234321234e-21L, "0.000000" },
+ { 1.234321234321234e-20L, "0.000000" },
+ { 1.234321234321234e-19L, "0.000000" },
+ { 1.234321234321234e-18L, "0.000000" },
+ { 1.234321234321234e-17L, "0.000000" },
+ { 1.234321234321234e-16L, "0.000000" },
+ { 1.234321234321234e-15L, "0.000000" },
+ { 1.234321234321234e-14L, "0.000000" },
+ { 1.234321234321234e-13L, "0.000000" },
+ { 1.234321234321234e-12L, "0.000000" },
+ { 1.234321234321234e-11L, "0.000000" },
+ { 1.234321234321234e-10L, "0.000000" },
+ { 1.234321234321234e-9L, "0.000000" },
+ { 1.234321234321234e-8L, "0.000000" },
+ { 1.234321234321234e-7L, "0.000000" },
+ { 1.234321234321234e-6L, "0.000001" },
+ { 1.234321234321234e-5L, "0.000012" },
+ { 1.234321234321234e-4L, "0.000123" },
+ { 1.234321234321234e-3L, "0.001234" },
+ { 1.234321234321234e-2L, "0.012343" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.234321" },
+ { 1.234321234321234e1L, "12.343212" },
+ { 1.234321234321234e2L, "123.432123" },
+ { 1.234321234321234e3L, "1234.321234" },
+ { 1.234321234321234e4L, "12343.212343" },
+ { 1.234321234321234e5L, "123432.123432" },
+ { 1.234321234321234e6L, "1234321.234321" },
+ { 1.234321234321234e7L, "12343212.343212" },
+ { 1.234321234321234e8L, "123432123.432123" },
+ { 1.234321234321234e9L, "1234321234.321234" },
+ { 1.234321234321234e10L, "12343212343.2123**" },
+ { 1.234321234321234e11L, "123432123432.123***" },
+ { 1.234321234321234e12L, "1234321234321.23****" },
+ { 1.234321234321234e13L, "12343212343212.3*****" },
+ { 1.234321234321234e14L, "123432123432123.******" },
+ { 1.234321234321234e15L, "1234321234321234.000000" },
+ { 1.234321234321234e16L, "123432123432123**.000000" },
+ { 1.234321234321234e17L, "123432123432123***.000000" },
+ { 1.234321234321234e18L, "123432123432123****.000000" },
+ { 1.234321234321234e19L, "123432123432123*****.000000" },
+ { 1.234321234321234e20L, "123432123432123******.000000" },
+ { 1.234321234321234e21L, "123432123432123*******.000000" },
+ { 1.234321234321234e22L, "123432123432123********.000000" },
+ { 1.234321234321234e23L, "123432123432123*********.000000" },
+ { 1.234321234321234e24L, "123432123432123**********.000000" },
+ { 1.234321234321234e25L, "123432123432123***********.000000" },
+ { 1.234321234321234e26L, "123432123432123************.000000" },
+ { 1.234321234321234e27L, "123432123432123*************.000000" },
+ { 1.234321234321234e28L, "123432123432123**************.000000" },
+ { 1.234321234321234e29L, "123432123432123***************.000000" },
+ { 1.234321234321234e30L, "123432123432123****************.000000" },
+ { 1.234321234321234e31L, "123432123432123*****************.000000" },
+ { 1.234321234321234e32L, "123432123432123******************.000000" },
+ { 1.234321234321234e33L, "123432123432123*******************.000000" },
+ { 1.234321234321234e34L, "123432123432123********************.000000" },
+ { 1.234321234321234e35L, "123432123432123*********************.000000" },
+ { 1.234321234321234e36L, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf", data[k].value);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2Lf %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2Lf %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %F format directive. */
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%F %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015F %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.F %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2F %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2F %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%LF %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2LF %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.2LF %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %e format directive. */
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.234321e-37" },
+ { 1.234321234321234e-36, "1.234321e-36" },
+ { 1.234321234321234e-35, "1.234321e-35" },
+ { 1.234321234321234e-34, "1.234321e-34" },
+ { 1.234321234321234e-33, "1.234321e-33" },
+ { 1.234321234321234e-32, "1.234321e-32" },
+ { 1.234321234321234e-31, "1.234321e-31" },
+ { 1.234321234321234e-30, "1.234321e-30" },
+ { 1.234321234321234e-29, "1.234321e-29" },
+ { 1.234321234321234e-28, "1.234321e-28" },
+ { 1.234321234321234e-27, "1.234321e-27" },
+ { 1.234321234321234e-26, "1.234321e-26" },
+ { 1.234321234321234e-25, "1.234321e-25" },
+ { 1.234321234321234e-24, "1.234321e-24" },
+ { 1.234321234321234e-23, "1.234321e-23" },
+ { 1.234321234321234e-22, "1.234321e-22" },
+ { 1.234321234321234e-21, "1.234321e-21" },
+ { 1.234321234321234e-20, "1.234321e-20" },
+ { 1.234321234321234e-19, "1.234321e-19" },
+ { 1.234321234321234e-18, "1.234321e-18" },
+ { 1.234321234321234e-17, "1.234321e-17" },
+ { 1.234321234321234e-16, "1.234321e-16" },
+ { 1.234321234321234e-15, "1.234321e-15" },
+ { 1.234321234321234e-14, "1.234321e-14" },
+ { 1.234321234321234e-13, "1.234321e-13" },
+ { 1.234321234321234e-12, "1.234321e-12" },
+ { 1.234321234321234e-11, "1.234321e-11" },
+ { 1.234321234321234e-10, "1.234321e-10" },
+ { 1.234321234321234e-9, "1.234321e-09" },
+ { 1.234321234321234e-8, "1.234321e-08" },
+ { 1.234321234321234e-7, "1.234321e-07" },
+ { 1.234321234321234e-6, "1.234321e-06" },
+ { 1.234321234321234e-5, "1.234321e-05" },
+ { 1.234321234321234e-4, "1.234321e-04" },
+ { 1.234321234321234e-3, "1.234321e-03" },
+ { 1.234321234321234e-2, "1.234321e-02" },
+ { 1.234321234321234e-1, "1.234321e-01" },
+ { 1.234321234321234, "1.234321e+00" },
+ { 1.234321234321234e1, "1.234321e+01" },
+ { 1.234321234321234e2, "1.234321e+02" },
+ { 1.234321234321234e3, "1.234321e+03" },
+ { 1.234321234321234e4, "1.234321e+04" },
+ { 1.234321234321234e5, "1.234321e+05" },
+ { 1.234321234321234e6, "1.234321e+06" },
+ { 1.234321234321234e7, "1.234321e+07" },
+ { 1.234321234321234e8, "1.234321e+08" },
+ { 1.234321234321234e9, "1.234321e+09" },
+ { 1.234321234321234e10, "1.234321e+10" },
+ { 1.234321234321234e11, "1.234321e+11" },
+ { 1.234321234321234e12, "1.234321e+12" },
+ { 1.234321234321234e13, "1.234321e+13" },
+ { 1.234321234321234e14, "1.234321e+14" },
+ { 1.234321234321234e15, "1.234321e+15" },
+ { 1.234321234321234e16, "1.234321e+16" },
+ { 1.234321234321234e17, "1.234321e+17" },
+ { 1.234321234321234e18, "1.234321e+18" },
+ { 1.234321234321234e19, "1.234321e+19" },
+ { 1.234321234321234e20, "1.234321e+20" },
+ { 1.234321234321234e21, "1.234321e+21" },
+ { 1.234321234321234e22, "1.234321e+22" },
+ { 1.234321234321234e23, "1.234321e+23" },
+ { 1.234321234321234e24, "1.234321e+24" },
+ { 1.234321234321234e25, "1.234321e+25" },
+ { 1.234321234321234e26, "1.234321e+26" },
+ { 1.234321234321234e27, "1.234321e+27" },
+ { 1.234321234321234e28, "1.234321e+28" },
+ { 1.234321234321234e29, "1.234321e+29" },
+ { 1.234321234321234e30, "1.234321e+30" },
+ { 1.234321234321234e31, "1.234321e+31" },
+ { 1.234321234321234e32, "1.234321e+32" },
+ { 1.234321234321234e33, "1.234321e+33" },
+ { 1.234321234321234e34, "1.234321e+34" },
+ { 1.234321234321234e35, "1.234321e+35" },
+ { 1.234321234321234e36, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%e %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%15e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-15e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.e %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.e %d", 9.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015e %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050e %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.e %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.4e %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.4e %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.234321e-37" },
+ { 1.234321234321234e-36L, "1.234321e-36" },
+ { 1.234321234321234e-35L, "1.234321e-35" },
+ { 1.234321234321234e-34L, "1.234321e-34" },
+ { 1.234321234321234e-33L, "1.234321e-33" },
+ { 1.234321234321234e-32L, "1.234321e-32" },
+ { 1.234321234321234e-31L, "1.234321e-31" },
+ { 1.234321234321234e-30L, "1.234321e-30" },
+ { 1.234321234321234e-29L, "1.234321e-29" },
+ { 1.234321234321234e-28L, "1.234321e-28" },
+ { 1.234321234321234e-27L, "1.234321e-27" },
+ { 1.234321234321234e-26L, "1.234321e-26" },
+ { 1.234321234321234e-25L, "1.234321e-25" },
+ { 1.234321234321234e-24L, "1.234321e-24" },
+ { 1.234321234321234e-23L, "1.234321e-23" },
+ { 1.234321234321234e-22L, "1.234321e-22" },
+ { 1.234321234321234e-21L, "1.234321e-21" },
+ { 1.234321234321234e-20L, "1.234321e-20" },
+ { 1.234321234321234e-19L, "1.234321e-19" },
+ { 1.234321234321234e-18L, "1.234321e-18" },
+ { 1.234321234321234e-17L, "1.234321e-17" },
+ { 1.234321234321234e-16L, "1.234321e-16" },
+ { 1.234321234321234e-15L, "1.234321e-15" },
+ { 1.234321234321234e-14L, "1.234321e-14" },
+ { 1.234321234321234e-13L, "1.234321e-13" },
+ { 1.234321234321234e-12L, "1.234321e-12" },
+ { 1.234321234321234e-11L, "1.234321e-11" },
+ { 1.234321234321234e-10L, "1.234321e-10" },
+ { 1.234321234321234e-9L, "1.234321e-09" },
+ { 1.234321234321234e-8L, "1.234321e-08" },
+ { 1.234321234321234e-7L, "1.234321e-07" },
+ { 1.234321234321234e-6L, "1.234321e-06" },
+ { 1.234321234321234e-5L, "1.234321e-05" },
+ { 1.234321234321234e-4L, "1.234321e-04" },
+ { 1.234321234321234e-3L, "1.234321e-03" },
+ { 1.234321234321234e-2L, "1.234321e-02" },
+ { 1.234321234321234e-1L, "1.234321e-01" },
+ { 1.234321234321234L, "1.234321e+00" },
+ { 1.234321234321234e1L, "1.234321e+01" },
+ { 1.234321234321234e2L, "1.234321e+02" },
+ { 1.234321234321234e3L, "1.234321e+03" },
+ { 1.234321234321234e4L, "1.234321e+04" },
+ { 1.234321234321234e5L, "1.234321e+05" },
+ { 1.234321234321234e6L, "1.234321e+06" },
+ { 1.234321234321234e7L, "1.234321e+07" },
+ { 1.234321234321234e8L, "1.234321e+08" },
+ { 1.234321234321234e9L, "1.234321e+09" },
+ { 1.234321234321234e10L, "1.234321e+10" },
+ { 1.234321234321234e11L, "1.234321e+11" },
+ { 1.234321234321234e12L, "1.234321e+12" },
+ { 1.234321234321234e13L, "1.234321e+13" },
+ { 1.234321234321234e14L, "1.234321e+14" },
+ { 1.234321234321234e15L, "1.234321e+15" },
+ { 1.234321234321234e16L, "1.234321e+16" },
+ { 1.234321234321234e17L, "1.234321e+17" },
+ { 1.234321234321234e18L, "1.234321e+18" },
+ { 1.234321234321234e19L, "1.234321e+19" },
+ { 1.234321234321234e20L, "1.234321e+20" },
+ { 1.234321234321234e21L, "1.234321e+21" },
+ { 1.234321234321234e22L, "1.234321e+22" },
+ { 1.234321234321234e23L, "1.234321e+23" },
+ { 1.234321234321234e24L, "1.234321e+24" },
+ { 1.234321234321234e25L, "1.234321e+25" },
+ { 1.234321234321234e26L, "1.234321e+26" },
+ { 1.234321234321234e27L, "1.234321e+27" },
+ { 1.234321234321234e28L, "1.234321e+28" },
+ { 1.234321234321234e29L, "1.234321e+29" },
+ { 1.234321234321234e30L, "1.234321e+30" },
+ { 1.234321234321234e31L, "1.234321e+31" },
+ { 1.234321234321234e32L, "1.234321e+32" },
+ { 1.234321234321234e33L, "1.234321e+33" },
+ { 1.234321234321234e34L, "1.234321e+34" },
+ { 1.234321234321234e35L, "1.234321e+35" },
+ { 1.234321234321234e36L, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.Le %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.Le %d", 9.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050Le %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.4Le %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.4Le %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %g format directive. */
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", 12.75, 33, 44, 55);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", 1234567.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.23432e-37" },
+ { 1.234321234321234e-36, "1.23432e-36" },
+ { 1.234321234321234e-35, "1.23432e-35" },
+ { 1.234321234321234e-34, "1.23432e-34" },
+ { 1.234321234321234e-33, "1.23432e-33" },
+ { 1.234321234321234e-32, "1.23432e-32" },
+ { 1.234321234321234e-31, "1.23432e-31" },
+ { 1.234321234321234e-30, "1.23432e-30" },
+ { 1.234321234321234e-29, "1.23432e-29" },
+ { 1.234321234321234e-28, "1.23432e-28" },
+ { 1.234321234321234e-27, "1.23432e-27" },
+ { 1.234321234321234e-26, "1.23432e-26" },
+ { 1.234321234321234e-25, "1.23432e-25" },
+ { 1.234321234321234e-24, "1.23432e-24" },
+ { 1.234321234321234e-23, "1.23432e-23" },
+ { 1.234321234321234e-22, "1.23432e-22" },
+ { 1.234321234321234e-21, "1.23432e-21" },
+ { 1.234321234321234e-20, "1.23432e-20" },
+ { 1.234321234321234e-19, "1.23432e-19" },
+ { 1.234321234321234e-18, "1.23432e-18" },
+ { 1.234321234321234e-17, "1.23432e-17" },
+ { 1.234321234321234e-16, "1.23432e-16" },
+ { 1.234321234321234e-15, "1.23432e-15" },
+ { 1.234321234321234e-14, "1.23432e-14" },
+ { 1.234321234321234e-13, "1.23432e-13" },
+ { 1.234321234321234e-12, "1.23432e-12" },
+ { 1.234321234321234e-11, "1.23432e-11" },
+ { 1.234321234321234e-10, "1.23432e-10" },
+ { 1.234321234321234e-9, "1.23432e-09" },
+ { 1.234321234321234e-8, "1.23432e-08" },
+ { 1.234321234321234e-7, "1.23432e-07" },
+ { 1.234321234321234e-6, "1.23432e-06" },
+ { 1.234321234321234e-5, "1.23432e-05" },
+ { 1.234321234321234e-4, "0.000123432" },
+ { 1.234321234321234e-3, "0.00123432" },
+ { 1.234321234321234e-2, "0.0123432" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.23432" },
+ { 1.234321234321234e1, "12.3432" },
+ { 1.234321234321234e2, "123.432" },
+ { 1.234321234321234e3, "1234.32" },
+ { 1.234321234321234e4, "12343.2" },
+ { 1.234321234321234e5, "123432" },
+ { 1.234321234321234e6, "1.23432e+06" },
+ { 1.234321234321234e7, "1.23432e+07" },
+ { 1.234321234321234e8, "1.23432e+08" },
+ { 1.234321234321234e9, "1.23432e+09" },
+ { 1.234321234321234e10, "1.23432e+10" },
+ { 1.234321234321234e11, "1.23432e+11" },
+ { 1.234321234321234e12, "1.23432e+12" },
+ { 1.234321234321234e13, "1.23432e+13" },
+ { 1.234321234321234e14, "1.23432e+14" },
+ { 1.234321234321234e15, "1.23432e+15" },
+ { 1.234321234321234e16, "1.23432e+16" },
+ { 1.234321234321234e17, "1.23432e+17" },
+ { 1.234321234321234e18, "1.23432e+18" },
+ { 1.234321234321234e19, "1.23432e+19" },
+ { 1.234321234321234e20, "1.23432e+20" },
+ { 1.234321234321234e21, "1.23432e+21" },
+ { 1.234321234321234e22, "1.23432e+22" },
+ { 1.234321234321234e23, "1.23432e+23" },
+ { 1.234321234321234e24, "1.23432e+24" },
+ { 1.234321234321234e25, "1.23432e+25" },
+ { 1.234321234321234e26, "1.23432e+26" },
+ { 1.234321234321234e27, "1.23432e+27" },
+ { 1.234321234321234e28, "1.23432e+28" },
+ { 1.234321234321234e29, "1.23432e+29" },
+ { 1.234321234321234e30, "1.23432e+30" },
+ { 1.234321234321234e31, "1.23432e+31" },
+ { 1.234321234321234e32, "1.23432e+32" },
+ { 1.234321234321234e33, "1.23432e+33" },
+ { 1.234321234321234e34, "1.23432e+34" },
+ { 1.234321234321234e35, "1.23432e+35" },
+ { 1.234321234321234e36, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", -0.03125, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", -zerod, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%g %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.g %d", 1.75, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.g %d", 9.75, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010g %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050g %d", NaNd (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.g %d", 1234.0, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.5g %d", 999.951, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.5g %d", 999.996, 33, 44, 55);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", 12.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* A larger positive number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", 1234567.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.23432e-37" },
+ { 1.234321234321234e-36L, "1.23432e-36" },
+ { 1.234321234321234e-35L, "1.23432e-35" },
+ { 1.234321234321234e-34L, "1.23432e-34" },
+ { 1.234321234321234e-33L, "1.23432e-33" },
+ { 1.234321234321234e-32L, "1.23432e-32" },
+ { 1.234321234321234e-31L, "1.23432e-31" },
+ { 1.234321234321234e-30L, "1.23432e-30" },
+ { 1.234321234321234e-29L, "1.23432e-29" },
+ { 1.234321234321234e-28L, "1.23432e-28" },
+ { 1.234321234321234e-27L, "1.23432e-27" },
+ { 1.234321234321234e-26L, "1.23432e-26" },
+ { 1.234321234321234e-25L, "1.23432e-25" },
+ { 1.234321234321234e-24L, "1.23432e-24" },
+ { 1.234321234321234e-23L, "1.23432e-23" },
+ { 1.234321234321234e-22L, "1.23432e-22" },
+ { 1.234321234321234e-21L, "1.23432e-21" },
+ { 1.234321234321234e-20L, "1.23432e-20" },
+ { 1.234321234321234e-19L, "1.23432e-19" },
+ { 1.234321234321234e-18L, "1.23432e-18" },
+ { 1.234321234321234e-17L, "1.23432e-17" },
+ { 1.234321234321234e-16L, "1.23432e-16" },
+ { 1.234321234321234e-15L, "1.23432e-15" },
+ { 1.234321234321234e-14L, "1.23432e-14" },
+ { 1.234321234321234e-13L, "1.23432e-13" },
+ { 1.234321234321234e-12L, "1.23432e-12" },
+ { 1.234321234321234e-11L, "1.23432e-11" },
+ { 1.234321234321234e-10L, "1.23432e-10" },
+ { 1.234321234321234e-9L, "1.23432e-09" },
+ { 1.234321234321234e-8L, "1.23432e-08" },
+ { 1.234321234321234e-7L, "1.23432e-07" },
+ { 1.234321234321234e-6L, "1.23432e-06" },
+ { 1.234321234321234e-5L, "1.23432e-05" },
+ { 1.234321234321234e-4L, "0.000123432" },
+ { 1.234321234321234e-3L, "0.00123432" },
+ { 1.234321234321234e-2L, "0.0123432" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.23432" },
+ { 1.234321234321234e1L, "12.3432" },
+ { 1.234321234321234e2L, "123.432" },
+ { 1.234321234321234e3L, "1234.32" },
+ { 1.234321234321234e4L, "12343.2" },
+ { 1.234321234321234e5L, "123432" },
+ { 1.234321234321234e6L, "1.23432e+06" },
+ { 1.234321234321234e7L, "1.23432e+07" },
+ { 1.234321234321234e8L, "1.23432e+08" },
+ { 1.234321234321234e9L, "1.23432e+09" },
+ { 1.234321234321234e10L, "1.23432e+10" },
+ { 1.234321234321234e11L, "1.23432e+11" },
+ { 1.234321234321234e12L, "1.23432e+12" },
+ { 1.234321234321234e13L, "1.23432e+13" },
+ { 1.234321234321234e14L, "1.23432e+14" },
+ { 1.234321234321234e15L, "1.23432e+15" },
+ { 1.234321234321234e16L, "1.23432e+16" },
+ { 1.234321234321234e17L, "1.23432e+17" },
+ { 1.234321234321234e18L, "1.23432e+18" },
+ { 1.234321234321234e19L, "1.23432e+19" },
+ { 1.234321234321234e20L, "1.23432e+20" },
+ { 1.234321234321234e21L, "1.23432e+21" },
+ { 1.234321234321234e22L, "1.23432e+22" },
+ { 1.234321234321234e23L, "1.23432e+23" },
+ { 1.234321234321234e24L, "1.23432e+24" },
+ { 1.234321234321234e25L, "1.23432e+25" },
+ { 1.234321234321234e26L, "1.23432e+26" },
+ { 1.234321234321234e27L, "1.23432e+27" },
+ { 1.234321234321234e28L, "1.23432e+28" },
+ { 1.234321234321234e29L, "1.23432e+29" },
+ { 1.234321234321234e30L, "1.23432e+30" },
+ { 1.234321234321234e31L, "1.23432e+31" },
+ { 1.234321234321234e32L, "1.23432e+32" },
+ { 1.234321234321234e33L, "1.23432e+33" },
+ { 1.234321234321234e34L, "1.23432e+34" },
+ { 1.234321234321234e35L, "1.23432e+35" },
+ { 1.234321234321234e36L, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ }
+ }
+
+ { /* A negative number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", -0.03125L, 33, 44, 55);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative zero. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", minus_zerol, 33, 44, 55);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Positive infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Negative infinity. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+#endif
+
+ { /* Width. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_LEFT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%-10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%+Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_SPACE. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "% Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ALT. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%#.Lg %d", 9.75L, 33, 44, 55);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%010Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%015Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%050Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision. */
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%.Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with no rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.5Lg %d", 999.951L, 33, 44, 55);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ { /* Precision with rounding. */
+ char result[100];
+ int retval =
+ my_sprintf (result, "%.5Lg %d", 999.996L, 33, 44, 55);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %n format directive. */
+
+ {
+ int count = -1;
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%d %n", 123, &count, 33, 44, 55);
+ ASSERT (strcmp (result, "123 ") == 0);
+ ASSERT (retval == strlen (result));
+ ASSERT (count == 4);
+ }
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%2$d %1$d", 33, 55);
+ ASSERT (strcmp (result, "55 33") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the grouping flag. */
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "%'d %d", 1234567, 99);
+ ASSERT (result[strlen (result) - 1] == '9');
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the left-adjust flag. */
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "a%*sc", -3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "a%-*sc", 3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[1000];
+ int retval =
+ my_sprintf (result, "a%-*sc", -3, "b");
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of large precision. */
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.4000d %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.*d %d", 4000, 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.4000d %d", -1234567, 99);
+ size_t i;
+ ASSERT (result[0] == '-');
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[1 + i] == '0');
+ ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.4000u %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.4000o %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%.4000x %d", 1234567, 99);
+ size_t i;
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char result[5000];
+ int retval =
+ my_sprintf (result, "%#.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result[0] == '0');
+ ASSERT (result[1] == 'x');
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[2 + i] == '0');
+ ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ {
+ char input[5000];
+ char result[5000];
+ int retval;
+ size_t i;
+
+ for (i = 0; i < sizeof (input) - 1; i++)
+ input[i] = 'a' + ((1000000 / (i + 1)) % 26);
+ input[i] = '\0';
+ retval = my_sprintf (result, "%.4000s %d", input, 99);
+ ASSERT (memcmp (result, input, 4000) == 0);
+ ASSERT (strcmp (result + 4000, " 99") == 0);
+ ASSERT (retval == strlen (result));
+ }
+
+ /* Test the support of the %s format directive. */
+
+ /* To verify that these tests succeed, it is necessary to run them under
+ a tool that checks against invalid memory accesses, such as ElectricFence
+ or "valgrind --tool=memcheck". */
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ char *block;
+ char result[5000];
+ int retval;
+
+ block = (char *) malloc (i);
+ memcpy (block, "abcdefgh", i);
+ retval = my_sprintf (result, "%.*s", (int) i, block);
+ ASSERT (memcmp (result, block, i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (block);
+ }
+ }
+#if HAVE_WCHAR_T
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ wchar_t *block;
+ size_t j;
+ char result[5000];
+ int retval;
+
+ block = (wchar_t *) malloc (i * sizeof (wchar_t));
+ for (j = 0; j < i; j++)
+ block[j] = "abcdefgh"[j];
+ retval = my_sprintf (result, "%.*ls", (int) i, block);
+ ASSERT (memcmp (result, "abcdefgh", i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (block);
+ }
+ }
+#endif
+}
diff --git a/tests/gnu/test-stat.c b/tests/gnu/test-stat.c
new file mode 100755
index 00000000..05dd3759
--- /dev/null
+++ b/tests/gnu/test-stat.c
@@ -0,0 +1,56 @@
+/* Tests of stat.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+/* Caution: stat may be a function-like macro. Although this
+ signature check must pass, it may be the signature of the real (and
+ broken) stat rather than rpl_stat. Most code should not use the
+ address of stat. */
+#include "signature.h"
+SIGNATURE_CHECK (stat, int, (char const *, struct stat *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <unistd.h>
+
+#include "pathmax.h"
+#include "same-inode.h"
+#include "macros.h"
+
+#define BASE "test-stat.t"
+
+#include "test-stat.h"
+
+/* Wrapper around stat, which works even if stat is a function-like
+ macro, where test_stat_func(stat) would do the wrong thing. */
+static int
+do_stat (char const *name, struct stat *st)
+{
+ return stat (name, st);
+}
+
+int
+main (void)
+{
+ return test_stat_func (do_stat, true);
+}
diff --git a/tests/gnu/test-stat.h b/tests/gnu/test-stat.h
new file mode 100755
index 00000000..f0904204
--- /dev/null
+++ b/tests/gnu/test-stat.h
@@ -0,0 +1,100 @@
+/* Tests of stat.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both stat(n,buf) and
+ fstatat(AT_FDCWD,n,buf,0). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_stat_func (int (*func) (char const *, struct stat *), bool print)
+{
+ struct stat st1;
+ struct stat st2;
+ char cwd[PATH_MAX];
+
+ ASSERT (getcwd (cwd, PATH_MAX) == cwd);
+ ASSERT (func (".", &st1) == 0);
+ ASSERT (func ("./", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (func (cwd, &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+ ASSERT (func ("/", &st1) == 0);
+ ASSERT (func ("///", &st2) == 0);
+ ASSERT (SAME_INODE (st1, st2));
+
+ errno = 0;
+ ASSERT (func ("", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch", &st1) == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nosuch/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ ASSERT (func (BASE "file", &st1) == 0);
+ errno = 0;
+ ASSERT (func (BASE "file/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ /* Now for some symlink tests, where supported. We set up:
+ link1 -> directory
+ link2 -> file
+ link3 -> dangling
+ link4 -> loop
+ then test behavior with trailing slash.
+ */
+ if (symlink (".", BASE "link1") != 0)
+ {
+ ASSERT (unlink (BASE "file") == 0);
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+ ASSERT (symlink (BASE "file", BASE "link2") == 0);
+ ASSERT (symlink (BASE "nosuch", BASE "link3") == 0);
+ ASSERT (symlink (BASE "link4", BASE "link4") == 0);
+
+ ASSERT (func (BASE "link1/", &st1) == 0);
+ ASSERT (S_ISDIR (st1.st_mode));
+
+ errno = 0;
+ ASSERT (func (BASE "link2/", &st1) == -1);
+ ASSERT (errno == ENOTDIR);
+
+ errno = 0;
+ ASSERT (func (BASE "link3/", &st1) == -1);
+ ASSERT (errno == ENOENT);
+
+ errno = 0;
+ ASSERT (func (BASE "link4/", &st1) == -1);
+ ASSERT (errno == ELOOP);
+
+ /* Cleanup. */
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ ASSERT (unlink (BASE "link3") == 0);
+ ASSERT (unlink (BASE "link4") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-stdbool.c b/tests/gnu/test-stdbool.c
new file mode 100755
index 00000000..560e0e53
--- /dev/null
+++ b/tests/gnu/test-stdbool.c
@@ -0,0 +1,95 @@
+/* Test of <stdbool.h> substitute.
+ Copyright (C) 2002-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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdbool.h>
+
+#ifndef bool
+ "error: bool is not defined"
+#endif
+#ifndef false
+ "error: false is not defined"
+#endif
+#if false
+ "error: false is not 0"
+#endif
+#ifndef true
+ "error: true is not defined"
+#endif
+#if true != 1
+ "error: true is not 1"
+#endif
+#ifndef __bool_true_false_are_defined
+ "error: __bool_true_false_are_defined is not defined"
+#endif
+
+#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>. */
+struct s { _Bool s: 1; _Bool t; } s;
+#endif
+
+char a[true == 1 ? 1 : -1];
+char b[false == 0 ? 1 : -1];
+char c[__bool_true_false_are_defined == 1 ? 1 : -1];
+#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>. */
+char d[(bool) 0.5 == true ? 1 : -1];
+bool e = &s;
+#endif
+char f[(_Bool) 0.0 == false ? 1 : -1];
+char g[true];
+char h[sizeof (_Bool)];
+#if 0 /* See above. */
+char i[sizeof s.t];
+#endif
+enum { j = false, k = true, l = false * true, m = true * 256 };
+_Bool n[m];
+char o[sizeof n == m * sizeof n[0] ? 1 : -1];
+char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
+#if 0 /* Cannot be guaranteed with gnulib's <stdbool.h>. */
+#if defined __xlc__ || defined __GNUC__
+ /* Catch a bug in IBM AIX xlc compiler version 6.0.0.0
+ reported by James Lemley on 2005-10-05; see
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-10/msg00086.html
+ This test is not quite right, since xlc is allowed to
+ reject this program, as the initializer for xlcbug is
+ not one of the forms that C requires support for.
+ However, doing the test right would require a run-time
+ test, and that would make cross-compilation harder.
+ Let us hope that IBM fixes the xlc bug, and also adds
+ support for this kind of constant expression. In the
+ meantime, this test will reject xlc, which is OK, since
+ our stdbool.h substitute should suffice. We also test
+ this with GCC, where it should work, to detect more
+ quickly whether someone messes up the test in the
+ future. */
+ char digs[] = "0123456789";
+ int xlcbug = 1 / (&(digs + 5)[-2 + (bool) 1] == &digs[4] ? 1 : -1);
+#endif
+#endif
+/* Catch a bug in an HP-UX C compiler. See
+ http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
+ http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
+ */
+_Bool q = true;
+_Bool *pq = &q;
+
+int
+main ()
+{
+ return 0;
+}
diff --git a/tests/gnu/test-stddef.c b/tests/gnu/test-stddef.c
new file mode 100755
index 00000000..d047e57b
--- /dev/null
+++ b/tests/gnu/test-stddef.c
@@ -0,0 +1,38 @@
+/* Test of <stddef.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stddef.h>
+
+#include "verify.h"
+
+/* Check that appropriate types are defined. */
+wchar_t a = 'c';
+ptrdiff_t b = 1;
+size_t c = 2;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-stdint.c b/tests/gnu/test-stdint.c
new file mode 100755
index 00000000..9cec2e2f
--- /dev/null
+++ b/tests/gnu/test-stdint.c
@@ -0,0 +1,360 @@
+/* Test of <stdint.h> substitute.
+ Copyright (C) 2006-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2006. */
+
+#include <config.h>
+
+/* Whether to enable pedantic checks. */
+#define DO_PEDANTIC 0
+
+#define __STDC_LIMIT_MACROS 1 /* to make it work also in C++ mode */
+#include <stdint.h>
+
+#include "verify.h"
+#include "intprops.h"
+
+#if __GNUC__ >= 2 && DO_PEDANTIC
+# define verify_same_types(expr1,expr2) \
+ extern void _verify_func(__LINE__) (__typeof__ (expr1) *); \
+ extern void _verify_func(__LINE__) (__typeof__ (expr2) *);
+# define _verify_func(line) _verify_func2(line)
+# define _verify_func2(line) verify_func_ ## line
+#else
+# define verify_same_types(expr1,expr2) extern void verify_func (int)
+#endif
+
+/* 7.18.1.1. Exact-width integer types */
+/* 7.18.2.1. Limits of exact-width integer types */
+
+int8_t a1[3] = { INT8_C (17), INT8_MIN, INT8_MAX };
+verify (TYPE_MINIMUM (int8_t) == INT8_MIN);
+verify (TYPE_MAXIMUM (int8_t) == INT8_MAX);
+verify_same_types (INT8_MIN, (int8_t) 0 + 0);
+verify_same_types (INT8_MAX, (int8_t) 0 + 0);
+
+int16_t a2[3] = { INT16_C (17), INT16_MIN, INT16_MAX };
+verify (TYPE_MINIMUM (int16_t) == INT16_MIN);
+verify (TYPE_MAXIMUM (int16_t) == INT16_MAX);
+verify_same_types (INT16_MIN, (int16_t) 0 + 0);
+verify_same_types (INT16_MAX, (int16_t) 0 + 0);
+
+int32_t a3[3] = { INT32_C (17), INT32_MIN, INT32_MAX };
+verify (TYPE_MINIMUM (int32_t) == INT32_MIN);
+verify (TYPE_MAXIMUM (int32_t) == INT32_MAX);
+verify_same_types (INT32_MIN, (int32_t) 0 + 0);
+verify_same_types (INT32_MAX, (int32_t) 0 + 0);
+
+#ifdef INT64_MAX
+int64_t a4[3] = { INT64_C (17), INT64_MIN, INT64_MAX };
+verify (TYPE_MINIMUM (int64_t) == INT64_MIN);
+verify (TYPE_MAXIMUM (int64_t) == INT64_MAX);
+verify_same_types (INT64_MIN, (int64_t) 0 + 0);
+verify_same_types (INT64_MAX, (int64_t) 0 + 0);
+#endif
+
+uint8_t b1[2] = { UINT8_C (17), UINT8_MAX };
+verify (TYPE_MAXIMUM (uint8_t) == UINT8_MAX);
+verify_same_types (UINT8_MAX, (uint8_t) 0 + 0);
+
+uint16_t b2[2] = { UINT16_C (17), UINT16_MAX };
+verify (TYPE_MAXIMUM (uint16_t) == UINT16_MAX);
+verify_same_types (UINT16_MAX, (uint16_t) 0 + 0);
+
+uint32_t b3[2] = { UINT32_C (17), UINT32_MAX };
+verify (TYPE_MAXIMUM (uint32_t) == UINT32_MAX);
+verify_same_types (UINT32_MAX, (uint32_t) 0 + 0);
+
+#ifdef UINT64_MAX
+uint64_t b4[2] = { UINT64_C (17), UINT64_MAX };
+verify (TYPE_MAXIMUM (uint64_t) == UINT64_MAX);
+verify_same_types (UINT64_MAX, (uint64_t) 0 + 0);
+#endif
+
+#if INT8_MIN && INT8_MAX && INT16_MIN && INT16_MAX && INT32_MIN && INT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT8_MAX && UINT16_MAX && UINT32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.2. Minimum-width integer types */
+/* 7.18.2.2. Limits of minimum-width integer types */
+
+int_least8_t c1[3] = { 17, INT_LEAST8_MIN, INT_LEAST8_MAX };
+verify (TYPE_MINIMUM (int_least8_t) == INT_LEAST8_MIN);
+verify (TYPE_MAXIMUM (int_least8_t) == INT_LEAST8_MAX);
+verify_same_types (INT_LEAST8_MIN, (int_least8_t) 0 + 0);
+verify_same_types (INT_LEAST8_MAX, (int_least8_t) 0 + 0);
+
+int_least16_t c2[3] = { 17, INT_LEAST16_MIN, INT_LEAST16_MAX };
+verify (TYPE_MINIMUM (int_least16_t) == INT_LEAST16_MIN);
+verify (TYPE_MAXIMUM (int_least16_t) == INT_LEAST16_MAX);
+verify_same_types (INT_LEAST16_MIN, (int_least16_t) 0 + 0);
+verify_same_types (INT_LEAST16_MAX, (int_least16_t) 0 + 0);
+
+int_least32_t c3[3] = { 17, INT_LEAST32_MIN, INT_LEAST32_MAX };
+verify (TYPE_MINIMUM (int_least32_t) == INT_LEAST32_MIN);
+verify (TYPE_MAXIMUM (int_least32_t) == INT_LEAST32_MAX);
+verify_same_types (INT_LEAST32_MIN, (int_least32_t) 0 + 0);
+verify_same_types (INT_LEAST32_MAX, (int_least32_t) 0 + 0);
+
+#ifdef INT_LEAST64_MAX
+int_least64_t c4[3] = { 17, INT_LEAST64_MIN, INT_LEAST64_MAX };
+verify (TYPE_MINIMUM (int_least64_t) == INT_LEAST64_MIN);
+verify (TYPE_MAXIMUM (int_least64_t) == INT_LEAST64_MAX);
+verify_same_types (INT_LEAST64_MIN, (int_least64_t) 0 + 0);
+verify_same_types (INT_LEAST64_MAX, (int_least64_t) 0 + 0);
+#endif
+
+uint_least8_t d1[2] = { 17, UINT_LEAST8_MAX };
+verify (TYPE_MAXIMUM (uint_least8_t) == UINT_LEAST8_MAX);
+verify_same_types (UINT_LEAST8_MAX, (uint_least8_t) 0 + 0);
+
+uint_least16_t d2[2] = { 17, UINT_LEAST16_MAX };
+verify (TYPE_MAXIMUM (uint_least16_t) == UINT_LEAST16_MAX);
+verify_same_types (UINT_LEAST16_MAX, (uint_least16_t) 0 + 0);
+
+uint_least32_t d3[2] = { 17, UINT_LEAST32_MAX };
+verify (TYPE_MAXIMUM (uint_least32_t) == UINT_LEAST32_MAX);
+verify_same_types (UINT_LEAST32_MAX, (uint_least32_t) 0 + 0);
+
+#ifdef UINT_LEAST64_MAX
+uint_least64_t d4[2] = { 17, UINT_LEAST64_MAX };
+verify (TYPE_MAXIMUM (uint_least64_t) == UINT_LEAST64_MAX);
+verify_same_types (UINT_LEAST64_MAX, (uint_least64_t) 0 + 0);
+#endif
+
+#if INT_LEAST8_MIN && INT_LEAST8_MAX && INT_LEAST16_MIN && INT_LEAST16_MAX && INT_LEAST32_MIN && INT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_LEAST8_MAX && UINT_LEAST16_MAX && UINT_LEAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.3. Fastest minimum-width integer types */
+/* 7.18.2.3. Limits of fastest minimum-width integer types */
+
+int_fast8_t e1[3] = { 17, INT_FAST8_MIN, INT_FAST8_MAX };
+verify (TYPE_MINIMUM (int_fast8_t) == INT_FAST8_MIN);
+verify (TYPE_MAXIMUM (int_fast8_t) == INT_FAST8_MAX);
+verify_same_types (INT_FAST8_MIN, (int_fast8_t) 0 + 0);
+verify_same_types (INT_FAST8_MAX, (int_fast8_t) 0 + 0);
+
+int_fast16_t e2[3] = { 17, INT_FAST16_MIN, INT_FAST16_MAX };
+verify (TYPE_MINIMUM (int_fast16_t) == INT_FAST16_MIN);
+verify (TYPE_MAXIMUM (int_fast16_t) == INT_FAST16_MAX);
+verify_same_types (INT_FAST16_MIN, (int_fast16_t) 0 + 0);
+verify_same_types (INT_FAST16_MAX, (int_fast16_t) 0 + 0);
+
+int_fast32_t e3[3] = { 17, INT_FAST32_MIN, INT_FAST32_MAX };
+verify (TYPE_MINIMUM (int_fast32_t) == INT_FAST32_MIN);
+verify (TYPE_MAXIMUM (int_fast32_t) == INT_FAST32_MAX);
+verify_same_types (INT_FAST32_MIN, (int_fast32_t) 0 + 0);
+verify_same_types (INT_FAST32_MAX, (int_fast32_t) 0 + 0);
+
+#ifdef INT_FAST64_MAX
+int_fast64_t e4[3] = { 17, INT_FAST64_MIN, INT_FAST64_MAX };
+verify (TYPE_MINIMUM (int_fast64_t) == INT_FAST64_MIN);
+verify (TYPE_MAXIMUM (int_fast64_t) == INT_FAST64_MAX);
+verify_same_types (INT_FAST64_MIN, (int_fast64_t) 0 + 0);
+verify_same_types (INT_FAST64_MAX, (int_fast64_t) 0 + 0);
+#endif
+
+uint_fast8_t f1[2] = { 17, UINT_FAST8_MAX };
+verify (TYPE_MAXIMUM (uint_fast8_t) == UINT_FAST8_MAX);
+verify_same_types (UINT_FAST8_MAX, (uint_fast8_t) 0 + 0);
+
+uint_fast16_t f2[2] = { 17, UINT_FAST16_MAX };
+verify (TYPE_MAXIMUM (uint_fast16_t) == UINT_FAST16_MAX);
+verify_same_types (UINT_FAST16_MAX, (uint_fast16_t) 0 + 0);
+
+uint_fast32_t f3[2] = { 17, UINT_FAST32_MAX };
+verify (TYPE_MAXIMUM (uint_fast32_t) == UINT_FAST32_MAX);
+verify_same_types (UINT_FAST32_MAX, (uint_fast32_t) 0 + 0);
+
+#ifdef UINT_FAST64_MAX
+uint_fast64_t f4[2] = { 17, UINT_FAST64_MAX };
+verify (TYPE_MAXIMUM (uint_fast64_t) == UINT_FAST64_MAX);
+verify_same_types (UINT_FAST64_MAX, (uint_fast64_t) 0 + 0);
+#endif
+
+#if INT_FAST8_MIN && INT_FAST8_MAX && INT_FAST16_MIN && INT_FAST16_MAX && INT_FAST32_MIN && INT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if UINT_FAST8_MAX && UINT_FAST16_MAX && UINT_FAST32_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.4. Integer types capable of holding object pointers */
+/* 7.18.2.4. Limits of integer types capable of holding object pointers */
+
+intptr_t g[3] = { 17, INTPTR_MIN, INTPTR_MAX };
+verify (TYPE_MINIMUM (intptr_t) == INTPTR_MIN);
+verify (TYPE_MAXIMUM (intptr_t) == INTPTR_MAX);
+verify_same_types (INTPTR_MIN, (intptr_t) 0 + 0);
+verify_same_types (INTPTR_MAX, (intptr_t) 0 + 0);
+
+uintptr_t h[2] = { 17, UINTPTR_MAX };
+verify (TYPE_MAXIMUM (uintptr_t) == UINTPTR_MAX);
+verify_same_types (UINTPTR_MAX, (uintptr_t) 0 + 0);
+
+#if INTPTR_MIN && INTPTR_MAX && UINTPTR_MAX
+/* ok */
+#else
+err or;
+#endif
+
+/* 7.18.1.5. Greatest-width integer types */
+/* 7.18.2.5. Limits of greatest-width integer types */
+
+intmax_t i[3] = { INTMAX_C (17), INTMAX_MIN, INTMAX_MAX };
+verify (TYPE_MINIMUM (intmax_t) == INTMAX_MIN);
+verify (TYPE_MAXIMUM (intmax_t) == INTMAX_MAX);
+verify_same_types (INTMAX_MIN, (intmax_t) 0 + 0);
+verify_same_types (INTMAX_MAX, (intmax_t) 0 + 0);
+
+uintmax_t j[2] = { UINTMAX_C (17), UINTMAX_MAX };
+verify (TYPE_MAXIMUM (uintmax_t) == UINTMAX_MAX);
+verify_same_types (UINTMAX_MAX, (uintmax_t) 0 + 0);
+
+/* As of 2007, Sun C and HP-UX 10.20 cc don't support 'long long' constants in
+ the preprocessor. */
+#if !(defined __SUNPRO_C || (defined __hpux && !defined __GNUC__))
+#if INTMAX_MIN && INTMAX_MAX && UINTMAX_MAX
+/* ok */
+#else
+err or;
+#endif
+#endif
+
+/* 7.18.3. Limits of other integer types */
+
+#include <stddef.h>
+
+verify (TYPE_MINIMUM (ptrdiff_t) == PTRDIFF_MIN);
+verify (TYPE_MAXIMUM (ptrdiff_t) == PTRDIFF_MAX);
+verify_same_types (PTRDIFF_MIN, (ptrdiff_t) 0 + 0);
+verify_same_types (PTRDIFF_MAX, (ptrdiff_t) 0 + 0);
+
+#if PTRDIFF_MIN && PTRDIFF_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#include <signal.h>
+
+verify (TYPE_MINIMUM (sig_atomic_t) == SIG_ATOMIC_MIN);
+verify (TYPE_MAXIMUM (sig_atomic_t) == SIG_ATOMIC_MAX);
+verify_same_types (SIG_ATOMIC_MIN, (sig_atomic_t) 0 + 0);
+verify_same_types (SIG_ATOMIC_MAX, (sig_atomic_t) 0 + 0);
+
+#if SIG_ATOMIC_MIN != 17 && SIG_ATOMIC_MAX
+/* ok */
+#else
+err or;
+#endif
+
+verify (TYPE_MAXIMUM (size_t) == SIZE_MAX);
+verify_same_types (SIZE_MAX, (size_t) 0 + 0);
+
+#if SIZE_MAX
+/* ok */
+#else
+err or;
+#endif
+
+#if HAVE_WCHAR_T
+verify (TYPE_MINIMUM (wchar_t) == WCHAR_MIN);
+verify (TYPE_MAXIMUM (wchar_t) == WCHAR_MAX);
+verify_same_types (WCHAR_MIN, (wchar_t) 0 + 0);
+verify_same_types (WCHAR_MAX, (wchar_t) 0 + 0);
+
+# if WCHAR_MIN != 17 && WCHAR_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+#if HAVE_WINT_T
+# include <wchar.h>
+
+verify (TYPE_MINIMUM (wint_t) == WINT_MIN);
+verify (TYPE_MAXIMUM (wint_t) == WINT_MAX);
+verify_same_types (WINT_MIN, (wint_t) 0 + 0);
+verify_same_types (WINT_MAX, (wint_t) 0 + 0);
+
+# if WINT_MIN != 17 && WINT_MAX
+/* ok */
+# else
+err or;
+# endif
+#endif
+
+/* 7.18.4. Macros for integer constants */
+
+verify (INT8_C (17) == 17);
+verify_same_types (INT8_C (17), (int_least8_t)0 + 0);
+verify (UINT8_C (17) == 17);
+verify_same_types (UINT8_C (17), (uint_least8_t)0 + 0);
+
+verify (INT16_C (17) == 17);
+verify_same_types (INT16_C (17), (int_least16_t)0 + 0);
+verify (UINT16_C (17) == 17);
+verify_same_types (UINT16_C (17), (uint_least16_t)0 + 0);
+
+verify (INT32_C (17) == 17);
+verify_same_types (INT32_C (17), (int_least32_t)0 + 0);
+verify (UINT32_C (17) == 17);
+verify_same_types (UINT32_C (17), (uint_least32_t)0 + 0);
+
+#ifdef INT64_C
+verify (INT64_C (17) == 17);
+verify_same_types (INT64_C (17), (int_least64_t)0 + 0);
+#endif
+#ifdef UINT64_C
+verify (UINT64_C (17) == 17);
+verify_same_types (UINT64_C (17), (uint_least64_t)0 + 0);
+#endif
+
+verify (INTMAX_C (17) == 17);
+verify_same_types (INTMAX_C (17), (intmax_t)0 + 0);
+verify (UINTMAX_C (17) == 17);
+verify_same_types (UINTMAX_C (17), (uintmax_t)0 + 0);
+
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-stdio.c b/tests/gnu/test-stdio.c
new file mode 100755
index 00000000..87100576
--- /dev/null
+++ b/tests/gnu/test-stdio.c
@@ -0,0 +1,43 @@
+/* Test of <stdio.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "verify.h"
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the types are all defined. */
+fpos_t t1;
+off_t t2;
+size_t t3;
+ssize_t t4;
+va_list t5;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-stdlib.c b/tests/gnu/test-stdlib.c
new file mode 100755
index 00000000..4bd8715f
--- /dev/null
+++ b/tests/gnu/test-stdlib.c
@@ -0,0 +1,43 @@
+/* Test of <stdlib.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "verify.h"
+
+int exitcode;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ /* Check that some macros are defined and different integer constants. */
+ switch (exitcode)
+ {
+ case EXIT_SUCCESS:
+ case EXIT_FAILURE:
+ break;
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-strchrnul.c b/tests/gnu/test-strchrnul.c
new file mode 100755
index 00000000..49d8278c
--- /dev/null
+++ b/tests/gnu/test-strchrnul.c
@@ -0,0 +1,86 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ * Written by Eric Blake and Bruno Haible
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strchrnul, char *, (char const *, int));
+
+#include <stdlib.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ size_t n = 0x100000;
+ char *input = malloc (n + 1);
+ ASSERT (input);
+
+ input[0] = 'a';
+ input[1] = 'b';
+ memset (input + 2, 'c', 1024);
+ memset (input + 1026, 'd', n - 1028);
+ input[n - 2] = 'e';
+ input[n - 1] = 'a';
+ input[n] = '\0';
+
+ /* Basic behavior tests. */
+ ASSERT (strchrnul (input, 'a') == input);
+ ASSERT (strchrnul (input, 'b') == input + 1);
+ ASSERT (strchrnul (input, 'c') == input + 2);
+ ASSERT (strchrnul (input, 'd') == input + 1026);
+
+ ASSERT (strchrnul (input + 1, 'a') == input + n - 1);
+ ASSERT (strchrnul (input + 1, 'e') == input + n - 2);
+
+ ASSERT (strchrnul (input, 'f') == input + n);
+ ASSERT (strchrnul (input, '\0') == input + n);
+
+ /* Check that a very long haystack is handled quickly if the byte is
+ found near the beginning. */
+ {
+ size_t repeat = 10000;
+ for (; repeat > 0; repeat--)
+ {
+ ASSERT (strchrnul (input, 'c') == input + 2);
+ }
+ }
+
+ /* Alignment tests. */
+ {
+ int i, j;
+ for (i = 0; i < 32; i++)
+ {
+ for (j = 0; j < 256; j++)
+ input[i + j] = (j + 1) & 0xff;
+ for (j = 1; j < 256; j++)
+ {
+ ASSERT (strchrnul (input + i, j) == input + i + j - 1);
+ input[i + j - 1] = (j == 1 ? 2 : 1);
+ ASSERT (strchrnul (input + i, j) == input + i + 255);
+ input[i + j - 1] = j;
+ }
+ }
+ }
+
+ free (input);
+
+ return 0;
+}
diff --git a/tests/gnu/test-strerror.c b/tests/gnu/test-strerror.c
new file mode 100755
index 00000000..11ab7e39
--- /dev/null
+++ b/tests/gnu/test-strerror.c
@@ -0,0 +1,57 @@
+/* Test of strerror() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strerror, char *, (int));
+
+#include <errno.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ char *str;
+
+ str = strerror (EACCES);
+ ASSERT (str);
+ ASSERT (*str);
+
+ str = strerror (ETIMEDOUT);
+ ASSERT (str);
+ ASSERT (*str);
+
+ str = strerror (EOVERFLOW);
+ ASSERT (str);
+ ASSERT (*str);
+
+ str = strerror (0);
+ ASSERT (str);
+ ASSERT (*str);
+
+ str = strerror (-3);
+ ASSERT (str);
+ ASSERT (*str);
+
+ return 0;
+}
diff --git a/tests/gnu/test-striconv.c b/tests/gnu/test-striconv.c
new file mode 100755
index 00000000..d0f249da
--- /dev/null
+++ b/tests/gnu/test-striconv.c
@@ -0,0 +1,180 @@
+/* Test of character set conversion.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "striconv.h"
+
+#if HAVE_ICONV
+# include <iconv.h>
+#endif
+
+#include <errno.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main ()
+{
+#if HAVE_ICONV
+ /* Assume that iconv() supports at least the encodings ASCII, ISO-8859-1,
+ and UTF-8. */
+ iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO-8859-1", "UTF-8");
+
+ ASSERT (cd_88591_to_utf8 != (iconv_t)(-1));
+ ASSERT (cd_utf8_to_88591 != (iconv_t)(-1));
+
+ /* ------------------------- Test mem_cd_iconv() ------------------------- */
+
+ /* Test conversion from ISO-8859-1 to UTF-8 with no errors. */
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static const char expected[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ char *result = NULL;
+ size_t length = 0;
+ int retval = mem_cd_iconv (input, strlen (input), cd_88591_to_utf8,
+ &result, &length);
+ ASSERT (retval == 0);
+ ASSERT (length == strlen (expected));
+ ASSERT (result != NULL && memcmp (result, expected, strlen (expected)) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with no errors. */
+ {
+ static const char input[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ static const char expected[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char *result = NULL;
+ size_t length = 0;
+ int retval = mem_cd_iconv (input, strlen (input), cd_utf8_to_88591,
+ &result, &length);
+ ASSERT (retval == 0);
+ ASSERT (length == strlen (expected));
+ ASSERT (result != NULL && memcmp (result, expected, strlen (expected)) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EILSEQ. */
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char *result = NULL;
+ size_t length = 0;
+ int retval = mem_cd_iconv (input, strlen (input), cd_utf8_to_88591,
+ &result, &length);
+ ASSERT (retval == -1 && errno == EILSEQ);
+ ASSERT (result == NULL);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EINVAL. */
+ {
+ static const char input[] = "\342";
+ char *result = NULL;
+ size_t length = 0;
+ int retval = mem_cd_iconv (input, strlen (input), cd_utf8_to_88591,
+ &result, &length);
+ ASSERT (retval == 0);
+ ASSERT (length == 0);
+ free (result);
+ }
+
+ /* ------------------------- Test str_cd_iconv() ------------------------- */
+
+ /* Test conversion from ISO-8859-1 to UTF-8 with no errors. */
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static const char expected[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ char *result = str_cd_iconv (input, cd_88591_to_utf8);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with no errors. */
+ {
+ static const char input[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ static const char expected[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char *result = str_cd_iconv (input, cd_utf8_to_88591);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EILSEQ. */
+ {
+ static const char input[] = "Costs: 27 \342\202\254"; /* EURO SIGN */
+ char *result = str_cd_iconv (input, cd_utf8_to_88591);
+ ASSERT (result == NULL && errno == EILSEQ);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EINVAL. */
+ {
+ static const char input[] = "\342";
+ char *result = str_cd_iconv (input, cd_utf8_to_88591);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
+
+ iconv_close (cd_88591_to_utf8);
+ iconv_close (cd_utf8_to_88591);
+
+ /* -------------------------- Test str_iconv() -------------------------- */
+
+ /* Test conversion from ISO-8859-1 to UTF-8 with no errors. */
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ static const char expected[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ char *result = str_iconv (input, "ISO-8859-1", "UTF-8");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with no errors. */
+ {
+ static const char input[] = "\303\204rger mit b\303\266sen B\303\274bchen ohne Augenma\303\237";
+ static const char expected[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char *result = str_iconv (input, "UTF-8", "ISO-8859-1");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0);
+ free (result);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EILSEQ. */
+ {
+ static const char input[] = "Costs: 27 \342\202\254"; /* EURO SIGN */
+ char *result = str_iconv (input, "UTF-8", "ISO-8859-1");
+ ASSERT (result == NULL && errno == EILSEQ);
+ }
+
+ /* Test conversion from UTF-8 to ISO-8859-1 with EINVAL. */
+ {
+ static const char input[] = "\342";
+ char *result = str_iconv (input, "UTF-8", "ISO-8859-1");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
+
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-string.c b/tests/gnu/test-string.c
new file mode 100755
index 00000000..019a8174
--- /dev/null
+++ b/tests/gnu/test-string.c
@@ -0,0 +1,33 @@
+/* Test of <string.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <string.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-strtod.c b/tests/gnu/test-strtod.c
new file mode 100755
index 00000000..cdb57b22
--- /dev/null
+++ b/tests/gnu/test-strtod.c
@@ -0,0 +1,918 @@
+/*
+ * Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ * Written by Eric Blake
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU 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 General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (strtod, double, (char const *, char **));
+
+#include <errno.h>
+#include <float.h>
+#include <math.h>
+#include <string.h>
+
+#include "isnand-nolibm.h"
+#include "macros.h"
+
+/* Avoid requiring -lm just for fabs. */
+#define FABS(d) ((d) < 0.0 ? -(d) : (d))
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zero instead. */
+double zero = 0.0;
+
+int
+main (void)
+{
+ int status = 0;
+ /* Subject sequence empty or invalid. */
+ {
+ const char input[] = "";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " ";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " +";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " .";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " .e0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input); /* IRIX 6.5, OSF/1 5.1 */
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " +.e-0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input); /* IRIX 6.5, OSF/1 5.1 */
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " in";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+ {
+ const char input[] = " na";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+ }
+
+ /* Simple floating point values. */
+ {
+ const char input[] = "1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1.";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = ".5";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ /* FIXME - gnulib's version is rather inaccurate. It would be
+ nice to guarantee an exact result, but for now, we settle for a
+ 1-ulp error. */
+ ASSERT (FABS (result - 0.5) < DBL_EPSILON);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = " 1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "+1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "-1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == -1.0);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 3);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e+0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 4);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e-0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 4);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 10.0);
+ ASSERT (ptr == input + 3);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "5e-1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ /* FIXME - gnulib's version is rather inaccurate. It would be
+ nice to guarantee an exact result, but for now, we settle for a
+ 1-ulp error. */
+ ASSERT (FABS (result - 0.5) < DBL_EPSILON);
+ ASSERT (ptr == input + 4);
+ ASSERT (errno == 0);
+ }
+
+ /* Zero. */
+ {
+ const char input[] = "0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = ".0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0e0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 3);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0e+9999999";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 10);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0e-9999999";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 10);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "-0";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!!signbit (result) == !!signbit (-zero)); /* IRIX 6.5, OSF/1 4.0 */
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+
+ /* Suffixes. */
+ {
+ const char input[] = "1f";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1.f";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e+";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1e-";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1E 2";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0); /* HP-UX 11.11, IRIX 6.5, OSF/1 4.0 */
+ ASSERT (ptr == input + 1); /* HP-UX 11.11, IRIX 6.5 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "00x1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 2);
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "-0x";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!!signbit (result) == !!signbit (-zero)); /* MacOS X 10.3, FreeBSD 6.2, IRIX 6.5, OSF/1 4.0 */
+ ASSERT (ptr == input + 2); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0xg";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0xp";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x.";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0xp+";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0xp+1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x.p+1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 1); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2 */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "1p+1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + 1);
+ ASSERT (errno == 0);
+ }
+
+ /* Overflow/underflow. */
+ {
+ const char input[] = "1E1000000";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == HUGE_VAL);
+ ASSERT (ptr == input + 9); /* OSF/1 5.1 */
+ ASSERT (errno == ERANGE);
+ }
+ {
+ const char input[] = "-1E1000000";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == -HUGE_VAL);
+ ASSERT (ptr == input + 10);
+ ASSERT (errno == ERANGE);
+ }
+ {
+ const char input[] = "1E-100000";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (0.0 <= result && result <= DBL_MIN);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input + 9);
+ ASSERT (errno == ERANGE);
+ }
+ {
+ const char input[] = "-1E-100000";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (-DBL_MIN <= result && result <= 0.0);
+#if 0
+ /* FIXME - this is glibc bug 5995; POSIX allows returning positive
+ 0 on negative underflow, even though quality of implementation
+ demands preserving the sign. Disable this test until fixed
+ glibc is more prevalent. */
+ ASSERT (!!signbit (result) == !!signbit (-zero)); /* glibc-2.3.6, mingw */
+#endif
+ ASSERT (ptr == input + 10);
+ ASSERT (errno == ERANGE);
+ }
+
+ /* Infinity. */
+ {
+ const char input[] = "iNf";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == HUGE_VAL); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 3); /* OpenBSD 4.0, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw */
+ ASSERT (errno == 0); /* HP-UX 11.11, OSF/1 4.0 */
+ }
+ {
+ const char input[] = "-InF";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == -HUGE_VAL); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 4); /* OpenBSD 4.0, HP-UX 11.00, IRIX 6.5, OSF/1 4.0, Solaris 9, mingw */
+ ASSERT (errno == 0); /* HP-UX 11.11, OSF/1 4.0 */
+ }
+ {
+ const char input[] = "infinite";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == HUGE_VAL); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 3); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0); /* OSF/1 4.0 */
+ }
+ {
+ const char input[] = "infinitY";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == HUGE_VAL); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 8); /* OpenBSD 4.0, HP-UX 11.00, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw */
+ ASSERT (errno == 0); /* HP-UX 11.11, OSF/1 4.0 */
+ }
+ {
+ const char input[] = "infinitY.";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == HUGE_VAL); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 8); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0); /* OSF/1 4.0 */
+ }
+
+ /* NaN. Some processors set the sign bit of the default NaN, so all
+ we check is that using a sign changes the result. */
+ {
+ const char input[] = "-nan";
+ char *ptr1;
+ char *ptr2;
+ double result1;
+ double result2;
+ errno = 0;
+ result1 = strtod (input, &ptr1);
+ result2 = strtod (input + 1, &ptr2);
+#if 1 /* All known CPUs support NaNs. */
+ ASSERT (isnand (result1)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (isnand (result2)); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+# if 0
+ /* Sign bits of NaN is a portability sticking point, not worth
+ worrying about. */
+ ASSERT (!!signbit (result1) != !!signbit (result2)); /* glibc-2.3.6, IRIX 6.5, OSF/1 5.1, mingw */
+# endif
+ ASSERT (ptr1 == input + 4); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
+ ASSERT (ptr2 == input + 4); /* OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
+ ASSERT (errno == 0); /* HP-UX 11.11 */
+#else
+ ASSERT (result1 == 0.0);
+ ASSERT (result2 == 0.0);
+ ASSERT (!signbit (result1));
+ ASSERT (!signbit (result2));
+ ASSERT (ptr1 == input);
+ ASSERT (ptr2 == input + 1);
+ ASSERT (errno == 0 || errno == EINVAL);
+#endif
+ }
+ {
+ const char input[] = "+nan(";
+ char *ptr1;
+ char *ptr2;
+ double result1;
+ double result2;
+ errno = 0;
+ result1 = strtod (input, &ptr1);
+ result2 = strtod (input + 1, &ptr2);
+#if 1 /* All known CPUs support NaNs. */
+ ASSERT (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (!!signbit (result1) == !!signbit (result2));
+ ASSERT (ptr1 == input + 4); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
+ ASSERT (ptr2 == input + 4); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 2.5.1, mingw */
+ ASSERT (errno == 0);
+#else
+ ASSERT (result1 == 0.0);
+ ASSERT (result2 == 0.0);
+ ASSERT (!signbit (result1));
+ ASSERT (!signbit (result2));
+ ASSERT (ptr1 == input);
+ ASSERT (ptr2 == input + 1);
+ ASSERT (errno == 0 || errno == EINVAL);
+#endif
+ }
+ {
+ const char input[] = "-nan()";
+ char *ptr1;
+ char *ptr2;
+ double result1;
+ double result2;
+ errno = 0;
+ result1 = strtod (input, &ptr1);
+ result2 = strtod (input + 1, &ptr2);
+#if 1 /* All known CPUs support NaNs. */
+ ASSERT (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+# if 0
+ /* Sign bits of NaN is a portability sticking point, not worth
+ worrying about. */
+ ASSERT (!!signbit (result1) != !!signbit (result2)); /* glibc-2.3.6, IRIX 6.5, OSF/1 5.1, mingw */
+# endif
+ ASSERT (ptr1 == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr2 == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0);
+#else
+ ASSERT (result1 == 0.0);
+ ASSERT (result2 == 0.0);
+ ASSERT (!signbit (result1));
+ ASSERT (!signbit (result2));
+ ASSERT (ptr1 == input);
+ ASSERT (ptr2 == input + 1);
+ ASSERT (errno == 0 || errno == EINVAL);
+#endif
+ }
+ {
+ const char input[] = " nan().";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+#if 1 /* All known CPUs support NaNs. */
+ ASSERT (isnand (result)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + 6); /* glibc-2.3.6, MacOS X 10.3, FreeBSD 6.2, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0);
+#else
+ ASSERT (result == 0.0);
+ ASSERT (!signbit (result));
+ ASSERT (ptr == input);
+ ASSERT (errno == 0 || errno == EINVAL);
+#endif
+ }
+ {
+ /* The behavior of nan(0) is implementation-defined, but all
+ implementations we know of which handle optional
+ n-char-sequences handle nan(0) the same as nan(). */
+ const char input[] = "-nan(0).";
+ char *ptr1;
+ char *ptr2;
+ double result1;
+ double result2;
+ errno = 0;
+ result1 = strtod (input, &ptr1);
+ result2 = strtod (input + 1, &ptr2);
+#if 1 /* All known CPUs support NaNs. */
+ ASSERT (isnand (result1)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (isnand (result2)); /* OpenBSD 4.0, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+# if 0
+ /* Sign bits of NaN is a portability sticking point, not worth
+ worrying about. */
+ ASSERT (!!signbit (result1) != !!signbit (result2)); /* glibc-2.3.6, IRIX 6.5, OSF/1 5.1, mingw */
+# endif
+ ASSERT (ptr1 == input + 7); /* glibc-2.3.6, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr2 == input + 7); /* glibc-2.3.6, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (errno == 0);
+#else
+ ASSERT (result1 == 0.0);
+ ASSERT (result2 == 0.0);
+ ASSERT (!signbit (result1));
+ ASSERT (!signbit (result2));
+ ASSERT (ptr1 == input);
+ ASSERT (ptr2 == input + 1);
+ ASSERT (errno == 0 || errno == EINVAL);
+#endif
+ }
+
+ /* Hex. */
+ {
+ const char input[] = "0xa";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 10.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 3); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0XA";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 10.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 3); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x1p";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 3); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x1p+";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 3); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x1p+1";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 2.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 6); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+ {
+ const char input[] = "0x1p+1a";
+ char *ptr;
+ double result;
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 2.0); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (ptr == input + 6); /* NetBSD 3.0, OpenBSD 4.0, AIX 5.1, HP-UX 11.11, IRIX 6.5, OSF/1 5.1, Solaris 10, mingw */
+ ASSERT (errno == 0);
+ }
+
+ /* Large buffers. */
+ {
+ size_t m = 1000000;
+ char *input = malloc (m + 1);
+ if (input)
+ {
+ char *ptr;
+ double result;
+ memset (input, '\t', m - 1);
+ input[m - 1] = '1';
+ input[m] = '\0';
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + m);
+ ASSERT (errno == 0);
+ }
+ free (input);
+ }
+ {
+ size_t m = 1000000;
+ char *input = malloc (m + 1);
+ if (input)
+ {
+ char *ptr;
+ double result;
+ memset (input, '0', m - 1);
+ input[m - 1] = '1';
+ input[m] = '\0';
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0);
+ ASSERT (ptr == input + m);
+ ASSERT (errno == 0);
+ }
+ free (input);
+ }
+#if 0
+ /* Newlib has an artificial limit of 20000 for the exponent. TODO -
+ gnulib should fix this. */
+ {
+ size_t m = 1000000;
+ char *input = malloc (m + 1);
+ if (input)
+ {
+ char *ptr;
+ double result;
+ input[0] = '.';
+ memset (input + 1, '0', m - 10);
+ input[m - 9] = '1';
+ input[m - 8] = 'e';
+ input[m - 7] = '+';
+ input[m - 6] = '9';
+ input[m - 5] = '9';
+ input[m - 4] = '9';
+ input[m - 3] = '9';
+ input[m - 2] = '9';
+ input[m - 1] = '1';
+ input[m] = '\0';
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + m); /* OSF/1 5.1 */
+ ASSERT (errno == 0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ }
+ free (input);
+ }
+ {
+ size_t m = 1000000;
+ char *input = malloc (m + 1);
+ if (input)
+ {
+ char *ptr;
+ double result;
+ input[0] = '1';
+ memset (input + 1, '0', m - 9);
+ input[m - 8] = 'e';
+ input[m - 7] = '-';
+ input[m - 6] = '9';
+ input[m - 5] = '9';
+ input[m - 4] = '9';
+ input[m - 3] = '9';
+ input[m - 2] = '9';
+ input[m - 1] = '1';
+ input[m] = '\0';
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 1.0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ ASSERT (ptr == input + m);
+ ASSERT (errno == 0); /* MacOS X 10.3, FreeBSD 6.2, NetBSD 3.0, OpenBSD 4.0, IRIX 6.5, OSF/1 5.1, mingw */
+ }
+ free (input);
+ }
+#endif
+ {
+ size_t m = 1000000;
+ char *input = malloc (m + 1);
+ if (input)
+ {
+ char *ptr;
+ double result;
+ input[0] = '-';
+ input[1] = '0';
+ input[2] = 'e';
+ input[3] = '1';
+ memset (input + 4, '0', m - 3);
+ input[m] = '\0';
+ errno = 0;
+ result = strtod (input, &ptr);
+ ASSERT (result == 0.0);
+ ASSERT (!!signbit (result) == !!signbit (-zero)); /* IRIX 6.5, OSF/1 4.0 */
+ ASSERT (ptr == input + m);
+ ASSERT (errno == 0);
+ }
+ free (input);
+ }
+
+ /* Rounding. */
+ /* TODO - is it worth some tests of rounding for typical IEEE corner
+ cases, such as .5 ULP rounding up to the smallest denormal and
+ not causing underflow, or DBL_MIN - .5 ULP not causing an
+ infinite loop? */
+
+ return status;
+}
diff --git a/tests/gnu/test-symlink.c b/tests/gnu/test-symlink.c
new file mode 100755
index 00000000..d2df54c4
--- /dev/null
+++ b/tests/gnu/test-symlink.c
@@ -0,0 +1,47 @@
+/* Tests of symlink.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (symlink, int, (char const *, char const *));
+
+#include <fcntl.h>
+#include <errno.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <sys/stat.h>
+
+#include "ignore-value.h"
+#include "macros.h"
+
+#define BASE "test-symlink.t"
+
+#include "test-symlink.h"
+
+int
+main (void)
+{
+ /* Remove any leftovers from a previous partial run. */
+ ignore_value (system ("rm -rf " BASE "*"));
+
+ return test_symlink (symlink, true);
+}
diff --git a/tests/gnu/test-symlink.h b/tests/gnu/test-symlink.h
new file mode 100755
index 00000000..0c92bd40
--- /dev/null
+++ b/tests/gnu/test-symlink.h
@@ -0,0 +1,95 @@
+/* Tests of symlink.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+/* This file is designed to test both symlink(a,b) and
+ symlinkat(a,AT_FDCWD,b). FUNC is the function to test. Assumes
+ that BASE and ASSERT are already defined, and that appropriate
+ headers are already included. If PRINT, warn before skipping
+ symlink tests with status 77. */
+
+static int
+test_symlink (int (*func) (char const *, char const *), bool print)
+{
+ if (func ("nowhere", BASE "link1"))
+ {
+ if (print)
+ fputs ("skipping test: symlinks not supported on this file system\n",
+ stderr);
+ return 77;
+ }
+
+ /* Some systems allow the creation of 0-length symlinks as a synonym
+ for "."; but most reject it. */
+ {
+ int status;
+ errno = 0;
+ status = func ("", BASE "link2");
+ if (status == -1)
+ ASSERT (errno == ENOENT || errno == EINVAL);
+ else
+ {
+ ASSERT (status == 0);
+ ASSERT (unlink (BASE "link2") == 0);
+ }
+ }
+
+ /* Sanity checks of failures. */
+ errno = 0;
+ ASSERT (func ("nowhere", "") == -1);
+ ASSERT (errno == ENOENT);
+ errno = 0;
+ ASSERT (func ("nowhere", ".") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ errno = 0;
+ ASSERT (func ("somewhere", BASE "link1") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "link2/") == -1);
+ ASSERT (errno == ENOTDIR || errno == ENOENT);
+ ASSERT (mkdir (BASE "dir", 0700) == 0);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "dir") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "dir/") == -1);
+ ASSERT (errno == EEXIST || errno == EINVAL);
+ ASSERT (close (creat (BASE "file", 0600)) == 0);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "file") == -1);
+ ASSERT (errno == EEXIST);
+ errno = 0;
+ ASSERT (func ("nowhere", BASE "file/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+
+ /* Trailing slash must always be rejected. */
+ ASSERT (unlink (BASE "link1") == 0);
+ ASSERT (func (BASE "link2", BASE "link1") == 0);
+ errno = 0;
+ ASSERT (func (BASE "nowhere", BASE "link1/") == -1);
+ ASSERT (errno == EEXIST || errno == ENOTDIR || errno == ENOENT);
+ errno = 0;
+ ASSERT (unlink (BASE "link2") == -1);
+ ASSERT (errno == ENOENT);
+
+ /* Cleanup. */
+ ASSERT (rmdir (BASE "dir") == 0);
+ ASSERT (unlink (BASE "file") == 0);
+ ASSERT (unlink (BASE "link1") == 0);
+
+ return 0;
+}
diff --git a/tests/gnu/test-sys_stat.c b/tests/gnu/test-sys_stat.c
new file mode 100755
index 00000000..5f1aacd1
--- /dev/null
+++ b/tests/gnu/test-sys_stat.c
@@ -0,0 +1,288 @@
+/* Test of <sys/stat.h> substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/stat.h>
+
+#include "verify.h"
+
+/* Check the existence of some macros. */
+int a[] =
+ {
+ S_IFMT,
+ S_IFBLK, S_IFCHR, S_IFDIR, S_IFIFO, S_IFREG,
+#ifdef S_IFLNK /* missing on mingw and djgpp */
+ S_IFLNK,
+#endif
+#ifdef S_IFSOCK /* missing on mingw and djgpp */
+ S_IFSOCK,
+#endif
+ S_IRWXU, S_IRUSR, S_IWUSR, S_IXUSR,
+ S_IRWXG, S_IRGRP, S_IWGRP, S_IXGRP,
+ S_IRWXO, S_IROTH, S_IWOTH, S_IXOTH,
+ S_ISUID, S_ISGID, S_ISVTX,
+ S_ISBLK (S_IFREG),
+ S_ISCHR (S_IFREG),
+ S_ISDIR (S_IFREG),
+ S_ISFIFO (S_IFREG),
+ S_ISREG (S_IFREG),
+ S_ISLNK (S_IFREG),
+ S_ISSOCK (S_IFREG),
+ S_ISDOOR (S_IFREG),
+ S_ISMPB (S_IFREG),
+ S_ISNAM (S_IFREG),
+ S_ISNWK (S_IFREG),
+ S_ISPORT (S_IFREG),
+ S_ISCTG (S_IFREG),
+ S_ISOFD (S_IFREG),
+ S_ISOFL (S_IFREG),
+ S_ISWHT (S_IFREG)
+ };
+
+/* Sanity checks. */
+
+verify (S_IRWXU == (S_IRUSR | S_IWUSR | S_IXUSR));
+verify (S_IRWXG == (S_IRGRP | S_IWGRP | S_IXGRP));
+verify (S_IRWXO == (S_IROTH | S_IWOTH | S_IXOTH));
+
+verify (S_ISBLK (S_IFBLK));
+verify (!S_ISBLK (S_IFCHR));
+verify (!S_ISBLK (S_IFDIR));
+verify (!S_ISBLK (S_IFIFO));
+verify (!S_ISBLK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISBLK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISBLK (S_IFSOCK));
+#endif
+
+verify (!S_ISCHR (S_IFBLK));
+verify (S_ISCHR (S_IFCHR));
+verify (!S_ISCHR (S_IFDIR));
+verify (!S_ISCHR (S_IFIFO));
+verify (!S_ISCHR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCHR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCHR (S_IFSOCK));
+#endif
+
+verify (!S_ISDIR (S_IFBLK));
+verify (!S_ISDIR (S_IFCHR));
+verify (S_ISDIR (S_IFDIR));
+verify (!S_ISDIR (S_IFIFO));
+verify (!S_ISDIR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDIR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDIR (S_IFSOCK));
+#endif
+
+verify (!S_ISFIFO (S_IFBLK));
+verify (!S_ISFIFO (S_IFCHR));
+verify (!S_ISFIFO (S_IFDIR));
+verify (S_ISFIFO (S_IFIFO));
+verify (!S_ISFIFO (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISFIFO (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISFIFO (S_IFSOCK));
+#endif
+
+verify (!S_ISREG (S_IFBLK));
+verify (!S_ISREG (S_IFCHR));
+verify (!S_ISREG (S_IFDIR));
+verify (!S_ISREG (S_IFIFO));
+verify (S_ISREG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISREG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISREG (S_IFSOCK));
+#endif
+
+verify (!S_ISLNK (S_IFBLK));
+verify (!S_ISLNK (S_IFCHR));
+verify (!S_ISLNK (S_IFDIR));
+verify (!S_ISLNK (S_IFIFO));
+verify (!S_ISLNK (S_IFREG));
+#ifdef S_IFLNK
+verify (S_ISLNK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISLNK (S_IFSOCK));
+#endif
+
+verify (!S_ISSOCK (S_IFBLK));
+verify (!S_ISSOCK (S_IFCHR));
+verify (!S_ISSOCK (S_IFDIR));
+verify (!S_ISSOCK (S_IFIFO));
+verify (!S_ISSOCK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISSOCK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (S_ISSOCK (S_IFSOCK));
+#endif
+
+verify (!S_ISDOOR (S_IFBLK));
+verify (!S_ISDOOR (S_IFCHR));
+verify (!S_ISDOOR (S_IFDIR));
+verify (!S_ISDOOR (S_IFIFO));
+verify (!S_ISDOOR (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISDOOR (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISDOOR (S_IFSOCK));
+#endif
+
+verify (!S_ISMPB (S_IFBLK));
+verify (!S_ISMPB (S_IFCHR));
+verify (!S_ISMPB (S_IFDIR));
+verify (!S_ISMPB (S_IFIFO));
+verify (!S_ISMPB (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISMPB (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISMPB (S_IFSOCK));
+#endif
+
+verify (!S_ISNAM (S_IFBLK));
+verify (!S_ISNAM (S_IFCHR));
+verify (!S_ISNAM (S_IFDIR));
+verify (!S_ISNAM (S_IFIFO));
+verify (!S_ISNAM (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNAM (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNAM (S_IFSOCK));
+#endif
+
+verify (!S_ISNWK (S_IFBLK));
+verify (!S_ISNWK (S_IFCHR));
+verify (!S_ISNWK (S_IFDIR));
+verify (!S_ISNWK (S_IFIFO));
+verify (!S_ISNWK (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISNWK (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISNWK (S_IFSOCK));
+#endif
+
+verify (!S_ISPORT (S_IFBLK));
+verify (!S_ISPORT (S_IFCHR));
+verify (!S_ISPORT (S_IFDIR));
+verify (!S_ISPORT (S_IFIFO));
+verify (!S_ISPORT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISPORT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISPORT (S_IFSOCK));
+#endif
+
+verify (!S_ISCTG (S_IFBLK));
+verify (!S_ISCTG (S_IFCHR));
+verify (!S_ISCTG (S_IFDIR));
+verify (!S_ISCTG (S_IFIFO));
+verify (!S_ISCTG (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISCTG (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISCTG (S_IFSOCK));
+#endif
+
+verify (!S_ISOFD (S_IFBLK));
+verify (!S_ISOFD (S_IFCHR));
+verify (!S_ISOFD (S_IFDIR));
+verify (!S_ISOFD (S_IFIFO));
+verify (!S_ISOFD (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFD (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFD (S_IFSOCK));
+#endif
+
+verify (!S_ISOFL (S_IFBLK));
+verify (!S_ISOFL (S_IFCHR));
+verify (!S_ISOFL (S_IFDIR));
+verify (!S_ISOFL (S_IFIFO));
+verify (!S_ISOFL (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISOFL (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISOFL (S_IFSOCK));
+#endif
+
+verify (!S_ISWHT (S_IFBLK));
+verify (!S_ISWHT (S_IFCHR));
+verify (!S_ISWHT (S_IFDIR));
+verify (!S_ISWHT (S_IFIFO));
+verify (!S_ISWHT (S_IFREG));
+#ifdef S_IFLNK
+verify (!S_ISWHT (S_IFLNK));
+#endif
+#ifdef S_IFSOCK
+verify (!S_ISWHT (S_IFSOCK));
+#endif
+
+/* POSIX 2008 requires traditional encoding of permission constants. */
+verify (S_IRWXU == 00700);
+verify (S_IRUSR == 00400);
+verify (S_IWUSR == 00200);
+verify (S_IXUSR == 00100);
+verify (S_IRWXG == 00070);
+verify (S_IRGRP == 00040);
+verify (S_IWGRP == 00020);
+verify (S_IXGRP == 00010);
+verify (S_IRWXO == 00007);
+verify (S_IROTH == 00004);
+verify (S_IWOTH == 00002);
+verify (S_IXOTH == 00001);
+verify (S_ISUID == 04000);
+verify (S_ISGID == 02000);
+verify (S_ISVTX == 01000);
+
+#if ((0 <= UTIME_NOW && UTIME_NOW < 1000000000) \
+ || (0 <= UTIME_OMIT && UTIME_OMIT < 1000000000) \
+ || UTIME_NOW == UTIME_OMIT)
+invalid UTIME macros
+#endif
+
+/* Check the existence of some types. */
+nlink_t t1;
+
+struct timespec t2;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-sys_time.c b/tests/gnu/test-sys_time.c
new file mode 100755
index 00000000..2ab849e9
--- /dev/null
+++ b/tests/gnu/test-sys_time.c
@@ -0,0 +1,29 @@
+/* Test of <sys/time.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <sys/time.h>
+
+struct timeval a;
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-sys_wait.c b/tests/gnu/test-sys_wait.c
new file mode 100755
index 00000000..8c0170ed
--- /dev/null
+++ b/tests/gnu/test-sys_wait.c
@@ -0,0 +1,30 @@
+/* Test of <sys/wait.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <sys/wait.h>
+
+/* Check for existence of required types. */
+static pid_t a;
+
+int
+main (void)
+{
+ return a;
+}
diff --git a/tests/gnu/test-time.c b/tests/gnu/test-time.c
new file mode 100755
index 00000000..8e250bd2
--- /dev/null
+++ b/tests/gnu/test-time.c
@@ -0,0 +1,35 @@
+/* Test of <time.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <time.h>
+
+#include "verify.h"
+
+struct timespec a;
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-unistd.c b/tests/gnu/test-unistd.c
new file mode 100755
index 00000000..ec02eeef
--- /dev/null
+++ b/tests/gnu/test-unistd.c
@@ -0,0 +1,56 @@
+/* Test of <unistd.h> substitute.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <unistd.h>
+
+#include "verify.h"
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+/* Check that the various SEEK_* macros are defined. */
+int sk[] = { SEEK_CUR, SEEK_END, SEEK_SET };
+
+/* Check that the various *_FILENO macros are defined. */
+#if ! (defined STDIN_FILENO \
+ && (STDIN_FILENO + STDOUT_FILENO + STDERR_FILENO == 3))
+missing or broken *_FILENO macros
+#endif
+
+/* Check that the types are all defined. */
+size_t t1;
+ssize_t t2;
+#ifdef TODO /* Not implemented in gnulib yet */
+uid_t t3;
+gid_t t4;
+#endif
+off_t t5;
+pid_t t6;
+#ifdef TODO
+useconds_t t7;
+intptr_t t8;
+#endif
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-unsetenv.c b/tests/gnu/test-unsetenv.c
new file mode 100755
index 00000000..7b92ff37
--- /dev/null
+++ b/tests/gnu/test-unsetenv.c
@@ -0,0 +1,61 @@
+/* Tests of unsetenv.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009. */
+
+#include <config.h>
+
+#include <stdlib.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (unsetenv, int, (char const *));
+
+#include <errno.h>
+#include <string.h>
+#include <unistd.h>
+
+#include "macros.h"
+
+int
+main (void)
+{
+ char entry[] = "b=2";
+
+ /* Test removal when multiple entries present. */
+ ASSERT (putenv ((char *) "a=1") == 0);
+ ASSERT (putenv (entry) == 0);
+ entry[0] = 'a'; /* Unspecified what getenv("a") would be at this point. */
+ ASSERT (unsetenv ("a") == 0); /* Both entries will be removed. */
+ ASSERT (getenv ("a") == NULL);
+ ASSERT (unsetenv ("a") == 0);
+
+ /* Required to fail with EINVAL. */
+ errno = 0;
+ ASSERT (unsetenv ("") == -1);
+ ASSERT (errno == EINVAL);
+ errno = 0;
+ ASSERT (unsetenv ("a=b") == -1);
+ ASSERT (errno == EINVAL);
+#if 0
+ /* glibc and gnulib's implementation guarantee this, but POSIX no
+ longer requires it: http://austingroupbugs.net/view.php?id=185 */
+ errno = 0;
+ ASSERT (unsetenv (NULL) == -1);
+ ASSERT (errno == EINVAL);
+#endif
+
+ return 0;
+}
diff --git a/tests/gnu/test-update-copyright.sh b/tests/gnu/test-update-copyright.sh
new file mode 100755
index 00000000..2d1022a9
--- /dev/null
+++ b/tests/gnu/test-update-copyright.sh
@@ -0,0 +1,526 @@
+#!/bin/sh
+# Test suite for update-copyright.
+# Copyright (C) 2009-2010 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+diffout=`diff -u /dev/null /dev/null 2>&1`
+if test x"$diffout" = x"" && test $? -eq 0; then
+ compare() { diff -u "$@"; }
+else
+ compare() { cmp "$@"; }
+fi
+
+TMP_BASE=update-copyright.test
+trap 'rm -f $TMP_BASE*' 0 1 2 3 15
+
+## --------------------------------- ##
+## Skip if user does not have perl. ##
+## --------------------------------- ##
+
+TMP=$TMP_BASE
+s=$TMP-script
+cat <<\EOF > $s
+eval '(exit $?0)' && eval 'exec perl -wS -0777 -pi "$0" ${1+"$@"}'
+ & eval 'exec perl -wS -0777 -pi "$0" $argv:q'
+ if 0;
+s/a/b/
+EOF
+chmod a+x $s
+echo a > $TMP-in
+./$s $TMP-in 2>/dev/null && test b = "`cat $TMP-in 2>/dev/null`" ||
+ {
+ printf '%s\n' "$0: skipping this test;" \
+ 'your system has insufficient support for Perl' 1>&2
+ exit 77
+ }
+
+# Do not let a different envvar setting perturb results.
+UPDATE_COPYRIGHT_MAX_LINE_LENGTH=72
+export UPDATE_COPYRIGHT_MAX_LINE_LENGTH
+
+## ----------------------------- ##
+## Examples from documentation. ##
+## ----------------------------- ##
+
+TMP=$TMP_BASE-ex
+cat > $TMP.1 <<EOF
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+cat > $TMP.2 <<EOF
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+cat > $TMP.3 <<EOF
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+cat > $TMP.4 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+cat > $TMP.5 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+cat > $TMP.6 <<EOF
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+cat > $TMP.7 <<EOF
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2009 \
+ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: FSF copyright statement not found
+$TMP.5: warning: FSF copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2009 Free Software
+Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 90,2005,2007-2009
+ * Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2009 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: FSF copyright statement not found
+$TMP.5: warning: FSF copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990-2005, 2007-2010 Free Software Foundation,
+Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007-2010 Free Software Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990-2005, 2007-2010 Free Software Foundation, Inc.
+EOF
+
+rm -f $TMP.*.bak
+UPDATE_COPYRIGHT_YEAR=2010 UPDATE_COPYRIGHT_FORCE=1 \
+ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP.4: warning: FSF copyright statement not found
+$TMP.5: warning: FSF copyright statement not found
+EOF
+compare - $TMP.1 <<EOF || exit 1
+Copyright @copyright{} 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010
+Free Software Foundation, Inc.
+EOF
+compare - $TMP.2 <<EOF || exit 1
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+compare - $TMP.3 <<EOF || exit 1
+/*
+ * Copyright &copy; 1990, 2005, 2007, 2008, 2009, 2010 Free Software
+ * Foundation, Inc.
+ */
+EOF
+compare - $TMP.4 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+EOF
+compare - $TMP.5 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+EOF
+compare - $TMP.6 <<EOF || exit 1
+## Copyright (C) 1990-2005, 2007-2009 Free Software
+# Foundation, Inc.
+
+Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+Software Foundation, Inc.
+EOF
+compare - $TMP.7 <<EOF || exit 1
+Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
+
+# Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+# 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010 Free
+# Software Foundation, Inc.
+EOF
+
+rm $TMP*
+
+## -------------- ##
+## Current year. ##
+## -------------- ##
+
+TMP=$TMP_BASE-current-year
+YEAR=`date +%Y`
+cat > $TMP <<EOF
+'\" Copyright (C) 2006
+'\" Free Software Foundation,
+'\" Inc.
+EOF
+update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## Surrounding text. ##
+## ------------------ ##
+
+TMP=$TMP_BASE-surrounding-text
+cat > $TMP <<EOF
+ Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 89
+dnl Free Software Foundation, Inc.
+dnl Undisturbed text.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Undisturbed text.
+dnl Undisturbed text.
+dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
+dnl Undisturbed text.
+EOF
+rm $TMP*
+
+## --------------- ##
+## Widest prefix. ##
+## --------------- ##
+
+TMP=$TMP_BASE-widest-prefix
+cat > $TMP <<EOF
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984,
+#### 1985, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+#### 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
+#### Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------- ##
+## Prefix too large. ##
+## ------------------- ##
+
+TMP=$TMP_BASE-prefix-too-large
+cat > $TMP <<EOF
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: FSF copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+#### Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#### 2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------- ##
+## Blank lines. ##
+## ------------- ##
+
+TMP=$TMP_BASE-blank-lines
+cat > $TMP <<EOF
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare - $TMP-stderr <<EOF || exit 1
+$TMP: warning: FSF copyright statement not found
+EOF
+compare - $TMP <<EOF || exit 1
+#Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+#
+#1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+#2008 Free Software Foundation, Inc.
+
+Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985,
+
+1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
+2008 Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## -------------- ##
+## Leading tabs. ##
+## -------------- ##
+
+TMP=$TMP_BASE-leading-tabs
+cat > $TMP <<EOF
+ Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 98,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free
+ Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996,
+ 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
+ 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
+ Inc.
+EOF
+rm $TMP*
+
+## -------------------- ##
+## Unusual whitespace. ##
+## -------------------- ##
+
+TMP=$TMP_BASE-unusual-ws
+cat > $TMP <<EOF
+ # Copyright (C) 87-88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ # 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ # 2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994,
+ # 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
+ # 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+ # Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2011 UPDATE_COPYRIGHT_USE_INTERVALS=1 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ # Copyright (C) 1987-1988, 1991-2011 Free Software
+ # Foundation, Inc.
+EOF
+rm $TMP*
+
+## --------- ##
+## DOS EOL. ##
+## --------- ##
+
+TMP=$TMP_BASE-dos-eol
+tr @ '\015' > $TMP <<\EOF
+Rem Copyright (C) 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
+Rem 2009 Free Software Foundation, Inc.@
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+tr @ '\015' > $TMP-exp <<\EOF
+Rem Copyright (C) 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,@
+Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
+Rem 2009, 2010 Free Software Foundation, Inc.@
+EOF
+compare $TMP-exp $TMP || exit 1
+rm $TMP*
+
+## --------------- ##
+## Omitted "(C)". ##
+## --------------- ##
+
+TMP=$TMP_BASE-omitted-circle-c
+cat > $TMP <<EOF
+ Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc.
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP <<EOF || exit 1
+ Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+ Free Software Foundation, Inc.
+EOF
+rm $TMP*
+
+## ------------------ ##
+## C-style comments. ##
+## ------------------ ##
+
+TMP=$TMP_BASE-c-style-comments
+cat > $TMP.star <<EOF
+/* Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ * 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ * 2009 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.space <<EOF
+ /*Copyright 87, 88, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 98, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.single-line <<EOF
+/* Copyright 87, 1991, 1992 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.single-line-wrapped <<EOF
+ /* Copyright 1988, 1991, 1992, 1993 Free Software Foundation, Inc. */
+EOF
+cat > $TMP.extra-text-star <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. End
+ * More comments. */
+EOF
+cat > $TMP.extra-text-space <<EOF
+ /* Copyright 1987, 1988, 1991, 1992 Free Software Foundation, Inc. ***
+ * End of comments. */
+EOF
+UPDATE_COPYRIGHT_YEAR=2010 \
+ update-copyright $TMP.* 1> $TMP-stdout 2> $TMP-stderr
+compare /dev/null $TMP-stdout || exit 1
+compare /dev/null $TMP-stderr || exit 1
+compare - $TMP.star <<EOF || exit 1
+/* Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ * 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ * 2009, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.space <<EOF || exit 1
+ /*Copyright 1987, 1988, 1991, 1992, 1993, 1994, 1995, 1996, 1997,
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
+ 2009, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.single-line <<EOF || exit 1
+/* Copyright 1987, 1991, 1992, 2010 Free Software Foundation, Inc. */
+EOF
+compare - $TMP.single-line-wrapped <<EOF || exit 1
+ /* Copyright 1988, 1991, 1992, 1993, 2010 Free Software Foundation,
+ * Inc. */
+EOF
+compare - $TMP.extra-text-star <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+ * Inc. End
+ * More comments. */
+EOF
+compare - $TMP.extra-text-space <<EOF || exit 1
+ /* Copyright 1987, 1988, 1991, 1992, 2010 Free Software Foundation,
+ Inc. ***
+ * End of comments. */
+EOF
+rm $TMP*
+
+exit 0
diff --git a/tests/gnu/test-vasnprintf-posix.c b/tests/gnu/test-vasnprintf-posix.c
new file mode 100755
index 00000000..74ba1653
--- /dev/null
+++ b/tests/gnu/test-vasnprintf-posix.c
@@ -0,0 +1,3671 @@
+/* Test of POSIX compatible vasnprintf() and asnprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "vasnprintf.h"
+
+#include <float.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+#include "nan.h"
+
+/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zerod instead. */
+double zerod = 0.0;
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
+#else
+long double minus_zerol = -0.0L;
+#endif
+
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+#ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+#else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+#endif
+
+static int
+strmatch (const char *pattern, const char *string)
+{
+ if (strlen (pattern) != strlen (string))
+ return 0;
+ for (; *pattern != '\0'; pattern++, string++)
+ if (*pattern != '*' && *string != *pattern)
+ return 0;
+ return 1;
+}
+
+/* Test whether string[start_index..end_index-1] is a valid textual
+ representation of NaN. */
+static int
+strisnan (const char *string, size_t start_index, size_t end_index, int uppercase)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void
+test_function (char * (*my_asnprintf) (char *, size_t *, const char *, ...))
+{
+ char buf[8];
+ int size;
+
+ /* Test return value convention. */
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length = size;
+ char *result = my_asnprintf (NULL, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ free (result);
+ }
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length;
+ char *result;
+
+ memcpy (buf, "DEADBEEF", 8);
+ length = size;
+ result = my_asnprintf (buf, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ if (size < 6)
+ ASSERT (result != buf);
+ ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ if (result != buf)
+ free (result);
+ }
+
+ /* Test support of size specifiers as in C99. */
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%ju %d", (uintmax_t) 12345671, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345671 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%zu %d", (size_t) 12345672, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345672 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345673 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", (long double) 1.5, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.5 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", 3.1416015625, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%A %d", -3.1416015625, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%a %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding near the decimal point. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.0a %d", 1.5, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 0. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.0a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 1. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.1a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 2. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 3. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.3a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.3a %d", 1.49999, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.1a %d", 1.999, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Large precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.50a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#a %d", 1.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050a %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", 3.1416015625L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LA %d", -3.1416015625L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Rounding near the decimal point. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.0La %d", 1.5L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 0. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.0La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 1. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.1La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 2. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 3. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.3La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.3La %d", 1.49999L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.1La %d", 1.999L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Large precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.50La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#La %d", 1.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050La %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %f format directive. */
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "0.000000" },
+ { 1.234321234321234e-36, "0.000000" },
+ { 1.234321234321234e-35, "0.000000" },
+ { 1.234321234321234e-34, "0.000000" },
+ { 1.234321234321234e-33, "0.000000" },
+ { 1.234321234321234e-32, "0.000000" },
+ { 1.234321234321234e-31, "0.000000" },
+ { 1.234321234321234e-30, "0.000000" },
+ { 1.234321234321234e-29, "0.000000" },
+ { 1.234321234321234e-28, "0.000000" },
+ { 1.234321234321234e-27, "0.000000" },
+ { 1.234321234321234e-26, "0.000000" },
+ { 1.234321234321234e-25, "0.000000" },
+ { 1.234321234321234e-24, "0.000000" },
+ { 1.234321234321234e-23, "0.000000" },
+ { 1.234321234321234e-22, "0.000000" },
+ { 1.234321234321234e-21, "0.000000" },
+ { 1.234321234321234e-20, "0.000000" },
+ { 1.234321234321234e-19, "0.000000" },
+ { 1.234321234321234e-18, "0.000000" },
+ { 1.234321234321234e-17, "0.000000" },
+ { 1.234321234321234e-16, "0.000000" },
+ { 1.234321234321234e-15, "0.000000" },
+ { 1.234321234321234e-14, "0.000000" },
+ { 1.234321234321234e-13, "0.000000" },
+ { 1.234321234321234e-12, "0.000000" },
+ { 1.234321234321234e-11, "0.000000" },
+ { 1.234321234321234e-10, "0.000000" },
+ { 1.234321234321234e-9, "0.000000" },
+ { 1.234321234321234e-8, "0.000000" },
+ { 1.234321234321234e-7, "0.000000" },
+ { 1.234321234321234e-6, "0.000001" },
+ { 1.234321234321234e-5, "0.000012" },
+ { 1.234321234321234e-4, "0.000123" },
+ { 1.234321234321234e-3, "0.001234" },
+ { 1.234321234321234e-2, "0.012343" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.234321" },
+ { 1.234321234321234e1, "12.343212" },
+ { 1.234321234321234e2, "123.432123" },
+ { 1.234321234321234e3, "1234.321234" },
+ { 1.234321234321234e4, "12343.212343" },
+ { 1.234321234321234e5, "123432.123432" },
+ { 1.234321234321234e6, "1234321.234321" },
+ { 1.234321234321234e7, "12343212.343212" },
+ { 1.234321234321234e8, "123432123.432123" },
+ { 1.234321234321234e9, "1234321234.321234" },
+ { 1.234321234321234e10, "12343212343.2123**" },
+ { 1.234321234321234e11, "123432123432.123***" },
+ { 1.234321234321234e12, "1234321234321.23****" },
+ { 1.234321234321234e13, "12343212343212.3*****" },
+ { 1.234321234321234e14, "123432123432123.******" },
+ { 1.234321234321234e15, "1234321234321234.000000" },
+ { 1.234321234321234e16, "123432123432123**.000000" },
+ { 1.234321234321234e17, "123432123432123***.000000" },
+ { 1.234321234321234e18, "123432123432123****.000000" },
+ { 1.234321234321234e19, "123432123432123*****.000000" },
+ { 1.234321234321234e20, "123432123432123******.000000" },
+ { 1.234321234321234e21, "123432123432123*******.000000" },
+ { 1.234321234321234e22, "123432123432123********.000000" },
+ { 1.234321234321234e23, "123432123432123*********.000000" },
+ { 1.234321234321234e24, "123432123432123**********.000000" },
+ { 1.234321234321234e25, "123432123432123***********.000000" },
+ { 1.234321234321234e26, "123432123432123************.000000" },
+ { 1.234321234321234e27, "123432123432123*************.000000" },
+ { 1.234321234321234e28, "123432123432123**************.000000" },
+ { 1.234321234321234e29, "123432123432123***************.000000" },
+ { 1.234321234321234e30, "123432123432123****************.000000" },
+ { 1.234321234321234e31, "123432123432123*****************.000000" },
+ { 1.234321234321234e32, "123432123432123******************.000000" },
+ { 1.234321234321234e33, "123432123432123*******************.000000" },
+ { 1.234321234321234e34, "123432123432123********************.000000" },
+ { 1.234321234321234e35, "123432123432123*********************.000000" },
+ { 1.234321234321234e36, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f", data[k].value);
+ ASSERT (result != NULL);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%f %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015f %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050f %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.f %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2f %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2f %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "0.000000" },
+ { 1.234321234321234e-36L, "0.000000" },
+ { 1.234321234321234e-35L, "0.000000" },
+ { 1.234321234321234e-34L, "0.000000" },
+ { 1.234321234321234e-33L, "0.000000" },
+ { 1.234321234321234e-32L, "0.000000" },
+ { 1.234321234321234e-31L, "0.000000" },
+ { 1.234321234321234e-30L, "0.000000" },
+ { 1.234321234321234e-29L, "0.000000" },
+ { 1.234321234321234e-28L, "0.000000" },
+ { 1.234321234321234e-27L, "0.000000" },
+ { 1.234321234321234e-26L, "0.000000" },
+ { 1.234321234321234e-25L, "0.000000" },
+ { 1.234321234321234e-24L, "0.000000" },
+ { 1.234321234321234e-23L, "0.000000" },
+ { 1.234321234321234e-22L, "0.000000" },
+ { 1.234321234321234e-21L, "0.000000" },
+ { 1.234321234321234e-20L, "0.000000" },
+ { 1.234321234321234e-19L, "0.000000" },
+ { 1.234321234321234e-18L, "0.000000" },
+ { 1.234321234321234e-17L, "0.000000" },
+ { 1.234321234321234e-16L, "0.000000" },
+ { 1.234321234321234e-15L, "0.000000" },
+ { 1.234321234321234e-14L, "0.000000" },
+ { 1.234321234321234e-13L, "0.000000" },
+ { 1.234321234321234e-12L, "0.000000" },
+ { 1.234321234321234e-11L, "0.000000" },
+ { 1.234321234321234e-10L, "0.000000" },
+ { 1.234321234321234e-9L, "0.000000" },
+ { 1.234321234321234e-8L, "0.000000" },
+ { 1.234321234321234e-7L, "0.000000" },
+ { 1.234321234321234e-6L, "0.000001" },
+ { 1.234321234321234e-5L, "0.000012" },
+ { 1.234321234321234e-4L, "0.000123" },
+ { 1.234321234321234e-3L, "0.001234" },
+ { 1.234321234321234e-2L, "0.012343" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.234321" },
+ { 1.234321234321234e1L, "12.343212" },
+ { 1.234321234321234e2L, "123.432123" },
+ { 1.234321234321234e3L, "1234.321234" },
+ { 1.234321234321234e4L, "12343.212343" },
+ { 1.234321234321234e5L, "123432.123432" },
+ { 1.234321234321234e6L, "1234321.234321" },
+ { 1.234321234321234e7L, "12343212.343212" },
+ { 1.234321234321234e8L, "123432123.432123" },
+ { 1.234321234321234e9L, "1234321234.321234" },
+ { 1.234321234321234e10L, "12343212343.2123**" },
+ { 1.234321234321234e11L, "123432123432.123***" },
+ { 1.234321234321234e12L, "1234321234321.23****" },
+ { 1.234321234321234e13L, "12343212343212.3*****" },
+ { 1.234321234321234e14L, "123432123432123.******" },
+ { 1.234321234321234e15L, "1234321234321234.000000" },
+ { 1.234321234321234e16L, "123432123432123**.000000" },
+ { 1.234321234321234e17L, "123432123432123***.000000" },
+ { 1.234321234321234e18L, "123432123432123****.000000" },
+ { 1.234321234321234e19L, "123432123432123*****.000000" },
+ { 1.234321234321234e20L, "123432123432123******.000000" },
+ { 1.234321234321234e21L, "123432123432123*******.000000" },
+ { 1.234321234321234e22L, "123432123432123********.000000" },
+ { 1.234321234321234e23L, "123432123432123*********.000000" },
+ { 1.234321234321234e24L, "123432123432123**********.000000" },
+ { 1.234321234321234e25L, "123432123432123***********.000000" },
+ { 1.234321234321234e26L, "123432123432123************.000000" },
+ { 1.234321234321234e27L, "123432123432123*************.000000" },
+ { 1.234321234321234e28L, "123432123432123**************.000000" },
+ { 1.234321234321234e29L, "123432123432123***************.000000" },
+ { 1.234321234321234e30L, "123432123432123****************.000000" },
+ { 1.234321234321234e31L, "123432123432123*****************.000000" },
+ { 1.234321234321234e32L, "123432123432123******************.000000" },
+ { 1.234321234321234e33L, "123432123432123*******************.000000" },
+ { 1.234321234321234e34L, "123432123432123********************.000000" },
+ { 1.234321234321234e35L, "123432123432123*********************.000000" },
+ { 1.234321234321234e36L, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf", data[k].value);
+ ASSERT (result != NULL);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2Lf %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2Lf %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %F format directive. */
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%F %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015F %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.F %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2F %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2F %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%LF %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2LF %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.2LF %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %e format directive. */
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.234321e-37" },
+ { 1.234321234321234e-36, "1.234321e-36" },
+ { 1.234321234321234e-35, "1.234321e-35" },
+ { 1.234321234321234e-34, "1.234321e-34" },
+ { 1.234321234321234e-33, "1.234321e-33" },
+ { 1.234321234321234e-32, "1.234321e-32" },
+ { 1.234321234321234e-31, "1.234321e-31" },
+ { 1.234321234321234e-30, "1.234321e-30" },
+ { 1.234321234321234e-29, "1.234321e-29" },
+ { 1.234321234321234e-28, "1.234321e-28" },
+ { 1.234321234321234e-27, "1.234321e-27" },
+ { 1.234321234321234e-26, "1.234321e-26" },
+ { 1.234321234321234e-25, "1.234321e-25" },
+ { 1.234321234321234e-24, "1.234321e-24" },
+ { 1.234321234321234e-23, "1.234321e-23" },
+ { 1.234321234321234e-22, "1.234321e-22" },
+ { 1.234321234321234e-21, "1.234321e-21" },
+ { 1.234321234321234e-20, "1.234321e-20" },
+ { 1.234321234321234e-19, "1.234321e-19" },
+ { 1.234321234321234e-18, "1.234321e-18" },
+ { 1.234321234321234e-17, "1.234321e-17" },
+ { 1.234321234321234e-16, "1.234321e-16" },
+ { 1.234321234321234e-15, "1.234321e-15" },
+ { 1.234321234321234e-14, "1.234321e-14" },
+ { 1.234321234321234e-13, "1.234321e-13" },
+ { 1.234321234321234e-12, "1.234321e-12" },
+ { 1.234321234321234e-11, "1.234321e-11" },
+ { 1.234321234321234e-10, "1.234321e-10" },
+ { 1.234321234321234e-9, "1.234321e-09" },
+ { 1.234321234321234e-8, "1.234321e-08" },
+ { 1.234321234321234e-7, "1.234321e-07" },
+ { 1.234321234321234e-6, "1.234321e-06" },
+ { 1.234321234321234e-5, "1.234321e-05" },
+ { 1.234321234321234e-4, "1.234321e-04" },
+ { 1.234321234321234e-3, "1.234321e-03" },
+ { 1.234321234321234e-2, "1.234321e-02" },
+ { 1.234321234321234e-1, "1.234321e-01" },
+ { 1.234321234321234, "1.234321e+00" },
+ { 1.234321234321234e1, "1.234321e+01" },
+ { 1.234321234321234e2, "1.234321e+02" },
+ { 1.234321234321234e3, "1.234321e+03" },
+ { 1.234321234321234e4, "1.234321e+04" },
+ { 1.234321234321234e5, "1.234321e+05" },
+ { 1.234321234321234e6, "1.234321e+06" },
+ { 1.234321234321234e7, "1.234321e+07" },
+ { 1.234321234321234e8, "1.234321e+08" },
+ { 1.234321234321234e9, "1.234321e+09" },
+ { 1.234321234321234e10, "1.234321e+10" },
+ { 1.234321234321234e11, "1.234321e+11" },
+ { 1.234321234321234e12, "1.234321e+12" },
+ { 1.234321234321234e13, "1.234321e+13" },
+ { 1.234321234321234e14, "1.234321e+14" },
+ { 1.234321234321234e15, "1.234321e+15" },
+ { 1.234321234321234e16, "1.234321e+16" },
+ { 1.234321234321234e17, "1.234321e+17" },
+ { 1.234321234321234e18, "1.234321e+18" },
+ { 1.234321234321234e19, "1.234321e+19" },
+ { 1.234321234321234e20, "1.234321e+20" },
+ { 1.234321234321234e21, "1.234321e+21" },
+ { 1.234321234321234e22, "1.234321e+22" },
+ { 1.234321234321234e23, "1.234321e+23" },
+ { 1.234321234321234e24, "1.234321e+24" },
+ { 1.234321234321234e25, "1.234321e+25" },
+ { 1.234321234321234e26, "1.234321e+26" },
+ { 1.234321234321234e27, "1.234321e+27" },
+ { 1.234321234321234e28, "1.234321e+28" },
+ { 1.234321234321234e29, "1.234321e+29" },
+ { 1.234321234321234e30, "1.234321e+30" },
+ { 1.234321234321234e31, "1.234321e+31" },
+ { 1.234321234321234e32, "1.234321e+32" },
+ { 1.234321234321234e33, "1.234321e+33" },
+ { 1.234321234321234e34, "1.234321e+34" },
+ { 1.234321234321234e35, "1.234321e+35" },
+ { 1.234321234321234e36, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%e %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%15e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-15e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.e %d", 9.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015e %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050e %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.e %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4e %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4e %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.234321e-37" },
+ { 1.234321234321234e-36L, "1.234321e-36" },
+ { 1.234321234321234e-35L, "1.234321e-35" },
+ { 1.234321234321234e-34L, "1.234321e-34" },
+ { 1.234321234321234e-33L, "1.234321e-33" },
+ { 1.234321234321234e-32L, "1.234321e-32" },
+ { 1.234321234321234e-31L, "1.234321e-31" },
+ { 1.234321234321234e-30L, "1.234321e-30" },
+ { 1.234321234321234e-29L, "1.234321e-29" },
+ { 1.234321234321234e-28L, "1.234321e-28" },
+ { 1.234321234321234e-27L, "1.234321e-27" },
+ { 1.234321234321234e-26L, "1.234321e-26" },
+ { 1.234321234321234e-25L, "1.234321e-25" },
+ { 1.234321234321234e-24L, "1.234321e-24" },
+ { 1.234321234321234e-23L, "1.234321e-23" },
+ { 1.234321234321234e-22L, "1.234321e-22" },
+ { 1.234321234321234e-21L, "1.234321e-21" },
+ { 1.234321234321234e-20L, "1.234321e-20" },
+ { 1.234321234321234e-19L, "1.234321e-19" },
+ { 1.234321234321234e-18L, "1.234321e-18" },
+ { 1.234321234321234e-17L, "1.234321e-17" },
+ { 1.234321234321234e-16L, "1.234321e-16" },
+ { 1.234321234321234e-15L, "1.234321e-15" },
+ { 1.234321234321234e-14L, "1.234321e-14" },
+ { 1.234321234321234e-13L, "1.234321e-13" },
+ { 1.234321234321234e-12L, "1.234321e-12" },
+ { 1.234321234321234e-11L, "1.234321e-11" },
+ { 1.234321234321234e-10L, "1.234321e-10" },
+ { 1.234321234321234e-9L, "1.234321e-09" },
+ { 1.234321234321234e-8L, "1.234321e-08" },
+ { 1.234321234321234e-7L, "1.234321e-07" },
+ { 1.234321234321234e-6L, "1.234321e-06" },
+ { 1.234321234321234e-5L, "1.234321e-05" },
+ { 1.234321234321234e-4L, "1.234321e-04" },
+ { 1.234321234321234e-3L, "1.234321e-03" },
+ { 1.234321234321234e-2L, "1.234321e-02" },
+ { 1.234321234321234e-1L, "1.234321e-01" },
+ { 1.234321234321234L, "1.234321e+00" },
+ { 1.234321234321234e1L, "1.234321e+01" },
+ { 1.234321234321234e2L, "1.234321e+02" },
+ { 1.234321234321234e3L, "1.234321e+03" },
+ { 1.234321234321234e4L, "1.234321e+04" },
+ { 1.234321234321234e5L, "1.234321e+05" },
+ { 1.234321234321234e6L, "1.234321e+06" },
+ { 1.234321234321234e7L, "1.234321e+07" },
+ { 1.234321234321234e8L, "1.234321e+08" },
+ { 1.234321234321234e9L, "1.234321e+09" },
+ { 1.234321234321234e10L, "1.234321e+10" },
+ { 1.234321234321234e11L, "1.234321e+11" },
+ { 1.234321234321234e12L, "1.234321e+12" },
+ { 1.234321234321234e13L, "1.234321e+13" },
+ { 1.234321234321234e14L, "1.234321e+14" },
+ { 1.234321234321234e15L, "1.234321e+15" },
+ { 1.234321234321234e16L, "1.234321e+16" },
+ { 1.234321234321234e17L, "1.234321e+17" },
+ { 1.234321234321234e18L, "1.234321e+18" },
+ { 1.234321234321234e19L, "1.234321e+19" },
+ { 1.234321234321234e20L, "1.234321e+20" },
+ { 1.234321234321234e21L, "1.234321e+21" },
+ { 1.234321234321234e22L, "1.234321e+22" },
+ { 1.234321234321234e23L, "1.234321e+23" },
+ { 1.234321234321234e24L, "1.234321e+24" },
+ { 1.234321234321234e25L, "1.234321e+25" },
+ { 1.234321234321234e26L, "1.234321e+26" },
+ { 1.234321234321234e27L, "1.234321e+27" },
+ { 1.234321234321234e28L, "1.234321e+28" },
+ { 1.234321234321234e29L, "1.234321e+29" },
+ { 1.234321234321234e30L, "1.234321e+30" },
+ { 1.234321234321234e31L, "1.234321e+31" },
+ { 1.234321234321234e32L, "1.234321e+32" },
+ { 1.234321234321234e33L, "1.234321e+33" },
+ { 1.234321234321234e34L, "1.234321e+34" },
+ { 1.234321234321234e35L, "1.234321e+35" },
+ { 1.234321234321234e36L, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.Le %d", 9.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050Le %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4Le %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4Le %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %g format directive. */
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.23432e-37" },
+ { 1.234321234321234e-36, "1.23432e-36" },
+ { 1.234321234321234e-35, "1.23432e-35" },
+ { 1.234321234321234e-34, "1.23432e-34" },
+ { 1.234321234321234e-33, "1.23432e-33" },
+ { 1.234321234321234e-32, "1.23432e-32" },
+ { 1.234321234321234e-31, "1.23432e-31" },
+ { 1.234321234321234e-30, "1.23432e-30" },
+ { 1.234321234321234e-29, "1.23432e-29" },
+ { 1.234321234321234e-28, "1.23432e-28" },
+ { 1.234321234321234e-27, "1.23432e-27" },
+ { 1.234321234321234e-26, "1.23432e-26" },
+ { 1.234321234321234e-25, "1.23432e-25" },
+ { 1.234321234321234e-24, "1.23432e-24" },
+ { 1.234321234321234e-23, "1.23432e-23" },
+ { 1.234321234321234e-22, "1.23432e-22" },
+ { 1.234321234321234e-21, "1.23432e-21" },
+ { 1.234321234321234e-20, "1.23432e-20" },
+ { 1.234321234321234e-19, "1.23432e-19" },
+ { 1.234321234321234e-18, "1.23432e-18" },
+ { 1.234321234321234e-17, "1.23432e-17" },
+ { 1.234321234321234e-16, "1.23432e-16" },
+ { 1.234321234321234e-15, "1.23432e-15" },
+ { 1.234321234321234e-14, "1.23432e-14" },
+ { 1.234321234321234e-13, "1.23432e-13" },
+ { 1.234321234321234e-12, "1.23432e-12" },
+ { 1.234321234321234e-11, "1.23432e-11" },
+ { 1.234321234321234e-10, "1.23432e-10" },
+ { 1.234321234321234e-9, "1.23432e-09" },
+ { 1.234321234321234e-8, "1.23432e-08" },
+ { 1.234321234321234e-7, "1.23432e-07" },
+ { 1.234321234321234e-6, "1.23432e-06" },
+ { 1.234321234321234e-5, "1.23432e-05" },
+ { 1.234321234321234e-4, "0.000123432" },
+ { 1.234321234321234e-3, "0.00123432" },
+ { 1.234321234321234e-2, "0.0123432" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.23432" },
+ { 1.234321234321234e1, "12.3432" },
+ { 1.234321234321234e2, "123.432" },
+ { 1.234321234321234e3, "1234.32" },
+ { 1.234321234321234e4, "12343.2" },
+ { 1.234321234321234e5, "123432" },
+ { 1.234321234321234e6, "1.23432e+06" },
+ { 1.234321234321234e7, "1.23432e+07" },
+ { 1.234321234321234e8, "1.23432e+08" },
+ { 1.234321234321234e9, "1.23432e+09" },
+ { 1.234321234321234e10, "1.23432e+10" },
+ { 1.234321234321234e11, "1.23432e+11" },
+ { 1.234321234321234e12, "1.23432e+12" },
+ { 1.234321234321234e13, "1.23432e+13" },
+ { 1.234321234321234e14, "1.23432e+14" },
+ { 1.234321234321234e15, "1.23432e+15" },
+ { 1.234321234321234e16, "1.23432e+16" },
+ { 1.234321234321234e17, "1.23432e+17" },
+ { 1.234321234321234e18, "1.23432e+18" },
+ { 1.234321234321234e19, "1.23432e+19" },
+ { 1.234321234321234e20, "1.23432e+20" },
+ { 1.234321234321234e21, "1.23432e+21" },
+ { 1.234321234321234e22, "1.23432e+22" },
+ { 1.234321234321234e23, "1.23432e+23" },
+ { 1.234321234321234e24, "1.23432e+24" },
+ { 1.234321234321234e25, "1.23432e+25" },
+ { 1.234321234321234e26, "1.23432e+26" },
+ { 1.234321234321234e27, "1.23432e+27" },
+ { 1.234321234321234e28, "1.23432e+28" },
+ { 1.234321234321234e29, "1.23432e+29" },
+ { 1.234321234321234e30, "1.23432e+30" },
+ { 1.234321234321234e31, "1.23432e+31" },
+ { 1.234321234321234e32, "1.23432e+32" },
+ { 1.234321234321234e33, "1.23432e+33" },
+ { 1.234321234321234e34, "1.23432e+34" },
+ { 1.234321234321234e35, "1.23432e+35" },
+ { 1.234321234321234e36, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%g %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.g %d", 9.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010g %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050g %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.g %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.5g %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.5g %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.23432e-37" },
+ { 1.234321234321234e-36L, "1.23432e-36" },
+ { 1.234321234321234e-35L, "1.23432e-35" },
+ { 1.234321234321234e-34L, "1.23432e-34" },
+ { 1.234321234321234e-33L, "1.23432e-33" },
+ { 1.234321234321234e-32L, "1.23432e-32" },
+ { 1.234321234321234e-31L, "1.23432e-31" },
+ { 1.234321234321234e-30L, "1.23432e-30" },
+ { 1.234321234321234e-29L, "1.23432e-29" },
+ { 1.234321234321234e-28L, "1.23432e-28" },
+ { 1.234321234321234e-27L, "1.23432e-27" },
+ { 1.234321234321234e-26L, "1.23432e-26" },
+ { 1.234321234321234e-25L, "1.23432e-25" },
+ { 1.234321234321234e-24L, "1.23432e-24" },
+ { 1.234321234321234e-23L, "1.23432e-23" },
+ { 1.234321234321234e-22L, "1.23432e-22" },
+ { 1.234321234321234e-21L, "1.23432e-21" },
+ { 1.234321234321234e-20L, "1.23432e-20" },
+ { 1.234321234321234e-19L, "1.23432e-19" },
+ { 1.234321234321234e-18L, "1.23432e-18" },
+ { 1.234321234321234e-17L, "1.23432e-17" },
+ { 1.234321234321234e-16L, "1.23432e-16" },
+ { 1.234321234321234e-15L, "1.23432e-15" },
+ { 1.234321234321234e-14L, "1.23432e-14" },
+ { 1.234321234321234e-13L, "1.23432e-13" },
+ { 1.234321234321234e-12L, "1.23432e-12" },
+ { 1.234321234321234e-11L, "1.23432e-11" },
+ { 1.234321234321234e-10L, "1.23432e-10" },
+ { 1.234321234321234e-9L, "1.23432e-09" },
+ { 1.234321234321234e-8L, "1.23432e-08" },
+ { 1.234321234321234e-7L, "1.23432e-07" },
+ { 1.234321234321234e-6L, "1.23432e-06" },
+ { 1.234321234321234e-5L, "1.23432e-05" },
+ { 1.234321234321234e-4L, "0.000123432" },
+ { 1.234321234321234e-3L, "0.00123432" },
+ { 1.234321234321234e-2L, "0.0123432" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.23432" },
+ { 1.234321234321234e1L, "12.3432" },
+ { 1.234321234321234e2L, "123.432" },
+ { 1.234321234321234e3L, "1234.32" },
+ { 1.234321234321234e4L, "12343.2" },
+ { 1.234321234321234e5L, "123432" },
+ { 1.234321234321234e6L, "1.23432e+06" },
+ { 1.234321234321234e7L, "1.23432e+07" },
+ { 1.234321234321234e8L, "1.23432e+08" },
+ { 1.234321234321234e9L, "1.23432e+09" },
+ { 1.234321234321234e10L, "1.23432e+10" },
+ { 1.234321234321234e11L, "1.23432e+11" },
+ { 1.234321234321234e12L, "1.23432e+12" },
+ { 1.234321234321234e13L, "1.23432e+13" },
+ { 1.234321234321234e14L, "1.23432e+14" },
+ { 1.234321234321234e15L, "1.23432e+15" },
+ { 1.234321234321234e16L, "1.23432e+16" },
+ { 1.234321234321234e17L, "1.23432e+17" },
+ { 1.234321234321234e18L, "1.23432e+18" },
+ { 1.234321234321234e19L, "1.23432e+19" },
+ { 1.234321234321234e20L, "1.23432e+20" },
+ { 1.234321234321234e21L, "1.23432e+21" },
+ { 1.234321234321234e22L, "1.23432e+22" },
+ { 1.234321234321234e23L, "1.23432e+23" },
+ { 1.234321234321234e24L, "1.23432e+24" },
+ { 1.234321234321234e25L, "1.23432e+25" },
+ { 1.234321234321234e26L, "1.23432e+26" },
+ { 1.234321234321234e27L, "1.23432e+27" },
+ { 1.234321234321234e28L, "1.23432e+28" },
+ { 1.234321234321234e29L, "1.23432e+29" },
+ { 1.234321234321234e30L, "1.23432e+30" },
+ { 1.234321234321234e31L, "1.23432e+31" },
+ { 1.234321234321234e32L, "1.23432e+32" },
+ { 1.234321234321234e33L, "1.23432e+33" },
+ { 1.234321234321234e34L, "1.23432e+34" },
+ { 1.234321234321234e35L, "1.23432e+35" },
+ { 1.234321234321234e36L, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%-10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%+Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "% Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.Lg %d", 9.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%010Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%015Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%050Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.5Lg %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.5Lg %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %n format directive. */
+
+ {
+ int count = -1;
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%d %n", 123, &count, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "123 ") == 0);
+ ASSERT (length == strlen (result));
+ ASSERT (count == 4);
+ free (result);
+ }
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%2$d %1$d", 33, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "55 33") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the grouping flag. */
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%'d %d", 1234567, 99);
+ ASSERT (result != NULL);
+ ASSERT (result[strlen (result) - 1] == '9');
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the left-adjust flag. */
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "a%*sc", -3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "a%-*sc", 3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "a%-*sc", -3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of large precision. */
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4000d %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.*d %d", 4000, 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4000d %d", -1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ ASSERT (result[0] == '-');
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[1 + i] == '0');
+ ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4000u %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4000o %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ size_t length;
+ char *result =
+ my_asnprintf (NULL, &length, "%#.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ ASSERT (result[0] == '0');
+ ASSERT (result[1] == 'x');
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[2 + i] == '0');
+ ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ {
+ char input[5000];
+ size_t length;
+ char *result;
+ size_t i;
+
+ for (i = 0; i < sizeof (input) - 1; i++)
+ input[i] = 'a' + ((1000000 / (i + 1)) % 26);
+ input[i] = '\0';
+ result = my_asnprintf (NULL, &length, "%.4000s %d", input, 99);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, input, 4000) == 0);
+ ASSERT (strcmp (result + 4000, " 99") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %s format directive. */
+
+ /* To verify that these tests succeed, it is necessary to run them under
+ a tool that checks against invalid memory accesses, such as ElectricFence
+ or "valgrind --tool=memcheck". */
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ char *block;
+ size_t length;
+ char *result;
+
+ block = (char *) malloc (i);
+ memcpy (block, "abcdefgh", i);
+ result = my_asnprintf (NULL, &length, "%.*s", (int) i, block);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, block, i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (length == strlen (result));
+ free (result);
+ free (block);
+ }
+ }
+#if HAVE_WCHAR_T
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ wchar_t *block;
+ size_t j;
+ size_t length;
+ char *result;
+
+ block = (wchar_t *) malloc (i * sizeof (wchar_t));
+ for (j = 0; j < i; j++)
+ block[j] = "abcdefgh"[j];
+ result = my_asnprintf (NULL, &length, "%.*ls", (int) i, block);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, "abcdefgh", i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (length == strlen (result));
+ free (result);
+ free (block);
+ }
+ }
+#endif
+}
+
+static char *
+my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+ va_list args;
+ char *ret;
+
+ va_start (args, format);
+ ret = vasnprintf (resultbuf, lengthp, format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_vasnprintf ()
+{
+ test_function (my_asnprintf);
+}
+
+static void
+test_asnprintf ()
+{
+ test_function (asnprintf);
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_vasnprintf ();
+ test_asnprintf ();
+ return 0;
+}
diff --git a/tests/gnu/test-vasnprintf-posix2.c b/tests/gnu/test-vasnprintf-posix2.c
new file mode 100755
index 00000000..35b49f86
--- /dev/null
+++ b/tests/gnu/test-vasnprintf-posix2.c
@@ -0,0 +1,63 @@
+/* Test of POSIX compatible vasnprintf() and asnprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "vasnprintf.h"
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+int
+main (int argc, char *argv[])
+{
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Test that a locale dependent decimal point is used. */
+ {
+ size_t length;
+ char *result = asnprintf (NULL, &length, "%.1a", 1.0);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1,0p+0") == 0
+ || strcmp (result, "0x2,0p-1") == 0
+ || strcmp (result, "0x4,0p-2") == 0
+ || strcmp (result, "0x8,0p-3") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ /* Test that a locale dependent decimal point is used. */
+ {
+ size_t length;
+ char *result = asnprintf (NULL, &length, "%.1La", 1.0L);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1,0p+0") == 0
+ || strcmp (result, "0x2,0p-1") == 0
+ || strcmp (result, "0x4,0p-2") == 0
+ || strcmp (result, "0x8,0p-3") == 0);
+ ASSERT (length == strlen (result));
+ free (result);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-vasnprintf-posix2.sh b/tests/gnu/test-vasnprintf-posix2.sh
new file mode 100755
index 00000000..5ee5b475
--- /dev/null
+++ b/tests/gnu/test-vasnprintf-posix2.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+
+# Test whether a french locale is installed.
+: ${LOCALE_FR=fr_FR}
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR != none; then
+ testlocale=$LOCALE_FR
+else
+ if test $LOCALE_FR_UTF8 != none; then
+ testlocale=$LOCALE_FR_UTF8
+ else
+ if test -f /usr/bin/localedef; then
+ echo "Skipping test: no french locale is installed"
+ else
+ echo "Skipping test: no french locale is supported"
+ fi
+ exit 77
+ fi
+fi
+
+LC_ALL=$testlocale \
+./test-vasnprintf-posix2${EXEEXT}
diff --git a/tests/gnu/test-vasnprintf.c b/tests/gnu/test-vasnprintf.c
new file mode 100755
index 00000000..e2831420
--- /dev/null
+++ b/tests/gnu/test-vasnprintf.c
@@ -0,0 +1,117 @@
+/* Test of vasnprintf() and asnprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "vasnprintf.h"
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+static char *
+my_asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
+{
+ va_list args;
+ char *ret;
+
+ va_start (args, format);
+ ret = vasnprintf (resultbuf, lengthp, format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_vasnprintf ()
+{
+ char buf[8];
+ int size;
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length = size;
+ char *result = my_asnprintf (NULL, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ free (result);
+ }
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length;
+ char *result;
+
+ memcpy (buf, "DEADBEEF", 8);
+ length = size;
+ result = my_asnprintf (buf, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ if (size < 6)
+ ASSERT (result != buf);
+ ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ if (result != buf)
+ free (result);
+ }
+}
+
+static void
+test_asnprintf ()
+{
+ char buf[8];
+ int size;
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length = size;
+ char *result = asnprintf (NULL, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ free (result);
+ }
+
+ for (size = 0; size <= 8; size++)
+ {
+ size_t length;
+ char *result;
+
+ memcpy (buf, "DEADBEEF", 8);
+ length = size;
+ result = asnprintf (buf, &length, "%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ ASSERT (length == 5);
+ if (size < 6)
+ ASSERT (result != buf);
+ ASSERT (memcmp (buf + size, "DEADBEEF" + size, 8 - size) == 0);
+ if (result != buf)
+ free (result);
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_vasnprintf ();
+ test_asnprintf ();
+ return 0;
+}
diff --git a/tests/gnu/test-vasprintf-posix.c b/tests/gnu/test-vasprintf-posix.c
new file mode 100755
index 00000000..ef19df8d
--- /dev/null
+++ b/tests/gnu/test-vasprintf-posix.c
@@ -0,0 +1,3652 @@
+/* Test of POSIX compatible vasprintf() and asprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include <float.h>
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+#include "nan.h"
+
+/* The SGI MIPS floating-point format does not distinguish 0.0 and -0.0. */
+static int
+have_minus_zero ()
+{
+ static double plus_zero = 0.0;
+ double minus_zero = - plus_zero;
+ return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0;
+}
+
+/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
+ So we use -zerod instead. */
+double zerod = 0.0;
+
+/* On HP-UX 10.20, negating 0.0L does not yield -0.0L.
+ So we use minus_zerol instead.
+ IRIX cc can't put -0.0L into .data, but can compute at runtime.
+ Note that the expression -LDBL_MIN * LDBL_MIN does not work on other
+ platforms, such as when cross-compiling to PowerPC on MacOS X 10.5. */
+#if defined __hpux || defined __sgi
+static long double
+compute_minus_zerol (void)
+{
+ return -LDBL_MIN * LDBL_MIN;
+}
+# define minus_zerol compute_minus_zerol ()
+#else
+long double minus_zerol = -0.0L;
+#endif
+
+/* Representation of an 80-bit 'long double' as an initializer for a sequence
+ of 'unsigned int' words. */
+#ifdef WORDS_BIGENDIAN
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
+ ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \
+ (unsigned int) (mantlo) << 16 \
+ }
+#else
+# define LDBL80_WORDS(exponent,manthi,mantlo) \
+ { mantlo, manthi, exponent }
+#endif
+
+static int
+strmatch (const char *pattern, const char *string)
+{
+ if (strlen (pattern) != strlen (string))
+ return 0;
+ for (; *pattern != '\0'; pattern++, string++)
+ if (*pattern != '*' && *string != *pattern)
+ return 0;
+ return 1;
+}
+
+/* Test whether string[start_index..end_index-1] is a valid textual
+ representation of NaN. */
+static int
+strisnan (const char *string, size_t start_index, size_t end_index, int uppercase)
+{
+ if (start_index < end_index)
+ {
+ if (string[start_index] == '-')
+ start_index++;
+ if (start_index + 3 <= end_index
+ && memcmp (string + start_index, uppercase ? "NAN" : "nan", 3) == 0)
+ {
+ start_index += 3;
+ if (start_index == end_index
+ || (string[start_index] == '(' && string[end_index - 1] == ')'))
+ return 1;
+ }
+ }
+ return 0;
+}
+
+static void
+test_function (int (*my_asprintf) (char **, const char *, ...))
+{
+ int repeat;
+
+ /* Test return value convention. */
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ char *result;
+ int retval = asprintf (&result, "%d", 12345);
+ ASSERT (retval == 5);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ free (result);
+ }
+
+ /* Test support of size specifiers as in C99. */
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%ju %d", (uintmax_t) 12345671, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345671 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%zu %d", (size_t) 12345672, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345672 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345673 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", (long double) 1.5, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.5 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the 'a' and 'A' conversion specifier for hexadecimal
+ output of floating-point numbers. */
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", 3.1416015625, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%A %d", -3.1416015625, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%a %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding near the decimal point. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.0a %d", 1.5, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 0. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.0a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 1. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.1a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 2. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 3. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.3a %d", 1.51, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.3a %d", 1.49999, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.1a %d", 1.999, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Large precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.50a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#a %d", 1.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010a %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010a %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050a %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", 3.1416015625L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.922p+1 33") == 0
+ || strcmp (result, "0x3.244p+0 33") == 0
+ || strcmp (result, "0x6.488p-1 33") == 0
+ || strcmp (result, "0xc.91p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LA %d", -3.1416015625L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0X1.922P+1 33") == 0
+ || strcmp (result, "-0X3.244P+0 33") == 0
+ || strcmp (result, "-0X6.488P-1 33") == 0
+ || strcmp (result, "-0XC.91P-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0x0p+0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%La %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Rounding near the decimal point. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.0La %d", 1.5L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 0. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.0La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x2p+0 33") == 0
+ || strcmp (result, "0x3p-1 33") == 0
+ || strcmp (result, "0x6p-2 33") == 0
+ || strcmp (result, "0xcp-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 1. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.1La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.8p+0 33") == 0
+ || strcmp (result, "0x3.0p-1 33") == 0
+ || strcmp (result, "0x6.1p-2 33") == 0
+ || strcmp (result, "0xc.1p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 2. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.83p+0 33") == 0
+ || strcmp (result, "0x3.05p-1 33") == 0
+ || strcmp (result, "0x6.0ap-2 33") == 0
+ || strcmp (result, "0xc.14p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding with precision 3. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.3La %d", 1.51L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.829p+0 33") == 0
+ || strcmp (result, "0x3.052p-1 33") == 0
+ || strcmp (result, "0x6.0a4p-2 33") == 0
+ || strcmp (result, "0xc.148p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.3La %d", 1.49999L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.800p+0 33") == 0
+ || strcmp (result, "0x3.000p-1 33") == 0
+ || strcmp (result, "0x6.000p-2 33") == 0
+ || strcmp (result, "0xc.000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Rounding can turn a ...FFF into a ...000.
+ This shows a MacOS X 10.3.9 (Darwin 7.9) bug and a
+ glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.1La %d", 1.999L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.0p+1 33") == 0
+ || strcmp (result, "0x2.0p+0 33") == 0
+ || strcmp (result, "0x4.0p-1 33") == 0
+ || strcmp (result, "0x8.0p-2 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c000000000p+0 33") == 0
+ || strcmp (result, "0x3.8000000000p-1 33") == 0
+ || strcmp (result, "0x7.0000000000p-2 33") == 0
+ || strcmp (result, "0xe.0000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Large precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.50La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.c0000000000000000000000000000000000000000000000000p+0 33") == 0
+ || strcmp (result, "0x3.80000000000000000000000000000000000000000000000000p-1 33") == 0
+ || strcmp (result, "0x7.00000000000000000000000000000000000000000000000000p-2 33") == 0
+ || strcmp (result, "0xe.00000000000000000000000000000000000000000000000000p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7p-2 33") == 0
+ || strcmp (result, "0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+0x1.cp+0 33") == 0
+ || strcmp (result, "+0x3.8p-1 33") == 0
+ || strcmp (result, "+0x7p-2 33") == 0
+ || strcmp (result, "+0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 0x1.cp+0 33") == 0
+ || strcmp (result, " 0x3.8p-1 33") == 0
+ || strcmp (result, " 0x7p-2 33") == 0
+ || strcmp (result, " 0xep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.cp+0 33") == 0
+ || strcmp (result, "0x3.8p-1 33") == 0
+ || strcmp (result, "0x7.p-2 33") == 0
+ || strcmp (result, "0xe.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#La %d", 1.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x1.p+0 33") == 0
+ || strcmp (result, "0x2.p-1 33") == 0
+ || strcmp (result, "0x4.p-2 33") == 0
+ || strcmp (result, "0x8.p-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010La %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0x001.cp+0 33") == 0
+ || strcmp (result, "0x003.8p-1 33") == 0
+ || strcmp (result, "0x00007p-2 33") == 0
+ || strcmp (result, "0x0000ep-3 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010La %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000inf 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strcmp (result, " inf 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050La %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ /* "0000000nan 33" is not a valid result; see
+ <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %f format directive. */
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "0.000000" },
+ { 1.234321234321234e-36, "0.000000" },
+ { 1.234321234321234e-35, "0.000000" },
+ { 1.234321234321234e-34, "0.000000" },
+ { 1.234321234321234e-33, "0.000000" },
+ { 1.234321234321234e-32, "0.000000" },
+ { 1.234321234321234e-31, "0.000000" },
+ { 1.234321234321234e-30, "0.000000" },
+ { 1.234321234321234e-29, "0.000000" },
+ { 1.234321234321234e-28, "0.000000" },
+ { 1.234321234321234e-27, "0.000000" },
+ { 1.234321234321234e-26, "0.000000" },
+ { 1.234321234321234e-25, "0.000000" },
+ { 1.234321234321234e-24, "0.000000" },
+ { 1.234321234321234e-23, "0.000000" },
+ { 1.234321234321234e-22, "0.000000" },
+ { 1.234321234321234e-21, "0.000000" },
+ { 1.234321234321234e-20, "0.000000" },
+ { 1.234321234321234e-19, "0.000000" },
+ { 1.234321234321234e-18, "0.000000" },
+ { 1.234321234321234e-17, "0.000000" },
+ { 1.234321234321234e-16, "0.000000" },
+ { 1.234321234321234e-15, "0.000000" },
+ { 1.234321234321234e-14, "0.000000" },
+ { 1.234321234321234e-13, "0.000000" },
+ { 1.234321234321234e-12, "0.000000" },
+ { 1.234321234321234e-11, "0.000000" },
+ { 1.234321234321234e-10, "0.000000" },
+ { 1.234321234321234e-9, "0.000000" },
+ { 1.234321234321234e-8, "0.000000" },
+ { 1.234321234321234e-7, "0.000000" },
+ { 1.234321234321234e-6, "0.000001" },
+ { 1.234321234321234e-5, "0.000012" },
+ { 1.234321234321234e-4, "0.000123" },
+ { 1.234321234321234e-3, "0.001234" },
+ { 1.234321234321234e-2, "0.012343" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.234321" },
+ { 1.234321234321234e1, "12.343212" },
+ { 1.234321234321234e2, "123.432123" },
+ { 1.234321234321234e3, "1234.321234" },
+ { 1.234321234321234e4, "12343.212343" },
+ { 1.234321234321234e5, "123432.123432" },
+ { 1.234321234321234e6, "1234321.234321" },
+ { 1.234321234321234e7, "12343212.343212" },
+ { 1.234321234321234e8, "123432123.432123" },
+ { 1.234321234321234e9, "1234321234.321234" },
+ { 1.234321234321234e10, "12343212343.2123**" },
+ { 1.234321234321234e11, "123432123432.123***" },
+ { 1.234321234321234e12, "1234321234321.23****" },
+ { 1.234321234321234e13, "12343212343212.3*****" },
+ { 1.234321234321234e14, "123432123432123.******" },
+ { 1.234321234321234e15, "1234321234321234.000000" },
+ { 1.234321234321234e16, "123432123432123**.000000" },
+ { 1.234321234321234e17, "123432123432123***.000000" },
+ { 1.234321234321234e18, "123432123432123****.000000" },
+ { 1.234321234321234e19, "123432123432123*****.000000" },
+ { 1.234321234321234e20, "123432123432123******.000000" },
+ { 1.234321234321234e21, "123432123432123*******.000000" },
+ { 1.234321234321234e22, "123432123432123********.000000" },
+ { 1.234321234321234e23, "123432123432123*********.000000" },
+ { 1.234321234321234e24, "123432123432123**********.000000" },
+ { 1.234321234321234e25, "123432123432123***********.000000" },
+ { 1.234321234321234e26, "123432123432123************.000000" },
+ { 1.234321234321234e27, "123432123432123*************.000000" },
+ { 1.234321234321234e28, "123432123432123**************.000000" },
+ { 1.234321234321234e29, "123432123432123***************.000000" },
+ { 1.234321234321234e30, "123432123432123****************.000000" },
+ { 1.234321234321234e31, "123432123432123*****************.000000" },
+ { 1.234321234321234e32, "123432123432123******************.000000" },
+ { 1.234321234321234e33, "123432123432123*******************.000000" },
+ { 1.234321234321234e34, "123432123432123********************.000000" },
+ { 1.234321234321234e35, "123432123432123*********************.000000" },
+ { 1.234321234321234e36, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f", data[k].value);
+ ASSERT (result != NULL);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%f %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.f %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015f %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015f %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050f %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.f %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2f %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2f %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "0.000000" },
+ { 1.234321234321234e-36L, "0.000000" },
+ { 1.234321234321234e-35L, "0.000000" },
+ { 1.234321234321234e-34L, "0.000000" },
+ { 1.234321234321234e-33L, "0.000000" },
+ { 1.234321234321234e-32L, "0.000000" },
+ { 1.234321234321234e-31L, "0.000000" },
+ { 1.234321234321234e-30L, "0.000000" },
+ { 1.234321234321234e-29L, "0.000000" },
+ { 1.234321234321234e-28L, "0.000000" },
+ { 1.234321234321234e-27L, "0.000000" },
+ { 1.234321234321234e-26L, "0.000000" },
+ { 1.234321234321234e-25L, "0.000000" },
+ { 1.234321234321234e-24L, "0.000000" },
+ { 1.234321234321234e-23L, "0.000000" },
+ { 1.234321234321234e-22L, "0.000000" },
+ { 1.234321234321234e-21L, "0.000000" },
+ { 1.234321234321234e-20L, "0.000000" },
+ { 1.234321234321234e-19L, "0.000000" },
+ { 1.234321234321234e-18L, "0.000000" },
+ { 1.234321234321234e-17L, "0.000000" },
+ { 1.234321234321234e-16L, "0.000000" },
+ { 1.234321234321234e-15L, "0.000000" },
+ { 1.234321234321234e-14L, "0.000000" },
+ { 1.234321234321234e-13L, "0.000000" },
+ { 1.234321234321234e-12L, "0.000000" },
+ { 1.234321234321234e-11L, "0.000000" },
+ { 1.234321234321234e-10L, "0.000000" },
+ { 1.234321234321234e-9L, "0.000000" },
+ { 1.234321234321234e-8L, "0.000000" },
+ { 1.234321234321234e-7L, "0.000000" },
+ { 1.234321234321234e-6L, "0.000001" },
+ { 1.234321234321234e-5L, "0.000012" },
+ { 1.234321234321234e-4L, "0.000123" },
+ { 1.234321234321234e-3L, "0.001234" },
+ { 1.234321234321234e-2L, "0.012343" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.234321" },
+ { 1.234321234321234e1L, "12.343212" },
+ { 1.234321234321234e2L, "123.432123" },
+ { 1.234321234321234e3L, "1234.321234" },
+ { 1.234321234321234e4L, "12343.212343" },
+ { 1.234321234321234e5L, "123432.123432" },
+ { 1.234321234321234e6L, "1234321.234321" },
+ { 1.234321234321234e7L, "12343212.343212" },
+ { 1.234321234321234e8L, "123432123.432123" },
+ { 1.234321234321234e9L, "1234321234.321234" },
+ { 1.234321234321234e10L, "12343212343.2123**" },
+ { 1.234321234321234e11L, "123432123432.123***" },
+ { 1.234321234321234e12L, "1234321234321.23****" },
+ { 1.234321234321234e13L, "12343212343212.3*****" },
+ { 1.234321234321234e14L, "123432123432123.******" },
+ { 1.234321234321234e15L, "1234321234321234.000000" },
+ { 1.234321234321234e16L, "123432123432123**.000000" },
+ { 1.234321234321234e17L, "123432123432123***.000000" },
+ { 1.234321234321234e18L, "123432123432123****.000000" },
+ { 1.234321234321234e19L, "123432123432123*****.000000" },
+ { 1.234321234321234e20L, "123432123432123******.000000" },
+ { 1.234321234321234e21L, "123432123432123*******.000000" },
+ { 1.234321234321234e22L, "123432123432123********.000000" },
+ { 1.234321234321234e23L, "123432123432123*********.000000" },
+ { 1.234321234321234e24L, "123432123432123**********.000000" },
+ { 1.234321234321234e25L, "123432123432123***********.000000" },
+ { 1.234321234321234e26L, "123432123432123************.000000" },
+ { 1.234321234321234e27L, "123432123432123*************.000000" },
+ { 1.234321234321234e28L, "123432123432123**************.000000" },
+ { 1.234321234321234e29L, "123432123432123***************.000000" },
+ { 1.234321234321234e30L, "123432123432123****************.000000" },
+ { 1.234321234321234e31L, "123432123432123*****************.000000" },
+ { 1.234321234321234e32L, "123432123432123******************.000000" },
+ { 1.234321234321234e33L, "123432123432123*******************.000000" },
+ { 1.234321234321234e34L, "123432123432123********************.000000" },
+ { 1.234321234321234e35L, "123432123432123*********************.000000" },
+ { 1.234321234321234e36L, "123432123432123**********************.000000" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf", data[k].value);
+ ASSERT (result != NULL);
+ ASSERT (strmatch (data[k].string, result));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lf %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.Lf %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015Lf %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050Lf %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.Lf %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2Lf %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2Lf %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %F format directive. */
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%F %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015F %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015F %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.F %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2F %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2F %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.750000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234567.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.031250 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "INF 33") == 0
+ || strcmp (result, "INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-INF 33") == 0
+ || strcmp (result, "-INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%LF %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 1)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "00001234.000000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015LF %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -INF 33") == 0
+ || strcmp (result, " -INFINITY 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.LF %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2LF %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.2LF %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000.00 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %e format directive. */
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.234321e-37" },
+ { 1.234321234321234e-36, "1.234321e-36" },
+ { 1.234321234321234e-35, "1.234321e-35" },
+ { 1.234321234321234e-34, "1.234321e-34" },
+ { 1.234321234321234e-33, "1.234321e-33" },
+ { 1.234321234321234e-32, "1.234321e-32" },
+ { 1.234321234321234e-31, "1.234321e-31" },
+ { 1.234321234321234e-30, "1.234321e-30" },
+ { 1.234321234321234e-29, "1.234321e-29" },
+ { 1.234321234321234e-28, "1.234321e-28" },
+ { 1.234321234321234e-27, "1.234321e-27" },
+ { 1.234321234321234e-26, "1.234321e-26" },
+ { 1.234321234321234e-25, "1.234321e-25" },
+ { 1.234321234321234e-24, "1.234321e-24" },
+ { 1.234321234321234e-23, "1.234321e-23" },
+ { 1.234321234321234e-22, "1.234321e-22" },
+ { 1.234321234321234e-21, "1.234321e-21" },
+ { 1.234321234321234e-20, "1.234321e-20" },
+ { 1.234321234321234e-19, "1.234321e-19" },
+ { 1.234321234321234e-18, "1.234321e-18" },
+ { 1.234321234321234e-17, "1.234321e-17" },
+ { 1.234321234321234e-16, "1.234321e-16" },
+ { 1.234321234321234e-15, "1.234321e-15" },
+ { 1.234321234321234e-14, "1.234321e-14" },
+ { 1.234321234321234e-13, "1.234321e-13" },
+ { 1.234321234321234e-12, "1.234321e-12" },
+ { 1.234321234321234e-11, "1.234321e-11" },
+ { 1.234321234321234e-10, "1.234321e-10" },
+ { 1.234321234321234e-9, "1.234321e-09" },
+ { 1.234321234321234e-8, "1.234321e-08" },
+ { 1.234321234321234e-7, "1.234321e-07" },
+ { 1.234321234321234e-6, "1.234321e-06" },
+ { 1.234321234321234e-5, "1.234321e-05" },
+ { 1.234321234321234e-4, "1.234321e-04" },
+ { 1.234321234321234e-3, "1.234321e-03" },
+ { 1.234321234321234e-2, "1.234321e-02" },
+ { 1.234321234321234e-1, "1.234321e-01" },
+ { 1.234321234321234, "1.234321e+00" },
+ { 1.234321234321234e1, "1.234321e+01" },
+ { 1.234321234321234e2, "1.234321e+02" },
+ { 1.234321234321234e3, "1.234321e+03" },
+ { 1.234321234321234e4, "1.234321e+04" },
+ { 1.234321234321234e5, "1.234321e+05" },
+ { 1.234321234321234e6, "1.234321e+06" },
+ { 1.234321234321234e7, "1.234321e+07" },
+ { 1.234321234321234e8, "1.234321e+08" },
+ { 1.234321234321234e9, "1.234321e+09" },
+ { 1.234321234321234e10, "1.234321e+10" },
+ { 1.234321234321234e11, "1.234321e+11" },
+ { 1.234321234321234e12, "1.234321e+12" },
+ { 1.234321234321234e13, "1.234321e+13" },
+ { 1.234321234321234e14, "1.234321e+14" },
+ { 1.234321234321234e15, "1.234321e+15" },
+ { 1.234321234321234e16, "1.234321e+16" },
+ { 1.234321234321234e17, "1.234321e+17" },
+ { 1.234321234321234e18, "1.234321e+18" },
+ { 1.234321234321234e19, "1.234321e+19" },
+ { 1.234321234321234e20, "1.234321e+20" },
+ { 1.234321234321234e21, "1.234321e+21" },
+ { 1.234321234321234e22, "1.234321e+22" },
+ { 1.234321234321234e23, "1.234321e+23" },
+ { 1.234321234321234e24, "1.234321e+24" },
+ { 1.234321234321234e25, "1.234321e+25" },
+ { 1.234321234321234e26, "1.234321e+26" },
+ { 1.234321234321234e27, "1.234321e+27" },
+ { 1.234321234321234e28, "1.234321e+28" },
+ { 1.234321234321234e29, "1.234321e+29" },
+ { 1.234321234321234e30, "1.234321e+30" },
+ { 1.234321234321234e31, "1.234321e+31" },
+ { 1.234321234321234e32, "1.234321e+32" },
+ { 1.234321234321234e33, "1.234321e+33" },
+ { 1.234321234321234e34, "1.234321e+34" },
+ { 1.234321234321234e35, "1.234321e+35" },
+ { 1.234321234321234e36, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%e %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%15e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-15e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.e %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.e %d", 9.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015e %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015e %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050e %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.e %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4e %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4e %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.275000e+01 33") == 0
+ || strcmp (result, "1.275000e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.234567e+06 33") == 0
+ || strcmp (result, "1.234567e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.234321e-37" },
+ { 1.234321234321234e-36L, "1.234321e-36" },
+ { 1.234321234321234e-35L, "1.234321e-35" },
+ { 1.234321234321234e-34L, "1.234321e-34" },
+ { 1.234321234321234e-33L, "1.234321e-33" },
+ { 1.234321234321234e-32L, "1.234321e-32" },
+ { 1.234321234321234e-31L, "1.234321e-31" },
+ { 1.234321234321234e-30L, "1.234321e-30" },
+ { 1.234321234321234e-29L, "1.234321e-29" },
+ { 1.234321234321234e-28L, "1.234321e-28" },
+ { 1.234321234321234e-27L, "1.234321e-27" },
+ { 1.234321234321234e-26L, "1.234321e-26" },
+ { 1.234321234321234e-25L, "1.234321e-25" },
+ { 1.234321234321234e-24L, "1.234321e-24" },
+ { 1.234321234321234e-23L, "1.234321e-23" },
+ { 1.234321234321234e-22L, "1.234321e-22" },
+ { 1.234321234321234e-21L, "1.234321e-21" },
+ { 1.234321234321234e-20L, "1.234321e-20" },
+ { 1.234321234321234e-19L, "1.234321e-19" },
+ { 1.234321234321234e-18L, "1.234321e-18" },
+ { 1.234321234321234e-17L, "1.234321e-17" },
+ { 1.234321234321234e-16L, "1.234321e-16" },
+ { 1.234321234321234e-15L, "1.234321e-15" },
+ { 1.234321234321234e-14L, "1.234321e-14" },
+ { 1.234321234321234e-13L, "1.234321e-13" },
+ { 1.234321234321234e-12L, "1.234321e-12" },
+ { 1.234321234321234e-11L, "1.234321e-11" },
+ { 1.234321234321234e-10L, "1.234321e-10" },
+ { 1.234321234321234e-9L, "1.234321e-09" },
+ { 1.234321234321234e-8L, "1.234321e-08" },
+ { 1.234321234321234e-7L, "1.234321e-07" },
+ { 1.234321234321234e-6L, "1.234321e-06" },
+ { 1.234321234321234e-5L, "1.234321e-05" },
+ { 1.234321234321234e-4L, "1.234321e-04" },
+ { 1.234321234321234e-3L, "1.234321e-03" },
+ { 1.234321234321234e-2L, "1.234321e-02" },
+ { 1.234321234321234e-1L, "1.234321e-01" },
+ { 1.234321234321234L, "1.234321e+00" },
+ { 1.234321234321234e1L, "1.234321e+01" },
+ { 1.234321234321234e2L, "1.234321e+02" },
+ { 1.234321234321234e3L, "1.234321e+03" },
+ { 1.234321234321234e4L, "1.234321e+04" },
+ { 1.234321234321234e5L, "1.234321e+05" },
+ { 1.234321234321234e6L, "1.234321e+06" },
+ { 1.234321234321234e7L, "1.234321e+07" },
+ { 1.234321234321234e8L, "1.234321e+08" },
+ { 1.234321234321234e9L, "1.234321e+09" },
+ { 1.234321234321234e10L, "1.234321e+10" },
+ { 1.234321234321234e11L, "1.234321e+11" },
+ { 1.234321234321234e12L, "1.234321e+12" },
+ { 1.234321234321234e13L, "1.234321e+13" },
+ { 1.234321234321234e14L, "1.234321e+14" },
+ { 1.234321234321234e15L, "1.234321e+15" },
+ { 1.234321234321234e16L, "1.234321e+16" },
+ { 1.234321234321234e17L, "1.234321e+17" },
+ { 1.234321234321234e18L, "1.234321e+18" },
+ { 1.234321234321234e19L, "1.234321e+19" },
+ { 1.234321234321234e20L, "1.234321e+20" },
+ { 1.234321234321234e21L, "1.234321e+21" },
+ { 1.234321234321234e22L, "1.234321e+22" },
+ { 1.234321234321234e23L, "1.234321e+23" },
+ { 1.234321234321234e24L, "1.234321e+24" },
+ { 1.234321234321234e25L, "1.234321e+25" },
+ { 1.234321234321234e26L, "1.234321e+26" },
+ { 1.234321234321234e27L, "1.234321e+27" },
+ { 1.234321234321234e28L, "1.234321e+28" },
+ { 1.234321234321234e29L, "1.234321e+29" },
+ { 1.234321234321234e30L, "1.234321e+30" },
+ { 1.234321234321234e31L, "1.234321e+31" },
+ { 1.234321234321234e32L, "1.234321e+32" },
+ { 1.234321234321234e33L, "1.234321e+33" },
+ { 1.234321234321234e34L, "1.234321e+34" },
+ { 1.234321234321234e35L, "1.234321e+35" },
+ { 1.234321234321234e36L, "1.234321e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-3.125000e-02 33") == 0
+ || strcmp (result, "-3.125000e-002 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0.000000e+00 33") == 0
+ || strcmp (result, "0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0.000000e+00 33") == 0
+ || strcmp (result, "-0.000000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Le %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-15Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.750000e+00 33") == 0
+ || strcmp (result, "+1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.750000e+00 33") == 0
+ || strcmp (result, " 1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.750000e+00 33") == 0
+ || strcmp (result, "1.750000e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.Le %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2.e+00 33") == 0
+ || strcmp (result, "2.e+000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.Le %d", 9.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0001.234000e+03 33") == 0
+ || strcmp (result, "001.234000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015Le %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050Le %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.Le %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4Le %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "9.9995e+02 33") == 0
+ || strcmp (result, "9.9995e+002 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4Le %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.0000e+03 33") == 0
+ || strcmp (result, "1.0000e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %g format directive. */
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", 12.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", 1234567.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37, "1.23432e-37" },
+ { 1.234321234321234e-36, "1.23432e-36" },
+ { 1.234321234321234e-35, "1.23432e-35" },
+ { 1.234321234321234e-34, "1.23432e-34" },
+ { 1.234321234321234e-33, "1.23432e-33" },
+ { 1.234321234321234e-32, "1.23432e-32" },
+ { 1.234321234321234e-31, "1.23432e-31" },
+ { 1.234321234321234e-30, "1.23432e-30" },
+ { 1.234321234321234e-29, "1.23432e-29" },
+ { 1.234321234321234e-28, "1.23432e-28" },
+ { 1.234321234321234e-27, "1.23432e-27" },
+ { 1.234321234321234e-26, "1.23432e-26" },
+ { 1.234321234321234e-25, "1.23432e-25" },
+ { 1.234321234321234e-24, "1.23432e-24" },
+ { 1.234321234321234e-23, "1.23432e-23" },
+ { 1.234321234321234e-22, "1.23432e-22" },
+ { 1.234321234321234e-21, "1.23432e-21" },
+ { 1.234321234321234e-20, "1.23432e-20" },
+ { 1.234321234321234e-19, "1.23432e-19" },
+ { 1.234321234321234e-18, "1.23432e-18" },
+ { 1.234321234321234e-17, "1.23432e-17" },
+ { 1.234321234321234e-16, "1.23432e-16" },
+ { 1.234321234321234e-15, "1.23432e-15" },
+ { 1.234321234321234e-14, "1.23432e-14" },
+ { 1.234321234321234e-13, "1.23432e-13" },
+ { 1.234321234321234e-12, "1.23432e-12" },
+ { 1.234321234321234e-11, "1.23432e-11" },
+ { 1.234321234321234e-10, "1.23432e-10" },
+ { 1.234321234321234e-9, "1.23432e-09" },
+ { 1.234321234321234e-8, "1.23432e-08" },
+ { 1.234321234321234e-7, "1.23432e-07" },
+ { 1.234321234321234e-6, "1.23432e-06" },
+ { 1.234321234321234e-5, "1.23432e-05" },
+ { 1.234321234321234e-4, "0.000123432" },
+ { 1.234321234321234e-3, "0.00123432" },
+ { 1.234321234321234e-2, "0.0123432" },
+ { 1.234321234321234e-1, "0.123432" },
+ { 1.234321234321234, "1.23432" },
+ { 1.234321234321234e1, "12.3432" },
+ { 1.234321234321234e2, "123.432" },
+ { 1.234321234321234e3, "1234.32" },
+ { 1.234321234321234e4, "12343.2" },
+ { 1.234321234321234e5, "123432" },
+ { 1.234321234321234e6, "1.23432e+06" },
+ { 1.234321234321234e7, "1.23432e+07" },
+ { 1.234321234321234e8, "1.23432e+08" },
+ { 1.234321234321234e9, "1.23432e+09" },
+ { 1.234321234321234e10, "1.23432e+10" },
+ { 1.234321234321234e11, "1.23432e+11" },
+ { 1.234321234321234e12, "1.23432e+12" },
+ { 1.234321234321234e13, "1.23432e+13" },
+ { 1.234321234321234e14, "1.23432e+14" },
+ { 1.234321234321234e15, "1.23432e+15" },
+ { 1.234321234321234e16, "1.23432e+16" },
+ { 1.234321234321234e17, "1.23432e+17" },
+ { 1.234321234321234e18, "1.23432e+18" },
+ { 1.234321234321234e19, "1.23432e+19" },
+ { 1.234321234321234e20, "1.23432e+20" },
+ { 1.234321234321234e21, "1.23432e+21" },
+ { 1.234321234321234e22, "1.23432e+22" },
+ { 1.234321234321234e23, "1.23432e+23" },
+ { 1.234321234321234e24, "1.23432e+24" },
+ { 1.234321234321234e25, "1.23432e+25" },
+ { 1.234321234321234e26, "1.23432e+26" },
+ { 1.234321234321234e27, "1.23432e+27" },
+ { 1.234321234321234e28, "1.23432e+28" },
+ { 1.234321234321234e29, "1.23432e+29" },
+ { 1.234321234321234e30, "1.23432e+30" },
+ { 1.234321234321234e31, "1.23432e+31" },
+ { 1.234321234321234e32, "1.23432e+32" },
+ { 1.234321234321234e33, "1.23432e+33" },
+ { 1.234321234321234e34, "1.23432e+34" },
+ { 1.234321234321234e35, "1.23432e+35" },
+ { 1.234321234321234e36, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", -0.03125, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", -zerod, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", 1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%g %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.g %d", 1.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.g %d", 9.75, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010g %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015g %d", -1.0 / 0.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050g %d", NaNd (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.g %d", 1234.0, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.5g %d", 999.951, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.5g %d", 999.996, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", 12.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* A larger positive number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", 1234567.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.23457e+06 33") == 0
+ || strcmp (result, "1.23457e+006 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Small and large positive numbers. */
+ static struct { long double value; const char *string; } data[] =
+ {
+ { 1.234321234321234e-37L, "1.23432e-37" },
+ { 1.234321234321234e-36L, "1.23432e-36" },
+ { 1.234321234321234e-35L, "1.23432e-35" },
+ { 1.234321234321234e-34L, "1.23432e-34" },
+ { 1.234321234321234e-33L, "1.23432e-33" },
+ { 1.234321234321234e-32L, "1.23432e-32" },
+ { 1.234321234321234e-31L, "1.23432e-31" },
+ { 1.234321234321234e-30L, "1.23432e-30" },
+ { 1.234321234321234e-29L, "1.23432e-29" },
+ { 1.234321234321234e-28L, "1.23432e-28" },
+ { 1.234321234321234e-27L, "1.23432e-27" },
+ { 1.234321234321234e-26L, "1.23432e-26" },
+ { 1.234321234321234e-25L, "1.23432e-25" },
+ { 1.234321234321234e-24L, "1.23432e-24" },
+ { 1.234321234321234e-23L, "1.23432e-23" },
+ { 1.234321234321234e-22L, "1.23432e-22" },
+ { 1.234321234321234e-21L, "1.23432e-21" },
+ { 1.234321234321234e-20L, "1.23432e-20" },
+ { 1.234321234321234e-19L, "1.23432e-19" },
+ { 1.234321234321234e-18L, "1.23432e-18" },
+ { 1.234321234321234e-17L, "1.23432e-17" },
+ { 1.234321234321234e-16L, "1.23432e-16" },
+ { 1.234321234321234e-15L, "1.23432e-15" },
+ { 1.234321234321234e-14L, "1.23432e-14" },
+ { 1.234321234321234e-13L, "1.23432e-13" },
+ { 1.234321234321234e-12L, "1.23432e-12" },
+ { 1.234321234321234e-11L, "1.23432e-11" },
+ { 1.234321234321234e-10L, "1.23432e-10" },
+ { 1.234321234321234e-9L, "1.23432e-09" },
+ { 1.234321234321234e-8L, "1.23432e-08" },
+ { 1.234321234321234e-7L, "1.23432e-07" },
+ { 1.234321234321234e-6L, "1.23432e-06" },
+ { 1.234321234321234e-5L, "1.23432e-05" },
+ { 1.234321234321234e-4L, "0.000123432" },
+ { 1.234321234321234e-3L, "0.00123432" },
+ { 1.234321234321234e-2L, "0.0123432" },
+ { 1.234321234321234e-1L, "0.123432" },
+ { 1.234321234321234L, "1.23432" },
+ { 1.234321234321234e1L, "12.3432" },
+ { 1.234321234321234e2L, "123.432" },
+ { 1.234321234321234e3L, "1234.32" },
+ { 1.234321234321234e4L, "12343.2" },
+ { 1.234321234321234e5L, "123432" },
+ { 1.234321234321234e6L, "1.23432e+06" },
+ { 1.234321234321234e7L, "1.23432e+07" },
+ { 1.234321234321234e8L, "1.23432e+08" },
+ { 1.234321234321234e9L, "1.23432e+09" },
+ { 1.234321234321234e10L, "1.23432e+10" },
+ { 1.234321234321234e11L, "1.23432e+11" },
+ { 1.234321234321234e12L, "1.23432e+12" },
+ { 1.234321234321234e13L, "1.23432e+13" },
+ { 1.234321234321234e14L, "1.23432e+14" },
+ { 1.234321234321234e15L, "1.23432e+15" },
+ { 1.234321234321234e16L, "1.23432e+16" },
+ { 1.234321234321234e17L, "1.23432e+17" },
+ { 1.234321234321234e18L, "1.23432e+18" },
+ { 1.234321234321234e19L, "1.23432e+19" },
+ { 1.234321234321234e20L, "1.23432e+20" },
+ { 1.234321234321234e21L, "1.23432e+21" },
+ { 1.234321234321234e22L, "1.23432e+22" },
+ { 1.234321234321234e23L, "1.23432e+23" },
+ { 1.234321234321234e24L, "1.23432e+24" },
+ { 1.234321234321234e25L, "1.23432e+25" },
+ { 1.234321234321234e26L, "1.23432e+26" },
+ { 1.234321234321234e27L, "1.23432e+27" },
+ { 1.234321234321234e28L, "1.23432e+28" },
+ { 1.234321234321234e29L, "1.23432e+29" },
+ { 1.234321234321234e30L, "1.23432e+30" },
+ { 1.234321234321234e31L, "1.23432e+31" },
+ { 1.234321234321234e32L, "1.23432e+32" },
+ { 1.234321234321234e33L, "1.23432e+33" },
+ { 1.234321234321234e34L, "1.23432e+34" },
+ { 1.234321234321234e35L, "1.23432e+35" },
+ { 1.234321234321234e36L, "1.23432e+36" }
+ };
+ size_t k;
+ for (k = 0; k < SIZEOF (data); k++)
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg", data[k].value);
+ const char *expected = data[k].string;
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, expected) == 0
+ /* Some implementations produce exponents with 3 digits. */
+ || (expected[strlen (expected) - 4] == 'e'
+ && strlen (result) == strlen (expected) + 1
+ && memcmp (result, expected, strlen (expected) - 2) == 0
+ && result[strlen (expected) - 2] == '0'
+ && strcmp (result + strlen (expected) - 1,
+ expected + strlen (expected) - 2)
+ == 0));
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ }
+
+ { /* A negative number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", -0.03125L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-0.03125 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative zero. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", minus_zerol, 33, 44, 55);
+ ASSERT (result != NULL);
+ if (have_minus_zero ())
+ ASSERT (strcmp (result, "-0 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Positive infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", 1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "inf 33") == 0
+ || strcmp (result, "infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Negative infinity. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "-inf 33") == 0
+ || strcmp (result, "-infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#if CHECK_PRINTF_SAFE && ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_))
+ { /* Quiet NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ {
+ /* Signalling NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities,
+ Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in
+ Intel IA-64 Architecture Software Developer's Manual, Volume 1:
+ Application Architecture.
+ Table 5-2 "Floating-Point Register Encodings"
+ Figure 5-6 "Memory to Floating-Point Register Data Translation"
+ */
+ { /* Pseudo-NaN. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Infinity. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Zero. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Unnormalized number. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+ { /* Pseudo-Denormal. */
+ static union { unsigned int word[4]; long double value; } x =
+ { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
+ char *result;
+ int retval =
+ my_asprintf (&result, "%Lg %d", x.value, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) >= 3 + 3
+ && strisnan (result, 0, strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+#endif
+
+ { /* Width. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_LEFT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%-10Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SHOWSIGN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%+Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "+1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_SPACE. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "% Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " 1.75 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.75000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.Lg %d", 1.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "2. 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ALT. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.Lg %d", 9.75L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1.e+01 33") == 0
+ || strcmp (result, "1.e+001 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with finite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%010Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "0000001234 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with infinite number. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%015Lg %d", -1.0L / 0.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, " -inf 33") == 0
+ || strcmp (result, " -infinity 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* FLAG_ZERO with NaN. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%050Lg %d", NaNl (), 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strlen (result) == 50 + 3
+ && strisnan (result, strspn (result, " "), strlen (result) - 3, 0)
+ && strcmp (result + strlen (result) - 3, " 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.Lg %d", 1234.0L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1e+03 33") == 0
+ || strcmp (result, "1e+003 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with no rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.5Lg %d", 999.951L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "999.95 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ { /* Precision with rounding. */
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.5Lg %d", 999.996L, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "1000 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %n format directive. */
+
+ {
+ int count = -1;
+ char *result;
+ int retval =
+ my_asprintf (&result, "%d %n", 123, &count, 33, 44, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "123 ") == 0);
+ ASSERT (retval == strlen (result));
+ ASSERT (count == 4);
+ free (result);
+ }
+
+ /* Test the support of the POSIX/XSI format strings with positions. */
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%2$d %1$d", 33, 55);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "55 33") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the grouping flag. */
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%'d %d", 1234567, 99);
+ ASSERT (result != NULL);
+ ASSERT (result[strlen (result) - 1] == '9');
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the left-adjust flag. */
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "a%*sc", -3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "a%-*sc", 3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "a%-*sc", -3, "b");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "ab c") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of large precision. */
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4000d %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.*d %d", 4000, 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4000d %d", -1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ ASSERT (result[0] == '-');
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[1 + i] == '0');
+ ASSERT (strcmp (result + 1 + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4000u %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "1234567 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4000o %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 7; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 7, "4553207 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[i] == '0');
+ ASSERT (strcmp (result + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char *result;
+ int retval =
+ my_asprintf (&result, "%#.4000x %d", 1234567, 99);
+ size_t i;
+ ASSERT (result != NULL);
+ ASSERT (result[0] == '0');
+ ASSERT (result[1] == 'x');
+ for (i = 0; i < 4000 - 6; i++)
+ ASSERT (result[2 + i] == '0');
+ ASSERT (strcmp (result + 2 + 4000 - 6, "12d687 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ {
+ char input[5000];
+ char *result;
+ int retval;
+ size_t i;
+
+ for (i = 0; i < sizeof (input) - 1; i++)
+ input[i] = 'a' + ((1000000 / (i + 1)) % 26);
+ input[i] = '\0';
+ retval = my_asprintf (&result, "%.4000s %d", input, 99);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, input, 4000) == 0);
+ ASSERT (strcmp (result + 4000, " 99") == 0);
+ ASSERT (retval == strlen (result));
+ free (result);
+ }
+
+ /* Test the support of the %s format directive. */
+
+ /* To verify that these tests succeed, it is necessary to run them under
+ a tool that checks against invalid memory accesses, such as ElectricFence
+ or "valgrind --tool=memcheck". */
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ char *block;
+ char *result;
+ int retval;
+
+ block = (char *) malloc (i);
+ memcpy (block, "abcdefgh", i);
+ retval = my_asprintf (&result, "%.*s", (int) i, block);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, block, i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (result);
+ free (block);
+ }
+ }
+#if HAVE_WCHAR_T
+ {
+ size_t i;
+
+ for (i = 1; i <= 8; i++)
+ {
+ wchar_t *block;
+ size_t j;
+ char *result;
+ int retval;
+
+ block = (wchar_t *) malloc (i * sizeof (wchar_t));
+ for (j = 0; j < i; j++)
+ block[j] = "abcdefgh"[j];
+ retval = my_asprintf (&result, "%.*ls", (int) i, block);
+ ASSERT (result != NULL);
+ ASSERT (memcmp (result, "abcdefgh", i) == 0);
+ ASSERT (result[i] == '\0');
+ ASSERT (retval == strlen (result));
+ free (result);
+ free (block);
+ }
+ }
+#endif
+}
+
+static int
+my_asprintf (char **result, const char *format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start (args, format);
+ ret = vasprintf (result, format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_vasprintf ()
+{
+ test_function (my_asprintf);
+}
+
+static void
+test_asprintf ()
+{
+ test_function (asprintf);
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_vasprintf ();
+ test_asprintf ();
+ return 0;
+}
diff --git a/tests/gnu/test-vasprintf.c b/tests/gnu/test-vasprintf.c
new file mode 100755
index 00000000..e5dc3cd3
--- /dev/null
+++ b/tests/gnu/test-vasprintf.c
@@ -0,0 +1,83 @@
+/* Test of vasprintf() and asprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (asprintf, int, (char **, char const *, ...));
+SIGNATURE_CHECK (vasprintf, int, (char **, char const *, va_list));
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+static int
+my_asprintf (char **result, const char *format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start (args, format);
+ ret = vasprintf (result, format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_vasprintf ()
+{
+ int repeat;
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ char *result;
+ int retval = my_asprintf (&result, "%d", 12345);
+ ASSERT (retval == 5);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ free (result);
+ }
+}
+
+static void
+test_asprintf ()
+{
+ int repeat;
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ char *result;
+ int retval = asprintf (&result, "%d", 12345);
+ ASSERT (retval == 5);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ free (result);
+ }
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_vasprintf ();
+ test_asprintf ();
+ return 0;
+}
diff --git a/tests/gnu/test-vc-list-files-cvs.sh b/tests/gnu/test-vc-list-files-cvs.sh
new file mode 100755
index 00000000..110be03f
--- /dev/null
+++ b/tests/gnu/test-vc-list-files-cvs.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+tmpdir=vc-cvs-$$
+trap 'st=$?; cd '"`pwd`"' && rm -rf $tmpdir; exit $st' 0
+trap '(exit $?); exit $?' 1 2 13 15
+
+if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { diff -u "$@"; }
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { cmp -s "$@"; }
+else
+ compare() { cmp "$@"; }
+fi
+
+repo=`pwd`/$tmpdir/repo
+
+fail=0
+for i in with-cvsu without; do
+ # On the first iteration, test using cvsu, if it's in your path.
+ # On the second iteration, ensure that cvsu fails, so we'll
+ # exercise the awk-using code.
+ if test $i = without; then
+ printf '%s\n' '#!/bin/sh' 'exit 1' > cvsu
+ chmod a+x cvsu
+ PATH=`pwd`:$PATH
+ export PATH
+ fi
+ ok=0
+ mkdir $tmpdir && cd $tmpdir &&
+ # without cvs, skip the test
+ # The double use of 'exit' is needed for the reference to $? inside the trap.
+ { ( cvs -Q -d "$repo" init ) > /dev/null 2>&1 \
+ || { echo "Skipping test: cvs not found in PATH"; (exit 77); exit 77; }; } &&
+ mkdir w && cd w &&
+ mkdir d &&
+ touch d/a b c &&
+ cvs -Q -d "$repo" import -m imp m M M0 &&
+ cvs -Q -d "$repo" co m && cd m &&
+ printf '%s\n' b c d/a > expected &&
+ vc-list-files | sort > actual &&
+ compare expected actual &&
+ ok=1
+ test $ok = 0 && fail=1
+done
+
+(exit $fail); exit $fail
diff --git a/tests/gnu/test-vc-list-files-git.sh b/tests/gnu/test-vc-list-files-git.sh
new file mode 100755
index 00000000..7b7ff1a5
--- /dev/null
+++ b/tests/gnu/test-vc-list-files-git.sh
@@ -0,0 +1,48 @@
+#!/bin/sh
+# Unit tests for vc-list-files
+# Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+if ( diff --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { diff -u "$@"; }
+elif ( cmp --version < /dev/null 2>&1 | grep GNU ) 2>&1 > /dev/null; then
+ compare() { cmp -s "$@"; }
+else
+ compare() { cmp "$@"; }
+fi
+
+tmpdir=vc-git-$$
+trap 'st=$?; cd '"`pwd`"' && rm -rf $tmpdir; exit $st' 0
+trap '(exit $?); exit $?' 1 2 13 15
+
+fail=1
+mkdir $tmpdir && cd $tmpdir &&
+ # without git, skip the test
+ # The double use of 'exit' is needed for the reference to $? inside the trap.
+ { ( git init -q ) > /dev/null 2>&1 \
+ || { echo "Skipping test: git not found in PATH"; (exit 77); exit 77; }; } &&
+ mkdir d &&
+ touch d/a b c &&
+ git config user.email "you@example.com"
+ git config user.name "Your Name"
+ git add . > /dev/null &&
+ git commit -q -a -m log &&
+ printf '%s\n' b c d/a > expected &&
+ vc-list-files > actual &&
+ compare expected actual &&
+ fail=0
+
+(exit $fail); exit $fail
diff --git a/tests/gnu/test-vfprintf-posix.c b/tests/gnu/test-vfprintf-posix.c
new file mode 100755
index 00000000..3c64afef
--- /dev/null
+++ b/tests/gnu/test-vfprintf-posix.c
@@ -0,0 +1,52 @@
+/* Test of POSIX compatible vfprintf() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (vfprintf, int, (FILE *, char const *, va_list));
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "macros.h"
+
+#include "test-fprintf-posix.h"
+
+static int
+my_fprintf (FILE *fp, const char *format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start (args, format);
+ ret = vfprintf (fp, format, args);
+ va_end (args);
+ return ret;
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_function (my_fprintf);
+ return 0;
+}
diff --git a/tests/gnu/test-vfprintf-posix.sh b/tests/gnu/test-vfprintf-posix.sh
new file mode 100755
index 00000000..74339ba0
--- /dev/null
+++ b/tests/gnu/test-vfprintf-posix.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-vfprintf-posix.tmp t-vfprintf-posix.out"
+./test-vfprintf-posix${EXEEXT} > t-vfprintf-posix.tmp || exit 1
+LC_ALL=C tr -d '\r' < t-vfprintf-posix.tmp > t-vfprintf-posix.out || exit 1
+
+: ${DIFF=diff}
+${DIFF} "${srcdir}/test-printf-posix.output" t-vfprintf-posix.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/gnu/test-vprintf-posix.c b/tests/gnu/test-vprintf-posix.c
new file mode 100755
index 00000000..166df533
--- /dev/null
+++ b/tests/gnu/test-vprintf-posix.c
@@ -0,0 +1,52 @@
+/* Test of POSIX compatible vfprintf() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <stdio.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (vprintf, int, (char const *, va_list));
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "macros.h"
+
+#include "test-printf-posix.h"
+
+static int
+my_printf (const char *format, ...)
+{
+ va_list args;
+ int ret;
+
+ va_start (args, format);
+ ret = vprintf (format, args);
+ va_end (args);
+ return ret;
+}
+
+int
+main (int argc, char *argv[])
+{
+ test_function (my_printf);
+ return 0;
+}
diff --git a/tests/gnu/test-vprintf-posix.sh b/tests/gnu/test-vprintf-posix.sh
new file mode 100755
index 00000000..968a8b2a
--- /dev/null
+++ b/tests/gnu/test-vprintf-posix.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-vprintf-posix.tmp t-vprintf-posix.out"
+./test-vprintf-posix${EXEEXT} > t-vprintf-posix.tmp || exit 1
+LC_ALL=C tr -d '\r' < t-vprintf-posix.tmp > t-vprintf-posix.out || exit 1
+
+: ${DIFF=diff}
+${DIFF} "${srcdir}/test-printf-posix.output" t-vprintf-posix.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/gnu/test-wchar.c b/tests/gnu/test-wchar.c
new file mode 100755
index 00000000..2a03d6b6
--- /dev/null
+++ b/tests/gnu/test-wchar.c
@@ -0,0 +1,37 @@
+/* Test of <wchar.h> substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "verify.h"
+
+/* Check that the types wchar_t and wint_t are defined. */
+wchar_t a = 'c';
+wint_t b = 'x';
+
+/* Check that NULL can be passed through varargs as a pointer type,
+ per POSIX 2008. */
+verify (sizeof NULL == sizeof (void *));
+
+int
+main (void)
+{
+ return 0;
+}
diff --git a/tests/gnu/test-wcrtomb.c b/tests/gnu/test-wcrtomb.c
new file mode 100755
index 00000000..0e844ef0
--- /dev/null
+++ b/tests/gnu/test-wcrtomb.c
@@ -0,0 +1,154 @@
+/* Test of conversion of wide character to multibyte character.
+ Copyright (C) 2008, 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (wcrtomb, size_t, (char *, wchar_t, mbstate_t *));
+
+#include <locale.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "macros.h"
+
+/* Check the multibyte character s[0..n-1]. */
+static void
+check_character (const char *s, size_t n)
+{
+ wchar_t wc;
+ char buf[64];
+ int iret;
+ size_t ret;
+
+ wc = (wchar_t) 0xBADFACE;
+ iret = mbtowc (&wc, s, n);
+ ASSERT (iret == n);
+
+ ret = wcrtomb (buf, wc, NULL);
+ ASSERT (ret == n);
+ ASSERT (memcmp (buf, s, n) == 0);
+
+ /* Test special calling convention, passing a NULL pointer. */
+ ret = wcrtomb (NULL, wc, NULL);
+ ASSERT (ret == 1);
+}
+
+int
+main (int argc, char *argv[])
+{
+ char buf[64];
+ size_t ret;
+
+ /* configure should already have checked that the locale is supported. */
+ if (setlocale (LC_ALL, "") == NULL)
+ return 1;
+
+ /* Test NUL character. */
+ {
+ buf[0] = 'x';
+ ret = wcrtomb (buf, 0, NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == '\0');
+ }
+
+ /* Test single bytes. */
+ {
+ int c;
+
+ for (c = 0; c < 0x100; c++)
+ switch (c)
+ {
+ case '\t': case '\v': case '\f':
+ case ' ': case '!': case '"': case '#': case '%':
+ case '&': case '\'': case '(': case ')': case '*':
+ case '+': case ',': case '-': case '.': case '/':
+ case '0': case '1': case '2': case '3': case '4':
+ case '5': case '6': case '7': case '8': case '9':
+ case ':': case ';': case '<': case '=': case '>':
+ case '?':
+ case 'A': case 'B': case 'C': case 'D': case 'E':
+ case 'F': case 'G': case 'H': case 'I': case 'J':
+ case 'K': case 'L': case 'M': case 'N': case 'O':
+ case 'P': case 'Q': case 'R': case 'S': case 'T':
+ case 'U': case 'V': case 'W': case 'X': case 'Y':
+ case 'Z':
+ case '[': case '\\': case ']': case '^': case '_':
+ case 'a': case 'b': case 'c': case 'd': case 'e':
+ case 'f': case 'g': case 'h': case 'i': case 'j':
+ case 'k': case 'l': case 'm': case 'n': case 'o':
+ case 'p': case 'q': case 'r': case 's': case 't':
+ case 'u': case 'v': case 'w': case 'x': case 'y':
+ case 'z': case '{': case '|': case '}': case '~':
+ /* c is in the ISO C "basic character set". */
+ ret = wcrtomb (buf, btowc (c), NULL);
+ ASSERT (ret == 1);
+ ASSERT (buf[0] == (char) c);
+ break;
+ }
+ }
+
+ if (argc > 1)
+ switch (argv[1][0])
+ {
+ case '1':
+ /* Locale encoding is ISO-8859-1 or ISO-8859-15. */
+ {
+ const char input[] = "B\374\337er"; /* "Büßer" */
+
+ check_character (input + 1, 1);
+ check_character (input + 2, 1);
+ }
+ return 0;
+
+ case '2':
+ /* Locale encoding is UTF-8. */
+ {
+ const char input[] = "B\303\274\303\237er"; /* "Büßer" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 2);
+ }
+ return 0;
+
+ case '3':
+ /* Locale encoding is EUC-JP. */
+ {
+ const char input[] = "<\306\374\313\334\270\354>"; /* "<日本語>" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 2);
+ check_character (input + 5, 2);
+ }
+ return 0;
+
+ case '4':
+ /* Locale encoding is GB18030. */
+ {
+ const char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
+
+ check_character (input + 1, 2);
+ check_character (input + 3, 4);
+ }
+ return 0;
+ }
+
+ return 1;
+}
diff --git a/tests/gnu/test-wcrtomb.sh b/tests/gnu/test-wcrtomb.sh
new file mode 100755
index 00000000..3eda8f33
--- /dev/null
+++ b/tests/gnu/test-wcrtomb.sh
@@ -0,0 +1,35 @@
+#!/bin/sh
+
+# Test in an ISO-8859-1 or ISO-8859-15 locale.
+: ${LOCALE_FR=fr_FR}
+if test $LOCALE_FR != none; then
+ LC_ALL=$LOCALE_FR \
+ ./test-wcrtomb${EXEEXT} 1 \
+ || exit 1
+fi
+
+# Test whether a specific UTF-8 locale is installed.
+: ${LOCALE_FR_UTF8=fr_FR.UTF-8}
+if test $LOCALE_FR_UTF8 != none; then
+ LC_ALL=$LOCALE_FR_UTF8 \
+ ./test-wcrtomb${EXEEXT} 2 \
+ || exit 1
+fi
+
+# Test whether a specific EUC-JP locale is installed.
+: ${LOCALE_JA=ja_JP}
+if test $LOCALE_JA != none; then
+ LC_ALL=$LOCALE_JA \
+ ./test-wcrtomb${EXEEXT} 3 \
+ || exit 1
+fi
+
+# Test whether a specific GB18030 locale is installed.
+: ${LOCALE_ZH_CN=zh_CN.GB18030}
+if test $LOCALE_ZH_CN != none; then
+ LC_ALL=$LOCALE_ZH_CN \
+ ./test-wcrtomb${EXEEXT} 4 \
+ || exit 1
+fi
+
+exit 0
diff --git a/tests/gnu/test-wctype.c b/tests/gnu/test-wctype.c
new file mode 100755
index 00000000..49d7cfa0
--- /dev/null
+++ b/tests/gnu/test-wctype.c
@@ -0,0 +1,74 @@
+/* Test of <wctype.h> substitute.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <wctype.h>
+
+#include "macros.h"
+
+/* Check that the type wint_t is defined. */
+wint_t a = 'x';
+/* Check that WEOF is defined. */
+wint_t e = WEOF;
+
+int
+main (void)
+{
+ /* Check that the isw* functions exist as functions or as macros. */
+ (void) iswalnum (0);
+ (void) iswalpha (0);
+#if 0 /* not portable: missing on mingw */
+ (void) iswblank (0);
+#endif
+ (void) iswcntrl (0);
+ (void) iswdigit (0);
+ (void) iswgraph (0);
+ (void) iswlower (0);
+ (void) iswprint (0);
+ (void) iswpunct (0);
+ (void) iswspace (0);
+ (void) iswupper (0);
+ (void) iswxdigit (0);
+
+ /* Check that the isw* functions map WEOF to 0. */
+ ASSERT (!iswalnum (e));
+ ASSERT (!iswalpha (e));
+#if 0 /* not portable: missing on mingw */
+ ASSERT (!iswblank (e));
+#endif
+ ASSERT (!iswcntrl (e));
+ ASSERT (!iswdigit (e));
+ ASSERT (!iswgraph (e));
+ ASSERT (!iswlower (e));
+ ASSERT (!iswprint (e));
+ ASSERT (!iswpunct (e));
+ ASSERT (!iswspace (e));
+ ASSERT (!iswupper (e));
+ ASSERT (!iswxdigit (e));
+
+ /* Check that the tow* functions exist as functions or as macros. */
+ (void) towlower (0);
+ (void) towupper (0);
+
+ /* Check that the tow* functions map WEOF to WEOF. */
+ ASSERT (towlower (e) == e);
+ ASSERT (towupper (e) == e);
+
+ return 0;
+}
diff --git a/tests/gnu/test-wcwidth.c b/tests/gnu/test-wcwidth.c
new file mode 100755
index 00000000..f6f97924
--- /dev/null
+++ b/tests/gnu/test-wcwidth.c
@@ -0,0 +1,81 @@
+/* Test of wcwidth() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include <wchar.h>
+
+#include "signature.h"
+SIGNATURE_CHECK (wcwidth, int, (wchar_t));
+
+#include <locale.h>
+#include <string.h>
+
+#include "localcharset.h"
+#include "macros.h"
+
+int
+main ()
+{
+ wchar_t wc;
+
+ /* Test width of ASCII characters. */
+ for (wc = 0x20; wc < 0x7F; wc++)
+ ASSERT (wcwidth (wc) == 1);
+
+ /* Switch to an UTF-8 locale. */
+ if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL
+ /* Check whether it's really an UTF-8 locale.
+ On OpenBSD 4.0, the setlocale call succeeds only for the LC_CTYPE
+ category and therefore returns "C/fr_FR.UTF-8/C/C/C/C", but the
+ LC_CTYPE category is effectively set to an ASCII LC_CTYPE category;
+ in particular, locale_charset() returns "ASCII". */
+ && strcmp (locale_charset (), "UTF-8") == 0)
+ {
+ /* Test width of ASCII characters. */
+ for (wc = 0x20; wc < 0x7F; wc++)
+ ASSERT (wcwidth (wc) == 1);
+
+ /* Test width of some non-spacing characters. */
+ ASSERT (wcwidth (0x0301) == 0);
+ ASSERT (wcwidth (0x05B0) == 0);
+
+ /* Test width of some format control characters. */
+ ASSERT (wcwidth (0x200E) <= 0);
+ ASSERT (wcwidth (0x2060) <= 0);
+#if 0 /* wchar_t may be only 16 bits. */
+ ASSERT (wcwidth (0xE0001) <= 0);
+ ASSERT (wcwidth (0xE0044) <= 0);
+#endif
+
+ /* Test width of some zero width characters. */
+ ASSERT (wcwidth (0x200B) == 0);
+ ASSERT (wcwidth (0xFEFF) <= 0);
+
+ /* Test width of some CJK characters. */
+ ASSERT (wcwidth (0x3000) == 2);
+ ASSERT (wcwidth (0xB250) == 2);
+ ASSERT (wcwidth (0xFF1A) == 2);
+#if 0 /* wchar_t may be only 16 bits. */
+ ASSERT (wcwidth (0x20369) == 2);
+ ASSERT (wcwidth (0x2F876) == 2);
+#endif
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-xalloc-die.c b/tests/gnu/test-xalloc-die.c
new file mode 100755
index 00000000..67edd92d
--- /dev/null
+++ b/tests/gnu/test-xalloc-die.c
@@ -0,0 +1,30 @@
+/* Test of xalloc_die() function.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Simon Josefsson <simon@josefsson.org>, 2009. */
+
+#include <config.h>
+
+#include "xalloc.h"
+#include "progname.h"
+
+int
+main (int argc _GL_UNUSED, char **argv)
+{
+ set_program_name (argv[0]);
+ xalloc_die ();
+ return 0;
+}
diff --git a/tests/gnu/test-xalloc-die.sh b/tests/gnu/test-xalloc-die.sh
new file mode 100755
index 00000000..80d6208d
--- /dev/null
+++ b/tests/gnu/test-xalloc-die.sh
@@ -0,0 +1,36 @@
+#!/bin/sh
+# Test suite for xalloc_die.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+# This file is part of the GNUlib Library.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU 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 General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+. "${srcdir=.}/init.sh"; path_prepend_ .
+
+test-xalloc-die${EXEEXT} 2> err > out
+case $? in
+ 1) ;;
+ *) Exit 1;;
+esac
+
+tr -d '\015' < err \
+ | sed 's,.*test-xalloc-die[.ex]*:,test-xalloc-die:,' > err2 || Exit 1
+
+compare - err2 <<\EOF || Exit 1
+test-xalloc-die: memory exhausted
+EOF
+
+test -s out && Exit 1
+
+Exit $fail
diff --git a/tests/gnu/test-xfprintf-posix.c b/tests/gnu/test-xfprintf-posix.c
new file mode 100755
index 00000000..b8fc6ed2
--- /dev/null
+++ b/tests/gnu/test-xfprintf-posix.c
@@ -0,0 +1,40 @@
+/* Test of error-checking xfprintf() function with POSIX compatible formatting.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "xprintf.h"
+
+#include <stdarg.h>
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+#include "test-fprintf-posix.h"
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ set_program_name (argv[0]);
+
+ test_function (xfprintf);
+ return 0;
+}
diff --git a/tests/gnu/test-xmemdup0.c b/tests/gnu/test-xmemdup0.c
new file mode 100755
index 00000000..eb93336f
--- /dev/null
+++ b/tests/gnu/test-xmemdup0.c
@@ -0,0 +1,82 @@
+/* Test of xmemdup0() function.
+ Copyright (C) 2008-2010 Free Software Foundation, Inc.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 3, 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software Foundation,
+ Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2008. */
+
+#include <config.h>
+
+#include "xmemdup0.h"
+
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+int
+main (int argc, char **argv)
+{
+ char buffer[10] = { 'a', 'b', 'c', 'd', '\0',
+ 'f', 'g', 'h', 'i', 'j' };
+
+ set_program_name (argv[0]);
+
+ /* Empty string. */
+ {
+ char *result = xmemdup0 (NULL, 0);
+ ASSERT (result);
+ ASSERT (!*result);
+ free (result);
+ }
+ {
+ char *result = xmemdup0 ("", 0);
+ ASSERT (result);
+ ASSERT (!*result);
+ free (result);
+ }
+
+ /* Various buffer lengths. */
+ {
+ char *result = xmemdup0 (buffer, 4);
+ ASSERT (result);
+ ASSERT (strcmp (result, buffer) == 0);
+ free (result);
+ }
+ {
+ char *result = xmemdup0 (buffer, 5);
+ ASSERT (result);
+ ASSERT (strcmp (result, buffer) == 0);
+ ASSERT (result[5] == '\0');
+ free (result);
+ }
+ {
+ char *result = xmemdup0 (buffer, 9);
+ ASSERT (result);
+ ASSERT (memcmp (result, buffer, 9) == 0);
+ ASSERT (result[9] == '\0');
+ free (result);
+ }
+ {
+ char *result = xmemdup0 (buffer, 10);
+ ASSERT (result);
+ ASSERT (memcmp (result, buffer, 10) == 0);
+ ASSERT (result[10] == '\0');
+ free (result);
+ }
+
+ return 0;
+}
diff --git a/tests/gnu/test-xprintf-posix.c b/tests/gnu/test-xprintf-posix.c
new file mode 100755
index 00000000..c907356f
--- /dev/null
+++ b/tests/gnu/test-xprintf-posix.c
@@ -0,0 +1,39 @@
+/* Test of error-checking xprintf() function with POSIX compatible formatting.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "xprintf.h"
+
+#include <stddef.h>
+#include <stdint.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+#include "test-printf-posix.h"
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ set_program_name (argv[0]);
+
+ test_function (xprintf);
+ return 0;
+}
diff --git a/tests/gnu/test-xprintf-posix.sh b/tests/gnu/test-xprintf-posix.sh
new file mode 100755
index 00000000..0087a9d4
--- /dev/null
+++ b/tests/gnu/test-xprintf-posix.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles t-xprintf-posix.tmp t-xprintf-posix.out"
+./test-xprintf-posix${EXEEXT} > t-xprintf-posix.tmp || exit 1
+LC_ALL=C tr -d '\r' < t-xprintf-posix.tmp > t-xprintf-posix.out || exit 1
+
+: ${DIFF=diff}
+${DIFF} "${srcdir}/test-printf-posix.output" t-xprintf-posix.out
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+tmpfiles="$tmpfiles t-xfprintf-posix.tmp t-xfprintf-posix.out"
+./test-xfprintf-posix${EXEEXT} > t-xfprintf-posix.tmp || exit 1
+LC_ALL=C tr -d '\r' < t-xfprintf-posix.tmp > t-xfprintf-posix.out || exit 1
+
+: ${DIFF=diff}
+${DIFF} "${srcdir}/test-printf-posix.output" t-xfprintf-posix.out
+test $? = 0 || { rm -fr $tmpfiles; exit 1; }
+
+rm -fr $tmpfiles
+
+exit 0
diff --git a/tests/gnu/test-xvasprintf.c b/tests/gnu/test-xvasprintf.c
new file mode 100755
index 00000000..df6c2009
--- /dev/null
+++ b/tests/gnu/test-xvasprintf.c
@@ -0,0 +1,129 @@
+/* Test of xvasprintf() and xasprintf() functions.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "xvasprintf.h"
+
+#include <stdarg.h>
+#include <stdlib.h>
+#include <string.h>
+
+#include "progname.h"
+#include "macros.h"
+
+static char *
+my_xasprintf (const char *format, ...)
+{
+ va_list args;
+ char *ret;
+
+ va_start (args, format);
+ ret = xvasprintf (format, args);
+ va_end (args);
+ return ret;
+}
+
+static void
+test_xvasprintf (void)
+{
+ int repeat;
+ char *result;
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ result = my_xasprintf ("%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ free (result);
+ }
+
+ {
+ /* Silence gcc warning about zero-length format string. */
+ char *empty = "";
+ result = my_xasprintf (empty);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
+
+ result = my_xasprintf ("%s", "foo");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foo") == 0);
+ free (result);
+
+ result = my_xasprintf ("%s%s", "foo", "bar");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foobar") == 0);
+ free (result);
+
+ result = my_xasprintf ("%s%sbaz", "foo", "bar");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foobarbaz") == 0);
+ free (result);
+}
+
+static void
+test_xasprintf ()
+{
+ int repeat;
+ char *result;
+
+ for (repeat = 0; repeat <= 8; repeat++)
+ {
+ result = xasprintf ("%d", 12345);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "12345") == 0);
+ free (result);
+ }
+
+ {
+ /* Silence gcc warning about zero-length format string. */
+ char *empty = "";
+ result = xasprintf (empty);
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "") == 0);
+ free (result);
+ }
+
+ result = xasprintf ("%s", "foo");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foo") == 0);
+ free (result);
+
+ result = xasprintf ("%s%s", "foo", "bar");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foobar") == 0);
+ free (result);
+
+ result = my_xasprintf ("%s%sbaz", "foo", "bar");
+ ASSERT (result != NULL);
+ ASSERT (strcmp (result, "foobarbaz") == 0);
+ free (result);
+}
+
+int
+main (int argc _GL_UNUSED, char *argv[])
+{
+ set_program_name (argv[0]);
+
+ test_xvasprintf ();
+ test_xasprintf ();
+
+ return 0;
+}
diff --git a/tests/gnu/uniwidth/test-uc_width.c b/tests/gnu/uniwidth/test-uc_width.c
new file mode 100755
index 00000000..7cfab614
--- /dev/null
+++ b/tests/gnu/uniwidth/test-uc_width.c
@@ -0,0 +1,56 @@
+/* Test of uc_width() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2007. */
+
+#include <config.h>
+
+#include "uniwidth.h"
+
+#include "macros.h"
+
+int
+main ()
+{
+ ucs4_t uc;
+
+ /* Test width of ASCII characters. */
+ for (uc = 0x0020; uc < 0x007F; uc++)
+ ASSERT (uc_width (uc, "ISO-8859-2") == 1);
+
+ /* Test width of some non-spacing characters. */
+ ASSERT (uc_width (0x0301, "UTF-8") == 0);
+ ASSERT (uc_width (0x05B0, "UTF-8") == 0);
+
+ /* Test width of some format control characters. */
+ ASSERT (uc_width (0x200E, "UTF-8") == 0);
+ ASSERT (uc_width (0x2060, "UTF-8") == 0);
+ ASSERT (uc_width (0xE0001, "UTF-8") == 0);
+ ASSERT (uc_width (0xE0044, "UTF-8") == 0);
+
+ /* Test width of some zero width characters. */
+ ASSERT (uc_width (0x200B, "UTF-8") == 0);
+ ASSERT (uc_width (0xFEFF, "UTF-8") == 0);
+
+ /* Test width of some CJK characters. */
+ ASSERT (uc_width (0x3000, "UTF-8") == 2);
+ ASSERT (uc_width (0xB250, "UTF-8") == 2);
+ ASSERT (uc_width (0xFF1A, "UTF-8") == 2);
+ ASSERT (uc_width (0x20369, "UTF-8") == 2);
+ ASSERT (uc_width (0x2F876, "UTF-8") == 2);
+
+ return 0;
+}
diff --git a/tests/gnu/uniwidth/test-uc_width2.c b/tests/gnu/uniwidth/test-uc_width2.c
new file mode 100755
index 00000000..3126d4c3
--- /dev/null
+++ b/tests/gnu/uniwidth/test-uc_width2.c
@@ -0,0 +1,86 @@
+/* Test of uc_width() function.
+ Copyright (C) 2007-2010 Free Software Foundation, Inc.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2008. */
+
+#include <config.h>
+
+#include "uniwidth.h"
+
+#include <stdio.h>
+
+#include "macros.h"
+
+/* One of 0, '0', '1', 'A', '2'. */
+static char current_width;
+/* The interval for which the current_width holds. */
+static ucs4_t current_start;
+static ucs4_t current_end;
+
+static void
+finish_interval (void)
+{
+ if (current_width != 0)
+ {
+ if (current_start == current_end)
+ printf ("%04X\t\t%c\n", (unsigned) current_start, current_width);
+ else
+ printf ("%04X..%04X\t%c\n", (unsigned) current_start,
+ (unsigned) current_end, current_width);
+ current_width = 0;
+ }
+}
+
+static void
+add_to_interval (ucs4_t uc, char width)
+{
+ if (current_width == width && uc == current_end + 1)
+ current_end = uc;
+ else
+ {
+ finish_interval ();
+ current_width = width;
+ current_start = current_end = uc;
+ }
+}
+
+int
+main ()
+{
+ ucs4_t uc;
+
+ for (uc = 0; uc < 0x110000; uc++)
+ {
+ int w1 = uc_width (uc, "UTF-8");
+ int w2 = uc_width (uc, "GBK");
+ char width =
+ (w1 == 0 && w2 == 0 ? '0' :
+ w1 == 1 && w2 == 1 ? '1' :
+ w1 == 1 && w2 == 2 ? 'A' :
+ w1 == 2 && w2 == 2 ? '2' :
+ 0);
+ if (width == 0)
+ {
+ /* uc must be a control character. */
+ ASSERT (w1 < 0 && w2 < 0);
+ }
+ else
+ add_to_interval (uc, width);
+ }
+ finish_interval ();
+
+ return 0;
+}
diff --git a/tests/gnu/uniwidth/test-uc_width2.sh b/tests/gnu/uniwidth/test-uc_width2.sh
new file mode 100755
index 00000000..484288c9
--- /dev/null
+++ b/tests/gnu/uniwidth/test-uc_width2.sh
@@ -0,0 +1,382 @@
+#!/bin/sh
+
+tmpfiles=""
+trap 'rm -fr $tmpfiles' 1 2 3 15
+
+tmpfiles="$tmpfiles uc_width.out"
+./test-uc_width2${EXEEXT} | LC_ALL=C tr -d '\r' > uc_width.out
+
+tmpfiles="$tmpfiles uc_width.ok"
+cat > uc_width.ok <<\EOF
+0000 0
+0020..007E 1
+00A0 1
+00A1..00AC A
+00AD 0
+00AE..02FF A
+0300..036F 0
+0370..0482 A
+0483..0489 0
+048A..0590 A
+0591..05BD 0
+05BE A
+05BF 0
+05C0 A
+05C1..05C2 0
+05C3 A
+05C4..05C5 0
+05C6 A
+05C7 0
+05C8..05FF A
+0600..0603 0
+0604..060F A
+0610..061A 0
+061B..064A A
+064B..065E 0
+065F..066F A
+0670 0
+0671..06D5 A
+06D6..06E4 0
+06E5..06E6 A
+06E7..06E8 0
+06E9 A
+06EA..06ED 0
+06EE..070E A
+070F 0
+0710 A
+0711 0
+0712..072F A
+0730..074A 0
+074B..07A5 A
+07A6..07B0 0
+07B1..07EA A
+07EB..07F3 0
+07F4..0900 A
+0901..0902 0
+0903..093B A
+093C 0
+093D..0940 A
+0941..0948 0
+0949..094C A
+094D 0
+094E..0950 A
+0951..0954 0
+0955..0961 A
+0962..0963 0
+0964..0980 A
+0981 0
+0982..09BB A
+09BC 0
+09BD..09C0 A
+09C1..09C4 0
+09C5..09CC A
+09CD 0
+09CE..09E1 A
+09E2..09E3 0
+09E4..0A00 A
+0A01..0A02 0
+0A03..0A3B A
+0A3C 0
+0A3D..0A40 A
+0A41..0A42 0
+0A43..0A46 A
+0A47..0A48 0
+0A49..0A4A A
+0A4B..0A4D 0
+0A4E..0A50 A
+0A51 0
+0A52..0A6F A
+0A70..0A71 0
+0A72..0A74 A
+0A75 0
+0A76..0A80 A
+0A81..0A82 0
+0A83..0ABB A
+0ABC 0
+0ABD..0AC0 A
+0AC1..0AC5 0
+0AC6 A
+0AC7..0AC8 0
+0AC9..0ACC A
+0ACD 0
+0ACE..0AE1 A
+0AE2..0AE3 0
+0AE4..0B00 A
+0B01 0
+0B02..0B3B A
+0B3C 0
+0B3D..0B3E A
+0B3F 0
+0B40 A
+0B41..0B44 0
+0B45..0B4C A
+0B4D 0
+0B4E..0B55 A
+0B56 0
+0B57..0B61 A
+0B62..0B63 0
+0B64..0B81 A
+0B82 0
+0B83..0BBF A
+0BC0 0
+0BC1..0BCC A
+0BCD 0
+0BCE..0C3D A
+0C3E..0C40 0
+0C41..0C45 A
+0C46..0C48 0
+0C49 A
+0C4A..0C4D 0
+0C4E..0C54 A
+0C55..0C56 0
+0C57..0C61 A
+0C62..0C63 0
+0C64..0CBB A
+0CBC 0
+0CBD..0CCB A
+0CCC..0CCD 0
+0CCE..0CE1 A
+0CE2..0CE3 0
+0CE4..0D40 A
+0D41..0D44 0
+0D45..0D4C A
+0D4D 0
+0D4E..0D61 A
+0D62..0D63 0
+0D64..0DC9 A
+0DCA 0
+0DCB..0DD1 A
+0DD2..0DD4 0
+0DD5 A
+0DD6 0
+0DD7..0E30 A
+0E31 0
+0E32..0E33 A
+0E34..0E3A 0
+0E3B..0E46 A
+0E47..0E4E 0
+0E4F..0EB0 A
+0EB1 0
+0EB2..0EB3 A
+0EB4..0EB9 0
+0EBA A
+0EBB..0EBC 0
+0EBD..0EC7 A
+0EC8..0ECD 0
+0ECE..0F17 A
+0F18..0F19 0
+0F1A..0F34 A
+0F35 0
+0F36 A
+0F37 0
+0F38 A
+0F39 0
+0F3A..0F70 A
+0F71..0F7E 0
+0F7F A
+0F80..0F84 0
+0F85 A
+0F86..0F87 0
+0F88..0F8F A
+0F90..0F97 0
+0F98 A
+0F99..0FBC 0
+0FBD..0FC5 A
+0FC6 0
+0FC7..102C A
+102D..1030 0
+1031 A
+1032..1037 0
+1038 A
+1039..103A 0
+103B..103C A
+103D..103E 0
+103F..1057 A
+1058..1059 0
+105A..105D A
+105E..1060 0
+1061..1070 A
+1071..1074 0
+1075..1081 A
+1082 0
+1083..1084 A
+1085..1086 0
+1087..108C A
+108D 0
+108E..10FF A
+1100..115F 2
+1160..135E A
+135F 0
+1360..1711 A
+1712..1714 0
+1715..1731 A
+1732..1734 0
+1735..1751 A
+1752..1753 0
+1754..1771 A
+1772..1773 0
+1774..17B3 A
+17B4..17B5 0
+17B6 A
+17B7..17BD 0
+17BE..17C5 A
+17C6 0
+17C7..17C8 A
+17C9..17D3 0
+17D4..17DC A
+17DD 0
+17DE..180A A
+180B..180D 0
+180E..18A8 A
+18A9 0
+18AA..191F A
+1920..1922 0
+1923..1926 A
+1927..1928 0
+1929..1931 A
+1932 0
+1933..1938 A
+1939..193B 0
+193C..1A16 A
+1A17..1A18 0
+1A19..1AFF A
+1B00..1B03 0
+1B04..1B33 A
+1B34 0
+1B35 A
+1B36..1B3A 0
+1B3B A
+1B3C 0
+1B3D..1B41 A
+1B42 0
+1B43..1B6A A
+1B6B..1B73 0
+1B74..1B7F A
+1B80..1B81 0
+1B82..1BA1 A
+1BA2..1BA5 0
+1BA6..1BA7 A
+1BA8..1BA9 0
+1BAA..1C2B A
+1C2C..1C33 0
+1C34..1C35 A
+1C36..1C37 0
+1C38..1DBF A
+1DC0..1DE6 0
+1DE7..1DFD A
+1DFE..1DFF 0
+1E00..200A A
+200B..200F 0
+2010..2029 A
+202A..202E 0
+202F..205F A
+2060..2064 0
+2065..2069 A
+206A..206F 0
+2070..20A8 A
+20A9 1
+20AA..20CF A
+20D0..20F0 0
+20F1..2328 A
+2329..232A 2
+232B..2DDF A
+2DE0..2DFF 0
+2E00..2E7F A
+2E80..3029 2
+302A..302F 0
+3030..303E 2
+303F A
+3040..3098 2
+3099..309A 0
+309B..4DBF 2
+4DC0..4DFF A
+4E00..A4CF 2
+A4D0..A66E A
+A66F..A672 0
+A673..A67B A
+A67C..A67D 0
+A67E..A801 A
+A802 0
+A803..A805 A
+A806 0
+A807..A80A A
+A80B 0
+A80C..A824 A
+A825..A826 0
+A827..A8C3 A
+A8C4 0
+A8C5..A925 A
+A926..A92D 0
+A92E..A946 A
+A947..A951 0
+A952..AA28 A
+AA29..AA2E 0
+AA2F..AA30 A
+AA31..AA32 0
+AA33..AA34 A
+AA35..AA36 0
+AA37..AA42 A
+AA43 0
+AA44..AA4B A
+AA4C 0
+AA4D..ABFF A
+AC00..D7A3 2
+D7A4..F8FF A
+F900..FAFF 2
+FB00..FB1D A
+FB1E 0
+FB1F..FDFF A
+FE00..FE0F 0
+FE10..FE1F 2
+FE20..FE26 0
+FE27..FE2F A
+FE30..FE6F 2
+FE70..FEFE A
+FEFF 0
+FF00..FF60 2
+FF61..FFDF 1
+FFE0..FFE6 2
+FFE7..FFF8 1
+FFF9..FFFB 0
+FFFC..101FC 1
+101FD 0
+101FE..10A00 1
+10A01..10A03 0
+10A04 1
+10A05..10A06 0
+10A07..10A0B 1
+10A0C..10A0F 0
+10A10..10A37 1
+10A38..10A3A 0
+10A3B..10A3E 1
+10A3F 0
+10A40..1D166 1
+1D167..1D169 0
+1D16A..1D17A 1
+1D17B..1D182 0
+1D183..1D184 1
+1D185..1D18B 0
+1D18C..1D1A9 1
+1D1AA..1D1AD 0
+1D1AE..1D241 1
+1D242..1D244 0
+1D245..1FFFF 1
+20000..2A6D6 2
+2A6D7..2F7FF 1
+2F800..2FA1D 2
+2FA1E..E0000 1
+E0001 0
+E0002..E001F 1
+E0020..E007F 0
+E0080..E00FF 1
+E0100..E01EF 0
+E01F0..10FFFF 1
+EOF
+
+: ${DIFF=diff}
+${DIFF} uc_width.ok uc_width.out
+result=$?
+
+rm -fr $tmpfiles
+
+exit $result
diff --git a/tests/gnu/wctob.c b/tests/gnu/wctob.c
new file mode 100755
index 00000000..1d1cc7b1
--- /dev/null
+++ b/tests/gnu/wctob.c
@@ -0,0 +1,37 @@
+/* Convert wide character to unibyte character.
+ Copyright (C) 2008, 2009, 2010 Free Software Foundation, Inc.
+ Written by Bruno Haible <bruno@clisp.org>, 2008.
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+#include <config.h>
+
+/* Specification. */
+#include <wchar.h>
+
+#include <stdio.h>
+#include <stdlib.h>
+
+int
+wctob (wint_t wc)
+{
+ char buf[64];
+
+ if (!(MB_CUR_MAX <= sizeof (buf)))
+ abort ();
+ if (wctomb (buf, wc) == 1)
+ return (unsigned char) buf[0];
+ else
+ return EOF;
+}
diff --git a/tests/gnu/zerosize-ptr.h b/tests/gnu/zerosize-ptr.h
new file mode 100755
index 00000000..cfab2008
--- /dev/null
+++ b/tests/gnu/zerosize-ptr.h
@@ -0,0 +1,68 @@
+/* Return a pointer to a zero-size object in memory.
+ Copyright (C) 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 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 General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>. */
+
+/* ISO C 99 does not allow memcmp(), memchr() etc. to be invoked with a NULL
+ argument. Therefore this file produces a non-NULL pointer which cannot
+ be dereferenced, if possible. */
+
+#include <stdlib.h>
+
+/* Test whether mmap() and mprotect() are available.
+ We don't use HAVE_MMAP, because AC_FUNC_MMAP would not define it on HP-UX.
+ HAVE_MPROTECT is not enough, because mingw does not have mmap() but has an
+ mprotect() function in libgcc.a. */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# include <fcntl.h>
+# include <unistd.h>
+# include <sys/types.h>
+# include <sys/mman.h>
+/* Define MAP_FILE when it isn't otherwise. */
+# ifndef MAP_FILE
+# define MAP_FILE 0
+# endif
+#endif
+
+/* Return a pointer to a zero-size object in memory (that is, actually, a
+ pointer to a page boundary where the previous page is readable and writable
+ and the next page is neither readable not writable), if possible.
+ Return NULL otherwise. */
+
+static void *
+zerosize_ptr (void)
+{
+/* Use mmap and mprotect when they exist. Don't test HAVE_MMAP, because it is
+ not defined on HP-UX 11 (since it does not support MAP_FIXED). */
+#if HAVE_SYS_MMAN_H && HAVE_MPROTECT
+# if HAVE_MAP_ANONYMOUS
+ const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
+ const int fd = -1;
+# else /* !HAVE_MAP_ANONYMOUS */
+ const int flags = MAP_FILE | MAP_PRIVATE;
+ int fd = open ("/dev/zero", O_RDONLY, 0666);
+ if (fd >= 0)
+# endif
+ {
+ int pagesize = getpagesize ();
+ char *two_pages =
+ (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
+ flags, fd, 0);
+ if (two_pages != (char *)(-1)
+ && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
+ return two_pages + pagesize;
+ }
+#endif
+ return NULL;
+}